matteocorti / check_updates

check_updates is a Nagios plugin to check if RedHat or Fedora system is up-to-date
https://matteocorti.github.io/check_updates/
GNU General Public License v3.0
20 stars 18 forks source link

Plugin lists some Perl modules to be updated even if there is no update for those #32

Closed mightyspiky closed 4 years ago

mightyspiky commented 4 years ago

On all my Oracle Linux 8 systems, the plugin lists some Perl modules to be updated even if there is no update available for them. Here's an example:

[root@boldy ~]# /usr/lib64/nagios/plugins/check_updates -t 55 --no-boot-check --security-only -a '-e 3' -v --clean Checking a linux system Running on Oracle Linux Server release 8.2 Using Yum or DNF Cleaning YUM/DNF cachesSecurity updates available CHECK_UPDATES OK - 20 non-security updates available | total_updates=20;0;0 security_updates=0;0;0 certbot.noarch perl-Digest.src perl-Exporter.src perl-File-Temp.src perl-HTTP-Tiny.src perl-IO-Socket-IP.src perl-Pod-Escapes.src perl-Pod-Perldoc.src perl-Pod-Simple.src perl-Pod-Usage.src perl-Term-ANSIColor.src perl-Term-Cap.src perl-Text-ParseWords.src perl-Text-Tabs+Wrap.src perl-Time-Local.src perl-constant.src perl-libnet.src perl-parent.src python3-acme.noarch python3-certbot.noarch [root@boldy ~]#

With this example, if I execute "dnf update", I only get updates for "certbot", "python3-acme" and "python3-certbot".

I don't have the problem with my Oracle Linux 7 systems.

matteocorti commented 4 years ago

Hi, can you run the plugin with the -d option and post the output?

mightyspiky commented 4 years ago

[root@boldy ~]# /usr/lib64/nagios/plugins/check_updates -t 55 --no-boot-check --security-only -a '-e 3' -v -d [DBG] check_updates version: 1.7.10 [DBG] system info: Linux boldy 5.4.17-2011.1.2.el8uek.x86_64 #2 SMP Mon Apr 20 22:10:46 PDT 2020 x86_64 x86_64 x86_64 GNU/Linux [DBG] NAME="Oracle Linux Server" VERSION="8.2" ID="ol" ID_LIKE="fedora" VARIANT="Server" VARIANT_ID="server" VERSION_ID="8.2" PLATFORM_ID="platform:el8" PRETTY_NAME="Oracle Linux Server 8.2" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:oracle:linux:8:2:server" HOME_URL="https://linux.oracle.com/" BUG_REPORT_URL="https://bugzilla.oracle.com/"

ORACLE_BUGZILLA_PRODUCT="Oracle Linux 8" ORACLE_BUGZILLA_PRODUCT_VERSION=8.2 ORACLE_SUPPORT_PRODUCT="Oracle Linux" ORACLE_SUPPORT_PRODUCT_VERSION=8.2 Checking a linux system Running on Oracle Linux Server release 8.2 [DBG] Updater: yum Using Yum or DNF [DBG] Running "/usr/bin/dnf check-update --assumeno --errorlevel=0 -q -e 3 2>&1" [DBG] [DBG] certbot.noarch 1.4.0-1.el8 epel
[DBG] perl-Digest.src 1.17-396.module+el8.1.0+5399+8245a79b ol8_appstream [DBG] perl-Exporter.src 5.72-1001.module+el8.1.0+5399+8245a79b ol8_appstream [DBG] perl-File-Temp.src 0.230.600-2.module+el8.1.0+5399+8245a79b ol8_appstream [DBG] perl-HTTP-Tiny.src 0.074-2.module+el8.1.0+5399+8245a79b ol8_appstream [DBG] perl-IO-Socket-IP.src 0.39-6.module+el8.1.0+5399+8245a79b ol8_appstream [DBG] perl-Pod-Escapes.src 1:1.07-396.module+el8.1.0+5399+8245a79b ol8_appstream [DBG] perl-Pod-Perldoc.src 3.28-397.module+el8.1.0+5399+8245a79b ol8_appstream [DBG] perl-Pod-Simple.src 1:3.35-396.module+el8.1.0+5399+8245a79b ol8_appstream [DBG] perl-Pod-Usage.src 4:1.69-396.module+el8.1.0+5399+8245a79b ol8_appstream [DBG] perl-Term-ANSIColor.src 4.06-397.module+el8.1.0+5399+8245a79b ol8_appstream [DBG] perl-Term-Cap.src 1.17-396.module+el8.1.0+5399+8245a79b ol8_appstream [DBG] perl-Text-ParseWords.src [DBG] 3.30-396.module+el8.1.0+5399+8245a79b ol8_appstream [DBG] perl-Text-Tabs+Wrap.src 2013.0523-396.module+el8.1.0+5399+8245a79b ol8_appstream [DBG] perl-Time-Local.src 1:1.280-2.module+el8.1.0+5399+8245a79b ol8_appstream [DBG] perl-constant.src 1.33-1001.module+el8.1.0+5399+8245a79b ol8_appstream [DBG] perl-libnet.src 3.11-4.module+el8.1.0+5399+8245a79b ol8_appstream [DBG] perl-parent.src 1:0.237-2.module+el8.1.0+5399+8245a79b ol8_appstream [DBG] python3-acme.noarch 1.4.0-2.el8 epel
[DBG] python3-certbot.noarch 1.4.0-1.el8 epel
Security updates available [DBG] Running "/usr/bin/dnf check-update --assumeno --errorlevel=0 -q -e 3 --security 2>&1 2>&1" CHECK_UPDATES OK - 20 non-security updates available | total_updates=20;0;0 security_updates=0;0;0 certbot.noarch perl-Digest.src perl-Exporter.src perl-File-Temp.src perl-HTTP-Tiny.src perl-IO-Socket-IP.src perl-Pod-Escapes.src perl-Pod-Perldoc.src perl-Pod-Simple.src perl-Pod-Usage.src perl-Term-ANSIColor.src perl-Term-Cap.src perl-Text-ParseWords.src perl-Text-Tabs+Wrap.src perl-Time-Local.src perl-constant.src perl-libnet.src perl-parent.src python3-acme.noarch python3-certbot.noarch [root@boldy ~]#

matteocorti commented 4 years ago

According to the output the command

/usr/bin/dnf check-update --assumeno --errorlevel=0 -q -e 3 

Is listing also the Perl modules

If you type

type dnf

are you getting /usr/bin/dnf?

mightyspiky commented 4 years ago

[root@boldy ~]# type dnf dnf is hashed (/usr/bin/dnf) [root@boldy ~]#

mightyspiky commented 4 years ago

One thing I don't understand is why all the Perl modules listed have ".src" suffix. The names of the packages don't have that ".src" suffix if I query them with rpm command.

mightyspiky commented 4 years ago

Here's some more infos of one of the Perl plugin:

[root@boldy ~]# dnf info perl-Digest Last metadata expiration check: 0:40:15 ago on Thu 28 May 2020 02:38:35 PM EDT. Installed Packages Name : perl-Digest Version : 1.17 Release : 395.el8 Architecture : noarch Size : 26 k Source : perl-Digest-1.17-395.el8.src.rpm Repository : @System From repo : ol8_appstream Summary : Modules that calculate message digests URL : http://search.cpan.org/dist/Digest/ License : GPL+ or Artistic Description : The Digest:: modules calculate digests, also called "fingerprints" or : "hashes", of some data, called a message. The digest is (usually) : some small/fixed size string. The actual size of the digest depend of : the algorithm used. The message is simply a sequence of arbitrary : bytes or bits.

Available Packages Name : perl-Digest Version : 1.17 Release : 396.module+el8.1.0+5399+8245a79b Architecture : src Size : 22 k Source : None Repository : ol8_appstream Summary : Modules that calculate message digests URL : http://search.cpan.org/dist/Digest/ License : GPL+ or Artistic Description : The Digest:: modules calculate digests, also called "fingerprints" or : "hashes", of some data, called a message. The digest is (usually) : some small/fixed size string. The actual size of the digest depend of : the algorithm used. The message is simply a sequence of arbitrary : bytes or bits.

[root@boldy ~]#

I wonder why the installed package is of architecture "noarch" while the available package is of architecture "src".

mightyspiky commented 4 years ago

As a workaround, I can put "exclude=*.src" in yum.conf so that "dnf check-update" doesn't list them but I guess I should report the problem to Oracle and/or Red Hat.

matteocorti commented 4 years ago

Ok, I'll close the issue as is not related to the plugin

hlovdal commented 2 years ago

Regarding "report the problem to Oracle and/or Red Hat", this is an Oracle specific problem, and they are aware of it. From https://community.oracle.com/tech/apps-infra/discussion/4481239/dnf-check-update-perl-modules:

dnf check-update | grep -v '.src' ... Unfortunately a grep workaround is going to stay required for now, probably for the lifetime of OL8 because it's already released this way.

However excluding those files in the repo configuration file sounds like a much better idea.