From 25c8dd58c70bbd3b85fe3b7e88ad0adc107eb7b7 Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Wed, 17 Jun 2026 08:12:21 +0000 Subject: [PATCH] fix(flatpak): drop the Windows client from the workspace for the offline build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The lock prune (a5b99b2) stopped flatpak-builder full-cloning windows-rs (disk-fill), but exposed the next layer: `cargo --offline --locked -p punktfunk-client-linux` resolves the WHOLE workspace, so it still tried to load the now-un-vendored windows-rs source for the punktfunk-client-windows member (its windows-rs git deps are cfg(windows)-gated, but cargo resolves all targets regardless) and failed: "can't checkout ... you are in the offline mode". Drop the Windows client from the workspace members inside the sandbox build (sed on the copied Cargo.toml — the flatpak never compiles it) and remove --locked (the lock no longer matches the reduced member set; --offline still pins every crate to the vendored cargo-sources.json, so the build stays reproducible). android stays — it has no git deps. Verified locally: removing the member, `cargo build -p punktfunk-client-linux --offline` Finishes with zero windows-rs involvement; manifest YAML still valid. Co-Authored-By: Claude Opus 4.8 (1M context) --- packaging/flatpak/io.unom.Punktfunk.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/packaging/flatpak/io.unom.Punktfunk.yml b/packaging/flatpak/io.unom.Punktfunk.yml index b8f989b..da5ae85 100644 --- a/packaging/flatpak/io.unom.Punktfunk.yml +++ b/packaging/flatpak/io.unom.Punktfunk.yml @@ -135,7 +135,18 @@ modules: CARGO_HOME: /run/build/punktfunk-client/cargo CARGO_NET_OFFLINE: 'true' build-commands: - - cargo --offline build --release --locked -p punktfunk-client-linux + # Drop the Windows client from the workspace before building. It pins windows-rs as a + # git dependency (cfg(windows)-gated, but cargo resolves it for the whole workspace + # regardless of target), and that git source is deliberately NOT vendored into + # cargo-sources.json — see packaging/flatpak/prune-windows-lock.py, which strips it so + # flatpak-builder doesn't full-clone the multi-GB windows-rs repo. Without removing the + # member, `cargo --offline` would try to load the un-vendored windows-rs source and fail + # ("can't checkout ... you are in the offline mode"). The flatpak never compiles the + # Windows client; this edits only the sandbox copy of Cargo.toml. (No --locked: the lock + # no longer matches the reduced member set; --offline still pins every crate to the + # vendored cargo-sources.json, so the build stays reproducible.) + - sed -i '\#"crates/punktfunk-client-windows",#d' Cargo.toml + - cargo --offline build --release -p punktfunk-client-linux - install -Dm0755 target/release/punktfunk-client ${FLATPAK_DEST}/bin/punktfunk-client # Desktop entry (renamed to the app id; Exec is the in-sandbox binary). - install -Dm0644 packaging/flatpak/io.unom.Punktfunk.desktop