-
-
Notifications
You must be signed in to change notification settings - Fork 463
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
Reproducible Builds #4120
Comments
@IzzySoft Thank you, I agree there is a weakness here. One thing is that I consider a bad practice to make the source code compilation depending formally from the revision code system. @MohitMaliFtechiz Can you please propose a solution where the date comes from outside the piece of code to compute the APK (version). Obviously this should still be easy to compile, that means it should be trivial for the developer to retrieve automatically the date from the git |
@kelson42 For the RB(Reproducible Builds) of the latest release. We can do the following things:
In this approach, we can build the APK with the same version code(As the release APK has). Since building with the git HEAD can have a different date, if commits are added at later dates. So to generate with exact versioncode it is better to pass the date via env. Here @IzzySoft already has the date I guess. Since they starts the new build based on the GitHub release. |
Well, maybe not ideal – but still better than making it dependent on the time a build is run 😉
Confirmed. Especially if it can be done automatically as you described (
Sounds reasonable, thanks! Shall we give that a try with the next release?
Exactly: we build from the commit the tag points to – and compare the resulting APK against the one attached to the very same tag. |
@IzzySoft Thanks for the confirmation.
Yeah sure, I am making the changes in code for this. |
Wonderful! If you give me a ping when that release is up, I can adjust things here before the regular daily run, processing it manually in advance (instead of delaying the batch). |
@IzzySoft You can have an idea if issues are planned or not and when by monitoring the milestone attached to the issue. Here this is clearly included in the current milestone = next release. |
@kelson42 forgive me, but I cannot monitor hundreds of projects. So a ping would be really appreciated. Otherwise it will simply take longer, and might include a failed build 🤷♂ |
@IzzySoft I will ping you once we release the new version.
I think after making these changes, the release will be automatically done(No need for ping)? |
We need to adjust the recipe once manually to establish that change. Next releases then should work automatically, as the recipe will be "copied & adjusted" automatically. So yes, a one-time ping – then all should work fine automatically (until some other change breaks things 🙈). |
At IzzyOnDroid we support Reproducible Builds (see: Reproducible Builds, special client support and more at IzzyOnDroid). I finally managed to get Kiwix RB, but only with a little trick – because you calculate
versionCode
based on build time, which can never be RB:kiwix-android/buildSrc/src/main/kotlin/VersionCodeGenerator.kt
Lines 22 to 38 in 116180e
So what I did to check if that's the only show-stopper there:
And it did the trick. As that would require to manually update at each release after a failed build gives us the correct number, may I kindly ask you to re-think that dynamic creation of your
versionCode
? If you really need to calculate it, maybe base it on commit information? Like:would give you the number of commits at that point, which you then can use to add to your
baseVersionCode
.We'd appreciate if you could help making your build reproducible. We've also prepared some hints on reproducible builds for that.
Looking forward to your reply!
The text was updated successfully, but these errors were encountered: