Debian Bug report logs - #849944
dpkg-genbuildinfo: Can't use an undefined value as an ARRAY reference

version graph

Package: dpkg-dev; Maintainer for dpkg-dev is Dpkg Developers <debian-dpkg@lists.debian.org>; Source for dpkg-dev is src:dpkg (PTS, buildd, popcon).

Reported by: Botond Botyanszki <debian-bugs@siliconium.net>

Date: Mon, 2 Jan 2017 14:33:02 UTC

Severity: normal

Found in version dpkg/1.18.18

Fixed in version dpkg/1.18.23

Done: Guillem Jover <guillem@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, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#849944; Package dpkg-dev. (Mon, 02 Jan 2017 14:33:05 GMT) (full text, mbox, link).


Acknowledgement sent to Botond Botyanszki <debian-bugs@siliconium.net>:
New Bug report received and forwarded. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Mon, 02 Jan 2017 14:33:05 GMT) (full text, mbox, link).


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

From: Botond Botyanszki <debian-bugs@siliconium.net>
To: submit@bugs.debian.org
Subject: dpkg-genbuildinfo: Can't use an undefined value as an ARRAY reference
Date: Mon, 2 Jan 2017 14:53:07 +0100
Package: dpkg-dev
Version: 1.18.18
Severity: normal

Some recent changes in dpkg-dev are causing a regression building a deb package.
The error I get is as follows:

dpkg-deb: building package 'xxxxx' in '../xxxxx.deb'.
 dpkg-genbuildinfo --build=binary
Can't use an undefined value as an ARRAY reference at /usr/bin/dpkg-genbuildinfo line 212.
dpkg-buildpackage: error: dpkg-genbuildinfo --build=binary gave error exit status 255

The package builds fine on wheezy and jessie, only stretch is affected.
I see that dpkg-genbuildinfo is new code which was not available before.



Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#849944; Package dpkg-dev. (Wed, 25 Jan 2017 12:51:02 GMT) (full text, mbox, link).


Acknowledgement sent to Johannes Schauer <josch@debian.org>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Wed, 25 Jan 2017 12:51:02 GMT) (full text, mbox, link).


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

From: Johannes Schauer <josch@debian.org>
To: 849944@bugs.debian.org
Subject: Re: dpkg-genbuildinfo: Can't use an undefined value as an ARRAY reference
Date: Wed, 25 Jan 2017 13:48:15 +0100
[Message part 1 (text/plain, inline)]
Hi,

On Mon, 2 Jan 2017 14:53:07 +0100 Botond Botyanszki <debian-bugs@siliconium.net> wrote:
> Some recent changes in dpkg-dev are causing a regression building a deb
> package.  The error I get is as follows:
> 
> dpkg-deb: building package 'xxxxx' in '../xxxxx.deb'.
>  dpkg-genbuildinfo --build=binary
> Can't use an undefined value as an ARRAY reference at /usr/bin/dpkg-genbuildinfo line 212.
> dpkg-buildpackage: error: dpkg-genbuildinfo --build=binary gave error exit status 255
> 
> The package builds fine on wheezy and jessie, only stretch is affected.  I
> see that dpkg-genbuildinfo is new code which was not available before.

based on guillem's testcase, I reduced the problem to the following:

Build-Depends: genbuildinfo-archqual-bug:i386

Package: genbuildinfo-archqual-bug
Version: 1.equivs-dummy
Depends: genbuildinfo-archqual-bug-virtual
Architecture: i386

Package: genbuildinfo-archqual-bug-provider
Version: 1.equivs-dummy
Provides: genbuildinfo-archqual-bug-virtual
Architecture: i386

I build the latter two packages via equivs.

My native architecture is amd64. The bug is *not* triggered if the packages are
amd64 or if the source package directly depends on the virtual one.

cheers, josch
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#849944; Package dpkg-dev. (Sat, 25 Feb 2017 15:45:06 GMT) (full text, mbox, link).


Acknowledgement sent to Holger Levsen <holger@layer-acht.org>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Sat, 25 Feb 2017 15:45:06 GMT) (full text, mbox, link).


Message #15 received at 849944@bugs.debian.org (full text, mbox, reply):

From: Holger Levsen <holger@layer-acht.org>
To: Johannes Schauer <josch@debian.org>, 849944@bugs.debian.org
Subject: Re: Bug#849944: dpkg-genbuildinfo: Can't use an undefined value as an ARRAY reference
Date: Sat, 25 Feb 2017 15:40:23 +0000
[Message part 1 (text/plain, inline)]
Hi,

On Wed, Jan 25, 2017 at 01:48:15PM +0100, Johannes Schauer wrote:
> On Mon, 2 Jan 2017 14:53:07 +0100 Botond Botyanszki <debian-bugs@siliconium.net> wrote:
> > Some recent changes in dpkg-dev are causing a regression building a deb
> > package.  The error I get is as follows:
> > 
> > dpkg-deb: building package 'xxxxx' in '../xxxxx.deb'.
> >  dpkg-genbuildinfo --build=binary
> > Can't use an undefined value as an ARRAY reference at /usr/bin/dpkg-genbuildinfo line 212.
> > dpkg-buildpackage: error: dpkg-genbuildinfo --build=binary gave error exit status 255
> > 
> > The package builds fine on wheezy and jessie, only stretch is affected.  I
> > see that dpkg-genbuildinfo is new code which was not available before.
> 
> based on guillem's testcase, I reduced the problem to the following:

I might be missing some context here, just from reading #849944 I'm not sure
what you're talking about :(

I have however noticed that downstreams are affected by this bug, see 
https://github.com/QubesOS/qubes-issues/issues/2631 - so further comments
would really be nice…


-- 
cheers,
	Holger
[signature.asc (application/pgp-signature, inline)]

Message sent on to Botond Botyanszki <debian-bugs@siliconium.net>:
Bug#849944. (Sun, 26 Feb 2017 22:51:08 GMT) (full text, mbox, link).


Message #18 received at 849944-submitter@bugs.debian.org (full text, mbox, reply):

From: Guillem Jover <guillem@debian.org>
To: 849944-submitter@bugs.debian.org
Subject: Bug#849944 in package dpkg marked as pending
Date: Sun, 26 Feb 2017 22:50:11 +0000
Control: tag 849944 pending

Hi!

Bug #849944 in package dpkg reported by you has been fixed in
the dpkg/dpkg.git Git repository. You can see the changelog below, and
you can check the diff of the fix at:

    https://anonscm.debian.org/cgit/dpkg/dpkg.git/diff/?id=896a740

---
commit 896a740cfe9f774bf266b1f94027a91a1072a12e
Author: Guillem Jover <guillem@debian.org>
Date:   Mon Feb 6 03:12:37 2017 +0100

    dpkg-genbuildinfo: Handle unmatched virtual arch-qualified packages
    
    The dependency traversal code is currently broken, and this mostly
    papers over the issue. Properly fixing this involves changes all over
    the place, which would be too intrusive for this series.
    
    We should handle this gracefully, instead of letting perl die.
    
    Closes: #849944

diff --git a/debian/changelog b/debian/changelog
index bef1f1d..087e380 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,7 @@
 dpkg (1.18.23) UNRELEASED; urgency=medium
 
+  * Handle unmatched arch-qualified virtual packages in dpkg-genbuildinfo,
+    instead of letting perl die. Closes: #849944
   * Documentation:
     - Clarify the requirements for deb-conffile(5) pathnames. Closes: #854417
       Proposed by Dieter Adriaenssens <dieter.adriaenssens@gmail.com>.



Added tag(s) pending. Request was from Guillem Jover <guillem@debian.org> to 849944-submitter@bugs.debian.org. (Sun, 26 Feb 2017 22:51:08 GMT) (full text, mbox, link).


Reply sent to Guillem Jover <guillem@debian.org>:
You have taken responsibility. (Mon, 06 Mar 2017 06:21:10 GMT) (full text, mbox, link).


Notification sent to Botond Botyanszki <debian-bugs@siliconium.net>:
Bug acknowledged by developer. (Mon, 06 Mar 2017 06:21:10 GMT) (full text, mbox, link).


Message #25 received at 849944-close@bugs.debian.org (full text, mbox, reply):

From: Guillem Jover <guillem@debian.org>
To: 849944-close@bugs.debian.org
Subject: Bug#849944: fixed in dpkg 1.18.23
Date: Mon, 06 Mar 2017 06:18:56 +0000
Source: dpkg
Source-Version: 1.18.23

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

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 849944@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Guillem Jover <guillem@debian.org> (supplier of updated dpkg 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@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Mon, 06 Mar 2017 05:41:11 +0100
Source: dpkg
Binary: dpkg libdpkg-dev dpkg-dev libdpkg-perl dselect
Architecture: source
Version: 1.18.23
Distribution: unstable
Urgency: medium
Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
Changed-By: Guillem Jover <guillem@debian.org>
Description:
 dpkg       - Debian package management system
 dpkg-dev   - Debian package development tools
 dselect    - Debian package management front-end
 libdpkg-dev - Debian package management static library
 libdpkg-perl - Dpkg perl modules
Closes: 845550 848129 849944 854417 854536 855450 856325 856326
Changes:
 dpkg (1.18.23) unstable; urgency=medium
 .
   * Handle unmatched arch-qualified virtual packages in dpkg-genbuildinfo,
     instead of letting perl die. Closes: #849944
   * Declare .buildinfo format as stable with version 1.0.
   * Do not depend on cxxabi.h to have declared __cxa_pure_virtual, use
     the same “__cxxabiv1” namespace as specified in the C++ ABI, instead
     of using the “abi” alias intended for use by userland.
     Thanks to Jörg Sonnenberger <joerg@netbsd.org>.
   * Add a comment on any C code switch case that falls through. Fixes new
     gcc-7 warnings.
   * Use snprintf() instead of sprintf() in libdpkg when constructing the ar
     member header, as we might overflow depending on the input data.
   * Portability:
     - Do not redeclare sys_siglist in libcompat when the system does so.
       Thanks to Thomas Klausner <wiz@NetBSD.org>.
     - Rename err variable to ret in start-stop-daemon as the former is a
       function on BSDs.
     - Use 5-argument kvm_getprocs() call form on OpenBSD in start-stop-daemon.
     - Use correct struct kinfo_proc ruid submember name on NetBSD in
       start-stop-daemon.
     - Define _KMEMUSER for NetBSD to get declarations for various
       struct kinfo_proc members in start-stop-daemon.
   * Perl modules:
     - Do not special case EM_SPARC32PLUS for NetBSD in Dpkg::Shlibs::Objdump,
       the code has been fixed in NetBSD as that situation could not happen.
     - Fix read() error handling in Dpkg::Shlibs::Objdump::get_format() to
       gracefully ignore non-ELF files again. Closes: #854536
     - Emit an explicit warning from Dpkg::Shlibs::Objdump::Object::analyze()
       for unknown executable formats instead of relying on objdump doing so.
     - Do not parse bogus ELF binaries in Dpkg::Shlibs::Objdump::get_format().
       Reported by Niels Thykier <niels@thykier.net>.
     - Add ‘.mnt-ignore’ to the default ignore lists in Dpkg::Source::Package,
       as we were already ignoring the ‘_MTN’ pathnames. Closes: #855450
       Thanks to Nicolas Boulenguez <nicolas@debian.org>.
     - Mark kfreebsd-amd64, kfreebsd-i386, sparc and sparc64 architectures as
       having gcc builtin PIE in Dpkg::Vendor::Debian.
     - Switch PIE handling in Dpkg::Vendor::Debian to have no default (!) and
       delegate the setting to gcc or an explicit request by a user. This is
       needed to cope with the general PIE brokenness situation in Debian, and
       the current specific brokenness of a Debian gcc patch mangling the dpkg
       build flags. Closes: #848129, #845550
   * Documentation:
     - Clarify the requirements for deb-conffile(5) pathnames. Closes: #854417
       Proposed by Dieter Adriaenssens <dieter.adriaenssens@gmail.com>.
     - Document dpkg-source --before-build and --after-build in --help output.
     - Document dpkg-buildpackage --ignore-builtin-builddeps in --help output.
   * Build system:
     - Check <sys/proc.h> by also including <sys/param.h>, on several BSD
       systems the header is not self-contained.
     - Handle libmd implementations built into system libc, as found on some
       BSD systems.
     - Do not fail on missing compression libraries or headers on automatic
       detection mode. Regression introduced in dpkg 1.18.14.
   * Test suite:
     - Use the detected perl interpreter instead of a random one from PATH.
 .
   [ Updated programs translations ]
   * Dutch (Frans Spiesschaert). Closes: #856325
 .
   [ Updated scripts translations ]
   * German (Helge Kreutzmann).
 .
   [ Updated man pages translations ]
   * Dutch (Frans Spiesschaer). Closes: #856326
Checksums-Sha1:
 687fc2cc5d75609d3f9c64dd6d1271a274e8824c 2032 dpkg_1.18.23.dsc
 a090c0003d27bd467b9d4e683f2fa634f88d9486 4516252 dpkg_1.18.23.tar.xz
 bea5fcdd1181b693cc1d87776a56b61d04ce02b6 7344 dpkg_1.18.23_amd64.buildinfo
Checksums-Sha256:
 5e2fe064fb36d95d6459d2e117df9b54618df5e58925db117b5dd0c74cba2ec4 2032 dpkg_1.18.23.dsc
 cc08802a0cea2ccd0c10716bc71531ff9b9234dd454b83a59f71117a37f36923 4516252 dpkg_1.18.23.tar.xz
 267c599bef3a28f84247a438449a633a2b24200f3e506586a734f18c17375270 7344 dpkg_1.18.23_amd64.buildinfo
Files:
 7d31b1e07896d2464f4c970d2e839010 2032 admin required dpkg_1.18.23.dsc
 2195338c1792b0678575309a099d2da8 4516252 admin required dpkg_1.18.23.tar.xz
 c5479e155ee1e00b98f815e38dfee410 7344 admin required dpkg_1.18.23_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEETz509DYFDBD1aWV0uXK/PqSuV6MFAli8+MEACgkQuXK/PqSu
V6PJjxAAnQXT2CNiFg1U0Lizr+PfwlT24BMi1Za/J4zAIIjNe3CrP1z1dZpW33Ci
hG5HbacX9Ny7W0MoiaX91jg7oLel0ofYelGflXEO9ixod6EhqqMwb4WR0a0UIArj
XX6sjhVE2L8cOjceODbKF+xerAv5kQW0kjGxgVXhQlvOcl7Ncdpgw0Us9lswVM4m
RPsUm3V9imcJdMaxbYdsZHHs61NESLVpMWnndZzcbc5GWss8Gl6yAkY/cqfYqCi7
goFU8nxpyaKdmbGxM6+T0RBujuJI3oLR4S1COMs6CHCCtGmO6LIWSyAd5GbODd+5
HNrutqqTgKMhtWVIj69MfZzMBOSWQOmB8FiaXAUrEyGE4bOg8PDsGtiOtf4TBgtn
0x6pSRRLLbDiljmw108BSevLZ0R87E5fmtIX7ybFmdb18HVaBv5L7ETRNy1tgjXy
zPS15lun/yDHbRc30WJ862fS6k3UA/ZpGg+qoxWreqMIp13tSqfgDFkki/1fAjkJ
Zti0lG41pR6wCX/VaL3Sa9ZnKMsmqZoUngu1DAXFXqVQGnmRZRKAtegPGEGHsK+J
Xqpz4r/TleUMmB8JfN50Aify7glKgqphjWLoM5CVgOD7SaLD3SOBH9ePRUz51KNr
bHKVwJTtjP0jrM7WOGYIw6sjxdpTJQiUWBoOmgletcygmI092lE=
=nkIW
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 09 Apr 2017 07:27:56 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Jul 27 04:46:58 2018; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.