r2928 - in glibc-package/trunk/debian: . rules.d
Author: aurel32
Date: 2008-05-10 22:31:10 +0000 (Sat, 10 May 2008)
New Revision: 2928
Added:
glibc-package/trunk/debian/shlibs-add-udebs
Modified:
glibc-package/trunk/debian/changelog
glibc-package/trunk/debian/rules.d/debhelper.mk
Log:
* debian/shlibs-add-udebs: new script from Frans Pop to correctly compute
the udev dependencies. Closes: #474293.
Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog 2008-05-10 18:22:19 UTC (rev 2927)
+++ glibc-package/trunk/debian/changelog 2008-05-10 22:31:10 UTC (rev 2928)
@@ -31,6 +31,8 @@
gcc-4.3.
* sysdeps/arm.mk, sysdeps/hppa.mk, sysdeps/s390.mk, control.in/main: use
gcc-4.3 on arm, hppa and s390.
+ * debian/shlibs-add-udebs: new script from Frans Pop to correctly compute
+ the udev dependencies. Closes: #474293.
[ Pierre Habouzit ]
* Add any/cvs-strerror_r.diff to make strerror_r actually thread safe.
@@ -40,7 +42,7 @@
* patches/hurd-i386/cvs-termios.diff: new patch to revamp ioctls/termios
bits.
- -- Aurelien Jarno <aurel32@debian.org> Sat, 10 May 2008 20:16:39 +0200
+ -- Aurelien Jarno <aurel32@debian.org> Sun, 11 May 2008 00:29:48 +0200
glibc (2.7-10) unstable; urgency=low
Modified: glibc-package/trunk/debian/rules.d/debhelper.mk
===================================================================
--- glibc-package/trunk/debian/rules.d/debhelper.mk 2008-05-10 18:22:19 UTC (rev 2927)
+++ glibc-package/trunk/debian/rules.d/debhelper.mk 2008-05-10 22:31:10 UTC (rev 2928)
@@ -109,6 +109,9 @@
-o -regex '.*/libc-.*so' \) \
-exec chmod a+x '{}' ';'
dh_makeshlibs -X/usr/lib/debug -p$(curpass) -V "$(call xx,shlib_dep)"
+ # Add relevant udeb: lines in shlibs files
+ chmod a+x debian/shlibs-add-udebs
+ ./debian/shlibs-add-udebs $(curpass)
if [ -f debian/$(curpass).lintian ] ; then \
install -d -m 755 -o root -g root debian/$(curpass)/usr/share/lintian/overrides/ ; \
@@ -152,7 +155,6 @@
-o -regex '.*lib[0-9]*/.*libpthread.*so.*' \
-o -regex '.*lib[0-9]*/libc[.-].*so.*' \) \
-exec chmod a+x '{}' ';'
- # dh_makeshlibs -X/usr/lib/debug -p$(curpass) -V "$(call xx,shlib_dep)"
dh_installdeb -p$(curpass)
# dh_shlibdeps -p$(curpass)
dh_gencontrol -p$(curpass)
Added: glibc-package/trunk/debian/shlibs-add-udebs
===================================================================
--- glibc-package/trunk/debian/shlibs-add-udebs (rev 0)
+++ glibc-package/trunk/debian/shlibs-add-udebs 2008-05-10 22:31:10 UTC (rev 2928)
@@ -0,0 +1,51 @@
+#! /bin/sh
+set -e
+
+# This script adds "udeb lines" to shlibs files which allows other udebs
+# to get correct dependencies when built against glibc libraries.
+# The script was written by Frans Pop <fjp@debian.org>.
+
+package="$1"
+shlibs_file="debian/$package/DEBIAN/shlibs"
+
+# Skip packages that don't have an shlibs file.
+# The "cross-subarch" library packages have an shlibs file, but should
+# not have udeb lines, so skip those as well.
+if [ ! -r "$shlibs_file" ] || \
+ echo "$package" | grep -Eq "^libc[0-9.]+-"; then
+ exit 0
+fi
+
+# $1: regexp to select libraries for which lines should be duplicated
+# $2: name of the udeb the new line should point to
+add_udeb_line() {
+ local regexp udeb line lib soname package rest
+ regexp="$1"
+ udeb="$2"
+
+ if line="$(grep "^$regexp[[:space:]]" $shlibs_file)"; then
+ echo "$line" | while read lib soname package rest; do
+ echo "udeb: $lib $soname $udeb $rest" >>$shlibs_file
+ done
+ fi
+}
+
+
+W="[^[:space:]]*"
+
+# The following lists should match the ones in the *-udeb.install files
+# in debian/debhelper.in; $W replaces any "*" wildcards there.
+expr_libc1="ld$W libm-$W libm libdl$W libresolv$W libc-$W libc"
+expr_libc2="libutil$W libcrypt$W librt$W libpthread$W"
+expr_nss_dns="libnss_dns$W"
+expr_nss_files="libnss_files$W"
+
+for expr in $expr_libc1 $expr_libc2; do
+ add_udeb_line "$expr" $package-udeb
+done
+for expr in $expr_nss_dns; do
+ add_udeb_line "$expr" libnss-dns-udeb
+done
+for expr in $expr_nss_files; do
+ add_udeb_line "$expr" libnss-files-udeb
+done
Reply to: