Your message dated Thu, 06 Jun 2024 08:38:15 +0000 with message-id <E1sF8dT-00DH9V-A7@fasolo.debian.org> and subject line Bug#1061248: fixed in glibc 2.39-3.1 has caused the Debian Bug report #1061248, regarding glibc: DEP17: move most files but rtld to /usr to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@bugs.debian.org immediately.) -- 1061248: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1061248 Debian Bug Tracking System Contact owner@bugs.debian.org with problems
--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: glibc: DEP17: move most files but rtld to /usr
- From: Helmut Grohne <helmut@subdivi.de>
- Date: Sun, 21 Jan 2024 15:25:04 +0100
- Message-id: <20240121142504.GA504225@subdivi.de>
Source: glibc Version: 2.37-13 Tags: patch User: helmutg@debian.org Usertags: dep17m2 Hi Aurelien, thanks for your answers on IRC to my design question. As promised here comes a patch that moves most files in binary packages built from glibc from aliased locations to /usr. This excludes the runtime dynamic linker for native libc packages (i.e. not multilib), because moving it would break filesystem bootstrap unless base-files installs the aliasing symlinks at the same time. That move is a later step and is what I asked for in https://lists.debian.org/20230912181509.GA2588950@subdivi.de. What I'm asking for here is staging the changes to glibc in two phases where the majority of the move happens before that coordinated upload. This patch is that majority move. Regarding the implementation, I asked whether you'd prefer to change slibdir or not and you answered that you'd rather not change it as e.g. Fedora is not changing it either. My first implementation changed slibdir and this second iteration that does not change slibdir is quite a bit simpler. I also asked about how to deal with symbolic links that point at aliased locations. Your answer felt a little inconclusive to me, but fixing them practically is a requirement: During filesystem bootstrap, libc6 needs to briefly operate in an unmerged state (temporarily until that coordinated move) and therefore those symlinks in libc6 cannot rely on the aliasing symlinks having been set up. Hence, I added code for fixing those links before letting dh_link perform their canonicalization according to Debian policy. In practice, this turns most of the links (but runtime dynamic linker links) into relative ones. We may be able to drop this after the coordinated move if you disagree about the approach taken here, but I think it is best to accept this temporarily at least. Are you also comfortable with keeping this link fixing permanently? The change at hand requires significant testing, because there is a significant risk of breaking stuff and doing so is very annoying to many developers. I've performed the following steps: * Reviewed the file lists of created .debs to see that all files but runtime dynamic linkers have moved out of aliased locations. * Reviewed all symbolic links in created .debs. * Ran piuparts. It complained about /lib32 and /libx32 not being cleaned up after removal of multilib packages. I think this is vaguely fine. Do you agree? If not, I can add postrm code that checks whether /usr/lib32 and /usr/libx32 vanished and removes the aliasing links in those cases. * I set up a custom reprepro repository with these packages and ran a number of filesystem bootstraps: * debootstrap * debootstrap --variant=minbase * cdebootstrap --flavour=standard * cdebootstrap --flavour=minimal * mmdebstrap --variant=debootstrap * mmdebstrap --variant=minbase * mmdebstrap --variant=apt All of these bootstraps do not contain any glibc-owned files in aliased locations with the exception of the runtime dynamic linker. * I compiled a minimal C program in chroot both with -m32 and without and verified that the embedded location of the runtime dynamic linker still is aliased and that the resulting program still runs. * In addition to testing on amd64, I performed a i386 build. I note that my builds are nocheck builds, due to failing tests unrelated to my changes. I did not bother figuring out what local configuration causes those the test failures. Do you miss any testing here? Helmutdiff --minimal -Nru glibc-2.37/debian/changelog glibc-2.37/debian/changelog --- glibc-2.37/debian/changelog 2023-12-03 14:23:52.000000000 +0100 +++ glibc-2.37/debian/changelog 2024-01-19 15:56:06.000000000 +0100 @@ -1,3 +1,10 @@ +glibc (2.37-13.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * DEP17: Move most files but rtld to /usr. (Closes: #-1) + + -- Helmut Grohne <helmut@subdivi.de> Fri, 19 Jan 2024 15:56:06 +0100 + glibc (2.37-13) unstable; urgency=medium [ Aurelien Jarno ] diff --minimal -Nru glibc-2.37/debian/debhelper.in/libc-alt.install glibc-2.37/debian/debhelper.in/libc-alt.install --- glibc-2.37/debian/debhelper.in/libc-alt.install 2022-09-22 22:06:02.000000000 +0200 +++ glibc-2.37/debian/debhelper.in/libc-alt.install 2024-01-19 15:56:06.000000000 +0100 @@ -1,6 +1,6 @@ # This file is used for biarch libraries. -TMPDIR/RTLDDIR/*.so* RTLDDIR -TMPDIR/SLIBDIR/*.so* SLIBDIR +TMPDIR/RTLDDIR/*.so* usr/RTLDDIR +TMPDIR/SLIBDIR/*.so* usr/SLIBDIR TMPDIR/LIBDIR/gconv/* LIBDIR/gconv/ TMPDIR/etc/ld.so.conf.d /etc diff --minimal -Nru glibc-2.37/debian/debhelper.in/libc-alt.postrm glibc-2.37/debian/debhelper.in/libc-alt.postrm --- glibc-2.37/debian/debhelper.in/libc-alt.postrm 2023-10-03 21:07:14.000000000 +0200 +++ glibc-2.37/debian/debhelper.in/libc-alt.postrm 2024-01-19 15:56:06.000000000 +0100 @@ -7,8 +7,8 @@ # multiarch package are installed, then the multiarch package is removed, # and then the biarch package is removed, the dynamic linker symlink # becomes a dangling symlink. Remove it in that case. - if [ -h RTLDDIR/RTLD_SO ] && [ ! -f RTLDDIR/RTLD_SO ]; then - rm RTLDDIR/RTLD_SO + if [ -h usr/RTLDDIR/RTLD_SO ] && [ ! -f usr/RTLDDIR/RTLD_SO ]; then + rm usr/RTLDDIR/RTLD_SO fi fi diff --minimal -Nru glibc-2.37/debian/debhelper.in/libc-bin.install glibc-2.37/debian/debhelper.in/libc-bin.install --- glibc-2.37/debian/debhelper.in/libc-bin.install 2023-10-03 21:07:14.000000000 +0200 +++ glibc-2.37/debian/debhelper.in/libc-bin.install 2024-01-19 15:56:06.000000000 +0100 @@ -4,7 +4,7 @@ debian/local/etc/nsswitch.conf usr/share/libc-bin debian/local/etc/nss etc/default posix/gai.conf etc -sbin/ldconfig sbin +sbin/ldconfig usr/sbin usr/bin/getconf usr/bin/getent usr/bin/iconv diff --minimal -Nru glibc-2.37/debian/debhelper.in/libc-bin.lintian-overrides glibc-2.37/debian/debhelper.in/libc-bin.lintian-overrides --- glibc-2.37/debian/debhelper.in/libc-bin.lintian-overrides 2023-10-03 21:07:14.000000000 +0200 +++ glibc-2.37/debian/debhelper.in/libc-bin.lintian-overrides 2024-01-19 15:56:06.000000000 +0100 @@ -1,10 +1,10 @@ # ldconfig must be executable even when the libc is not configured, and # thus must be linked statically -statically-linked-binary sbin/ldconfig -shared-library-lacks-prerequisites [sbin/ldconfig] +statically-linked-binary usr/sbin/ldconfig +shared-library-lacks-prerequisites [usr/sbin/ldconfig] # these manpages are provided by the manpages package -no-manual-page [sbin/ldconfig] +no-manual-page [usr/sbin/ldconfig] no-manual-page [usr/bin/getent] no-manual-page [usr/bin/iconv] no-manual-page [usr/bin/ld.so] diff --minimal -Nru glibc-2.37/debian/debhelper.in/libc-udeb.install glibc-2.37/debian/debhelper.in/libc-udeb.install --- glibc-2.37/debian/debhelper.in/libc-udeb.install 2023-10-03 21:07:14.000000000 +0200 +++ glibc-2.37/debian/debhelper.in/libc-udeb.install 2024-01-19 15:56:06.000000000 +0100 @@ -1,11 +1,11 @@ lib*/ld*.so* -lib/*/ld*.so* -lib/*/libm.so.* -lib/*/libmvec.so.* -lib/*/libdl.so.* -lib/*/libresolv.so.* -lib/*/libc.so.* -lib/*/librt.so.* -lib/*/libpthread.so.* -lib/*/libnss_dns.so.* -lib/*/libnss_files.so.* +lib/*/ld*.so* usr/lib/${DEB_HOST_MULTIARCH} +lib/*/libm.so.* usr/lib/${DEB_HOST_MULTIARCH} +lib/*/libmvec.so.* usr/lib/${DEB_HOST_MULTIARCH} +lib/*/libdl.so.* usr/lib/${DEB_HOST_MULTIARCH} +lib/*/libresolv.so.* usr/lib/${DEB_HOST_MULTIARCH} +lib/*/libc.so.* usr/lib/${DEB_HOST_MULTIARCH} +lib/*/librt.so.* usr/lib/${DEB_HOST_MULTIARCH} +lib/*/libpthread.so.* usr/lib/${DEB_HOST_MULTIARCH} +lib/*/libnss_dns.so.* usr/lib/${DEB_HOST_MULTIARCH} +lib/*/libnss_files.so.* usr/lib/${DEB_HOST_MULTIARCH} diff --minimal -Nru glibc-2.37/debian/debhelper.in/libc-udeb.install.hurd-i386 glibc-2.37/debian/debhelper.in/libc-udeb.install.hurd-i386 --- glibc-2.37/debian/debhelper.in/libc-udeb.install.hurd-i386 2023-10-03 21:07:14.000000000 +0200 +++ glibc-2.37/debian/debhelper.in/libc-udeb.install.hurd-i386 2024-01-19 15:56:06.000000000 +0100 @@ -1,14 +1,14 @@ lib*/ld*.so* -lib/*/ld*.so* -lib/*/libm.so.* -lib/*/libmvec.so.* -lib/*/libdl.so.* -lib/*/libresolv.so.* -lib/*/libc.so.* -lib/*/libutil.so.* -lib/*/librt.so.* -lib/*/libpthread.so.* -lib/*/libnss_dns.so.* -lib/*/libnss_files.so.* -lib/*/libmachuser.so.* -lib/*/libhurduser.so.* +lib/*/ld*.so* usr/lib/${DEB_HOST_MULTIARCH} +lib/*/libm.so.* usr/lib/${DEB_HOST_MULTIARCH} +lib/*/libmvec.so.* usr/lib/${DEB_HOST_MULTIARCH} +lib/*/libdl.so.* usr/lib/${DEB_HOST_MULTIARCH} +lib/*/libresolv.so.* usr/lib/${DEB_HOST_MULTIARCH} +lib/*/libc.so.* usr/lib/${DEB_HOST_MULTIARCH} +lib/*/libutil.so.* usr/lib/${DEB_HOST_MULTIARCH} +lib/*/librt.so.* usr/lib/${DEB_HOST_MULTIARCH} +lib/*/libpthread.so.* usr/lib/${DEB_HOST_MULTIARCH} +lib/*/libnss_dns.so.* usr/lib/${DEB_HOST_MULTIARCH} +lib/*/libnss_files.so.* usr/lib/${DEB_HOST_MULTIARCH} +lib/*/libmachuser.so.* usr/lib/${DEB_HOST_MULTIARCH} +lib/*/libhurduser.so.* usr/lib/${DEB_HOST_MULTIARCH} diff --minimal -Nru glibc-2.37/debian/debhelper.in/libc.install glibc-2.37/debian/debhelper.in/libc.install --- glibc-2.37/debian/debhelper.in/libc.install 2023-10-03 21:07:14.000000000 +0200 +++ glibc-2.37/debian/debhelper.in/libc.install 2024-01-19 15:56:06.000000000 +0100 @@ -1,4 +1,4 @@ etc/ld.so.conf.d lib*/ld*.so* -lib/*/*.so* +lib/*/*.so* usr/lib/${DEB_HOST_MULTIARCH} usr/lib/*/gconv diff --minimal -Nru glibc-2.37/debian/rules.d/debhelper.mk glibc-2.37/debian/rules.d/debhelper.mk --- glibc-2.37/debian/rules.d/debhelper.mk 2023-10-03 21:07:14.000000000 +0200 +++ glibc-2.37/debian/rules.d/debhelper.mk 2024-01-19 15:56:06.000000000 +0100 @@ -30,6 +30,14 @@ dh_installsystemd -p$(curpass) dh_installdocs -p$(curpass) dh_lintian -p $(curpass) + + # Ensure that symlinks resolve even when /usr is unmerged. + set -e; \ + find "debian/$(curpass)" \( -lname "*../lib*" -o -lname "/lib*" \) -printf "%p*%l\n" | \ + while IFS='*' read -r p l; do \ + ln -svf "$${l%%/lib*}/usr/lib$${l#*/lib}" "$$p"; \ + done + dh_link -p$(curpass) dh_bugfiles -p$(curpass) @@ -89,6 +97,14 @@ dh_installdirs -p$(curpass) dh_install -p$(curpass) dh_strip -p$(curpass) + + # Ensure that symlinks resolve even when /usr is unmerged. + set -e; \ + find "debian/$(curpass)" \( -lname "*../lib*" -o -lname "/lib*" \) -printf "%p*%l\n" | \ + while IFS='*' read -r p l; do \ + ln -svf "$${l%%/lib*}/usr/lib$${l#*/lib}" "$$p"; \ + done + dh_link -p$(curpass) # when you want to install extra packages, use extra_pkg_install.
--- End Message ---
--- Begin Message ---
- To: 1061248-close@bugs.debian.org
- Subject: Bug#1061248: fixed in glibc 2.39-3.1
- From: Debian FTP Masters <ftpmaster@ftp-master.debian.org>
- Date: Thu, 06 Jun 2024 08:38:15 +0000
- Message-id: <E1sF8dT-00DH9V-A7@fasolo.debian.org>
- Reply-to: Helmut Grohne <helmut@subdivi.de>
Source: glibc Source-Version: 2.39-3.1 Done: Helmut Grohne <helmut@subdivi.de> We believe that the bug you reported is fixed in the latest version of glibc, which is due to be installed in the Debian FTP archive. A summary of the changes between this version and the previous one is attached. Thank you for reporting the bug, which will now be closed. If you have further comments please address them to 1061248@bugs.debian.org, and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Helmut Grohne <helmut@subdivi.de> (supplier of updated glibc package) (This message was generated automatically at their request; if you believe that there is a problem with it please contact the archive administrators by mailing ftpmaster@ftp-master.debian.org) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Format: 1.8 Date: Thu, 06 Jun 2024 09:18:03 +0200 Source: glibc Architecture: source Version: 2.39-3.1 Distribution: experimental Urgency: medium Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org> Changed-By: Helmut Grohne <helmut@subdivi.de> Closes: 1061248 Changes: glibc (2.39-3.1) experimental; urgency=medium . * Non-maintainer upload acked by Aurelien Jarno. * Same diff as the 2.38-12.1 upload to unstable. * Move all aliased files including the dynamic loader to /usr. (DEP17, Closes: #1061248) + Install a protective diversion for the dynamic loader to avoid accidental deletion (DEP17 P1 M8). + Manage the dynamic loader symlink via maintainer scripts and triggers in multilib packages to avoid interaction of Replaces and /usr-move. + Avoid a versioned dependency on base-files. - Continue managing toplevel multilib aliasing links for the time being. - Install protective diversions for aliasing symlinks that base-files would also install in case libc is upgraded first. (DEP17 P9 M4) Checksums-Sha1: 7b921f4f1fa35d443c3dd986ff3a480c86ec523d 7519 glibc_2.39-3.1.dsc b71674c18b5e381c9b7b0ff811522437355a995e 443036 glibc_2.39-3.1.debian.tar.xz 5de9676966364d6479dcda0799d7d475df22ddbf 15846 glibc_2.39-3.1_amd64.buildinfo Checksums-Sha256: d92e22c62ba2c85bd878cbf20c278a10e529995bc22ab55a9ead329b81d236d7 7519 glibc_2.39-3.1.dsc d8c7e8f4a5ebce2c587ca332e3b682c2956a7dc04d9ad8dedc35075bc81d56e7 443036 glibc_2.39-3.1.debian.tar.xz 29ce2551a9c8f3190f4b1b2a714089783bd0fd2b9c64800a3e974d264520c800 15846 glibc_2.39-3.1_amd64.buildinfo Files: ad38a4bd541d0b8f2602508382b0a9f9 7519 libs required glibc_2.39-3.1.dsc 648e15b9194021947bf605d1bab46589 443036 libs required glibc_2.39-3.1.debian.tar.xz 8709ead203d51ce04b56f284a5f8c1d2 15846 libs required glibc_2.39-3.1_amd64.buildinfo -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEETMLS2QqNFlTb+HOqLRqqzyREREIFAmZhcUkACgkQLRqqzyRE REIFrw//edUb1BeLRmV7Qh3GsrrqDtMMQNJQzzpmWZLIn3yjvyqyksgbnu3YNZJS 8xvMU97A7C4/2SXNrQPlvMjlvoUz+eTVGBRyMSu7OF74H+106EG85tbyXTEf644F xZkuwmIxKtDhwuZLvweK04sc9RWCSnYYI+M0SvfP98VpsVAeRHbAyi9zMtDAwv8f A+t1l67c44oVo7uisJy7xnAORdClTFaO6JRpnh5jHH9AcsbIKL4qPwBlWbXQ+GwS 9XxxS1ZjPfgQQrRfwXvpkshUoicSO8J1D1miPPzTyo2mQ4sXlnWftUtYmtAEYvC6 q7ZAnnJHczOJEzyCi+pdcPMNrng4Qg15DIATPFuFeZzkz6YC7FOVuIMPSvY/xdQl ZA+5DHBJ2WretmVNPnbUubUrSr3l+oC0NQnUsF2hyOZ+9w7Czealo5aMWzOX0Ugm /NXsomd6ospzccv2lDzVCySCVAuNQgoyiX8NEjbNWoh/Uj5WsnqTz6vgRYNnvKiC Aw3yHSYf17w2cGR7qBw/i7oPj0hvpezOQWrfefTLeLf5IbWn5NlOCKagbUzh16Qf InwxsiCuJ/Z3nmnjB+rX/Y2t6j2s9j/8SUHU9iM+bBMlCuWP9CgfbUOlAGeeTSOT ESKkcpzAdRkTn3M3Ck+X5jteXn1TNfZhdWBwSPZf/ChXcOoUDvg= =AtY5 -----END PGP SIGNATURE-----Attachment: pgptyQoArfgMT.pgp
Description: PGP signature
--- End Message ---