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”