From d06c36a3e03cf757d71b69bfc7ac7c6f5cb2cc5d Mon Sep 17 00:00:00 2001 From: eabdullin Date: Wed, 4 Sep 2024 11:36:23 +0300 Subject: [PATCH] - daemon: part_get_gpt_type: Remove unhelpful MBR fallback behaviour --- ...t_type-Remove-unhelpful-MBR-fallback.patch | 43 +++++++++++++++++++ SPECS/libguestfs.spec | 12 +++++- 2 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 SOURCES/0040-daemon-part_get_gpt_type-Remove-unhelpful-MBR-fallback.patch diff --git a/SOURCES/0040-daemon-part_get_gpt_type-Remove-unhelpful-MBR-fallback.patch b/SOURCES/0040-daemon-part_get_gpt_type-Remove-unhelpful-MBR-fallback.patch new file mode 100644 index 0000000..0dfaf13 --- /dev/null +++ b/SOURCES/0040-daemon-part_get_gpt_type-Remove-unhelpful-MBR-fallback.patch @@ -0,0 +1,43 @@ +From 2811e42b436c94392c2722bbf4b19299285a6254 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Fri, 10 May 2024 15:23:35 +0100 +Subject: [PATCH] daemon: part_get_gpt_type: Remove unhelpful MBR fallback + behaviour + +This was an accident of the parted implementation, and wasn't really +used anywhere. Remove it. +--- + daemon/listfs.ml | 3 ++- + generator/actions_core.ml | 4 +--- + 2 files changed, 3 insertions(+), 4 deletions(-) + +diff --git a/daemon/listfs.ml b/daemon/listfs.ml +index 2376b61db..4cc3c437a 100644 +--- a/daemon/listfs.ml ++++ b/daemon/listfs.ml +@@ -111,8 +111,9 @@ and is_partition_can_hold_filesystem partition = + false + else if is_mbr_bogus parttype device partnum then + true ++ else if is_mbr then ++ true + else ( +- (* MBR partition id will be converted into corresponding GPT type. *) + let gpt_type = Parted.part_get_gpt_type device partnum in + match gpt_type with + (* Windows Logical Disk Manager metadata partition. *) +diff --git a/generator/actions_core.ml b/generator/actions_core.ml +index 4f78a0d26..935e59eab 100644 +--- a/generator/actions_core.ml ++++ b/generator/actions_core.ml +@@ -8118,9 +8118,7 @@ for a useful list of type GUIDs." }; + ]; + shortdesc = "get the type GUID of a GPT partition"; + longdesc = "\ +-Return the type GUID of numbered GPT partition C. For MBR partitions, +-return an appropriate GUID corresponding to the MBR type. Behaviour is undefined +-for other partition types." }; ++Return the type GUID of numbered GPT partition C." }; + + { defaults with + name = "part_set_gpt_attributes"; added = (1, 21, 1); diff --git a/SPECS/libguestfs.spec b/SPECS/libguestfs.spec index d84308f..4a99f33 100644 --- a/SPECS/libguestfs.spec +++ b/SPECS/libguestfs.spec @@ -45,7 +45,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.50.1 -Release: 7%{?dist}.alma.1 +Release: 80%{?dist}.alma.1 License: LGPLv2+ # Build only for architectures that have a kernel @@ -131,6 +131,10 @@ Patch0037: 0037-ocaml-Nullify-custom-block-before-releasing-runtime-.patch Patch0038: 0038-Update-common-submodule.patch Patch0039: 0039-tests-Test-guestfish-key-all-.-selector.patch +# Patches were taken from: +# https://github.com/libguestfs/libguestfs/commit/2811e42b436c94392c2722bbf4b19299285a6254 +Patch0040: 0040-daemon-part_get_gpt_type-Remove-unhelpful-MBR-fallback.patch + %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool, gettext-devel %endif @@ -1136,7 +1140,11 @@ rm ocaml/html/.gitignore %changelog -* Thu Mar 28 2024 Edaurd Abdullin - 1:1.50.1-7.alma.1 +* Wed Sep 04 2024 Eduard Abdullin - 1:1.50.1-8.alma.1 +- daemon: part_get_gpt_type: Remove unhelpful MBR fallback + behaviour + +* Thu Mar 28 2024 Eduard Abdullin - 1:1.50.1-7.alma.1 - Fix build for AlmaLinux - Avoid permission denied for yum/dnf cache