Skip to content
frostyardPublic
forked from ralt/repogen

About

Repogen is a CLI tool that generates static repository structures for multiple package managers. It scans directories for packages, generates appropriate metadata files, and signs repositories with GPG/RSA keys.

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

141 Commits

Folders and files

Repository files navigation

repogen

CI

repogen is a command-line tool that turns a directory of packages into a static, signed package repository, for people who serve packages from plain web or object storage. It writes the metadata that APT, apk, pacman, Homebrew and systemd-sysupdate read, so any web server can host the result.

Status: pre-release. Frostyard publishes its systemd-sysext images with it; Frostyard's Debian packages go through frostyard/apt-publisher instead.

Documentation: the user guides are at https://frostyard.github.io/repogen/; docs/README.md indexes the maintainer docs (decisions, designs, specs, plans).

What it does

  • Finds packages. It scans a directory and detects each package type by its magic bytes, with the file name as a fallback. Usage
  • Writes repository metadata for 5 formats. Debian/APT, Alpine/APK, Arch Linux/pacman, Homebrew bottles and systemd-sysext images. RPM was removed in v0.7.0 (ADR-0016). Generator spec
  • Signs what it writes. GPG for Debian, pacman and sysext (a sysext gets SHA256SUMS.gpg and transfers with Verify=true), RSA for Alpine. Unsigned output stays possible. Signing
  • Adds to a published repository. Incremental mode reads the published metadata and adds new packages without removing old ones. --skip-published-identities skips a sysext whose identity is already published (ADR-0018); known gap: a content change without a version or revision bump is not republished. --sysext-keep-versions N keeps only the newest N versions of each sysext per OS version and arch; by default nothing is pruned. Incremental mode
  • Publishes to Cloudflare R2. The publish-to-r2 GitHub Action uploads payloads before metadata, writes each sysext SHA256SUMS only if no other publisher changed it since the restore (publishers must still run one at a time), and refuses Debian input (ADR-0019). publish-to-r2
  • Shows clients how to use the result. The APT, apk, pacman, Homebrew and systemd-sysupdate setup for each format. Client setup

Install

Each release publishes repogen-linux-amd64, repogen-linux-arm64 and SHA256SUMS. From a clone, install an exact tag and its full commit; the script checks the SHA-256 and the version that the binary embeds:

git clone https://github.com/frostyard/repogen && cd repogen
sudo scripts/install-release.sh --github-release v0.7.4 c2f9f54931520d7801c8339db8b9931d8737f395 amd64 /usr/local/bin/repogen

Take the newest tag from the releases page and its commit from git rev-list -n1 <tag>. Install also covers a build from source.

Use

repogen generate --input-dir ./debs --output-dir ./repo --codename trixie
repogen generate --input-dir ./extensions --output-dir ./repo \
  --base-url https://example.org/repo --gpg-key ./signing-key.asc

Debian input needs --codename; sysext input needs --base-url. repogen generate --help and Usage list every flag.

Credits

repogen uses spf13/cobra, ProtonMail/go-crypto and klauspost/compress. It started as a fork of ralt/repogen.

Develop

mise install   # Go from go.mod, and the pinned golangci-lint, node, svu
make check     # format, then the verify gate
make ci        # what CI runs; needs Docker

Development explains each target and the tests.

Where to go next

About

Repogen is a CLI tool that generates static repository structures for multiple package managers. It scans directories for packages, generates appropriate metadata files, and signs repositories with GPG/RSA keys.

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages