import Oracle_OSS libguestfs-1.56.1-6.0.1.el10_1

This commit is contained in:
AlmaLinux RelEng Bot 2026-05-06 02:51:18 -04:00
parent a6a8a033b8
commit 7135e0a680
4 changed files with 257 additions and 4 deletions

View File

@ -0,0 +1,87 @@
From 8613ec938e6670bf2043eed7634a502e59e261a7 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 16 Apr 2026 08:06:50 +0100
Subject: [PATCH] daemon/listfs.ml: Refactor is_partition_can_hold_filesystem
Refactor and simplify the function.
This is just code motion, there is no functional change.
(cherry picked from commit 88bd07f350407619d4f5fe406c5594b50cf541dd)
---
daemon/listfs.ml | 53 ++++++++++++++++++++----------------------------
1 file changed, 22 insertions(+), 31 deletions(-)
diff --git a/daemon/listfs.ml b/daemon/listfs.ml
index 4c90796ef..067314c47 100644
--- a/daemon/listfs.ml
+++ b/daemon/listfs.ml
@@ -115,43 +115,34 @@ and is_not_partitioned_device device =
* Windows Snapshot Partition as well as MBR extended partitions.
*)
and is_partition_can_hold_filesystem partition =
- let device = Devsparts.part_to_dev partition in
- let partnum = Devsparts.part_to_partnum partition in
- let parttype = Parted.part_get_parttype device in
+ let device = Devsparts.part_to_dev partition
+ and partnum = Devsparts.part_to_partnum partition in
- let is_gpt = parttype = "gpt" in
- let is_mbr = parttype = "msdos" in
- let is_gpt_or_mbr = is_gpt || is_mbr in
+ match Parted.part_get_parttype device with
+ | "msdos" ->
+ if Parted.part_get_mbr_part_type device partnum = "extended" then
+ false
+ else if partnum = 1 && Utils.has_bogus_mbr device then
+ true
+ else
+ true
- if is_gpt_or_mbr then (
- if is_mbr_extended parttype device partnum then
- false
- else if is_mbr_bogus parttype device partnum then
- true
- else if is_mbr then
- true
- else (
- let gpt_type = Sfdisk.part_get_gpt_type device partnum in
- match gpt_type with
+ | "gpt" ->
+ let gpt_type = Sfdisk.part_get_gpt_type device partnum in
+ (match gpt_type with
(* Windows Logical Disk Manager metadata partition. *)
| "5808C8AA-7E8F-42E0-85D2-E1E90434CFB3"
- (* Windows Logical Disk Manager data partition. *)
- | "AF9B60A0-1431-4F62-BC68-3311714A69AD"
- (* Microsoft Reserved Partition. *)
- | "E3C9E316-0B5C-4DB8-817D-F92DF00215AE"
- (* Windows Snapshot Partition. *)
- | "CADDEBF1-4400-4DE8-B103-12117DCF3CCF" -> false
+ (* Windows Logical Disk Manager data partition. *)
+ | "AF9B60A0-1431-4F62-BC68-3311714A69AD"
+ (* Microsoft Reserved Partition. *)
+ | "E3C9E316-0B5C-4DB8-817D-F92DF00215AE"
+ (* Windows Snapshot Partition. *)
+ | "CADDEBF1-4400-4DE8-B103-12117DCF3CCF" -> false
| _ -> true
- )
- )
- else true
+ )
-and is_mbr_extended parttype device partnum =
- parttype = "msdos" &&
- Parted.part_get_mbr_part_type device partnum = "extended"
-
-and is_mbr_bogus parttype device partnum =
- parttype = "msdos" && partnum = 1 && Utils.has_bogus_mbr device
+ | _ -> (* unknown or other *)
+ true
(* Use vfs-type to check for a filesystem of some sort of [device].
* Appends (device, vfs_type) to the ret parameter (there may be
--
2.47.3

View File

@ -0,0 +1,114 @@
From 7349b7c5aa58b937394f5a44844238ff38e2f80d Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 16 Apr 2026 08:34:38 +0100
Subject: [PATCH] daemon/listfs.ml: Ignore CHS geometry error from parted
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
parted has an annoying bug where it fails to parse Sun partition
tables (still used by Veritas). It tries to check the CHS geometry
stored in the header matches the physical CHS geometry, which is a
meaningless test.
In function is_partition_can_hold_filesystem we are only interested in
MBR and GPT partition types, so catch and ignore this specific parted
error.
I tested this by adding a Sun disk as a second disk to a Fedora
guest and doing inspection. Previously the operation would
fail:
$ guestfish --ro -a /var/tmp/fedora-41.img -a /var/tmp/dump.img -i
libguestfs: error: inspect_os: parted exited with status 1: Warning:
The disk CHS geometry (205603,255,2) reported by the operating
system does not match the geometry stored on the disk label
(64887,16,101).
After this change it succeeds:
$ guestfish --ro -a /var/tmp/fedora-41.img -a /var/tmp/dump.img -i
Welcome to guestfish, the guest filesystem shell for
editing virtual machine filesystems and disk images.
Type: help for help on commands
man to read the manual
quit to quit the shell
Operating system: Fedora Linux 41 (Forty One)
/dev/sda3 mounted on /
/dev/sda2 mounted on /boot
Fixes: https://redhat.atlassian.net/browse/RHEL-165220
(cherry picked from commit 8d83bf2bcf31c5206b6deaa5e993009a85ff174f)
---
daemon/listfs.ml | 44 ++++++++++++++++++++++++++++----------------
1 file changed, 28 insertions(+), 16 deletions(-)
diff --git a/daemon/listfs.ml b/daemon/listfs.ml
index 067314c47..8ca5ca8a8 100644
--- a/daemon/listfs.ml
+++ b/daemon/listfs.ml
@@ -118,30 +118,42 @@ and is_partition_can_hold_filesystem partition =
let device = Devsparts.part_to_dev partition
and partnum = Devsparts.part_to_partnum partition in
- match Parted.part_get_parttype device with
- | "msdos" ->
- if Parted.part_get_mbr_part_type device partnum = "extended" then
- false
- else if partnum = 1 && Utils.has_bogus_mbr device then
- true
- else
- true
+ try
+ match Parted.part_get_parttype device with
+ | "msdos" ->
+ if Parted.part_get_mbr_part_type device partnum = "extended" then
+ false
+ else if partnum = 1 && Utils.has_bogus_mbr device then
+ true
+ else
+ true
- | "gpt" ->
- let gpt_type = Sfdisk.part_get_gpt_type device partnum in
- (match gpt_type with
- (* Windows Logical Disk Manager metadata partition. *)
- | "5808C8AA-7E8F-42E0-85D2-E1E90434CFB3"
+ | "gpt" ->
+ let gpt_type = Sfdisk.part_get_gpt_type device partnum in
+ (match gpt_type with
+ (* Windows Logical Disk Manager metadata partition. *)
+ | "5808C8AA-7E8F-42E0-85D2-E1E90434CFB3"
(* Windows Logical Disk Manager data partition. *)
| "AF9B60A0-1431-4F62-BC68-3311714A69AD"
(* Microsoft Reserved Partition. *)
| "E3C9E316-0B5C-4DB8-817D-F92DF00215AE"
(* Windows Snapshot Partition. *)
| "CADDEBF1-4400-4DE8-B103-12117DCF3CCF" -> false
- | _ -> true
- )
+ | _ -> true
+ )
- | _ -> (* unknown or other *)
+ | _ -> (* unknown or other *)
+ true
+
+ with
+ | Failure msg when String.find msg "CHS geometry" >= 0 ->
+ (* Parted has poor handling of "sun" partition types, always
+ * issuing a warning because the CHS doesn't match the physical
+ * geometry. Ignore this as we don't care about it in this
+ * function (RHEL-165220).
+ *)
+ eprintf "is_partition_can_hold_filesystem: \
+ ignoring warning from parted: %s\n%!" msg;
true
(* Use vfs-type to check for a filesystem of some sort of [device].
--
2.47.3

View File

@ -0,0 +1,39 @@
From 39e25217dccb4b49f2ab481f0b026f1498973647 Mon Sep 17 00:00:00 2001
From: Darren Archibald <darren.archibald@oracle.com>
Date: Mon, 3 Oct 2022 09:55:14 -0700
Subject: [PATCH] Add Oracle Linux identifier
Signed-off-by: Darren Archibald <darren.archibald@oracle.com>
---
daemon/inspect_fs_unix.ml | 1 +
m4/guestfs-appliance.m4 | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/daemon/inspect_fs_unix.ml b/daemon/inspect_fs_unix.ml
index d8dce60..ee89ff0 100644
--- a/daemon/inspect_fs_unix.ml
+++ b/daemon/inspect_fs_unix.ml
@@ -159,6 +159,7 @@ and distro_of_os_release_id = function
| "pardus" -> Some DISTRO_PARDUS
| "pld" -> Some DISTRO_PLD_LINUX
| "rhel" -> Some DISTRO_RHEL
+ | "ol" -> Some DISTRO_ORACLE_LINUX
| "rocky" -> Some DISTRO_ROCKY
| "sles" | "sled" -> Some DISTRO_SLES
| "ubuntu" -> Some DISTRO_UBUNTU
diff --git a/m4/guestfs-appliance.m4 b/m4/guestfs-appliance.m4
index 4e671d2..dc06d1a 100644
--- a/m4/guestfs-appliance.m4
+++ b/m4/guestfs-appliance.m4
@@ -114,7 +114,7 @@ if test "x$ENABLE_APPLIANCE" = "xyes"; then
fi ) | tr '@<:@:lower:@:>@' '@<:@:upper:@:>@'
)"
AS_CASE([$DISTRO],
- [FEDORA | RHEL | CENTOS | ALMALINUX | CLOUDLINUX \
+ [FEDORA | RHEL | OL | CENTOS | ALMALINUX | CLOUDLINUX \
| ROCKY | VIRTUOZZO],
[DISTRO=REDHAT],
[OPENSUSE* | SLED | SLES],[DISTRO=SUSE],
--
2.39.3

View File

@ -42,7 +42,7 @@ Summary: Access and modify virtual machine disk images
Name: libguestfs
Epoch: 1
Version: 1.56.1
Release: 4%{?dist}
Release: 6.0.1%{?dist}
License: LGPL-2.1-or-later
# Build only for architectures that have a kernel
@ -100,6 +100,10 @@ Patch0017: 0017-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch
Patch0018: 0018-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch
Patch0019: 0019-RHEL-appliance-init-Run-depmod-a-to-rebuild-kernel-m.patch
Patch0020: 0020-daemon-device-name-translation.c-Fix-btrfs-volume-re.patch
Patch0021: 0021-daemon-listfs.ml-Refactor-is_partition_can_hold_file.patch
Patch0022: 0022-daemon-listfs.ml-Ignore-CHS-geometry-error-from-part.patch
Patch1000: 1000-Add-Oracle-Linux-identifier.patch
BuildRequires: autoconf, automake, libtool, gettext-devel
@ -209,9 +213,7 @@ BuildRequires: attr
BuildRequires: augeas-libs
BuildRequires: bash
BuildRequires: binutils
%if !0%{?rhel}
BuildRequires: btrfs-progs
%endif
BuildRequires: bzip2
BuildRequires: clevis-luks
BuildRequires: coreutils
@ -527,7 +529,7 @@ guests. Install this package if you want libguestfs to be able to
inspect non-Linux guests and display icons from them.
The only reason this is a separate package is to avoid core libguestfs
having to depend on Perl. See https://bugzilla.redhat.com/1194158
having to depend on Perl.
%package bash-completion
@ -755,6 +757,7 @@ fi
--disable-php \
--disable-ruby \
%endif
--with-extra-packages="btrfs-progs" \
$extra
# 'INSTALLDIRS' ensures that Perl and Ruby libs are installed in the
@ -1086,6 +1089,16 @@ rm ocaml/html/.gitignore
%changelog
* Tue May 05 2026 EL Errata <el-errata_ww@oracle.com> - 1.56.1-6.0.1
- Add btrfs-progs to the packages installed in the appliance [Orabug: 34137448]
- Replace upstream references from a description tag
- Fix build on Oracle Linux [Orabug: 29319324]
- Set DISTRO_ORACLE_LINUX correspeonding to ol
* Fri Apr 17 2026 Richard W.M. Jones <rjones@redhat.com> - 1:1.56.1-6
- Fix CHS geometry error for Veritas/Sun partitions
resolves: RHEL-169224
* Mon Mar 09 2026 Richard W.M. Jones <rjones@redhat.com> - 1:1.56.1-4
- Fix btrfs volume reverse translation
resolves: RHEL-149119