Author: adconrad Date: 2014-03-03 06:45:16 +0000 (Mon, 03 Mar 2014) New Revision: 5984
Modified: glibc-package/branches/eglibc-2.19/debian/changelog glibc-package/branches/eglibc-2.19/debian/debhelper.in/libc-alt.postrm glibc-package/branches/eglibc-2.19/debian/debhelper.in/libc.postrm glibc-package/branches/eglibc-2.19/debian/debhelper.in/libc.preinst Log: Merge with trunk. Modified: glibc-package/branches/eglibc-2.19/debian/changelog =================================================================== --- glibc-package/branches/eglibc-2.19/debian/changelog 2014-03-02 15:20:28 UTC (rev 5983) +++ glibc-package/branches/eglibc-2.19/debian/changelog 2014-03-03 06:45:16 UTC (rev 5984) @@ -52,6 +52,21 @@ -- Adam Conrad <adcon...@0c3.net> Sun, 09 Feb 2014 09:46:13 -0700 +eglibc (2.18-4) unstable; urgency=high + + [ Aurelien Jarno ] + * debian/debhelper.in/libc.preinst: Don't fail if the dynamic loader + symlink is dangling or missing. Closes: #740158, #740196. + * debian/debhelper.in/libc.preinst: only disable ldconfig after making + sure a fixed version hasn't already been unpacked, as the unpack order + is not guaranteed. + * debian/debhelper.in/libc.postrm: generalize the dynamic linker + symlink creation to all biarch packages. + * debian/debhelper.in/libc-alt.postrm: generalize the dynamic linker + symlink removal to all biarch packages. + + -- Aurelien Jarno <aure...@debian.org> Sun, 02 Mar 2014 15:32:16 +0100 + eglibc (2.18-3) unstable; urgency=medium * debian/patches/any/local-no-malloc-backtrace.diff: Lower the default Modified: glibc-package/branches/eglibc-2.19/debian/debhelper.in/libc-alt.postrm =================================================================== --- glibc-package/branches/eglibc-2.19/debian/debhelper.in/libc-alt.postrm 2014-03-02 15:20:28 UTC (rev 5983) +++ glibc-package/branches/eglibc-2.19/debian/debhelper.in/libc-alt.postrm 2014-03-03 06:45:16 UTC (rev 5984) @@ -2,11 +2,13 @@ set -e if [ "$1" = remove ]; then - ARCH=${DPKG_MAINTSCRIPT_ARCH:-$(dpkg --print-architecture)} - if [ "${ARCH}" = "amd64" ] && [ "LIBC-FLAVOR" = "libc6-i386" ]; then - if [ -h /lib/ld-linux.so.2 ] && [ ! -f /lib/ld-linux.so.2 ]; then - rm /lib/ld-linux.so.2 - fi + # Native multiarch packages declare a Replaces: on the corresponding + # biarch package. Therefore if both a biarch package and the corresponding + # 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 RTLD_SO ] && [ ! -f RTLD_SO ]; then + rm RTLD_SO fi fi Modified: glibc-package/branches/eglibc-2.19/debian/debhelper.in/libc.postrm =================================================================== --- glibc-package/branches/eglibc-2.19/debian/debhelper.in/libc.postrm 2014-03-02 15:20:28 UTC (rev 5983) +++ glibc-package/branches/eglibc-2.19/debian/debhelper.in/libc.postrm 2014-03-03 06:45:16 UTC (rev 5984) @@ -9,13 +9,23 @@ suidunregister -s LIBC /usr/libexec/pt_chown fi fi + # When both the multiarch and the corresponding biarch packages are + # installed, removing the multiarch package will remove the dynamic + # linker. Recreate it in the postinst. ARCH=${DPKG_MAINTSCRIPT_ARCH:-$(dpkg --print-architecture)} - if [ "${ARCH}" = "i386" ]; then - if [ -f /lib32/ld-linux.so.2 ] && [ ! -f /lib/ld-linux.so.2 ]; then - ln -sf /lib32/ld-linux.so.2 /lib/ld-linux.so.2 - elif [ -h /lib/ld-linux.so.2 ] && [ ! -f /lib/ld-linux.so.2 ]; then - rm /lib/ld-linux.so.2 - fi + case "${ARCH}" in + kfreebsd-i386 | s390 | powerpc) + target="/lib32/ld.so.1" + ;; + i386 | sparc) + target="/lib32/ld-linux.so.2" + ;; + *) + target="$(dpkg-query -L LIBC-${ARCH} 2>/dev/null | grep -E '/lib.*/ld-[0-9.]+\.so$' || true)" + ;; + esac + if [ -f "$target" ] && ! [ -f RTLD_SO ] ; then + ln -sf ${target#$(dirname RTLD_SO)/} RTLD_SO fi fi Modified: glibc-package/branches/eglibc-2.19/debian/debhelper.in/libc.preinst =================================================================== --- glibc-package/branches/eglibc-2.19/debian/debhelper.in/libc.preinst 2014-03-02 15:20:28 UTC (rev 5983) +++ glibc-package/branches/eglibc-2.19/debian/debhelper.in/libc.preinst 2014-03-03 06:45:16 UTC (rev 5984) @@ -225,8 +225,15 @@ # Try to detect copies of the libc library in the various places # the dynamic linker uses. - ldfile=$(readlink -e RTLD_SO) - ldbytes=$(head -c 20 RTLD_SO | od -c) + ldfile=$(readlink -m RTLD_SO) + if test -f "$file"; then + ldbytes=$(head -c 20 RTLD_SO | od -c) + else + # If the symlink to the dynamic linker is dangling or missing, set + # ldbytes to an empty string, the test below will fail and all the + # libraries found will be ignored. + ldbytes="" + fi libcfiles=$(dpkg-query -L $(package_name) 2>/dev/null) dirs="SLIBDIR /lib /lib/tls /lib32 /lib64 /usr/local/lib /usr/local/lib32 /usr/local/lib64" @@ -268,14 +275,20 @@ # of the same architecture than the native one has been installed (e.g.: # libc6-amd64:i386 on amd64). Try to detect this by checking that the # ld.so symlink correctly points to ld-*.so in the slib directory, and - # disable ldconfig in such a case. The symlink will be fixed when - # unpacking the new libc version and ldconfig will be re-enabled when - # a new fixed version is unpacked. - if ! readlink -e RTLD_SO | grep -qE 'SLIBDIR/ld-[0-9.]+\.so' ; then - echo "Warning: found a potentially broken dynamic loader symlink," - echo "disabling ldconfig to avoid a possible system breakage. It" - echo "will be reenabled when a new version of libc-bin is unpacked." - ln -sf /bin/true /sbin/ldconfig + # disabling ldconfig if it is not the case and the new version hasn't + # been unpacked yet. The symlink will be fixed when unpacking the new + # libc version and ldconfig will be re-enabled when a new fixed version + # is unpacked. + if ! readlink -m RTLD_SO | grep -qE 'SLIBDIR/ld-[0-9.]+\.so' ; then + # The unpack order is not guaranteed, only disable ldconfig if + # a "broken" version is installed. + libc_bin_version=$(dpkg-query -W -f='${Version}' libc-bin) + if dpkg --compare-versions "$libc_bin_version" lt "2.18-2"; then + echo "Warning: found a potentially broken dynamic loader symlink," + echo "disabling ldconfig to avoid a possible system breakage. It" + echo "will be reenabled when a new version of libc-bin is unpacked." + ln -sf /bin/true /sbin/ldconfig + fi fi # This will keep us from using hwcap libs (optimized) during an -- To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/e1wkmcn-0007zy...@moszumanska.debian.org