Skip to content

feat: add OS package repository publishing - #2611

Merged
kolaente merged 3 commits into
mainfrom
feat-os-package-repos
Apr 12, 2026
Merged

feat: add OS package repository publishing#2611
kolaente merged 3 commits into
mainfrom
feat-os-package-repos

Conversation

@tink-bot

@tink-bot tink-bot commented Apr 12, 2026

Copy link
Copy Markdown
Collaborator

Add proper repository metadata generation so users can install Vikunja via native package managers (apt install vikunja, dnf install vikunja, apk add vikunja, pacman -S vikunja) by adding dl.vikunja.io as a package source.

What this adds:

  • Four new Mage targets (release:repo-apt, release:repo-rpm, release:repo-apk, release:repo-pacman) that generate signed repository metadata using standard tools (dpkg-scanpackages, createrepo_c, apk index, repo-add)
  • A publish-repos CI job that runs after os-package and desktop jobs on tagged releases, generates metadata for all four formats across all architectures, and uploads to R2 under /repos/
  • Updated reprepro-dist-conf for multi-arch (amd64, arm64, armhf) with stable codename

Package files are not re-uploaded — the dl.vikunja.io Worker redirects package requests under /repos/ to existing artifact locations.

Setup required before first use

1. GPG signing (APT, RPM, Pacman)

The existing RELEASE_GPG_SIGN_KEY and RELEASE_GPG_PASSPHRASE secrets are reused. The GPG key ID 7D061A4AA61436B40713D42EFF054DACD908493A is hardcoded in the workflow for the --default-key and public key export steps. No new secrets needed for GPG.

2. APK signing key (Alpine)

Alpine uses RSA keys, not GPG. Two things are needed:

Generate the key pair (one-time):

openssl genrsa -out vikunja-apk.rsa 4096
openssl rsa -in vikunja-apk.rsa -pubout -out vikunja-apk.rsa.pub

Add the private key as a GitHub secret:

  • Secret name: APK_SIGNING_KEY
  • Value: contents of vikunja-apk.rsa

Upload the public key to R2:

  • Path: /repos/apk/vikunja-apk.rsa.pub
  • Contents: vikunja-apk.rsa.pub

This public key is what Alpine users download to verify packages.

3. Existing secrets used

The job reuses these existing secrets (no changes needed):

  • RELEASE_GPG_SIGN_KEY — GPG private key (armor-encoded)
  • RELEASE_GPG_PASSPHRASE — GPG key passphrase
  • S3_ACCESS_KEY, S3_SECRET_KEY, S3_ENDPOINT, S3_BUCKET, S3_REGION — R2 upload credentials

4. Worker redirect

The dl.vikunja.io Cloudflare Worker must redirect package file requests under /repos/ to existing artifact locations:

  • Server packages: /repos/*/vikunja-<ver>-<arch>.<ext>/vikunja/<version>/<filename>
  • Desktop packages: /repos/*/Vikunja Desktop-<ver>.<ext>/desktop/<version>/<filename>

@github-actions github-actions Bot added area/config config.yml, env vars, runtime flags, deployment config area/docker Dockerfile, image, docker-compose, healthcheck labels Apr 12, 2026
@github-actions

github-actions Bot commented Apr 12, 2026

Copy link
Copy Markdown

Preview Deployment

Preview deployments for this PR are available at:

URL Tag Commit
https://pr-2611.preview.vikunja.dev ghcr.io/go-vikunja/vikunja:pr-2611 latest
https://sha-1cde0a17058496e1537644647a441a561c86ee4b.preview.vikunja.dev ghcr.io/go-vikunja/vikunja:sha-1cde0a17058496e1537644647a441a561c86ee4b 1cde0a1

The preview environment will start automatically on first visit. Subsequent pushes to this PR will update the pr-2611 image — the preview picks up the new version on restart. The per-commit URLs point to a specific version and will not change.

Run locally with Docker
docker pull ghcr.io/go-vikunja/vikunja:pr-2611
docker run -p 3456:3456 ghcr.io/go-vikunja/vikunja:pr-2611

Last updated for commit 1cde0a1

Comment thread build/reprepro-dist-conf
Comment thread build/reprepro-dist-conf
Comment thread build/reprepro-dist-conf
Label: Vikunja
Codename: buster
Architectures: amd64
Codename: stable

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about unstable builds?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The publish-repos job has if: github.ref_type == 'tag' so only tagged releases publish to the repo. Unstable/dev builds don't touch it. Do you want a separate unstable suite added for non-tag builds?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implemented in d361ed6 — all repo targets now support stable/unstable suites via REPO_SUITE env var. The CI sets it automatically based on ref type (tag → stable, otherwise → unstable). Users switch suites by changing one word in their repo config.

Add four new Release namespace targets:
- release:repo-apt — generates APT repo metadata using reprepro
- release:repo-rpm — generates RPM repo metadata via createrepo_c
- release:repo-apk — generates Alpine APK index via apk index + abuild-sign
- release:repo-pacman — generates Pacman database via repo-add

All targets read REPO_SUITE env var (stable/unstable, default stable)
to support publishing to different repository suites.
New CI job runs after os-package and desktop jobs complete. Downloads
all package artifacts, runs Mage repo targets to generate repository
metadata (APT, RPM, APK, Pacman), GPG-signs the metadata, and uploads
to R2 under /repos/.

Publishes to stable suite for tagged releases, unstable for main
branch builds. Artifact uploads from os-package and desktop jobs are
no longer gated on tags to support this.
…stable suites

Update codename from buster to stable, add arm64 and armhf
architectures, pin GPG signing key, and add unstable distribution
for non-release builds.
@tink-bot
tink-bot force-pushed the feat-os-package-repos branch from d361ed6 to 306604f Compare April 12, 2026 11:58
@kolaente
kolaente enabled auto-merge April 12, 2026 11:59
@kolaente
kolaente added this pull request to the merge queue Apr 12, 2026
Merged via the queue into main with commit 540beef Apr 12, 2026
37 checks passed
@kolaente
kolaente deleted the feat-os-package-repos branch April 12, 2026 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config config.yml, env vars, runtime flags, deployment config area/docker Dockerfile, image, docker-compose, healthcheck

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants