• Bug#1104092: libftdi1 reduce Build-Depends for architecture bootstrap

    From Helmut Grohne@21:1/5 to All on Fri Apr 25 16:20:02 2025
    Source: libftdi1
    Version: 1.5-10
    Tags: patch
    User: helmutg@debian.org
    Usertags: rebootstrap

    Hi Aurelien,

    I learned that libftdi1 technically became part of the architecture
    cross bootstrap set and that results in severe constraints about what it
    can depend on. The root cause is the addition of libtss2-dev to gnupg's Build-Depends from from libftdi1 via boost it goes really bad. Some
    package will have to get a build profile.

    As part of this, I've looked into libftdi1 and tried reducing its
    dependencies. I see three main opportunities.
    * We can turn libboost-test-dev optional via <!nocheck>, but we retain
    libboost-dev for libftdipp.
    * We can make all that Python stuff optional via <!nopython> and that
    works really well, because py3vers returns an empty sequence when
    missing and that makes stuff mostly just work. The exception here is
    override_dh_auto_install-arch, because the last installed version
    "wins". To make things reproducible, the main build needs to be
    installed last.
    * Making libftdipp (and thus boost) optional is difficult, because the
    CMake files installed into libftdi1-dev contain information about
    libftdipp1-dev and that goes missing if you -DFTDIPP:BOOL=OFF, so
    it'd be unreproducible.

    I'm attaching a patch for the first two items as those feel like fairly
    direct improvements with little downsides. Would you agree to merge
    them?

    What I still needs is getting boost out of the cross bootstrap set. I'll
    be looking into adding a profile to gnupg next, but I still appreciate
    if you happen to see a way of reasonably building libftdi1 without
    boost.

    Helmut

    diff --minimal -Nru libftdi1-1.5/debian/changelog libftdi1-1.5/debian/changelog --- libftdi1-1.5/debian/changelog 2025-04-08 22:40:49.000000000 +0200
    +++ libftdi1-1.5/debian/changelog 2025-04-23 21:21:26.000000000 +0200
    @@ -1,3 +1,10 @@
    +libftdi1 (1.5-10.1) UNRELEASED; urgency=medium
    +
    + * Non-maintainer upload.
    + * Reduce build-depends via build profiles. (Closes: #-1)
    +
    + -- Helmut Grohne <helmut@subdivi.de> Wed, 23 Apr 2025 21:21:26 +0200
    +
    libftdi1 (1.5-10) unstable; urgency=medium

    * Build documentation in a separate pass and move some Build-
    diff --minimal -Nru libftdi1-1.5/debian/control libftdi1-1.5/debian/control
    --- libftdi1-1.5/debian/control 2025-04-08 22:40:49.000000000 +0200
    +++ libftdi1-1.5/debian/control 2025-04-23 21:21:26.000000000 +0200
    @@ -3,13 +3,14 @@
    Priority: optional
    Maintainer: Aurelien Jarno <aurel32@debian.org>
    Build-Depends: debhelper-compat (= 13), cmake, libusb-1.0-0-dev, pkgconf -Build-Depends-Arch: dh-sequence-python3,
    - libboost-test-dev,
    +Build-Depends-Arch: dh-sequence-python3 <!nopython>,
    +
  • From Aurelien Jarno@21:1/5 to Helmut Grohne on Fri Apr 25 21:40:02 2025
    Hi Helmut,

    On 2025-04-24 08:26, Helmut Grohne wrote:
    Source: libftdi1
    Version: 1.5-10
    Tags: patch
    User: helmutg@debian.org
    Usertags: rebootstrap

    Hi Aurelien,

    I learned that libftdi1 technically became part of the architecture
    cross bootstrap set and that results in severe constraints about what it
    can depend on. The root cause is the addition of libtss2-dev to gnupg's Build-Depends from from libftdi1 via boost it goes really bad. Some
    package will have to get a build profile.

    As part of this, I've looked into libftdi1 and tried reducing its dependencies. I see three main opportunities.
    * We can turn libboost-test-dev optional via <!nocheck>, but we retain
    libboost-dev for libftdipp.

    Agreed.

    * We can make all that Python stuff optional via <!nopython> and that
    works really well, because py3vers returns an empty sequence when
    missing and that makes stuff mostly just work. The exception here is
    override_dh_auto_install-arch, because the last installed version
    "wins". To make things reproducible, the main build needs to be
    installed last.

    The reason why the python build is installed last is to have a correct
    .pc file which includes LIBFTDI_PYTHON_MODULE_PATH, and your patch
    breaks that for the standard builds.

    It also means that the nopython profile produces a slightly different libftdi1-dev, and I am not sure it is something allowed.

    * Making libftdipp (and thus boost) optional is difficult, because the
    CMake files installed into libftdi1-dev contain information about
    libftdipp1-dev and that goes missing if you -DFTDIPP:BOOL=OFF, so
    it'd be unreproducible.

    One way would be to stop using boost, as it seems to only be used for boost::shared_ptr, so there might be an alternative. But that kind of
    change has to be done at the upstream level.

    I'm attaching a patch for the first two items as those feel like fairly direct improvements with little downsides. Would you agree to merge
    them?

    I am find merging the nocheck part, but as explained above, I think the nopython part needs improvements.

    Regards
    Aurelien

    --
    Aurelien Jarno GPG: 4096R/1DDD8C9B aurelien@aurel32.net http://aurel32.net

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Helmut Grohne@21:1/5 to Aurelien Jarno on Fri Apr 25 23:30:01 2025
    Hi Aurelien,

    On Fri, Apr 25, 2025 at 09:35:06PM +0200, Aurelien Jarno wrote:
    The reason why the python build is installed last is to have a correct
    .pc file which includes LIBFTDI_PYTHON_MODULE_PATH, and your patch
    breaks that for the standard builds.

    Oh no. Thanks for catching this. Evidently, I did not compare builds sufficiently well. Otherwise, I would have ruled this out.

    I am find merging the nocheck part, but as explained above, I think the nopython part needs improvements.

    Agreed. Please skip the nopython part. I'll focus more on the gnupg
    side for now.

    Helmut

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Aurelien Jarno@21:1/5 to Aurelien Jarno on Tue May 13 23:50:01 2025
    Hi Helmut,

    On 2025-04-25 21:35, Aurelien Jarno wrote:
    * Making libftdipp (and thus boost) optional is difficult, because the
    CMake files installed into libftdi1-dev contain information about
    libftdipp1-dev and that goes missing if you -DFTDIPP:BOOL=OFF, so
    it'd be unreproducible.

    One way would be to stop using boost, as it seems to only be used for boost::shared_ptr, so there might be an alternative. But that kind of
    change has to be done at the upstream level.

    I have just submitted a patch doing that, let's wait for the review from upstream:

    http://developer.intra2net.com/mailarchive/html/libftdi/2025/msg00013.html

    Regards
    Aurelien

    --
    Aurelien Jarno GPG: 4096R/1DDD8C9B aurelien@aurel32.net http://aurel32.net

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