Subject: monitoring-plugins-contrib: check_running_kernel has no idea what riscv64 kernel is running

From: Holger Levsen <[email-masked]>
Date: Mon, 17 Feb 2025 14:43:28 +0100

Package: monitoring-plugins-contrib
Version: 46.20240417
Severity: normal
User: [email-masked]
Usertags: infrastructure
x-debbugs-cc: [email-masked], [email-masked]

Dear Maintainer,

check_running_kernel has no idea what riscv64 kernel is running:

holger@riscv64-01:~$ echo ; dpkg -l |grep -E '(linux-image|monitoring-plugins-contrib)' |grep ii; echo ; ls /boot/vm* -lart ; echo ; uname -a ; echo; echo ; /usr/lib/nagios/plugins/check_running_kernel

ii  linux-image-6.12.12-riscv64            6.12.12-1                           riscv64      Linux 6.12 for 64-bit RISC-V platforms
ii  linux-image-riscv64                    6.12.12-1                           riscv64      Linux for 64-bit RISC-V platforms (meta-package)
ii  monitoring-plugins-contrib             46.20240417                         riscv64      Plugins for nagios compatible monitoring systems

-rw-r--r-- 1 root root 29059584 Feb  2 21:17 /boot/vmlinux-6.12.12-riscv64

Linux riscv64-01 6.12.12-riscv64 #1 SMP Debian 6.12.12-1 (2025-02-02) riscv64 GNU/Linux

WARNING: Did not find a kernel image (checked) - I have no idea which kernel I am running
holger@riscv64-01:~$

Not sure what other info you need, but I'd be happy to help.

& thank you for maintaining monitoring-plugins-contrib!

-- 
cheers,
	Holger

 ⢀⣴⠾⠻⢶⣦⠀
 ⣾⠁⢠⠒⠀⣿⡁  holger@(debian|reproducible-builds|layer-acht).org
 ⢿⡄⠘⠷⠚⠋⠀  OpenPGP: B8BF54137B09D35CF026FE9D 091AB856069AAA1C
 ⠈⠳⣄

Der Mensch is' gut, aber die Leut' san a G'sindel!

---

From: Sebastiaan Couwenberg <[email-masked]>
Date: Mon, 17 Feb 2025 15:13:10 +0100

> Not sure what other info you need, but I'd be happy to help.

The plain source works a little better:

  sebastic@ricci:~/tmp/debian/nagios-plugins-contrib-46.20240417$ bash ./dsa/checks/dsa-check-running-kernel
  WARNING: Running kernel does not match on-disk kernel image: [Linux version 6.12.11-riscv64 ([email-masked]) (riscv64-linux-gnu-gcc-14 (Debian 14.2.0-12) 14.2.0, GNU ld (GNU Binutils for Debian) 2.43.50.20250108) #1 SMP Debian 6.12.11-1 (2025-01-25) != Linux version 6.12.11-riscv64 ([email-masked]) (riscv64-linux-gnu-gcc-14 (Debian 14.2.0-12) 14.2.0, GNU ld (GNU Binutils for Debian) 2.43.50.20250108) # SMP Debian 6.12.11-1 (2025-01-25)]

That one checks /boot/vmlinux-$(uname -r), the installed version only checks /boot/vmlinuz-$(uname -r).

But there is still a mismatch between the compared strings (#1 SMP vs # SMP).

Kind Regards,

Bas

-- 
  GPG Key ID: 4096R/6750F10AE88D4AF1
Fingerprint: 8182 DE41 7056 408D 6146  50D1 6750 F10A E88D 4AF1

---

From: Sebastiaan Couwenberg <[email-masked]>
Date: Mon, 17 Feb 2025 15:42:37 +0100

Control: tags -1 pending

Added a patch in git to also check vmlinux images again which resolves the issue on the porterbox at least.

Kind Regards,

Bas

---

From: Holger Levsen <[email-masked]>
Date: Mon, 17 Feb 2025 15:30:04 +0000

> Added a patch in git to also check vmlinux images again which resolves the issue on the porterbox at least.

I tried to build current git to confirm, but it ftbfs for me:

[...]
make -C src
make[4]: Verzeichnis „/home/holger/nagios-plugins-contrib/check_hpasm/check_hpasm-4.9“ wird betreten
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash '/home/holger/nagios-plugins-contrib/check_hpasm/src/missing' aclocal-1.16
/home/holger/nagios-plugins-contrib/check_hpasm/src/missing: Zeile 81: aclocal-1.16: Kommando nicht gefunden.
WARNING: 'aclocal-1.16' is missing on your system.
         You should only need it if you modified 'acinclude.m4' or
         'configure.ac' or m4 files included by 'configure.ac'.
         The 'aclocal' program is part of the GNU Automake package:
         <http://www.gnu.org/software/automake>
         It also requires GNU Autoconf, GNU m4 and Perl in order to run:
         <http://www.gnu.org/software/autoconf>
         <http://www.gnu.org/software/m4/>
         <http://www.perl.org/>
make[4]: *** [Makefile:337: aclocal.m4] Fehler 127
make[4]: Verzeichnis „/home/holger/nagios-plugins-contrib/check_hpasm/check_hpasm-4.9“ wird verlassen
make[3]: *** [Makefile:10: check_hpasm] Fehler 2
make[3]: Verzeichnis „/home/holger/nagios-plugins-contrib/check_hpasm“ wird verlassen
make[2]: *** [Makefile:25: check_hpasm] Fehler 2
make[2]: Verzeichnis „/home/holger/nagios-plugins-contrib“ wird verlassen
dh_auto_build: error: make -j1 returned exit code 2
make[1]: *** [debian/rules:11: override_dh_auto_build] Fehler 255
make[1]: Verzeichnis „/home/holger/nagios-plugins-contrib“ wird verlassen
make: *** [debian/rules:38: build] Fehler 2
dpkg-buildpackage: Fehler: Unterprozess debian/rules build lieferte Exitstatus 2
debuild: fatal error at line 1184:
dpkg-buildpackage -us -uc -ui failed
holger@riscv64-01:~/nagios-plugins-contrib$ dpkg-checkbuilddeps
holger@riscv64-01:~/nagios-plugins-contrib$

but looking at git log, I suppose I'm doing it wrong? :)

commit be7a81413d49ebb6ee83c724f4a0ef4c91bc45ab (HEAD -> master)
Author: root <[email-masked]>
Date:   Mon Feb 17 23:24:51 2025 +0800

    Auto update of debian/control

commit c967e51c789de7d559374fbe6305b53d8653fcdb
Author: root <[email-masked]>
Date:   Mon Feb 17 23:24:49 2025 +0800

    Auto update of debian/copyright   

commit 6924874140cdd5ca336f09895be05d0c0584b8e4 (origin/master, origin/HEAD)
Author: Bas Couwenberg <[email-masked]>
Date:   Mon Feb 17 15:40:50 2025 +0100

    Add patch to fix check_running_kernel on riscv64 with vmlinux images. (closes: #1096198)

I've literally just cloned the git repo, made sure I'm in the correct branch and that
the build-depends are installed and ran debuild...

-- 
cheers,
	Holger

 ⢀⣴⠾⠻⢶⣦⠀

There are no jobs on a dead planet. (Also many other things but people mostly
seem to care about jobs.)

---

From: Holger Levsen <[email-masked]>
Date: Mon, 17 Feb 2025 15:31:44 +0000

> Author: root <[email-masked]>

It's also the first time I use my user account on that node for anything
so I suppose that's why git "thinks" I'm root.

:)

-- 
cheers,
	Holger

 ⢀⣴⠾⠻⢶⣦⠀

Not everything was bad during capitalism.

---

From: Sebastiaan Couwenberg <[email-masked]>
Date: Mon, 17 Feb 2025 16:37:12 +0100

>      Auto update of debian/copyright

Yes, these two commits should not be there.

> the build-depends are installed and ran debuild...

That has patches unapplied likely, you'll need to apply patches at least.

This should work:

  QUILT_PATCHES=debian/patches quilt push -a && dpkg-buildpackage -us -uc 2>&1 | tee ../nagios-plugins-contrib.build

Kind Regards,

Bas

---

From: Holger Levsen <[email-masked]>
Date: Mon, 17 Feb 2025 16:03:56 +0000

> Yes, these two commits should not be there.

debuild put them there it seems, however...
 
> That has patches unapplied likely, you'll need to apply patches at least.

no, debuild does that automatically.
 
>  QUILT_PATCHES=debian/patches quilt push -a && dpkg-buildpackage -us -uc 2>&1 | tee ../nagios-plugins-contrib.build

no, same failure as before:

make[3]: Entering directory '/home/holger/nagios-plugins-contrib/check_hpasm/check_hpasm-4.9'
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash '/home/holger/nagios-plugins-contrib/check_hpasm/src/missing' aclocal-1.16
/home/holger/nagios-plugins-contrib/check_hpasm/src/missing: line 81: aclocal-1.16: command not found
WARNING: 'aclocal-1.16' is missing on your system.
         You should only need it if you modified 'acinclude.m4' or
         'configure.ac' or m4 files included by 'configure.ac'.
         The 'aclocal' program is part of the GNU Automake package:
         <http://www.gnu.org/software/automake>
         It also requires GNU Autoconf, GNU m4 and Perl in order to run:
         <http://www.gnu.org/software/autoconf>
         <http://www.gnu.org/software/m4/>
         <http://www.perl.org/>
make[3]: *** [Makefile:337: aclocal.m4] Error 127
make[3]: Leaving directory '/home/holger/nagios-plugins-contrib/check_hpasm/check_hpasm-4.9'
make[2]: *** [Makefile:14: clean] Error 2
make[2]: Leaving directory '/home/holger/nagios-plugins-contrib/check_hpasm'
make[1]: *** [Makefile:25: check_hpasm] Error 2
make[1]: Leaving directory '/home/holger/nagios-plugins-contrib'
dh_auto_clean: error: make -j1 clean returned exit code 2
make: *** [debian/rules:18: clean] Error 255
dpkg-buildpackage: error: fakeroot debian/rules clean subprocess returned exit status 2
holger@riscv64-01:~/nagios-plugins-contrib$

but fine, I can also wait for an updated package and test then. :)

-- 
cheers,
	Holger

 ⢀⣴⠾⠻⢶⣦⠀

You can cut all the flowers, but you can’t keep spring from coming.
#transdayofremembrance #berlin (2024)

---

From: Sebastiaan Couwenberg <[email-masked]>
Date: Mon, 17 Feb 2025 17:14:23 +0100

> but fine, I can also wait for an updated package and test then. :)

Or use a build chroot, schroot works for me on the porterbox.

Kind Regards,

Bas

---

From: Sebastiaan Couwenberg <[email-masked]>
Date: Mon, 17 Feb 2025 17:33:41 +0100

On 2/17/25 5:22 PM, Holger Levsen wrote:
> On Mon, Feb 17, 2025 at 05:14:23PM +0100, Sebastiaan Couwenberg wrote:
> I have access to several machines as root, no need to build on a porterbox...

You still might want to use a clean chroot, as that's proven to work for me.

Kind Regards,

Bas

---

From: Holger Levsen <[email-masked]>
Date: Mon, 17 Feb 2025 17:40:57 +0000

> You still might want to use a clean chroot, as that's proven to work for me.

the machine is very clean, it's been setup two weeks ago. the homedir
was unused as of today. i'll wait for the package in sid. thanks!

-- 
cheers,
	Holger

 ⢀⣴⠾⠻⢶⣦⠀

Where will your kids go when they become climate refugees?