Without this, every update left another renamed index lying in repo/ forever — pinning the repo to IPFS would keep re-pinning all of them. Also strip a pre-existing -<hex12> suffix from the stem before computing the new one, so re-running rehash standalone (without an intervening fdroid update) is idempotent instead of producing index-v2-abc-def.json. diff/*.json doesn't need the same treatment: fdroidserver's make_v2() already wipes the whole diff/ directory at the start of every update. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
fdroidserver-ipfs
Downstream of registry.gitlab.com/fdroid/docker-executable-fdroidserver:master,
patched for publishing F-Droid repos over IPFS. See SPEC.md for the why.
Usage
Drop-in replacement for the upstream image. Run fdroid update exactly as
before — the image's entrypoint chains fdroidserver-ipfs-rehash after any
successful update, so you never have to remember the second step:
docker run --rm -v "$PWD:/repo" your-image-tag update
# ↑ runs `fdroid update`, then automatically renames index, adds ipfsCIDv1,
# re-signs entry.jar (and regenerates entry.json.asc if GPG was in the loop).
Every other subcommand (build, publish, gpgsign, …) passes straight
through to fdroid unchanged.
Running the rehash standalone
If you want to invoke the rehash directly (e.g. on an already-published repo):
docker run --rm -v "$PWD:/repo" \
--entrypoint fdroidserver-ipfs-rehash \
your-image-tag
fdroidserver-ipfs-rehash discovers repo/ (and archive/ if configured)
from config.yml. If GPG signing was already part of your pipeline (i.e.
entry.json.asc exists), it invokes fdroid gpgsign itself to regenerate
the invalidated signatures. Pass repodirs explicitly to override discovery:
fdroidserver-ipfs-rehash repo archive