Bug#1008489: Bug#994388: Bug#1008489: proposed diff for dpkg 1.21.7+nmu1

2022-04-09 Thread Ansgar
On Sat, 2022-04-09 at 10:59 -0700, Sean Whitton wrote:
> On Sat 09 Apr 2022 at 11:50am +02, Ansgar wrote:
> > I've prepared a patch for the current issue.  See the attached proposed
> > NMU diff.  I've limited it to minimal changes.
> 
> I don't understand.  The warning is already no longer emitted on
> Debian?

Debian is used as a basis by derivative distributions where it is still
emitted. Most derivatives will likely follow Debian (unless you expect
a significant number of them to have resources to fork and maintain
packages for continued split-/usr support).

I think it is reasonable for Debian packages to behave reasonably on
derivatives as well. In this case that means dpkg should not emit a
warning by default on derivatives either.

Ansgar



Bug#1008489: proposed diff for dpkg 1.21.7+nmu1

2022-04-09 Thread Sean Whitton
Hello,

On Sat 09 Apr 2022 at 11:50am +02, Ansgar wrote:

> Hi,
>
> I've prepared a patch for the current issue.  See the attached proposed
> NMU diff.  I've limited it to minimal changes.

I don't understand.  The warning is already no longer emitted on Debian?

-- 
Sean Whitton



Bug#1008489: proposed diff for dpkg 1.21.7+nmu1

2022-04-09 Thread Ansgar
Hi,

I've prepared a patch for the current issue.  See the attached proposed
NMU diff.  I've limited it to minimal changes.

Is this something the technical committee finds acceptable?

Ansgar

From 2569c0aca93f2f0d7f5521c3158ed077f206ce0a Mon Sep 17 00:00:00 2001
From: Ansgar 
Date: Sat, 9 Apr 2022 11:14:40 +0200
Subject: [PATCH] dpkg.postinst: Remove warning about merged-/usr. Closes:
 #1008489

---
 debian/changelog |  7 +++
 debian/dpkg.postinst | 38 --
 2 files changed, 7 insertions(+), 38 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 6375989..a316609 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+dpkg (1.21.7+nmu1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * dpkg.postinst: Remove warning about merged-/usr. Closes: #1008489
+
+ -- Ansgar   Sat, 09 Apr 2022 11:00:38 +0200
+
 dpkg (1.21.7) unstable; urgency=medium
 
   - The “Social Contract §3: We will not hide problems”
diff --git a/debian/dpkg.postinst b/debian/dpkg.postinst
index 83a4873..5aee110 100644
--- a/debian/dpkg.postinst
+++ b/debian/dpkg.postinst
@@ -9,42 +9,6 @@ PROGNAME=dpkg
 
 setup_colors
 
-get_vendor()
-{
-  local origin="$DPKG_ROOT/etc/dpkg/origins/default"
-  local vendor
-
-  if [ -e "$origin" ]; then
-vendor=$(sed -ne 's/^Vendor: *\([^ ]\+\) */\1/p' "$origin" | tr '[A-Z]' '[a-z]')
-  fi
-
-  echo "${vendor:-default}"
-}
-
-check_merged_usr_via_aliased_dirs()
-{
-  local vendor
-
-  vendor=$(get_vendor)
-
-  # In Debian some people have gotten so offended by the following _warning_
-  # that they have resorted to bullying and abuse. Life's too short, sorry.
-  if [ "$vendor" = "debian" ]; then
-return
-  fi
-
-  for d in /bin /sbin /lib /lib32 /libo32 /libx32 /lib64; do
-linkname="$(readlink $DPKG_ROOT$d || true)"
-if [ "$linkname" = "usr$d" ] || [ "$linkname" = "/usr$d" ]; then
-  warning "This system uses merged-usr-via-aliased-dirs, going behind dpkg's"
-  warning "back, breaking its core assumptions. This can cause silent file"
-  warning "overwrites and disappearances, and its general tools misbehavior."
-  warning "See ."
-  break
-fi
-  done
-}
-
 # Version 1.21.0 had bogus handling of DPKG_ADMINDIR in update-alternatives,
 # and misplaced them, fix them up.
 fixup_misplaced_alternatives()
@@ -93,8 +57,6 @@ fixup_misplaced_alternatives()
 case "$1" in
 configure)
   fixup_misplaced_alternatives
-
-  check_merged_usr_via_aliased_dirs
   ;;
 abort-upgrade|abort-deconfigure|abort-remove)
   ;;
-- 
2.35.1