Catfriend1 / syncthing-android

Syncthing-Fork - A Syncthing Wrapper for Android.
Mozilla Public License 2.0
1.2k stars 40 forks source link

F-Droid recipe updates #1034

Closed licaon-kter closed 9 months ago

licaon-kter commented 9 months ago

Looking at https://monitor.f-droid.org/builds/log/com.github.catfriend1.syncthingandroid/1260002#site-footer lines 320-344 I see some issues that I'd like to fix:

Catfriend1 commented 9 months ago

Hi,

build-syncthing currently defines GO 1.21.4 and NDK r25b, in F-Droid I recall there was a build issue I couldn't easily fix some time ago and gave up so this should be some r24(*) NDK. The binary version to build from SyncthingNative currently is v1.26.1. This is defined in "SyncthingNative_update_and_build.cmd", the git submodule pointer and "build-syncthing.py".

I got used to use these files to define what the dependencies versions are and enjoy they are the same across GPlay, GitHub and F-Droid builds.

Which changes to my workflow would arise changing this according to your suggestion? Will we get advantages?

# Follow-Up to https://github.com/Catfriend1/syncthing-android/issues/1026

licaon-kter commented 9 months ago

"Advantage" is less random binaries downloads, and using F-Droid's workflow to actually build from source :)

My issue would be with having an easy way to grep tools versions, which Go version we need, which SDK we use, which syncthing commit you track.

Catfriend1 commented 9 months ago

So we would need to adjust the build-syncthing.py script on my side. What are the exact new paths to GO/NDK if I get them via fdroiddata definition? Is there a way for me to quickly throw out changed versions of the script and see if F-Droid builds successfully with it - i.e. "a debug way giving me the final unsigned APK on success"?

I must admit that I got lazy in the past changing the linux build script because it cost a lot of time if F-Droid can't build to try/patch/tag/wait/retry. Or is there maybe somebody on your team that can help to adjust the script? If we can't find a script compatible with F-Droid and my Windows builder by taking not too much time for this task, maybe a constant switch in the script could be set, defaulting to "FDROID_BUILD=1". I could then override it locally when I use my Windows builder to do the GitHub release.

Catfriend1 commented 9 months ago

What the build script already supports: If the env var ANDROID_NDK_HOME is set, it won't download the ndk but use it.

The same happens if you put the "go" binary on the path. The script discovers it and skips the prebuilt go download.

licaon-kter commented 9 months ago

If the env var ANDROID_NDK_HOME is set, it won't download the ndk but use it.

Yes, but which version 21 or 26? so we'll grep https://github.com/Catfriend1/syncthing-android/blob/v1.26.1.0/syncthing/build-syncthing.py#L28

The same happens if you put the "go" binary on the path. The script discovers it and skips the prebuilt go download.

Yes, but might fail if I give it 1.19 from Debian Bulleye when it expects 1.21? So we'll use https://github.com/Catfriend1/syncthing-android/blob/v1.26.1.0/syncthing/build-syncthing.py#L24

Syncthing upstream commit/tag/hash is written somewhere?

Catfriend1 commented 9 months ago

@licaon-kter What you have linked above can be taken for go+ndk, correct.

The SyncthingNative code is pointed to here: https://github.com/Catfriend1/syncthing-android/tree/main/syncthing/src/github.com/syncthing

The submodule points to v1.26.1 atm. This leads to https://github.com/syncthing/syncthing/tree/b014a9ebc2d9e2f95bfbf94f21c058292b2b5ff8

Catfriend1 commented 9 months ago
Catfriend1 commented 9 months ago

F-Droid paths:

Catfriend1 commented 9 months ago

New recipe update MR: https://gitlab.com/fdroid/fdroiddata/-/merge_requests/14064

licaon-kter commented 9 months ago

I've answered there