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

Bug#908946: marked as done (ldconfig: Default to the new format for ld.so.cache)



Your message dated Fri, 16 Aug 2019 11:05:31 +0000
with message-id <E1hya31-0000CS-JV@fasolo.debian.org>
and subject line Bug#908946: fixed in glibc 2.29-0experimental0
has caused the Debian Bug report #908946,
regarding ldconfig: Default to the new format for ld.so.cache
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.)


-- 
908946: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=908946
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: glibc
Version: 2.27-6
Tags: patch

glibc has supported the new ld.so.cache format for 18+ years, and the
old/compat versions date back to around the libc5 era. Switching to the
new format makes the cache smaller, and slightly faster to load.

The attached patch switches to the new format by default. I've also
submitted this patch upstream at
https://sourceware.org/bugzilla/show_bug.cgi?id=23668 .
diff --git a/debian/local/manpages/ldconfig.8 b/debian/local/manpages/ldconfig.8
index 505a1c84..d6722bc0 100644
--- a/debian/local/manpages/ldconfig.8
+++ b/debian/local/manpages/ldconfig.8
@@ -112,7 +112,7 @@ the current cache.
 .B \-c\ \-\-format=FORMAT
 Use
 .B FORMAT
-for the cache file. Choices are old, new and compat (the default).
+for the cache file. Choices are old, compat, and new (the default).
 .TP
 .B \-i \-\-ignore-aux-cache
 Ignore auxiliary cache file.
diff --git a/debian/patches/any/ldconfig-new-format.diff b/debian/patches/any/ldconfig-new-format.diff
new file mode 100644
index 00000000..b0f4126e
--- /dev/null
+++ b/debian/patches/any/ldconfig-new-format.diff
@@ -0,0 +1,74 @@
+From 1183d8acf478e36b7e427db295b9763859822c79 Mon Sep 17 00:00:00 2001
+From: Josh Triplett <josh@joshtriplett.org>
+Date: Sun, 16 Sep 2018 04:20:34 -0700
+Subject: [PATCH] Default to the new format for ld.so.cache
+
+glibc has supported this format for 18+ years.
+
+Reorder conditionals to look for the new format first.
+
+        * elf/ldconfig.c: Default to the new format for ld.so.cache. glibc has
+        supported this format for 18+ years.
+        * elf/dl-cache.c (_dl_load_cache_lookup): Reorder conditionals to look
+        for the new format first.
+---
+ elf/dl-cache.c | 16 ++++++++--------
+ elf/ldconfig.c |  4 ++--
+ 4 files changed, 20 insertions(+), 10 deletions(-)
+
+diff --git a/elf/dl-cache.c b/elf/dl-cache.c
+index 6ee5153ff9..75bd9d9536 100644
+--- a/elf/dl-cache.c
++++ b/elf/dl-cache.c
+@@ -203,7 +203,14 @@ _dl_load_cache_lookup (const char *name)
+ 	 - the old format with the new format in it
+ 	 - only the new format
+ 	 The following checks if the cache contains any of these formats.  */
+-      if (file != MAP_FAILED && cachesize > sizeof *cache
++      if (file != MAP_FAILED && cachesize > sizeof *cache_new
++	       && memcmp (file, CACHEMAGIC_VERSION_NEW,
++			  sizeof CACHEMAGIC_VERSION_NEW - 1) == 0)
++	{
++	  cache_new = file;
++	  cache = file;
++	}
++      else if (file != MAP_FAILED && cachesize > sizeof *cache
+ 	  && memcmp (file, CACHEMAGIC, sizeof CACHEMAGIC - 1) == 0)
+ 	{
+ 	  size_t offset;
+@@ -220,13 +227,6 @@ _dl_load_cache_lookup (const char *name)
+ 			 sizeof CACHEMAGIC_VERSION_NEW - 1) != 0)
+ 	    cache_new = (void *) -1;
+ 	}
+-      else if (file != MAP_FAILED && cachesize > sizeof *cache_new
+-	       && memcmp (file, CACHEMAGIC_VERSION_NEW,
+-			  sizeof CACHEMAGIC_VERSION_NEW - 1) == 0)
+-	{
+-	  cache_new = file;
+-	  cache = file;
+-	}
+       else
+ 	{
+ 	  if (file != MAP_FAILED)
+diff --git a/elf/ldconfig.c b/elf/ldconfig.c
+index fbdd814edf..1ce4a29566 100644
+--- a/elf/ldconfig.c
++++ b/elf/ldconfig.c
+@@ -95,7 +95,7 @@ int opt_verbose;
+
+ /* Format to support.  */
+ /* 0: only libc5/glibc2; 1: both; 2: only glibc 2.2.  */
+-int opt_format = 1;
++int opt_format = 2;
+
+ /* Build cache.  */
+ static int opt_build_cache = 1;
+@@ -148,7 +148,7 @@ static const struct argp_option options[] =
+   { NULL, 'f', N_("CONF"), 0, N_("Use CONF as configuration file"), 0},
+   { NULL, 'n', NULL, 0, N_("Only process directories specified on the command line.  Don't build cache."), 0},
+   { NULL, 'l', NULL, 0, N_("Manually link individual libraries."), 0},
+-  { "format", 'c', N_("FORMAT"), 0, N_("Format to use: new, old or compat (default)"), 0},
++  { "format", 'c', N_("FORMAT"), 0, N_("Format to use: new (default), old, or compat"), 0},
+   { "ignore-aux-cache", 'i', NULL, 0, N_("Ignore auxiliary cache file"), 0},
+   { NULL, 0, NULL, 0, NULL, 0 }
+ };
diff --git a/debian/patches/series b/debian/patches/series
index 54ab40df..e7c3f3ad 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -188,3 +188,4 @@ any/submitted-resolv-unaligned.diff
 any/submitted-intl-tstgettext.diff
 any/local-cudacc-float128.diff
 any/git-abilist-ignore-absolute.diff
+any/ldconfig-new-format.diff

--- End Message ---
--- Begin Message ---
Source: glibc
Source-Version: 2.29-0experimental0

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 908946@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: Fri, 16 Aug 2019 12:42:42 +0200
Source: glibc
Architecture: source
Version: 2.29-0experimental0
Distribution: experimental
Urgency: medium
Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
Changed-By: Aurelien Jarno <aurel32@debian.org>
Closes: 908946 910669 933513 933800 934823
Changes:
 glibc (2.29-0experimental0) experimental; urgency=medium
 .
   [ Adam Conrad ]
   * New upstream release 2.29, with git updates up to 2019-02-20:
     - Add PF_XDP, AF_XDP and SOL_XDP to bits/socket.h.  Closes: #933800.
     - debian/symbols.wildcard: Add 2.29, and debian/control: Regenrate.
     - debian/patches/localedata/locales_CH.diff: Applied upstream.
     - debian/patches/localedata/submitted-it_IT-thousands_sep.diff: Upstreamed.
     - debian/patches/localedata/git-en_US-date_fmt.diff: Applied upstream.
     - debian/patches/hurd-i386/git-magic-pid.diff: Applied upstream.
     - debian/patches/hurd-i386/git-interrupt_timeout_EIO.diff: Upstreamed.
     - debian/patches/hurd-i386/git-interrupt_timeout.diff: Applied upstream.
     - debian/patches/hurd-i386/git-intr-msg.diff: Applied upstream.
     - debian/patches/hurd-i386/git-pci.diff: Applied upstream.
     - debian/patches/hurd-i386/git-msync.diff: Applied upstream.
     - debian/patches/hurd-i386/git-spawn-open.diff: Applied upstream.
     - debian/patches/hurd-i386/git-tst-preadvwritev2-common.c.diff: Upstreamed.
     - debian/patches/hurd-i386/git-fcntl64.diff: Applied upstream.
     - debian/patches/hurd-i386/git-lockf-0.diff: Applied upstream.
     - debian/patches/hurd-i386/git-libpthread_setpshared.diff: Upstreamed.
     - debian/patches/hurd-i386/git-AT_EMPTY_PATH.diff: Applied upstream.
     - debian/patches/hurd-i386/git-altstack.diff: Applied upstream.
     - debian/patches/riscv64/git-thread-debugging.diff: Applied upstream.
     - debian/patches/sparc/submitted-sparc64-socketcall.diff: Applied upstream.
     - debian/patches/any/local-tst-mktime2.diff: Applied upstream.
     - debian/patches/all/local-remove-manual.diff: Rebased.
     - debian/patches/alpha/local-string-functions.diff: Rebased.
     - debian/patches/any/git-libio-stdout-putc.diff: Rebased.
     - debian/patches/hurd-i386/local-exec_filename.diff: Rebased.
     - debian/patches/hurd-i386/local-hurdsig-globaldisp-version.diff: Rebased.
     - debian/patches/hurd-i386/submitted-anon-mmap-shared.diff: Rebased.
     - debian/patches/hurd-i386/tg-EGREGIOUS-fr.diff: Rebased.
     - debian/patches/hurd-i386/tg-EIEIO-fr.diff: Rebased.
     - debian/patches/hurd-i386/tg-hurdsig-global-dispositions.diff: Rebased.
     - debian/patches/hurd-i386/tg-io_select_timeout.diff: Rebased.
     - debian/patches/kfreebsd/submitted-auxv.diff: Rebased.
   * debian/rules.d/build.mk: Switch to new localedata/install-locale-files:
     - debian/patches/localedata/local-all-no-archive.diff: Dropped for above.
   * debian/testsuite-xfail-debian.mk: XFAIL tst-thread-exit-clobber, and
     tst-minsigstksz*, and tst-xsigstack on armhf, which fail on aarch64 hosts.
 .
   [ Samuel Thibault ]
   * debian/patches/hurd-i386/submitted-net.diff: Rebased.
   * debian/patches/hurd-i386/tg-bits_atomic.h_multiple_threads.diff: Rebased.
   * debian/patches/hurd-i386/local-fix-nss.diff: Fix tst-nss-test3 test.
   * debian/testsuite-xfail-debian.mk: Clean out test build failures, they are
     now handled upstream. Clean out now-fixed tests.
 .
   [ Aurelien Jarno ]
   * debian/patches/git-updates.diff: update from upstream stable branch:
     - Fix build on alpha with recent kernel headers.  Closes: #934823.
     - debian/patches/any/git-libio-stdout-putc.diff: rebased.
   * debian/control.in/main, debian/rules: drop the multiarch-support package.
     Closes: #910669.
   * debian/glibc-source.filelist, debian/libc6.symbols.powerpcspe,
     debian/rules.d/control.mk, debian/sysdeps/powerpcspe.mk,
     debian/testsuite-xfail-debian.mk: Drop the powerpcspe architecture, it is
     not supported anymore by GCC 9 and will be removed in GLIBC 2.30.
   * debian/rules: do not export SHELL, it is already set through configparms.
   * debian/patches/git-pexpect-pretty-printers.diff: backport pretty printer
     fix to support recent versions of GDB with color output.
   * debian/testsuite-xfail-debian.mk: drop XFAILs that were due to kernel bugs
     which are now fixed in both oldstable and stable kernels.
   * debian/rules: drop -no-pie -fno-PIE options. This is now fully supported
     by the GNU libc.
   * debian/testsuite-xfail-debian.mk: drop XFAILs that have been fixed for
     quite some time.
   * debian/control.in/main, debian/rules: build with GCC 9.
   * debian/sysdeps/mips*.mk: drop -mno-plt, but keep -mno-pie.
   * debian/patches/any/git-socket-constants.diff: backport upstream change to
     use in-tree copy of SO_ constants for !__USE_MISC to fix compatibility
     with recent kernel headers.
   * debian/shlibs-add-udebs: remove the udeb entries automatically added by
     dh_makeshlibs before proceeding to workaround debhelper bugs#934889 and
     #934891.
 .
   [ YunQiang Su ]
   * Fix ld.so link on mips{64,n32}r6{,el}.  Closes: #933513.
 .
   [ Sven Mueller ]
   * debian/rules: honor noudeb build profile.
 .
   [ Josh Triplett ]
   * debian/patches/any/submitted-ld.so-cache-new-format.diff: default to the
     new format for ld.so.cache.  Closes: #908946.
Checksums-Sha1:
 05aed3dac1e7463c18d9012a548d515705afd2c6 8798 glibc_2.29-0experimental0.dsc
 c897cc077aa133d3683de20f62c5dbe9a7595c12 17103228 glibc_2.29.orig.tar.xz
 2011c7458f3a14ca0ad4d313f2e6d4174670f6aa 850416 glibc_2.29-0experimental0.debian.tar.xz
 3d798ca65c6a4ededca8131a4c60246792db8ecf 7444 glibc_2.29-0experimental0_source.buildinfo
Checksums-Sha256:
 ee0fc11ea2f9dd2e218a85dc4b4bffc31181d8f62016b3c9ad4fad3688609ebd 8798 glibc_2.29-0experimental0.dsc
 c1eb5652c94680cb40bad4393b06d838237645f0f5760b8d0e6a98a1463e09f3 17103228 glibc_2.29.orig.tar.xz
 000e31116660723cdd89d9b96c02437c5a9ac72bad1f12ea72802b337eb6c7fe 850416 glibc_2.29-0experimental0.debian.tar.xz
 28228482d5b26091c3148cde2f0a4cf072c420139b420cd5434304f3a00d5778 7444 glibc_2.29-0experimental0_source.buildinfo
Files:
 cdee2a9c557b12a4c7d4e44d3debcce0 8798 libs required glibc_2.29-0experimental0.dsc
 30c4729b324da7652e26fe6833560ddb 17103228 libs required glibc_2.29.orig.tar.xz
 1d97bc52b19b87a96fd8ebd5a9c9900c 850416 libs required glibc_2.29-0experimental0.debian.tar.xz
 7a88c700d3a5a1ee20a52d3ded99feeb 7444 libs required glibc_2.29-0experimental0_source.buildinfo

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

iQIzBAEBCgAdFiEEUryGlb40+QrX1Ay4E4jA+JnoM2sFAl1WiSYACgkQE4jA+Jno
M2t08w//XaVpGgnphtlBkKlIRHXpCrxZ1KLIiT3CdE3ZvylJQhC2stT0/BnWcM69
zCmkOIcO/FV9dn6P6JnZwJ5BdFx9NckD0mmUXunsaVWSE4v9B4G2Bly13VArNrL2
qwHIJhJUF4Cg12VVDMEU/0YAxN/oEhXTlhPtbM8+K/AbRqLbIs2/c5koLn+X2fkQ
TKersdAPCH1+wDWBtjCapswLQeHikyPV5BQsuYdTUZUOxwsaOkGIzgIYjgyCU/4D
KzrxhDME7LwRaHBjThP+1Nj0CYFhMrEBJjaMYXE1IrUNx25E94aVXL2j8Ja2GioN
gQF40Pf6q2r7Y6hJ3r/YU8JqTR2xiDSEPhEJiXbyxfOy2VnGBNJIHtfDURm9zVmc
rzcF+nYM+wFVyEsarasHVrLcpx4hKbBlmVmYgdwTe1q/CFd/LDCmpzPUPXh0b6fq
AocRCbDoYgv/AAzxG1a3I1dA80FhUku4r8Kv/a9umneTz2X4W7tPVsoE0JbNtz7j
q19xyGTmrrjRU2bBP2qppw0r8V4uFXPUW8OZa1l+mqFg308gdWynaYfVaU1Yuez1
vVm3iblKdMrJ3tcX0Wl+l54j19v9rzjqlXx2FV/nQYAf2m8slT7QzHWH9QkWGTq8
NziBs3vg9L60HiFn0T/r44VciQBsEGNHOywdq0NQNsiwQTsIfmU=
=IpEp
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: