Comment 6 for bug 2065863

Revision history for this message
Simon Chopin (schopin) wrote :

Verified in a fresh VM:

root@needrestart-motd:~/needrestart-3.6# dpkg -l needrestart | tail -n 1
ii needrestart 3.6-7ubuntu4.1 all check which daemons need to be restarted after library upgrades
root@needrestart-motd:~/needrestart-3.6# systemd-detect-virt
kvm
root@needrestart-motd:~/needrestart-3.6# ls /run/reboot-required
ls: cannot access '/run/reboot-required': No such file or directory
root@needrestart-motd:~/needrestart-3.6# gcc -shared -fPIC -ldl debian/tests/mockuname.c -o mockuname.so
root@needrestart-motd:~/needrestart-3.6# LD_PRELOAD=$PWD/mockuname.so apt install hello
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  hello
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 26.0 kB of archives.
After this operation, 106 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu noble/main amd64 hello amd64 2.10-3build1 [26.0 kB]
Fetched 26.0 kB in 0s (309 kB/s)
Selecting previously unselected package hello.
(Reading database ... 105648 files and directories currently installed.)
Preparing to unpack .../hello_2.10-3build1_amd64.deb ...
Unpacking hello (2.10-3build1) ...
Setting up hello (2.10-3build1) ...
Processing triggers for man-db (2.12.0-4build2) ...
ERROR: ld.so: object '/root/needrestart-3.6/mockuname.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
Processing triggers for install-info (7.1-3build2) ...
Scanning processes...
Scanning linux images...

Pending kernel upgrade!
Running kernel version:
  6.8.0-37-generic
Diagnostics:
  The currently running kernel version is not the expected kernel version 6.8.0-38-generic.

Restarting the system to load the new kernel will not be handled automatically, so you should consider rebooting.

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on this host.
root@needrestart-motd:~/needrestart-3.6# test ! -x /run/reboot-required || echo test failed
root@needrestart-motd:~/needrestart-3.6#