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.
Sign release packages and repository metadata
a755e48a42fdbf5da4414169e516980e63a063f6 · Keenan Nemetz · 15d ago · parent 58ac37e0
Sign release packages and repository metadata Sign the RPMs before the yum repository reads them, sign the apt Release and yum repomd metadata, and sign SHA256SUMS for direct downloads. The key arrives as the RELEASE_GPG_KEY repository secret; a pushed tag without it fails, while a local run stays unsigned with a note. Signature time is pinned to the tag commit, or to the key creation time when that is later, so a rebuild with the same key is byte-identical.
docs/install.md +73−20
| @@ -13,20 +13,25 @@ prints the installed version. | |||
| 13 | 13 | ||
| 14 | 14 | Download packages and binaries from the | |
| 15 | 15 | [Vole release page](https://rodent.software/vole/releases). Releases provide | |
| 16 | `amd64` and `arm64` files plus `SHA256SUMS`. Vole does not sign release | ||
| 17 | artifacts, so checksums detect a corrupted or mismatched download; they do not | ||
| 18 | authenticate the server that supplied them. | ||
| 16 | `amd64` and `arm64` files, `SHA256SUMS`, a detached signature over that list, | ||
| 17 | and the release public key. The package repositories and the checksum list are | ||
| 18 | signed, so a modified download or a different package fails verification; see | ||
| 19 | [Verify a direct download](#verify-a-direct-download). | ||
| 19 | 20 | ||
| 20 | 21 | ## Install from the package repository | |
| 21 | 22 | ||
| 22 | 23 | Every release publishes a Debian repository at `apt/` and an RPM repository at | |
| 23 | `yum/`. Both are served through a channel — a URL that follows one release and | ||
| 24 | can move to the next ([Releases § Channels](releases.md#channels)) — so the | ||
| 25 | source line keeps working when a new release is published. Follow the `stable` | ||
| 26 | channel on Debian or Ubuntu: | ||
| 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: | ||
| 27 | 28 | ||
| 28 | 29 | ```sh | |
| 29 | echo 'deb [trusted=yes] https://rodent.software/vole/channels/stable/apt ./' \ | ||
| 30 | sudo install -d -m 0755 /etc/apt/keyrings | ||
| 31 | sudo curl -fsSL https://rodent.software/vole/channels/stable/vole-release-key.asc \ | ||
| 32 | -o /etc/apt/keyrings/vole.asc | ||
| 33 | gpg --show-keys --with-fingerprint /etc/apt/keyrings/vole.asc | ||
| 34 | echo 'deb [signed-by=/etc/apt/keyrings/vole.asc] https://rodent.software/vole/channels/stable/apt ./' \ | ||
| 30 | 35 | | sudo tee /etc/apt/sources.list.d/vole.list | |
| 31 | 36 | sudo apt update | |
| 32 | 37 | sudo apt install vole | |
| @@ -35,17 +40,28 @@ sudo apt install vole | |||
| 35 | 40 | On Fedora, RHEL, or Rocky: | |
| 36 | 41 | ||
| 37 | 42 | ```sh | |
| 43 | sudo curl -fsSL https://rodent.software/vole/channels/stable/vole-release-key.asc \ | ||
| 44 | -o /etc/pki/rpm-gpg/RPM-GPG-KEY-vole | ||
| 45 | sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-vole | ||
| 38 | 46 | sudo tee /etc/yum.repos.d/vole.repo >/dev/null <<'EOF' | |
| 39 | 47 | [vole] | |
| 40 | 48 | name=Vole | |
| 41 | 49 | baseurl=https://rodent.software/vole/channels/stable/yum/ | |
| 42 | 50 | enabled=1 | |
| 43 | gpgcheck=0 | ||
| 44 | repo_gpgcheck=0 | ||
| 51 | gpgcheck=1 | ||
| 52 | repo_gpgcheck=1 | ||
| 53 | gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-vole | ||
| 45 | 54 | EOF | |
| 46 | 55 | sudo dnf install vole | |
| 47 | 56 | ``` | |
| 48 | 57 | ||
| 58 | `gpg --show-keys` prints the fingerprint before anything is trusted. Compare it | ||
| 59 | with the copy of the same key committed in the source repository at | ||
| 60 | `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`. | ||
| 64 | |||
| 49 | 65 | The repository contains both architectures; apt and dnf choose the one they run | |
| 50 | 66 | on. Upgrades arrive with the package manager: | |
| 51 | 67 | ||
| @@ -54,13 +70,15 @@ sudo apt update && sudo apt upgrade vole | |||
| 54 | 70 | sudo dnf upgrade vole | |
| 55 | 71 | ``` | |
| 56 | 72 | ||
| 57 | Vole does not sign release artifacts. The apt source trusts the host with | ||
| 58 | `trusted=yes`, and the dnf repository disables package and metadata signature | ||
| 59 | checks. The `Release` and `repomd.xml` files carry checksums, so a corrupted | ||
| 60 | download is refused, and HTTPS authenticates the server, but neither proves who | ||
| 61 | built the package. If that matters for your deployment, | ||
| 62 | [install a package file](#install-a-package-file) and verify it against | ||
| 63 | `SHA256SUMS`, or [build from source](#build-from-source). | ||
| 73 | Apt verifies `InRelease` (or `Release` plus `Release.gpg`) and the hashes it | ||
| 74 | 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. | ||
| 77 | |||
| 78 | 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. | ||
| 64 | 82 | ||
| 65 | 83 | The repository must be readable by anonymous visitors. A private repository | |
| 66 | 84 | answers package managers with `404`; mirror the packages or install from a file | |
| @@ -75,11 +93,11 @@ ends in `/releases/v0.2.0/artifacts/apt`. | |||
| 75 | 93 | ||
| 76 | 94 | ## Install a package file | |
| 77 | 95 | ||
| 78 | Download the `.deb` or `.rpm` for your architecture and its `SHA256SUMS` file. | ||
| 79 | Verify the download, then install it: | ||
| 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: | ||
| 80 | 99 | ||
| 81 | 100 | ```sh | |
| 82 | sha256sum -c --ignore-missing SHA256SUMS | ||
| 83 | 101 | sudo dpkg -i vole_0.2.0-1_amd64.deb # Debian or Ubuntu | |
| 84 | 102 | sudo dnf install ./vole-0.2.0-1.x86_64.rpm # Fedora, RHEL, or Rocky | |
| 85 | 103 | ``` | |
| @@ -100,6 +118,34 @@ The package does not create an instance admin or start the forge. To configure a | |||
| 100 | 118 | server, continue with [Deploy a server](deploy/index.md). For the package's paths | |
| 101 | 119 | and upgrade procedure, see [Packages and upgrades](packaging.md). | |
| 102 | 120 | ||
| 121 | ## Verify a direct download | ||
| 122 | |||
| 123 | Every release attaches `SHA256SUMS`, its detached signature `SHA256SUMS.asc`, | ||
| 124 | and `vole-release-key.asc`. Verify the signature before trusting the checksum | ||
| 125 | list, then check the files you downloaded: | ||
| 126 | |||
| 127 | ```sh | ||
| 128 | tag=v0.2.0 | ||
| 129 | base=https://rodent.software/vole/releases/$tag/artifacts | ||
| 130 | curl -LO "$base/vole-release-key.asc" | ||
| 131 | curl -LO "$base/SHA256SUMS" | ||
| 132 | curl -LO "$base/SHA256SUMS.asc" | ||
| 133 | gpg --import vole-release-key.asc | ||
| 134 | gpg --verify SHA256SUMS.asc SHA256SUMS | ||
| 135 | sha256sum -c --ignore-missing SHA256SUMS | ||
| 136 | ``` | ||
| 137 | |||
| 138 | `gpg --verify` must print `Good signature`. Compare the key's fingerprint with | ||
| 139 | the copy committed at `packaging/keys/vole-release.asc` in the source | ||
| 140 | repository; the release path and the Git path are separate, so one compromised | ||
| 141 | 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. | ||
| 144 | |||
| 145 | HTTPS still authenticates the host that served the key. If that is not enough | ||
| 146 | for your threat model, clone the repository over SSH and compare the committed | ||
| 147 | key, or [build from source](#build-from-source). | ||
| 148 | |||
| 103 | 149 | ## Install a release binary | |
| 104 | 150 | ||
| 105 | 151 | These commands install the `amd64` binary for version 0.2.0 in `~/.local/bin`: | |
| @@ -108,13 +154,20 @@ These commands install the `amd64` binary for version 0.2.0 in `~/.local/bin`: | |||
| 108 | 154 | tag=v0.2.0 | |
| 109 | 155 | base=https://rodent.software/vole/releases/$tag/artifacts | |
| 110 | 156 | curl -LO "$base/vole-linux-amd64" | |
| 157 | curl -LO "$base/vole-release-key.asc" | ||
| 111 | 158 | curl -LO "$base/SHA256SUMS" | |
| 159 | curl -LO "$base/SHA256SUMS.asc" | ||
| 160 | gpg --import vole-release-key.asc | ||
| 161 | gpg --verify SHA256SUMS.asc SHA256SUMS | ||
| 112 | 162 | sha256sum -c --ignore-missing SHA256SUMS | |
| 113 | 163 | mkdir -p ~/.local/bin | |
| 114 | 164 | install -m 0755 vole-linux-amd64 ~/.local/bin/vole | |
| 115 | 165 | vole version | |
| 116 | 166 | ``` | |
| 117 | 167 | ||
| 168 | See [Verify a direct download](#verify-a-direct-download) for the fingerprint | ||
| 169 | check and what the signature does and does not prove. | ||
| 170 | |||
| 118 | 171 | Replace `vole-linux-amd64` with `vole-linux-arm64` on an ARM machine. Make sure | |
| 119 | 172 | `~/.local/bin` is on your `PATH`. | |
| 120 | 173 | ||