• heads-up, debhelper now depends transitively on libsub-prototype-perl a

    From Peter Green@21:1/5 to All on Tue May 21 02:00:01 2024
    As far as I can tell, until recently all the perl modules that
    debhelper depended on where either part of the perl package itself,
    or were pure perl modules. This meant that changes to "perlapi"
    did not make debehlper uninstallable.

    However, while working on raspbian (which is still dealing with
    the time64 transition), I discovered the following dependency
    chain.

    debhelper
    dh-strip-nondeterminism
    libfile-stripnondeterminism-perl
    libsub-override-perl
    libsub-prototype-perl
    perlapi-<whatever>

    If my understanding is correct, this means that when perlapi is
    bumped debhelper will become uninstabllable. Since almost
    everything in Debian, including libsub-prototype-perl,
    build-depends on debhelper this will present a bit of a
    problem.

    This dependency chain seems to be have been introduced by the
    upload of libsub-override-perl 0.11-1

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Niko Tyni@21:1/5 to Peter Green on Tue May 21 20:20:01 2024
    (adding cc to strip-nondeterminism@pdo and so quoting in full)

    On Tue, May 21, 2024 at 12:34:34AM +0100, Peter Green wrote:
    As far as I can tell, until recently all the perl modules that
    debhelper depended on where either part of the perl package itself,
    or were pure perl modules. This meant that changes to "perlapi"
    did not make debehlper uninstallable.

    However, while working on raspbian (which is still dealing with
    the time64 transition), I discovered the following dependency
    chain.

    debhelper
    dh-strip-nondeterminism
    libfile-stripnondeterminism-perl
    libsub-override-perl
    libsub-prototype-perl
    perlapi-<whatever>

    If my understanding is correct, this means that when perlapi is
    bumped debhelper will become uninstabllable. Since almost
    everything in Debian, including libsub-prototype-perl,
    build-depends on debhelper this will present a bit of a
    problem.

    This dependency chain seems to be have been introduced by the
    upload of libsub-override-perl 0.11-1

    Thanks for bringing this up. This is indeed a problem, and a blocker
    for a future Perl 5.40 transition in Debian. So it should probably
    be a release critical bug against something (maybe all of debhelper, strip-nondeterminism and libsub-override-perl ?)

    As seen in #931730 this is not the first time this kind of issue
    comes up. Back in 2019 File::StripNondeterminism::handlers::zip was
    changed to use Sub::Override instead of the earlier Monkey::Patch
    because the latter introduced a similar build cycle.

    Getting rid of monkeypatching Archive::Zip altogether as tracked in
    https://salsa.debian.org/reproducible-builds/strip-nondeterminism/-/issues/8 would probably be the best fix.

    Alternatively, finding yet another way of the monkeypatching
    Archive::Zip at runtime would work around this for hopefully
    at least another few years :)

    Other alternatives would probably require weakening some link of the cycle
    by remoting a Depends to a Recommends (and adding graceful handling when
    the recommended package is not installed.)

    As a last resort I suppose libsub-prototype-perl *could* be changed to
    not use debhelper for building, but that seems to me rather laborious,
    fragile and counterproductive.

    FWIW it doesn't seem fair to ask Sub::Override upstream to avoid
    Sub::Prototype because of this Debian specific issue. But I haven't looked
    at how common the new functionality requiring Sub::Prototype really is.

    Help would of course be very much appreciated.
    --
    Niko Tyni [email protected]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Chris Lamb@21:1/5 to Niko Tyni on Wed May 22 10:00:02 2024
    Niko Tyni wrote:

    Getting rid of monkeypatching Archive::Zip altogether as tracked in https://salsa.debian.org/reproducible-builds/strip-nondeterminism/-/issues/8 would probably be the best fix.

    Well, we (RB) would be very happy to merge and release a patch for
    that. (I lack the in-depth Perl skills to do that myself.)


    Regards,

    --
    ,''`.
    : :' : Chris Lamb
    `. `'` [email protected] 🍥 chris-lamb.co.uk
    `-

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alex Muntada@21:1/5 to All on Thu May 23 10:40:01 2024
    Hi Niko,

    As seen in #931730 this is not the first time this kind of issue
    comes up. Back in 2019 File::StripNondeterminism::handlers::zip was
    changed to use Sub::Override instead of the earlier Monkey::Patch
    because the latter introduced a similar build cycle.

    Getting rid of monkeypatching Archive::Zip altogether as tracked in
    https://salsa.debian.org/reproducible-builds/strip-nondeterminism/-/issues/8 would probably be the best fix.

    Alternatively, finding yet another way of the monkeypatching
    Archive::Zip at runtime would work around this for hopefully
    at least another few years :)

    After looking at the code I think that the easiest way to avoid
    monkey patching at all would be inheritance. I haven't found
    enough time to work on the full implementation yet, but this is
    the general idea:

    * File/StripNondeterminism/handlers/zip.pm defines 2 packages:
    File::StripNondeterminism::handlers::zip itself and a subclass
    of Archive::Zip::Member which is local (e.g. Local::AZM).

    * Also defines methods cdExtraField and localExtraField calling
    to super class methods first and then normalize_extra_fields
    if needed.

    * Replaces `Archive::Zip->new()` with `Local::AZM->new()`.

    Monkey patching without importing other packages is also doable,
    but I think inheritance is cleaner here.

    Cheers,
    Alex

    --
    ⢀⣴⠾⠻⢶⣦⠀
    ⣾⠁⢠⠒⠀⣿⡁ Alex Muntada <[email protected]>
    ⢿⡄⠘⠷⠚⠋ Debian Developer 🍥 log.alexm.org
    ⠈⠳⣄⠀⠀⠀⠀


    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEaUBwKsbetWW2SKTt466XjoNOXn4FAmZO/68ACgkQ466XjoNO Xn7jzg/+PfHvmFMpar3pCmjDt9QlI1J8bHbm0usqtQtu/mg4vk7QeocLGgJt93AE TBKS6wh07dD0f0cg1wKzsgxmN+0EBgRbva2yy+HcLeZ31Q6YS0xsjGJUCTp8oqvS Nz+AkcIclj/4CuqTIQh/15qhcQEY8wlPApWlSNb0+piHaRGKBjCAF7K1j5Nl5b9t Phx9fXemcE/oj76YaWG/LvXWEQsVWjhY+UL78T9Tfk9hBnXDnhohQ7Q+uwzaIgPP 8MIF1Z2XVtDOVaei8sn2G86J773WtX2/agBV7SFghEOYKOxahc8Ak3oReYJ/3ks3 B8/yvFx+oYM+5XWF1NhKT1KSgdxb/7Qcy7OpMktFQuRbMGDjenTYEe8CpXppiQv8 xntowp2+gUguSuS2aR36Ec10RtblPjbFtwW0o6vVH7G3PuzH9jAAJJlqXshZjeXb FufFuJ86LzGNDa+jgFSgteyFYHsowFkHlYMHOHuzx42qGXIUkKHZec4nnpwj84Zz xV7WaD/9DuOSHpEEc3gsl3UCuQfgFEXwYZRh6sfHVT6BPSDa59jOTwhU8N1zsEcg aRAXhHCXRiTqPm0VQd/khK3Y8VoFP87r+5OKPTb1RTVnWHoKlNnpnqxSs6YGH7gJ hm3MjQl6XXQT03Y70vw+KuHTcI3t8WVwqVLMpmORBCe/ximyeEA=
    =3AZd
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alex Muntada@21:1/5 to All on Thu May 23 17:10:01 2024
    After looking at the code I think that the easiest way to avoid
    monkey patching at all would be inheritance.

    Inheritance won't work :(

    * Replaces `Archive::Zip->new()` with `Local::AZM->new()`.

    Because Local::AZM replaces Archive::Zip::Member not Archive::Zip.

    Monkey patching without importing other packages is also doable,
    but I think inheritance is cleaner here.

    So I ended up doing a manual monkey patch: https://salsa.debian.org/reproducible-builds/strip-nondeterminism/-/merge_requests/16

    JFYI, tests pass locally, but the pipeline failed on something
    that totally unrelated:

    gbp:error: Cannot find pristine tar commit for archive
    'strip-nondeterminism_1.13.1.orig.tar.bz2'

    Hope this helps,
    Alex

    --
    ⢀⣴⠾⠻⢶⣦⠀
    ⣾⠁⢠⠒⠀⣿⡁ Alex Muntada <[email protected]>
    ⢿⡄⠘⠷⠚⠋ Debian Developer 🍥 log.alexm.org
    ⠈⠳⣄⠀⠀⠀⠀


    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEaUBwKsbetWW2SKTt466XjoNOXn4FAmZPWuAACgkQ466XjoNO Xn731g//XX2cDDSWz5pQCz/sWmAwUw81jurSRLk3glRAiGkBIgUC4l464gWtWkRL B11WcHgijEkladDwl8zgXL7zEEuzlouM4A772sHThy3DV/BtTC3wP1lz/iS4g4RV gA/KxxB/yFS7UBXABh3jt4DDCVqYBFRYm1iz+2QL7bM05/Qvgp95iGhacGzJw/uw j1lTNBVGFa0+GK7QPPfq+yLhaqGwrtk3i5TpV/zC5JPAU6mkAcPMmQ/L3lnbDdkB jnuYkVu4RfKTyX3AXuC5RyGAbppGNOSruzH9135+7Gzp2Xp70GmaWelsoWaufjnI UueAiqq3xD1VRx/yhcfrRa1RiWvXdeW+NCy4708i5gspC6C+KWme/pt1gLF6gAgJ pOOX1R3Agka/9ezN6fT3AToXJ3iFjLNr9J8xtl41jOgH7z6U+teWEc65vwTgGVXh OBYP4FcJAgV2RYcdoORakun8iIxgGnSun8tFiZ/dsdJhJTNgJMFOo7p9ljXYWkeT MgbuA97K9MfskFnFwkdChN+jgpZbzQP1B0r0ZI3gLTgS5eBPpwrrqdrUNsCQ0Qag a13KrFWYIa1Vor1MKFuUwlXKNtGbE99RwrJ2oH9YSwSVdlSgudltl4/78NGmuFaF fd0HycNaxADqvgv69OhoiqYz3QwAmxsvmdUefIceBf/lXWb+pj8=
    =u74E
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Chris Lamb@21:1/5 to Alex Muntada on Fri May 24 10:10:01 2024
    Alex Muntada wrote:

    So I ended up doing a manual monkey patch: https://salsa.debian.org/reproducible-builds/strip-nondeterminism/-/merge_requests/16

    Great; I've gone ahead and released this as:

    strip-nondeterminism (1.14.0-1) unstable; urgency=medium

    [ Alex Muntada ]
    * Avoid Sub::Override and break circular dependencies in debhelper.

    [ Chris Lamb ]
    * Drop Depends, Build-Depends and Makefile.PL PREREQ_PM entry for
    libsub-override-perl.

    gbp:error: Cannot find pristine tar commit for archive
    'strip-nondeterminism_1.13.1.orig.tar.bz2'

    Fixed this by committing the .orig and .asc from the archive.

    Thanks. :)


    Best wishes,

    --
    ,''`.
    : :' : Chris Lamb
    `. `'` [email protected] 🍥 chris-lamb.co.uk
    `-

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)