[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1105979: unblock: grml-debootstrap/0.121



Obviously I forgot to actually attach the debdiff.

Chris

diff -Nru grml-debootstrap-0.119/chroot-script grml-debootstrap-0.121/chroot-script
--- grml-debootstrap-0.119/chroot-script	2025-03-30 16:00:26.000000000 +0200
+++ grml-debootstrap-0.121/chroot-script	2025-05-14 13:20:49.000000000 +0200
@@ -576,7 +576,7 @@
   KERNELVER=${KERNELIMG#/boot/vmlinuz-}
 
   # generate initrd
-  if [ -n "$INITRD" ] ; then
+  if [ "$INITRD" = "yes" ] ; then
      echo "Generating initrd."
      if [ "$INITRD_GENERATOR" = 'dracut' ] ; then
          # shellcheck disable=SC2086
@@ -728,8 +728,8 @@
      grub_device="${GRUB}"
   fi
 
-  echo "Setting grub debconf configuration for install device to $GRUB"
-  if [ -n "$MAIN_GRUB_PACKAGE" ]; then
+  if [ -n "$MAIN_GRUB_PACKAGE" ] && ! [[ "$MAIN_GRUB_PACKAGE" =~ ^grub-cloud ]]; then
+    echo "Setting grub debconf configuration for install device to $GRUB"
     echo "${MAIN_GRUB_PACKAGE} ${MAIN_GRUB_PACKAGE}/install_devices multiselect ${grub_device}" | debconf-set-selections
   fi
 
diff -Nru grml-debootstrap-0.119/debian/changelog grml-debootstrap-0.121/debian/changelog
--- grml-debootstrap-0.119/debian/changelog	2025-04-07 12:33:54.000000000 +0200
+++ grml-debootstrap-0.121/debian/changelog	2025-05-14 13:20:54.000000000 +0200
@@ -1,3 +1,24 @@
+grml-debootstrap (0.121) unstable; urgency=medium
+
+  [ Aaron Rainbolt ]
+  * [b3aeda2] Don't set bogus debconf variable on grub-cloud packages
+
+ -- Chris Hofstaedtler <ch@grml.org>  Wed, 14 May 2025 13:20:54 +0200
+
+grml-debootstrap (0.120) unstable; urgency=medium
+
+  [ Patrick Schleizer ]
+  * [d634a72] fix skipping initrd creation using INITRD=no
+
+  [ Aaron Rainbolt ]
+  * [d8ca8f2] Set root partition type UUIDs for VM images according to the
+    Discoverable Partition Specification
+
+  [ Michael Prokop ]
+  * [0208c8a] Verify that GRUB configuration points to valid block device
+
+ -- Chris Hofstaedtler <ch@grml.org>  Sun, 11 May 2025 18:45:24 +0200
+
 grml-debootstrap (0.119) unstable; urgency=medium
 
   [ Chris Hofstaedtler ]
diff -Nru grml-debootstrap-0.119/grml-debootstrap grml-debootstrap-0.121/grml-debootstrap
--- grml-debootstrap-0.119/grml-debootstrap	2025-04-07 12:33:49.000000000 +0200
+++ grml-debootstrap-0.121/grml-debootstrap	2025-05-11 18:44:47.000000000 +0200
@@ -1145,6 +1145,12 @@
 fi
 # }}}
 
+# Verify that provided GRUB device actually exists{{{
+if [ -n "${GRUB}" ] && ! [ -b "${GRUB}" ] ;  then
+  eerror "GRUB target '${GRUB}' doesn't look like a supported block device."
+  bailout 1
+fi
+# }}}
 checkconfiguration
 
 # finally make sure at least $TARGET is set [the partition for the new system] {{{
@@ -1425,6 +1431,11 @@
     arm64)      VMEFI=1;;
   esac
 
+  parted_type_command_supported='no'
+  if [[ "$(parted --help)" =~ 'type NUMBER TYPE-ID or TYPE-UUID' ]]; then
+    parted_type_command_supported='yes'
+  fi
+
   if [ -n "$VMFILE" ]; then
     qemu-img create -f raw "${TARGET}" "${VMSIZE}"
   fi
@@ -1435,10 +1446,21 @@
     if [ "$ARCH" = 'arm64' ]; then
       # No need for a bios_grub parttion on ARM64
       parted -s "${TARGET}" 'mkpart primary ext4 101MiB 100%'
+      if [ "${parted_type_command_supported}" = 'yes' ]; then
+        # Make the root partition identify itself as "Root Partition (64-bit
+        # ARM/AARCH64)", see
+        # https://uapi-group.org/specifications/specs/discoverable_partitions_specification/
+        parted -s "${TARGET}" 'type 2 b921b045-1df0-41c3-af44-4c6f280d3fae'
+      fi
     else
       parted -s "${TARGET}" 'mkpart bios_grub 101MiB 102MiB'
       parted -s "${TARGET}" 'set 2 bios_grub on'
       parted -s "${TARGET}" 'mkpart primary ext4 102MiB 100%'
+      if [ "${parted_type_command_supported}" = 'yes' ]; then
+        # Make the root partition identify itself as "Root Partition
+        # (amd64/x86_64)", see Discoverable Partitions Specification link above
+        parted -s "${TARGET}" 'type 3 4f68bce3-e8cd-4db1-96e7-fbcaf984b709'
+      fi
     fi
   else
     parted -s "${TARGET}" 'mklabel msdos'

Reply to: