The site is the single canonical storage of the signed packages. The release body carries links to pkgs.r4ven.me, the source tag and the SHA256SUMS content. Landing page header gets the Blog/Apps/Git links.
13 KiB
pkgs
Signed package repositories of r4ven-me for deb, rpm, Arch (pacman) and apk (OpenWrt). The projects build unsigned packages on the maintainer's machine. This repository signs them with a key that never leaves the maintainer's KeePassXC and publishes the result at https://pkgs.r4ven.me.
| Format | Path | Clients |
|---|---|---|
| deb | https://pkgs.r4ven.me/deb |
Debian, Ubuntu, Linux Mint |
| rpm | https://pkgs.r4ven.me/rpm/$basearch |
Fedora, RHEL and compatible |
| arch | https://pkgs.r4ven.me/arch/$arch |
Arch Linux, pacman |
| apk | https://pkgs.r4ven.me/apk/<release>/<arch> |
OpenWrt, Alpine (apk-tools 3) |
Features
- One repository for all projects and formats — one address, one signing key. A project needs no key and no secret; its build only leaves unsigned
.deb,.rpm,.pkg.tar.zstand.apkfiles in a directory (dist/). - The key stays in KeePassXC — the private key is an attachment of an entry.
make releaseexports it to tmpfs (/dev/shm), hands it to a container, and deletes it on exit. - Checked before publishing — the project checkout of
SRCmust be clean and at the commit of the tag, and the same tag must exist on the public Forgejo and point at that commit (the script stops before signing otherwise), and file names, package names and architectures from metadata are validated. The signing container runs without network and capabilities. After signing, the script verifies the indexes and packages with the published public key only, as a client does. - Signed everywhere — apt
InReleaseandRelease.gpg; rpm packages andrepomd.xml.asc; pacman packages (.sig) and database; apk packages andpackages.adb(own EC key, separate container). - Bounded size — only the newest
KEEPversions (default 3) of each package and architecture stay on the site, to keep the site small. - Tested with real clients —
make testsigns test packages and installs them with apt, dnf, pacman and apk with signature checks on. - A landing page —
index.htmllists the newest version of each package with download links and a setup block for each format, in Russian and English, in light and dark theme.build/gen_index.pybuilds it fromcatalog.json. A new package gets a two-language description inDESCRIPTIONSof that script.
Where the packages live
This Git repository contains the publisher: signing scripts, repository builders, public keys and site assets. Published package binaries are not stored in Git.
| Location | Role | Persistent |
|---|---|---|
A project's dist/ |
Unsigned output of that project's local build | Until the project cleans it |
.work/releases/<owner>_<project>_<tag>/ |
Local staging area for one release, including the signed files | No; ignored by Git and removed by make clean |
.work/site-mirror/ |
Local working mirror of the complete production repository tree | No; downloaded again from the server on every release |
The server directory selected by SITE_REMOTE |
Canonical package-repository storage served by Angie at https://pkgs.r4ven.me/ |
Yes |
| The source project's Forgejo Release | Release metadata only: links to the site and the checksums; no package files | Yes |
Both package managers and links on the landing page download from the canonical server directory. For example, apt reads indexes below /deb/dists/ and then downloads packages from /deb/pool/; a browser link to that .deb reaches the same file. The RPM, Arch and APK trees work the same way. Forgejo does not participate when a configured package manager installs or updates a package.
During make release, the publisher downloads the current server tree into .work/site-mirror/, adds the new packages, prunes old versions, rebuilds and signs the indexes, regenerates the landing page, and synchronizes the complete tree back with rsync. SITE_REMOTE=pkgs@host:/ may look like the server root, but with the restricted rrsync key / means only the configured pkgs site directory.
Quick start
Debian, Ubuntu, Linux Mint:
sudo install -d -m 0755 /etc/apt/keyrings
sudo curl -fsSL https://pkgs.r4ven.me/r4ven-pkgs.asc -o /etc/apt/keyrings/r4ven-pkgs.asc
sudo tee /etc/apt/sources.list.d/r4ven.sources << EOF
Types: deb
URIs: https://pkgs.r4ven.me/deb
Suites: stable
Components: main
Signed-By: /etc/apt/keyrings/r4ven-pkgs.asc
EOF
sudo apt update && sudo apt install korterm
Fedora, RHEL and compatible:
sudo tee /etc/yum.repos.d/r4ven.repo << 'EOF'
[r4ven]
name=r4ven.me packages
baseurl=https://pkgs.r4ven.me/rpm/$basearch
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://pkgs.r4ven.me/r4ven-pkgs.asc
EOF
sudo dnf install korterm
Arch Linux (the fingerprint is on the landing page and in keys/r4ven-pkgs.asc):
curl -fsSL https://pkgs.r4ven.me/r4ven-pkgs.asc | sudo pacman-key --add -
sudo pacman-key --lsign-key <FINGERPRINT>
sudo tee -a /etc/pacman.conf << 'EOF'
[r4ven]
Server = https://pkgs.r4ven.me/arch/$arch
EOF
sudo pacman -Sy korterm
OpenWrt 25.12 (the key is the one the apk repository apk.r4ven.me already uses):
wget -O /etc/apk/keys/r4ven-apk.pub https://pkgs.r4ven.me/apk/r4ven-apk.pub
echo https://pkgs.r4ven.me/apk/25.12/x86_64/packages.adb > /etc/apk/repositories.d/r4ven.list
apk update && apk add luci-app-ocserv-r4ven-me
Maintainer guide
Tools: bash, docker, curl, jq, rsync, gpg, keepassxc-cli, python3. Packages are handled in a container; the host needs no dpkg, rpm or pacman.
One-time setup
- Copy
.local.mk.exampleto.local.mkand setKDBX(the path of your KeePassXC database) andENTRY(where the key is stored)..local.mkis ignored by git. - Create the key:
make keygen. It makes an RSA 4096 signing key valid for three years (RSA, because RHEL 9 and older cannot verify Ed25519 in rpm), stores the private key and its revocation certificate in the entryENTRY, reads them back, and writes the public key tokeys/r4ven-pkgs.asc. Commit that file. - On the server, make sure the directory exists and Angie serves it as
pkgs.r4ven.meand setSITE_REMOTEand the Forgejo token in.local.mk. The Forgejo API is closed on the public side, so runmake releasefrom the VPN. The firstmake releasefills the empty directory. A key that can do nothing but sync the site (recommended). Do not use an admin login withsudo rsync: that is root. Make a key just for this (ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519_pkgs) and describe the userpkgson the server as code (in your configuration management): the key line isrestrict,command="sudo -n /usr/bin/rrsync <site directory>"(no terminal, no forwarding) and sudo allows exactly that one command line, withenv_keep += "SSH_ORIGINAL_COMMAND"becauserrsyncreads it. Then setSITE_REMOTE := pkgs@<host>:/(/is the site directory) andSITE_RSH := ssh -i /home/<you>/.ssh/id_ed25519_pkgs -o IdentitiesOnly=yesin.local.mk;SITE_RSYNC_PATHis not needed.
Release flow
- In a project, build the unsigned packages (for example
make packages). File names that the script understands:*.deb,*.rpm,*.pkg.tar.zst,*.apk. A project may build any subset of the formats. - Push the code and the tag to the public Forgejo (
git push public main && git push public v0.3.0). The checkout that built the packages must stay at the tag, with no uncommitted changes. - Here:
make release SRC=../korterm/dist REPO=ivan/korterm TAG=v0.3.0.REPOis the repository on the public Forgejo.
The command copies the packages from SRC, adds them, removes old versions, rebuilds and signs the indexes, regenerates index.html, updates the release of the tag with links to the site and the new SHA256SUMS (no package files are attached to the release), uploads the site by rsync, and publishes the release.
Settings
| Variable | Default | Meaning |
|---|---|---|
KDBX |
none | Path of the KeePassXC database. Set it in .local.mk. |
KDBX_PASS_CMD |
none | Command that prints the database password (for example secret-tool lookup Kee Pass). Without it keepassxc-cli asks. |
ENTRY |
none | Entry that holds the private key, <group>/<title>. The group must exist. Set it in .local.mk. |
ATTACH |
r4ven-pkgs.private.asc |
Name of the attachment with the private key (the public key in keys/ is r4ven-pkgs.asc). |
KEEP |
3 |
Versions kept per package and architecture. |
APK_ENTRY |
none | Entry with the apk private key. Needed only for releases with .apk files. |
APK_ATTACH |
r4ven-apk.pem |
Name of the attachment with the apk private key. |
APK_RELEASE |
25.12 |
OpenWrt release directory of the .apk files (the files do not say it). |
APK_ARCH |
x86_64 |
Architecture directory of the .apk files. |
SITE_REMOTE |
none | rsync target of the site, user@host:/srv/pkgs, or user@host:/ for a key restricted by rrsync. Set it in .local.mk. |
SITE_RSH, SITE_RSYNC_PATH |
ssh, rsync |
The ssh command (rsync -e) and the rsync command on the server (--rsync-path, for example sudo -n /usr/bin/rsync when the target belongs to root). |
FORGEJO_TOKEN, FORGEJO_TOKEN_CMD |
none | Forgejo token with the right to edit releases, or a command that prints it. If both are set, the command wins: a token left in the environment may belong to another Forgejo. |
FORGEJO_URL |
https://git.r4ven.me |
Address of the public Forgejo (the API is reachable from the VPN only). |
SRC |
none | Directory with the unsigned packages; several directories are separated by a colon (dist:dist-awg). Set it on the command line: make release SRC=.... |
Targets
make keygen— create the signing key.make release SRC=dir REPO=owner/name TAG=vX.Y.Z— sign and publish the packages ofSRCas the releaseTAG.make test— end-to-end test with apt, dnf, pacman and apk (needs docker and network to pull images).make check—bash -nandshellcheckfor the scripts.make clean— remove.work/(release staging files, the local site mirror and lock).
Site layout
index.html catalog.json r4ven-pkgs.asc r4ven-pkgs.gpg (binary)
deb/ pool/main/<p>/<package>/*.deb dists/stable/{InRelease,Release,Release.gpg,main/binary-*/}
rpm/ <arch>/*.rpm <arch>/repodata/{repomd.xml,repomd.xml.asc,...}
arch/ <arch>/*.pkg.tar.zst(.sig) <arch>/r4ven.db(.sig) r4ven.files(.sig)
apk/ <release>/<arch>/*.apk packages.adb r4ven-apk.pub catalog.json
Replacing or revoking the key
The key expires after three years. To replace it, remove keys/r4ven-pkgs.asc, run make keygen again (use another ENTRY or ATTACH), run make release for the current packages, and tell the users to download the new r4ven-pkgs.asc (on Arch also pacman-key --lsign-key for the new fingerprint). If the key leaks, import the revocation certificate from the KeePassXC entry (remove the leading colon in front of the five dashes first), publish the revocation, and replace the key at once.
apk (OpenWrt)
- The apk key is the existing
r4ven-apkkey (EC P-256) from theopenwrtproject (public part:keys/r4ven-apk.pub), so routers that trust it need no new key. Only the repository URL changes. - A release needs
*.apkfiles inSRC. Theapk-hostbinary of the old flow is not used: the container runsapk-tools3 from Alpine 3.23, and OpenWrt's ownapkverifies what it signs (checked). - The release and architecture directory come from
APK_RELEASEandAPK_ARCH, because the files do not hold them. - The old
apk.r4ven.meanddeb.r4ven.mestay as they are.
Layout
scripts/—keygen.sh(key),release.sh(copy fromSRC, check the tag, key export, publish),sign_repo.sh(deb, rpm and arch: packages, indexes and signatures, runs in the container),sign_apk.sh(the same for apk, in its own container).build/—Dockerfile.sign(Debian 13 withapt-ftparchive,createrepo_c,repo-add,rpmsign,gpg),Dockerfile.apk(Alpine 3.23 withapk-tools3),gen_index.py(the landing page), andsite/(logo and favicon).tests/—run_test.sh,make_fixtures.shandmake_apk_fixtures.sh(the end-to-end test).keys/— the public keys (r4ven-pkgs.asc,r4ven-apk.pub). The private keys are not in the repository..work/— ignored local state created bymake release:releases/,site-mirror/and.lock.
Author
Ivan Cherniy — r4ven.me. Source: git.r4ven.me/ivan/pkgs.
License
GNU General Public License v3.0 or later (GPL-3.0-or-later), see LICENSE.