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

Enable Rclone team to use this #2

Open
mwt opened this issue May 6, 2022 · 2 comments
Open

Enable Rclone team to use this #2

mwt opened this issue May 6, 2022 · 2 comments

Comments

@mwt
Copy link
Owner

mwt commented May 6, 2022

Ideally, this can be used to close rclone/rclone#136, which is an issue about Rclone hosting their own APT and YUM repositories on the apt.rclone.org and yum.rclone.org domains. There are several ways to achieve this.

Solution 1: point Rclone domains to the current installation

The simplest implementation would be to use two CNAME records to point apt.rclone.org and yum.rclone.org to mirror.mwt.me. This may be unappealing because the Rclone team has their own infrastructure and this implementation is not actually "self-hosted". I can however, give the Rclone devs an account on my sever so that they can control it.

Solution 2: copy files to Rclone infrastructure

Another possibility would be to copy the repository files to Rclone infrastructure on each build. This could be accomplished by adding a line to the end of the script which copies the files.

Solution 3: get this script running on Rclone infrastructure or GitHub actions

This is the only option that allows the Rclone developers to use a gpg certificate that I have no access to. Getting the script running on the Rclone infrastructure should not be especially difficult. It could run on GitHub actions, though the code is optimized for a persistent environment. If you're using GitHub actions, it makes more sense to use sed instead of jq and apt-ftparchive instead of the reprepro fork.

@mwt
Copy link
Owner Author

mwt commented May 7, 2022

The tarball on the releases page:
https://github.com/mwt/rclone-makerepo/releases/download/v0.1.0/rclone-makerepo_amd64.tar.gz
contains this repo and has some packages bundled so that the it can be run on focal.

@mwt
Copy link
Owner Author

mwt commented May 8, 2022

Here's a minimal example of a GitHub action that runs the script:

https://github.com/mwt/rclone-makerepo-example/blob/main/.github/workflows/test.yml

I think it's mostly useful for reference for setting it up on your own build server. You can see it's not very involved. GitHub actions is a little tricky because it doesn't have persistent storage. It would be rough to rebuild from scratch each time when you have multiple versions.

On the older hand, you could use actions, Rclone mount the ~/rclone-makerepo/dist folder, and pull/push the ~/rclone-makerepo/reprepro/db folder. That should avoid rebuilding and also redownloading old packages.

I think that a cronjob on a server is the efficient way to do it, but GitHub actions is possible.

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

1 participant