Package: debhelper Version: 13.20 Severity: normalHi! Please consider this a follow up to bug #1082719. Consider its example code, but with the following modifications:[...]As dh_fixperm is now run later in debhelper's sequence, tools trying to modify the "main" binary will fail, since upstream's build system installs it with mode 0555 instead of 0755:[...]This is somewhat mentioned in the debhelper-compat-upgrade-checklist(7) manual page, and says to file bugs to the relevant tools. Since dh_fixpem is owned by debhelper, here I am :)
Thanks for spotting this and reporting it.We also saw a number of similar problems in compat 13 (or earlier) with the removal of `fakeroot`, which has also papered over these issues in the past.
How do you think should we handle this? I see how dh_fixperm should be run before dh_compress, but why is it now run so late compared to before? Why not split dh_fixperm in to parts, one that allows debhelper tools to act on the files, and the other one which makes sure that permissions are normalzied? Maybe adding a dh_make_writable command?
I have opted for having the underlying buildsystem invoked by `dh_auto_install` apply `chmod -R u+rwX DESTDIR` as a solution as of compat 14. As a side-effect, it also promotes the use of the `dh_auto_*` helpers, which is ideal, since they solve a lot of other problems (such as cross-building).
Third-party provided build systems will have to implement this themselves if relevant. For the debhelper based ones, it will be a one-liner in the form of:
$this->ensure_minimal_permissions($destdir) if not compat(13);In their `sub install` implementation. It should be backwards compatible, since the code is only triggered with compat >= 14 (and `debhelper/13.X` will have the method).
For other builds systems, they can use `chmod -R u+rwX DESTDIR`. I will leave it for them to figure out how to do backwards compatibility for special-cases where files must not have the "user write bit" (such as `*.ali` files or `etc/sudoers.d` files).
On the question of why is `dh_fixperms` run to late now, then it is complicated. The later it is, the more tools can be "sloppy" (#982457). However, the later it is the more tools run into this kind of problem that you just filed (plus #981783). There is no "right answer", just a lot of "why doesn't it work for me" expectations. Though, I think compat 14 should get most of the way.
Let me know! I'd love to see compat 14 ready to be released!
Thanks for your interest and patience. Also thanks for reporting bugs against compat 14 before it became stable! Best regards, Niels
OpenPGP_signature.asc
Description: OpenPGP digital signature