Skip to content

chore(fdroid): prepare repo for F-Droid submission#42

Open
Xitee1 wants to merge 2 commits into
mainfrom
chore/fdroid-prep
Open

chore(fdroid): prepare repo for F-Droid submission#42
Xitee1 wants to merge 2 commits into
mainfrom
chore/fdroid-prep

Conversation

@Xitee1

@Xitee1 Xitee1 commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Prepares the repo so F-Droid can build SleepTimer from source. F-Droid builds from source and needs three things this repo could not provide: a statically-parseable version, an unsigned release APK, and a changelog for every released versionCode.

Changes

  • app/version.properties (new) — literal versionName/versionCode for F-Droid's checkupdates (UpdateCheckData). The Gradle build still derives the real values from the git tag via axion-release; this file is not read by the build. Bumped per release.
  • app/build.gradle.kts-PdisableSigning now emits an unsigned app-release-unsigned.apk for F-Droid to sign itself. The debug-signing fallback for keyless local/CI builds is preserved; release signing with SIGNING_KEYSTORE_PATH is unchanged.
  • fastlane changelogs — add 101000 (v1.1.0) and 101010 (v1.1.1) in en-US and de-DE; move the misfiled Shizuku-startup-race note out of 100010 (v1.0.1) into 101000, where PR fix: timer runtime correctness, theming, and Shizuku UserService migration #39 actually landed it.
  • .github/workflows/release.yml — new guard step fails the tag build if version.properties disagrees with the tag or a changelog is missing / over 500 chars.
  • AGENTS.md (via CLAUDE.md symlink) — documents the per-release checklist: bump version.properties + hand-write both changelogs before tagging.
  • README.md — correct compileSdk platform 35 → 36.
  • docs/plans/2026-07-06-fdroid-submission.md — the fdroiddata recipe and submission steps for reference (the recipe itself lives in the fdroiddata fork, not this repo).

Verification

  • ./gradlew :app:assembleRelease -PdisableSigningapp-release-unsigned.apk (no signature, no MANIFEST.MF) — what fdroidserver globs for.
  • ./gradlew :app:assembleReleaseapp-release.apk, debug-signed — keyless builds still work.
  • ./gradlew lint → clean.

Follow-ups (not in this PR)

  • After merge: tag v1.1.1 to publish the release the fdroiddata recipe points at.
  • Run the reproducible-builds probe (apksigcopier vs the v1.1.1 GitHub APK) to decide whether F-Droid publishes your signature or its own — a one-way door at inclusion time. See the docs/plans note.
  • Open the fdroiddata MR (needs a GitLab account).

🤖 Generated with Claude Code

Xitee1 and others added 2 commits July 6, 2026 21:01
F-Droid builds from source and needs three things this repo could not
provide: a statically-parseable version, an unsigned release APK, and a
changelog for every released versionCode.

- app/version.properties: literal versionName/versionCode for F-Droid's
  checkupdates (UpdateCheckData). The Gradle build still derives the real
  values from the git tag via axion-release; this file is not read by it.
- app/build.gradle.kts: -PdisableSigning now yields an unsigned release
  APK (app-release-unsigned.apk) for F-Droid to sign; the debug-signing
  fallback for keyless local/CI builds is preserved.
- fastlane changelogs: add 101000 (v1.1.0) and 101010 (v1.1.1) in en-US
  and de-DE; move the misfiled Shizuku-startup-race note out of 100010
  (v1.0.1) into 101000, where PR #39 actually landed it.
- release.yml: fail the tag build if version.properties disagrees with
  the tag or a changelog is missing/over 500 chars.
- AGENTS.md: document the per-release checklist (bump version.properties
  + write both changelogs before tagging).
- README: correct compileSdk platform 35 -> 36.
- docs/plans: fdroiddata recipe and submission steps for reference.

Verified: `assembleRelease -PdisableSigning` -> unsigned APK;
`assembleRelease` -> debug-signed APK; `./gradlew lint` clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A reproducibility probe against the v1.1.0 release (build the tag from a
clean clone, compare zip entries by CRC against the signed GitHub APK)
showed 121/122 entries already byte-identical. The only mismatch was
libdatastore_shared_counter.so (DataStore's native lib, 4 ABIs): CI
strips it host-dependently via the runner's NDK, while a plain build
keeps the pristine AAR bytes.

Add packaging { jniLibs { keepDebugSymbols += "**/*.so" } } so AGP does
not strip native libs — every environment then packages the identical
pristine dependency bytes. Verified: the four .so CRCs now equal the
datastore-core AAR CRCs. With this in the v1.1.1 tag, the GitHub release
APK is also unstripped, so F-Droid's from-source build reproduces it and
can ship the app under the developer signature (AllowedAPKSigningKeys)
instead of F-Droid's key.

Also switch the fdroiddata recipe draft to the reproducible-builds form
(binary: + AllowedAPKSigningKeys 87e5fe65...) and record the probe.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Xitee1

Xitee1 commented Jul 6, 2026

Copy link
Copy Markdown
Owner Author

Reproducibility verified (preliminary) + native-lib fix added

Ran a reproducibility probe against the existing v1.1.0 release before committing to the one-way-door signing decision: built the v1.1.0 tag from a clean clone (unsigned) and compared zip entries by CRC against the signed SleepTimer-v1.1.0.apk.

Result: 121 of 122 entries were already byte-identical — all DEX, resources, and resources.arsc. The only mismatch was libdatastore_shared_counter.so (DataStore's native lib, ×4 ABIs): GitHub Actions strips it host-dependently via the runner's NDK, while a plain build keeps the pristine AAR bytes (which are identical on every machine).

Fix (bc… in this PR): packaging { jniLibs { keepDebugSymbols += "**/*.so" } } so AGP doesn't strip native libs. Verified the four .so CRCs then equal the datastore-core AAR CRCs. With this in the v1.1.1 tag, GitHub's release APK is also unstripped → F-Droid's from-source build reproduces it → the app can ship under your signature (AllowedAPKSigningKeys 87e5fe65…) rather than F-Droid's key, so users cross-update between GitHub and F-Droid.

The recipe draft in docs/plans/ is updated to the reproducible-builds form. The definitive check is F-Droid CI on the submission MR; given only the now-fixed .so differed, it should pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant