Downstream of registry.gitlab.com/fdroid/docker-executable-fdroidserver:master,
patched for publishing F-Droid repos over IPFS:
- install Debian ipfs-cid so fdroidserver populates ipfsCIDv1 on every
package file (APKs, icons, screenshots), which fdroidclient with an
IPFS-gateway mirror routes via CID natively
- rehash.py wrapper that adds ipfsCIDv1 to entry["index"], renames the
index to a content-addressed filename, and re-signs entry.jar after
`fdroid update` — closes the cache-busting gap on the index file itself
- entrypoint.sh chains rehash automatically after any `fdroid update`,
so existing fdroid-via-docker wrappers need no changes
See SPEC.md for the rationale and Change 2's algorithm; README.md for
end-user usage.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
# fdroidserver-ipfs entrypoint.
|
||||
#
|
||||
# Mirrors the upstream image's behavior — sources bsenv.sh, runs
|
||||
# ${fdroidserver}/fdroid with the given args — then automatically invokes
|
||||
# fdroidserver-ipfs-rehash after a successful `fdroid update` so callers
|
||||
# don't have to remember the second step.
|
||||
|
||||
set -eu
|
||||
. /etc/profile.d/bsenv.sh
|
||||
|
||||
GRADLE_USER_HOME="${home_vagrant}/.gradle" "${fdroidserver}/fdroid" "$@"
|
||||
|
||||
# Auto-rehash after a successful update. We check every arg (not just $1)
|
||||
# so global flags before the subcommand (e.g. `-v update`) still trigger it.
|
||||
for arg in "$@"; do
|
||||
if [ "$arg" = "update" ]; then
|
||||
fdroidserver-ipfs-rehash
|
||||
break
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user