Hi Aurelien,
So this confirms your initial suspicion on the actually affected case.
Thank you.
c-t-b has repacking code with arch-specific mangling (of slibdir)
already. https://sources.debian.org/src/cross-toolchain-base/68/debian/rules/#L563 Adding to that wouldn't be the worst. A relatively easy measure would be running the libc-alt.postinst manually with DPKG_ROOT set to have it
create the symlink that way. Do you think this is too much of a hack?
So here is an updated patch with a few notes:
* This patch moves all the files including the runtime dynamic linker
in the main multiarch library. Therefore, this patch needs to be
synced with the corresponding base-files change to add the aliasing
symlinks or debootstrap breaks. In other words: Don't upload this
yet.
* As mentioned earlier, only the multiarch packages install the runtime
dynamic linker via data.tar. All the multilib packages install it via
maintainer scripts now.
* When installing libc6-x32, /libx32 will be created because partial
upgrades might otherwise be broken. Removing libc6-x32 will not
remove /libx32 though. I suggest fixing this in base-files by
installing a trigger interest in /usr/libx32 and having
base-files.postinst create/remove /libx32 as needed. This way, we
centralize the management of aliasing links into base-files. libx32
only serves as an example here and it works the same way for any
other non-essential multilib directory. Do you agree with the
approach?
* The multilib packages install a trigger interest on the runtime
dynamic linker such that they notice when a multiarch package deletes
it and can then recreate it as needed. Thus the multiarch packages do
not have to pay attention to a possibly installed multilib package
when they are removed.
* I've tried quite a few multiarch upgrades involving amd64 and i386
using dpkg --auto-deconfigure --unpack with various packages and even
cross grading libc6-x32 from :i386 to :amd64 during the upgrade.
While dpkg --verify was occasionally unhappy during a partial upgrade
(where half-unpacked packages were around), once no package was
half-installed, dpkg --verify was also happy again in all attempts. I
did not come up with a systematic enumeration of possible upgrade
scenarios though.
* The patch works will deboostrap/cdebootstrap/mmdebstrap (in
combination with more patches including base-files, bash, dash and
util-linux).
* The change to install ldconfig to /usr/sbin can be uploaded right
away. It's limited to debian/debhelper.in/libc-bin.install and
debian/debhelper.in/libc-bin.lintian-overrides and doesn't contribute
much diff, so doing it later is fine as well.
Hi Aurelien and Sven,
On Wed, Jan 24, 2024 at 09:19:12PM +0100, Aurelien Jarno wrote:
On 2024-01-23 17:40, Helmut Grohne wrote:
Conflicting runtime dynamic linkers between multiarch packages ==============================================================
Some architecture combinations such as s390, powerpc, hppa, m68k, mipsn32, and hurd-i386 or alpha, i386, sh4, and sparc have conflicting runtime dynamic loaders. In theory this violates Multi-Arch: same, but there is basically nothing we can do about this and dropping Multi-Arch: same from the packages would completely break any kind of multiarch setup. There is little we can do here and this is also unrelated to DEP17.
We tried to add conflicts for those, like it's done for the multilib packages, but at the time the infrastructure exploded (see #745552). I don't remember the details, but I guess it was either dak or dose-builddebcheck.
Yeah, I also remember something like that. It's not the first time I
trip into this. "There is little we can do here" still counts.
I guess the symlink in the maintainer script could indeed work. I am not sure why it has been done like that, it was part of the multiarch
patchset from Steve Langasek more than 10 years ago.
Practically speaking, it appears to work rather well. On the flip side,
I also thought that way of my first patch. ;)
Note however that the those packages are used by cross-toolchain-base (which builds them from glibc-source) and mangled to install them in the cross path. See for instance libc6-amd64-x32-cross. For such cases, we probably do want to keep the dynamic linker symlink, as those packages
do not have maintainer scripts.
I don't think those -$arch-cross packages need the runtime dynamic
linker at all. Unlike the libc6-$multilib packages, we don't use
-$arch-cross packages to actaully run any binary. Simply not installing
it might just work in practice.
So here is an updated patch with a few notes:
* This patch moves all the files including the runtime dynamic linker
in the main multiarch library. Therefore, this patch needs to be
synced with the corresponding base-files change to add the aliasing
symlinks or debootstrap breaks. In other words: Don't upload this
yet.
* As mentioned earlier, only the multiarch packages install the runtime
dynamic linker via data.tar. All the multilib packages install it via
maintainer scripts now.
* When installing libc6-x32, /libx32 will be created because partial
upgrades might otherwise be broken. Removing libc6-x32 will not
remove /libx32 though. I suggest fixing this in base-files by
installing a trigger interest in /usr/libx32 and having
base-files.postinst create/remove /libx32 as needed. This way, we
centralize the management of aliasing links into base-files. libx32
only serves as an example here and it works the same way for any
other non-essential multilib directory. Do you agree with the
approach?
* The multilib packages install a trigger interest on the runtime
dynamic linker such that they notice when a multiarch package deletes
it and can then recreate it as needed. Thus the multiarch packages do
not have to pay attention to a possibly installed multilib package
when they are removed.
* I've tried quite a few multiarch upgrades involving amd64 and i386
using dpkg --auto-deconfigure --unpack with various packages and even
cross grading libc6-x32 from :i386 to :amd64 during the upgrade.
While dpkg --verify was occasionally unhappy during a partial upgrade
(where half-unpacked packages were around), once no package was
half-installed, dpkg --verify was also happy again in all attempts. I
did not come up with a systematic enumeration of possible upgrade
scenarios though.
* The patch works will deboostrap/cdebootstrap/mmdebstrap (in
combination with more patches including base-files, bash, dash and
util-linux).
* The change to install ldconfig to /usr/sbin can be uploaded right
away. It's limited to debian/debhelper.in/libc-bin.install and
debian/debhelper.in/libc-bin.lintian-overrides and doesn't contribute
much diff, so doing it later is fine as well.
I hope you don't manage to punch holes into my theory this time around.
Niels Thykier made me aware of dh_installdeb -D. Using it avoids the
need for a pile of .in files in base-files. I hope you like this
refactoring. Let me know if not.
Nice feature indeed. To simplify the usr-merge patch, I've adopted
the -D change in debian/postinst *before* we apply the usr-merge patch.
Please take a look at branch "wip-202404-usrmerge" here:
https://salsa.debian.org/sanvila/base-files-not-yet/-/tree/wip-202404-usrmerge?ref_type=heads
(The repository name speaks for itself... I'm still not comfortable enough with salsa, but I'd like to experiment and see how it goes).
I've rebased the patch relative to version 13.1 which I have just uploaded.
If the rebase is ok, I'd like to make some minor editorial changes there as well.
Please let me know when you did your editorial changes such that I can replace my patch with yours and retest.
I've added two commits, one to create symlinks with a "shell" for, and the last
one for a sample changelog (because this is really a "team upload" or a "guest upload"
more than a NMU). I think for simplicity it's ok if you skip the changelog part
in your repo.
I've updated my demo repository with your patch.
https://salsa.debian.org/helmutg/bootstrap-usrmerge-demo/-/commit/6425c8cde53596199cd37bb1625d1dfb2a4b74d0
I'm happy to call it guest upload while I find team upload slightly misleading.
I avoid patching changelogs in the demo to avoid the need for
unnecessary rebasing. It's a functional demo.
For util-linux, I think Chris will send me an encrypted version of a
signed .changes file such that I only perform the upload not even the signing. Please let me know if you prefer that approach.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 300 |
Nodes: | 16 (2 / 14) |
Uptime: | 13:46:38 |
Calls: | 6,706 |
Files: | 12,237 |
Messages: | 5,351,041 |