Back to Mcpproxy Go

Linux Package Repositories — helper scripts

contrib/linux-repos/README.md

0.38.13.3 KB
Original Source

Linux Package Repositories — helper scripts

Publishes signed apt and yum repositories to Cloudflare R2 on every v* release tag.

Files

FilePurpose
publish.shTop-level orchestrator — called from .github/workflows/release.yml. Sequences key import → expiry warning → apt publish → rpm publish. Supports --dry-run for local testing.
apt-publish.shSync apt bucket down → add .deb files to pool/ → prune to retain last 10 versions → regenerate Packages/Release/InRelease with apt-ftparchive → sign → sync back up.
rpm-publish.shSync rpm bucket down → add .rpm files per arch → prune to retain last 10 versions → regenerate repomd with createrepo_c → sign repomd.xml → sync back up.
import-key.shImports the GPG signing key from the PACKAGES_GPG_PRIVATE_KEY env var into a scratch GNUPGHOME and sets the preset passphrase. Idempotent.
check-key-expiry.shEmits a GitHub Actions ::warning:: annotation if the imported signing key expires within 60 days. Non-fatal.
smoke-test-debian.shRuns apt install mcpproxy in a debian:stable-slim container and asserts mcpproxy --version matches the release tag.
smoke-test-fedora.shSame, for fedora:latest with dnf install.
apt-ftparchive.confStatic config for apt-ftparchive release (suite, components, architectures, description).
mcpproxy.repo.templatePre-canned dnf source definition uploaded to rpm.mcpproxy.app/mcpproxy.repo.

Environment variables (expected from CI)

VariableSourcePurpose
APT_BUCKETworkflow envR2 bucket name, default mcpproxy-apt
RPM_BUCKETworkflow envR2 bucket name, default mcpproxy-rpm
APT_BASE_URLworkflow envhttps://apt.mcpproxy.app
RPM_BASE_URLworkflow envhttps://rpm.mcpproxy.app
GPG_KEY_IDGH variable PACKAGES_GPG_KEY_IDFull fingerprint of the signing key
RETAIN_Nworkflow envRetention count, default 10
AWS_ENDPOINT_URLbuilt from R2_ACCOUNT_ID secretR2 S3-compatible endpoint
AWS_ACCESS_KEY_IDGH secret R2_ACCESS_KEY_IDR2 API token access key
AWS_SECRET_ACCESS_KEYGH secret R2_SECRET_ACCESS_KEYR2 API token secret
AWS_DEFAULT_REGIONhard-coded autoRequired by aws CLI; R2 ignores it
PACKAGES_GPG_PRIVATE_KEYGH secretASCII-armored private key (read by import-key.sh)
PACKAGES_GPG_PASSPHRASEGH secretPassphrase for the private key

Local dry-run

bash
export APT_BUCKET=mcpproxy-apt-dev
export RPM_BUCKET=mcpproxy-rpm-dev
export APT_BASE_URL=https://apt.mcpproxy.app
export RPM_BASE_URL=https://rpm.mcpproxy.app
export GPG_KEY_ID=3B6FA1AD5D5359DA51F18DDCE1B59B9BA1CB8A3B
export RETAIN_N=10
# Assumes your local GPG keyring already has the signing key
./contrib/linux-repos/publish.sh --dry-run release-artifacts/

--dry-run generates metadata in a tempdir and skips the R2 sync-up step.