mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-05-30 01:27:28 -04:00
Local Flatpak Verification
Replicates vid's org.meshtastic.desktop GHA flatpak build on your machine so you
can validate flatpak-sources.json end-to-end without round-tripping through his repo.
What it tests that our CI doesn't
Our CI (:desktopApp:assemble :captureFlatpakSources) only proves the manifest can be generated.
Vid's CI is where the manifest actually gets consumed by flatpak-builder. This script
runs that step locally:
- Clones
vidplace7/org.meshtastic.desktop. - Overlays a patched manifest that:
- Swaps the
meshtastic/Meshtastic-Android.gitsource for atype: dirpointing at your local checkout (so you can test uncommitted changes). - Uncomments
- flatpak-sources.json. - Drops
--share=networkfrom the build-args (true offline — what Flathub requires). - Adds
--offlineto the Gradle invocation (belt + suspenders).
- Swaps the
- Runs
flatpak-builderin a Docker container with the same Freedesktop 25.08 SDK vid's GHA image uses.
If your flatpak-sources.json has the wrong URL, wrong sha256, or a missing entry,
the build fails with the same error vid would see. You can iterate in ~5–15 min loops
instead of waiting on cross-repo CI.
Prerequisites
- Docker (Docker Desktop on macOS works — the container needs
--privilegedto use bubblewrap; that's enabled by default). - ~10 GB free disk for the SDK + Gradle cache.
- A populated Gradle cache (
./gradlew :desktopApp:assemblemust have run; the script does this implicitly via:captureFlatpakSources).
Usage
# Full offline build (~10–20 min the first time, faster after — Docker image is cached)
scripts/verify-flatpak/verify.sh
# Cross-arch test via QEMU emulation (slower)
scripts/verify-flatpak/verify.sh --arch aarch64
# Drop into the builder container shell to poke at things
scripts/verify-flatpak/verify.sh --shell
Interpreting failures
| Symptom | Likely cause |
|---|---|
Error downloading mirror: ... 404 on repo.maven.apache.org |
URL captured by the listener was wrong or artifact moved. Check the source repo hosting it. |
sha256 mismatch |
Stale flatpak-sources.json; re-run :desktopApp:assemble :captureFlatpakSources. |
Gradle: Could not resolve all artifacts ... offline mode |
Missing dep in the manifest — usually a compiler plugin or BOM that wasn't downloaded during capture. |
Files
verify.sh— entry point. Idempotent: re-running just re-syncs the overlay and re-runs flatpak-builder.desktop-offline.yaml— patched manifest. Kept in sync manually with vid's upstream; diff againsthttps://raw.githubusercontent.com/vidplace7/org.meshtastic.desktop/main/org.meshtastic.desktop.yamlif vid changes something material.