Thursday, 21 January 2016

Yum replaced by DNF - Followup

Well, recently came into the problem that I had some configuration that requires porting, I think. I wanted to get into the DNF scene, whilst Centos 7 still uses yum by default.

From Yum to DNF

I installed dnf, simply using.
yum install dnf
The packages yum, yum-plugin-fastestmirror, yum-utils are now no longer needed. Your original configuration file can then be found in yum.conf.rpmsave.

I installed "dnf-yum", to be able to use yum as a automatic redirect to dnf.

Yum.conf

The /etc/yum.conf shall have been replaced with /etc/dnf/dnf.conf.

Yum cron jobs

In DNF, this is replaced by the package "dnf-automatic"3. The configuration of which is in /etc/dnf/automatic.conf.

Removed package yum-cron as it is no longer needed.

To get started:
systemctl enable dnf-automatic.timer && systemctl start dnf-automatic.timer
To list the timers set:
systemctl list-timers *dnf-* -all

Excluding packages

I have added the java* packages to the exclude directive in yum.conf1.

Of course, I do wish to manually install the java updates along with all the other updates2. To do this I can use the command line:
yum --disableexcludes=all update
These switches in the commandline and changes in the config file of yum are ported identically over to dnf. So that's not a problem.

Yum Repos

Apparently, DNF still uses all the repositories defined under /etc/yum.repos.d. So that's a relief.

References

[1] Redhat - How do I exclude kernel or other packages from getting updated in Red Hat Enterprise Linux while updating system via yum?
https://access.redhat.com/solutions/10185
[2] nixCraft - Force yum update Command To Exclude Certain Packages
http://www.cyberciti.biz/faq/redhat-centos-linux-yum-update-exclude-packages/
[3] Fedora Project - AutoUpdates
https://fedoraproject.org/wiki/AutoUpdates

No comments:

Post a Comment