-
-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
APK is not reproducible #898
Comments
trying to reproduce version 0.6.5 Containerfile: FROM debian:sid-slim
RUN set -ex; \
apt-get update; \
DEBIAN_FRONTEND=noninteractive apt-get install --yes -o APT::Install-Suggests=false --no-install-recommends \
npm \
git \
openjdk-11-jdk ; \
rm -rf /var/lib/apt/lists/*; \
useradd -ms /bin/bash appuser;
USER appuser
ENV NODE_ENV="development" \
ANDROID_SDK_ROOT="/home/appuser/app/sdk/" \
ANDROID_HOME="/home/appuser/app/sdk/"
RUN set -ex; \
mkdir -p "/home/appuser/app/sdk/licenses" "/home/appuser/app/"; \
printf "\n24333f8a63b6825ea9c5514f83c2829b004d1fee" > "/home/appuser/app/sdk/licenses/android-sdk-license"; \
cd /home/appuser/app/; \
git clone https://github.com/ZeusLN/zeus;
WORKDIR /home/appuser/app/zeus/
RUN set -ex; \
git checkout v0.6.5; \
cd /home/appuser/app/zeus/android; \
keytool -genkey -alias zeus_alias -keystore app/zeus.pfx -storetype PKCS12 -keyalg RSA -keysize 4096 -storepass zeus_alias -keypass zeus_alias -validity 10000 -dname CN=IL; \
printf "\nMYAPP_RELEASE_STORE_FILE=zeus.pfx\nMYAPP_RELEASE_STORE_PASSWORD=zeus_alias\nMYAPP_RELEASE_KEY_PASSWORD=zeus_alias\nMYAPP_RELEASE_KEY_ALIAS=zeus_alias\n" >> gradle.properties;
RUN set -ex; \
npm install --force; \
cd /home/appuser/app/zeus/android; \
./gradlew assembleRelease
comparing generated APK to:
|
looks like a solution is WIP at PR: #1055 |
This is now solved with the addition of reproducible builds https://github.com/ZeusLN/zeus#reproducible-builds |
While Issue is solved as APK can be reproduced by written Containerfile below that is based on build.sh script https://github.com/ZeusLN/zeus/blob/a1828c8c3fad9d11364723fedab59dc62ccd1d30/build.sh several improvements are:
build.sh script use base image and based on ubuntu:20.04 with additions from: https://github.com/react-native-community/docker-android/blob/1dd65ea0aacfa91f87ad9df531ca85d244838052/Dockerfile#L1 that install a lot of unnecessary dependencies that wont be installed in the below minimal Containerfile build with: FROM docker.io/ubuntu:20.04
RUN set -ex; \
apt-get update; \
DEBIAN_FRONTEND=noninteractive apt-get install --yes -o APT::Install-Suggests=false --no-install-recommends \
curl \
unzip \
openjdk-11-jdk-headless; \
rm -rf /var/lib/apt/lists/*; \
useradd -ms /bin/bash appuser; \
mkdir -p /olympus/ /opt/node/ /opt/yarn/ /opt/android/ndk/ /opt/android/licenses; \
chown appuser:appuser /olympus/; \
chown -R appuser:appuser /opt/;
USER appuser
ENV NODE_ENV="development" \
ANDROID_SDK_ROOT="/opt/android" \
ANDROID_HOME="/opt/android" \
PATH="/opt/android/ndk/21.4.7075529/:/opt/node/bin/:/opt/yarn/node_modules/.bin/:$PATH"
USER appuser
WORKDIR /olympus/
RUN set -ex; \
printf "\n24333f8a63b6825ea9c5514f83c2829b004d1fee" > "/opt/android/licenses/android-sdk-license"; \
curl -o v0.7.2.zip -L https://github.com/ZeusLN/zeus/archive/refs/tags/v0.7.2.zip; \
unzip v0.7.2.zip -d /olympus/; \
rm v0.7.2.zip; \
mv /olympus/zeus-0.7.2 /olympus/zeus; \
cd /opt/android/ndk/; \
curl -o ndk21.zip -L https://dl.google.com/android/repository/android-ndk-r21e-linux-x86_64.zip; \
echo "ad7ce5467e18d40050dc51b8e7affc3e635c85bd8c59be62de32352328ed467e ndk21.zip" | sha256sum -c ; \
unzip ndk21.zip; \
rm ndk21.zip; \
mv android-ndk-r21e /opt/android/ndk/21.4.7075529/; \
cd /opt/node/; \
curl -o node-v14.19.0-linux-x64.tar.gz -L https://nodejs.org/download/release/v14.19.0/node-v14.19.0-linux-x64.tar.gz; \
echo "223ca31e3440b79a3fe6828161b1843743eaa7610a88c0e1ac1d8e1d815b44cd node-v14.19.0-linux-x64.tar.gz" | sha256sum -c; \
tar -xf node-v14.19.0-linux-x64.tar.gz --strip-components=1; \
rm node-v14.19.0-linux-x64.tar.gz; \
cd /opt/yarn/; \
npm install yarn; \
cd /olympus/zeus; \
yarnpkg install --frozen-lockfile; \
cd /olympus/zeus/node_modules/@lightninglabs/lnc-rn; \
bash fetch-libraries.sh; \
cd /olympus/zeus/android; \
./gradlew assembleRelease; Compared with
|
Glad to see you were able to reproduce! We're updating some things here: #1310 |
Related issues are #463 (diffs from compare f-droid APK to Github/GooglePlay APK) and #416, tried to build version 0.6.0 with Containerfile
compared to APK at:
https://github.com/ZeusLN/zeus/releases/download/v0.6.0/zeus-v0.6.0.apk
sha256sum:4e556a12a6730a75574bdecf37c1537d6578ea55271371b59ca501e922a465dc
Generated APK in:
/home/appuser/app/zeus/android/app/build/outputs/apk/release/app-universal-release.apk
Result is:
The text was updated successfully, but these errors were encountered: