#997961 debhelper: dh_perl generates unversioned perl/perl-base dependencies for XS modules

#997961#5
Date:
2021-10-27 19:59:16 UTC
From:
To:
Package: debhelper
Version: 13.3
Severity: normal
X-Debbugs-Cc: debian-perl@lists.debian.org

Hi,

as noted by josch in
https://lists.debian.org/debian-perl/2021/10/msg00020.html
dh_perl generates incorrect unversioned dependencies for packages
containing binary  Perl modules.

I think this regressed with
https://salsa.debian.org/debian/debhelper/-/commit/7da36e893a975680654c1448c7bcba7dc1786551
which looks incorrect: $version is not always empty and when it
isn't it should be used. This got into unstable with 13.3 in
December 2020, shortly before the bullseye freeze started
and after the Perl 5.32 transition.

Quoting the Perl policy at
https://www.debian.org/doc/packaging-manuals/perl-policy/ch-module_packages.html#s-binary-modules

   Binary modules must specify a dependency on either perl or perl-base
   with a minimum version of the perl package used to build the module.

A quick count [1] indicates that 150 or so packages are currently violating this,
presumably because of the dh_perl change.

Fortunately I don't think this is as bad as it might seem (and I guess
we'd have noticed sooner if it was.)

Clearly the policy requirement is there to guarantee that partial upgrades
don't result in a binary module getting loaded by a Perl version older
than the one it was compiled with. The perlapi-* dependencies already
ensure this for the upstream Perl version, and we have made only minimal
changes in the Debian packaging during the time, partially because of
the freeze.

I'm not sure how necessary the policy requirement is nowadays. We
certainly take care not to change the XS module ABI, and if we had
to we'd change the perlapi-* virtual package too to force a full Perl
transition.  I guess C toolchain changes might cause issues, but even
that seems improbable.

In any case, it would probably be good to fix this before the Perl 5.34
transition when all the binary modules get rebuilt. (There is no timeline
yet for that but that's just because I haven't got around to pushing it.)

[1] grep-aptavail -FDepends perlapi- | grep-dctrl -sPackage -v -FDepends -e 'perl(-base)? \('

#997961#12
Date:
2022-07-03 09:18:54 UTC
From:
To:
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 997961@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)
Format: 1.8
Date: Sun, 03 Jul 2022 09:04:23 +0000
Source: debhelper
Architecture: source
Version: 13.8
Distribution: unstable
Urgency: medium
Maintainer: Debhelper Maintainers <debhelper@packages.debian.org>
Changed-By: Niels Thykier <niels@thykier.net>
Closes: 997961 1006805 1010591 1010594 1011099 1011256 1011404 1012777 1013969
Changes:
 debhelper (13.8) unstable; urgency=medium
 .
   [ Niels Thykier ]
   * dh_perl: Fix incorrect binary versioning caused by a regression
     in 13.3.  Thanks to Niko Tyni for reporting the issue.
     (Closes: #997961)
   * d/control: Bump Standards-Version to 4.6.1 - no changes required.
   * root_sequence.pm: Run `dh_installsysusers` before
     `dh_installtmpfiles` (only affects compat 14 or later).  Thanks
     to Nicholas Brown for the suggestion.  (Closes: #1011099)
   * autoscripts/postinst-init-tmpfiles: Remove runtime check on the
     system having systemd as init system.
   * dh_installtmpfiles: Replace runtime check on the system running
     under systemd in generated `postinst` script with a dependency
     on `systemd | systemd-tmpfiles` added to `${misc:Depends}`.
     Thanks to Guilhem Moulin for the suggestion.  (Closes: #1013969)
   * dh_installsystemd: Ditto.
   * dh_installinit: Ditto.
   * debhelper-compat-upgrade-checklist.pod: Correct description for
     the addition of dh_installsysusers in compat 14.
   * meson.pm: Use `meson install` instead of `ninja install` for
     dh_auto_install in compat 14.  Thanks to Andrea Pappacoda for
     the suggestion.  (Closes: #1006805)
 .
   [ Max-Julian Pogner ]
   * Dh_Lib.pm: Remove double semi-colon.  (Closes: #1010591)
   * Dh_Lib.pm: _strip_spaces now explicitly returns undef on undef
     argument.
     (Closes: #1010594)
 .
   [ Andrea Pappacoda ]
   * cmake.pm: Set FETCHCONTENT_FULLY_DISCONNECTED to true.  This
     ensures that the `FetchContent` module does not attempt to
     use internet connection.
 .
   [ Vagrant Cascadian ]
   * debhelper-compat-upgrade-checklist.pod: Update documentation
     for compat 14 change.  (Closes: #1011404)
 .
   [ Ferenc Wágner ]
   * debhelper.pod: Correct link to the new upgrade checklist.
     (Closes: #1012777)
 .
   [ Luca Boccassi ]
   * dh_installman: Avoid false positive language detection on
     shared libs.
 .
   [ Translations ]
   * Update Portuguese translation (Américo Monteiro)
     (Closes: #1011256)
Checksums-Sha1:
 ab83b353a662b126d7da2026ac0ad86baa4817c2 1781 debhelper_13.8.dsc
 490b5e4c26597e05ea9b023ba245467aeb173d82 571980 debhelper_13.8.tar.xz
 f8ec73d3d3c49891a82040fc2ec2f26284a6ff0b 5172 debhelper_13.8_source.buildinfo
Checksums-Sha256:
 0deea560ceff3f0e0bc310e8e69b1d868cae74099e4ca3ddaa9bf3a5078f6959 1781 debhelper_13.8.dsc
 3d22db5662a54e3bbe67de699d1e7fd88f920fb1fc1db58a1c45c164f4fb96ea 571980 debhelper_13.8.tar.xz
 3dea3d634f304086e0da639c0a16efd0fb591e5cd600db3bdfc08fab83efcfd5 5172 debhelper_13.8_source.buildinfo
Files:
 856c26b5f503ec889ceb4f3613826997 1781 devel optional debhelper_13.8.dsc
 504e6ddd34f8163c091622e510eb4254 571980 devel optional debhelper_13.8.tar.xz
 02353b46898a8c129a3d6dea14331157 5172 devel optional debhelper_13.8_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQJGBAEBCgAwFiEE8f9dDX4ALfD+VfsMplt42+Z8eqwFAmLBXJkSHG5pZWxzQHRo
eWtpZXIubmV0AAoJEKZbeNvmfHqsB1AP/jEqU/ia8TMTRW+bEDWVGq+WWqzYs3R+
7OJW6Vx4ZRIGLu97r5S0TG/U6xlVn3evLSWclz617+CLYLqThzpX7gv0Jf1E2lTw
LGbvjieMmGFCR/rX6i6tFHMs6dPqbzDCUHR2ES15cHqSmCt+U+m7vLLt0H83f94p
Fnfbjly8AXLmPv6UikLpViyT3RNQTMkwpHBknaH/8LCwu1MWEev8HRQI3WZoZ7dJ
tysZDTk6YN74RCrIy82uA9qzpNzUW4UxkuzEZ2y28bVtsXGZV0KOMB/8S5uX1sXy
FboQfuePazknAtZrqQVoe5uqog/mYhi4ogLOnmiy2xwS5sNu729wJGDvsa1Lg3WT
HuToCc1bHUIe+aJHVz0vRx0lU0oBk+16mZE6YX/tGuvJc9faIPFOoYTyCSWNos0v
knRYe8wbNFsOynF0uXgWCU3yyCVbWITDtzPV55AziADyakkgqmKUHRpz8F45Mb84
SM7QN35GcKQhnoBic/dMCedHlFhsSYZTO3SmB1XROf3STxR46q5/U7+VgNH6ZfO7
zUkAY5B2/BtQk3lc83ld/JEStW+KiZi0p6CTaj6fMxT/X1gqyyBKQIx+Q1KiANKo
V61mrR968Io3s9uveAURCLLPcZICqn2zXAdlGy7xC4CjKkdy+5CvUgzEBaZoH/Zq
doBEMIudGdZK
=SvjG
-----END PGP SIGNATURE-----