From d80765b2907bb3ac9457acf750785ea335acea85 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Sat, 10 May 2025 00:19:01 +0930 Subject: [PATCH] ci: explicitly bundle the tunnel service (#9065) Currently, the Tauri build is broken on `main` because #9045 accidentally merged a bit too soon. In that PR, the two binaries that the `gui-client` crate is composed of are now both defined in `src/bin`. For some reason, this breaks Tauri's bundler and now on aarch64, it stops including the `firezone-client-ipc` binary in the bundle. I don't fully understand why and how that even works for x64 in the first place. Nowhere in our repository can I find a configuration for the bundler as to why it should even include that binary in the first place. To fix this, we now explicitly copy this binary into the correct path and also rebuild the `data` archive in addition to the `control` archive. --- rust/gui-client/build.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/rust/gui-client/build.sh b/rust/gui-client/build.sh index 01d149e38..526bb179f 100755 --- a/rust/gui-client/build.sh +++ b/rust/gui-client/build.sh @@ -48,14 +48,45 @@ rm "$BUNDLES_DIR"/*.deb # files inside that dir INTERMEDIATE_DIR=$(ls -d "$BUNDLES_DIR"/*/) +# Delete the archives, we will re-create them. +rm "$INTERMEDIATE_DIR"/*.tar.gz + +# The directory layout of `$BUNDLES_DIR` now looks like this: +# └── firezone-client-gui_1.x.y_$arch +# ├── control +# │   ├── control +# │   └── md5sums +# ├── data +# │   └── usr +# │   ├── bin +# │   │   └── firezone-client-gui +# │   ├── lib +# │   │   ├── systemd +# │   │   │   └── system +# │   │   │   └── firezone-client-ipc.service +# │   │   └── sysusers.d +# │   │   └── firezone-client-ipc.conf +# │   └── share +# │   ├── applications +# │   │   └── firezone-client-gui.desktop +# │   └── icons +# │   └── ... +# └── debian-binary + # Add the scripts cp src-tauri/deb_files/postinst src-tauri/deb_files/prerm "$INTERMEDIATE_DIR/control/" +# Add the IPC service +cp ../target/release/firezone-client-ipc "$INTERMEDIATE_DIR/data/usr/bin/" + pushd "$INTERMEDIATE_DIR" # Rebuild the control tarball tar -C "control" -czf "control.tar.gz" control md5sums postinst prerm +# Rebuild the data tarball +tar -C "data" -czf "data.tar.gz" usr + # Rebuild the deb package, and give it a predictable name that # `tauri-rename-linux.sh` can fix ar rcs "../firezone-client-gui.deb" debian-binary control.tar.gz data.tar.gz