Skip to content

YUM / DNF repositories, RPM publishing, and metadata signing ​

Arka generates repository metadata from RPM headers. Set the Proxy upstream to the distribution and architecture directory that contains repodata/repomd.xml.

Create repositories ​

Run these Bash commands with an authenticated administrator arkactl profile and jq. Replace the example address with your HTTPS endpoint. Publish to Hosted. Group looks in Hosted first, then in Proxy. Grant the publishing account write access to Hosted and the consuming account read access to Group and the relevant members.

For each consuming or publishing identity, sign in with its profile and run arkactl --json tokens create --name rpm-ci --expires-in-days 30 | jq -er .plaintext. Send the output directly to the CI secret store. Use a separate read and write token for the examples below.

bash
export ARKA_URL=https://packages.example.org
hosted=$(arkactl --json repo create --name rpm-hosted --type hosted --format rpm | jq -er .id)
proxy=$(arkactl --json repo create --name rpm-proxy --type proxy --format rpm \
  --upstream-url https://upstream.example.org/linux/9/BaseOS/x86_64/os/ | jq -er .id)
arkactl repo create --name rpm-group --type group --format rpm --member "$hosted,$proxy"
WRITE="$ARKA_URL/repository/rpm-hosted"
READ="$ARKA_URL/repository/rpm-group"

Publish an RPM ​

bash
rpm -qp --qf '%{NAME} %{VERSION}-%{RELEASE} %{ARCH}\n' widget-1.2.3-1.noarch.rpm
rpm --checksig widget-1.2.3-1.noarch.rpm
curl -fsS -H "Authorization: Bearer $ARKA_WRITE_TOKEN" \
  -T widget-1.2.3-1.noarch.rpm "$WRITE/widget-1.2.3-1.noarch.rpm"

Hosted accepts a bare filename or a packages/… path. Clients follow the location in repodata. Sign each RPM with your organization’s package signing process before publishing to production.

Partition repodata by distribution and architecture ​

Set repodataDepth from 0 to 5. The default, 0, keeps repodata/ at the repository root. With 2, the first two path segments identify individual YUM roots. Each root generates its own repomd.xml, primary.xml.gz, filelists.xml.gz, and other.xml.gz with package paths relative to that root.

bash
arkactl repo create --name rpm-multi --type hosted --format rpm --repodata-depth 2
curl -fsS -H "Authorization: Bearer $ARKA_WRITE_TOKEN" \
  -T widget-1.2.3-1.x86_64.rpm \
  "$ARKA_URL/repository/rpm-multi/el9/x86_64/packages/widget-1.2.3-1.x86_64.rpm"

Point the client baseurl at the specific subtree, for example /repository/rpm-multi/el9/x86_64/ or /repository/rpm-multi/el8/aarch64/. Set the same depth on Group. For a multi-level Proxy, use the upstream base URL before these segments and ensure its directory tree matches. Import existing packages into the target directories before enabling partitioning.

Configure the client .repo file ​

Bind an Arka RSA signing key to Group and distribute the public key after verifying its fingerprint. gpgcheck validates package signatures and repo_gpgcheck validates the repomd signature. Separate teams may own those keys.

ini
# /etc/yum.repos.d/arka.repo
[arka]
name=Arka RPM
baseurl=https://packages.example.org/repository/rpm-group/
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/ARKA-METADATA file:///etc/pki/rpm-gpg/ORG-RPM
username=READER
password=READ_TOKEN

For a private source, provision the credentials through your secret deployment system and restrict the file permissions. Fetch Arka’s metadata public key from $READ/repodata/repomd.xml.key. DNF 5 includes the download command. DNF 4 requires its download plugin.

bash
dnf --disablerepo='*' --enablerepo=arka makecache
dnf --disablerepo='*' --enablerepo=arka download widget-1.2.3-1.noarch
rpm --checksig widget-1.2.3-1.noarch.rpm
SymptomWhat to check
repomd.xml returns 404Remove any extra repodata segment in baseurl and confirm the Proxy points at the upstream repository root that contains repodata.
GPG validation failsCheck repodata/repomd.xml.asc, the RPM signature, both trusted public keys, and rotation times. The test matrix covers metadata downloads and byte checks in a temporary unsigned repository.
dnf cannot find a published packageInspect name, EVR, and architecture with rpm -qp. Check enabled client repositories and the primary index.

Manage Arka signing keys · DNF configuration

Released under the Apache 2.0 License.