Manage priorities with Rocky Linux 8

Hi,

On my CentOS 7.x servers I’m managing official vs. third-party repositories with the yum-priorities plugin. Once I have installed it, I can define priority levels for each individual repository. So let’s say I have priority=1 for the [base] repository and priority=10 for [epel]. This makes sure no package or corresponding dependency from EPEL will ever replace a package from [base]. Similarly, let’s say I have configured the [lynis] repository with priority=5. This makes sure that the lynis package will be drawn in from the [lynis] repo instead of the somewhat obsolete version from EPEL.

Is there some similar mechanism that works with Rocky Linux 8?

Cheers from the sunny South of France,

Niki

I used to use priorities in CentOS [567], but have stopped a good while ago.
What I have now is that only base repositories are enabled by default and all third-party are disabled.
When I need something from third-party, I enable it explicitly only for that transaction.

Furthermore, I have exclude-list for EPEL for packages that I don’t want from it (actually “newer” version than what we use).

I do use ‘Ansible’, which makes it easier to have a serie of transactions (‘what’ from ‘where’).

That’s not really a viable solution, since installing a package by manually enabling the repository bars it from receiving updates via yum-cron. But according to man dnf.conf, priorities are already a builtin feature in dnf.

That is true, although one can run Ansible job via cron (the ansible-pull).

In that case it should behave like yum in el7. After all, priorities are about how yum/dnf filters list of available packages and unrelated to whose repositories it looks from.

I encountered that, and used the ‘priority’ designation for the first time, when configuring Rocky 8.4

The EL 8.x versions had apparently dropped the auto-prioritization of ‘local’ repositories (including auto-mounted NFS resources) such that I watched packages being downloaded from the remote EPEL repository rather than the matching one from the local original Kickstart resource…

I appended the “priority = 1” designation in each of the ‘local’ repo definition files in “/etc/yum.repos.d”

Hi lehtone, microlinux, Lothar:

I want to do something which I believed was straight-forward with yum-plugin-priorities, and to my
dismay, I’ve just learned that yum-plugin-priorities has been discontinued with el8.

The idea is to recreate the Rocky-8-XFCE-latest.iso using nazunalika’s .ks file with priority replacements from 2 local repos:

-one containing the fc29 kernel, kernel-modules and kernel-module-extras .rpm’s
-another containing the fc27 xserver-xorg-core rpm and related video modules


Given your past experience with this kind of problem, your comments/suggestions would
be most appreciated.

Len E.

For the record, yum-plugin-priorities may have been discontinued, but priorities are integrated in dnf and work out of the box. Just edit your respective repos with priority=nn with nn taking a value somewhere between 1 and 99.

I’m using it for my own repository definitions with stuff in various third-party repos, and it works perfectly.

Hi microlinux:

Thanks for the clarification !!

I’ll certainly follow through on that.

Len E.