diff --git a/rear-skip-unsupported-partition-tables-RHEL-78583.patch b/rear-skip-unsupported-partition-tables-RHEL-78583.patch new file mode 100644 index 0000000..6b911d1 --- /dev/null +++ b/rear-skip-unsupported-partition-tables-RHEL-78583.patch @@ -0,0 +1,29 @@ +From 825478ee27f916553938afaf5164fec22cb32732 Mon Sep 17 00:00:00 2001 +From: Johannes Meixner +Date: Tue, 10 May 2022 10:43:39 +0200 +Subject: [PATCH] Update 200_partition_layout.sh + +In layout/save/GNU/Linux/200_partition_layout.sh +ensure $disk_label is one of the supported partition tables, cf. +https://github.com/rear/rear/issues/2801#issuecomment-1122015129 +--- + usr/share/rear/layout/save/GNU/Linux/200_partition_layout.sh | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/usr/share/rear/layout/save/GNU/Linux/200_partition_layout.sh b/usr/share/rear/layout/save/GNU/Linux/200_partition_layout.sh +index b747d121c6..6e641d280e 100644 +--- a/usr/share/rear/layout/save/GNU/Linux/200_partition_layout.sh ++++ b/usr/share/rear/layout/save/GNU/Linux/200_partition_layout.sh +@@ -115,6 +115,11 @@ extract_partitions() { + parted -s $device print > $TMP_DIR/parted + disk_label=$(grep -E "Partition Table|Disk label" $TMP_DIR/parted | cut -d ":" -f "2" | tr -d " ") + fi ++ # Ensure $disk_label is valid to determine the partition name/type in the next step at 'declare type' ++ # cf. https://github.com/rear/rear/issues/2801#issuecomment-1122015129 ++ if ! [[ "$disk_label" = "msdos" || "$disk_label" = "gpt" || "$disk_label" = "gpt_sync_mbr" || "$disk_label" = "dasd" ]] ; then ++ Error "Unsupported partition table '$disk_label' (must be one of 'msdos' 'gpt' 'gpt_sync_mbr' 'dasd')" ++ fi + + + cp $TMP_DIR/partitions $TMP_DIR/partitions-data + diff --git a/rear.spec b/rear.spec index bf00d6b..a1c419c 100644 --- a/rear.spec +++ b/rear.spec @@ -139,6 +139,10 @@ Patch133: rear-abort-source-on-syntax-error-RHEL-104289.patch # https://github.com/rear/rear/commit/acb19846599a5fc411fd8c288776e1af2d79c920 Patch134: rear-fix-VG-recreation-RHEL-23887.patch +# skip unsupported partition tables, e.g. sun +# https://github.com/rear/rear/commit/825478ee27f916553938afaf5164fec22cb32732 +Patch135: rear-skip-unsupported-partition-tables-RHEL-78583.patch + ###################### # downstream patches # ######################