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

Bug#827105: marked as done (libc-bin: Updating /etc/nsswitch.conf to current default)



Your message dated Sun, 19 Jun 2016 22:19:53 +0000
with message-id <E1bEl4L-0000T3-Gq@franck.debian.org>
and subject line Bug#827105: fixed in glibc 2.22-12
has caused the Debian Bug report #827105,
regarding libc-bin: Updating /etc/nsswitch.conf to current default
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.)


-- 
827105: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=827105
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: libc-bin
Version: 2.22-11

Dear glibc maintainers:

As Sven Joachim has pointed out in Bug#827095, the file
/etc/nsswitch.conf is currently both in base-files and libc-bin.

I've created the following patches for the transition to be complete.

The first patch just updates /usr/share/libc-bin/nsswitch.conf
to be in sync with base-files default after adding gshadow line.

The second and third patches add code borrowed from base-files
postinst so that the file is updated to current default if the user
never modified it.

You will see that this code is some kind of "poor's man UCF system"
but it has worked flawlessly for me in base-files and it has the added
benefit that the user is never bothered with stupid questions: Either
the user changed the file and we do nothing at all, or the file was
not changed from the old default and we update it to the new default.

Note 1: The file nsswitch.conf.md5sums could be trimmed down a little
bit on the basis that we "do not support upgrades skipping releases",
but IMHO, I would not remove the last three lines (that is, the lines
from "base-files 3.1.16 to 7.2 and libc-bin 2.19-18 to 2.22-11" to the
end).

Note 2: To test this I have copied the files to /usr/share/libc-bin
and libc-bin.postinst to /var/lib/dpkg/info.

Then I removed the gshadow line from /etc and checked that
"dpkg-reconfigure libc-bin" works as expected.

What I have not tested is a complete build of glibc source package, but
if the patches are still not ok, I trust they will be easy to fix.

Thanks.
From 2aee8524a0ea508d77b72cbbc2928c3f5622d70b Mon Sep 17 00:00:00 2001
From: Santiago Vila <sanvila@debian.org>
Date: Sun, 12 Jun 2016 11:43:05 +0200
Subject: [PATCH 1/3] Add gshadow line to default /etc/nsswitch.conf (Bug
 #699090)

---
 debian/local/etc/nsswitch.conf | 1 +
 1 file changed, 1 insertion(+)

diff --git a/debian/local/etc/nsswitch.conf b/debian/local/etc/nsswitch.conf
index d2f03b0..1142be1 100644
--- a/debian/local/etc/nsswitch.conf
+++ b/debian/local/etc/nsswitch.conf
@@ -7,6 +7,7 @@
 passwd:         compat
 group:          compat
 shadow:         compat
+gshadow:        files
 
 hosts:          files dns
 networks:       files
-- 
2.8.1

From 96f9245571823ea8ab8499d29a0df5b9e110ac4e Mon Sep 17 00:00:00 2001
From: Santiago Vila <sanvila@debian.org>
Date: Sun, 12 Jun 2016 11:56:14 +0200
Subject: [PATCH 2/3] Create nsswitch.conf.md5sums for updates to the current
 default if unchanged

---
 debian/debhelper.in/libc-bin.install   | 1 +
 debian/local/etc/nsswitch.conf.md5sums | 5 +++++
 2 files changed, 6 insertions(+)
 create mode 100644 debian/local/etc/nsswitch.conf.md5sums

diff --git a/debian/debhelper.in/libc-bin.install b/debian/debhelper.in/libc-bin.install
index dfab166..77ad21d 100644
--- a/debian/debhelper.in/libc-bin.install
+++ b/debian/debhelper.in/libc-bin.install
@@ -2,6 +2,7 @@ debian/local/etc/bindresvport.blacklist etc
 debian/local/etc/ld.so.conf etc
 debian/local/etc/ld.so.conf.d etc
 debian/local/etc/nsswitch.conf usr/share/libc-bin
+debian/local/etc/nsswitch.conf.md5sums usr/share/libc-bin
 nis/nss etc/default
 posix/gai.conf etc
 debian/tmp-libc/sbin/ldconfig sbin
diff --git a/debian/local/etc/nsswitch.conf.md5sums b/debian/local/etc/nsswitch.conf.md5sums
new file mode 100644
index 0000000..657fe79
--- /dev/null
+++ b/debian/local/etc/nsswitch.conf.md5sums
@@ -0,0 +1,5 @@
+109e33e2c91d1853b5bc56078a96aa18 base-files 3.0.0 to 3.1.15
+3114ea9cf2f3bd8d120b4da96e3832d5 base-files 3.1.8 and 3.1.9
+295c15c4bdac80e50b37689ef08f359c base-files 3.1.16 to 7.2 and libc-bin 2.19-18 to 2.22-11
+30b82cb1ce20d480703da2208a4607b4 base-files 6.6
+f8e97bf611374634c7cb3a6085503ab5 base-files 7.3 and libc-bin 2.22-12
-- 
2.8.1

From c51efa83cdf0250db2186d3092e590c73a160be6 Mon Sep 17 00:00:00 2001
From: Santiago Vila <sanvila@debian.org>
Date: Sun, 12 Jun 2016 12:03:34 +0200
Subject: [PATCH 3/3] libc-bin.postinst: Add code to update /etc/nsswitch.conf

---
 debian/debhelper.in/libc-bin.postinst | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/debian/debhelper.in/libc-bin.postinst b/debian/debhelper.in/libc-bin.postinst
index 50f3e79..29effc8 100644
--- a/debian/debhelper.in/libc-bin.postinst
+++ b/debian/debhelper.in/libc-bin.postinst
@@ -8,10 +8,26 @@ install_from_default() {
   fi
 }
 
+update_to_current_default() {
+  if [ -f $2 ]; then
+    md5=`md5sum $2 | cut -f 1 -d " "`
+    if grep -q "$md5" $1.md5sums; then
+      if ! cmp -s $1 $2; then
+        cp -p $1 $2
+        echo Updating $2 to current default.
+      fi
+    fi
+  fi
+}
+
 if [ "$1" = "configure" ] && [ "$2" = "" ] ; then
   install_from_default /usr/share/libc-bin/nsswitch.conf /etc/nsswitch.conf
 fi
 
+if [ "$1" = "configure" ] && [ "$2" != "" ]; then
+  update_to_current_default /usr/share/libc-bin/nsswitch.conf /etc/nsswitch.conf
+fi
+
 if [ "$1" = "triggered" ] || [ "$1" = "configure" ]; then
   ldconfig || ldconfig --verbose
   exit 0
-- 
2.8.1


--- End Message ---
--- Begin Message ---
Source: glibc
Source-Version: 2.22-12

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 827105@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, 20 Jun 2016 00:01:21 +0200
Source: glibc
Binary: libc-bin libc-dev-bin libc-l10n glibc-doc glibc-source locales locales-all nscd multiarch-support libc6 libc6-dev libc6-dbg libc6-pic libc6-udeb libc6.1 libc6.1-dev libc6.1-dbg libc6.1-pic libc6.1-udeb libc0.3 libc0.3-dev libc0.3-dbg libc0.3-pic libc0.3-udeb libc0.1 libc0.1-dev libc0.1-dbg libc0.1-pic libc0.1-udeb libc6-i386 libc6-dev-i386 libc6-sparc libc6-dev-sparc libc6-sparc64 libc6-dev-sparc64 libc6-s390 libc6-dev-s390 libc6-amd64 libc6-dev-amd64 libc6-powerpc libc6-dev-powerpc libc6-ppc64 libc6-dev-ppc64 libc6-mips32 libc6-dev-mips32 libc6-mipsn32 libc6-dev-mipsn32 libc6-mips64 libc6-dev-mips64 libc0.1-i386 libc0.1-dev-i386 libc6-x32 libc6-dev-x32 libc6-xen libc0.3-xen libc6.1-alphaev67 libc0.1-i686 libc0.3-i686 libc6-i686
Architecture: source
Version: 2.22-12
Distribution: unstable
Urgency: medium
Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
Changed-By: Aurelien Jarno <aurel32@debian.org>
Description:
 glibc-doc  - GNU C Library: Documentation
 glibc-source - GNU C Library: sources
 libc-bin   - GNU C Library: Binaries
 libc-dev-bin - GNU C Library: Development binaries
 libc-l10n  - GNU C Library: localization files
 libc0.1    - GNU C Library: Shared libraries
 libc0.1-dbg - GNU C Library: detached debugging symbols
 libc0.1-dev - GNU C Library: Development Libraries and Header Files
 libc0.1-dev-i386 - GNU C Library: 32bit development libraries for AMD64
 libc0.1-i386 - GNU C Library: 32bit shared libraries for AMD64
 libc0.1-i686 - transitional dummy package
 libc0.1-pic - GNU C Library: PIC archive library
 libc0.1-udeb - GNU C Library: Shared libraries - udeb (udeb)
 libc0.3    - GNU C Library: Shared libraries
 libc0.3-dbg - GNU C Library: detached debugging symbols
 libc0.3-dev - GNU C Library: Development Libraries and Header Files
 libc0.3-i686 - transitional dummy package
 libc0.3-pic - GNU C Library: PIC archive library
 libc0.3-udeb - GNU C Library: Shared libraries - udeb (udeb)
 libc0.3-xen - GNU C Library: Shared libraries [Xen version]
 libc6      - GNU C Library: Shared libraries
 libc6-amd64 - GNU C Library: 64bit Shared libraries for AMD64
 libc6-dbg  - GNU C Library: detached debugging symbols
 libc6-dev  - GNU C Library: Development Libraries and Header Files
 libc6-dev-amd64 - GNU C Library: 64bit Development Libraries for AMD64
 libc6-dev-i386 - GNU C Library: 32-bit development libraries for AMD64
 libc6-dev-mips32 - GNU C Library: o32 Development Libraries for MIPS
 libc6-dev-mips64 - GNU C Library: 64bit Development Libraries for MIPS64
 libc6-dev-mipsn32 - GNU C Library: n32 Development Libraries for MIPS64
 libc6-dev-powerpc - GNU C Library: 32bit powerpc development libraries for ppc64
 libc6-dev-ppc64 - GNU C Library: 64bit Development Libraries for PowerPC64
 libc6-dev-s390 - GNU C Library: 32bit Development Libraries for IBM zSeries
 libc6-dev-sparc - GNU C Library: 32bit Development Libraries for SPARC
 libc6-dev-sparc64 - GNU C Library: 64bit Development Libraries for UltraSPARC
 libc6-dev-x32 - GNU C Library: X32 ABI Development Libraries for AMD64
 libc6-i386 - GNU C Library: 32-bit shared libraries for AMD64
 libc6-i686 - transitional dummy package
 libc6-mips32 - GNU C Library: o32 Shared libraries for MIPS
 libc6-mips64 - GNU C Library: 64bit Shared libraries for MIPS64
 libc6-mipsn32 - GNU C Library: n32 Shared libraries for MIPS64
 libc6-pic  - GNU C Library: PIC archive library
 libc6-powerpc - GNU C Library: 32bit powerpc shared libraries for ppc64
 libc6-ppc64 - GNU C Library: 64bit Shared libraries for PowerPC64
 libc6-s390 - GNU C Library: 32bit Shared libraries for IBM zSeries
 libc6-sparc - GNU C Library: 32bit Shared libraries for SPARC
 libc6-sparc64 - GNU C Library: 64bit Shared libraries for UltraSPARC
 libc6-udeb - GNU C Library: Shared libraries - udeb (udeb)
 libc6-x32  - GNU C Library: X32 ABI Shared libraries for AMD64
 libc6-xen  - GNU C Library: Shared libraries [Xen version]
 libc6.1    - GNU C Library: Shared libraries
 libc6.1-alphaev67 - GNU C Library: Shared libraries (EV67 optimized)
 libc6.1-dbg - GNU C Library: detached debugging symbols
 libc6.1-dev - GNU C Library: Development Libraries and Header Files
 libc6.1-pic - GNU C Library: PIC archive library
 libc6.1-udeb - GNU C Library: Shared libraries - udeb (udeb)
 locales    - GNU C Library: National Language (locale) data [support]
 locales-all - GNU C Library: Precompiled locale data
 multiarch-support - Transitional package to ensure multiarch compatibility
 nscd       - GNU C Library: Name Service Cache Daemon
Closes: 827105 827477
Changes:
 glibc (2.22-12) unstable; urgency=medium
 .
   [ Aurelien Jarno ]
   * Update from upstream stable branch:
     - fix FTBFS with recent binutils versions on mips* and sparc*.  Closes:
       #827477.
   * debian/sysdeps/kfreebsd-i386.mk: fix libc0.1-i686 package name.
   * debian/rules.d/build.mk: in case of build failure due testsuite
     issues, display again the failed tests so that they appear at the end of
     the build log.
   * debian/local/etc/nsswitch.conf: add gshadow line to default
     /etc/nsswitch.conf (addresses #699090).
   * debian/debhelper.in/libc-bin.postinst: update /etc/nsswitch.conf to the
     current default if it matches a version shipped by bases-file or
     libc-bin. This is based on a patch from Santiago Vila, thanks.  Closes:
     #827105.
 .
   [ Samuel Thibault ]
   * hurd-i386/tg-eintr.diff: New patch to fix "Interrupted" issues in ghc.
Checksums-Sha1:
 f8ab16bcba99ccd210a4bd77deaa7f3755c509fa 8260 glibc_2.22-12.dsc
 078a46b6abb9832317d061bc0d4b9b67ce3bac75 1044132 glibc_2.22-12.debian.tar.xz
Checksums-Sha256:
 f0cb0d31bc7a68517deb93958c5d2c042f94ecf1ad09589dbfee7f529923a872 8260 glibc_2.22-12.dsc
 8ae20775ee72228d2d448ca9a14004c1fb080e0ded42dd8441409458698d721c 1044132 glibc_2.22-12.debian.tar.xz
Files:
 bfce9b714cebbaa006d3b4f6048bcfb1 8260 libs required glibc_2.22-12.dsc
 c44693444bf361afa40206c98b3b4418 1044132 libs required glibc_2.22-12.debian.tar.xz

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCgAGBQJXZxbgAAoJELqceAYd3YybyB4QALWgSoBIXyePtgTqz3p2SHMx
HYIBetx7hwPkRZNP1wBdGUaSRbvXrd2A7DuIHOoh59VYQlnkrm2GyhIjSLEbxHKB
2E8QICi1MJikmu8ULO0LRCyvaBsbi+szc+YX/aRGMl3vpY8/xJw7/BHkm2+L1Z2n
+jKU36owgXoC0D8L9RfhK8Z4xbg4USJYOHlOm/J41FFGwWvedLj+aF0CkRs9k7hh
BQY1ELolwW+EwcEncD+U4KUW0M4+bx1MQ/5caBVN92gkyokG0teUFI1Lu4K/K4w7
EqWAyHL/Hl89TcCUgbUPdU7PQ1bm334Y07m9fk6q5IDzwzI9iXUWB5zYI3q9anrD
2TEtzrvzlpqFz0pcfjYSd2t6Wm7VaGPalUhwOH9lHxnB06wJr0sea0S7tAV1sOBq
sSfI2DPkIGRJYxLzlMmkvFyjVHE+IGhUKX5jownm2LFjAArMroxv+y5B3indrmlG
KVVJHAuWmyJ2MxE6uVL9QlVfX0W0C/VBIXK7nzdH7V968v5zbv6TIcJWINUMHDnX
ybQpPJjo/GSQsaK5hk2oWYRTZv1RA/HayZ7RTMA4CUsr/aGJf2R6A1epi35UI3xg
a5PszciiYT9bdZ7/RKdFmrj7D7ZC5anxYQ5PTTKKi2K2fIGI+0A6uLri8yx+rWp0
Te4ze/Giys2NWZMldVq1
=xW3Z
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: