Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin doesn't work anymore with Fedora 41 #89

Open
nielsk opened this issue Dec 8, 2024 · 3 comments
Open

Plugin doesn't work anymore with Fedora 41 #89

nielsk opened this issue Dec 8, 2024 · 3 comments

Comments

@nielsk
Copy link

nielsk commented Dec 8, 2024

When I use the plugin with Fedora41 the cache-file plugins_yum.cache looks like this:

<<<yum>>>
no
0
-2

And apparently that cannot be parsed.

And since they switched to dnf5 the command
/usr/bin/yum -C --noplugins --quiet --security list updates doesn't work anymore.

I am not 100% sure but I guess it needs to look something like this:
/usr/bin/yum check-update -C --quiet --security list

The history-works now different:
/usr/bin/yum -C --quiet --noplugins history list

But I tried changing the commands in the plugin on the F41-machine and the error persists. Maybe because there is no update-history anymore?

@swampdogmash
Copy link
Contributor

Looks like the timestamp is missing which would make sense if the history is not being parsed, and is similar to what happened with the difference between RHEL 5,6,7 and the move to dnf in RHEL8.

Which version of the plugin are you running?

@nielsk
Copy link
Author

nielsk commented Dec 9, 2024

After checking the version again - I was running 2.4.4, even though I thought I am running 2.5.2. I had to disable 2.4.4 and activate 2.5.2
Anyways after updating the check works partially again. The switch to dnf5 is probably the main reason.

0 updates available, Security update check not available, -1 Time of last update could not be found

But I did an update today.
I checked the commands.

/usr/bin/yum -C --quiet --noplugins history list all doesn't work anymore.
And without the all the output looks like this:

sudo /usr/bin/yum -C --quiet --noplugins history list
ID Command line                                                      Date and time       Action(s) Altered
 3 dnf install ./check-mk-agent-2.3.0p18-828aa8395a628a6b.noarch.rpm 2024-12-09 01:43:58                 2
 2 dnf update                                                        2024-12-09 01:35:56                54
 1 dnf install postgresql-server postgresql-contrib                  2024-12-08 05:01:39                 5

This would work now:

/usr/bin/yum -C --quiet --noplugins history list | awk '{if(NR>2)print}' | grep  -i ' U \|Upgrade\|Update' | awk '{print $4}'  | head -n 1 | date -f - +"%s"

but it has the big caveat, that if someone add options or whatever to the update-command the check would break again.

Reading the documentation the command for security-updates should be now something like this:

/usr/bin/yum -C --quiet check-upgrade --security

Since I just did updates I cannot check it though, but it doesn't throw any errors.

The documentation for that part is here: https://dnf5.readthedocs.io/en/latest/commands/check-upgrade.8.html

@nielsk
Copy link
Author

nielsk commented Dec 9, 2024

Btw. there is an issue for having dnf5 machine-readable output but since it just closed for 2 weeks now, it didn't land yet in Fedora I guess: rpm-software-management/dnf5#867

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants