The F-Droid repository is built with the newest F-Droid tools at every release
Build / Desktop, server and tools (push) Successful in 1m9s

- Each release now installs the newest version of F-Droid's own tools that has been out for at least two weeks,
  instead of one fixed version, so the repository keeps up with F-Droid without anyone updating it by hand.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T9uhaCTSycTh1r8At679Pz
This commit is contained in:
thepraandClaude Opus 5.5 committed 2026-10-31 10:54:33 +01:00
1 parent e3ee2be685
commit cafa40decf
3 files changed
+24 -1262

No files matched your search

+15 -14
View File
@@ -19,14 +19,17 @@ patch=$(echo "$version" | cut -d. -f3)
code=$((major * 10000 + minor * 100 + patch))
tools/setup.sh --group fdroid
tools=$(cd "$here/tools/fdroid/linux-x64" && pwd -P)
pinned=$(sed -n 's/^fdroidserver==\([^ ]*\).*/\1/p' packaging/fdroid/requirements.txt)
venv=$tools/fdroidserver-$pinned
if ! "$venv/bin/fdroid" --version > /dev/null 2>&1; then
rm -rf "$venv"
UV_CACHE_DIR=$tools/cache UV_PYTHON_INSTALL_DIR=$tools/python "$tools/uv-x86_64-unknown-linux-gnu/uv" venv -q --python 3.12 "$venv"
UV_CACHE_DIR=$tools/cache "$tools/uv-x86_64-unknown-linux-gnu/uv" pip install -q --python "$venv/bin/python" --require-hashes -r packaging/fdroid/requirements.txt
fi
tools=$here/tools/fdroid/linux-x64
uv=$tools/uv-x86_64-unknown-linux-gnu/uv
work=$(mktemp -d)
trap 'rm -rf "$work"' EXIT
venv=$work/venv
settled=$(date -u -d '14 days ago' +%Y-%m-%dT%H:%M:%SZ)
env -u MEWEB_KEYSTORE_B64 -u MEWEB_KEYSTORE_PASS UV_CACHE_DIR="$tools/cache" UV_PYTHON_INSTALL_DIR="$tools/python" \
"$uv" venv -q --python 3 "$venv"
env -u MEWEB_KEYSTORE_B64 -u MEWEB_KEYSTORE_PASS UV_CACHE_DIR="$tools/cache" \
"$uv" pip install -q --python "$venv/bin/python" --exclude-newer "$settled" fdroidserver
echo "fdroidserver $("$venv/bin/fdroid" --version), the newest released before $settled"
JAVA_HOME=$(ls -d "$here"/tools/jdk/linux-x64/*/ | head -n 1)
ANDROID_HOME=$here/tools/android-sdk
PATH=$JAVA_HOME/bin:$PATH
@@ -35,10 +38,8 @@ export JAVA_HOME ANDROID_HOME PATH
exec 9>>"$root/.lock"
flock -w 2700 9
keys=$(mktemp -d)
trap 'rm -rf "$keys"' EXIT
(umask 077 && printf '%s' "$MEWEB_KEYSTORE_B64" | base64 -d > "$keys/meweb.keystore")
MEWEB_KEYSTORE=$keys/meweb.keystore
(umask 077 && printf '%s' "$MEWEB_KEYSTORE_B64" | base64 -d > "$work/meweb.keystore")
MEWEB_KEYSTORE=$work/meweb.keystore
export MEWEB_KEYSTORE MEWEB_KEYSTORE_PASS
unset MEWEB_KEYSTORE_B64
held=$(keytool -J-Duser.language=en -list -v -keystore "$MEWEB_KEYSTORE" -storepass:env MEWEB_KEYSTORE_PASS -alias meweb | sed -n 's/^.*SHA256: *//p' | tr -d ':')
@@ -79,8 +80,8 @@ done
echo "published ${id}_$code.apk in $root/fdroid/repo"
if [ "$root" = /var/www/packages.arasaka.software ]; then
curl -fsS "$url/entry.jar" -o "$keys/entry.jar"
signed=$(keytool -J-Duser.language=en -printcert -jarfile "$keys/entry.jar" | sed -n 's/^.*SHA256: *//p' | head -n 1 | tr -d ':')
curl -fsS "$url/entry.jar" -o "$work/entry.jar"
signed=$(keytool -J-Duser.language=en -printcert -jarfile "$work/entry.jar" | sed -n 's/^.*SHA256: *//p' | head -n 1 | tr -d ':')
test "$signed" = "$fingerprint"
curl -fsS "$url/index-v2.json" | grep -Eq "\"versionCode\": ?$code\b"
curl -fsSI "$url/${id}_$code.apk" > /dev/null