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

Bug#637232: [patch] provide a libc6-dev-compat package



this is a patch I'm proposing to apply to the Ubuntu eglibc builds for precise, quantal and raring.

 - it adds symlinks for .a, .so and .o files
 - adds a symlink for the asm header dir
 - depends on the libc-dev-<multilib> packages, which provide
   more needed header files/symlinks in /usr/include.

Matthias

diff -Nru eglibc-2.16/debian/changelog eglibc-2.16/debian/changelog
--- eglibc-2.16/debian/changelog	2012-10-28 00:24:42.000000000 +0200
+++ eglibc-2.16/debian/changelog	2012-11-02 10:57:32.000000000 +0100
@@ -1,3 +1,9 @@
+eglibc (2.16-0ubuntu4) raring; urgency=low
+
+  * Build a libc-compat-dev package. Closes: #637232.
+
+ -- Matthias Klose <doko@ubuntu.com>  Thu, 01 Nov 2012 18:16:32 +0200
+
 eglibc (2.16-0ubuntu3) raring; urgency=low
 
   * Regenerate the control file.
diff -Nru eglibc-2.16/debian/control eglibc-2.16/debian/control
--- eglibc-2.16/debian/control	2012-10-28 00:23:38.000000000 +0200
+++ eglibc-2.16/debian/control	2012-11-02 10:40:56.000000000 +0100
@@ -175,6 +175,17 @@
  Contains the symlinks, headers, and object files needed to compile
  and link programs which use the standard C library.
 
+Package: libc6-dev-compat
+Architecture: amd64 arm arm64 armel armhf hppa i386 m68k mips mipsel powerpc powerpcspe ppc64 sparc sparc64 s390 s390x sh4 x32
+Section: libdevel
+Priority: extra
+Depends: libc6-dev (= ${binary:Version}), ${multilibdev}
+Provides: libc-dev-compat
+Conflicts: libc6-dev (<< 2.13-0ubuntu7)
+Description: Embedded GNU C Library: Non-Multiarch compatibility symlinks
+ Contains the symlinks for headers, libraries and object files in
+ non-multiarch locations.
+
 Package: libc6-dbg
 Architecture: amd64 arm arm64 armel armhf hppa i386 m68k mips mipsel powerpc powerpcspe ppc64 sparc sparc64 s390 s390x sh4 x32
 Section: debug
@@ -265,6 +276,17 @@
  Contains the symlinks, headers, and object files needed to compile
  and link programs which use the standard C library.
 
+Package: libc6.1-dev-compat
+Architecture: alpha ia64
+Section: libdevel
+Priority: extra
+Depends: libc6.1-dev (= ${binary:Version}), ${multilibdev}
+Provides: libc-dev-compat
+Conflicts: libc6.1-dev (<< 2.13-0ubuntu7)
+Description: Embedded GNU C Library: Non-Multiarch compatibility symlinks
+ Contains the symlinks for headers, libraries and object files in
+ non-multiarch locations.
+
 Package: libc6.1-dbg
 Architecture: alpha ia64
 Section: debug
@@ -355,6 +377,17 @@
  Contains the symlinks, headers, and object files needed to compile
  and link programs which use the standard C library.
 
+Package: libc0.3-dev-compat
+Architecture: hurd-i386
+Section: libdevel
+Priority: extra
+Depends: libc0.3-dev (= ${binary:Version}), ${multilibdev}
+Provides: libc-dev-compat
+Conflicts: libc0.3-dev (<< 2.13-0ubuntu7)
+Description: Embedded GNU C Library: Non-Multiarch compatibility symlinks
+ Contains the symlinks for headers, libraries and object files in
+ non-multiarch locations.
+
 Package: libc0.3-dbg
 Architecture: hurd-i386
 Section: debug
@@ -445,6 +478,17 @@
  Contains the symlinks, headers, and object files needed to compile
  and link programs which use the standard C library.
 
+Package: libc0.1-dev-compat
+Architecture: kfreebsd-amd64 kfreebsd-i386
+Section: libdevel
+Priority: extra
+Depends: libc0.1-dev (= ${binary:Version}), ${multilibdev}
+Provides: libc-dev-compat
+Conflicts: libc0.1-dev (<< 2.13-0ubuntu7)
+Description: Embedded GNU C Library: Non-Multiarch compatibility symlinks
+ Contains the symlinks for headers, libraries and object files in
+ non-multiarch locations.
+
 Package: libc0.1-dbg
 Architecture: kfreebsd-amd64 kfreebsd-i386
 Section: debug
diff -Nru eglibc-2.16/debian/control.in/libc eglibc-2.16/debian/control.in/libc
--- eglibc-2.16/debian/control.in/libc	2012-10-26 17:50:39.000000000 +0200
+++ eglibc-2.16/debian/control.in/libc	2012-11-02 10:16:38.000000000 +0100
@@ -39,6 +39,17 @@
  Contains the symlinks, headers, and object files needed to compile
  and link programs which use the standard C library.
 
+Package: @libc@-dev-compat
+Architecture: @archs@
+Section: libdevel
+Priority: extra
+Depends: @libc@-dev (= ${binary:Version}), ${multilibdev}
+Provides: libc-dev-compat
+Conflicts: @libc@-dev (<< 2.13-0ubuntu7)
+Description: Embedded GNU C Library: Non-Multiarch compatibility symlinks
+ Contains the symlinks for headers, libraries and object files in
+ non-multiarch locations.
+
 Package: @libc@-dbg
 Architecture: @archs@
 Section: debug
diff -Nru eglibc-2.16/debian/rules eglibc-2.16/debian/rules
--- eglibc-2.16/debian/rules	2012-10-26 12:47:57.000000000 +0200
+++ eglibc-2.16/debian/rules	2012-11-02 09:35:16.000000000 +0100
@@ -143,7 +143,7 @@
   DEB_INDEP_REGULAR_PACKAGES = 
   DEB_UDEB_PACKAGES = 
 else
-  DEB_ARCH_REGULAR_PACKAGES = $(libc) $(libc)-dev $(libc)-dbg $(libc)-prof $(libc)-pic libc-bin libc-dev-bin multiarch-support
+  DEB_ARCH_REGULAR_PACKAGES = $(libc) $(libc)-dev $(libc)-dbg $(libc)-prof $(libc)-pic libc-bin libc-dev-bin multiarch-support $(libc)-dev-compat
   DEB_INDEP_REGULAR_PACKAGES = glibc-doc eglibc-source
   DEB_UDEB_PACKAGES = $(libc)-udeb libnss-dns-udeb libnss-files-udeb
 endif
diff -Nru eglibc-2.16/debian/rules.d/debhelper.mk eglibc-2.16/debian/rules.d/debhelper.mk
--- eglibc-2.16/debian/rules.d/debhelper.mk	2012-10-26 03:53:59.000000000 +0200
+++ eglibc-2.16/debian/rules.d/debhelper.mk	2012-11-02 11:29:37.000000000 +0100
@@ -95,6 +95,16 @@
 	fi
 endif
 
+	if test "$(curpass)" = "$(libc)-dev-compat"; then \
+	  mkdir -p debian/$(libc)-dev-compat/usr/lib; \
+	  links=`cd debian/$(libc)-dev/usr/lib/$(DEB_HOST_MULTIARCH) && ls *.[ao] *.so`; \
+	  for l in $$links; do \
+	    ln -sf $(DEB_HOST_MULTIARCH)/$$l debian/$(libc)-dev-compat/usr/lib/$$l; \
+	  done; \
+	  mkdir -p debian/$(libc)-dev-compat/usr/include; \
+	  ln -sf $(DEB_HOST_MULTIARCH)/asm debian/$(libc)-dev-compat/usr/include/asm; \
+	fi
+
 	dh_compress -p$(curpass)
 	dh_fixperms -p$(curpass) -Xpt_chown
 	# Use this instead of -X to dh_fixperms so that we can use
@@ -112,7 +122,7 @@
 
 	dh_installdeb -p$(curpass)
 	dh_shlibdeps -p$(curpass)
-	dh_gencontrol -p$(curpass)
+	dh_gencontrol -p$(curpass) -- '-Vmultilibdev=$(multilibdev)'
 	if [ $(curpass) = nscd ] ; then \
 		sed -i -e "s/\(Depends:.*libc[0-9.]\+\)-[a-z0-9]\+/\1/" debian/nscd/DEBIAN/control ; \
 	fi
diff -Nru eglibc-2.16/debian/sysdeps/amd64.mk eglibc-2.16/debian/sysdeps/amd64.mk
--- eglibc-2.16/debian/sysdeps/amd64.mk	2012-10-27 13:13:34.000000000 +0200
+++ eglibc-2.16/debian/sysdeps/amd64.mk	2012-11-02 11:27:53.000000000 +0100
@@ -1,6 +1,7 @@
 libc_rtlddir = /lib64
 libc_extra_cflags = -O3
 extra_config_options = --enable-multi-arch
+multilibdev = libc6-dev-i386 (= $${binary:Version}), libc6-dev-x32 (= $${binary:Version})
 
 # build 32-bit (i386) alternative library
 EGLIBC_PASSES += i386
diff -Nru eglibc-2.16/debian/sysdeps/armel.mk eglibc-2.16/debian/sysdeps/armel.mk
--- eglibc-2.16/debian/sysdeps/armel.mk	2012-10-26 04:45:50.000000000 +0200
+++ eglibc-2.16/debian/sysdeps/armel.mk	2012-11-02 11:28:17.000000000 +0100
@@ -1,4 +1,5 @@
 libc_add-ons = ports nptl $(add-ons)
+multilibdev = libc6-dev-armhf (= $${binary:Version})
 
 EGLIBC_PASSES += armhf
 DEB_ARCH_REGULAR_PACKAGES += libc6-armhf libc6-dev-armhf
diff -Nru eglibc-2.16/debian/sysdeps/armhf.mk eglibc-2.16/debian/sysdeps/armhf.mk
--- eglibc-2.16/debian/sysdeps/armhf.mk	2012-10-26 04:44:05.000000000 +0200
+++ eglibc-2.16/debian/sysdeps/armhf.mk	2012-11-02 11:28:23.000000000 +0100
@@ -1,4 +1,5 @@
 libc_add-ons = ports nptl $(add-ons)
+multilibdev = libc6-dev-armel (= $${binary:Version})
 
 # Install a compat symlink so old binaries keep working:
 define libc6_extra_pkg_install
diff -Nru eglibc-2.16/debian/sysdeps/i386.mk eglibc-2.16/debian/sysdeps/i386.mk
--- eglibc-2.16/debian/sysdeps/i386.mk	2012-10-27 13:14:05.000000000 +0200
+++ eglibc-2.16/debian/sysdeps/i386.mk	2012-11-02 11:27:59.000000000 +0100
@@ -1,5 +1,6 @@
 extra_config_options = --enable-multi-arch
 libc_extra_cflags = -mno-tls-direct-seg-refs
+multilibdev = libc6-dev-amd64 (= $${binary:Version}), libc6-dev-x32 (= $${binary:Version})
 
 ## We use -march=i686 and glibc's i686 routines use cmov, so require it.
 ## A Debian-local glibc patch adds cmov to the search path.
diff -Nru eglibc-2.16/debian/sysdeps/powerpc.mk eglibc-2.16/debian/sysdeps/powerpc.mk
--- eglibc-2.16/debian/sysdeps/powerpc.mk	2011-08-04 08:44:37.000000000 +0200
+++ eglibc-2.16/debian/sysdeps/powerpc.mk	2012-11-02 11:28:30.000000000 +0100
@@ -1,4 +1,5 @@
 extra_config_options = --enable-multi-arch
+multilibdev = libc6-dev-ppc64 (= $${binary:Version})
 
 # build 64-bit (ppc64) alternative library
 EGLIBC_PASSES += ppc64
diff -Nru eglibc-2.16/debian/sysdeps/ppc64.mk eglibc-2.16/debian/sysdeps/ppc64.mk
--- eglibc-2.16/debian/sysdeps/ppc64.mk	2012-10-26 04:55:31.000000000 +0200
+++ eglibc-2.16/debian/sysdeps/ppc64.mk	2012-11-02 11:28:39.000000000 +0100
@@ -1,6 +1,7 @@
 libc_rtlddir = /lib64
 extra_config_options = --enable-multi-arch
 extra_cflags = -O3 -fno-tree-vectorize
+multilibdev = libc6-dev-powerpc (= $${binary:Version})
 
 # build 32-bit (powerpc) alternative library
 EGLIBC_PASSES += powerpc

Reply to: