Debian Bug report logs -
#869780
debhelper: recommended compat version substitution is totally broken
Reported by: Colin Watson <cjwatson@debian.org>
Date: Wed, 26 Jul 2017 11:24:01 UTC
Severity: normal
Tags: patch
Found in version debhelper/10.6.4
Fixed in version debhelper/10.7
Done: Niels Thykier <niels@thykier.net>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, Debhelper Maintainers <debhelper-devel@lists.alioth.debian.org>:
Bug#869780; Package debhelper.
(Wed, 26 Jul 2017 11:24:04 GMT) (full text, mbox, link).
Acknowledgement sent
to Colin Watson <cjwatson@debian.org>:
New Bug report received and forwarded. Copy sent to Debhelper Maintainers <debhelper-devel@lists.alioth.debian.org>.
(Wed, 26 Jul 2017 11:24:04 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Package: debhelper
Version: 10.6.4
Severity: normal
The recommended compat version substitution is broken in three ways.
Firstly, it fails to build with Ubuntu's version suffix as follows:
cat debhelper.pod | \
perl -e ' undef $/; foreach (@ARGV) { open (IN, $_) or die "$_: $!"; $file=<IN>; close IN; if ($file=~m/=head1 .*?\n\n(.*?) - (.*?)\n\n/s) { my $item="=item $1(1)\n\n$2\n\n"; if (" dh_installmanpages " !~ / $1 /) { $list.=$item; } else { $list_deprecated.=$item; } } } END { my $recommended_compat = 10.6.4ubuntu1; $recommended_compat =~ s{\..*}{}; while (<STDIN>) { s/#LIST#/$list/; s/#LIST_DEPRECATED#/$list_deprecated/; s/#RECOMMEDED_COMPAT#/$recommeded_compat/; print; }; }' dh_auto_build dh_auto_clean dh_auto_configure dh_auto_install dh_auto_test dh_bugfiles dh_builddeb dh_clean dh_compress dh_fixperms dh_gconf dh_gencontrol dh_icons dh_install dh_installcatalogs dh_installchangelogs dh_installcron dh_installdeb dh_installdebconf dh_installdirs dh_installdocs dh_installemacsen dh_installexamples dh_installgsettings dh_installifupdown dh_installinfo dh_installinit dh_installlogcheck dh_installlogrotate dh_installman dh_installmanpages dh_installmenu dh_installmime dh_installmodules dh_installpam dh_installppp dh_installudev dh_installwm dh_installxfonts dh_link dh_lintian dh_listpackages dh_makeshlibs dh_md5sums dh_missing dh_movefiles dh_perl dh_prep dh_shlibdeps dh_strip dh_systemd_enable dh_systemd_start dh_testdir dh_testroot dh_ucf dh_update_autotools_config dh_usrlocal | \
pod2man --utf8 -c Debhelper -r "10.6.4ubuntu1" --name="debhelper" --section=7 > debhelper.7
Bareword found where operator expected at -e line 1, near "10.6.4ubuntu1"
(Missing operator before ubuntu1?)
syntax error at -e line 1, near "10.6.4ubuntu1"
Execution of -e aborted due to compilation errors.
Secondly, the variable that's substituted into POD files is misspelled:
it should be RECOMMENDED_COMPAT, not RECOMMEDED_COMPAT. Relatedly, the
Perl variable that's substituted is spelled $recommended_compat in one
place and $recommeded_compat in another, which means the substitution
just doesn't work at all.
Thirdly, due to "undef $/" arranging for <STDIN> to read the whole file,
the substitutions need to be performed with the /g flag, otherwise only
the first occurrence is handled.
The attached patch should fix all of this.
--
Colin Watson [cjwatson@debian.org]
[0001-Fix-substitution-of-recommended-compat-version.patch (text/x-diff, attachment)]
Added tag(s) patch.
Request was from Colin Watson <cjwatson@debian.org>
to control@bugs.debian.org.
(Wed, 26 Jul 2017 11:27:04 GMT) (full text, mbox, link).
Added tag(s) pending.
Request was from Niels Thykier <niels@thykier.net>
to control@bugs.debian.org.
(Thu, 27 Jul 2017 05:21:03 GMT) (full text, mbox, link).
Reply sent
to Niels Thykier <niels@thykier.net>:
You have taken responsibility.
(Sat, 29 Jul 2017 18:21:22 GMT) (full text, mbox, link).
Notification sent
to Colin Watson <cjwatson@debian.org>:
Bug acknowledged by developer.
(Sat, 29 Jul 2017 18:21:22 GMT) (full text, mbox, link).
Message #14 received at 869780-close@bugs.debian.org (full text, mbox, reply):
Source: debhelper
Source-Version: 10.7
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 869780@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: Sat, 29 Jul 2017 18:00:24 +0000
Source: debhelper
Binary: debhelper dh-systemd
Architecture: source
Version: 10.7
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: 813266 868584 868649 868674 869697 869780
Changes:
debhelper (10.7) unstable; urgency=medium
.
[ Niels Thykier ]
* dh_usrlocal: Fix call to doit to avoid making it fork a shell.
* autoconf.pm: Ditto.
* cmake.pm: Ditto.
* meson.pm: Ditto.
* dh_installmodules: Ensure maintscripts are reproducible even with
multiple kernel versions detected.
* Apply patches from gregor herrmann to improve autopkgtests.
* Dh_Lib: Introduce a print_and_complex_doit.
* Buildsystem: Introduce a complex_doit_in_builddir, which is needed
by gradle-debian-helper.
* Dh_Lib: Fix bug in doit + doit_* that made them fork a shell in
some cases. For backwards compatibility, there is detection code
that should make it warn for this case and retain bug-compatibility.
This can cause a weird "Please specify the compatibility level in
debian/compat" error if the tools have chdir to a different directory.
* Dh_Lib: Support an optional hashref in doit + doit_* to enable some
trivial operations in the child process (e.g. redirect stdout).
* dh_installman: Avoid forking a shell where a simple subprocess call
is sufficient.
* Dh_Lib: Avoid forking 2 to 7 subprocesses for adding an autosnippet
when helper tools use a subroutine rather then a sed snippet.
* Dh_Lib: Extend autoscript to accept a hashref and use that for
substituting into the snippet. This variant (like the subroutine
variant) avoids forking a lot of subprocesses and need not worry
about a shell possibly interpreting metacharacters.
* dh_installman: Pass "-l" to man when recoding the manpages.
* dh_icons: Use hashref based autoscripts generation.
* dh_installcatalogs: Ditto.
* dh_installemacsen: Ditto.
* dh_installmenu: Ditto.
* dh_installmodules: Ditto.
* dh_installwm: Ditto.
* dh_installxfonts: Ditto.
* dh_systemd_enable: Ditto.
* dh_systemd_start: Ditto.
* Dh_Lib: Reduce the use of shell and external commands for
generating the final maintscripts.
* Dh_Lib: Make getpackages without any arguments return all
packages as the documentation promises it should. Previously,
it would hide packages not built (e.g. due to Build-Profiles).
* Dh_Lib: Provide a better error message when getpackages() is called
by a helper in the wrong directory. Unfortunately, dh cannot rely
on dh_testdir to do this as dh_testdir is called too late.
* dh: optimize out the call to dh_testdir. It is useless for
printing a helpful error message when called by dh.
* dh_installdocs: Apply patch from Sven Joachim to revert an
incorrect regression "fix". Thanks to Adrian Bunk for
reporting the issue. (Closes: #868649)
* dh_installexamples: Ditto.
* dh_installinfo: Ditto.
* dh_installman: Ditto.
* dh_gencontrol: Rewrite code that ensures that misc:Depends and
misc:Pre-Depends are present to avoid relying external processes
for this.
* dh_builddeb: Let dpkg-deb choose the default compression level for
dbgsym packages instead of using xz -1e. The current default (xz -6)
is likely to be a better default value for dbgsym packages. Thanks to
Adrian Bunk for the suggestion. (Closes: #868674)
* cmake.pm: Pass -DCMAKE_INSTALL_RUNSTATEDIR=/run to cmake in compat 11.
Thanks to Felix Geyer for the suggestion. (Closes: #869697)
* cmake.pm: Avoid using the user specific cmake package registry. Thanks
to Christian Seiler and Felix Geyer. (Closes: #868584)
.
[ Colin Watson ]
* Quote assignment to $recommended_compat in case it isn't a valid Perl
version string (e.g. for Debian derivatives). Fix typos that caused it
not to be used correctly. Use the /g flag so that all instances of the
substitution variable are handled. (Closes: #869780)
.
[ Isaac Jurado ]
* Make the autoconf buildsystem expand "${var}" values send to configure
(e.g. pass --mandir=/usr/share/man instead of --mandir=${prefix}/share/man).
(Closes: #813266)
Checksums-Sha1:
fd7b2a59493baf746831133f6bb4647ac1b419a5 1757 debhelper_10.7.dsc
22da871f0c1b7384ebe4616be95fad30eed1a629 416236 debhelper_10.7.tar.xz
34d75f4546a22e9552e1094290568cea5b1be093 4441 debhelper_10.7_source.buildinfo
Checksums-Sha256:
01c827ad13587978c6731cb6880a5a7734d4f0df328aedbfb2175c81794ee945 1757 debhelper_10.7.dsc
2ea042c1dba7b3bec6a18e9e56fc2a5fa117761b0dd33832dcf04774aadffab0 416236 debhelper_10.7.tar.xz
1f080f2c1ccddc795aaaa0eebb08ae6884807c41ec729eb834a9f8626b40b2d8 4441 debhelper_10.7_source.buildinfo
Files:
ec6ee1b1c69261d5fa0cb0eaaa74dc00 1757 devel optional debhelper_10.7.dsc
d7b6ace35cc430ceb59c529d9cbbd039 416236 devel optional debhelper_10.7.tar.xz
4b5e0a81a08dc8aa38e9ce76e346d4ed 4441 devel optional debhelper_10.7_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEEsxMaRR2/33ygW0GXBUu7n32AZEIFAll8zZgACgkQBUu7n32A
ZEKLLg/9Fh4TQ7nNPV5sgPXVJa9AxpBI936jgBMw2zMhIoUh2em6IfeA5pcSDSIa
mIgBSpvgQU8AdCjtYyvnMhmUG78QToT+hG/nlIKBJTxVdIHNFdEc2Wsb7qwfGrhg
jeQ574Fu0IP+rwJvFpFdlGSiX3T+41JNS/PaMoE+KqY6WEkgWlsFo4yp3oo8nkTk
KUU27aD4HuPJQkXuQJoUXtXBjDWFInuXRbIVpI06C77+Vnb2Qo1tZbmEFgVOMaVK
qL0hem/WoF8f2Coa+wGzX/e8+ly743CqeBKWaJuEbFytjuVJ2BI+d0TmOzTi+Mfu
2BSg+nHv7ZxtHjNECZYKh56hbTxnKUJxHPkLVt7M6vT5JzzdyuEbbYVe8XzabhlO
fVSnJ8gD7qsSDokoI9Vynauk+Vo90JKbZjygeHlIYJXoq3N32gK2a4FdbU6veD4S
iE0Ol2NrK1zityejjedd0F2VzbDx8KLO+ZqnMfeZ8sZVgbcaJP8uTQIdPStscXmQ
oaags8YntfNyHWwcwYvpBG1oI1eD+7ufOhrNdy9ASztdN2YTrtBwuU34B+vDScV+
Fr2t+qQK/la01VCMw69G5MrViKTsmbD3kQkZc6ct6QNMo1p8XFKeOUZ0WwbGCHtr
iblgjq2ixVmg+lMksoTm8yBom//vhKviS0iU2hl3lzN3y9pp5sQ=
=9WcJ
-----END PGP SIGNATURE-----
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Mon, 28 Aug 2017 07:29:41 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:
Wed Jan 10 16:23:46 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.