grub-mkconfig fails version_find_latest command not found with tboot package

Bug #2051347 reported by shangsong
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tboot (Ubuntu)
New
Undecided
Unassigned

Bug Description

1.Fresh install ubuntu server 24.04 with tboot package;

2.It will fail with output "version_find_latest command not found" when use command grub-mkconfig or update-grub to generate grub configuration file

3. The root cause is that following file will use the command ""version_find_latest command"
/etc/grub.d/20_linux_tboot:
  current_tboot=`version_find_latest $tboot_list`
  linux=`version_find_latest $list`

/etc/grub.d/20_linux_xen_tboot:
  current_xen=`version_find_latest $xen_list`
  current_tboot=`version_find_latest $tlist`
  linux=`version_find_latest $list`

Below is a same issue, but does not fix the configuration file resided in tboot package, please fix it, thanks.
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/2045042

Revision history for this message
Jeff Lane  (bladernr) wrote :

https://sourceforge.net/projects/tboot

have you tried the lastest upstream version of tboot which looks to be 1.11.3?

And can you provide step-by-step instructions for recreating this?

Currently, tboot in noble is the same version as in Mantic:

$ rmadison tboot
 tboot | 1.10.5-4 | mantic/universe | source, amd64
 tboot | 1.10.5-4 | noble/universe | source, amd64

Debian currently has 1.10.5-4 as well:
https://packages.debian.org/sid/tboot

Unless Debian updates soon, I doubt we will update, as universe packages we pull directly from Debian.

But I'll see what we can do, though I cannot promise anything.

Revision history for this message
shangsong (shangsong2) wrote :

have you tried the lastest upstream version of tboot which looks to be 1.11.3?
=> The lastest upstream version(1.11.3) has the same issue.

And can you provide step-by-step instructions for recreating this?
=>1. Fresh install Ubuntu server 24.04 with the latest daily build
2. Install tboot package:
# apt update; apt install -y tboot
3.Update grub file:
# update-grub
The issue occurs on this step

The root cause should come from the change of grub:
1.Below grub commit remove the function version_find_latest():

commit a79c567f6b5820a8795c273a9eaabd06a1f92b29
Author: Mathieu Desnoyers <email address hidden>
Date: Mon Jun 13 10:08:26 2022 -0400

    templates: Remove unused version comparison functions

    There are no users left of version_find_latest(), version_test_gt(), and
    version_test_numeric(). Remove those unused helper functions.
2. Rencently, the function was reverted, it should be fixed with the latest grub and below commit.

commit e7a831963e30c6d9c61027a97e50388856c68d03
Author: Julian Andres Klode <email address hidden>
Date: Wed Nov 29 13:42:55 2023 +0100

    templates: Reinstate unused version comparison functions with warning

    Revert the commit a79c567f6 (templates: Remove unused version comparison
    functions) and add a warning to the functions that they are deprecated.

Could you help push the new grub release with above commit(e7a831963)?

Revision history for this message
shangsong (shangsong2) wrote :

The function "version_find_latest" has been reverted by the latest grub-common package(grub-common_2.12-1ubuntu2_amd64), this can be closed, now.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.