Your message dated Sun, 08 Mar 2020 03:19:29 +0000
with message-id <e1jamtr-0006dg...@fasolo.debian.org>
and subject line Bug#948291: fixed in dpkg 1.20.0
has caused the Debian Bug report #948291,
regarding dpkg-buildpackage: please support --hook-foo=bar=baz
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 this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)
--
948291: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=948291
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: dpkg-dev
Version: 1.19.7
Severity: normal
Tags: patch
Dear Maintainer,
[tl;dr: dpkg-buildpackage --hook-init=foo=bar errors out; patch attached.]
* What led up to the situation?
I was trying to build a package in a chroot and inject some additional
flags into CFLAGS.
* What exactly did you do (or not do) that was effective (or
ineffective)?
I read the pdebuild(1) and dpkg-buildflags(1) manual pages and ran the
following command:
% pdebuild -- --debbuildopts "--hook-init='echo APPEND CFLAGS -std=c89 >
/etc/dpkg/buildflags.conf'"
* What was the outcome of this action?
[[[
I: Building the package
I: Running cd /build/zsh-syntax-highlighting-0.6.0/ && env
PATH="/usr/sbin:/usr/bin:/sbin:/bin" HOME="/nonexistent" dpkg-buildpackage -us
-uc --source-option=--extend-diff-ignore=^tags$ --hook-init='echo APPEND CFLAGS
-std=c89 > /etc/dpkg/buildflags.conf' -rfakeroot
dpkg-buildpackage: error: unknown hook name init=echo APPEND CFLAGS -std
]]]
(zsh-syntax-highlighting is just a random package that doesn't have any
source files in C; the error should be repeatable with any package.)
* What outcome did you expect instead?
I expected the string «--hook-init='echo APPEND CFLAGS -std=c89 >
/etc/dpkg/buildflags.conf'»
in argv to be taken as creating an «init» hook whose value is the shell
command «echo APPEND CFLAGS -std=c89 > /etc/dpkg/buildflags.conf».
I believe the following patch (against current git) should do the trick:
[[[
diff --git a/scripts/dpkg-buildpackage.pl b/scripts/dpkg-buildpackage.pl
index 2c49738b5..1332ca716 100755
--- a/scripts/dpkg-buildpackage.pl
+++ b/scripts/dpkg-buildpackage.pl
@@ -238,7 +238,7 @@ while (@ARGV) {
$check_command = $1;
} elsif (/^--check-option=(.*)$/) {
push @check_opts, $1;
- } elsif (/^--hook-(.+)=(.*)$/) {
+ } elsif (/^--hook-(.+?)=(.*)$/) {
my ($hook_name, $hook_cmd) = ($1, $2);
usageerr(g_('unknown hook name %s'), $hook_name)
if not exists $hook{$hook_name};
]]]
Cheers,
Daniel
--- End Message ---
--- Begin Message ---
Source: dpkg
Source-Version: 1.20.0
Done: Guillem Jover <guil...@debian.org>
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 948...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Guillem Jover <guil...@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 ftpmas...@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Sun, 08 Mar 2020 03:31:40 +0100
Source: dpkg
Architecture: source
Version: 1.20.0
Distribution: experimental
Urgency: medium
Maintainer: Dpkg Developers <debian-d...@lists.debian.org>
Changed-By: Guillem Jover <guil...@debian.org>
Closes: 43573 343578 637060 647911 843776 900071 920878 923475 926472 926669
927752 930317 931135 932841 932967 933152 934980 935695 939516 939969 942195
945776 946780 948291 951614
Changes:
dpkg (1.20.0) experimental; urgency=medium
.
[ Guillem Jover ]
* libdpkg: Do not generate a backup file for the available database.
Closes: #343578
* perl: Switch Getopt::Long from bundling to bundling_values. This means
the few scripts using Getopt::Long will stop accepting options in the
form «-ab» for «-a -b», which is not future-proof, as it does not allow
these options to get new arguments without making them abiguous.
* dpkg-buildpackage: Remove transient backwards R³ compatibility code.
* buildtools.mk: Add support for nostrip in DEB_BUILD_OPTIONS when setting
the STRIP variable.
* dpkg-genbuildinfo: Do not include irrelevant packages in the Binary field.
* dpkg: Do not clear selections for unknown packages. Closes: #927752
* dpkg-shlibdeps: Add support for new Build-Depends-Packages, to be able
to specify multiple packages. Closes: #926669
Based on a patch by Frank Schaefer <kelle...@gmail.com>.
* perl: Remove support for versioned GnuPG 2 program and packages.
* libdpkg: Clarify lock contender error message. Print the PID of the lock
contender, and add a warning explaining that removing the lock file is
never the correct solution.
* dpkg-genchanges, dpkg-mergechangelogs: Remove support for ~vola
versioning, as volatile.debian.org was decommissioned some time ago.
* dpkg-genchanges, dpkg-mergechangelogs: Match ~deb also as a backport
marker in versions. Closes: #934980
* libdpkg, dpkg: Use new versiondescribe_c() for non-localizable call sites,
such as when writing to a log, which should not be localized.
Reported by Julien Cristau <jcris...@debian.org>.
* dpkg-query: Try to use the package synopsis from the available file if
not installed. Closes: #43573
* dpkg-gencontrol: Take into account hardlinks when computing the
Installed-Size substvar. Closes: #923475
Patch co-authored with Sven Joachim <svenj...@gmx.de>.
* dpkg: Fix and clarify behavior for packages marked to be on “hold”. These
need to be processed for configuration and triggers. Closes: #926472
* dpkg: Use DPKG_ADMINDIR to set the admindir. Closes: #900071
* dpkg-source: Remove backwards compatibility code for legacy build-profiles.
* perl: Give more context on field parsing errors. Closes: #637060
* dpkg-buildpackage: Add option to sanitize environment. Closes: #843776
* update-alternatives: Cope with a missing administrative directory.
* update-alternatives: Create the administrative directory on demand.
* dpkg-split: Cope with a missing parts/ database directory.
* dpkg-split: Create the parts/ database directory on demand.
* libdpkg: Consider msdbrw_needsuperuser equivalent to msdbrw_write, so
the same checks are performed on normal non --force-not-root operation.
* libdpkg: Add support for bootstrapping the installation of dpkg:
- Create the logfile with correct permissions, and remove the code
setting up the logfile from the dpkg postinst.
- Allow missing status and available databases, so that they get created
on write, and remove the code setting them up from the dpkg postinst.
Closes: #647911
- Do not change the ownership of the triggers database directory. Either
we are running as root:root which means the ownership should be correct
already, or we are not which means we cannot change it anyway.
- Create the dpkg database directory on demand.
- Create the updates/ database directory on demand.
- Create the info/ database directory on demand.
* dpkg-architecture: Fix handling of exec failing in --command.
Reported by Helmut Grohne <hel...@subdivi.de>.
* dpkg-buildpackage: Do not accept equal signs as part of the hook names.
Reported by Daniel Shahaf <danie...@apache.org>. Closes: #948291
* dselect: Mark a string for translation.
* dselect: Cleanup access methods:
- Remove harddisk methods, as they were non-functional due to fdisk
interface changes, and do not make sense anymore as we can expect users
to mount any such filesystem on their own, to then use a filesystem
method instead. Prompted by Helmut Grohne <hel...@subdivi.de>.
- Remove cdrom method superseded by the multi_cd method.
- Remove nfs methods, as there is nothing special about NFS, and mounting
these should just be left to the local admin, who can mount any other
remote filesystem too.
- Remove multi_mount method, as the multi_cd method can take care of
mounting the necessary images or devices.
- Replace changelog with correct copyright in file header.
* dpkg, dselect: Stop using first-person singular in output messages.
* libdpkg: Fix memory leak in parsedb context close.
* buildtools.mk: Add QMAKE variable. Closes: #920878
* po: Fix translation of --compare-versions. Closes: #951614
Thanks to Boyuan Yang <by...@debian.org>.
* Perl modules:
- Dpkg::Source::Package: Verify original tarball signatures at build time.
- Dpkg::BuildFlags: Add new unset() method.
Requested by Daniel Schepler <dschep...@gmail.com>.
- Dpkg::Source::Package::V2: Emit a special patch header on
single-debian-patch. Closes: #933152
- Dpkg::Vendor::Debian: Only scan /usr/local/ directories that exist.
Closes: #932967
- Dpkg::Vendor::Debian: Do not set -Werror=implicit-function-declaration
for C++. Closes: #939969
- Dpkg::Deps: Check for valid virtual package version relations. Do not
allow non-equal version relations in virtual provides. Closes: #930317
- Dpkg: Remove internal lowercase variables $version, $progname,
$admindir, $dpkglibdir and $pkgdatadir.
- Dpkg::Changelog: Remove obsolete methods dpkg() and rfc822().
- Dpkg::Changelog::Entry::Debian: Remove obsolete methods check_header()
and check_trailer(). Hide variables $regex_header and $regex_trailer.
- Dpkg::Changelog::Parse: Remove warnings of obsolete options forceplugin
and libdir. Remove obsolete functions changelog_parse_debian() and
changelog_parse_plugin().
- Dpkg::Compression: Hide internal lowercase variables
$default_compression, $default_compression_level and
$compression_re_file_ext.
- Dpkg::Deps::KnownFacts: Remove obsolete check_package() method.
- Dpkg::Exit: Hide internal lowercase @handlers variable.
- Dpkg::Gettext: Remove obsolete _g() function.
- Dpkg::Source::Package: Hide internal lowercase variable
@tar_ignore_default_pattern. Remove iternal lowercase variable alias
$diff_ignore_default_regexp.
- Dpkg::Substvars: Remove obsolete no_warn() method.
- Dpkg::Index: Change default value for unique_tuple_key to 1.
- Dpkg::Version: Remove deprecation warning from semantic change in
bool overload.
- Dpkg::Checksums: Remove obsolete 'program' property warning.
- Dpkg::Conf: Remove obsolete methods and obsolete croak for method option.
- Dpkg::Vendor: Remove obsolete 'keyrings' hook.
- Dpkg::Exit: Unregister all signal handlers once we have executed them.
Closes: #932841
- Dpkg::Exit: Register exit handlers also for __DIE__.
- Dpkg::Source::Package::V3::Native: Do not say v1.0 for 3.0 formats.
- Dpkg::Dist::Files: On filename parse error say file instead of package.
- Dpkg::Substvars: Add new vendor:Name and vendor:Id substvars.
- Dpkg::Source::Package: Detect directory traversals under debian
directory. Reported by Felix Lechner <felix.lech...@lease-up.com>.
* Documentation:
- man: Fix uncommon wording constructs.
- man: Use a minus sign for a literal string.
- man: Clarify that the pager is called via «$SHELL -c».
- dpkg-shlibdeps: Document split_soname() function.
Prompted by Christopher Crim <christopher.c...@quoininc.com>.
- Dpkg::Changelog: Document methods provided by subclasses.
Reported by Felix Lechner <felix.lech...@lease-up.com>.
- man: Globally adjust left and disable hyphenation.
- man: Split dselect(1) --color from --colour option items.
- man: Describe the SONAME formats supported in deb-shlibs(5).
- man: Move template symbol documentation into new deb-src-symbols(5).
- Dpkg::Changelog::Parse: Remove $ sigil from option names in POD.
- Dpkg: Say class instead of object when appropriate.
- Dpkg::Changelog: Clarify that these classes inherit from some other
base class, which will contain the missing documentation.
Prompted by intrigeri <intrig...@debian.org>.
- man: Clarify deb-changelog(5) format. Closes: #946780
- man: Clarify debian/source/include-binaries format in dpkg-source(1).
Prompted by Felix Lechner <felix.lech...@lease-up.com>.
- man, doc: Clarify that the postinst "triggered" argument gets the
trigger-name(s) as a space-separated list in the second argument.
Prompted by Michael Biebl <bi...@debian.org>.
- dselect: Update the multicd README file.
- doc, man: Mark T and I package instances to avoid misreadings.
* Code internals:
- Dpkg::Source::Package: Refactor original tarball handling.
- perl: Use File::Copy instead of spawning mv/cp commands.
- Dpkg::OpenPGP: Refactor signature verification into a new function.
- Dpkg::OpenPGP: Make it possible to verify detached signatures.
- Dpkg::OpenPGP: Add support for importing an OpenPGP key into a keyring.
- Dpkg::BuildFlags: Remove unused hash keys.
- libdpkg: Use the variable instead of a type as sizeof() argument.
- libdpkg: Use the totalwritten variable for a consistency check.
- dselect: Reduce scope of variable, to avoid it being unused in a branch.
- dpkg-deb: Fold two adjacent if conditionals into a single one.
- dpkg: Initialize flagdeppossi in check_conflict().
- libdpkg: Add new C locale switch over support.
- libdpkg: Add new versiondescribe_c() to force a C locale.
- dselect: Make baselist::draw_column_*() col arguments const.
- libdpkg: Use p instead of name in dpkg_arch_name_is_illegal().
- dpkg: Remove redudant condition for sourcefile in updateavailable().
- dpkg, update-alternatives: Make variables static.
- libdpkg: Add missing symbols to the version map.
- libdpkg: Fix fiemap memory layout usage that confuses gcc 10 to emit a
warning.
- libdpkg: Only use varbuf_printf() in pkg_format_show() when necessary.
This should speed up «dpkg-query --show» formatting.
- libdpkg: Fix package format string to be a string literal.
This suppresses a gcc warning.
- dpkg: Fix short lived memory leak in --force-help handling.
- dpkg-split: Fix short lived file descriptor leak in --auto.
- start-stop-daemon: Explicitly ignore uninmportant function return values.
- start-stop-daemon: Fix memory leak on multiple --chuid arguments.
- start-stop-daemon: Close the notification socket in the child.
- libdpkg: Fix memory leaks in zlib and bz2 decompression functions.
- libdpkg: Add new dir_make_path() and dir_make_path_parent() functions.
- libdpkg: Add new atomic file flag to create the base path when missing.
- libdpkg: Fix modstatdb_rw enum comments.
- libdpkg, dpkg-query: Optimize db-fsys:Files virtual variable loading.
We load either the entire db-fsys for all packages, possibly optimized
per platform (such as by using fiemap), or the specific ones for the
requested packages. This also fixes a problematic cast removing the
constness of a variable.
- Dpkg::Dist::Files: Document the two filename pattern formats.
- update-alternatives: Remove redundant condition in argument parser.
- update-alternatives: Move error context setup before calling setjmp(),
so that cppcheck stops being confused.
- test: Reformat 200_Dpkg_Shlibs.cpp for coding style conformance.
- dpkg: Make it possible for the compiler to check printf() format
string arguments on dependency printer.
- dselect: Reorder branches in packagelist::deselect_one_of so that they
are not duplicated.
- dselect: Use nullptr instead of NULL.
- dselect: Use static_cast<> instead of old-style type qualifier cast.
- dselect: Do not use unnecessary old-style casts.
- dselect: Fix variable types to avoid needing old-style casts.
- libcompat: Disarm libselinux setexecfilecon() declaration for
libcompat-test.
- libdpkg: Define new VARBUF_OBJECT macro.
- libdpkg: Add new ATOMIC_FILE_NORMAL enum value to avoid a cast in C++.
- libdpkg: Use a new DPKG_NULL macro that works in C and C++.
- libdpkg: Use a new DPKG_STATIC_CAST macro that works in C and C++.
- libdpkg: Move printing of errno into dpkg_error_set().
- libdpkg: Use a varbuf to store the problem messages per parsedb context.
- libdpkg: Fix Doxygen comments.
* Build system:
- Bump minimal Perl version to 5.24.1.
- Add a serial versioning to the m4 files.
- Install m4 files into system aclocal directory.
- Bump minimal gettext version to 0.19.8, to get the m4 files that can
cross-build for musl-based systems.
- Enable more compiler warnings.
- Update Doxygen configuration from version 1.8.16.
* Packaging:
- Remove obsolete Breaks satisfied since oldstable.
- Replace custom rule for 'configure' with call to dh_autoreconf.
Thanks to Dan Streetman <ddstr...@canonical.com>. Closes: #939516
- dselect: Remove methods state files on purge.
Spotted by Sven Joachim <svenj...@gmx.de>.
- Switch to debhelper compatibility level 12.
- Switch from debian/compat to debhelper-commpat in Build-Depends.
- Bump Standards-Version to 4.5.0 (no changes required).
* Test suite:
- Remove perlcritic Documentation::RequirePodLinksIncludeText suppression.
- Clarify cppcheck va_list_usedBeforeStarted suppression.
- Skip build directories from codespell check.
- Update stopwords for codespell 1.16.0.
- Suppress new bogus cppcheck 1.90 false positives.
- libdpkg: Remove redundant assignment in t-ehandle unit test.
- Skip backup files from codespell check.
- Ignore python-3.8 runtime warnings in codespell.
.
[ Updated programs translations ]
* German (Sven Joachim).
* Portuguese (Miguel Figueiredo). Closes: #935695
* Simplified Chinese (Mo Zhou). Closes: #942195, #945776
.
[ Updated dselect translations ]
* German (Sven Joachim).
.
[ Updated scripts translations ]
* German (Helge Kreutzmann).
.
[ Updated man pages translations ]
* German (Helge Kreutzmann). Closes: #931135
Checksums-Sha1:
a35ba1ce1b348ea72d16a1bc2042ea6a48118b15 2109 dpkg_1.20.0.dsc
eda82352ba507bc7d7749b44579983ace07064c8 4738556 dpkg_1.20.0.tar.xz
cce7aaa4ad2cf52f4fd7bb9002df4248c8709919 7430 dpkg_1.20.0_amd64.buildinfo
Checksums-Sha256:
817d80805303aa1c5a02c37cb1a40df25d6ced25a0f03868719b894278f41650 2109
dpkg_1.20.0.dsc
b633cc2b0e030efb61e11029d8a3fb1123f719864c9992da2e52b471c96d0900 4738556
dpkg_1.20.0.tar.xz
4d36ff4093ae61b0b6b48ce6ea25cfaa69570e46862a8d524e3401f022e6e686 7430
dpkg_1.20.0_amd64.buildinfo
Files:
9faeaa49be1e6aeaaafe320941f7c206 2109 admin required dpkg_1.20.0.dsc
f88f077236a3ff3decae3b25c989893d 4738556 admin required dpkg_1.20.0.tar.xz
a550e984256025a8b49a3cd96f2e4fb1 7430 admin required
dpkg_1.20.0_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEETz509DYFDBD1aWV0uXK/PqSuV6MFAl5kXjgACgkQuXK/PqSu
V6Pv8g//bodJZKKKWUSbTBAS0itG1TpKa/BsY1zV1itAQvY+ZBhxO9M/4kZJ482B
j17+Am/7XPV47zmxTEAwMbkHWA3vIPJCN+I1wps1rdv4wc5Lcom2ZPTsZTyacvkX
RMUX92/3CF3/yKcFte6z85cTSQcUCdldPBB1qlTJBB9ecZrLNYkLHX69uTkbGUew
ku2sjokVX1407EmcLta1WfZuYmKyNGWtvFiWgkxZYr84oWqHouLXmrBPjFgdO5kx
MpOw8ez0pHbrqmAr+xt5WR/o2vyquiYE9LGTpxa2F0lShRiGruOxmg57DZNsYlzh
KNEEWYhnpUDahFxrw3ZlgGKXjVOeGxozmH36Qb+VRGvz1rYxdNOINLjDTsvEk9rw
btUGdwUa2SceZeVGSmRK4BxMot1gtcY91yXuAzejtywlswxxKPcl3FaXhFtXRl9h
35HVjWotCOGdLQDO/MG+KIbq0D6STE4x6Prgek5PEDhohiIVSim1SO9mcMxgUcY3
ohamUcN++A5f1RqwMTdGNrFo1PJYOUiSmbiautjsz2LPVd4OXnWRMA/rmX6zoPGE
Y9WsSIs0W/GsKEjjQTpS3ueuE/fAfpUfab8DhaRB0g0oWWcuady4l+rgUc978iSa
SCHtjYu+kPajCWMcpSLeHqNlSUru6Bi5cwBmzm38DQdzieLKgnw=
=oxT9
-----END PGP SIGNATURE-----
--- End Message ---