chvp / NanoLedger

Ledger (plain text accounting) data entry app for Android
MIT License
35 stars 3 forks source link

F-Droid can't build #138

Open licaon-kter opened 6 days ago

licaon-kter commented 6 days ago

ref: https://gitlab.com/fdroid/fdroiddata/-/jobs/7198511509#L843

diff log: nano40100.log

/LE: fyi https://gitlab.com/fdroid/fdroiddata/-/commit/4ea2ca7bcf9e3eaf1ee66b69c82181dabd447766

chvp commented 6 days ago

Do you have any idea on how to fix this issue? Neither https://gitlab.com/fdroid/wiki/-/wikis/HOWTO:-diff-&-fix-APKs-for-Reproducible-Builds nor https://f-droid.org/docs/Reproducible_Builds/#potential-sources-of-unreproducible-builds seem to mention differences in smali files.

licaon-kter commented 6 days ago

smali files are disassembled from classes.dex, fyi

did you build the APK from https://github.com/chvp/NanoLedger/commit/c21e13bd5ca7213cda52290bf435c83513f9894b for sure? Maybe try to clean up all caches as rebuild?

attach the APK here so I can test locally maybe

chvp commented 6 days ago

The APK is built in GitHub actions, definitely from that commit: https://github.com/chvp/NanoLedger/actions/runs/9680655127/job/26709312310#step:2:83

GitHub does not keep build cache, it only caches dependencies, so it was built with a clean cache. The APK can be found here: https://github.com/chvp/NanoLedger/releases/tag/v0.4.0.

chvp commented 6 days ago

Looking at the docs here though, it might be due coreLibraryDesugaring (this was introduced relatively recently). Although that bug was fixed in 2021 apparently, so it seems weird that this would still be an issue.

chvp commented 5 days ago

I've tried to "fix" the issue in #139, I will follow the pipelines in the fdroiddata repo to see if it is actually fixed.

licaon-kter commented 5 days ago

great https://gitlab.com/fdroid/fdroiddata/-/commit/60ad0d7dcf6ac37842689bdeb9f00be0af816d2a

chvp commented 5 days ago

It seems to still fail though? https://gitlab.com/fdroid/fdroiddata/-/jobs/7211423746

licaon-kter commented 5 days ago

yeah, I'm already looking into it locally :(

licaon-kter commented 5 days ago

I've disabled again: https://gitlab.com/fdroid/fdroiddata/-/commit/fc9f8774d19a102197993a91dc343270438c3cdb

testing locally, I can see:

tested on 2 machines

tested with limiting CPU cores to 1, 2, 4

not sure I see a pattern but I did see the same APK between these 2 machines, on multiple runs (yet not success vs yours)

@linsui thoughts?

linsui commented 4 days ago

Maybe https://github.com/chvp/NanoLedger/blob/main/.github/workflows/release.yml#L28 is related.

licaon-kter commented 4 days ago

Good find, looks that maybe we can do the same in postbuild then, install that sdk 34, use its zipalign

chvp commented 4 days ago

I can look into upgrading to SDK 35 as well, that's probably a more future-proof solution.

chvp commented 4 days ago

I made another release that uses the latest build tools to build the APK.

linsui commented 4 days ago

https://gitlab.com/linsui/fdroiddata/-/jobs/7220014923 Now the dex file is also different...

licaon-kter commented 2 days ago

nano40300.log here's the diff

chvp commented 22 hours ago

Oh, I reverted the removal of useCoreLibraryDesugaring because it didn't fix the issue, I didn't realize that the issue was apparently two-fold. I'll revert the revert and make a new release. Hopefully that will finally fix it.

chvp commented 22 hours ago

Made another release :crossed_fingers:

linsui commented 11 hours ago

Hmmm https://gitlab.com/fdroid/fdroiddata/-/jobs/7251713529

nanoledger-v0.4.3.apk.html.zip