--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: di-utils: chroot-setup.sh creates ineffective diversions (DEP17)
- From: Helmut Grohne <helmut@subdivi.de>
- Date: Tue, 13 Feb 2024 22:34:37 +0100
- Message-id: <20240213213437.GA1980121@subdivi.de>
Package: di-utils
Version: 1.148
User: helmutg@debian.org
Usertags: dep17p3
Control: affects -1 + dpkg
Tags: patch
Forwarded: https://salsa.debian.org/installer-team/debian-installer-utils/-/merge_requests/11
X-Debbugs-Cc: buxy@debian.org, fil@debian.org
Hi,
Raphael kindly pointed me at this Kali Linux bug report:
https://bugs.kali.org/view.php?id=8628
In there, we can see (among other things):
| Feb 8 22:06:02 main-menu[1596]: (process:31692): dpkg-divert: warning: diverting file '/sbin/start-stop-daemon' from an Essential package with rename is dangerous, use --no-rename
| Feb 8 22:06:02 main-menu[1596]: (process:31692): dpkg-divert: warning: diverting file '/sbin/start-stop-daemon' from an Essential package with rename is dangerous, use --no-rename
| Feb 8 22:06:02 main-menu[1596]: (process:31692): dpkg-divert: warning: diverting file '/sbin/start-stop-daemon' from an Essential package with rename is dangerous, use --no-rename
Due to this harmless warning, we learn that /sbin/start-stop-daemon is
being diverted, but dpkg now installs it as /usr/sbin/start-stop-daemon.
We are effectively faced with what DEP17 P3 calls an ineffective
diversion. We later see:
| Feb 8 22:07:08 grub-installer: dpkg: warning: 'start-stop-daemon' not found in PATH or not executable
| Feb 8 22:07:08 grub-installer: dpkg: error: 1 expected program not found in PATH or not executable
| Feb 8 22:07:08 grub-installer: Note: root's PATH should usually contain /usr/local/sbin, /u
| Feb 8 22:07:08 grub-installer: sr/sbin and /sbin
Raphael kindly pointed at chroot-setup.sh from di-utils. There
/sbin/start-stop-daemon is diverted with --rename. Since it is installed
as /usr/sbin/start-stop-daemon, this diversion (and its rename) does not
take any effect. When it is undiverted, the /sbin/start-stop-daemon (and
since the chroot is /usr-merged also /usr/sbin/start-stop-daemon) is
deleted and then undiverted with --rename, but there is no
/sbin/start-stop-daemon.REAL, because that diversion ended up being
ineffective. Therefore, nothing is moved back and we lost
/sbin/start-stop-daemon (and /usr/sbin-start-stop-daemon).
I've prepared a patch that duplicates diversions as needed and filed it
in the linked merge request on salsa. I've attempted testing this, but
debian-installer still FTBFS in unstable. Holger told me that Fil and
openqa.debian.net would be somehow able to test MRs on salsa. Fil, can
you help here?
I also see that https://openqa.debian.net/ has recent successes. dpkg
migrated to trixie about two weeks ago. I would have expected that this
breaks an d-i. Do you have an explanation for why jobs still pass?
Raphael, can you link this bug to the Kali bug?
Helmut
--- End Message ---
--- Begin Message ---
- To: 1063878-done@bugs.debian.org
- Subject: Re: Bug#1063878: di-utils: chroot-setup.sh creates ineffective diversions (DEP17)
- From: Colin Watson <cjwatson@debian.org>
- Date: Sun, 16 Mar 2025 19:53:55 +0000
- Message-id: <Z9csU75vDdfQCJR9@riva.ucam.org>
- In-reply-to: <20240213213437.GA1980121@subdivi.de>
- References: <20240213213437.GA1980121@subdivi.de>
Source: debian-installer-utils
Source-Version: 1.153
Fixed a few weeks ago, but I forgot to close this bug:
debian-installer-utils (1.153) unstable; urgency=medium
[ Helmut Grohne ]
* chroot-setup.sh: Duplicate aliased diversions.
[ Updated translations ]
* Hungarian (hu.po) by Szia Tomi
* Serbian (sr.po) by Мирослав Николић
-- Colin Watson <cjwatson@debian.org> Fri, 28 Feb 2025 11:17:13 +0000
Thanks,
--
Colin Watson (he/him) [cjwatson@debian.org]
--- End Message ---