Skip to content

Yum / dnf (RPM)

Kind Behaviour
hosted Stores .rpm files at the path you upload them to and generates createrepo_c-compatible repodata (primary, filelists, other) plus a signed repomd.xml (repomd.xml.asc).
proxy Caches an upstream repository verbatim, so upstream signatures stay valid. repomd.xml is revalidated after the metadata TTL; checksum-named repodata files and packages are immutable.

Yum group repositories are not available yet.

Terminal window
# one hosted repository with repodata per el9/x86_64-style directory
api -X POST $E/api/v1/repositories -d '{
"name": "yum-internal", "format": "yum", "kind": "hosted", "blobStore": "default",
"hosted": {"yum": {"repodataDepth": 2}}
}'
# a cache of Rocky Linux 9 BaseOS
api -X POST $E/api/v1/repositories -d '{
"name": "rocky9-baseos", "format": "yum", "kind": "proxy", "blobStore": "default", "anonymousRead": true,
"proxy": {"remoteUrl": "https://dl.rockylinux.org/pub/rocky/9/BaseOS/x86_64/os/"}
}'

hosted.yum.repodataDepth (0–5, default 0) says how many directory levels below the repository root each repodata root sits:

Depth Upload to dnf baseurl
0 …/yum-internal/mypkg-1.0-1.el9.x86_64.rpm …/yum-internal/
2 …/yum-internal/el9/x86_64/mypkg-1.0-1.el9.x86_64.rpm …/yum-internal/el9/x86_64/

Packages must live at or below a repodata root.

Each repodata root serves a ready-made .repo file:

Terminal window
sudo curl -fsSL -o /etc/yum.repos.d/entrepot.repo \
https://entrepot.example.com/repository/yum-internal/el9/x86_64/entrepot.repo
sudo dnf install mypkg

It enables repo_gpgcheck=1 with the repository’s key. Entrepot signs repomd.xml, not the packages themselves, so the file sets gpgcheck=0.

Terminal window
curl -fu token:$ENTREPOT_TOKEN -T mypkg-1.0-1.el9.x86_64.rpm \
https://entrepot.example.com/repository/yum-internal/el9/x86_64/mypkg-1.0-1.el9.x86_64.rpm

Repodata for the affected root is regenerated and re-signed on every upload and delete (DELETE the .rpm path). Packages are limited to 4 GiB. Uploading the same NEVRA with different content returns 409 unless hosted.allowRedeploy is enabled.

publish-rpm:
image: curlimages/curl:latest
id_tokens:
ENTREPOT_ID_TOKEN:
aud: https://entrepot.example.com
script:
- 'curl -f -H "Authorization: Bearer $ENTREPOT_ID_TOKEN" -T dist/$CI_PROJECT_NAME.rpm "https://entrepot.example.com/repository/yum-internal/el9/x86_64/$CI_PROJECT_NAME.rpm"'

Set scan.distro (for example rocky-9) so scanners match packages against the right distribution. See Vulnerability scanning.

  • repomd.xml GPG signature verification error — the key changed (after a rotation) or the wrong gpgkey is configured. Run sudo dnf clean all and re-import the key.
  • Cannot download repomd.xml: … 404 — the baseurl doesn’t point at a repodata root. Check repodataDepth and the upload paths.
  • 401 — add username=/password= to the .repo file for private repositories.
  • Package installed from the wrong repository — dnf picks the highest version across enabled repositories; use priority= or excludepkgs=.