Bug#502258: dpkg-dev: use RUNPATH in dpkg-shlibdeps

2008-10-15 Thread Javier Serrano Polo
El dc 15 de 10 de 2008 a les 09:55 +0200, en/na Raphael Hertzog va
escriure:
  Please use RUNPATH when defined instead of RPATH.
 
 Can you explain why ?

man dlopen
/further details

 Is it used by GNU's ld.so ?

man ld.so
/RPATH TOKEN




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#502258: dpkg-dev: use RUNPATH in dpkg-shlibdeps

2008-10-15 Thread Raphael Hertzog
On Wed, 15 Oct 2008, Javier Serrano Polo wrote:
 Package: dpkg-dev
 Version: 1.14.22
 Severity: wishlist
 Tags: patch
 
 Please use RUNPATH when defined instead of RPATH. A possible
 implementation's attached.

Can you explain why ? Is it used by GNU's ld.so ? Can you point us to the
corresponding documentation ?

Cheers,
-- 
Raphaël Hertzog

Le best-seller français mis à jour pour Debian Etch :
http://www.ouaza.com/livre/admin-debian/



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#502258: dpkg-dev: use RUNPATH in dpkg-shlibdeps

2008-10-14 Thread Javier Serrano Polo
Package: dpkg-dev
Version: 1.14.22
Severity: wishlist
Tags: patch

Please use RUNPATH when defined instead of RPATH. A possible
implementation's attached.
diff -ur dpkg-1.14.22.orig/scripts/Dpkg/Shlibs/Objdump.pm dpkg-1.14.22/scripts/Dpkg/Shlibs/Objdump.pm
--- dpkg-1.14.22.orig/scripts/Dpkg/Shlibs/Objdump.pm	2008-07-01 19:07:54.0 +0200
+++ dpkg-1.14.22/scripts/Dpkg/Shlibs/Objdump.pm	2008-10-14 21:36:42.0 +0200
@@ -125,6 +125,7 @@
 $self-{GNU_HASH} = '';
 $self-{SONAME} = '';
 $self-{NEEDED} = [];
+$self-{RUNPATH} = [];
 $self-{RPATH} = [];
 $self-{dynsyms} = {};
 $self-{flags} = {};
@@ -197,6 +198,8 @@
 		$self-{HASH} = $1;
 	} elsif (/^\s*GNU_HASH\s+(\S+)/) {
 		$self-{GNU_HASH} = $1;
+	} elsif (/^\s*RUNPATH\s+(\S+)/) {
+		push @{$self-{RUNPATH}}, split (/:/, $1);
 	} elsif (/^\s*RPATH\s+(\S+)/) {
 		push @{$self-{RPATH}}, split (/:/, $1);
 	}
diff -ur dpkg-1.14.22.orig/scripts/dpkg-shlibdeps.pl dpkg-1.14.22/scripts/dpkg-shlibdeps.pl
--- dpkg-1.14.22.orig/scripts/dpkg-shlibdeps.pl	2008-08-26 15:52:08.0 +0200
+++ dpkg-1.14.22/scripts/dpkg-shlibdeps.pl	2008-10-14 23:09:23.0 +0200
@@ -142,7 +142,9 @@
 my %soname_notfound;
 my %alt_soname;
 foreach my $soname (@sonames) {
-	my $lib = my_find_library($soname, $obj-{RPATH}, $obj-{format}, $file);
+	my @usedrpath = scalar(@{$obj-{RUNPATH}}) ? $obj-{RUNPATH}
+	: $obj-{RPATH};
+	my $lib = my_find_library($soname, @usedrpath, $obj-{format}, $file);
 	unless (defined $lib) {
 	$soname_notfound{$soname} = 1;
 	$global_soname_notfound{$soname} = 1;