-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Make APK builds reproducible more reliably #9215
Comments
That might be fixed by patching python-for-android here: See https://docs.python.org/3/library/compileall.html#cmdoption-compileall-s note: the -s flag was added in python 3.9. The latest release still uses python 3.8, but git master uses 3.10 for android. Are the |
Finally I was able to reproduce the build by using the exact same paths as docker ( I'm glad I was able to pinpoint the issue after over 100+ builds :D |
I'm currently in the process of making the needed steps more compact for creating the f-droid MR, so that it gets accepted faster and easier to review (it takes a couple more builds to ensure things don't break) |
hmm, can you try patching it on your side to see if it strips the unnecessary paths ? (each build takes ~2h on gitlab and +4h on my pc) |
to have SomberNight/python-for-android@58d21ad > reproducible apks: strip file path prefix from .pyc files related: #9215
I think I fixed the EDIT: as this patch is quite small, I'll try to upstream it in kivy/python-for-android#3066 Not sure about the .so files or other differences, I did not have time to look at those. The above change only affects the pyc-generation. |
if it fixes pyc, it should probably also fix so files I guess |
some stuff I tried and the build is still reproducible (comparing to Dockerfile):
|
It seems like NDK path is also affecting the builds, specifically its affecting the .so files. I have no idea whats going on there. |
how does the build decide to include a file in |
Is the fastlane folder getting included in the apk? See the buildozer electrum/contrib/android/buildozer_qml.spec Lines 21 to 22 in 6d593e3
and contrib/android/blacklist.txt
|
I think yes, but I haven't tested. I asked because of that exactly |
I have tested now and indeed it is being packed into the apk. Fixed in 6b71367. |
It seems we have to disable some stuff in android gradle settings: |
hey @SomberNight , sorry about the mention, can you take a look at the fdroid MR comment? |
- to include spesmilo/python-for-android@d4432ec see #9215 (comment) - and add a fixme to revisit apkdiff re horrors beyond my comprehension
Ok, done in 071150f I've also sent a patch upstream (kivy/python-for-android#3069). |
to have SomberNight/python-for-android@58d21ad > reproducible apks: strip file path prefix from .pyc files related: #9215
- to include spesmilo/python-for-android@d4432ec see #9215 (comment) - and add a fixme to revisit apkdiff re horrors beyond my comprehension
let's keep this one open till the next f-droid MR with auto updates enabled is created & merged |
note: version 4.5.6 is now released |
thanks for letting me know |
created the MR: |
also it seems Electrum 4.5.5.0 has been released on f-droid! |
the new version also merged. |
related to #9210
opened since it needs its own issue
currently the
.pyc
files inprivate.tar
embeds the full path to files, which makes the builds not reproducible when compiled on different paths/environments, which should not be happeningThe text was updated successfully, but these errors were encountered: