Your message dated Sat, 07 Apr 2018 19:34:21 +0000 with message-id <e1f4tbr-000adc...@fasolo.debian.org> and subject line Bug#894549: fixed in debhelper 11.2 has caused the Debian Bug report #894549, regarding debhelper: dh_usrlocal may remove a direct subdirectory of /usr/local 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.) -- 894549: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=894549 Debian Bug Tracking System Contact ow...@bugs.debian.org with problems
--- Begin Message ---Package: debhelper Version: 11.1.6 Severity: minor Tags: patch Hello. The attached script shows that dh_usrlocal generates a prerm script removing a direct subdirectory of /usr/local. As I understand the policy, it should not. The fix is included. It also suggests some minor related changes, which do not seem to change the behaviour.--- a/dh_usrlocal +++ b/dh_usrlocal @@ -82,6 +82,8 @@ wanted => sub { my $fn = $File::Find::name; if (-d $fn) { + return if $fn eq "$tmp/usr/local"; + my $user = 'root'; my $group = 'staff'; my $mode = '02775'; @@ -99,12 +101,13 @@ $fn =~ s!^\Q$tmp\E!!; - return if $fn eq '/usr/local'; - - # @dirs is in parents-first order for dir creation... - unshift @dirs, "$fn $mode $user $group"; - # ...whereas @justdirs is depth-first for removal. - push @justdirs, $fn; + + push @dirs, "$fn $mode $user $group"; + + # don't remove directories directly in /usr/local + if ($File::Find::dir ne "$tmp/usr/local") { + push @justdirs, $fn; + } doit('rmdir', $_); } else { @@ -118,11 +121,10 @@ # This constructs the body of a 'sed' c\ expression which # is parsed by the shell in double-quotes my $dirs = join("$ebs\n", sort @dirs); - pop @justdirs; # don't remove directories directly in /usr/local my $justdirs = join("$ebs\n", reverse sort @justdirs); if (! $dh{NOSCRIPTS}) { autoscript($package,"postinst", "postinst-usrlocal", - "/#DIRS#/ c${ebs}\n${dirs}"); + "/#DIRS#/ c${ebs}\n${dirs}") if length $dirs; autoscript($package,"prerm", "prerm-usrlocal", "/#JUSTDIRS#/ c${ebs}\n${justdirs}") if length $justdirs; }dh_usrlocal-topdirs.sh
Description: Bourne shell script
--- End Message ---
--- Begin Message ---Source: debhelper Source-Version: 11.2 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 894...@bugs.debian.org, and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Niels Thykier <ni...@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 ftpmas...@ftp-master.debian.org) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Format: 1.8 Date: Sat, 07 Apr 2018 19:23:32 +0000 Source: debhelper Binary: debhelper dh-systemd Architecture: source Version: 11.2 Distribution: unstable Urgency: medium Maintainer: Debhelper Maintainers <debhel...@packages.debian.org> Changed-By: Niels Thykier <ni...@thykier.net> Description: debhelper - helper programs for debian/rules dh-systemd - debhelper add-on to handle systemd unit files - transitional pack Closes: 894549 894573 894666 894835 894895 895011 895044 Changes: debhelper (11.2) unstable; urgency=medium . [ Niels Thykier ] * debhelper.7: Add a ~ to the suggested Build-Depends to ensure backports also work for debhelper with single integer versions. Thanks to Trent W. Buck for the suggestion. (Closes: #894666) * makefile.pm: Use -Oline with make. This avoids make mistaking a target name for a value for -O and should make build time outs less likely for "long" targets. (Closes: #894573) * Dh_Lib.pm: Fix bug that make debhelper trip on packages with the version "0". Thanks to Chris Lamb for reporting the bug plus debugging the issue. (Closes: #894895) * Buildsystem.pm: Rewrite to support build systems that generate build files for another build system (without using inheritance). This enables generator build systems to have multiple backends. * cmake.pm: Support ninja as alternative backend (by using the build system cmake+ninja). Thanks to Kyle Edwards for the suggestion. (Closes: #895044) * meson.pm: Rewrite as a generator build system with ninja as the only backend. * debhelper.7: Recommend packagers to use "debian/<pkg>.<file>" over "debian/<file>" in most cases. Thanks to Johannes Schauer for the suggestion. * dh_usrlocal: Implement a simple guard for directories that will likely cause issues in the shell snippets. * dh_usrlocal: Use the new rules from Debian Policy 4.1.4 to determine the default ownership and mode for directories. * d/control: Bump Standards-Versions to 4.1.4. Beyond the dh_usrlocal change listed above, no changes were required. . [ Nicolas Boulenguez ] * dh_installxfonts: Fix typo that causes a misc:Depends on non-existing xfont-utils. (Closes: #894835) * dh_installwm.1: Document --all. (Closes: #895011) * dh_usrlocal: Fix bug where the generated prerm script generated by dh_usrlocal could remove a directory directly in /usr/local. (Closes: #894549) . [ Mattia Rizzolo ] * Lower the version restrictions on dpkg and dpkg-dev. They are not needed anymore, as R³ support is not implied anymore, but requires an environment variable to be passed. Checksums-Sha1: 71d3f409fbca3c667cfa0809447e658f4de008da 1681 debhelper_11.2.dsc 9f3ad653d486721186056cc9b897c8b3f682bf97 455608 debhelper_11.2.tar.xz 9ebc288ca16fd9aaad22de04e3e0f33d9de935ba 4546 debhelper_11.2_source.buildinfo Checksums-Sha256: 0da35b90fd65d17ef7a6ddaac472349e92ce6d3ffe6aa9163086add61a062cab 1681 debhelper_11.2.dsc bd726051ca3a488a3edaff925d9c5ca45c7a7b20dfcb62a381fb55b93ea2ee66 455608 debhelper_11.2.tar.xz 6926e624cb4cff32507bf43e21d363a9e3206948ba18e30b96f93205545bd477 4546 debhelper_11.2_source.buildinfo Files: 849efbdc1e61126e1c410188f8e01dcd 1681 devel optional debhelper_11.2.dsc 870ac4fd8278eaccbc3e276c0ba9fe5a 455608 devel optional debhelper_11.2.tar.xz 28947d1df252254d30a65cb178d4d1e4 4546 devel optional debhelper_11.2_source.buildinfo -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEsxMaRR2/33ygW0GXBUu7n32AZEIFAlrJG3IACgkQBUu7n32A ZEJwLg//Wev9BdvkpEVdzKToBn6DWlakupxmRBmVDXyK9DWgdurx7kuFrHrj/SzK 3Yg0PBjhEXuT+XyC773zIiFs43IXpp3bE1zhKF6+zY9wGiE3bhFJ7RKeoKQRUJ/T ua/5GfezI5s0INmvr49nSb/LiGB66R4juThGfgyRKgnwFHOVGRgbXJ25mrQK5xO7 dosKEDluankJ1XIebKhQMnj41MVByMJqPecTtIZxoeTHTH0AGUMwlotv6xeY0WXz SOKYUOgucwnj9kuyU0k7gK8jN1TnipZotQa3V5Q4ntVK/g2zg7sH+aPoNyH10GDH FbZx7O2zgCrdqN3lzOsXGrZD7KShjSNwyjQNjprzbT3zXrEtuYQuSVcQRgBZ/N0F nfF2nZzz289KSYJuGI9e6gKK/+PewV1UAfTiRa8rzhxjTSOsjVlG1NwEjfBFjXU3 ds894SmCZTvNkE68xmhMDawSXJLrULA6/zQgVNVVWDwUb1TYY+zrY8alCiE3+zNV oMkR49RHrETE+39f7Ce7PDFCGVt+AhL9+YWigAje1ioJe87dRxRZnept8Uao7+tn 03r2BOW3hnC7IJL/p0yqoMBma+yZn+B/jeK/EwniAlaz2wNNraimmSe4FdW3hv7r ValqKnhBZeUI+BuBxBOVveOWcJG424txnFWlqYFVCKn+wtVtFmA= =UO0w -----END PGP SIGNATURE-----
--- End Message ---