Verified Commit 1d37b9fc authored by Sheogorath's avatar Sheogorath 🏰
Browse files

fdroid: Add initial fdroid-CLI

This patch provides an initial version of a working fdroid-CLI that runs
in a container. The container itself is built on demand from debian and
fixes some execution errors by patching `apksigner`.

This is used instead of the upstream package, since it includes the
android SDK by itself instead of expecting it being installed on the
host. However, it's far from perfect and the build job might hangs, even
though it was successfully commited to the podman repository.

It's left up to fruther investigation, why this happens. Meanwhile
restarting the CLI once the image is built, should fix it.
parent 3003b0df
#!/bin/bash
if ! podman image exists localhost/fdroid:cli; then
podman build -t localhost/fdroid:cli - <<EOF
FROM docker.io/library/debian:10
RUN true \
&& apt-get update \
&& apt-get install -y fdroidserver apksigner \
&& mkdir -p /repo \
&& true
RUN true \
&& rm /usr/bin/apksigner \
&& printf "#!/bin/sh\njava -jar /usr/lib/android-sdk/build-tools/debian/apksigner.jar" > /usr/bin/apksigner \
&& true
WORKDIR /repo
ENTRYPOINT ["fdroid"]
CMD ["--help"]
EOF
fi
podman run --dns 127.0.0.53 --rm -v "$(pwd):$(pwd)" -w "$(pwd)" --network host localhost/fdroid:cli $@
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment