-
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
artifact url improvment for f-droid binaries #9210
Comments
I have made the required metadata to build the app, but I'm having a hard time reproducing the exact apk |
can you list possible things that can cause the build to vary ? |
I even tried replacing the base image with |
Thank you for looking into this!
I think we could drop the trailing Lines 1 to 2 in 9a5edfd
We could have Maybe we could pass in the versionCode ourselves via an environment variable ( |
hmmm |
and I think as you pointed out dropping the trailing 0 would cause the generated versionCode number to be less than previous builds, and needs manual generation with taking into account the dropped 0 |
I have opened the MR: https://gitlab.com/fdroid/fdroiddata/-/merge_requests/15858 |
F-droid has requested that the arch number to be put at the end of the version code: but it makes me wonder if its safe to do so at this point since the major version is at 4, I guess we need to bump it to 5 to be fine (as x86_64 is probably at 44050500, we need to go higher than that) |
Ok, so that's another reason to change the versionCode calculation (in addition to dropping the |
Use our own logic to go from ELECTRUM_VERSION to numeric android versionCode, instead of using the default conversion done by python-for-android. Even before this, we were already patching p4a to modify their logic (see [0]). This commit changes that logic again, and moves it into a separate script in our repo. - calculation change is due to the f-droid maintainers asking for the arch code to be in the least significant digits (instead of most sig digits) (see [1]) [0]: SomberNight/python-for-android@edb7e4f [1]: spesmilo#9210 (comment)
Use our own logic to go from ELECTRUM_VERSION to numeric android versionCode, instead of using the default conversion done by python-for-android. Even before this, we were already patching p4a to modify their logic (see [0]). This commit changes that logic again, and moves it into a separate script in our repo. - calculation change is due to the f-droid maintainers asking for the arch code to be in the least significant digits (instead of most sig digits) (see [1]) [0]: SomberNight/python-for-android@edb7e4f [1]: spesmilo#9210 (comment)
Use our own logic to go from ELECTRUM_VERSION to numeric android versionCode, instead of using the default conversion done by python-for-android. Even before this, we were already patching p4a to modify their logic (see [0]). This commit changes that logic again, and moves it into a separate script in our repo. - calculation change is due to the f-droid maintainers asking for the arch code to be in the least significant digits (instead of most sig digits) (see [1]) I have pushed and changed to a new p4a branch, which is just a copy of the previous one with 3 commits related to versionCode calc squashed. [0]: SomberNight/python-for-android@edb7e4f [1]: spesmilo#9210 (comment)
hmm, |
I don't know if it's still possible to reproduce the same binary as 4.5.5 if we include a commit such as 6b71367. I will try to cherry-pick stuff and then have a 4.5.6 released. |
hmm, with exclusion commit and fastlane metadata on top of 4.5.5 tag, its possible to get the same release I believe, (build spec is excluded from the build so I don't think it affects the content) |
Ok, well, if you want to try, and in case 4.5.6 takes longer, I pushed a branch now: https://github.com/spesmilo/electrum/commits/4.5.5-fdroid/ |
Uh. I completely forgot about SOURCE_DATE_EPOCH in makefile. can you make an amend with a new commit with the date of the one on 4.5.5 ? is it possible ? |
Also, I'm not sure, but maybe it's a good idea to fix the SOURCE_DATE_EPOCH on future releases to a specific date ? |
oh okay, we can just checkout 4.5.5 in prebuild it seems. you don't need to do anything. |
Use our own logic to go from ELECTRUM_VERSION to numeric android versionCode, instead of using the default conversion done by python-for-android. Even before this, we were already patching p4a to modify their logic (see [0]). This commit changes that logic again, and moves it into a separate script in our repo. - calculation change is due to the f-droid maintainers asking for the arch code to be in the least significant digits (instead of most sig digits) (see [1]) I have pushed and changed to a new p4a branch, which is just a copy of the previous one with 3 commits related to versionCode calc squashed. [0]: SomberNight/python-for-android@edb7e4f [1]: #9210 (comment)
I thought about this a bit now. Maybe we could change p4a not to rely on the timestamp when deciding whether to unpack new files. I guess the naive way would be to have it hash the archive that it is considering to unpack, and use that hash as basis of comparison (instead of version+timestamp). I imagine they are not doing this because it is expensive to read and hash the whole archive on every app start. But maybe there is a faster alternative, e.g. it might be possible to grab a crc32 checksum in constant time (if it's stored as an attribute of the archive) and use that for comparison. |
I see and we wouldn't need to do stuff like this after the f-droid build is stable, and everyone trying to reproduce will always checkout the tag, so yeah I guess It's okay |
Also I think as we no longer need to change the url, I'll close this issue |
Hi
I'm trying to do the necessary work for releasing this app on f-droid, regarding issue #1700
it would be nice if there could be some adjustments made to the website to help ease stuff a bit for reproducible builds
currently the url is like this:
https://download.electrum.org/4.5.5/Electrum-4.5.5.0-arm64-v8a-release.apk
it would be nice if you can make
https://download.electrum.org/4.5.5.0/Electrum-4.5.5.0-arm64-v8a-release.apk
also point to the same file (4.5.5.0
->4.5.5
redirection)I'll also open a PR for adding the fastlane metadata files for f-droid, which can help you control the metadata without opening MRs on f-droid
if you don't like the idea of metadata living inside the repo, I can still add it directly to f-droid repo, It's your decision
The text was updated successfully, but these errors were encountered: