Public bug reported:

The standard libs check when running on Raspberry Pi (this seems to work on 
amd64) fails the kernel version check for two reasons. The first is known 
(permissions on the image file), but the second seems to be a difference in the 
way the kernel test results are provided.
Specifically, based on my looking at the perl code, I think this is the command 
run to collect the information:
strings vmlinuz-5.8.0-1007-raspi | egrep ^5.8.0-1007-raspi\|"^Linux version"
Linux version 5.8.0-1007-raspi (buildd@bos02-arm64-039) (gcc (Ubuntu 
10.2.0-13ubuntu1) 10.2.0, GNU ld (GNU Binutils for Ubuntu) 2.35.1) #10-Ubuntu 
SMP PREEMPT Thu Nov 5 17:52:40 UTC 2020 (Ubuntu 5.8.0-1007.10-raspi 5.8.14)
5.8.0-1007-raspi SMP preempt mod_unload aarch64
5.8.0-1007-raspi
5.8.0-1007-raspi

The problem seems to be on the first line, where after the expected version 
string, is an extra " (Ubuntu 5.8.0-1007.10-raspi 5.8.14)" text.
Editing the libs file as follows seems to solve the problem for me:
--- libs        2020-11-19 02:07:12.716041097 +0000
+++ libs.local  2020-11-19 02:05:20.625963787 +0000
@@ -104,7 +104,7 @@
                                 "$newest_kernel_image. Can't check kernel 
version!\n\n");
             }
         } else {
-            if ($kernel_image_version =~ /^(Linux version 
)?\Q$running_kernel_release\E \(.*\) \Q$running_kernel_version\E$/) {
+            if ($kernel_image_version =~ /^(Linux version 
)?\Q$running_kernel_release\E \(.*\) \Q$running_kernel_version\E/) {
                 $bb->color_line('green',
                                 sprintf("Newest kernel is running: %s, version 
%s\n\n",
                                         $running_kernel_release,

Alternatively, adding .* before the $ would also resolve this issue. I'm
not sure how to collect and repeat the other version information to
resolve this, nor how this might affect other platforms, so the above
seems to be the simplest solution (to just ignore any extraneous text)
that should work on any platform that it worked on before.

Regards,
Adam

** Affects: hobbit-plugins (Ubuntu)
     Importance: Undecided
         Status: New

** Patch added: "Fix libs check for kernel version"
   
https://bugs.launchpad.net/bugs/1904807/+attachment/5435830/+files/libspatch.txt

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1904807

Title:
  Raspberry Pi libs check fails kernel version

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/hobbit-plugins/+bug/1904807/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to