From e4a2016270b7d8c979deb2ca2b2b07185e1bca6f Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 17 Oct 2024 14:28:05 +0100 Subject: [PATCH] Fix osinfo for Windows Server 2025 resolves: RHEL-62935 --- ...-expand-gpt.pl-Implement-SKIP-rule-f.patch | 28 +++++++++++++ ...nfo.c-Add-Windows-Server-2025-osinfo.patch | 41 +++++++++++++++++++ ...upported-remote-drive-protocols-RHBZ.patch | 2 +- ...of-libguestfs-winsupport-features-ex.patch | 2 +- libguestfs.spec | 12 ++++-- 5 files changed, 79 insertions(+), 6 deletions(-) create mode 100644 0002-tests-gdisk-test-expand-gpt.pl-Implement-SKIP-rule-f.patch create mode 100644 0003-lib-inspect-osinfo.c-Add-Windows-Server-2025-osinfo.patch rename 0002-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch => 0004-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch (99%) rename 0003-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch => 0005-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch (97%) diff --git a/0002-tests-gdisk-test-expand-gpt.pl-Implement-SKIP-rule-f.patch b/0002-tests-gdisk-test-expand-gpt.pl-Implement-SKIP-rule-f.patch new file mode 100644 index 0000000..352afba --- /dev/null +++ b/0002-tests-gdisk-test-expand-gpt.pl-Implement-SKIP-rule-f.patch @@ -0,0 +1,28 @@ +From c25ff1a8022cf345d3ce29682207ed3732a4244a Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Mon, 14 Oct 2024 10:43:08 +0100 +Subject: [PATCH] tests/gdisk/test-expand-gpt.pl: Implement SKIP rule for this + test + +Reported-by: David Runge +Related: https://github.com/libguestfs/libguestfs/issues/155 +--- + tests/gdisk/test-expand-gpt.pl | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/tests/gdisk/test-expand-gpt.pl b/tests/gdisk/test-expand-gpt.pl +index 23a52b23..5c77247c 100755 +--- a/tests/gdisk/test-expand-gpt.pl ++++ b/tests/gdisk/test-expand-gpt.pl +@@ -20,6 +20,11 @@ use warnings; + + use Sys::Guestfs; + ++if ($ENV{SKIP_TEST_EXPAND_GPT_PL}) { ++ print "$0: test skipped because SKIP_TEST_EXPAND_GPT_PL is set\n"; ++ exit 77; ++} ++ + sub tests { + my $g = Sys::Guestfs->new (); + diff --git a/0003-lib-inspect-osinfo.c-Add-Windows-Server-2025-osinfo.patch b/0003-lib-inspect-osinfo.c-Add-Windows-Server-2025-osinfo.patch new file mode 100644 index 0000000..eab2227 --- /dev/null +++ b/0003-lib-inspect-osinfo.c-Add-Windows-Server-2025-osinfo.patch @@ -0,0 +1,41 @@ +From 0f489f8eec0c02e9ed1d606a2032edccf81ef025 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Thu, 17 Oct 2024 08:59:49 +0100 +Subject: [PATCH] lib/inspect-osinfo.c: Add Windows Server 2025 osinfo + +The guest was found to have these inspection fields: + + type: windows + distro: windows + product_name: Windows Server 2025 Standard + product_variant: Server + version: 10.0 + arch: x86_64 + hostname: WIN-84V4KKQ30SM + build ID: 26080 + windows_systemroot: /Windows + windows_software_hive: /Windows/System32/config/SOFTWARE + windows_system_hive: /Windows/System32/config/SYSTEM + windows_current_control_set: ControlSet001 + +Reported-by: Ming Xie +Fixes: https://issues.redhat.com/browse/RHEL-62935 +--- + lib/inspect-osinfo.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/lib/inspect-osinfo.c b/lib/inspect-osinfo.c +index c77344f6..f792d771 100644 +--- a/lib/inspect-osinfo.c ++++ b/lib/inspect-osinfo.c +@@ -142,7 +142,9 @@ guestfs_impl_inspect_get_osinfo (guestfs_h *g, const char *root) + switch (minor) { + case 0: + if (strstr (product_variant, "Server")) { +- if (strstr (product_name, "2022")) ++ if (strstr (product_name, "2025")) ++ return safe_strdup (g, "win2k25"); ++ else if (strstr (product_name, "2022")) + return safe_strdup (g, "win2k22"); + else if (strstr (product_name, "2019")) + return safe_strdup (g, "win2k19"); diff --git a/0002-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch b/0004-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch similarity index 99% rename from 0002-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch rename to 0004-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch index 2ce5ffe..81412ca 100644 --- a/0002-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch +++ b/0004-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch @@ -1,4 +1,4 @@ -From 88b210d09addca52663b1723d1c24754277215ee Mon Sep 17 00:00:00 2001 +From 4fd953832417479e644750c4f3e10fac70de7fed Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 29 Jul 2013 14:47:56 +0100 Subject: [PATCH] RHEL: Disable unsupported remote drive protocols diff --git a/0003-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch b/0005-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch similarity index 97% rename from 0003-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch rename to 0005-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch index 14f7993..8539f66 100644 --- a/0003-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch +++ b/0005-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch @@ -1,4 +1,4 @@ -From 4e73e1c5c33be8b392ef5a2b93dc3fea7f91ec2a Mon Sep 17 00:00:00 2001 +From 5908ee7f75fde1d664f9a48dd9c28f8d1e7f9f97 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 7 Jul 2015 09:28:03 -0400 Subject: [PATCH] RHEL: Reject use of libguestfs-winsupport features except for diff --git a/libguestfs.spec b/libguestfs.spec index 5af5d4a..c53cf17 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -37,7 +37,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.54.0 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -76,8 +76,10 @@ Source8: copy-patches.sh # Patches. Patch0001: 0001-website-Add-links-for-1.54-and-1.55-download-locatio.patch -Patch0002: 0002-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch -Patch0003: 0003-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch +Patch0002: 0002-tests-gdisk-test-expand-gpt.pl-Implement-SKIP-rule-f.patch +Patch0003: 0003-lib-inspect-osinfo.c-Add-Windows-Server-2025-osinfo.patch +Patch0004: 0004-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch +Patch0005: 0005-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch BuildRequires: autoconf, automake, libtool, gettext-devel @@ -1087,9 +1089,11 @@ rm ocaml/html/.gitignore %changelog -* Wed Oct 09 2024 Richard W.M. Jones - 1:1.54.0-1 +* Thu Oct 17 2024 Richard W.M. Jones - 1:1.54.0-2 - Rebase to libguestfs 1.54.0 resolves: RHEL-56809 +- Fix osinfo for Windows Server 2025 + resolves: RHEL-62935 * Tue Jul 09 2024 Richard W.M. Jones - 1:1.50.2-1 - Update to libguestfs 1.50.2