Debian Bug report logs - #565295
dpkg-cross: dependency_libs mangling fails to handle quoting

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: Colin Watson <cjwatson@ubuntu.com>

Date: Thu, 14 Jan 2010 16:30:02 UTC

Severity: normal

Tags: patch

Found in version dpkg-cross/2.5.3

Fixed in version dpkg-cross/2.5.5

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, Debian Embedded Group <debian-embedded@lists.debian.org>:
Bug#565295; Package dpkg-cross. (Thu, 14 Jan 2010 16:30:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Colin Watson <cjwatson@ubuntu.com>:
New Bug report received and forwarded. Copy sent to Debian Embedded Group <debian-embedded@lists.debian.org>. (Thu, 14 Jan 2010 16:30:05 GMT) Full text and rfc822 format available.

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

From: Colin Watson <cjwatson@ubuntu.com>
To: submit@bugs.debian.org
Subject: dpkg-cross: dependency_libs mangling fails to handle quoting
Date: Thu, 14 Jan 2010 16:29:14 +0000
[Message part 1 (text/plain, inline)]
Package: dpkg-cross
Version: 2.5.3
Severity: normal
Tags: patch
User: ubuntu-devel@lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch lucid

dpkg-cross mishandles the dependency_libs lines in many .la files.
Attached are two examples.

libusb:

  in:   dependency_libs=' -L/usr/arm-linux-gnueabi/lib'
  out:  dependency_libs='
  want: dependency_libs=''

libanthy:

  in:   dependency_libs=' -lm /usr/lib/libanthydic.la'
  out:  dependency_libs=' -lm /usr/lib/libanthydic.la'
  want: dependency_libs=' -lm /usr/arm-linux-gnueabi/lib/libanthydic.la'

This is no doubt another cause of a number of problems such as
http://lists.debian.org/debian-devel/2007/12/msg00416.html.  I spent
quite a bit of time scratching my head over this before realising that
dpkg-cross wasn't behaving as it's clearly intended to behave ...

Here's a patch to correct this.

=== modified file 'dpkg-cross'
--- dpkg-cross	2010-01-07 23:47:08 +0000
+++ dpkg-cross	2010-01-14 16:20:48 +0000
@@ -664,10 +664,11 @@ sub sub_build {
 		while (<FROM>) {
 			if (/^libdir=/) {
 				print TO "libdir=\'$crosslib\'\n";
-			} elsif (/^dependency_libs=/) {
-				s/( )?-L\S+//g;
-				s:\S+/([\w\.\-]+\.la)$:$crosslib/$1:g;
-				print TO;
+			} elsif (/^dependency_libs='(.*)'$/ or /^dependency_libs=(.*)/) {
+				my $deplibs = $1;
+				$deplibs =~ s/( )?-L\S+//g;
+				$deplibs =~ s:\S+/([\w\.\-]+\.la)$:$crosslib/$1:g;
+				print TO "dependency_libs='$deplibs'\n";
 			} else {
 				print TO;
 			}

Thanks,

-- 
Colin Watson                                       [cjwatson@ubuntu.com]
[libusb.la (text/plain, attachment)]
[libanthy.la (text/plain, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Embedded Group <debian-embedded@lists.debian.org>:
Bug#565295; Package dpkg-cross. (Thu, 14 Jan 2010 16:42:08 GMT) Full text and rfc822 format available.

Acknowledgement sent to Colin Watson <cjwatson@ubuntu.com>:
Extra info received and forwarded to list. Copy sent to Debian Embedded Group <debian-embedded@lists.debian.org>. (Thu, 14 Jan 2010 16:42:08 GMT) Full text and rfc822 format available.

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

From: Colin Watson <cjwatson@ubuntu.com>
To: 565295@bugs.debian.org
Subject: Re: Bug#565295: Acknowledgement (dpkg-cross: dependency_libs mangling fails to handle quoting)
Date: Thu, 14 Jan 2010 16:40:12 +0000
Here's a slightly better patch.  This also corrects the fact that only
the last instance of .la in dependency_libs was substituted, rather than
all of them.

=== modified file 'dpkg-cross'
--- dpkg-cross	2010-01-07 23:47:08 +0000
+++ dpkg-cross	2010-01-14 16:36:16 +0000
@@ -664,10 +664,11 @@ sub sub_build {
 		while (<FROM>) {
 			if (/^libdir=/) {
 				print TO "libdir=\'$crosslib\'\n";
-			} elsif (/^dependency_libs=/) {
-				s/( )?-L\S+//g;
-				s:\S+/([\w\.\-]+\.la)$:$crosslib/$1:g;
-				print TO;
+			} elsif (/^dependency_libs='(.*)'$/ or /^dependency_libs=(.*)/) {
+				my $deplibs = $1;
+				$deplibs =~ s/( )?-L\S+//g;
+				$deplibs =~ s:\S+/([\w\.\-]+\.la)( |$):$crosslib/$1$2:g;
+				print TO "dependency_libs='$deplibs'\n";
 			} else {
 				print TO;
 			}

Thanks,

-- 
Colin Watson                                       [cjwatson@ubuntu.com]




Added tag(s) pending. Request was from Neil Williams <codehelp@debian.org> to control@bugs.debian.org. (Sun, 17 Jan 2010 14:42:11 GMT) Full text and rfc822 format available.

Reply sent to Neil Williams <codehelp@debian.org>:
You have taken responsibility. (Wed, 20 Jan 2010 17:36:21 GMT) Full text and rfc822 format available.

Notification sent to Colin Watson <cjwatson@ubuntu.com>:
Bug acknowledged by developer. (Wed, 20 Jan 2010 17:36:21 GMT) Full text and rfc822 format available.

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

From: Neil Williams <codehelp@debian.org>
To: 565295-close@bugs.debian.org
Subject: Bug#565295: fixed in dpkg-cross 2.5.5
Date: Wed, 20 Jan 2010 17:34:00 +0000
Source: dpkg-cross
Source-Version: 2.5.5

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.5.5.dsc
  to main/d/dpkg-cross/dpkg-cross_2.5.5.dsc
dpkg-cross_2.5.5.tar.gz
  to main/d/dpkg-cross/dpkg-cross_2.5.5.tar.gz
dpkg-cross_2.5.5_all.deb
  to main/d/dpkg-cross/dpkg-cross_2.5.5_all.deb
libdebian-dpkgcross-perl_2.5.5_all.deb
  to main/d/dpkg-cross/libdebian-dpkgcross-perl_2.5.5_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 565295@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.8
Date: Wed, 20 Jan 2010 12:25:44 +0000
Source: dpkg-cross
Binary: dpkg-cross libdebian-dpkgcross-perl
Architecture: source all
Version: 2.5.5
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: 565295
Changes: 
 dpkg-cross (2.5.5) unstable; urgency=low
 .
   * Ensure dependency_libs can handle quoting (Closes: #565295)
   * Add preliminary support for multiarch packages.
   * Incorporate some Ubuntu changes (thanks to Colin Watson) for parted
     and tcl support.
Checksums-Sha1: 
 fcd3092ed29bfd6a1f246337ad941bc5b69bd302 1209 dpkg-cross_2.5.5.dsc
 f2697e0c5381ac1efa7cf513c9faa379c3cf1bcf 71964 dpkg-cross_2.5.5.tar.gz
 71fb27e8248e75dbac629568ce58010d45a1357f 52432 dpkg-cross_2.5.5_all.deb
 37f96826cc4fb1d03b9e4e58f33b69ad0db739c3 28768 libdebian-dpkgcross-perl_2.5.5_all.deb
Checksums-Sha256: 
 7fb1001da044acd295029e0a685751de38cb1347078a27f28b3d920573d66187 1209 dpkg-cross_2.5.5.dsc
 9111f34acc6d1301e4050bdfffb07f04786ca1fecb9e1ef5a72428bb80b00ec9 71964 dpkg-cross_2.5.5.tar.gz
 829d883f7edd5848cef8399960c9ce4c687f6b560f523f7edd41458b359cbac9 52432 dpkg-cross_2.5.5_all.deb
 c1a9e6192a46a39a1d1722028d0b27ab04608a6b880bc179762c0291ecdfb8ce 28768 libdebian-dpkgcross-perl_2.5.5_all.deb
Files: 
 ce6276662e4674e696e0ca4a7e13df43 1209 utils extra dpkg-cross_2.5.5.dsc
 c602cf4a3c525a15dc9ec63e172374a6 71964 utils extra dpkg-cross_2.5.5.tar.gz
 039c218fa650e7845144836bba8f140f 52432 utils extra dpkg-cross_2.5.5_all.deb
 2e24ee9a1299336402c5a4828d878270 28768 perl extra libdebian-dpkgcross-perl_2.5.5_all.deb

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

iEYEARECAAYFAktXOcsACgkQiAEJSii8s+MHTQCeIo2nlu74ed8mPcPiyN7MmTG5
KhgAoIzPMawCoJV6XhUvnrV7zaGOFSEG
=EeR/
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 28 Feb 2010 07:49:49 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: Sat Apr 19 05:59:40 2014; Machine Name: buxtehude.debian.org

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