Skip to content
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

F-Droid recipe updates #1034

Closed
licaon-kter opened this issue Nov 15, 2023 · 10 comments · Fixed by #1036
Closed

F-Droid recipe updates #1034

licaon-kter opened this issue Nov 15, 2023 · 10 comments · Fixed by #1036
Assignees
Labels
Milestone

Comments

@licaon-kter
Copy link
Contributor

licaon-kter commented Nov 15, 2023

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 Catfriend1 self-assigned this Nov 15, 2023
@Catfriend1
Copy link
Owner

Catfriend1 commented Nov 15, 2023

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 #1026

@licaon-kter
Copy link
Contributor Author

licaon-kter commented Nov 15, 2023

"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
Copy link
Owner

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 Catfriend1 added this to the v1.27.0 milestone Nov 15, 2023
@Catfriend1
Copy link
Owner

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
Copy link
Contributor Author

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
Copy link
Owner

Catfriend1 commented Nov 16, 2023

@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
Copy link
Owner

Catfriend1 commented Nov 16, 2023

@Catfriend1
Copy link
Owner

F-Droid paths:

  • build/srclib/syncthing
  • build/com.github.catfriend1.syncthingandroid
  • /builds/Catfriend1/fdroiddata/build/com.github.catfriend1.syncthingandroid/syncthing/src/github.com/syncthing/syncthing

@Catfriend1
Copy link
Owner

@licaon-kter
Copy link
Contributor Author

I've answered there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants