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
Please consider publishing AndroidCelestia on F-Droid #34
Comments
while it is always nice to have Celestia in a new app store, it would also mean that we have to publish to multiple app stores which would mean more effort. And also I saw that fdroid works differently from other app stores that they build the app by themselves. You are very welcome to file the issue for requesting for packaging by yourself. The build instruction can be found here: https://github.com/levinli303/Celestia/wiki/Development |
@levinli303 Hello, I could work on packaging Celestia to F-Droid. Do I understand correctly that you're ok with it being published, but don't want to maintain the F-Droid version? If that's the case, I can add a note in description, saying that this is an unofficial version and may lag behind updates. Also, it's usually possible to set up automatic update checking from F-Droid side so updates will be automatically checked out and built (although, with a delay). Either way, I quickly checked the source code, there's a few concerns: AndroidCelestia/app/build.gradle Line 142 in b39a44d
The link you posted above says that it's needed to download prebuilt libraries from the CI, however I checked it, and it appears it downloads and builds dependencies with each build? (that's even better, because we need to build everything from source on F-Droid side anyway). |
@ClockGen hi, I'm ok with what you proposed. please be sure to checkout the repos with the commits as specified in the release notes. I plan to add a different flavor in build which disables AppCenter in code, so you can build for that flavor instead of patching the code. The dependency might still be checked in but disabled in code. I'll update this issue when I add the flavor. Please do not make a release until this change is made. the c dependencies (libpng, lua, etc...) are pre-built libraries downloaded from azure artifacts. I would suggest you do the same though you can still find build scripts for all the libraries here https://dev.azure.com/CelestiaProject/Celestia/_git/apple-android (build_android.sh) I suppose f-droid distributes .apk files, will it be signed, and if so with what key? |
Hm, might be tricky to implement. Usually fdroidserver checks out git tags only (with automatic builds) and expects code to be available in one repo, so it'd be hard to somehow track external components, or it'll require manual intervention with new builds. Is it possible to add Celestia, CelestiaContent and CelestiaLocalization as git submodules instead?
F-Droid has a requirement to build apps completely from source (with exceptions for build environment, like android SDK/NDK, artifacts from maven repos or packages from buildserver repos, which is debian bullseye, etc), so we'll need to build them from source anyway.
F-Droid usually builds and signs apps with its own key, however recently F-Droid began shifting towards reproducible builds https://f-droid.org/docs/Reproducible_Builds/. This wouldn't work if we had to patch the source code (because the APKs would differ), but now that you plan to make a separate flavor, this could be enabled, although, very tricky, considering how big the project is and that it's almost entirely native code (compiled libraries need to be identical and there's a lot of variation even from small things like path where it's compiled, etc, there's a list of common problems in the article I linked above). |
I'll suggest keeping a fork or a separate branch for f-droid builds so we can work around a few issues. Every time a release is made, you can merge the changes into that fork or branch. There should be few changes between the fork and the main branch:
as for signing, I'm ok if it is signed by f-droid with its own key. but we probably should mention somewhere that this version and Google Play version has different signatures so users would need to uninstall the existing version if they want to switch between the two. |
A separate fork would require manual updates and merges, but if reproducible builds aren't needed then it gives us a lot of freedom to patch these things during the build on F-Droid side, f-droid allows to run custom commands during various stages of build, (here's an example of a complex build). In current situation I think we can set up completely automatic builds and don't require human interaction at all (f-droid will automatically build new releases after you tag them in this repo), these steps can be done on f-droid buildserver:
For this step:
we don't need to set up a separate repo with submodules either, I think the easiest approach would be is that you attach a text file to new github releases, the file would contain commits for every repo, something like this:
Files in releases can be accessed statically, so we can parse this file during the build and fetch repos accordingly. Most of these things will be done on F-Droid side only, so if no new problems will arise, we only need appcenter-free flavor and the text file I mentioned above from your side. Another thing, F-Droid usually uses fastlane structures to obtain descriptions, their translations and screenshots for apps (some reference links: one two and an example). |
great. I'll make a txt for releases after 1.6.9. but note that the build scripts for dependencies are hosted on azure not GitHub https://dev.azure.com/CelestiaProject/Celestia/_git/apple-android, CelestiaContent is under CelestiaProject not celestiamobile, so we need to agree on the format. as for fastlane, I certainly would not be against it given that it could help make distribution easier for Play too. |
I'm gonna have to adapt build scripts for F-Droid buildserver anyway so I won't fetch them directly.
I can just parse the file and export CELESTIA_HASH=$(sed -nr 's/^Celestia=(.*)$/\1/p' versions.txt)
export CELESTIA_CONTENT_HASH=$(sed -nr 's/^CelestiaContent=(.*)$/\1/p' versions.txt)
export CELESTIA_LOC_HASH=$(sed -nr 's/^CelestiaLocalization=(.*)$/\1/p' versions.txt)
cd ..
git clone https://github.com/celestiamobile/Celestia
git clone https://github.com/CelestiaProject/CelestiaContent
git clone https://github.com/celestiamobile/CelestiaLocalization
cd Celestia && git reset --hard $CELESTIA_HASH && cd -
cd CelestiaContent && git reset --hard $CELESTIA_CONTENT_HASH && cd -
cd CelestiaLocalization && git reset --hard $CELESTIA_LOC_HASH && cd - (Note that this is just pseudocode, I didn't test it yet). Also it'd be better if you add the versions file directly to this repository, I thought that just attaching them to github releases would be enough, and it could be retrieved per git tag with this link: |
added an unofficial flavor here: #74 |
Thanks, I'll start working on trying to build it on my buildserver, this may take some time. |
I adapted the build process to run on fdroidserver. For now it's in my private branch: https://gitlab.com/fruitsnack/fdroiddata/-/commit/8fd9e07b5b496c0fb263fd34f7d79992efb7fff9. Also, I couldn't find any donation or translation links for Celestia, so if you have them I can add them to metadata. I also opened a PR that adds Fastlane and expected versions.txt file #76. The build recipe is not complete, it builds and Celestia works fine, however I hardcoded commit hashes for now, until you merge the PR that will add versions.txt. After that I'll modify it to parse that file. For builds to be built correctly, please update that file with correct hashes before tagging a new version in the future. Autoupdates also work fine, so fdroid will correctly pick up new versions once you tag them (checkupdate on gitlab CI failed because currently tagged versionCode is lower than in commit that's checked out). |
@levinli303 I adapted the build recipe to use versions.txt from #79, it builds fine. I'll wait for you to merge develop into main and tag a new version (for fastlane) then I'll open a merge request in fdroiddata. |
the next release should be sometime later in March. I'll let you know. |
I opened a draft MR in fdroiddata: https://gitlab.com/fdroid/fdroiddata/-/merge_requests/14599. |
@ClockGen I plan to release 1.7.0 from the develop branch one of these days, letting you know now in case you want to test based on that. |
@ClockGen 1.7.0 is released on Google Play now. |
Hello, sorry for no response, I'll try to adapt the build recipe this weekend. It's still gonna take some time for MR review by F-Droid maintainers and some more time for the build cycle as well. |
Hi,
please consider publishing the AndroidCelestia app on F-Droid
(https://www.f-droid.org/), an alternative app store exclusively for
free and open source software (FOSS). Via F-Droid you would provide a
growing community of privacy concerned Android users, who do not want to
use Goggle's Play Store, with your great App! As far as I know
AndroidCelestia is developed under the terms of the GPL and if it also does not
depend on proprietary libraries, that cannot be stripped without
disabling major functionalities, the most important requirements for a
F-Droid release are met.
You can file a request for packaging via this link:
https://gitlab.com/fdroid/rfp/issues/new
Thanks in advance! ;-)
The text was updated successfully, but these errors were encountered: