Showing posts with label yum. Show all posts
Showing posts with label yum. Show all posts

Thursday, 10 August 2017

Excluding packages in DNF

In the file /etc/dnf/dnf.conf, you can enter which packages need to be excluded.

I like to exclude java packages, until I am ready for them (as they require a reboot of my application server):
[main]
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=true
exclude=java*
Or for instance:
[main]
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=true
exclude=kernel* java*
When I am ready to install all packages, regardless of excludes, I can use the commandline below.
$ dnf -y update --disableexcludes=all

References

Fedora 24: Exclude package from update
https://www.hiroom2.com/2016/07/07/fedora-24-exclude-package-from-update/
SysTutorials - Making dnf/yum Not Update Certain Packages
https://www.systutorials.com/1661/making-dnf-yum-not-update-certain-packages/

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

Thursday, 6 August 2015

Yum replaced by DNF

Apparently, after I have upgraded Fedora Core to version 22, it appears the package manager of Fedora Core has been changed from Yum to DNF.

That is going to take some getting used to.

For more information, see the references.

References

Fedoraproject Wiki - DNF
https://fedoraproject.org/wiki/Features/DNF
Will DNF Replace Yum? - Behind the Scenes at Fedora’s Future Package Manager
http://www.linux-magazine.com/Online/Features/Will-DNF-Replace-Yum
FedoraMagazine - Managing packages Fedora DNF
http://fedoramagazine.org/managing-packages-fedora-dnf/