From 7da86f4a86716937e243a625f69c08cca3a87fba Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 9 Sep 2025 22:02:17 +0100 Subject: [PATCH] Rebase to libguestfs 1.57.3 resolves: RHEL-111240 Add new libguestfs ntfs_chmod API resolves: RHEL-113833 --- ...upported-remote-drive-protocols-RHBZ.patch | 20 +-- ...ery-old-stable-branches-from-the-ind.patch | 31 ---- ...of-libguestfs-winsupport-features-ex.patch | 4 +- 0002-Update-common-submodule.patch | 170 ------------------ ...nit-Run-depmod-a-to-rebuild-kernel-m.patch | 2 +- ...aemon-selinux.ml-Fix-typo-in-comment.patch | 26 --- libguestfs.spec | 17 +- sources | 4 +- 8 files changed, 23 insertions(+), 251 deletions(-) rename 0004-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch => 0001-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch (97%) delete mode 100644 0001-website-Remove-very-old-stable-branches-from-the-ind.patch rename 0005-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch => 0002-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch (96%) delete mode 100644 0002-Update-common-submodule.patch rename 0006-RHEL-appliance-init-Run-depmod-a-to-rebuild-kernel-m.patch => 0003-RHEL-appliance-init-Run-depmod-a-to-rebuild-kernel-m.patch (90%) delete mode 100644 0003-daemon-selinux.ml-Fix-typo-in-comment.patch diff --git a/0004-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch b/0001-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch similarity index 97% rename from 0004-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch rename to 0001-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch index da898c4..192b347 100644 --- a/0004-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch +++ b/0001-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch @@ -1,4 +1,4 @@ -From 6345a5b40c93222da6af94b9d4723f175ecf774b Mon Sep 17 00:00:00 2001 +From 0f5add1d2d63c31c81f9bd190120ff860b6d9373 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 @@ -180,21 +180,21 @@ index e4e1021db..8419ce78a 100755 rm test-add-uri.out rm test-add-uri.img diff --git a/generator/actions_core.ml b/generator/actions_core.ml -index 60d3140ed..d374ffbf8 100644 +index b4ec6db87..9c23da008 100644 --- a/generator/actions_core.ml +++ b/generator/actions_core.ml -@@ -350,22 +350,6 @@ F is interpreted as a local file or device. +@@ -343,22 +343,6 @@ F is interpreted as a local file or device. This is the default if the optional protocol parameter is omitted. --=item C +-=item C - -Connect to a remote FTP or HTTP server. -The C parameter must also be supplied - see below. - -See also: L - --=item C +-=item C - -Connect to the iSCSI server. -The C parameter must also be supplied - see below. @@ -203,14 +203,14 @@ index 60d3140ed..d374ffbf8 100644 - -See also: L. - - =item C + =item C Connect to the Network Block Device server. -@@ -382,15 +366,6 @@ The C parameter may be supplied. See below. +@@ -375,15 +359,6 @@ The C parameter may be supplied. See below. See also: L. --=item C +-=item C - -Connect to the Secure Shell (ssh) server. - @@ -222,7 +222,7 @@ index 60d3140ed..d374ffbf8 100644 =back =item C -@@ -401,11 +376,8 @@ is a list of server(s). +@@ -394,11 +369,8 @@ is a list of server(s). Protocol Number of servers required -------- -------------------------- file List must be empty or param not used at all @@ -234,7 +234,7 @@ index 60d3140ed..d374ffbf8 100644 Each list element is a string specifying a server. The string must be in one of the following formats: -@@ -421,10 +393,10 @@ for the protocol is used (see F). +@@ -414,10 +386,10 @@ for the protocol is used (see F). =item C diff --git a/0001-website-Remove-very-old-stable-branches-from-the-ind.patch b/0001-website-Remove-very-old-stable-branches-from-the-ind.patch deleted file mode 100644 index 25726e6..0000000 --- a/0001-website-Remove-very-old-stable-branches-from-the-ind.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 6b19b97aa6984865a69dcfc4674dc19d8de21e3c Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Fri, 15 Aug 2025 21:37:30 +0100 -Subject: [PATCH] website: Remove very old stable branches from the index page - -There's no point linking to anything other than the current stable -branch. ---- - website/index.html.in | 6 +----- - 1 file changed, 1 insertion(+), 5 deletions(-) - -diff --git a/website/index.html.in b/website/index.html.in -index 7ce88beb9..71fe5bf9c 100644 ---- a/website/index.html.in -+++ b/website/index.html.in -@@ -189,11 +189,7 @@ LATEST-VERSION: @PACKAGE_VERSION@ - Latest development version: @PACKAGE_VERSION@ (released @RELEASE_DATE@).
- Stable branch: - -- 1.56.x, -- 1.54.x, -- 1.52.x, -- 1.50.x, -- 1.48.x -+ 1.56.x - - -

--- -2.47.1 - diff --git a/0005-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch b/0002-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch similarity index 96% rename from 0005-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch rename to 0002-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch index 5e7f523..f0a6391 100644 --- a/0005-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch +++ b/0002-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch @@ -1,4 +1,4 @@ -From 6d94bb87fe5e39834608586b15feda2ca284f811 Mon Sep 17 00:00:00 2001 +From 1eda452cb73b8dabf0695e10bac6e74a83c6a5fe 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 @@ -13,7 +13,7 @@ edits. 3 files changed, 19 insertions(+) diff --git a/generator/c.ml b/generator/c.ml -index c6e5dd994..b6cc0da20 100644 +index f1217c659..923c2be38 100644 --- a/generator/c.ml +++ b/generator/c.ml @@ -1834,6 +1834,22 @@ and generate_client_actions actions () = diff --git a/0002-Update-common-submodule.patch b/0002-Update-common-submodule.patch deleted file mode 100644 index 3e63c3f..0000000 --- a/0002-Update-common-submodule.patch +++ /dev/null @@ -1,170 +0,0 @@ -From e6f93dfb9f0580bf0f15501e424c99cf3355c4f5 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Wed, 20 Aug 2025 10:36:48 +0100 -Subject: [PATCH] Update common submodule - -Pulls in the commits listed below. This has no effect as all changes -are confined to the common/mlcustomize subdirectory which we do not -use or ship. - - Richard W.M. Jones (4): - mlcustomize/SELinux_relabel.ml: Add comment - mlcustomize/SELinux_relabel.ml: Use new guestfs_setfiles API - mlcustomize/SELinux_relabel.ml: Relabel every mountpoint - mlcustomize/firstboot.ml: Use quoted string literals for firstboot - - Vadim Rozenfeld (1): - Modify the firstboot script to check the scripts execution return status ---- - common | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Submodule common 0e9caa175..7ecf3992b: -diff --git a/common/mlcustomize/SELinux_relabel.ml b/common/mlcustomize/SELinux_relabel.ml -index 2f3a09b..f1729e3 100644 ---- a/common/mlcustomize/SELinux_relabel.ml -+++ b/common/mlcustomize/SELinux_relabel.ml -@@ -1,5 +1,5 @@ - (* virt-customize -- * Copyright (C) 2016 Red Hat Inc. -+ * Copyright (C) 2016-2025 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by -@@ -24,6 +24,10 @@ open Printf - - module G = Guestfs - -+(* XXX A lot of this code could usefully be moved into -+ * [libguestfs.git/daemon/selinux.ml]. -+ *) -+ - let rec relabel (g : G.guestfs) = - (* Is the guest using SELinux? (Otherwise this is a no-op). *) - if is_selinux_guest g then ( -@@ -109,5 +113,13 @@ and use_setfiles g = - g#copy_attributes ~all:true old_specfile specfile - ); - -+ (* Get the list of mountpoints, since setfiles does not cross -+ * filesystems (RHEL-108174). -+ *) -+ let mps = g#mountpoints () |> -+ List.map snd |> (* the list of directories *) -+ List.sort compare |> (* sort them for consistency *) -+ Array.of_list in -+ - (* Relabel everything. *) -- g#selinux_relabel ~force:true specfile "/" -+ g#setfiles ~force:true specfile mps -diff --git a/common/mlcustomize/firstboot.ml b/common/mlcustomize/firstboot.ml -index 6aca4c3..360c33d 100644 ---- a/common/mlcustomize/firstboot.ml -+++ b/common/mlcustomize/firstboot.ml -@@ -35,8 +35,7 @@ let sanitize_name = - module Linux = struct - let firstboot_dir = "/usr/lib/virt-sysprep" - -- let firstboot_sh = sprintf "\ --#!/bin/sh - -+ let firstboot_sh = sprintf {|#!/bin/sh - - - ### BEGIN INIT INFO - # Provides: virt-sysprep -@@ -57,14 +56,14 @@ d=%s/scripts - d_done=%s/scripts-done - logfile=~root/virt-sysprep-firstboot.log - --echo \"$0\" \"$@\" 2>&1 | tee -a $logfile --echo \"Scripts dir: $d\" 2>&1 | tee -a $logfile -+echo "$0" "$@" 2>&1 | tee -a $logfile -+echo "Scripts dir: $d" 2>&1 | tee -a $logfile - --if test \"$1\" = \"start\" -+if test "$1" = "start" - then - mkdir -p $d_done - for f in $d/* ; do -- if test -x \"$f\" -+ if test -x "$f" - then - # move the script to the 'scripts-done' directory, so it is not - # executed again at the next boot -@@ -75,7 +74,7 @@ then - done - rm -f $d_done/* - fi --" firstboot_dir firstboot_dir -+|} firstboot_dir firstboot_dir - - let systemd_target = "multi-user.target" - -@@ -282,36 +281,41 @@ module Windows = struct - * XXX It would be better to use powershell here. For some ideas see - * https://github.com/HCK-CI/HLK-Setup-Scripts/ - *) -- let firstboot_script = sprintf "\ --@echo off -+ let firstboot_script = sprintf {|@echo off - - setlocal EnableDelayedExpansion - set firstboot=%s --set log=%%firstboot%%\\log.txt -+set log=%%firstboot%%\log.txt - --set scripts=%%firstboot%%\\scripts --set scripts_done=%%firstboot%%\\scripts-done -+set scripts=%%firstboot%%\scripts -+set scripts_done=%%firstboot%%\scripts-done - --call :main >> \"%%log%%\" 2>&1 -+call :main >> "%%log%%" 2>&1 - exit /b - - :main - echo starting firstboot service - --if not exist \"%%scripts_done%%\" ( -- mkdir \"%%scripts_done%%\" -+if not exist "%%scripts_done%%" ( -+ mkdir "%%scripts_done%%" - ) - - :: Pick the next script to run. --for %%%%f in (\"%%scripts%%\"\\*.bat) do ( -- echo running \"%%%%f\" -- move \"%%%%f\" \"%%scripts_done%%\" -- pushd \"%%scripts_done%%\" -- call \"%%%%~nf\" -+for %%%%f in ("%%scripts%%"\*.bat) do ( -+ echo running "%%%%f" -+ pushd "%%scripts%%" -+ call "%%%%~nf" - set elvl=!errorlevel! - echo .... exit code !elvl! - popd - -+ if !elvl! NEQ 249 ( -+ echo Script succeeded, moving to scripts-done -+ move "%%%%f" "%%scripts_done%%" -+ ) else ( -+ echo Script failed, will retry on next boot -+ ) -+ - :: Reboot the computer. This is necessary to free any locked - :: files which may prevent later scripts from running. - shutdown /r /t 0 /y -@@ -323,8 +327,8 @@ for %%%%f in (\"%%scripts%%\"\\*.bat) do ( - - :: Fallthrough here if there are no scripts. - echo uninstalling firstboot service --\"%%firstboot%%\\%s\" -s firstboot uninstall --" firstboot_dir_win srvany in -+"%%firstboot%%\%s" -s firstboot uninstall -+|} firstboot_dir_win srvany in - - g#write (firstboot_dir // "firstboot.bat") - (String.unix2dos firstboot_script); --- -2.47.1 - diff --git a/0006-RHEL-appliance-init-Run-depmod-a-to-rebuild-kernel-m.patch b/0003-RHEL-appliance-init-Run-depmod-a-to-rebuild-kernel-m.patch similarity index 90% rename from 0006-RHEL-appliance-init-Run-depmod-a-to-rebuild-kernel-m.patch rename to 0003-RHEL-appliance-init-Run-depmod-a-to-rebuild-kernel-m.patch index 7ba5b44..8580da9 100644 --- a/0006-RHEL-appliance-init-Run-depmod-a-to-rebuild-kernel-m.patch +++ b/0003-RHEL-appliance-init-Run-depmod-a-to-rebuild-kernel-m.patch @@ -1,4 +1,4 @@ -From 632ced5b6a599321855d7023170f7e6bef863948 Mon Sep 17 00:00:00 2001 +From db9c0259837bbd2c5e3bf003ff8d0cc7b9c50c9d Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 13 May 2025 17:28:25 +0100 Subject: [PATCH] RHEL: appliance/init: Run depmod -a to rebuild kernel module diff --git a/0003-daemon-selinux.ml-Fix-typo-in-comment.patch b/0003-daemon-selinux.ml-Fix-typo-in-comment.patch deleted file mode 100644 index 745e50e..0000000 --- a/0003-daemon-selinux.ml-Fix-typo-in-comment.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 91ee98523e364a3052853b330fdd62b3553027d7 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Wed, 27 Aug 2025 10:41:27 +0100 -Subject: [PATCH] daemon/selinux.ml: Fix typo in comment - -Fixes: commit d0d8e6738477148a7b752348f9364a3b8faed67f ---- - daemon/selinux.ml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/daemon/selinux.ml b/daemon/selinux.ml -index db0d71455..ece3a4a14 100644 ---- a/daemon/selinux.ml -+++ b/daemon/selinux.ml -@@ -74,7 +74,7 @@ let setfiles ?(force = false) specfile paths = - if setfiles_has_option_C () then List.push_back args "-C"; - - (* If the appliance is being run with multiple vCPUs, running setfiles -- * in multithreading mode might speeds up the process. Option "-T" was -+ * in multithreading mode might speed up the process. Option "-T" was - * introduced in SELinux userspace v3.4, and we need to check whether it's - * supported. Passing "-T 0" creates as many threads as there're available - * vCPU cores. --- -2.47.1 - diff --git a/libguestfs.spec b/libguestfs.spec index dc8a1f5..e74b42b 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -34,7 +34,7 @@ ExcludeArch: %{ix86} Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.57.2 +Version: 1.57.3 Release: 1%{?dist} License: LGPL-2.1-or-later @@ -73,12 +73,9 @@ Source8: copy-patches.sh # https://github.com/libguestfs/libguestfs/commits/rhel-10.2 # Patches. -Patch0001: 0001-website-Remove-very-old-stable-branches-from-the-ind.patch -#Patch0002: 0002-Update-common-submodule.patch -Patch0003: 0003-daemon-selinux.ml-Fix-typo-in-comment.patch -Patch0004: 0004-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch -Patch0005: 0005-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch -Patch0006: 0006-RHEL-appliance-init-Run-depmod-a-to-rebuild-kernel-m.patch +Patch0001: 0001-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch +Patch0002: 0002-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch +Patch0003: 0003-RHEL-appliance-init-Run-depmod-a-to-rebuild-kernel-m.patch BuildRequires: autoconf, automake, libtool, gettext-devel @@ -1081,9 +1078,11 @@ rm ocaml/html/.gitignore %changelog -* Fri Aug 29 2025 Richard W.M. Jones - 1:1.57.2-1 -- Rebase to libguestfs 1.57.2 +* Tue Sep 09 2025 Richard W.M. Jones - 1:1.57.3-1 +- Rebase to libguestfs 1.57.3 resolves: RHEL-111240 +- Add new libguestfs ntfs_chmod API + resolves: RHEL-113833 * Thu Aug 14 2025 Richard W.M. Jones - 1:1.56.1-3 - Rebase to libguestfs 1.56.1 diff --git a/sources b/sources index 91132ae..40d0b27 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.57.2.tar.gz) = 3a63c218a755afbc824c158fd9999f75d1b2b4bc2c9b312eaf114414d1694ee5512a43ef806a5720eca83662f7203c5727a802721bc0bc77274e8b5362324fca -SHA512 (libguestfs-1.57.2.tar.gz.sig) = 660c5ad78b2a1c3066a02445e39eaf894b673afd840d25fe2920514152c20d2b2e7e34a10a0dcaec575ac8ddde9632952fb8fbbad3a99d9aea1b077ba90004e7 +SHA512 (libguestfs-1.57.3.tar.gz) = 09e0297c9ad47ca322c74f65eef6056dee140e6a625ab7bdd26ea76a9b1483288897ceaf24deff9c1373aa8dd791ce875261c5e07db14dc59a9c2a042ec99227 +SHA512 (libguestfs-1.57.3.tar.gz.sig) = c2c30b7728284156cc2ace79ce1f2eeb0b7d37064d09067033b0c4a2d3befac5e540eb1c436e41e1799f3133ab0c410d612312d66c66f237c4c7896b8a7a6cf6