fix flatpak build: add checksums and update to GNOME 49

- Generate cargo checksum files for vendored sources
- Add checksums.json for build-time checksum creation
- Update runtime to GNOME 49 for Rust 1.93+ support
- Fix archive-type to tar-gzip for flatpak-builder

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Jonas Heinrich 2026-03-27 23:06:33 +01:00
parent 256da4b440
commit 09b737b901
4 changed files with 428 additions and 331 deletions

View file

@ -1,6 +1,6 @@
app-id: org.nextbike.NextCompanion
runtime: org.gnome.Platform
runtime-version: '47'
runtime-version: '49'
sdk: org.gnome.Sdk
sdk-extensions:
- org.freedesktop.Sdk.Extension.rust-stable
@ -30,6 +30,16 @@ modules:
build-commands:
- mkdir -p .cargo
- cp cargo-vendor-config/cargo-vendor-config.toml .cargo/config.toml
- |
python3 -c "
import json
with open('cargo-checksums/checksums.json') as f:
checksums = json.load(f)
for name, checksum in checksums.items():
path = f'cargo-vendor/{name}/.cargo-checksum.json'
with open(path, 'w') as f:
json.dump({'files': {}, 'package': checksum}, f)
"
- cargo --offline build --release
- |
install -Dm755 \
@ -46,4 +56,8 @@ modules:
path: build-aux/cargo-vendor-config.toml
dest: cargo-vendor-config
dest-filename: cargo-vendor-config.toml
- type: file
path: build-aux/cargo-sources-checksums.json
dest: cargo-checksums
dest-filename: checksums.json
- build-aux/cargo-sources.json