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

Bug#983412: marked as done (libc-bin: please add support for DPKG_ROOT to the postinst)



Your message dated Mon, 23 Aug 2021 19:50:04 +0000
with message-id <E1mIFxM-000IhC-H6@fasolo.debian.org>
and subject line Bug#983412: fixed in glibc 2.31-17
has caused the Debian Bug report #983412,
regarding libc-bin: please add support for DPKG_ROOT to the postinst
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.)


-- 
983412: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=983412
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: libc-bin
Version: 2.31-9
Severity: wishlist
Tags: patch
User: debian-dpkg@lists.debian.org

Dear maintainers,

this is a followup on

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=910685

and makes libc-bin work with DPKG_ROOT set. Namely, the call to ldconfig
has to respect "$DPKG_ROOT" as it would otherwise attempt to modify the
real root instead of the new root directory.

Note, that this is again not a full solution because this will only work
when building a similar architecture chroot. It is still an improvement
of the status quo and having DPKG_ROOT work for same-architecture
chroots is already useful.

To test, I run:

mmdebstrap --mode=chrootless --variant=custom --include=bsdutils,coreutils,debianutils,diffutils,dpkg,findutils,grep,gzip,hostname,init-system-helpers,ncurses-base,ncurses-bin,perl-base,sed,tar,libc-bin unstable /dev/null

Without the patch this fails with:

ldconfig: Can't create temporary cache file /etc/ld.so.cache~: Permission denied

With the patch above command succeeds. The patch:

diff --git a/debian/debhelper.in/libc-bin.postinst b/debian/debhelper.in/libc-bin.postinst
index 802a3ad0..7fc320c5 100644
--- a/debian/debhelper.in/libc-bin.postinst
+++ b/debian/debhelper.in/libc-bin.postinst
@@ -40,15 +40,15 @@ update_to_current_default() {
 }
 
 if [ "$1" = "configure" ] && [ "$2" = "" ] ; then
-  install_from_default /usr/share/libc-bin/nsswitch.conf /etc/nsswitch.conf
+  install_from_default "$DPKG_ROOT/usr/share/libc-bin/nsswitch.conf" "$DPKG_ROOT/etc/nsswitch.conf"
 fi
 
 if [ "$1" = "configure" ] && [ "$2" != "" ]; then
-  update_to_current_default /usr/share/libc-bin/nsswitch.conf /etc/nsswitch.conf
+  update_to_current_default "$DPKG_ROOT/usr/share/libc-bin/nsswitch.conf" "$DPKG_ROOT/etc/nsswitch.conf"
 fi
 
 if [ "$1" = "triggered" ] || [ "$1" = "configure" ]; then
-  ldconfig || ldconfig --verbose
+  ldconfig -r "$DPKG_ROOT/" || ldconfig --verbose -r "$DPKG_ROOT/"
   exit 0
 fi
 

Note, that adding DPKG_ROOT is not strictly necessary for
update_to_current_default because currently, DPKG_ROOT will only be used
for initial installations and not for upgrades.

Thanks!

cheers, josch

--- End Message ---
--- Begin Message ---
Source: glibc
Source-Version: 2.31-17
Done: Aurelien Jarno <aurel32@debian.org>

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 983412@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Aurelien Jarno <aurel32@debian.org> (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: Mon, 23 Aug 2021 21:31:23 +0200
Source: glibc
Architecture: source
Version: 2.31-17
Distribution: unstable
Urgency: medium
Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
Changed-By: Aurelien Jarno <aurel32@debian.org>
Closes: 983412 992500 992568 992653
Changes:
 glibc (2.31-17) unstable; urgency=medium
 .
   [ Samuel Thibault ]
   * debian/testsuite-xfail-debian.mk: Update tests.
 .
   [ Aurelien Jarno ]
   * debian/debhelper.in/locales.NEWS: fix charset mismatch in example iconv
     command.  Closes: #992568
   * Replace the non UTF-8 locales removal by a deprecation as they are still
     used in many other packages (especially testsuites): non UTF-8 locales are
     not offered anymore in the debconf dialog (except for the ones already
     configured), but they are still listed in SUPPORTED and provided in the
     locales-all package (Closes: #992500, #992653):
     - debian/patches/localedata/locale-en_DK.diff,
       debian/patches/localedata/locale-eu_FR.diff,
       debian/patches/localedata/supported.diff: revert the removal of non-UTF-8
       locales.
     - debian/debhelper.in/locales-all.NEWS: remove 2.31-14 entry.
     - debian/rules.d/debhelper.mk: fill __PROVIDED_LOCALES__ with UTF-8
       locales only.
 .
   [ Johannes Schauer Marin Rodrigues ]
   * additional bits to support DPKG_ROOT (closes: #983412)
Checksums-Sha1:
 e513775c9f4711c3edcb0172ad672e425ab28fd9 9762 glibc_2.31-17.dsc
 87a6c593140a7d240e6523e355c8fec0bd2b8a95 913572 glibc_2.31-17.debian.tar.xz
 1578bfe7cb86a19cce193ce49526f9bf4b1def43 8661 glibc_2.31-17_source.buildinfo
Checksums-Sha256:
 36cf08892da33a4e5e831738b3733ace7cd702c13582e3ce98b86c4203757e6e 9762 glibc_2.31-17.dsc
 d89c7f77e3ca86299b6a5c98b90355739d2b90b4c55e9187e1ff25fc826b736d 913572 glibc_2.31-17.debian.tar.xz
 6b4da8f17cd3e6a50f021cc83f5822f202ea40be8245e7ee44a047cbe06772fb 8661 glibc_2.31-17_source.buildinfo
Files:
 7f469bb3ffd8dfd73d40bf4790103964 9762 libs required glibc_2.31-17.dsc
 21678b83c7f3d1e124b814d9a8c24530 913572 libs required glibc_2.31-17.debian.tar.xz
 18c11f554ce35071db0b6a5343dc8d61 8661 libs required glibc_2.31-17_source.buildinfo

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

iQIzBAEBCgAdFiEEUryGlb40+QrX1Ay4E4jA+JnoM2sFAmEj9+UACgkQE4jA+Jno
M2uiNxAAhcN3GNh8MKKf+zik08QoQhDb4Zbf5mKanODX8vtSORXj+fzy0hMRXpit
2jo7RTvA+qdb9VIZ1um1CuZWc22p2x8+1jmQTbgBXxOE91x4jdID5TFx8m/S0cmF
348ZC6iD1DnmD6zcqGhmLUF+/jtEAP5X9C/hun1P75R1olSeHr8pMfd0PCVne7bC
eG2liy+tvl7M+C4yi+/3CjoyyQoPOfj/V4ngCP4HD0Ms4U+lbsy0Z1lEFV/3XpCL
lb4KE1YhUyGV2w9LzKh9bYmyEXRwzQ25E6h+SQrlUmTY4v64tacomMTREL0aP7yI
61U3FOxza3Gg0UQfMDqsFJqVQw5eSWbVQPcxd4PDg8M9llRWt0eI52OFm0i9q2kb
EjSEXNZp0n2ipXrF6rpGtLyqw6S0iigfpgPtZ7dyajFqlAvJXUJOiE7watJVGrmS
ObsLmr94aciKe+L9bxC1brJBzk27Mn08Mui6VeukmDugS4+YbSWVjq5fcFxhqrLt
HB4dOOAykoDRuwozv/6cErLXfgIitG315vBEPoaEQf7qGSUrtVHNXe0U7t73pCxw
5cYeESy41mfMFVvfAS3piHW4i8+m+PIytb4uAkTieAmXZumbqwMLXRPcdENct5A8
QHrUCNiJSujhUKoun508ssBMVVvUBWV53I2h7wFpkOSBp86YaLc=
=7o5v
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: