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

Bug#283626: marked as done (dpkg-cross: Merge dpkg-shlibdeps into dpkg)



Your message dated Mon, 08 Oct 2007 21:47:03 +0000
with message-id <E1If0RL-0006Cq-Iv@ries.debian.org>
and subject line Bug#283626: fixed in dpkg-cross 2.0.0
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: dpkg-cross
Version: 1.20
Severity: wishlist

It seems that dpkg-shlibdeps has been diverted from the one of dpkg.
dpkg-shlibdeps.pl in dpkg-1.10.25 supports local shared lib detection, 
but dpkg-cross does not.

Reading dpkg-shlibdeps.pl in dpkg-1.10.25, I think that merging
functionality of dpkg-cross's version is not hard.

Currently, I'm using following changes to dpkg-1.10.25, and
it works fine for me (except one thing: gcc-3.4).

Change of gcc-3.4/debian/rules.d/* is small, just like:
	MAKEFLAGS="USRLIBDIR=/usr/$(DEB_TARGET_GNU_TYPE)/lib" dh_shlibdeps -p$(p_lgcc)

Maintaining diverted version is sometimes not good.
How about merging it?

This is just one of wishlist to dkg-cross.  I'm in the process of
checking how this version works well for cross compiling for M32R.

--- dpkg-1.10.25/scripts/dpkg-shlibdeps.pl	2004-11-12 05:10:04.000000000 +0900
+++ dpkg-1.10.25/scripts/dpkg-shlibdeps.pl	2004-11-23 00:35:37.000000000 +0900
@@ -20,6 +20,18 @@
 
 @depfields= qw(Suggests Recommends Depends Pre-Depends);
 
+# dpkg-cross
+@crosslib64formats = ("elf64-sparc", "elf64-s390");
+
+if ($ENV{'MAKEFLAGS'}) {
+    @makeflags=split(/\s/, $ENV{'MAKEFLAGS'});
+    @extracted= grep(s/^USRLIBDIR=(\S*)$/$1/, @makeflags);
+    if ($#extracted >= 0) {
+	$crosslib = $extracted[0];
+    }
+}
+#
+
 push(@INC,$dpkglibdir);
 require 'controllib.pl';
 
@@ -96,37 +108,55 @@
 }
 
 for ($i=0;$i<=$#exec;$i++) {
-    if (!isbin ($exec[$i])) { next; }
-    
-    # First we get an ldd output to see what libs + paths we have at out
-    # disposal.
     my %so2path = ();
-    defined($c= open(P,"-|")) || syserr("cannot fork for ldd");
-    if (!$c) { exec("ldd","--",$exec[$i]); syserr("cannot exec ldd"); }
-    while (<P>) {
-	if (m,^\s+(\S+)\s+=>\s+(\S+)\s+\(0x.+\)?$,) {
-	    $so2path{$1} = $2;
+
+    if (!isbin ($exec[$i])) { next; }
+
+    if (!$crosslib) {
+	# First we get an ldd output to see what libs + paths we have at out
+	# disposal.
+	defined($c= open(P,"-|")) || syserr("cannot fork for ldd");
+	if (!$c) { exec("ldd","--",$exec[$i]); syserr("cannot exec ldd"); }
+	while (<P>) {
+	    if (m,^\s+(\S+)\s+=>\s+(\S+)\s+\(0x.+\)?$,) {
+		$so2path{$1} = $2;
+	    }
 	}
+	close(P); $? && subprocerr("ldd on \`$exec[$i]'");
     }
-    close(P); $? && subprocerr("ldd on \`$exec[$i]'");
 
     # Now we get the direct deps of the program. We then check back with
     # the ldd output from above to see what our path is.
     defined($c= open(P,"-|")) || syserr("cannot fork for objdump");
     if (!$c) { exec("objdump","-p","--",$exec[$i]); syserr("cannot exec objdump"); }
+    $thiscrosslib = $crosslib;
     while (<P>) {
 	chomp;
+	if (/^\s*\S+:\s*file\s+format\s+(\S+)\s*$/) {
+	    if (grep {$_ eq $1} @crosslib64formats) {
+		$thiscrosslib = $crosslib . "64";
+	    }
+	    next;
+	}
 	if (m,^\s*NEEDED\s+,) {
 	    if (m,^\s*NEEDED\s+((\S+)\.so\.(\S+))$,) {
 		push(@libname,$2); push(@libsoname,$3);
 		push(@libf,$execf[$i]);
-		&warn("could not find path for $1") unless defined($so2path{$1});
-		push(@libfiles,$so2path{$1});
+		if ($crosslib) {
+		    push(@libfiles,"$thiscrosslib/$1");
+		} else {
+		    &warn("could not find path for $1") unless defined($so2path{$1});
+		    push(@libfiles,$so2path{$1});
+		}
 	    } elsif (m,^\s*NEEDED\s+((\S+)-(\S+)\.so)$,) {
 		push(@libname,$2); push(@libsoname,$3);
 		push(@libf,$execf[$i]);
-		&warn("could not find path for $1") unless defined($so2path{$1});
-		push(@libfiles,$so2path{$1});
+		if ($crosslib) {
+		    push(@libfiles,"$thiscrosslib/$1");
+		} else {
+		    &warn("could not find path for $1") unless defined($so2path{$1});
+		    push(@libfiles,$so2path{$1});
+		}
 	    } else {
 		m,^\s*NEEDED\s+(\S+)$,;
 		&warn("format of $1 not recognized");
@@ -190,10 +220,16 @@
     grep(s/\[\?\*/\\$&/g, @libname);
     defined($c= open(P,"-|")) || syserr("cannot fork for dpkg --search");
     if (!$c) {
+	my @args = ("dpkg","--search");
+	push(@args, "--root=$crossroot" ) if $crossroot;
+	push(@args, "--", @libfiles);
+
         close STDERR; # we don't need to see dpkg's errors
 	open STDERR, "> /dev/null";
         $ENV{LC_ALL} = "C";
-        exec("dpkg","--search","--",map {"$_"} @libfiles); syserr("cannot exec dpkg");
+
+	exec(@args);
+	syserr("cannot exec dpkg");
     }
     while (<P>) {
        chomp;


--- End Message ---
--- Begin Message ---
Source: dpkg-cross
Source-Version: 2.0.0

We believe that the bug you reported is fixed in the latest version of
dpkg-cross, which is due to be installed in the Debian FTP archive:

dpkg-cross_2.0.0.dsc
  to pool/main/d/dpkg-cross/dpkg-cross_2.0.0.dsc
dpkg-cross_2.0.0.tar.gz
  to pool/main/d/dpkg-cross/dpkg-cross_2.0.0.tar.gz
dpkg-cross_2.0.0_all.deb
  to pool/main/d/dpkg-cross/dpkg-cross_2.0.0_all.deb
libdebian-dpkgcross-perl_2.0.0_all.deb
  to pool/main/d/dpkg-cross/libdebian-dpkgcross-perl_2.0.0_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 283626@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Neil Williams <codehelp@debian.org> (supplier of updated dpkg-cross package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Mon, 08 Oct 2007 22:11:09 +0100
Source: dpkg-cross
Binary: libdebian-dpkgcross-perl dpkg-cross
Architecture: source all
Version: 2.0.0
Distribution: unstable
Urgency: low
Maintainer: Debian Embedded Group <debian-embedded@lists.debian.org>
Changed-By: Neil Williams <codehelp@debian.org>
Description: 
 dpkg-cross - tools for cross compiling Debian packages
 libdebian-dpkgcross-perl - functions to aid cross-compiling Debian packages
Closes: 32340 283626 401058 429555 440043 441940
Changes: 
 dpkg-cross (2.0.0) unstable; urgency=low
 .
   * Replace the diversions
   * buildcross: new shell library to replace perl dpkg-buildpackage
     diversion
   * remove lintian overrides for previously diverted scripts
   * ChangeLog: close old file and use only the installed debian
     changelog
   * Remove old diversions when installing instead of removing
   * crosstools: removed
   * Merge dpkg-shlibdeps into dpkg (Closes: #283626)
   * replace cross-compile.example with cross-compile.sample
   * dpkg-cross should also handle /usr/lib/ldscripts (Closes: #401058)
   * shlibs must also search /usr/$libpath (Closes: #32340)
   * dpkg-buildpackage -S is confused by other-arch changes file.
     (Closes: #429555)
   * Debian/DpkgCross.pm: add new function convert_filename($)
   * NEWS,
     README.debian,
     README.cvs: Start the long goodbye - signal the intention to
     remove dpkg-cross after Lenny.
   * Missing a dependency on libfile-homedir-perl (Closes: #440043)
   * debconf dependency unsatisfiable with cdebconf (Closes: #441940)
   * Generate POD content and update man page for latest changes
   * Skip pre2 - set 2.0.0 for unstable due to changes in dpkg-dev 1.14.7
Files: 
 9a383a1849dbc609e9b2c7cbacb68593 946 utils extra dpkg-cross_2.0.0.dsc
 c29c09f4442b9e33a8c0fe136aaf4277 83483 utils extra dpkg-cross_2.0.0.tar.gz
 2fa2d346da2a775cbde503c3fbebca49 47788 utils extra dpkg-cross_2.0.0_all.deb
 0ac20053905db199a9e8c390406746b2 29510 perl extra libdebian-dpkgcross-perl_2.0.0_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHCqNTiAEJSii8s+MRAmuOAKDshdvCWW6pC4sWbhwpUZY1MYEnwgCg9iN+
/e/8uQZLsyg2KZ4gjguam/M=
=L64M
-----END PGP SIGNATURE-----



--- End Message ---

Reply to: