Your message dated Sun, 29 Dec 2019 18:19:29 +0000 with message-id <[email protected]> and subject line Bug#946655: fixed in debhelper 12.7.3 has caused the Debian Bug report #946655, regarding dh_perl: why is ${perl:Depends} substituted as perl:any for programs only? 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 [email protected] immediately.) -- 946655: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=946655 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message ---Package: debhelper Version: 12.7.2 Severity: wishlist Control: affects -1 + apache2-dev Hi debhelper people (e.g. Niels), perl people (e.g. Niko) and cross people (hello?), I was looking into cross building src:openjpeg2 and that turned out to be a rabbit hole. It Build-Depends on apache2-dev. apache2-dev happens to not be installable for foreign architectures at all, because it Depends on perl. For it to be installable on foreign architectures, the dependency would have to be perl:any. The dependency is not added by the apache2 source package directly, but substituted by dh_perl as ${perl:Depends}. dh_perl in turn looks for perl stuff inside the binary package and discovers both scripts (in /usr/sbin) and the debhelper sequence addon and concludes that apache2 contains both a module and a program. Then we reach this debhelper commit: https://salsa.debian.org/debian/debhelper/commit/9bfbef9e66409cf29221f9fdc811c2b796e70d0a | dh_perl: Emit perl:any dependencies for program-only pkgs That's the commit that adds :any only if the package contains exclusively programs. The commit fixes #824696, which was originally filed by Javier Serrano Polo and later commented by Niko Tyni: | AFAICS wine*-tools depend on perl for running #!/usr/bin/perl scripts. In | that use case perl:any probably makes sense. However, ${perl:Depends} is | also used (and, as I suspect, much more widely) for Perl module package | (lib*-perl) dependencies, where things quickly get much more complicated. | | It seems to me that it might be safe for dh_perl to add the :any modifier | if the package only has #!/usr/bin/perl scripts? Niko didn't give further reasons here, so Niels implemented it that way in debhelper. Now let me question this. Why is it unsafe to add :any to perl modules? I outlined above that it is useful to ask this question, because it affects the installability of apache2-dev. Let me argue in favour of using perl:any for modules as well. Let us call the module package libexample-perl. libexample-perl Depends on ${perl:Depends} and thereby gets its perl dependency. libexample-perl contains perl modules and possibly perl programs as well. The case where libexample-perl depends on an extension is boring, because the extension will have a perl dependency without :any. In this case, annotating the perl dependency of libexample-perl is harmless and useless. Therefore we can assume that libexample-perl does not depend on any extension (directly). libexample-perl could have an indirect dependency on an extension. In that case, it would depend on a chain of perl modules leading to the extension. A perl module that depends on an extension (even indirectly) must not be marked Multi-Arch: foreign. Therefore each edge in this dependency chain preserves the architecture constraint. Therefore, indirect dependencies on extensions are boring in the same way as direct dependencies. We can therefore assume (for simplicity) our libexample-perl only depends on further perl modules and no extensions beyond those included in a basic perl installation. So what we get is a libexample-perl whose architecture value (possibly after mapping "all" to the native architecture) does not have to correspond to the architecture of the perl installation. Let us introduce a package called "consumer" that depends on our libexample-perl. If our consumer (transitively) depends on a perl extension, then by the above argument it'll have an architecture-preserving dependency chain to perl. So we can again assume that it only depends on modules. Again, it doesn't matter to the consumer which architecture perl actually has, so all should be fine. This latter case is hit precisely by apache2-dev. We want a foreign apache2-dev to contain a perl module and have the dependency annotated :any. So why don't we allow using perl:any for perl modules? I guess that this might subtly fail if perl has something like python's ctypes that allows opening any shared library. Such failure also applies to programs though. So if using perl:any for programs is safe, then the same should apply to modules. If we end up using perl:any for modules, rebuilding apache2 will make apache2-dev usable for cross compilation. If there is a flaw in my reasoning, there still is a way around: We can split apache2-dev into a new arch:all package that I'd call "dh-sequence-apache2". We'll move the dh sequence to that new package and mark it Multi-Arch: foreign. I can try writing a patch, but it comes at the cost of introducing a new, small binary package. Yes, this is all a little complicated. Please bear with me. Helmut
--- End Message ---
--- Begin Message ---Source: debhelper Source-Version: 12.7.3 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 [email protected], and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Niels Thykier <[email protected]> (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 [email protected]) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Format: 1.8 Date: Sun, 29 Dec 2019 17:59:47 +0000 Source: debhelper Architecture: source Version: 12.7.3 Distribution: unstable Urgency: medium Maintainer: Debhelper Maintainers <[email protected]> Changed-By: Niels Thykier <[email protected]> Closes: 946655 947506 Changes: debhelper (12.7.3) unstable; urgency=medium . [ Niels Thykier ] * dh_perl: Use perl:any for perl module in addition to perl programs. Thanks to Helmut Grohne and Niko Tyni for the suggestion and analysis. (Closes: #946655) * dh_gencontrol: Clear the "Built-Using" flag for dbgsym packages. It is irrelevant as the original binary will have the field plus the field can cause lintian warnings. (Closes: #947506) * lintian-overrides: Override no-dh-sequencer as it is a false-positive that lintian cannot be expected to know. . [ Debian Janitor ] * Fix day-of-week for changelog entry 4.0.0. Checksums-Sha1: cb96a25c888bb0aac81e4686ceb7507ba52f2823 1843 debhelper_12.7.3.dsc 4799bb4fd25309c85f84b3a1f604b7c88bb6ff07 511396 debhelper_12.7.3.tar.xz a5a7ef89f2b884cdff72819f0c6019fe9c1fc942 4499 debhelper_12.7.3_source.buildinfo Checksums-Sha256: c7ce2ba248a461af1b184c5c0c7ac11a5f2c82d887c81ad071f8a79d751b661b 1843 debhelper_12.7.3.dsc a4244abc372180a62dc83ea48f3c244f4a3a6ed676c4eda5b131083b82b35bb1 511396 debhelper_12.7.3.tar.xz 2e99e5766838143cf4f02eb88fcb499eb1e34ff4922b680a3875fce3bc937ff4 4499 debhelper_12.7.3_source.buildinfo Files: 086c42350444133b82fda8396543bad3 1843 devel optional debhelper_12.7.3.dsc e591367ffe79a056d4e560c38f27bb1a 511396 devel optional debhelper_12.7.3.tar.xz e21eef30bc5e2ce9e851e705dfd89939 4499 devel optional debhelper_12.7.3_source.buildinfo -----BEGIN PGP SIGNATURE----- iQJGBAEBCgAwFiEE8f9dDX4ALfD+VfsMplt42+Z8eqwFAl4I6oYSHG5pZWxzQHRo eWtpZXIubmV0AAoJEKZbeNvmfHqsKwAQANng9jdJYjy7PraoRwxirWxLpqSgrMr/ h6XJkMF4tCGejTClAZcwZyFhXvorcF32Gyfn09rKDV1acX6EezM8iBtT6FGtOZlj o4oEvX1esZX1Sv3BvRCK5iOWhuKxH2wjOBkF2WddYLopHZU1qL0LcRIs2EWwh6Yj d/X4Et3lbs1xY42GK/hnteUolRvboAkm2Nhsp3Ui2dlQwaYJ3F9SlJBKo35nyj/O 8NFLcsAs3oWodf9yYANj6oJM0SBup13lhw2myaqkUS7iJKpJ5YvwkoDbZWlhTwW7 lVbmEf3+ihs4F/rba30McD5gBu4/PTEUUA/2lBGpfz0KDMugBNr1seLasFmJiedJ nSi6zPOI8GSVN5gCir0aAhRrWtheFEa8W6Fzgcp3Yg9duwSi2T4l1edOLnx7M6JD 2+E8DfurGdSYjhVM+TBC5rxhrPwjP22Vurcedu1FkMx/JgFzNBPkQ82j1q7fNO/6 pOyS1vdK6dP0C9mkpG6/LMfwbSD/Ezm6JGXiCREIR9rhBzDwvq8kJ8BFXOK9+YrL kHreTf4XoebrmUJZqikeXrs933pOO3mPTSGb5WVjqCIZIBZ4f/31XtOKLQYG2UwK cksdhYqIA081r+mv9FOVhGmJW0qOk3SNlcFF1Xh1165c0bL/xzBPKf2yI5YpiWhf 7E/JFQyjWwuO =EjOR -----END PGP SIGNATURE-----
--- End Message ---

