Skip to content

AL2023 upgrade DNF (current version 2 years old)

0

Hi. I´m on AL2023 fully up-to-date with everything, but the DNF version is lagging almost 2 years behind (4.12 was released Apr 27, 2022).

dnf --version
4.12.0
  Installed: dnf-0:4.12.0-2.amzn2023.0.4.noarch at Fri Dec 15 01:49:48 2023
  Built    : Amazon Linux at Tue Jan 31 01:01:11 2023

  Installed: rpm-0:4.16.1.3-12.amzn2023.0.6.x86_64 at Fri Dec 15 01:49:15 2023
  Built    : Amazon Linux at Mon Apr 17 16:53:56 2023

I´m in need for a more recent version as it has support for auto-reboot via the config options ¨reboot/reboot_command¨ I´ve tried upgrading DNF using the nightlies as shown on the GH page (https://github.com/rpm-software-management/dnf/) but that didn´t work:

Error: It wasn't possible to enable this project.
Repository 'epel-2023-x86_64' does not exist in project 'rpmsoftwaremanagement/dnf-nightly'.

Also building from source didn´t work as it couldn´t even parse the spec file.

So, my question is: how do I get to a more recent DNF version on AL2023?

asked 2 years ago753 views

2 Answers
0

You can log a bug or feature request at AL2023 GitHub

AWS
EXPERT

answered 2 years ago

0

I'll start with the answer I gave on GitHub, and expand a little:

We have a bunch of updates to the rpm and dnf ecosystems in AL2023.4 (see the release notes) ... We're carefully managing what versions of these packages we bring in, so that we maintain compatibility.

AL2023.4 was released in March of 2024, so was probably just after your question here.

The dnf-plugins-core package does contain the needs-restarting plugin, which can be used to determine if a reboot is needed:

bash-5.2# dnf needs-restarting -r; echo $?
No core libraries or services have been updated since boot-up.
Reboot should not be necessary.
0

You can also automatically restart services after updates.

Hopefully the above two commands help with your desire to apply updates and then automatically work out what needs restarting.

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.