Rocky Linux repo configuration files

Hello,

updating Rocky 8.8 to 8.9 but giving the errors, can you please help me repo details

Current OS
cat /etc/os-release
NAME=“Rocky Linux”
VERSION=“8.8 (Green Obsidian)”
ID=“rocky”
ID_LIKE=“rhel centos fedora”
VERSION_ID=“8.8”
PLATFORM_ID=“platform:el8”
PRETTY_NAME=“Rocky Linux 8.8 (Green Obsidian)”
ANSI_COLOR=“0;32”
LOGO=“fedora-logo-icon”
CPE_NAME=“cpe:/o:rocky:rocky:8:GA”
HOME_URL=“https://rockylinux.org/
BUG_REPORT_URL=“https://bugs.rockylinux.org/
SUPPORT_END=“2029-05-31”
ROCKY_SUPPORT_PRODUCT=“Rocky-Linux-8”
ROCKY_SUPPORT_PRODUCT_VERSION=“8.8”
REDHAT_SUPPORT_PRODUCT=“Rocky Linux”
REDHAT_SUPPORT_PRODUCT_VERSION=“8.8”

Kernel update in month of Oct’2023
kernel-4.18.0-477.27.1.el8_8.x86_64 Wed 04 Oct 2023 10:16:45 AM UTC

added below repos trying to patch

[BaseOS]
name=Rocky Linux $releasever - BaseOS
mirrorlist=http://mirrorlist.rockylinux.org?arch=$basearch&repo=BaseOS-8
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial
enabled=1

[AppStream]
name=Rocky Linux $releasever - AppStream
mirrorlist=http://mirrorlist.rockylinux.org?arch=$basearch&repo=AppStream-8
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial
enabled=1

You have not provided enough information. It would be helpful to know the exact problem you’re having when trying to update your system.

Is the repos correct or not .? also, do we need to add any other more repos.?

[BaseOS]
name=Rocky Linux $releasever - BaseOS
mirrorlist=http://mirrorlist.rockylinux.org?arch=$basearch&repo=BaseOS-8
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial
enabled=1

[AppStream]
name=Rocky Linux $releasever - AppStream
mirrorlist=http://mirrorlist.rockylinux.org?arch=$basearch&repo=AppStream-8
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial
enabled=1

BaseOS and AppStream are the default repositories.

There is no reason to add that configuration as they are already provided by the rocky-repos package in /etc/yum.repos.d/Rocky-BaseOS.repo and Rocky-AppStream.repo. It sounds like you have made changes to the default configuration and you’re now having issues and it is not clear what changes you have made. You are also not providing any information as to the issues you’re actually having.

See below. They are already provided. They are not labeled “BaseOS” and “AppStream”, they are simply “baseos” and “appstream”. You’ll find these configurations are exactly as you have shown, except for the names themselves.

[root@router yum.repos.d]# grep -v '^#' /etc/yum.repos.d/Rocky-BaseOS.repo

[baseos]
name=Rocky Linux $releasever - BaseOS
baseurl=http://dl.rockylinux.org/$contentdir/$releasever/BaseOS/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial
[root@router yum.repos.d]# grep -v '^#' /etc/yum.repos.d/Rocky-AppStream.repo

[appstream]
name=Rocky Linux $releasever - AppStream
baseurl=http://dl.rockylinux.org/$contentdir/$releasever/AppStream/$basearch/os/
gpgcheck=1
enabled=1
countme=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial

Thanks, yes, we use have the repos by default.
Somehow we deleted the files under /etc/yum.repos.d/
now, we trying to add/creating manually.

Is there any other repos to be added apart from baseos and appsteam repos.?

Yes
(But it depends™.)

The /etc/yum.repos.d/*.repo files are mostly from (RPM) packages and tagged as “config” files.
That affects what DNF does when you update those packages. If config file has been modified,
then update does not repalec it, but adds corresponding *.rpmnew file that has new content.
Then it is up to the user to merge changes from *.repo.rpmnew into *.repo.

You can run rpm -V rocky-repos to see whether some files from that package are modified or missing.

You can run dnf reinstall rocky-repos to reinstall the missing files, but as said the modified files stay.
I would probably create a temporary repo definition:

dnf config-manager --add-repo http://dl.rockylinux.org/pub/rocky/9/BaseOS/x86_64/os/

Then remove the modified Rocky*.repo files, once more dnf reinstall rocky-repos
and finally remove the temporary: rm /etc/yum.repos.d/dl.rockylinux.org*.repo


The DNF does show the source of each package. The rightmost column in dnf list is repoid (and ‘@’ indicates that packet is installed). We can list installed packages that are not from baseos or appstream:

dnf list installed | grep -Ev "@appstream|@baseos"

and shrink the list to unique values:

dnf list installed | grep -Ev "@appstream|@baseos" | while read F B G ; do echo $G ; done | sort -u

Some of those are from initial installation, but some can be repoids that you had defined. As I said, it depends on what you had.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.