Debian Bug report logs - #876689
debhelper: descriptive error message discarded when -O option is passed via DH_OPTIONS (happens with override targets)

version graph

Package: debhelper; Maintainer for debhelper is Debhelper Maintainers <debhelper@packages.debian.org>; Source for debhelper is src:debhelper (PTS, buildd, popcon).

Reported by: Adrian Bunk <bunk@debian.org>

Date: Sun, 24 Sep 2017 21:39:02 UTC

Severity: serious

Found in version debhelper/10.9

Fixed in version debhelper/10.9.1

Done: Niels Thykier <niels@thykier.net>

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, Debhelper Maintainers <debhelper-devel@lists.alioth.debian.org>:
Bug#876689; Package debhelper. (Sun, 24 Sep 2017 21:39:04 GMT) (full text, mbox, link).


Acknowledgement sent to Adrian Bunk <bunk@debian.org>:
New Bug report received and forwarded. Copy sent to Debhelper Maintainers <debhelper-devel@lists.alioth.debian.org>. (Sun, 24 Sep 2017 21:39:04 GMT) (full text, mbox, link).


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

From: Adrian Bunk <bunk@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: dh_strip: deprecation warning masks message for error
Date: Mon, 25 Sep 2017 00:35:57 +0300
Package: debhelper
Version: 10.9
Severity: normal

https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/xorg-server.html

...
   debian/rules override_dh_strip
make[1]: Entering directory '/build/1st/xorg-server-1.19.3'
dh_strip -pxserver-xorg-core --dbgsym-migration="xserver-xorg-core-dbg (<< 2:1.19.0-3~)"
dh_strip -s -Nxserver-xorg-core -Nxserver-xorg-core-dbg
dh_strip: -s/--same-arch is deprecated; please use -a/--arch instead
dh_strip: This feature will be removed in compat 11.
dh_strip: unknown option or error during option parsing; aborting
debian/rules:297: recipe for target 'override_dh_strip' failed
make[1]: *** [override_dh_strip] Error 25


Two lines of message are printed for the deprecation.

Then follows the message that an error has occured,
but the message for the error is not printed
(xserver-xorg-core-dbg is a non-existing package).



Added tag(s) pending. Request was from Niels Thykier <niels@thykier.net> to control@bugs.debian.org. (Tue, 26 Sep 2017 18:33:10 GMT) (full text, mbox, link).


Changed Bug title to 'debhelper: descriptive error message discard when -O option is passed via DH_OPTIONS (e.g. via override targets)' from 'dh_strip: deprecation warning masks message for error'. Request was from Niels Thykier <niels@thykier.net> to control@bugs.debian.org. (Tue, 26 Sep 2017 18:33:13 GMT) (full text, mbox, link).


Changed Bug title to 'debhelper: descriptive error message discarded when -O option is passed via DH_OPTIONS (happens with override targets)' from 'debhelper: descriptive error message discard when -O option is passed via DH_OPTIONS (e.g. via override targets)'. Request was from Niels Thykier <niels@thykier.net> to control@bugs.debian.org. (Tue, 26 Sep 2017 18:39:07 GMT) (full text, mbox, link).


Severity set to 'serious' from 'normal' Request was from Niels Thykier <niels@thykier.net> to control@bugs.debian.org. (Tue, 26 Sep 2017 18:45:07 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Debhelper Maintainers <debhelper-devel@lists.alioth.debian.org>:
Bug#876689; Package debhelper. (Tue, 26 Sep 2017 19:15:02 GMT) (full text, mbox, link).


Acknowledgement sent to Niels Thykier <niels@thykier.net>:
Extra info received and forwarded to list. Copy sent to Debhelper Maintainers <debhelper-devel@lists.alioth.debian.org>. (Tue, 26 Sep 2017 19:15:02 GMT) (full text, mbox, link).


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

From: Niels Thykier <niels@thykier.net>
To: 876689@bugs.debian.org
Subject: Re: dh_strip: deprecation warning masks message for error
Date: Tue, 26 Sep 2017 18:53:00 +0000
This bug causes debhelper to discard the actual error message (i.e. the
actual reason why the options are invalid).

TL;DR:
  If your package fails due to debhelper 10.9, please check if you
  passed invalid/unknown package name to -p / --package or -N /
  --no-package.  This is the single most common reason for an error.


To understand when/why this bug triggers, there is an example below
based on a concrete error in the source package "webhook":
> dh binary --buildsystem=golang --with=golang --with systemd
>    dh_testroot -O--buildsystem=golang
>    [...]
>    dh_systemd_enable -O--buildsystem=golang
>    debian/rules override_dh_installinit
> make[1]: Entering directory '/build/1st/webhook-2.5.0'
> dh_systemd_enable -popenstack --name=openstack openstack.service
> dh_systemd_enable: unknown option or error during option parsing; aborting
> debian/rules:17: recipe for target 'override_dh_installinit' failed

The *actual* error message that is hidden here is that the "-popenstack"
option, because webhook does not built a binary package called "openstack".

To trigger this bug, several things must be present:

 * There must be an invalid option passed to a helper.  This is the
   -popenstack in the above example.

 * The helper must also receive a "-O<something>" option via DH_OPTIONS
   (or DH_INTERNAL_OPTIONS).  Often, this triggers via option passed to
   "dh", which adds it to DH_OPTIONS when invoking override targets.
   In the concrete example, this is "-O--buildsystem=golang".

To "undo" the bug and get the original error message, you can /often/
just unset DH_OPTIONS / DH_INTERNAL_OPTIONS and call the helper with the
shown options.

Thanks,
~Niels





Reply sent to Niels Thykier <niels@thykier.net>:
You have taken responsibility. (Tue, 10 Oct 2017 19:21:17 GMT) (full text, mbox, link).


Notification sent to Adrian Bunk <bunk@debian.org>:
Bug acknowledged by developer. (Tue, 10 Oct 2017 19:21:17 GMT) (full text, mbox, link).


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

From: Niels Thykier <niels@thykier.net>
To: 876689-close@bugs.debian.org
Subject: Bug#876689: fixed in debhelper 10.9.1
Date: Tue, 10 Oct 2017 19:19:09 +0000
Source: debhelper
Source-Version: 10.9.1

We believe that the bug you reported is fixed in the latest version of
debhelper, 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 876689@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Niels Thykier <niels@thykier.net> (supplier of updated debhelper 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: SHA256

Format: 1.8
Date: Tue, 10 Oct 2017 19:01:00 +0000
Source: debhelper
Binary: debhelper dh-systemd
Architecture: source
Version: 10.9.1
Distribution: unstable
Urgency: medium
Maintainer: Debhelper Maintainers <debhelper-devel@lists.alioth.debian.org>
Changed-By: Niels Thykier <niels@thykier.net>
Description:
 debhelper  - helper programs for debian/rules
 dh-systemd - debhelper add-on to handle systemd unit files - transitional pack
Closes: 764730 872745 876689 877357 877989
Changes:
 debhelper (10.9.1) unstable; urgency=medium
 .
   [ Niels Thykier ]
   * dh_builddeb: Add some missing error checks.
   * Dh_Lib.pm: Fix bug where debhelper could discard some error
     messages during parsing when -O options were passed via
     DH_OPTIONS (among other).  Thanks to Adrian Bunk and
     Andrew Shadura for reporting the issue.  (Closes: #876689)
   * Dh_Getopt.pm: Gracefully reduce the tool to a no-op when given
     a -p<pkg> and <pkg> is disabled by a Build-Profile.
   * debhelper.7: Document how package selections interact with
     Build-Profiles.  Thanks to Helmut Grohne for the report.
     (Closes: #872745)
   * dh_installdocs: Validate that the package passed to
     --doc-main-package are listed in debian/control.
   * dh_installexamples: Ditto.
   * dh_systemd_start: Regex escape two paths used in a regex.
   * Dh_Lib: Open compat 12.
   * dh_clean: Defer making -k an error until compat 12.
   * Dh_Getopt: Defer making -s an error until compat 12.
   * dh_installinit: Defer making --no-restart-on-upgrade an error
     until compat 12.
   * Dh_Lib: Defer making the "shell-spawning bug" in doit an error
     until compat 12.
   * dh_systemd_enable: Fix regression in debhelper/10.9 where
     template units would be installed as regular units (and
     possibly replace regular units).  (Closes: #877989)
   * dh_systemd_enable: Drop versioned dependency on
     init-system-helpers that is satisfied in oldstable.
   * Dh_Lib: Fix regression where --no-act would actually create
     maintscript snippets.
   * dh_systemd_*: If an unit file cannot be read (e.g. to check for
     the [Install] section), error out instead of emitting a warning
     and continuing.
   * t: Add tests for dh_systemd_* based on WIP tests from Felipe
     Sateler related to a new dh_installsystemd helper.
   * dh_systemd_enable: Properly quote unit names to preserve
     escaped names like "\x2d".  Thanks to Bernd Zeimetz for
     reporting the issue.  (Closes: #764730)
   * dh_systemd_start: Ditto.
   * meson.pm: Add prototype support for cross building by relying
     on /usr/share/meson/debcrossgen.  Note that this is currently
     not functional due to #875703.
   * debian/control: Bump Standards-Versions to 4.1.1 - No changes
     required.
 .
   [ Dmitry Shachnev ]
   * qmake.pm: Add basic cross-building support.  (Closes: #877357)
Checksums-Sha1:
 4ac3c521d516ab09b92dd402094ff5ed1bfd7fdd 1768 debhelper_10.9.1.dsc
 4e6f191eb2b4c089a94332202ffc1c18d9ecd0e6 423464 debhelper_10.9.1.tar.xz
 d55ce31881163452898f12c0b67b75ea1f50f8f1 4477 debhelper_10.9.1_source.buildinfo
Checksums-Sha256:
 7ffaed0f4b2080e88c0fbbd50a6fbba8150b4a8abc2cd7f3d1c58e3d6be3bb13 1768 debhelper_10.9.1.dsc
 62d44d209b11806358a04ac977913b33d60da69f5cb48b150ab4ccbd30e9f6af 423464 debhelper_10.9.1.tar.xz
 47a95313c2f2f1b38037a4091d58d206b90064ba82965f91a9b5a1133319deea 4477 debhelper_10.9.1_source.buildinfo
Files:
 8f4cfca8e495d8fc625bbcfbf110583a 1768 devel optional debhelper_10.9.1.dsc
 e9f235eac4ac7515f7673b4728582b61 423464 devel optional debhelper_10.9.1.tar.xz
 fb2edcf485f1eeeb7745ace305f748fe 4477 devel optional debhelper_10.9.1_source.buildinfo

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

iQIzBAEBCAAdFiEEsxMaRR2/33ygW0GXBUu7n32AZEIFAlndGZIACgkQBUu7n32A
ZEJOxw/8DXfwMzrFpgRfjUMzHVWfBGEvRDPF/xzUO8yXc6FyWP6yCua7S4D2f/mD
bzrDbxDUaSLMmnYkxd3KPv/aQU+Q9P2aC7RSW+p2Mgil4vw6oLdtfn/DBPrXvIaI
z+OqdbRGkNmF/oEeFJ16DEsjrPLEP+d/aoIBcruYJcYw54h9KXxjJSxry4ut1zjO
dOrQQMMvnXEJzdBBNbJd7XlIRPkoiA4QADLmHuWAOOLIgjuX3bl7HplD5f6jgnvx
s9uKPrAPILPQ092JOc5/6wYg6H1180mC9QGr/HshZ6zYPY4rf6nSqyPG1A7VFx1f
9dPJbzThBFqp3It4qCF128ovPzCNzVoEqdGV9evwc0ECsFjn4LK9xTPxlVNlbfpP
/E52Nt6REAlkdrIswQ5Ul5+XqAL4+8QBeKlF7XI5lWOr1z/WlqxkZddzQvMDdl+R
GsY/1Mf8MB/WaMaNE/KAWEsCHjIwBl8G0j+03HSlPf0OCXmI14RgTWjcLwHlt2j3
297XUw1AR7OGPq+IuisyH6BXIlJlooURSCEVByFCVINbJEEp5xqKI7xbgGHXGEsC
iudb3uDocdJxk7AVL+13wE4N30mMsuvfc2X0GBkci6VF64X0BuOjiV12xEQ+syCR
8fPEGWCZJ9pRrT/h/4mCgJe74a5i/WnxM8ZKa/avKhshcwabW0M=
=E/lG
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Wed, 08 Nov 2017 07:30:04 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: Sat Jan 13 14:47:54 2024; 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.