Configuration for Gadgetbridge F-Droid repository.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Petr Vaněk 6cdf482d6a update icons and description, fix #2 #3 2 months ago
repoconfig update icons and description, fix #2 #3 2 months ago
LICENSE Initial commit 4 months ago
README.md add logging command 4 months ago

README.md

Nightly F-Droid repository for Gadgetbridge

Files in the repoconfig

Used

These files are used by the CI/CD from the nightly-branch of Gadgetbridge.

  • repoconfig/prepare_changelog.sh - prepares changelog for the list of changes in F-Droid client
  • repoconfig/repo_listing.py - creates list of apks and their descriptions on the repo index.html page
  • repoconfig/copy_files_to_repo_config.sh - copies apks to the repo config directory
  • repoconfig/create_issue_comment.sh - adds a message to the issue tracker

Used on a remote server

  • repoconfig/sync-gb.sh - this script is run via cron on another server to update the nightly-branch and to approve the CI build.

Unused, kept for the record

  • repoconfig/remove_old_nightly.sh - UNUSED - removes the release tag from the releases in pages repo
  • repoconfig/publish_nightly.sh - UNUSED - creates a new release and uploads apks to the releases in pages repo
  • repoconfig/update_index.py and repoconfig/resign_index.py - UNUSED - Can change index files and re-sign them with the keyfile

Woodpecker pipeline setup:

https://codeberg.org/Freeyourgadget/Gadgetbridge/src/branch/nightly-branch/.woodpecker/nightly.yml

Woodpecker secrets

Signing key

This key and passwords are used to sign the repo index files and to sign the nightly apks.

Clone repo fdroid-repo-config, make sure to have fdroidserver installed (python -m pip install fdroidserver==2.1a0), remove the empty key and generate a new one:

Comment the keystorepass and keypass in the config.yml!

git checkout fdroid-repo-config
cd repoconfig
rm keystore.p12
fdroid update --create-key

This generates 3 things: keystore.p12 keyfile, keystorepass and keypass in the config.yml.

Take the key and convert it to base64 for the CI/CD:

cat keystore.p12 | base64 > out

Add the key to Woodpecker as a secret, via woodpecker cli:

/path_to/woodpecker secret add -repository Freeyourgadget/Gadgetbridge -name signing_key -value @out -event push

Also, add the keystorepass and keypass into the Woodpecker secrets as keystorepass and keypass. In reality, these two passwords are the same.

Put the branch back to original state:

git restore .
git clean -f -d

Commit token

Create personal access token and add this token as commit_token to the Woodpecker secrets. The git config to push to the pages and to the nightly-branch repo is set to:

- git config user.name "CODEBERG CI"
- git config user.email "noreply@nodomain.nodomain"

Limitations

  • currently, we need to keep the nightly setup in an extra branch in order to be able to run "can master build" CI task without always running the "nightly" build and making a release. Also, triggering must happen via external server, as Woodpecker does not support cron tasks yet. We are waiting for these issues https://github.com/woodpecker-ci/woodpecker/issues/8 and https://github.com/woodpecker-ci/woodpecker/issues/83
  • if we wanted to add more apps to the f-droid repo, we would need to re-build them all at the same time - we would need to clone their git repo and copy the apk to fdroid config directory. To do this without rebuilding everything, some other persistent storage would be useful.
  • hosting of the apks must currently be done from the pages git repo. This could over time blow the repo huge in size, this is why each automated commit squashes with the previous commit. This could be an issue in the future. Unfortunately, the other possibility to tell F-Droid client that the apk is hosted elsewhere is not possible, see here, at it also cannot be done via http redirects, see here (actually, from that discussion in am not clear if http redirects now work or not).