Debian Bug report logs - #283626
dpkg-cross: Merge dpkg-shlibdeps into dpkg

version graph

Package: dpkg-cross; Maintainer for dpkg-cross is Debian Embedded Group <debian-embedded@lists.debian.org>; Source for dpkg-cross is src:dpkg-cross.

Reported by: NIIBE Yutaka <gniibe@fsij.org>

Date: Tue, 30 Nov 2004 09:33:01 UTC

Severity: wishlist

Found in version 1.20

Fixed in version dpkg-cross/2.0.0

Done: Neil Williams <codehelp@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, David Schleef <ds@schleef.org>:
Bug#283626; Package dpkg-cross. Full text and rfc822 format available.

Acknowledgement sent to NIIBE Yutaka <gniibe@fsij.org>:
New Bug report received and forwarded. Copy sent to David Schleef <ds@schleef.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: NIIBE Yutaka <gniibe@fsij.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: dpkg-cross: Merge dpkg-shlibdeps into dpkg
Date: Tue, 30 Nov 2004 18:24:32 +0900
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;



Information forwarded to debian-bugs-dist@lists.debian.org, David Schleef <ds@schleef.org>:
Bug#283626; Package dpkg-cross. Full text and rfc822 format available.

Acknowledgement sent to "Nikita V. Youshchenko" <yoush@cs.msu.su>:
Extra info received and forwarded to list. Copy sent to David Schleef <ds@schleef.org>. Full text and rfc822 format available.

Message #10 received at 283626@bugs.debian.org (full text, mbox):

From: "Nikita V. Youshchenko" <yoush@cs.msu.su>
To: NIIBE Yutaka <gniibe@fsij.org>, 283626@bugs.debian.org
Subject: Re: Bug#283626: dpkg-cross: Merge dpkg-shlibdeps into dpkg
Date: Tue, 30 Nov 2004 23:04:50 +0300
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> 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.

I know.
It is undocumented however, see 
http://lists.debian.org/debian-devel/2004/11/msg00943.html

I'll probably include same hack into dpkg-cross's dpkg-shlibdeps.

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

AFAIK the reason of dpkg-cross existance is that in past dpkg maintainers 
refused to include proper cross build support into dpkg.
Probably they have changed their mind since then ...

Maybe when multiarch comens to debian ...

But feel free to report this as a bug against dpkg-dev if you wish :).

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

iD8DBQFBrNJov3x5OskTLdsRAoXXAKDNsPottsnt3mqvMvoO/NKQTKA2WACeJ7nc
It4qzpXw8rcVV4qYckRAKOY=
=VIYB
-----END PGP SIGNATURE-----



Tags added: patch Request was from NIIBE Yutaka <gniibe@fsij.org> to control@bugs.debian.org. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Embedded Group <debian-embedded@lists.debian.org>:
Bug#283626; Package dpkg-cross. Full text and rfc822 format available.

Acknowledgement sent to Neil Williams <codehelp@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Embedded Group <debian-embedded@lists.debian.org>. Full text and rfc822 format available.

Message #17 received at 283626@bugs.debian.org (full text, mbox):

From: Neil Williams <codehelp@debian.org>
To: 283626@bugs.debian.org
Subject: now being implemented
Date: Sun, 26 Aug 2007 23:16:07 +0100
[Message part 1 (text/plain, inline)]
This change is now being implemented upstream as part of the dpkg-cross
rewrite for v2.0.0.

I'm removing the 'patch' tag because the patch in the report is now out
of date compared to the dpkg-dev version and because dpkg-cross v2.0.0
is to use binutils-multiarch support alongside changes within dpkg-dev.

-- 


Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/

[Message part 2 (application/pgp-signature, inline)]

Tags removed: patch Request was from Neil Williams <codehelp@debian.org> to control@bugs.debian.org. (Sun, 26 Aug 2007 22:18:02 GMT) Full text and rfc822 format available.

Tags added: pending Request was from Neil Williams <codehelp@debian.org> to control@bugs.debian.org. (Sun, 26 Aug 2007 22:18:03 GMT) Full text and rfc822 format available.

Blocking bugs of 283626 added: 439979 Request was from Neil Williams <codehelp@debian.org> to control@bugs.debian.org. (Tue, 28 Aug 2007 21:09:04 GMT) Full text and rfc822 format available.

Reply sent to Neil Williams <codehelp@debian.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to NIIBE Yutaka <gniibe@fsij.org>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #28 received at 283626-close@bugs.debian.org (full text, mbox):

From: Neil Williams <codehelp@debian.org>
To: 283626-close@bugs.debian.org
Subject: Bug#283626: fixed in dpkg-cross 2.0.0
Date: Mon, 08 Oct 2007 21:47:03 +0000
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-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 26 Nov 2007 07:27:07 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 16 19:35:29 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.