• Bug#1103806: akonadi-search FTCBFS: builds rust component for the build

    From Helmut Grohne@21:1/5 to All on Mon Apr 21 19:20:01 2025
    Source: akonadi-search
    Version: 4:24.12.3-1
    Tags: patch
    User: debian-cross@lists.debian.org
    Usertags: ftcbfs
    X-Debbugs-Cc: debian-cross@lists.debian.org, debhelper@packages.debian.org, nilesh@debian.org

    akonadi-search fails to cross build from source, because it builds a
    Rust-based component for the build architecture. It's a CMake package in principle and uses corrosion (a CMake recipe for integrating a Rust
    crate into a CMake project) to have part of its source be implemented in
    Rust. And here comes the catch. Corrosion cannot detect the Rust
    architecture from other CMake variable and needs to be told via Rust_CARGO_TARGET. Nothing sets this and hence akonadi-search fails to
    cross build.

    Now the attached patch simply sets that variable from debian/rules, but
    this is a generic problem that likely affects all (4) reverse
    dependencies of corrosion. The question arises whether something else
    should be setting this variable anticipating more widespread adoption of corrosion. Any thoughts?

    Helmut

    diff --minimal -Nru akonadi-search-24.12.3/debian/changelog akonadi-search-24.12.3/debian/changelog
    --- akonadi-search-24.12.3/debian/changelog 2025-03-29 18:49:31.000000000 +0100
    +++ akonadi-search-24.12.3/debian/changelog 2025-04-15 21:18:50.000000000 +0200
    @@ -1,3 +1,10 @@
    +akonadi-search (4:24.12.3-1.1) UNRELEASED; urgency=medium
    +
    + * Non-maintainer upload.
    + * Fix FTCBFS: Pass Rust_CARGO_TARGET to cmake. (Closes: #-1)
    +
    + -- Helmut Grohne <helmut@subdivi.de> Tue, 15 Apr 2025 21:18:50 +0200
    +
    akonadi-search (4:24.12.3-1) unstable; urgency=medium

    [ Patrick Franz ]
    diff --minimal -Nru akonadi-search-24.12.3/debian/rules akonadi-search-24.12.3/debian/rules
    --- akonadi-search-24.12.3/debian/rules 2024-12-18 22:30:27.000000000 +0100
    +++ akonadi-search-24.12.3/debian/rules 2025-04-15 21:18:48.000000000 +0200
    @@ -28,7 +28,7 @@
    override_dh_auto_configure:
    $(CARGO) prepare-debian debian/cargo_registry --link-from-system
    rm -f $(CURDIR)/agent/rs/htmlparser/Cargo.lock
    - dh_auto_configure
    + dh_auto_configure -- -DRust_CARGO_TARGET=$(DEB_HOST_RUST_TYPE)

    override_dh_makeshlibs: