|
| 1 | +# Package repositories for rpm and debian packages |
| 2 | + |
| 3 | +This directory contains scripts and definitions for setting up YUM and apt repositories for Linux users to install |
| 4 | +dragonfly packages. |
| 5 | + |
| 6 | +The repositories are served as static websites. The generate-site workflow is used to set up and deploy the sites using |
| 7 | +scripts and definitions included here. |
| 8 | + |
| 9 | +The workflow does the following tasks: |
| 10 | + |
| 11 | +* Download the latest 5 releases from dragonfly releases page, specifically deb and rpm assets |
| 12 | + * for deb files, only the latest package is downloaded and present (see note below) |
| 13 | +* Set up a directory structure separating deb and rpm files into version specific paths |
| 14 | +* Sign the packages (see note on GPG) |
| 15 | +* Deploy the assets prepared, along with the public GPG key and repo definitions for apt and rpm tooling |
| 16 | + |
| 17 | +## Using the YUM repository |
| 18 | + |
| 19 | +Add the repository using: |
| 20 | + |
| 21 | +```shell |
| 22 | +sudo dnf config-manager addrepo --from-repofile=https://packages.dragonflydb.io/dragonfly.repo |
| 23 | +``` |
| 24 | + |
| 25 | +Then install dragonfly as usual, or a specific version: |
| 26 | + |
| 27 | +```shell |
| 28 | +sudo dnf -y install dragonfly-0:v1.33.1-1.fc30.x86_64 |
| 29 | +``` |
| 30 | + |
| 31 | +## Using the APT repository |
| 32 | + |
| 33 | +First download the public GPG key to an appropriate location: |
| 34 | + |
| 35 | +```shell |
| 36 | +sudo curl -Lo /usr/share/keyrings/dragonfly-keyring.public https://packages.dragonflydb.io/pgp-key.public |
| 37 | +``` |
| 38 | + |
| 39 | +Then add the sources file: |
| 40 | + |
| 41 | +```shell |
| 42 | +sudo curl -Lo /etc/apt/sources.list.d/dragonfly.sources https://packages.dragonflydb.io/dragonfly.sources |
| 43 | +``` |
| 44 | + |
| 45 | +Finally install dragonfly using apt |
| 46 | + |
| 47 | +```shell |
| 48 | +sudo apt update && sudo apt install dragonfly |
| 49 | +``` |
| 50 | + |
| 51 | +#### Versions in APT repository |
| 52 | + |
| 53 | +Unlike the yum repo, the apt repo only has the latest version. The reason for this is the tool, `reprepro` supplied by |
| 54 | +debian to build repositories only supports multiple |
| 55 | +versions in version 5.4 onwards, and the github runner using ubuntu-latest does not have this version. |
| 56 | + |
| 57 | +Another option would be to use the components feature of apt repositories in the sources file we ask users to install, |
| 58 | +but then the versions would need |
| 59 | +to be hardcoded in the sources file and the user would have |
| 60 | +to update the file with each new release which makes for a bad user experience. As of now users wanting older packages |
| 61 | +should download them directly. |
| 62 | + |
| 63 | +### Signing packages |
| 64 | + |
| 65 | +The packages are signed using the GPG key imported from the secret GPG_PRIVATE_KEY in this repository. |
| 66 | + |
| 67 | +The corresponding public key is served with site assets, so the apt/yum/dnf based tooling can consume the public key to |
| 68 | +verify package integrity. |
| 69 | + |
| 70 | +### TODO |
| 71 | + |
| 72 | +- [X] debian packages signing (not required? release file is signed) |
| 73 | +- [X] debian repo metadata setup |
| 74 | +- [ ] tests asserting that packages are installable? |
0 commit comments