RPM Repository Configuration
A write-a-file objective, and the most common way to lose it is to write the file, confirm with dnf repolist, and move on. repolist does not validate anything - it lists a broken repository as happily as a working one. That is demonstrated here, along with the command that does check.
Managing Software Guide 13 of 67 Intermediate
- OSRHEL 10.0
- Kernel6.12.0-55.9.1.el10_0
- dnf4.20.0
- Flatpak1.16.0
- TimeAbout 16 min
dnf config-manager --set-enabled and --set-disabled edit the .repo file rather than storing state elsewhere, which is shown below. On dnf 4 they come from dnf-plugins-core, which is installed by default on RHEL 10.
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| RHCSA-A01 | 192.168.0.31 | RHEL 10.0 | Practice node (graded) - spare /dev/sda | 2 Core | 4 GB | 50 GB + 15 GB |
| RHCSA-UTIL01 | 192.168.0.32 | RHEL 10.0 | Utility - repository server and NFS exports | 2 Core | 4 GB | 50 GB |
This guide includes
Use this when a repository file has to be written by hand. This matters because the objective is the file itself - and the two ways it breaks announce themselves at completely different moments.
- reading what a repository file actually looks like
- writing one by hand, since the file is the objective
- enabling and disabling one without editing it
- breaking it with a wrong baseurl, and with a wrong GPG key, which fail at different times
- understanding what
gpgcheckis actually for
Before you start
- A reachable repository. Here it is
http://192.168.0.32/rhel10/BaseOS. - The session writes and removes
/etc/yum.repos.d/extra.repo.
-
What a repository file looks like
-
Writing one by hand
-
Enabling and disabling without editing
-
Breaking it: a wrong baseurl
-
Breaking it: a wrong GPG key
-
What gpgcheck is actually for