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 app to FDroid repository #334

Open
2 tasks done
chill117 opened this issue Jan 16, 2019 · 14 comments
Open
2 tasks done

Add app to FDroid repository #334

chill117 opened this issue Jan 16, 2019 · 14 comments

Comments

@chill117
Copy link
Member

chill117 commented Jan 16, 2019

  • Have a phone (or VM) with FDroid installed (to verify that the app is works)
  • Add the app to FDroid repository
@karliatto
Copy link
Member

Instructions for a merge request F-Droid-merge-request

@tomichec
Copy link
Contributor

The procedure for getting an app included to the F-Droid repository is described here. It reduced to two methods:

  • request submission by the f-droid team
  • provide metadata merge request (as linked by @karliatto)

As the second one seems to be much more complicated -- requires the fdroid server instance, addressing of the issue with poorly supported cordova, etc.

I have now created a request for submission, so let's see what happens.

@tomichec
Copy link
Contributor

tomichec commented May 8, 2019

The inclusion to FDroid is prepared upon merging the required files in PR #341

@tomichec
Copy link
Contributor

So after discussing this issue with @chill117, we have got to a conclusion, that submitting all the files to the master branch is not the best strategy. Instead we would like to generate and submit those files to a separate branch, e.g. fdroid, that would be recreated and overwritten each time the master branch updates. For that we need:

  • generate a script that runs the cordova prepare and adds them to the fdroid branch and pushes it to the origin/fdroid
  • setup a git hook that will run that script each time the master is pushed to the origin.

@tomichec
Copy link
Contributor

The new pull request is PR344

After the inclusion and each update of the master branch please run bash fdroid-prepare.sh that creates a new branch fdroid that will be pushed to the origin repository.

@chill117
Copy link
Member Author

I think we will want to only update the fdroid branch when a release is created - this will ensure that the version available to fdroid users is always the latest stable version.

@tomichec
Copy link
Contributor

I'd think that update of the master branch is normally important enough (maybe only made together with a new release), but if not, then sure, it might be sufficient to update the fdroid only when a new release is created.
Is that all that is needed? I will notify the fdroid maintainers after/if the PR is accepted.

@chill117
Copy link
Member Author

Done! 🥇

@tomichec
Copy link
Contributor

There seem to be a problem when trying to build as reported.

A problem occurred evaluating project ':app'.
> Could not read script '/home/pierre/www/crypto-terminal/platforms/android/phonegap-plugin-barcodescanner/cryptoterminal-barcodescanner.gradle' as it does not exist.

Do you have any ideas what could be the issue?

@tomichec
Copy link
Contributor

So there are some files missing in the fdroid branch that should have been generated by cordova prepare android I think those are the following

cordova-android-support-gradle-release/cryptoterminal-cordova-android-support-gradle-release.gradle
phonegap-plugin-barcodescanner/cryptoterminal-barcodescanner.gradle

I have now updated ./scripts/fdroid-release.sh PR, so hopefully they are added correctly (if not, then my guess would be that you have them installed somewhere else in the system -- so remove the system-wide installation and try again).

To verify that everything goes correctly for the inclusion to fdroid you can:

  • download gradle 4.2
  • unzip
  • cd in the directory where you unziped and run
GRADLE42=`pwd`/bin/gradle
  • then you can check that the following commands go through:
mkdir compile-ct
cd compile-ct
git clone https://github.com/samotari/crypto-terminal.git --branch fdroid
cd crypto-terminal/platforms/android/
$GRADLE42 build
  • the updated apk files are found from crypto-terminal/platforms/android/ as
 $  find -iname \*.apk
./app/build/outputs/apk/debug/app-debug.apk
./app/build/outputs/apk/release/app-release-unsigned.apk

@chill117
Copy link
Member Author

chill117 commented Jul 2, 2019

Re-opening this issue until the fdroid maintainers are able to run a successful build.

I added an npm task for testing the fdroid build in this project:

npm run test:fdroid

Notes:

  • gradle version 4 is required because some of the dependencies (cordova plugins) are using deprecated configurations that were removed in gradle version 5.
  • now adding entire platforms/android directory for fdroid branch and tags

@chill117 chill117 reopened this Jul 2, 2019
@chill117
Copy link
Member Author

Will close this issue once I am able to create (successfully) another build for fdroid from a latest version and test the fdroid build myself.

@emanuelb
Copy link

The version in f-droid is old 1.5.0:
https://f-droid.org/packages/com.github.samotari.cryptoterminal/

while the version in google-play is newer 1.6.0:
https://play.google.com/store/apps/details?id=com.github.samotari.cryptoterminal

@tomichec
Copy link
Contributor

Hi!

I think that the reason why f-droid has the older version is that the fdroid branch has not been updated. The commit in this branch has to be based on the latest tag but include the auxiliary files that are required by f-droid. I believe that @chill117 has made a npm task that makes it automatically.

For the future releases it could be made automatically using CI pipeline (github action) when a new version tag is published.

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

No branches or pull requests

4 participants