Repository navigation
K2GO-421 feat(fdroid): self-hosted F-Droid repository on R2 - #816
Merged
Merged
Conversation
…oid repo on R2 tools/fdroid-repo/publish.sh pulls the published repo from R2, adds the fdroid APK of the release, runs fdroid update (Debian trixie), verifies, makes the landing page, and uploads in a safe order (files first, then the indexes, then entry.jar, then the page; deletions last). - The repo index is signed with the app signing key (same secrets). - verify stops the run when the release APK is missing, signed by another key, or when the index names a file that is not there. - The landing page uses the look of the add-ons site, a fdroid.link "Add to F-Droid" link and QR code, and an SVG app icon made from the adaptive icon of the app. It is also served at the repo address. - r2_mock_server.py serves a folder the way R2 does, for a local test.
app-fdroid-repo.yml publishes the F-Droid repository from the fdroid APK that the release job put on R2. "App+Play: 2. publish release" calls it after the release job (live fdroid/). A manual run writes fdroid-staging/ by default. Release candidates never reach the repository.
Decisions of the maintainer: prefix fdroid/ on k2go-apk-repo, the fdroid flavor, one signing key for the app and the repo index, three versions plus archive, R2 as the only state, and the look of the add-ons site.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
tools/fdroid-repo/: builds the self-hosted F-Droid repository of Knowledge to Go from the fdroid APK on R2, and publishes it to the bucketk2go-apk-repounderfdroid/(signed index, APKs, landing page)..github/workflows/app-fdroid-repo.yml: new workflow. "App+Play: 2. publish release" calls it after the release job. A manual run writesfdroid-staging/.controller/docs/ADR-K2GO-421-self-hosted-fdroid-repo.md: the design (Accepted).Why
F-Droid users can add one repository and get Knowledge to Go and its updates from us, while the official f-droid.org inclusion is open (K2GO-399).
Steps to QA
Baseline:
https://k2go-download.appdevforall.org/fdroid/reposhows "Object not found".Change (local test,
tools/fdroid-repo/README.md):publish.shwithLOCAL_BUCKET, a test keystore and an APK signed with it.r2_mock_server.py --bind 0.0.0.0and open/fdroid/index.htmlon a phone on the same Wi-Fi.After the merge: run "App: publish F-Droid repo" by hand for
v1.2.0with staging on, then add the staging repository in F-Droid.Verifications
python -m unittest -v test_fdroid_repo). shellcheck and actionlint are clean on the new files./fdroid/repo/entry.jarand/fdroid/repo/index*, before the next final release. The first run on real R2 is the staging run.Notes