Having a few dozen RL machines in LAN, I would like to setup a local repository mirroring (to start with) BaseOS and AppStream repos. I have found and followed this page. It is working and I am able to install individual (new) packages but an attempt to dnf update failed completely, showing dozens of messages like:
- cannot install both perl-libs-4:5.30.1-452.module+el8.5.0+690+b6cd1280.x86_64 and perl-libs-4:5.26.3-420.el8.x86_64
- package perl-interpreter-4:5.30.1-452.module+el8.5.0+690+b6cd1280.x86_64 requires perl(:MODULE_COMPAT_5.30.1), but none of the providers can be installed
- package nginx-1:1.21.4-1.module_el8+13280+3abe831f.x86_64 is filtered out by modular filtering
It seems that it is module packages in appstream that cause these problems. Some of them are duplicates of non-module packages with different version numbers.
Compare:
# dnf list perl-libs
Last metadata expiration check: 0:00:05 ago on Tue 30 Nov 2021 09:37:11 PM CET.
Installed Packages
perl-libs.x86_64 4:5.26.3-420.el8 baseos
Available Packages
perl-libs.i686 4:5.26.3-420.el8 baseos
and
# dnf --disablerepo=appstream --enablerepo=localrepo-appstream list perl-libs
RockyLinux Base 66 kB/s | 3.0 kB 00:00
Installed Packages
perl-libs.x86_64 4:5.26.3-420.el8 baseos
Available Packages
perl-libs.i686 4:5.26.3-420.el8 baseos
perl-libs.x86_64 4:5.30.1-452.module+el8.5.0+690+b6cd1280 localrepo-appstream
I know close to nothing about modules so any hints would be welcome.
Reading the link, they run createrepo after doing a reposync. I would suggest not doing this, as it will remove module metadata and comps metadata. I would run these by itself (without createrepo) and try again:
Thanks @nazunalika for the hint. I rebuilded the local repos without the createrepo steps and it seems to be working fine. I was able to update one of my 8.4 servers to 8.5 using that repo located on another server in my LAN.
I want to keep the original DVD (ISO) contents âintactâ (with the original repodata, comps*xml and metadata), so I create 2 additional YUM repos (some call them âdnfâ) within the âupdatesâ and âappstream-updatesâ directories (within each, are distribution-specific sub-directories, such as âcentos-7.5-x86_64â and ârocky-8.4-x86_64â) and after âreplicatingâ (or unpacking) the original ISO to the âkickstartâ directory âtreeâ, replicate all of the packages to the YUM directories, and execute âcreatrepoâ to create the ârepodataâ sub-directory and meta contents âthereââŚ
So that, I have the original ISO package contents within the âKickstartâ directory tree (containing the original âosâ and âappstreamâ repos, and a copy, along with any updates from the âmirrorsâ(via reposync) in the YUM âupdatesâ and âappstream-updatesâ directory trees (which are referenced during both initial installation and YUM updates) .
It keeps the original comps*xml file intact (with the vendor package groups and categories) and permits me to have a custom âcompsâ file as well, with âmyâ group definitions (ie. âKDE-desktop-that-worksâ).
Itâs a grand waste of disk space, but functions wellâŚ
You do know that online BaseOS and AppStream (I did not check the Powertools) have both âosâ and âkickstartâ subtrees (with âosâ including the updates)?
Note how Index of /pub/rocky/8.5/ (and its mirrors) have {BaseOS,AppStream,PowerTools,extras}/$arch/{kickstart,os} ?
(Well, the âextrasâ has only the âosâ.)
The */$arch/os are the âonline repositoriesâ that default config does use.
The */$arch/kickstart are the âinitial releaseâ, essentially what the ISOs contain.
If I would like to have the âoriginal contentsâ locally, then I would
rsync the */$arch/kickstart from online once, after release of point update
Locally sync */kickstart tree to */os tree
Periodically resync (with rsync) */os tree from online to get updates
Define the local */os in my systems, (âmy-baseosâ, âmy-appstreamâ, âmy-powertoolsâ, âmy-extrasâ)
Disable the online repos (âbaseosâ, âappstreamâ, âextrasâ) in config
In other words, practically same routine as yours, with couple name/tool differences.
I updated the scripts for Rocky-8 a couple of days ago, and was successfully able to hands-free virt-install from the tree using the provided kickstart file.
Obviously this is tuned to my setup, but may help others!
Yes, that would work nicely, keeping the âinitialâ release intact, and directing all of the âupdatesâ to a customizable (âmyâ comps file) local repository.
I donât remember such a âgranularâ directory tree existing when Rocky was originally released (ver 8.3)