termux / termux-app

Termux - a terminal emulator application for Android OS extendible by variety of packages.
https://f-droid.org/en/packages/com.termux
Other
36.08k stars 3.78k forks source link

Publish a Release apk in Github Releases #2011

Closed chromer030 closed 3 years ago

chromer030 commented 3 years ago

Feature description

Please publish a release apk for every version , because fdroid is very slow in updating its repositiory. I know we can use debug apk from github action but it has more size in compare to release version. Thank you. Reference implementation

Yonle commented 3 years ago

Well i agree with this

agnostic-apollo commented 3 years ago

We don't have access to signing keys for the F-Droid releases, they manage it themselves. So we can't release an APK that's compatible with F-Droid releases on github.

We currently have 3 different variants, google play, f-droid and debug builds, which aren't compatible with each other. We already have to deal with a lot of users reporting issues about google play/f-droid incompatibility, adding another variant would cause even more issues.

I know we can use debug apk from github action but it has more size in compare to release version.

The latest one is 89MB, the last fdroid release is 85MB, and v0.109 added a lot of code, so increased size is likely due to it. So "more size" would be insignificant. Moreover, obfuscation has been disabled in v0.109, so even F-droid releases now will have similar sizes to debug builds.

agnostic-apollo commented 3 years ago

The fdroiddata current build server activity shows that termux v0.109 builds have been failing internally. A commit is referenced which is probably the issue It's the version of the fdroidserver that ran the build, build failure info is here and here. Been happening since the 15th, that's probably why an update still hasn't been released. So kindly wait, it should hopefully be released soon.

agnostic-apollo commented 3 years ago

I have updated the README with detailed info about this. I have also added the debug APK link in the v0.111 release. I guess adding the debug APK link to each release is something doable by maintainers so that users who want to quickly get the update can do so without having to look for it.

Closing this for now since currently there are no plans for an alternate source. Can be opened again if ever needed.

hrap1919 commented 3 years ago

BTW, I just uploaded the release build of my fork https://github.com/hrap1919/termux-app/releases/tag/v0.111. It is built manually with the developer keys, so it is compatible with the artifact builds from the main branch. It has no bootstrap-archives and can be installed as an "update" of the full debug build.

The debug builts of this fork can be obtained via Github Actions as well. The size is slightly larger than the release.

agnostic-apollo commented 3 years ago

According to the metadata/com.termux.yml file history referenced by Build Metadata on Termux F-Droid page, the F-Droid guys have tried to fix the build failures 3 times already, but it failed today as well. And currently only v0.109 has been added to the metadata/com.termux.yml file, the later versions would probably be added after the current build succeeds.

jspricke commented 3 years ago

Hi,

the app fails to build because of:

2021-04-22 00:26:39,572 ERROR: Found unknown maven repo 'https://maven.pkg.github.com/termux/termux-app' at termux-shared/build.gradle

You are using a private maven repo which is not allowed on F-Droid.

New version are not picked up because you changed the version code logic making the F-Droid bot fail to pick them up. If you could revert a6ae656, that would solve it.

Thanks!

jspricke commented 3 years ago

For reference, you can find the list of allowed maven repos here: https://f-droid.org/docs/Build_Metadata_Reference/#build_srclibs maybe you can use one of them?

agnostic-apollo commented 3 years ago

Hi @jspricke,

Thanks for reporting in. We were previously hosting on Bintray but had to move to Github Packages since its being shut down. Just to be clear, are you saying that our Github Packages Maven repository here is not allowed by F-Droid and we need to shift to one that is allowed before builds will succeed? If yes, any reference implementations you know of would be of great help if you have the time, otherwise will look ourselves. Thanks

New version are not picked up because you changed the version code logic making the F-Droid bot fail to pick them up. If you could revert a6ae656, that would solve it.

I will change back the logic and make a new release. Will there will be a jump in versions on F-Droid?

Thanks a lot.

jspricke commented 3 years ago

Just to be clear, are you saying that our Github Packages Maven repository here is not allowed by F-Droid and we need to shift to one that is allowed before builds will succeed?

Yes.

If yes, any reference implementations you know of would be of great help if you have the time, otherwise will look ourselves.

See the link in my comment above.

I will change back the logic and make a new release. Will there will be a jump in versions on F-Droid?

Thanks! F-Droid updatebot will find the new version then, so all should be fine.

agnostic-apollo commented 3 years ago

Yes.

Okay, I asked caused the move was made on Feb 12, before the v0.108 release on Feb 21, which succeeded and is currently available. I see that patches were made for terminal-view and terminal-emulator packages for v0.108 in com.termux.yml. The v0.109 added a new package named termux-shared but its patch is not added to v0.109 in com.termux.yml, likely why the build is failing, But will look into moving the packages to a different repository, since patches can't be expected to be done on every release and against policy anyways patches are automatically copied over to next version and publishing to private repo is fine to build termux-app but won't work when used by Termux plugins apps since github packages require api keys, so still need to move.

Thanks again.

jspricke commented 3 years ago

Ha, I totally missed that, I adopted the patch, so it should work now. Thanks!

agnostic-apollo commented 3 years ago

Great, I assume we still need to move the repository for future versions to comply with policy? Thanks.

jspricke commented 3 years ago

Great, I assume we still need to move the repository for future versions to comply with policy? Thanks.

There should be no need. F-Droid has a policy for used maven repos, not for published repos (afaik).

agnostic-apollo commented 3 years ago

That's good to hear. Thanks again for checking in and your contributions :)

agnostic-apollo commented 3 years ago

So the patch was applied yesterday for update to v0.111 by @jspricke and its build was successful.

The main build logs are posted on F-Droid monitor site, if someone wants to see failed log for v0.109.