Package: glibc Version: 2.3.6.ds1-4 Severity: serious Tags: patch Hi,
the standard location for libraries on amd64 is (/usr)/lib64 but glibc is build for (/usr)/lib. In most cases this makes no difference but there are some: 1) Compatibility with other linux When you copy debians libc6 or static binaries to other linux systems then the location of plugins changes from /usr/lib to /usr/lib64 (/usr/lib/gconv/ becomes /usr/lib64/gconv/). 2) automatic conversion for multiarch The same thing happens here. The converter for multiarch deletes the (/usr)/lib64 link and changes (/usr)/lib to (/usr)/lib64 so the library does not conflict with its 32bit counterpart. Again /usr/lib/gconv/ becomes /usr/lib64/gconv/ and so on. The attached patch is a simple solution to the problem. Glibc on amd64 gets compiled for (/usr)/lib64 as the FHS/LSB specify for amd64 but before packaging it gets renamed to (/usr)/lib and (later) the lib64->lib links are put in place. This way it works everywhere. ------------------------------------------------------------------------------ I set this to serious because it sort of violates a MUST directive in the FHS: http://www.debian.org/doc/packaging-manuals/fhs/fhs-2.3.html | /lib64 and /lib32 : 64/32-bit libraries (architecture dependent) | | The 64-bit architectures PPC64, s390x, sparc64 and AMD64 must place | 64-bit libraries in /lib64, and 32-bit (or 31-bit on s390) libraries | in /lib. It does not specificaly mention plugins but I hope you agree the same rational applies there for libc6. ------------------------------------------------------------------------------ MfG Goswin -- System Information: Debian Release: testing/unstable APT prefers unstable APT policy: (500, 'unstable') Architecture: amd64 (x86_64) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.8-frosties-2 Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
diff -u glibc-2.3.6.ds1/debian/rules.d/build.mk glibc-2.3.6.ds1/debian/rules.d/build.mk --- glibc-2.3.6.ds1/debian/rules.d/build.mk +++ glibc-2.3.6.ds1/debian/rules.d/build.mk @@ -124,6 +124,15 @@ tar zcf $(CURDIR)/debian/locales-all/usr/lib/locales-all/supported.tar.gz -C $(CURDIR)/debian/tmp-libc/usr/lib/locale .; \ fi + # Move lib64 to lib on amd64 + if [ $(curpass) = libc ] && [ $(DEB_HOST_ARCH) = amd64 ]; then \ + find debian/tmp-$(curpass); \ + mkdir -p debian/tmp-$(curpass)/lib debian/tmp-$(curpass)/usr/lib; \ + mv debian/tmp-$(curpass)/lib64/* debian/tmp-$(curpass)/lib; \ + mv debian/tmp-$(curpass)/usr/lib64/* debian/tmp-$(curpass)/usr/lib; \ + rmdir debian/tmp-$(curpass)/lib64 debian/tmp-$(curpass)/usr/lib64; \ + fi + # Remove ld.so from optimized libraries if [ $(curpass) != libc ] && [ $(call xx,configure_build) = $(call xx,configure_target) ]; then \ rm -f debian/tmp-$(curpass)/$(call xx,slibdir)/ld*.so* ; \ diff -u glibc-2.3.6.ds1/debian/sysdeps/amd64.mk glibc-2.3.6.ds1/debian/sysdeps/amd64.mk --- glibc-2.3.6.ds1/debian/sysdeps/amd64.mk +++ glibc-2.3.6.ds1/debian/sysdeps/amd64.mk @@ -2,8 +2,8 @@ libc_MIN_KERNEL_SUPPORTED = 2.6.0 libc_add-ons = nptl $(add-ons) libc_extra_cflags = -O3 -g1 -libc_slibdir = /lib -libc_libdir = /usr/lib +libc_slibdir = /lib64 +libc_libdir = /usr/lib64 libc_rtlddir = /lib64 # /lib64 and /usr/lib64 are provided by glibc instead base-files: #259302. diff -u glibc-2.3.6.ds1/debian/changelog glibc-2.3.6.ds1/debian/changelog --- glibc-2.3.6.ds1/debian/changelog +++ glibc-2.3.6.ds1/debian/changelog @@ -1,3 +1,11 @@ +glibc (2.3.6.ds1-4a0.ql.0.1) unstable; urgency=low + + * sysdeps/amd64.mk: Set libc_slibdir /lib64 and libc_libdir to /usr/lib64 + * rules.d/build.mk: on amd64 rename debian/tmp-libc/lib64 to lib + and debian/tmp-libc/usr/lib64 to lib + + -- Goswin von Brederlow <[EMAIL PROTECTED]> Mon, 11 Sep 2006 16:45:24 +0200 + glibc (2.3.6.ds1-4) unstable; urgency=low [ Aurelien Jarno ]