Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package grub2 for openSUSE:Factory checked 
in at 2023-10-18 21:25:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/grub2 (Old)
 and      /work/SRC/openSUSE:Factory/.grub2.new.31755 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "grub2"

Wed Oct 18 21:25:13 2023 rev:304 rq:1118449 version:2.12~rc1

Changes:
--------
--- /work/SRC/openSUSE:Factory/grub2/grub2.changes      2023-10-13 
23:14:01.413606150 +0200
+++ /work/SRC/openSUSE:Factory/.grub2.new.31755/grub2.changes   2023-10-18 
21:25:15.939735325 +0200
@@ -1,0 +2,9 @@
+Mon Oct 16 08:05:03 UTC 2023 - Michael Chang <mch...@suse.com>
+
+- Fix detection of encrypted disk's uuid in powerpc to cope with logical disks
+  when signed image installation is specified (bsc#1216075) 
+  * 0003-grub-install-support-prep-environment-block.patch
+- grub2.spec: Add support to unlocking multiple encrypted disks in signed
+  grub.elf image for logical disks
+
+-------------------------------------------------------------------
@@ -93 +102 @@
-- Version bump to 2.12~rc1
+- Version bump to 2.12~rc1 (PED-5589)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ grub2.spec ++++++
--- /var/tmp/diff_new_pack.tqq6Is/_old  2023-10-18 21:25:18.175816326 +0200
+++ /var/tmp/diff_new_pack.tqq6Is/_new  2023-10-18 21:25:18.179816471 +0200
@@ -827,6 +827,7 @@
 echo "ENV_HINT=$ENV_HINT"
 echo "ENV_GRUB_DIR=$ENV_GRUB_DIR"
 echo "ENV_FS_UUID=$ENV_FS_UUID"
+echo "ENV_CRYPTO_UUID=$ENV_CRYPTO_UUID"
 
 if [ "$btrfs_relative_path" = xy ]; then
   btrfs_relative_path=1
@@ -861,9 +862,9 @@
 set root=""
 set cfg="grub.cfg"
 
-if [ "$ENV_CRYPTO_UUID" ]; then
-  cryptomount -u "$ENV_CRYPTO_UUID"
-fi
+for uuid in $ENV_CRYPTO_UUID; do
+  cryptomount -u $uuid
+done
 
 if [ "$ENV_FS_UUID" ]; then
   echo "searching for $ENV_FS_UUID with $hints"

++++++ 0003-grub-install-support-prep-environment-block.patch ++++++
--- /var/tmp/diff_new_pack.tqq6Is/_old  2023-10-18 21:25:18.335822122 +0200
+++ /var/tmp/diff_new_pack.tqq6Is/_new  2023-10-18 21:25:18.339822267 +0200
@@ -9,13 +9,18 @@
 are defined for this purpose:
 
 ENV_FS_UUID - The filesystem uuid for the grub root device
-ENV_CRYPTO_UUID - The crytodisk uuid for the grub root device
+ENV_CRYPTO_UUID - The crytodisk uuid for the grub root device separated
+by space
 ENV_GRUB_DIR - The path to grub prefix directory
 ENV_HINT - The recommended hint string for searching root device
 
 The size of environment block is defined in GRUB_ENVBLK_PREP_SIZE which
 is 4096 bytes and can be extended in the future.
 
+v2: Improve detection of ENV_CRYPTO_UUID by traversing all members of
+the logical disk and utilize a space as a separator when multiple UUIDs
+are found (bsc#1216075). 
+
 Signed-off-by: Michael Chang <mch...@suse.com>
 ---
  include/grub/lib/envblk.h |  3 +++
@@ -44,7 +49,49 @@
  
  #include <string.h>
  
-@@ -2138,6 +2139,43 @@
+@@ -609,6 +610,41 @@
+     }
+ }
+ 
++static char *
++cryptodisk_uuids (grub_disk_t disk, int in_recurse)
++{
++  grub_disk_memberlist_t list = NULL, tmp;
++  static char *ret;
++
++  if (!in_recurse)
++    ret = NULL;
++
++  if (disk->dev->disk_memberlist)
++    list = disk->dev->disk_memberlist (disk);
++
++  while (list)
++    {
++      ret = cryptodisk_uuids (list->disk, 1);
++      tmp = list->next;
++      free (list);
++      list = tmp;
++    }
++
++  if (disk->dev->id == GRUB_DISK_DEVICE_CRYPTODISK_ID)
++    {
++      if (!ret)
++        ret = grub_strdup (grub_util_cryptodisk_get_uuid (disk));
++      else
++      {
++        char *s = grub_xasprintf ("%s %s", grub_util_cryptodisk_get_uuid 
(disk), ret);
++        grub_free (ret);
++        ret = s;
++      }
++    }
++
++  return ret;
++}
++
+ static int
+ is_same_disk (const char *a, const char *b)
+ {
+@@ -2138,6 +2174,43 @@
          if (write_to_disk (ins_dev, imgfile))
            grub_util_error ("%s", _("failed to copy Grub to the PReP 
partition"));
          grub_set_install_backup_ponr ();
@@ -52,13 +99,13 @@
 +        if ((signed_grub_mode >= SIGNED_GRUB_FORCE) || ((signed_grub_mode == 
SIGNED_GRUB_AUTO) && (ppc_sb_state > 0)))
 +          {
 +            char *uuid = NULL;
-+            const char *cryptouuid = NULL;
 +            grub_envblk_t envblk = NULL;
 +            char *buf;
++            char *cryptouuid = NULL;
++
++            if (grub_dev->disk)
++              cryptouuid = cryptodisk_uuids (grub_dev->disk, 0);
 +
-+            /* TODO: Add LVM/RAID on encrypted partitions */
-+            if (grub_dev->disk && grub_dev->disk->dev->id == 
GRUB_DISK_DEVICE_CRYPTODISK_ID)
-+              cryptouuid = grub_util_cryptodisk_get_uuid (grub_dev->disk);
 +            if (grub_fs->fs_uuid && grub_fs->fs_uuid (grub_dev, &uuid))
 +              {
 +                grub_print_error ();

Reply via email to