vole
Site
Clone
Read only, no credentials:
https://rodent.software/vole.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software/vole.git
Self-hosted forge that lives in your Git repo.
Publish signed pacman repositories with each release
fbdb3818bc53560d022234c741c539e59c82bc41 · Keenan Nemetz · 14d ago · parent fd86ba87
Publish signed pacman repositories with each release Build Arch packages with the same nfpm contents, publish one pacman database per architecture, and sign the packages and databases with the release key. repo-add stamps tar entries from the clock, so the databases are repacked with the tag time before signing. The maintainer script becomes post_install/post_upgrade bodies, so it no longer exits the shell. Document pacman-key, SigLevel, installation, and upgrades, and build and verify the Arch tree in CI.
docs/install.md +54−26
| @@ -6,8 +6,8 @@ prints the installed version. | |||
| 6 | 6 | ||
| 7 | 7 | | Method | Best for | Requirements | | |
| 8 | 8 | |---|---|---| | |
| 9 | | [Package repository](#install-from-the-package-repository) | Servers that should upgrade with `apt` or `dnf` | A public channel and `sudo` access | | ||
| 10 | | [Package file](#install-a-package-file) | Debian, Ubuntu, Fedora, RHEL, or Rocky servers | `sudo` access | | ||
| 9 | | [Package repository](#install-from-the-package-repository) | Servers that should upgrade with `apt`, `dnf`, or `pacman` | A public channel and `sudo` access | | ||
| 10 | | [Package file](#install-a-package-file) | Debian, Ubuntu, Fedora, RHEL, Rocky, or Arch servers | `sudo` access | | ||
| 11 | 11 | | [Release binary](#install-a-release-binary) | Another Linux machine | Git and SQLite with FTS5 | | |
| 12 | 12 | | [Build from source](#build-from-source) | Developing Vole or using an unsupported platform | Go, a C compiler, and Git | | |
| 13 | 13 | ||
| @@ -20,11 +20,12 @@ signed, so a modified download or a different package fails verification; see | |||
| 20 | 20 | ||
| 21 | 21 | ## Install from the package repository | |
| 22 | 22 | ||
| 23 | Every release publishes a Debian repository at `apt/` and an RPM repository at | ||
| 24 | `yum/`, and signs both. They are served through a channel — a URL that follows | ||
| 25 | one release and can move to the next ([Releases § Channels](releases.md#channels)) | ||
| 26 | — so a source line keeps working when a new release is published. Follow the | ||
| 27 | `stable` channel on Debian or Ubuntu: | ||
| 23 | Every release publishes a Debian repository at `apt/`, an RPM repository at | ||
| 24 | `yum/`, and an Arch repository at `pacman/$arch/`, and signs all three. They are | ||
| 25 | served through a channel — a URL that follows one release and can move to the | ||
| 26 | next ([Releases § Channels](releases.md#channels)) — so a source line keeps | ||
| 27 | working when a new release is published. Follow the `stable` channel on Debian | ||
| 28 | or Ubuntu: | ||
| 28 | 29 | ||
| 29 | 30 | ```sh | |
| 30 | 31 | sudo install -d -m 0755 /etc/apt/keyrings | |
| @@ -55,30 +56,52 @@ EOF | |||
| 55 | 56 | sudo dnf install vole | |
| 56 | 57 | ``` | |
| 57 | 58 | ||
| 59 | On Arch Linux, import the same key into pacman's keyring and add the repository: | ||
| 60 | |||
| 61 | ```sh | ||
| 62 | curl -fsSLO https://rodent.software/vole/channels/stable/vole-release-key.asc | ||
| 63 | sudo pacman-key --add vole-release-key.asc | ||
| 64 | sudo pacman-key --lsign-key 01A6F610DBD731DD3C2321C52D74BC712CE88523 | ||
| 65 | sudo tee -a /etc/pacman.conf >/dev/null <<'EOF' | ||
| 66 | [vole] | ||
| 67 | Server = https://rodent.software/vole/channels/stable/pacman/$arch | ||
| 68 | SigLevel = Required DatabaseRequired | ||
| 69 | EOF | ||
| 70 | sudo pacman -Syu vole | ||
| 71 | ``` | ||
| 72 | |||
| 73 | `$arch` expands to `x86_64` or `aarch64`. Run `sudo pacman-key --init` first if | ||
| 74 | this machine has never initialized its keyring. | ||
| 75 | |||
| 58 | 76 | `gpg --show-keys` prints the fingerprint before anything is trusted. Compare it | |
| 59 | 77 | with the copy of the same key committed in the source repository at | |
| 60 | 78 | `packaging/keys/vole-release.asc`: that file travels through Git rather than | |
| 61 | through the package host, which is what makes the comparison meaningful. The release also attaches | ||
| 62 | the key as `vole-release-key.asc` and writes the fingerprint to | ||
| 63 | `vole-release-key.fingerprint`. | ||
| 79 | through the package host, which is what makes the comparison meaningful. The | ||
| 80 | release also attaches the key as `vole-release-key.asc` and writes the | ||
| 81 | fingerprint to `vole-release-key.fingerprint`. The fingerprint passed to | ||
| 82 | `pacman-key --lsign-key` above is the same value. | ||
| 64 | 83 | ||
| 65 | The repository contains both architectures; apt and dnf choose the one they run | ||
| 66 | on. Upgrades arrive with the package manager: | ||
| 84 | The apt and yum repositories carry both architectures; pacman uses the `$arch` | ||
| 85 | URL above. Each client installs the package for its own architecture. Upgrades | ||
| 86 | arrive with the package manager: | ||
| 67 | 87 | ||
| 68 | 88 | ```sh | |
| 69 | 89 | sudo apt update && sudo apt upgrade vole | |
| 70 | 90 | sudo dnf upgrade vole | |
| 91 | sudo pacman -Syu vole | ||
| 71 | 92 | ``` | |
| 72 | 93 | ||
| 73 | 94 | Apt verifies `InRelease` (or `Release` plus `Release.gpg`) and the hashes it | |
| 74 | 95 | carries for every `.deb`. Dnf verifies `repomd.xml.asc` and, with `gpgcheck=1`, | |
| 75 | each RPM's signature. A missing or wrong signature fails the update or install | ||
| 76 | instead of accepting the package. | ||
| 96 | each RPM's signature. Pacman verifies `vole.db` and `vole.files` and each | ||
| 97 | package's detached `.sig`. A missing or wrong signature fails the update or | ||
| 98 | install instead of accepting the package. | ||
| 77 | 99 | ||
| 78 | 100 | A mirror that does not carry the key can still serve the files. Trusting it is a | |
| 79 | deliberate downgrade: use `[trusted=yes]` without `signed-by` for apt, and | ||
| 80 | `gpgcheck=0`/`repo_gpgcheck=0` for dnf, with the checksum and transport caveats | ||
| 81 | [Verify a direct download](#verify-a-direct-download) describes. | ||
| 101 | deliberate downgrade: use `[trusted=yes]` without `signed-by` for apt, | ||
| 102 | `gpgcheck=0`/`repo_gpgcheck=0` for dnf, and `SigLevel = Never` for pacman, with | ||
| 103 | the checksum and transport caveats [Verify a direct download](#verify-a-direct-download) | ||
| 104 | describes. | ||
| 82 | 105 | ||
| 83 | 106 | The repository must be readable by anonymous visitors. A private repository | |
| 84 | 107 | answers package managers with `404`; mirror the packages or install from a file | |
| @@ -93,16 +116,20 @@ ends in `/releases/v0.2.0/artifacts/apt`. | |||
| 93 | 116 | ||
| 94 | 117 | ## Install a package file | |
| 95 | 118 | ||
| 96 | Download the `.deb` or `.rpm` for your architecture, `SHA256SUMS`, | ||
| 97 | `SHA256SUMS.asc`, and `vole-release-key.asc`. Verify the download with | ||
| 98 | [Verify a direct download](#verify-a-direct-download), then install it: | ||
| 119 | Download the `.deb`, `.rpm`, or `.pkg.tar.zst` for your architecture, | ||
| 120 | `SHA256SUMS`, `SHA256SUMS.asc`, and `vole-release-key.asc`. Verify the download | ||
| 121 | with [Verify a direct download](#verify-a-direct-download), then install it: | ||
| 99 | 122 | ||
| 100 | 123 | ```sh | |
| 101 | sudo dpkg -i vole_0.2.0-1_amd64.deb # Debian or Ubuntu | ||
| 102 | sudo dnf install ./vole-0.2.0-1.x86_64.rpm # Fedora, RHEL, or Rocky | ||
| 124 | sudo dpkg -i vole_0.2.0-1_amd64.deb # Debian or Ubuntu | ||
| 125 | sudo dnf install ./vole-0.2.0-1.x86_64.rpm # Fedora, RHEL, or Rocky | ||
| 126 | sudo pacman -U vole-0.2.0-1-x86_64.pkg.tar.zst # Arch Linux | ||
| 103 | 127 | ``` | |
| 104 | 128 | ||
| 105 | Use the `arm64` package on an ARM machine; its RPM architecture is `aarch64`. | ||
| 129 | Use the `arm64` package on an ARM machine; its RPM and Arch architecture is | ||
| 130 | `aarch64`. A prerelease such as `0.1.0-rc2` is `0.1.0rc2-1` in Arch, because | ||
| 131 | Arch's package version cannot carry a semver hyphen. | ||
| 132 | |||
| 106 | 133 | The package installs `vole`, systemd units, and `/etc/vole/vole.toml`. It also | |
| 107 | 134 | installs Git and SQLite as dependencies. | |
| 108 | 135 | ||
| @@ -139,8 +166,8 @@ sha256sum -c --ignore-missing SHA256SUMS | |||
| 139 | 166 | the copy committed at `packaging/keys/vole-release.asc` in the source | |
| 140 | 167 | repository; the release path and the Git path are separate, so one compromised | |
| 141 | 168 | host does not change both. `SHA256SUMS` covers every file attached to the | |
| 142 | release, including the `apt/` and `yum/` trees; `--ignore-missing` checks the | ||
| 143 | files you have and skips the rest. | ||
| 169 | release, including the `apt/`, `yum/`, and pacman trees; `--ignore-missing` | ||
| 170 | checks the files you have and skips the rest. | ||
| 144 | 171 | ||
| 145 | 172 | HTTPS still authenticates the host that served the key. If that is not enough | |
| 146 | 173 | for your threat model, clone the repository over SSH and compare the committed | |
| @@ -172,7 +199,8 @@ Replace `vole-linux-amd64` with `vole-linux-arm64` on an ARM machine. Make sure | |||
| 172 | 199 | `~/.local/bin` is on your `PATH`. | |
| 173 | 200 | ||
| 174 | 201 | The binary needs Git and `libsqlite3.so.0` built with FTS5. Install | |
| 175 | `libsqlite3-0` on Debian or Ubuntu, or `sqlite-libs` on Fedora, RHEL, or Rocky. | ||
| 202 | `libsqlite3-0` on Debian or Ubuntu, `sqlite-libs` on Fedora, RHEL, or Rocky, or | ||
| 203 | `sqlite` on Arch. | ||
| 176 | 204 | ||
| 177 | 205 | ## Build from source | |
| 178 | 206 | ||