Skip to content

Commit 4eb6919

Browse files
JSKittyclaude
andcommitted
fix(fdroid): pin the toolchain inside the recipe, not the whole repo
A root rust-toolchain.toml moved every build and CI job to the April stable, when the recipe is the only thing that needs a fixed rustc. scripts/fdroid-build.sh now installs 1.98.0 and tauri-cli 2.9.6 itself, so the workflows and the fdroiddata metadata carry no version of their own. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
1 parent f80103a commit 4eb6919

6 files changed

Lines changed: 16 additions & 26 deletions

File tree

‎.github/workflows/fdroid.yaml‎

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ on:
1616
- docs/fdroid/**
1717
- package.json
1818
- package-lock.json
19-
- rust-toolchain.toml
2019
- src-tauri/Cargo.toml
2120
- src-tauri/Cargo.lock
2221
- src-tauri/tauri.fdroid.conf.json
@@ -37,11 +36,9 @@ jobs:
3736
with:
3837
node-version: 20
3938

40-
# Reads rust-toolchain.toml, the same pin F-Droid's recipe installs.
41-
- uses: dtolnay/rust-toolchain@master
42-
with:
43-
toolchain: 1.95.0
44-
targets: aarch64-linux-android
39+
# Only rustup is needed here; scripts/fdroid-build.sh installs the
40+
# toolchain it pins.
41+
- uses: dtolnay/rust-toolchain@stable
4542

4643
- uses: actions/setup-java@v4
4744
with:
@@ -60,9 +57,6 @@ jobs:
6057
sudo apt-get update
6158
sudo apt-get install -y cmake clang libclang-dev pkg-config
6259
63-
- name: Tauri CLI from source
64-
run: cargo install tauri-cli --version 2.9.6 --locked
65-
6660
- name: Prepare (network stage)
6761
run: scripts/fdroid-build.sh prepare
6862

‎.github/workflows/publish.yaml‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -276,10 +276,9 @@ jobs:
276276
with:
277277
node-version: 20
278278

279-
- uses: dtolnay/rust-toolchain@master
280-
with:
281-
toolchain: 1.95.0
282-
targets: aarch64-linux-android
279+
# Only rustup is needed here; scripts/fdroid-build.sh installs the
280+
# toolchain it pins.
281+
- uses: dtolnay/rust-toolchain@stable
283282

284283
- uses: actions/setup-java@v4
285284
with:
@@ -298,9 +297,6 @@ jobs:
298297
sudo apt-get update
299298
sudo apt-get install -y cmake clang libclang-dev pkg-config
300299
301-
- name: Tauri CLI from source
302-
run: cargo install tauri-cli --version 2.9.6 --locked
303-
304300
- name: Build the F-Droid flavour
305301
run: scripts/fdroid-build.sh
306302

‎docs/fdroid/README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ tag matches it (F-Droid strips both signatures and compares), uncomment `Binarie
7676
`AllowedAPKSigningKeys` in the metadata. From then on F-Droid publishes Vector's own signature, and
7777
the app carries the reproducible badge.
7878

79-
What already holds the two builds together: the pinned Rust toolchain (`rust-toolchain.toml`), NDK
80-
`29.0.14206865`, `tauri-cli` 2.9.6, `--remap-path-prefix` on every path that differs between
79+
What already holds the two builds together: the Rust toolchain and `tauri-cli` versions pinned at
80+
the top of `scripts/fdroid-build.sh`, NDK `29.0.14206865`, `--remap-path-prefix` on every path that differs between
8181
machines, and `SOURCE_DATE_EPOCH` from the commit. What can still break it and has not been
8282
measured yet: whisper.cpp's cmake build, R8 output across JDK builds, and Gradle's APK packaging.
8383
The first F-Droid build of a tag will say which, in their `verification` log.

‎docs/fdroid/io.vectorapp.yml‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@ Builds:
4343
ndk: 29.0.14206865
4444
prebuild:
4545
- cd ../../../..
46-
- export PATH="$HOME/.cargo/bin:$PATH"
47-
- rustup toolchain install 1.95.0 --profile minimal --target aarch64-linux-android
48-
- rustup default 1.95.0
49-
- cargo install tauri-cli --version 2.9.6 --locked
5046
- scripts/fdroid-build.sh prepare
5147
build:
5248
- cd ../../../..

‎rust-toolchain.toml‎

Lines changed: 0 additions & 4 deletions
This file was deleted.

‎scripts/fdroid-build.sh‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,15 @@ export ANDROID_NDK_HOME="$NDK_HOME"
1717
export ANDROID_NDK="$NDK_HOME" # cmake's Android toolchain (whisper.cpp)
1818
export PATH="$HOME/.cargo/bin:$PATH"
1919

20+
# The one place the toolchain is pinned: F-Droid's rebuild has to compile
21+
# with the same rustc and Tauri CLI as the released flavour it is compared to.
22+
RUST_TOOLCHAIN=1.98.0
23+
TAURI_CLI_VERSION=2.9.6
24+
export RUSTUP_TOOLCHAIN="$RUST_TOOLCHAIN"
25+
2026
prepare() {
27+
rustup toolchain install "$RUST_TOOLCHAIN" --profile minimal --target aarch64-linux-android
28+
cargo install tauri-cli --version "$TAURI_CLI_VERSION" --locked
2129
npm ci --ignore-scripts
2230
# Globs expand here, after npm ci: a fresh clone has no node_modules yet.
2331
rm -rf node_modules/@tauri-apps/cli node_modules/@tauri-apps/cli-* \

0 commit comments

Comments
 (0)