nmeum / android-tools

Unoffical CMake-based build system for android command line utilities
Apache License 2.0
177 stars 51 forks source link

Allow to use patch instead of git to apply patches #135

Closed Thaodan closed 5 months ago

Thaodan commented 5 months ago

Useful inside builders where there's no git installed.

sgn commented 5 months ago

Is there any reason you need to apply those patches without git? The patches only need to be applied on a git checkout.

For the released version, the tar-balls have patches already applied, no?

Thaodan commented 5 months ago

We don't use release tarballs but generate them the pristine sources. If one builds against the source tarballs generated from Github the builds are also not patches.

From my point of view patching the upstream sources after the fact is better to narrow down issues during packaging if they exists e.g. if a patch is false or breaks something.

Biswa96 commented 5 months ago

We don't use release tarballs but generate them the pristine sources.

If you clone the repository with submodules and generate tarball from that using cmake, it will already contain the patched code.

If one builds against the source tarballs generated from Github the builds are also not patches.

There is a source tarball attached in release artifacts. Use that one instead of generated ones by GitHub.

anatol commented 5 months ago

@Thaodan please use the the android-tools-*.tar.xz from https://github.com/nmeum/android-tools/releases

Thaodan commented 5 months ago

We don't use release tarballs but generate them the pristine sources.

If you clone the repository with submodules and generate tarball from that using cmake, it will already contain the patched code.

That's what we do but it does require also downloading the contents of .git folder plus installing cmake into the build worker which isn't necessary to apply patches.

If one builds against the source tarballs generated from Github the builds are also not patches.

There is a source tarball attached in release artifacts. Use that one instead of generated ones by GitHub.

In our case we track software releases using git, dumping tarballs into them doesn't work good. I'm posting the patch as a courtesy so it might be useful for others we can't use tarballs.

Accepting patch doesn't break any of your existing use cases.

Thaodan commented 5 months ago

@Thaodan please use the the android-tools-*.tar.xz from https://github.com/nmeum/android-tools/releases

Sorry can't do that as explained above.

Biswa96 commented 5 months ago

So, how do you download the source code and build it?

Thaodan commented 5 months ago

We build using open build service's to built and tar_git as a source service to fetch the source.

The packaging source is here: https://github.com/sailfishos/android-tools/tree/new_packaging