Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package grub2 for openSUSE:Factory checked 
in at 2025-05-23 14:29:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/grub2 (Old)
 and      /work/SRC/openSUSE:Factory/.grub2.new.2732 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "grub2"

Fri May 23 14:29:07 2025 rev:362 rq:1278957 version:2.12

Changes:
--------
--- /work/SRC/openSUSE:Factory/grub2/grub2.changes      2025-05-13 
20:12:20.124126808 +0200
+++ /work/SRC/openSUSE:Factory/.grub2.new.2732/grub2.changes    2025-05-23 
14:29:49.918752590 +0200
@@ -1,0 +2,12 @@
+Tue May 20 07:00:09 UTC 2025 - Michael Chang <mch...@suse.com>
+
+- Fix product name missing in snapshot list (bsc#1243162)
+  * grub2-snapper-plugin.sh
+
+-------------------------------------------------------------------
+Tue May 20 03:30:52 UTC 2025 - Michael Chang <mch...@suse.com>
+
+- Fix incorrect nvme disks and boot order in bootlist output (bsc#1237174)
+  * 0001-ieee1275-support-added-for-multiple-nvme-bootpaths.patch
+
+-------------------------------------------------------------------

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

Other differences:
------------------
++++++ 0001-ieee1275-support-added-for-multiple-nvme-bootpaths.patch ++++++
--- /var/tmp/diff_new_pack.tdAnzk/_old  2025-05-23 14:29:54.038926384 +0200
+++ /var/tmp/diff_new_pack.tdAnzk/_new  2025-05-23 14:29:54.038926384 +0200
@@ -1,6 +1,6 @@
-From 219b06c69d38a10349183002efb82bfec3b7ff5b Mon Sep 17 00:00:00 2001
+From e56c40ade88270bec8b50680fe34bb358919057b Mon Sep 17 00:00:00 2001
 From: Avnish Chouhan <avn...@linux.ibm.com>
-Date: Wed, 21 Aug 2024 14:13:05 +0530
+Date: Mon, 19 May 2025 16:34:34 +0530
 Subject: [PATCH] ieee1275: support added for multiple nvme bootpaths
 
 This patch sets mupltiple NVMe boot-devices for more robust boot.
@@ -8,16 +8,19 @@
 will be added as the boot-device.
 
 Signed-off-by: Avnish Chouhan <avn...@linux.ibm.com>
+Link: https://lore.kernel.org/r/20250519110434.28686-1-avn...@linux.ibm.com
 ---
- grub-core/osdep/linux/ofpath.c  |  6 +--
- grub-core/osdep/unix/platform.c | 65 ++++++++++++++++++++++++++++++++-
- include/grub/util/install.h     |  3 ++
- include/grub/util/ofpath.h      |  4 ++
- 4 files changed, 74 insertions(+), 4 deletions(-)
+ grub-core/osdep/linux/ofpath.c  |   6 +-
+ grub-core/osdep/unix/platform.c | 114 +++++++++++++++++++++++++++++++-
+ include/grub/util/install.h     |   3 +
+ include/grub/util/ofpath.h      |   4 ++
+ 4 files changed, 123 insertions(+), 4 deletions(-)
 
+diff --git a/grub-core/osdep/linux/ofpath.c b/grub-core/osdep/linux/ofpath.c
+index dd50d785dd..66a256b18b 100644
 --- a/grub-core/osdep/linux/ofpath.c
 +++ b/grub-core/osdep/linux/ofpath.c
-@@ -209,7 +209,7 @@
+@@ -209,7 +209,7 @@ find_obppath (const char *sysfs_path_orig)
      }
  }
  
@@ -26,7 +29,7 @@
  xrealpath (const char *in)
  {
    char *out;
-@@ -224,7 +224,7 @@
+@@ -224,7 +224,7 @@ xrealpath (const char *in)
    return out;
  }
  
@@ -35,7 +38,7 @@
  block_device_get_sysfs_path_and_link(const char *devicenode)
  {
    char *rpath;
-@@ -613,7 +613,7 @@
+@@ -613,7 +613,7 @@ of_path_get_nvme_nsid (const char* devname)
    return nsid;
  }
  
@@ -44,6 +47,8 @@
  nvme_get_syspath (const char *nvmedev)
  {
    char *sysfs_path, *controller_node;
+diff --git a/grub-core/osdep/unix/platform.c b/grub-core/osdep/unix/platform.c
+index 1e2961e006..e8e28f3d4b 100644
 --- a/grub-core/osdep/unix/platform.c
 +++ b/grub-core/osdep/unix/platform.c
 @@ -28,6 +28,8 @@
@@ -55,54 +60,103 @@
  
  static char *
  get_ofpathname (const char *dev)
-@@ -203,6 +205,56 @@
+@@ -203,6 +205,105 @@ grub_install_register_efi (const grub_disk_t 
*efidir_grub_disk,
    return 0;
  }
  
++
 +char *
 +add_multiple_nvme_bootdevices (const char *install_device)
 +{
-+  char *sysfs_path, *nvme_ns, *ptr;
++  char *sysfs_path, *nvme_ns, *ptr, *non_splitter_path;
 +  unsigned int nsid;
-+  char *multipath_boot;
-+  struct dirent *ep;
-+  DIR *dp;
-+
-+  /*
-+   * Extracting the namespace from install_device.
-+   * ex. install_device : /dev/nvme1n1
-+   */
++  char *multipath_boot, *ofpath, *ext_dir;
++  struct dirent *ep, *splitter_ep;
++  DIR *dp, *splitter_dp;
++  char *cntl_id, *dirR1, *dirR2, *splitter_info_path;
++  int is_FC = 0, is_splitter = 0;
++
 +  nvme_ns = grub_strstr (install_device, "nvme");
 +  nsid = of_path_get_nvme_nsid (nvme_ns);
 +  if (nsid == 0)
 +    return NULL;
 +
 +  sysfs_path = nvme_get_syspath (nvme_ns);
-+  strcat (sysfs_path, "/subsystem");
++  ofpath = xasprintf ("%s",get_ofpathname (nvme_ns));
++
++  if (grub_strstr (ofpath, "fibre-channel"))
++    {
++      strcat (sysfs_path, "/device");
++      is_FC = 1;
++    }
++  else
++    {
++      strcat (sysfs_path, "/subsystem");
++      is_FC = 0;
++    }
++  if (is_FC == 0)
++    {
++      cntl_id = grub_strstr (nvme_ns, "e");
++      dirR1 = xasprintf ("nvme%c",cntl_id[1]);
++
++      splitter_info_path = xasprintf ("%s%s%s", "/sys/block/", nvme_ns, 
"/device");
++      splitter_dp = opendir (splitter_info_path);
++      if (!splitter_dp)
++        return NULL;
++
++      while ((splitter_ep = readdir (splitter_dp)) != NULL)
++        {
++          if (grub_strstr (splitter_ep->d_name, "nvme"))
++           {
++             if (grub_strstr (splitter_ep->d_name, dirR1))
++               continue;
++
++              ext_dir = grub_strstr (splitter_ep->d_name, "e");
++              if (!(grub_strstr (ext_dir, "n")))
++               {
++                  dirR2 = xasprintf("%s", splitter_ep->d_name);
++                 is_splitter = 1;
++                 break;
++               }
++          }
++        }
++      closedir (splitter_dp);
++    }
 +  sysfs_path = xrealpath (sysfs_path);
 +  dp = opendir (sysfs_path);
 +  if (!dp)
 +    return NULL;
 +
 +  ptr = multipath_boot = xmalloc (BOOTDEV_BUFFER);
-+  while ((ep = readdir (dp)) != NULL)
++  if (is_splitter == 0 && is_FC == 0)
++    {
++      non_splitter_path = xasprintf ("%s%s%x:1 ", get_ofpathname (dirR1), 
"/namespace@", nsid);
++      strncpy (ptr, non_splitter_path, strlen (non_splitter_path));
++      ptr += strlen (non_splitter_path);
++      free (non_splitter_path);
++    }
++  else
 +    {
-+      char *path;
-+      if (grub_strstr (ep->d_name, "nvme"))
++      while ((ep = readdir (dp)) != NULL)
 +        {
-+          path = xasprintf ("%s%s%x ", get_ofpathname (ep->d_name), 
"/namespace@", nsid);
-+          if ((strlen (multipath_boot) + strlen (path)) > BOOTDEV_BUFFER)
++          char *path;
++          if (grub_strstr (ep->d_name, "nvme"))
 +            {
-+              grub_util_warn (_("Maximum five entries are allowed in the 
bootlist"));
++              if (is_FC == 0 && !grub_strstr (ep->d_name, dirR1) && 
!grub_strstr (ep->d_name, dirR2))
++                continue;
++              path = xasprintf ("%s%s%x ", get_ofpathname (ep->d_name), 
"/namespace@", nsid);
++              if ((strlen (multipath_boot) + strlen (path)) > BOOTDEV_BUFFER)
++                {
++                  grub_util_warn (_("Maximum five entries are allowed in the 
bootlist"));
++                  free (path);
++                  break;
++                }
++              strncpy (ptr, path, strlen (path));
++              ptr += strlen (path);
 +              free (path);
-+              break;
 +            }
-+          strncpy (ptr, path, strlen (path));
-+          ptr += strlen (path);
-+          free (path);
 +        }
 +    }
-+
 +  *--ptr = '\0';
 +  closedir (dp);
 +
@@ -112,7 +166,7 @@
  void
  grub_install_register_ieee1275 (int is_prep, const char *install_device,
                                int partno, const char *relpath)
-@@ -242,8 +294,19 @@
+@@ -242,8 +343,19 @@ grub_install_register_ieee1275 (int is_prep, const char 
*install_device,
        }
        *ptr = '\0';
      }
@@ -133,21 +187,25 @@
  
    if (grub_util_exec ((const char * []){ "nvsetenv", "boot-device",
          boot_device, NULL }))
+diff --git a/include/grub/util/install.h b/include/grub/util/install.h
+index 563cf68e94..2f220ed3aa 100644
 --- a/include/grub/util/install.h
 +++ b/include/grub/util/install.h
-@@ -241,6 +241,9 @@
-                          const char *efi_distributor,
-                          const char *force_disk);
+@@ -223,6 +223,9 @@ grub_install_get_image_targets_string (void);
+ const char *
+ grub_util_get_target_dirname (const struct grub_install_image_target_desc *t);
  
 +char *
 +add_multiple_nvme_bootdevices (const char *install_device);
 +
  void
- grub_install_register_ieee1275 (int is_prep, const char *install_device,
-                               int partno, const char *relpath);
+ grub_install_create_envblk_file (const char *name);
+ 
+diff --git a/include/grub/util/ofpath.h b/include/grub/util/ofpath.h
+index 7ab377c7cc..7e75866853 100644
 --- a/include/grub/util/ofpath.h
 +++ b/include/grub/util/ofpath.h
-@@ -30,5 +30,9 @@
+@@ -30,5 +30,9 @@ int add_filename_to_pile (char *filename, struct 
ofpath_files_list_root* root);
  void find_file (char* filename, char* directory, struct 
ofpath_files_list_root* root, int max_depth, int depth);
  char* of_find_fc_host (char* host_wwpn);
  void free_ofpath_files_list (struct ofpath_files_list_root* root);
@@ -157,4 +215,7 @@
 +unsigned int of_path_get_nvme_nsid (const char* devname);
  
  #endif /* ! GRUB_OFPATH_MACHINE_UTIL_HEADER */
+-- 
+2.49.0
+
 


++++++ grub2-snapper-plugin.sh ++++++
--- /var/tmp/diff_new_pack.tdAnzk/_old  2025-05-23 14:29:55.006967217 +0200
+++ /var/tmp/diff_new_pack.tdAnzk/_new  2025-05-23 14:29:55.010967386 +0200
@@ -61,7 +61,7 @@
   if [ -z "$kernel_ver" -a -L ${snapshot}/boot/image ]; then
     kernel_ver=`readlink ${snapshot}/boot/image | sed -e 's/^image-//' -e 
's/-default$//'`
   fi
-  eval `cat ${snapshot}/etc/os-release` 
+  [ ! -f "${snapshot}/etc/os-release" ] || source "${snapshot}/etc/os-release"
   # bsc#934252 - Replace SLES 12.1 with SLES12-SP1 for the list of snapshots
   if test "${NAME}" = "SLES" -o "${NAME}" = "SLED"; then
     VERSION=`echo ${VERSION} | sed -e 
's!^\([0-9]\{1,\}\)\.\([0-9]\{1,\}\)$!\1-SP\2!'`

Reply via email to