{"id":8382,"date":"2024-11-10T01:05:00","date_gmt":"2024-11-10T06:05:00","guid":{"rendered":"https:\/\/www.both.org\/?p=8382"},"modified":"2025-02-03T08:40:25","modified_gmt":"2025-02-03T13:40:25","slug":"a-quick-look-at-dnf5","status":"publish","type":"post","link":"https:\/\/www.both.org\/?p=8382","title":{"rendered":"A quick look at DNF5"},"content":{"rendered":"<div class=\"pld-like-dislike-wrap pld-template-1\">\r\n    <div class=\"pld-like-wrap  pld-common-wrap\">\r\n    <a href=\"javascript:void(0)\" class=\"pld-like-trigger pld-like-dislike-trigger  \" title=\"\" data-post-id=\"8382\" data-trigger-type=\"like\" data-restriction=\"cookie\" data-already-liked=\"0\">\r\n                        <i class=\"fas fa-thumbs-up\"><\/i>\r\n                <\/a>\r\n    <span class=\"pld-like-count-wrap pld-count-wrap\">    <\/span>\r\n<\/div><\/div>\n<p>DNF5 is the new DNF. With Fedora 41, it replaces DNF, and brings with it a new command as well as some new, upgraded, and renamed sub-commands. <\/p>\n\n\n\n<p>The good news is that, despite the actual command being <code>dnf5<\/code>, the plain <code>dnf<\/code> command is still there &#8212; its a link to the <code>dnf5<\/code> command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># <strong>ll \/usr\/bin\/dnf<\/strong>\nlrwxrwxrwx 1 root root 4 Sep 19 20:00 \/usr\/bin\/dnf -&gt; dnf5<\/code><\/pre>\n\n\n\n<p>I use Ansible to perform my updates but the python3-libdnf5 package was not installed by default on a new test installation of Fedora 41 and that playbook failed. I talk a little about that in my <a href=\"https:\/\/www.both.org\/?p=8330\" data-type=\"link\" data-id=\"https:\/\/www.both.org\/?p=8330\" target=\"_blank\" rel=\"noreferrer noopener\">Short review of Fedora 41<\/a>. This is not a DNF5 problem, it&#8217;s a packaging problem as the python3-libdnf5 package should be installed by default, as its predecessor was in previous Fedora releases.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Some differences<\/h2>\n\n\n\n<p>Some of the previous sub-commands have changed in this newest release of DNF. The first one I encountered was that the <strong>whatprovides<\/strong> alias for the <strong>provides<\/strong> sub-command has been removed. I suppose I should have started using <strong>provides<\/strong> before now. I use <strong>check-update<\/strong> and that&#8217;s been changed to check-upgrade but check-update is still available as an alias. Since I want to use aliases as little as possible, I&#8217;ve already made that change in my scripts. <\/p>\n\n\n\n<p>One command I use frequently, especially in scripts &#8212; is <strong>dnf list-updateinfo<\/strong>, but that sub-commend is no longer available and throws an error. It would send a data stream to STDOUT containing a list of all the packages that would be updated along with the type, such as security, bugfix, and enhancement. <\/p>\n\n\n\n<p>A related command, <strong>dnf updateinfo summary<\/strong>, summarized the updates into categories with a count of each type, and that&#8217;s still available. This tells us a lot about the numbers of updates available. I am always especially interested in the security advisories. It doesn&#8217;t show any details, but I can at least see that a critical update is available. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># <strong>dnf updateinfo summary<\/strong>\nUpdating and loading repositories:\nRepositories loaded.\nAvailable advisory information summary:\nSecurity    : 7\n  Critical  : 1\n  Important : 3\n  Moderate  : 3\n  Low       : 0\n  Other     : 0\nBugfix      : 38\nEnhancement : 21\nOther       : 18<\/code><\/pre>\n\n\n\n<p>These numbers do not represent all of the packages that need updates. The next command, below, when run through <strong>wc<\/strong> (word count), indicates that there are 182 total packages that need upgraded. <\/p>\n\n\n\n<p>And that&#8217;s my next step &#8212; to look for more detailed information. The <strong>dnf updateinfo list<\/strong> command provides more details with a list of each update available, it&#8217;s ID number, whether it&#8217;s a bugfix, security, or enhancement. It also lists the severity of each update. You can see the critical and important security packages listed. The information from these two commands can be useful in making a determination of whether updates should be installed immediately or that they can wait.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># <strong>dnf updateinfo list<\/strong>\nUpdating and loading repositories:\nRepositories loaded.\nName                   Type    Severity                                                     Package              Issued\nFEDORA-2024-01763b95cb unspeci None                                   ibus-1.5.31~rc1-2.fc41.x86_64 2024-11-02 02:23:24\nFEDORA-2024-01763b95cb unspeci None                              ibus-gtk2-1.5.31~rc1-2.fc41.x86_64 2024-11-02 02:23:24\nFEDORA-2024-01763b95cb unspeci None                              ibus-gtk3-1.5.31~rc1-2.fc41.x86_64 2024-11-02 02:23:24\nFEDORA-2024-01763b95cb unspeci None                              ibus-gtk4-1.5.31~rc1-2.fc41.x86_64 2024-11-02 02:23:24\nFEDORA-2024-01763b95cb unspeci None                              ibus-libs-1.5.31~rc1-2.fc41.x86_64 2024-11-02 02:23:24\nFEDORA-2024-01763b95cb unspeci None                             ibus-panel-1.5.31~rc1-2.fc41.x86_64 2024-11-02 02:23:24\nFEDORA-2024-01763b95cb unspeci None                             ibus-setup-1.5.31~rc1-2.fc41.noarch 2024-11-02 02:23:24\nFEDORA-2024-01763b95cb unspeci None                             ibus-xinit-1.5.31~rc1-2.fc41.noarch 2024-11-02 02:23:24\nFEDORA-2024-032a15d098 enhance None                                    libdav1d-1.5.0-1.fc41.x86_64 2024-10-26 02:51:35\nFEDORA-2024-05f0c114a8 enhance None                                   openssh-9.8p1-3.fc41.2.x86_64 2024-10-26 02:51:35\nFEDORA-2024-05f0c114a8 enhance None                           openssh-askpass-9.8p1-3.fc41.2.x86_64 2024-10-26 02:51:35\nFEDORA-2024-05f0c114a8 enhance None                           openssh-clients-9.8p1-3.fc41.2.x86_64 2024-10-26 02:51:35\nFEDORA-2024-05f0c114a8 enhance None                            openssh-server-9.8p1-3.fc41.2.x86_64 2024-10-26 02:51:35\nFEDORA-2024-0789e8fad8 bugfix  None                                libxshmfence-1.3.2-5.fc41.x86_64 2024-11-06 03:51:37\nFEDORA-2024-0b460daa69 bugfix  None                         python3-argcomplete-3.5.1-1.fc41.noarch 2024-10-26 02:51:35\nFEDORA-2024-0e2edce43c unspeci None                              fedora-release-common-41-27.noarch 2024-11-06 03:51:37\nFEDORA-2024-0e2edce43c unspeci None                       fedora-release-identity-xfce-41-27.noarch 2024-11-06 03:51:37\nFEDORA-2024-0e2edce43c unspeci None                                fedora-release-xfce-41-27.noarch 2024-11-06 03:51:37\nFEDORA-2024-1531cc4d97 unspeci None                           python3-regex-2024.9.11-1.fc41.x86_64 2024-10-26 02:51:35\nFEDORA-2024-18dbc92086 enhance None                                  libarchive-3.7.4-4.fc41.x86_64 2024-10-26 02:51:35\nFEDORA-2024-2294017c96 bugfix  Low                                       zenity-4.0.3-1.fc41.x86_64 2024-10-28 22:10:39\nFEDORA-2024-24fbd327e3 securit Critical                                 firefox-132.0-2.fc41.x86_64 2024-10-31 01:36:34\nFEDORA-2024-24fbd327e3 securit Critical                       firefox-langpacks-132.0-2.fc41.x86_64 2024-10-31 01:36:34\nFEDORA-2024-2c6a9cf88f unspeci None                       f41-backgrounds-base-41.0.1-1.fc41.noarch 2024-10-31 01:36:34\nFEDORA-2024-2de24e3fe0 enhance None                                makedumpfile-1.7.6-1.fc41.x86_64 2024-10-28 22:10:39\nFEDORA-2024-2e8944621e securit Importan               NetworkManager-libreswan-1.2.24-1.fc41.x86_64 2024-10-26 02:51:35\nFEDORA-2024-2e8944621e securit Importan         NetworkManager-libreswan-gnome-1.2.24-1.fc41.x86_64 2024-10-26 02:51:35\nFEDORA-2024-2fba3e6f20 unspeci None               crypto-policies-20241029-1.git8baf557.fc41.noarch 2024-11-01 03:41:44\nFEDORA-2024-2fba3e6f20 unspeci None       crypto-policies-scripts-20241029-1.git8baf557.fc41.noarch 2024-11-01 03:41:44\nFEDORA-2024-30429f8371 newpack None                                    libusb1-1.0.27-4.fc41.x86_64 2024-11-02 02:23:24\nFEDORA-2024-30f644aef4 enhance None                                      libvdpau-1.5-8.fc41.x86_64 2024-11-02 02:23:24\nFEDORA-2024-3b99b1bca1 bugfix  Low                                        gvfs-1.56.1-1.fc41.x86_64 2024-10-26 02:51:35\nFEDORA-2024-3b99b1bca1 bugfix  Low                                gvfs-archive-1.56.1-1.fc41.x86_64 2024-10-26 02:51:35\n&lt;SNIP&gt;<\/code><\/pre>\n\n\n\n<p>Each name in the first column, is an identifier that allows for keeping track of the packages that need to be updated for a specific fix. <\/p>\n\n\n\n<p>If you&#8217;re curious by nature, as I am, there&#8217;s still more information to be had. The seemingly redundant command, <strong>dnf updateinfo info<\/strong>, lists the updates by the name and prints additional information like the severity, status, vendor, rights, Red Hat Bugzilla information, as well as a list of packages in the fix. I&#8217;ve included  the information for one moderate security fix, and some header information for an enhancement in the following short excerpt. The total data stream contained 11,586 lines.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># <strong>dnf updateinfo info<\/strong>\n&lt;SNIP&gt;\nName        : FEDORA-2024-80c8f31c55\nTitle       : xorg-x11-server-Xwayland-24.1.4-1.fc41\nSeverity    : Moderate\nType        : security\nStatus      : stable\nVendor      : updates@fedoraproject.org\nIssued      : 2024-10-31 01:36:34\nDescription : xwayland 24.1.4 - CVE fix for CVE-2024-9632\nMessage     : \nRights      : Copyright (C) 2024 Red Hat, Inc. and others.\nReference   : \n  Title     : xorg-x11-server-Xwayland-24.1.4 is available\n  Id        : 2316081\n  Type      : bugzilla\n  Url       : https:\/\/bugzilla.redhat.com\/show_bug.cgi?id=2316081\nCollection  : \n  Packages  : xorg-x11-server-Xwayland-24.1.4-1.fc41.src\n            : xorg-x11-server-Xwayland-devel-24.1.4-1.fc41.i686\n            : xorg-x11-server-Xwayland-debuginfo-24.1.4-1.fc41.i686\n            : xorg-x11-server-Xwayland-24.1.4-1.fc41.i686\n            : xorg-x11-server-Xwayland-debugsource-24.1.4-1.fc41.i686\n            : xorg-x11-server-Xwayland-debuginfo-24.1.4-1.fc41.x86_64\n            : xorg-x11-server-Xwayland-24.1.4-1.fc41.x86_64\n            : xorg-x11-server-Xwayland-devel-24.1.4-1.fc41.x86_64\n            : xorg-x11-server-Xwayland-debugsource-24.1.4-1.fc41.x86_64\n            : xorg-x11-server-Xwayland-debuginfo-24.1.4-1.fc41.aarch64\n            : xorg-x11-server-Xwayland-devel-24.1.4-1.fc41.aarch64\n            : xorg-x11-server-Xwayland-24.1.4-1.fc41.aarch64\n            : xorg-x11-server-Xwayland-debugsource-24.1.4-1.fc41.aarch64\n            : xorg-x11-server-Xwayland-24.1.4-1.fc41.ppc64le\n            : xorg-x11-server-Xwayland-devel-24.1.4-1.fc41.ppc64le\n            : xorg-x11-server-Xwayland-debuginfo-24.1.4-1.fc41.ppc64le\n            : xorg-x11-server-Xwayland-debugsource-24.1.4-1.fc41.ppc64le\n            : xorg-x11-server-Xwayland-debuginfo-24.1.4-1.fc41.s390x\n            : xorg-x11-server-Xwayland-24.1.4-1.fc41.s390x\n            : xorg-x11-server-Xwayland-debugsource-24.1.4-1.fc41.s390x\n            : xorg-x11-server-Xwayland-devel-24.1.4-1.fc41.s390x\n\nName        : FEDORA-2024-2de24e3fe0\nTitle       : makedumpfile-1.7.6-1.fc41\nSeverity    : None\nType        : enhancement\nStatus      : stable\nVendor      : updates@fedoraproject.org\nIssued      : 2024-10-28 22:10:39\nDescription : Automatic update for makedumpfile-1.7.6-1.fc41<\/code><\/pre>\n\n\n\n<p>After performing an update (upgrade), I run the <strong>dnf5 needs-restarting<\/strong> command. This is an interesting command that provides some information about certain core libraries and services that require a reboot when they&#8217;re updated.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># <strong>dnf5 needs-restarting<\/strong>\nUpdating and loading repositories:\nRepositories loaded.\nCore libraries or services have been updated since boot-up:\n  * glibc\n  * kernel\n  * kernel-core\n  * kernel-modules\n  * kernel-modules-core\n  * kernel-modules-extra\n  * libxcrypt\n\nReboot is required to fully utilize these updates.\nMore information: https:\/\/access.redhat.com\/solutions\/27943<\/code><\/pre>\n\n\n\n<p>With this information, I can make an informed decision about doing a reboot.<\/p>\n\n\n\n<p>The <a href=\"https:\/\/dnf5.readthedocs.io\/en\/latest\/index.html\" target=\"_blank\" rel=\"noreferrer noopener\">DNF5 documentation<\/a> contains a <a href=\"https:\/\/dnf5.readthedocs.io\/en\/latest\/changes_from_dnf4.7.html\" data-type=\"link\" data-id=\"https:\/\/dnf5.readthedocs.io\/en\/latest\/changes_from_dnf4.7.html\" target=\"_blank\" rel=\"noreferrer noopener\">complete list of all the changes<\/a> made to the command line syntax and sub-commands. The list is rather extensive and I found a lot of good information there. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Problems with Ansible<\/h2>\n\n\n\n<p>Ansible is a powerful tool that I use to perform a variety of SysAdmin tasks almost every day. The Fedora packagers have neglected to include a library package that will allow Ansible to work properly with DNF5. If you use Ansible, you can install the python3-libdnf5 package manually before running playbooks that depend upon DNF for some tasks. Read more about this problem <a href=\"https:\/\/www.both.org\/?p=8330\" data-type=\"link\" data-id=\"https:\/\/www.both.org\/?p=8330\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>.<\/p>\n\n\n\n<p>This is not a problem on systems that have been upgraded from Fedora 40. The package is installed during that process. The problem only occurs with new installations of Fedora 41.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Summary<\/h2>\n\n\n\n<p>Despite using DNF frequently in scripts and from the command line, I hadn&#8217;t looked at the DNF documentation in a long time. This change to DNF5 and the problem I encountered with its use through Ansible prompted me to take a close look at this important command. I found some interesting tools among the revised complement of sub-commands, and have already started working them into my scripts and CLI repertoire.<\/p>\n\n\n\n<p>When used by itself or in scripts, DNF5 is an outstanding package manager with many powerful sub-commands. I&#8217;ve just started learning this newly upgraded tool but I expect it to make managing RPM packages even easier than it has been, once I learn some of its new superpowers.<\/p>\n\n\n\n<p>It&#8217;s too bad that the Fedora packagers haven&#8217;t yet fixed the problem that prevents Ansible from working properly.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>DNF5 is the new DNF. With Fedora 41, it replaces DNF, and brings with it a new command<\/p>\n","protected":false},"author":2,"featured_media":2970,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[5],"tags":[],"class_list":["post-8382","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux"],"modified_by":"David Both","_links":{"self":[{"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts\/8382","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8382"}],"version-history":[{"count":20,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts\/8382\/revisions"}],"predecessor-version":[{"id":9495,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts\/8382\/revisions\/9495"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/media\/2970"}],"wp:attachment":[{"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8382"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8382"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8382"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}