[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1061248: marked as done (glibc: DEP17: move most files but rtld to /usr)



Your message dated Tue, 18 Jun 2024 19:04:43 +0000
with message-id <E1sJe8J-001cDG-Qh@fasolo.debian.org>
and subject line Bug#1061248: fixed in palo 2.25
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 ---
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?

Helmut
diff --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 ---
Source: palo
Source-Version: 2.25
Done: Helge Deller <deller@gmx.de>

We believe that the bug you reported is fixed in the latest version of
palo, 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.
Helge Deller <deller@gmx.de> (supplier of updated palo 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: Tue, 18 Jun 2024 16:57:10 +0000
Source: palo
Architecture: source
Version: 2.25
Distribution: unstable
Urgency: medium
Maintainer: Helge Deller <deller@gmx.de>
Changed-By: Helge Deller <deller@gmx.de>
Closes: 1061248
Changes:
 palo (2.25) unstable; urgency=medium
 .
   [ Helge Deller ]
   * move aliased files from / to /usr (DEP17, Closes: #1061248)
Checksums-Sha1:
 aba36fea7f6d93a4e69d18ffc2f8f87a41b12c97 1110 palo_2.25.dsc
 ed3c2218163d2b46d58f00ac3ae692a4296e4512 135480 palo_2.25.tar.xz
 1147a92180c5bc61e6238d9fe27ae2711b6148ff 5784 palo_2.25_source.buildinfo
Checksums-Sha256:
 00d00f35f7118f276065b614ca464c88b1a70538938f5f8b8019bde2baf02cb3 1110 palo_2.25.dsc
 7f162d50023a5ab8719a6c6727e6c45b7cc1456afebfff3ef7e100af47721953 135480 palo_2.25.tar.xz
 6766f355c33ea035fa35e403c0288a1b7bdc93909f5ef940fd8cb11e95c01e17 5784 palo_2.25_source.buildinfo
Files:
 b17ae80f38c10f3392b8b9b2928d94ef 1110 admin optional palo_2.25.dsc
 18cc4a9896b2426b5b780ce519c2ae06 135480 admin optional palo_2.25.tar.xz
 830a95e06825aa08a67130aa19f0238f 5784 admin optional palo_2.25_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQS86RI+GtKfB8BJu973ErUQojoPXwUCZnHSwAAKCRD3ErUQojoP
X4SfAQCn3v/E7RWYWLvUghiVw1zs+0vaEdzb9x4xAOtDEV++HgEArvtnBMEoh4dk
sVqXTvLY+0oC36nvx4aDicA1y1XTmAk=
=V3eK
-----END PGP SIGNATURE-----

Attachment: pgpfpkikUTdse.pgp
Description: PGP signature


--- End Message ---

Reply to: