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

Add FOSS flavor #1448

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add FOSS flavor #1448

wants to merge 1 commit into from

Conversation

papjul
Copy link

@papjul papjul commented Nov 5, 2024

This PR implements a FOSS flavor (i.e. with no proprietary dependencies) and builds it when a new version is tagged.
It's a pre-requisite for #1 although publishing it on F-Droid is not mandatory (some users may want to use the FOSS flavor with the internal updater, or something else like Obtainium). Note that compared to Tachiyomi, the updater can be left enabled this time, if you choose to make reproducible builds (which is the recommended way to publish on F-Droid).

Notes:

  • I didn't bother building/testing the FOSS flavor everytime there is a commit or a new PR. The differences between the two flavors are so minor, that I didn't feel the additional build time was worth it.
  • I only publish the universal APK for the FOSS flavor in GitHub releases, but I can add other ABIs if you want

@@ -93,6 +106,10 @@ jobs:
sha=`sha256sum mihon-x86_64-${{ env.VERSION_TAG }}.apk | awk '{ print $1 }'`
echo "APK_X86_64_SHA=$sha" >> $GITHUB_ENV

mv app/build/outputs/apk/foss/release/app-foss-universal-release-unsigned-signed.apk mihon-${{ env.VERSION_TAG }}.apk

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
mv app/build/outputs/apk/foss/release/app-foss-universal-release-unsigned-signed.apk mihon-${{ env.VERSION_TAG }}.apk
mv app/build/outputs/apk/foss/release/app-foss-universal-release-unsigned-signed.apk mihon-foss-${{ env.VERSION_TAG }}.apk

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well catched! Fixed ;)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw, why do you use mv for universal build and cp for ABIs?

@AntsyLich
Copy link
Member

FOSS build setup can exist for F-Droid but I don't necessarily see a point of having them on GitHub.

@papjul
Copy link
Author

papjul commented Nov 5, 2024

FOSS build setup can exist for F-Droid but I don't necessarily see a point of having them on GitHub.

The point of having them on GitHub is to allow reproducible builds. Basically, you build and sign the release with your key, and F-Droid compares it with their own build. If they match, they will publish your release with your key. This makes the release process safer by making the developer sign the releases (and not F-Droid), while allowing F-Droid to still check for any tampering attempt.

Also:

some users may want to use the FOSS flavor with the internal updater, or something else like Obtainium

@AntsyLich
Copy link
Member

FOSS builds can stay in a separate repo then similar to preview/beta

@papjul
Copy link
Author

papjul commented Nov 5, 2024

Good idea! Should I revert the changes from the .github directory and let you create the other repo?

Copy link
Member

@AntsyLich AntsyLich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert the workflow and download changes

@@ -45,6 +45,8 @@ class AppUpdateChecker {
val GITHUB_REPO: String by lazy {
if (BuildConfig.PREVIEW) {
"mihonapp/mihon-preview"
} else if (BuildConfig.FLAVOR == "foss") {
"mihonapp/mihon-foss"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AntsyLich Let me know if I need to change the repo name

@papjul papjul requested a review from AntsyLich November 7, 2024 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants