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.
Create the repositories
Section titled “Create the repositories”# one hosted repository with repodata per el9/x86_64-style directoryapi -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 BaseOSapi -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/"}}'Repodata depth
Section titled “Repodata depth”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.
Configure dnf
Section titled “Configure dnf”Each repodata root serves a ready-made .repo file:
sudo curl -fsSL -o /etc/yum.repos.d/entrepot.repo \ https://entrepot.example.com/repository/yum-internal/el9/x86_64/entrepot.reposudo dnf install mypkgIt enables repo_gpgcheck=1 with the repository’s key. Entrepot signs
repomd.xml, not the packages themselves, so the file sets gpgcheck=0.
[yum-internal]name=yum-internalbaseurl=https://entrepot.example.com/repository/yum-internal/el9/x86_64/enabled=1gpgcheck=0repo_gpgcheck=1gpgkey=https://entrepot.example.com/repository/yum-internal/public.keyusername=tokenpassword=<TOKEN>sudo chmod 600 /etc/yum.repos.d/yum-internal.repo[rocky9-baseos]name=Rocky Linux 9 BaseOS (via Entrepot)baseurl=https://entrepot.example.com/repository/rocky9-baseos/enabled=1gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9A proxy serves the upstream’s own signatures, so keep using the distribution’s key.
Publish packages
Section titled “Publish packages”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.rpmcurl -fsS -H "Authorization: Bearer $ENTREPOT_TOKEN" \ -F file=@mypkg-1.0-1.el9.x86_64.rpm -F path=el9/x86_64 \ https://entrepot.example.com/api/v1/repositories/yum-internal/uploadpath is the destination directory.
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.
From GitLab CI
Section titled “From GitLab CI”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"'Scanning
Section titled “Scanning”Set scan.distro (for example rocky-9) so scanners match packages against
the right distribution. See Vulnerability scanning.
Troubleshooting
Section titled “Troubleshooting”repomd.xml GPG signature verification error— the key changed (after a rotation) or the wronggpgkeyis configured. Runsudo dnf clean alland re-import the key.Cannot download repomd.xml: … 404— thebaseurldoesn’t point at a repodata root. CheckrepodataDepthand the upload paths.401— addusername=/password=to the.repofile for private repositories.- Package installed from the wrong repository — dnf picks the highest
version across enabled repositories; use
priority=orexcludepkgs=.