Fix pnputils after virt-customize --inject-virtio-win
resolves: RHEL-116537
This commit is contained in:
parent
d9a3e3e03f
commit
cb5c7d1bef
@ -1,10 +1,11 @@
|
||||
From bf4fef4f2b45a2016c42094f8e4fe18abc8d90e2 Mon Sep 17 00:00:00 2001
|
||||
From 3a99e87bdee6c20a6286aa3e10bb2c2d896fb2ed Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Wed, 21 May 2025 15:02:44 +0100
|
||||
Subject: [PATCH] docs: Move release note about GNU gettext to build section
|
||||
|
||||
Fixes: commit 9b7410c220f1111e6acef88efbbaee3fea4019b8
|
||||
Updates: commit 80ce443e5eb7323e9b7b5cef30b8f7673ca51d67
|
||||
(cherry picked from commit bf4fef4f2b45a2016c42094f8e4fe18abc8d90e2)
|
||||
---
|
||||
docs/guestfs-tools-release-notes-1.54.pod | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
@ -1,10 +1,11 @@
|
||||
From 5a2458f38d40e5c6f3eceb8e7de162724ff9e374 Mon Sep 17 00:00:00 2001
|
||||
From 2eae3778a32b18944a6a561e10a35eae74fa11f0 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 3 Jun 2025 08:29:57 +0100
|
||||
Subject: [PATCH] builder: Update link to templates to use https
|
||||
|
||||
Fixes: https://issues.redhat.com/browse/RHEL-94873
|
||||
Reported-by: Xiang Hua Chen
|
||||
(cherry picked from commit 5a2458f38d40e5c6f3eceb8e7de162724ff9e374)
|
||||
---
|
||||
builder/libguestfs.conf.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
@ -1,4 +1,4 @@
|
||||
From 2e93abca5acaa69cd6fd08b70079e8f432539076 Mon Sep 17 00:00:00 2001
|
||||
From b6401279c65497506eac2eaf61470bf6f49e89e7 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Mon, 16 Jun 2025 21:47:41 +0100
|
||||
Subject: [PATCH] builder: Replace -cpu host with -cpu max in example
|
||||
@ -11,6 +11,8 @@ When KVM isn't present, some versions of qemu may print:
|
||||
qemu-system-x86_64: CPU model 'host' requires KVM or HVF
|
||||
|
||||
Use -cpu max instead which should work in both cases.
|
||||
|
||||
(cherry picked from commit 2e93abca5acaa69cd6fd08b70079e8f432539076)
|
||||
---
|
||||
builder/virt-builder.pod | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
@ -1,4 +1,4 @@
|
||||
From ea0f9cf0743c3e50a996a9d7ec488d58a9312b11 Mon Sep 17 00:00:00 2001
|
||||
From 6a1e751d4b10ae1833ee18c0796306711e842e76 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Wed, 13 Aug 2025 16:51:39 +0100
|
||||
Subject: [PATCH] customize: Fixes for selinux relabelling and Windows
|
||||
@ -23,6 +23,7 @@ new guestfs_setfiles API).
|
||||
|
||||
Fixes: https://issues.redhat.com/browse/RHEL-108174
|
||||
Related: https://issues.redhat.com/browse/RHEL-100682
|
||||
(cherry picked from commit ea0f9cf0743c3e50a996a9d7ec488d58a9312b11)
|
||||
---
|
||||
common | 2 +-
|
||||
m4/guestfs-libraries.m4 | 4 ++--
|
122
0005-Update-common-submodule.patch
Normal file
122
0005-Update-common-submodule.patch
Normal file
@ -0,0 +1,122 @@
|
||||
From a01095308d22a5ab4d5858dfe0ee46f0b1bec28c Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Wed, 20 Aug 2025 10:34:24 +0100
|
||||
Subject: [PATCH] Update common submodule
|
||||
|
||||
Pulls in this fix which should have no effect:
|
||||
|
||||
Richard W.M. Jones (1):
|
||||
mlcustomize/firstboot.ml: Use quoted string literals for firstboot
|
||||
|
||||
(cherry picked from virt-v2v commit b7aadeac02ef326d542cd83e441b5a9d99ced793)
|
||||
|
||||
(cherry picked from commit 038b30fb08107487cdba4bc0dbabb33dbf75f4c3)
|
||||
---
|
||||
common | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Submodule common 89f1eb2d3..7ecf3992b:
|
||||
diff --git a/common/mlcustomize/firstboot.ml b/common/mlcustomize/firstboot.ml
|
||||
index 5f2642b06..360c33d67 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,38 +281,37 @@ 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\"
|
||||
- pushd \"%%scripts%%\"
|
||||
- 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%%\"
|
||||
+ move "%%%%f" "%%scripts_done%%"
|
||||
) else (
|
||||
echo Script failed, will retry on next boot
|
||||
)
|
||||
@@ -329,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);
|
22
0006-.gitignore-Ignore-.bak-files.patch
Normal file
22
0006-.gitignore-Ignore-.bak-files.patch
Normal file
@ -0,0 +1,22 @@
|
||||
From 9ee5fdf8146231087a461f4cddc0280db762c2f4 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Mon, 1 Sep 2025 17:33:07 +0100
|
||||
Subject: [PATCH] .gitignore: Ignore *.bak files
|
||||
|
||||
(cherry picked from commit cd5ea5cd63a11bc85077e6296021bd25b3c84662)
|
||||
---
|
||||
.gitignore | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/.gitignore b/.gitignore
|
||||
index 9c2e200e6..94f77ac74 100644
|
||||
--- a/.gitignore
|
||||
+++ b/.gitignore
|
||||
@@ -2,6 +2,7 @@
|
||||
*.1
|
||||
*.a
|
||||
*.annot
|
||||
+*.bak
|
||||
*.cmi
|
||||
*.cmo
|
||||
*.cmx
|
206
0007-builder-sysprep-Use-quoted-string-literals-in-a-few-.patch
Normal file
206
0007-builder-sysprep-Use-quoted-string-literals-in-a-few-.patch
Normal file
@ -0,0 +1,206 @@
|
||||
From 0074de5f6eccb75dad814527813eba3524bb22e0 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Mon, 1 Sep 2025 18:41:24 +0100
|
||||
Subject: [PATCH] builder, sysprep: Use quoted string literals in a few places
|
||||
|
||||
This change was automated using the script in:
|
||||
https://github.com/libguestfs/libguestfs/commit/02b64d5cec1ac0a6f7627d5489996de4474a67f6
|
||||
|
||||
However I manually only picked a few of the changes suggested
|
||||
by the script.
|
||||
|
||||
(cherry picked from commit 624df48b3d14d2e5420d758a425bcae509cfe318)
|
||||
---
|
||||
builder/templates/make-template.ml | 62 ++++++++++++++---------------
|
||||
sysprep/sysprep_operation_script.ml | 5 ++-
|
||||
2 files changed, 33 insertions(+), 34 deletions(-)
|
||||
|
||||
diff --git a/builder/templates/make-template.ml b/builder/templates/make-template.ml
|
||||
index 73a55bd45..515c3da8b 100755
|
||||
--- a/builder/templates/make-template.ml
|
||||
+++ b/builder/templates/make-template.ml
|
||||
@@ -535,8 +535,7 @@ and make_kickstart_common ks_filename os arch =
|
||||
| _ -> bpf "install\n";
|
||||
);
|
||||
|
||||
- bpf "\
|
||||
-text
|
||||
+ bpf {|text
|
||||
reboot
|
||||
lang en_US.UTF-8
|
||||
keyboard us
|
||||
@@ -544,7 +543,7 @@ network --bootproto dhcp
|
||||
rootpw builder
|
||||
firewall --enabled --ssh
|
||||
timezone --utc America/New_York
|
||||
-";
|
||||
+|};
|
||||
|
||||
(match os with
|
||||
| RHEL (ver, _) when ver <= 4 ->
|
||||
@@ -586,19 +585,19 @@ mouse generic
|
||||
| CentOS ((3|4|5|6) as major, _) | RHEL ((3|4|5|6) as major, _) ->
|
||||
let bootfs = if major <= 5 then "ext2" else "ext4" in
|
||||
let rootfs = if major <= 4 then "ext3" else "ext4" in
|
||||
- bpf "\
|
||||
+ bpf {|
|
||||
zerombr
|
||||
clearpart --all --initlabel
|
||||
part /boot --fstype=%s --size=512 --asprimary
|
||||
part swap --size=1024 --asprimary
|
||||
part / --fstype=%s --size=1024 --grow --asprimary
|
||||
-" bootfs rootfs;
|
||||
+|} bootfs rootfs;
|
||||
| Alma _ | CentOS _ | CentOSStream _ | RHEL _ | Fedora _ ->
|
||||
- bpf "\
|
||||
+ bpf {|
|
||||
zerombr
|
||||
clearpart --all --initlabel --disklabel=gpt
|
||||
autopart --type=plain
|
||||
-";
|
||||
+|};
|
||||
| _ -> assert false (* cannot happen, see caller *)
|
||||
);
|
||||
bpf "\n";
|
||||
@@ -753,16 +752,16 @@ and make_unattend_iso os arch =
|
||||
* file called \Windows\Panther\Setupact.log (NB:
|
||||
* not \Windows\Setupact.log)
|
||||
*)
|
||||
- fprintf chan "
|
||||
-<unattend xmlns=\"urn:schemas-microsoft-com:unattend\"
|
||||
- xmlns:ms=\"urn:schemas-microsoft-com:asm.v3\"
|
||||
- xmlns:wcm=\"http://schemas.microsoft.com/WMIConfig/2002/State\">
|
||||
- <settings pass=\"windowsPE\">
|
||||
- <component name=\"Microsoft-Windows-Setup\"
|
||||
- publicKeyToken=\"31bf3856ad364e35\"
|
||||
- language=\"neutral\"
|
||||
- versionScope=\"nonSxS\"
|
||||
- processorArchitecture=\"%s\">
|
||||
+ fprintf chan {|
|
||||
+<unattend xmlns="urn:schemas-microsoft-com:unattend"
|
||||
+ xmlns:ms="urn:schemas-microsoft-com:asm.v3"
|
||||
+ xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
|
||||
+ <settings pass="windowsPE">
|
||||
+ <component name="Microsoft-Windows-Setup"
|
||||
+ publicKeyToken="31bf3856ad364e35"
|
||||
+ language="neutral"
|
||||
+ versionScope="nonSxS"
|
||||
+ processorArchitecture="%s">
|
||||
<UserData>
|
||||
<AcceptEula>true</AcceptEula>
|
||||
<ProductKey>
|
||||
@@ -772,18 +771,18 @@ and make_unattend_iso os arch =
|
||||
</UserData>
|
||||
|
||||
<DiskConfiguration>
|
||||
- <Disk wcm:action=\"add\">
|
||||
+ <Disk wcm:action="add">
|
||||
<DiskID>0</DiskID>
|
||||
<WillWipeDisk>true</WillWipeDisk>
|
||||
<CreatePartitions>
|
||||
<!-- System partition -->
|
||||
- <CreatePartition wcm:action=\"add\">
|
||||
+ <CreatePartition wcm:action="add">
|
||||
<Order>1</Order>
|
||||
<Type>Primary</Type>
|
||||
<Size>300</Size>
|
||||
</CreatePartition>
|
||||
<!-- Windows partition -->
|
||||
- <CreatePartition wcm:action=\"add\">
|
||||
+ <CreatePartition wcm:action="add">
|
||||
<Order>2</Order>
|
||||
<Type>Primary</Type>
|
||||
<Extend>true</Extend>
|
||||
@@ -791,7 +790,7 @@ and make_unattend_iso os arch =
|
||||
</CreatePartitions>
|
||||
<ModifyPartitions>
|
||||
<!-- System partition -->
|
||||
- <ModifyPartition wcm:action=\"add\">
|
||||
+ <ModifyPartition wcm:action="add">
|
||||
<Order>1</Order>
|
||||
<PartitionID>1</PartitionID>
|
||||
<Label>System</Label>
|
||||
@@ -799,7 +798,7 @@ and make_unattend_iso os arch =
|
||||
<Active>true</Active>
|
||||
</ModifyPartition>
|
||||
<!-- Windows partition -->
|
||||
- <ModifyPartition wcm:action=\"add\">
|
||||
+ <ModifyPartition wcm:action="add">
|
||||
<Order>2</Order>
|
||||
<PartitionID>2</PartitionID>
|
||||
<Label>Windows</Label>
|
||||
@@ -828,11 +827,11 @@ and make_unattend_iso os arch =
|
||||
</ImageInstall>
|
||||
</component>
|
||||
|
||||
- <component name=\"Microsoft-Windows-International-Core-WinPE\"
|
||||
- publicKeyToken=\"31bf3856ad364e35\"
|
||||
- language=\"neutral\"
|
||||
- versionScope=\"nonSxS\"
|
||||
- processorArchitecture=\"%s\">
|
||||
+ <component name="Microsoft-Windows-International-Core-WinPE"
|
||||
+ publicKeyToken="31bf3856ad364e35"
|
||||
+ language="neutral"
|
||||
+ versionScope="nonSxS"
|
||||
+ processorArchitecture="%s">
|
||||
<SetupUILanguage>
|
||||
<UILanguage>en-US</UILanguage>
|
||||
</SetupUILanguage>
|
||||
@@ -841,7 +840,7 @@ and make_unattend_iso os arch =
|
||||
<UserLocale>en-US</UserLocale>
|
||||
</component>
|
||||
</settings>
|
||||
-</unattend>"
|
||||
+</unattend>|}
|
||||
arch product_key arch;
|
||||
close_out chan;
|
||||
|
||||
@@ -1411,14 +1410,13 @@ baseurl=%s
|
||||
enabled=0
|
||||
gpgcheck=0
|
||||
keepcache=0
|
||||
-" major major baseurl major major srpms;
|
||||
+|} major major baseurl major major srpms;
|
||||
|
||||
(match optional with
|
||||
| None -> ()
|
||||
| Some (name, optionalbaseurl, optionalsrpms) ->
|
||||
let lc_name = String.lowercase_ascii name in
|
||||
- bpf "\
|
||||
-
|
||||
+ bpf {|
|
||||
[rhel%d-%s]
|
||||
name=RHEL %d Server %s
|
||||
baseurl=%s
|
||||
@@ -1432,7 +1430,7 @@ baseurl=%s
|
||||
enabled=0
|
||||
gpgcheck=0
|
||||
keepcache=0
|
||||
-" major lc_name major lc_name optionalbaseurl
|
||||
+|} major lc_name major lc_name optionalbaseurl
|
||||
major lc_name major lc_name optionalsrpms
|
||||
)
|
||||
) else (
|
||||
diff --git a/sysprep/sysprep_operation_script.ml b/sysprep/sysprep_operation_script.ml
|
||||
index fff5e4d51..a91cea26b 100644
|
||||
--- a/sysprep/sysprep_operation_script.ml
|
||||
+++ b/sysprep/sysprep_operation_script.ml
|
||||
@@ -81,7 +81,7 @@ let rec script_perform (g : Guestfs.guestfs) root side_effects =
|
||||
and run_scripts mp scripts =
|
||||
let sh = "/bin/bash" in
|
||||
let cmd =
|
||||
- sprintf "\
|
||||
+ sprintf {|
|
||||
set -e
|
||||
#set -x
|
||||
cleanup ()
|
||||
@@ -91,7 +91,8 @@ cleanup ()
|
||||
guestunmount %s ||:
|
||||
exit $status
|
||||
}
|
||||
-trap cleanup INT TERM QUIT EXIT ERR\n"
|
||||
+trap cleanup INT TERM QUIT EXIT ERR
|
||||
+|}
|
||||
(Filename.quote mp) ^
|
||||
String.concat "\n" scripts in
|
||||
let args = [| sh; "-c"; cmd |] in
|
@ -1,25 +0,0 @@
|
||||
From d7dde127ee7a669db3aad1ddb637abd0cdc075b4 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Wed, 13 Aug 2025 18:03:09 +0100
|
||||
Subject: [PATCH] RHEL 10: m4: Depend on libguestfs 1.56.1-2.el10 for
|
||||
guestfs_setfiles
|
||||
|
||||
---
|
||||
m4/guestfs-libraries.m4 | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/m4/guestfs-libraries.m4 b/m4/guestfs-libraries.m4
|
||||
index 82e62d54f..86fdd0262 100644
|
||||
--- a/m4/guestfs-libraries.m4
|
||||
+++ b/m4/guestfs-libraries.m4
|
||||
@@ -19,8 +19,8 @@ dnl Any C libraries required by the libguestfs C library (not the daemon).
|
||||
|
||||
dnl Of course we need libguestfs.
|
||||
dnl
|
||||
-dnl We need libguestfs 1.57.1 for guestfs_setfiles.
|
||||
-PKG_CHECK_MODULES([LIBGUESTFS], [libguestfs >= 1.57.1])
|
||||
+dnl We need libguestfs 1.56.1-2.el10 for guestfs_setfiles.
|
||||
+PKG_CHECK_MODULES([LIBGUESTFS], [libguestfs >= 1.56.1])
|
||||
printf "libguestfs version is "; $PKG_CONFIG --modversion libguestfs
|
||||
|
||||
dnl Test if it's GNU or XSI strerror_r.
|
26
0008-builder-templates-make-template.ml-Fix-quoting.patch
Normal file
26
0008-builder-templates-make-template.ml-Fix-quoting.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From cde27ebd4775cfa9a23a53a48b47303557bcb537 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 2 Sep 2025 09:05:27 +0100
|
||||
Subject: [PATCH] builder/templates/make-template.ml: Fix quoting
|
||||
|
||||
Fix mistake introduced by manual editing of the previous commit.
|
||||
|
||||
Fixes: commit 624df48b3d14d2e5420d758a425bcae509cfe318
|
||||
(cherry picked from commit 7e63b2142682582ec87bdd8c0d98bb22fcc0dabf)
|
||||
---
|
||||
builder/templates/make-template.ml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/builder/templates/make-template.ml b/builder/templates/make-template.ml
|
||||
index 515c3da8b..a69d3ad3f 100755
|
||||
--- a/builder/templates/make-template.ml
|
||||
+++ b/builder/templates/make-template.ml
|
||||
@@ -1394,7 +1394,7 @@ and make_rhel_yum_conf major minor arch =
|
||||
sprintf "%s/AppStream/source/tree" topurl)
|
||||
| _ -> assert false in
|
||||
|
||||
- bpf "\
|
||||
+ bpf {|
|
||||
# Yum configuration pointing to Red Hat servers.
|
||||
|
||||
[rhel%d]
|
@ -0,0 +1,33 @@
|
||||
From 1fca99c9bed60cd9a9c62826d4e6995052d0c5dd Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 2 Sep 2025 09:06:33 +0100
|
||||
Subject: [PATCH] builder/templates/make-template.ml: Use quoted string
|
||||
literals for regexps
|
||||
|
||||
(cherry picked from commit aafb271e8ffd961c529f90ef65df75a70102f0fc)
|
||||
---
|
||||
builder/templates/make-template.ml | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/builder/templates/make-template.ml b/builder/templates/make-template.ml
|
||||
index a69d3ad3f..f8b41209e 100755
|
||||
--- a/builder/templates/make-template.ml
|
||||
+++ b/builder/templates/make-template.ml
|
||||
@@ -374,7 +374,7 @@ and os_of_string os ver =
|
||||
eprintf "%s: unknown or unsupported OS (%s, %s)\n" prog os ver; exit 1
|
||||
|
||||
and parse_major_minor ver =
|
||||
- let rex = Str.regexp "^\\([0-9]+\\)\\.\\([0-9]+\\)$" in
|
||||
+ let rex = Str.regexp {|^\([0-9]+\)\.\([0-9]+\)$|} in
|
||||
if Str.string_match rex ver 0 then (
|
||||
int_of_string (Str.matched_group 1 ver),
|
||||
int_of_string (Str.matched_group 2 ver)
|
||||
@@ -1631,7 +1631,7 @@ and read_revision filename =
|
||||
| None -> `No_file
|
||||
| Some chan ->
|
||||
let r = ref `No_revision in
|
||||
- let rex = Str.regexp "^revision=\\([0-9]+\\)$" in
|
||||
+ let rex = Str.regexp {|^revision=\([0-9]+\)$|} in
|
||||
(try
|
||||
let rec loop () =
|
||||
let line = input_line chan in
|
@ -0,0 +1,43 @@
|
||||
From 7b2125b42535e6768d8f162d19463af4c4e8df1b Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 2 Sep 2025 09:07:34 +0100
|
||||
Subject: [PATCH] builder/templates/make-template.ml: Add +str and +unix for
|
||||
OCaml 5
|
||||
|
||||
Removes these warnings:
|
||||
|
||||
File "_none_", line 1:
|
||||
Alert ocaml_deprecated_auto_include:
|
||||
OCaml's lib directory layout changed in 5.0. The str subdirectory has been
|
||||
automatically added to the search path, but you should add -I +str to the
|
||||
command-line to silence this alert (e.g. by adding str to the list of
|
||||
libraries in your dune file, or adding use_str to your _tags file for
|
||||
ocamlbuild, or using -package str for ocamlfind).
|
||||
|
||||
File "_none_", line 1:
|
||||
Alert ocaml_deprecated_auto_include:
|
||||
OCaml's lib directory layout changed in 5.0. The unix subdirectory has been
|
||||
automatically added to the search path, but you should add -I +unix to the
|
||||
command-line to silence this alert (e.g. by adding unix to the list of
|
||||
libraries in your dune file, or adding use_unix to your _tags file for
|
||||
ocamlbuild, or using -package unix for ocamlfind).
|
||||
|
||||
(cherry picked from commit 046309b31c22da5ac64feac12bcf4501377a8b3f)
|
||||
---
|
||||
builder/templates/make-template.ml | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/builder/templates/make-template.ml b/builder/templates/make-template.ml
|
||||
index f8b41209e..2ce803e2b 100755
|
||||
--- a/builder/templates/make-template.ml
|
||||
+++ b/builder/templates/make-template.ml
|
||||
@@ -24,7 +24,9 @@
|
||||
* shell scripts located in libguestfs.git/builder/website.
|
||||
*)
|
||||
|
||||
+#directory "+str";;
|
||||
#load "str.cma";;
|
||||
+#directory "+unix";;
|
||||
#load "unix.cma";;
|
||||
#directory "+guestfs";; (* use globally installed guestfs *)
|
||||
#load "mlguestfs.cma";;
|
@ -0,0 +1,76 @@
|
||||
From 68a3719888f36719cef8bcd7817ed634c4524012 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Fri, 12 Sep 2025 08:37:58 +0100
|
||||
Subject: [PATCH] daemon, generator: Use power of 2 for initial size of
|
||||
Hashtbl.create
|
||||
|
||||
Before 2011 it was recommended to use a prime number for the initial
|
||||
size. In 2011 the OCaml hash table was reimplemented using a hash
|
||||
function based on Murmur 3. Hashtbl.create now adjusts the initial
|
||||
size to the next power of 2 (minimum 16). So replace obsolete
|
||||
'Hashtbl.create 13' with 'Hashtbl.create 16'.
|
||||
|
||||
(cherry picked from commit 51f7dfa8612e8e273e3ef15eddd7a5714122cc57)
|
||||
---
|
||||
builder/builder.ml | 2 +-
|
||||
builder/index_parser.ml | 4 ++--
|
||||
resize/resize.ml | 4 ++--
|
||||
3 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/builder/builder.ml b/builder/builder.ml
|
||||
index bbe2808f5..2df2fa5c7 100644
|
||||
--- a/builder/builder.ml
|
||||
+++ b/builder/builder.ml
|
||||
@@ -46,7 +46,7 @@ let remove_duplicates index =
|
||||
* (name, arch) tuples, so it possible to ignore duplicates,
|
||||
* and versions with a lower revision.
|
||||
*)
|
||||
- let nseen = Hashtbl.create 13 in
|
||||
+ let nseen = Hashtbl.create 16 in
|
||||
List.iter (
|
||||
fun (name, { Index.arch; revision }) ->
|
||||
let id = name, arch in
|
||||
diff --git a/builder/index_parser.ml b/builder/index_parser.ml
|
||||
index 3e19e489e..2cb89488f 100644
|
||||
--- a/builder/index_parser.ml
|
||||
+++ b/builder/index_parser.ml
|
||||
@@ -55,7 +55,7 @@ let get_index ~downloader ~sigchecker ?(template = false)
|
||||
in
|
||||
n, (find_arch fields)
|
||||
) sections in
|
||||
- let nseen = Hashtbl.create 13 in
|
||||
+ let nseen = Hashtbl.create 16 in
|
||||
List.iter (
|
||||
fun (n, arch) ->
|
||||
let id = n, arch in
|
||||
@@ -71,7 +71,7 @@ let get_index ~downloader ~sigchecker ?(template = false)
|
||||
(* Check for repeated fields. *)
|
||||
List.iter (
|
||||
fun (n, fields) ->
|
||||
- let fseen = Hashtbl.create 13 in
|
||||
+ let fseen = Hashtbl.create 16 in
|
||||
List.iter (
|
||||
fun (field, subkey, _) ->
|
||||
let hashkey = (field, subkey) in
|
||||
diff --git a/resize/resize.ml b/resize/resize.ml
|
||||
index fffe2de77..707def8e9 100644
|
||||
--- a/resize/resize.ml
|
||||
+++ b/resize/resize.ml
|
||||
@@ -630,7 +630,7 @@ read the man page virt-resize(1).
|
||||
* that the user has asked to be ignored or deleted.
|
||||
*)
|
||||
let find_partition =
|
||||
- let hash = Hashtbl.create 13 in
|
||||
+ let hash = Hashtbl.create 16 in
|
||||
List.iter (fun ({ p_name = name } as p) -> Hashtbl.add hash name p)
|
||||
partitions;
|
||||
fun ~option name ->
|
||||
@@ -881,7 +881,7 @@ read the man page virt-resize(1).
|
||||
surplus in
|
||||
|
||||
(* Mark the --lv-expand LVs. *)
|
||||
- let hash = Hashtbl.create 13 in
|
||||
+ let hash = Hashtbl.create 16 in
|
||||
List.iter (fun ({ lv_name = name } as lv) -> Hashtbl.add hash name lv) lvs;
|
||||
|
||||
List.iter (
|
@ -1,4 +1,4 @@
|
||||
From bbc262b2166f226937d4331ac80b631cab7c1129 Mon Sep 17 00:00:00 2001
|
||||
From abb56223e0a35c3e5d1158f32789c44c28bacf40 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Sat, 24 May 2025 13:27:00 +0100
|
||||
Subject: [PATCH] builder: Build fedora-42 template
|
61
0013-Update-common-submodule.patch
Normal file
61
0013-Update-common-submodule.patch
Normal file
@ -0,0 +1,61 @@
|
||||
From 2d808c89eee6369df62b3afe16681a41ca42e0b9 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Sat, 20 Sep 2025 17:20:25 +0100
|
||||
Subject: [PATCH] Update common submodule
|
||||
|
||||
Richard W.M. Jones (3):
|
||||
mlstdutils: Export List.find_opt
|
||||
daemon, generator: Use power of 2 for initial size of Hashtbl.create
|
||||
mlcustomize/inject_virtio_win.ml: Use viostor.inf instead of guestor
|
||||
|
||||
See-also: https://github.com/libguestfs/libguestfs-common/pull/17
|
||||
(cherry picked from commit 13bcff3c2ca3e7ad355527a13b3aa2941ec1ff5b)
|
||||
---
|
||||
common | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Submodule common 7ecf3992b..da55dc4d7:
|
||||
diff --git a/common/mlcustomize/customize_run.ml b/common/mlcustomize/customize_run.ml
|
||||
index ff719f4ec..64afd3ab5 100644
|
||||
--- a/common/mlcustomize/customize_run.ml
|
||||
+++ b/common/mlcustomize/customize_run.ml
|
||||
@@ -97,7 +97,7 @@ let run (g : G.guestfs) root (ops : ops) =
|
||||
) in
|
||||
|
||||
(* Store the passwords and set them all at the end. *)
|
||||
- let passwords = Hashtbl.create 13 in
|
||||
+ let passwords = Hashtbl.create 16 in
|
||||
let set_password user pw =
|
||||
if Hashtbl.mem passwords user then
|
||||
error (f_"multiple --root-password/--password options set the \
|
||||
diff --git a/common/mlcustomize/inject_virtio_win.ml b/common/mlcustomize/inject_virtio_win.ml
|
||||
index b26b14d34..114df0641 100644
|
||||
--- a/common/mlcustomize/inject_virtio_win.ml
|
||||
+++ b/common/mlcustomize/inject_virtio_win.ml
|
||||
@@ -310,8 +310,13 @@ and ddb_regedits inspect drv_name drv_pciid =
|
||||
* one must add keys into the DriverDatabase.
|
||||
*)
|
||||
|
||||
+ let winarch =
|
||||
+ match inspect.i_arch with
|
||||
+ | "i386" -> "x86" | "x86_64" -> "amd64"
|
||||
+ | _ -> assert false in
|
||||
+
|
||||
let drv_inf = "guestor.inf" in
|
||||
- let drv_inf_label = drv_inf ^ "_tmp" in
|
||||
+ let drv_inf_label = sprintf "%s_%s_0000000000000000" drv_inf winarch in
|
||||
let drv_config = "guestor_conf" in
|
||||
|
||||
[
|
||||
diff --git a/common/mlstdutils/std_utils.mli b/common/mlstdutils/std_utils.mli
|
||||
index a20e720c2..6c1911da8 100644
|
||||
--- a/common/mlstdutils/std_utils.mli
|
||||
+++ b/common/mlstdutils/std_utils.mli
|
||||
@@ -46,6 +46,7 @@ module List : sig
|
||||
val mem : 'a -> 'a list -> bool
|
||||
val memq : 'a -> 'a list -> bool
|
||||
val find : ('a -> bool) -> 'a list -> 'a
|
||||
+ val find_opt : ('a -> bool) -> 'a list -> 'a option
|
||||
val filter : ('a -> bool) -> 'a list -> 'a list
|
||||
val find_all : ('a -> bool) -> 'a list -> 'a list
|
||||
val partition : ('a -> bool) -> 'a list -> 'a list * 'a list
|
@ -1,4 +1,4 @@
|
||||
From 437a345d32fc4f495b116f67747e9ff56e7a6cc7 Mon Sep 17 00:00:00 2001
|
||||
From f114d864dfd4fd947f44126480d7916ad371f703 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 7 Jul 2015 09:28:03 -0400
|
||||
Subject: [PATCH] RHEL: Reject use of libguestfs-winsupport features except for
|
@ -1,4 +1,4 @@
|
||||
From e0f2a5aa132293d1e5bb3c87a2ff61975a2d91a7 Mon Sep 17 00:00:00 2001
|
||||
From 5bb3b3c53a6d91acf6aa73b1581be2662a6c5cfc Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Mon, 21 Nov 2022 13:03:22 +0000
|
||||
Subject: [PATCH] RHEL: builder: Disable opensuse repository
|
@ -7,7 +7,7 @@ set -e
|
||||
# ./copy-patches.sh
|
||||
|
||||
project=guestfs-tools
|
||||
rhel_version=10.1
|
||||
rhel_version=10.2
|
||||
|
||||
# Check we're in the right directory.
|
||||
if [ ! -f $project.spec ]; then
|
||||
|
@ -16,7 +16,7 @@
|
||||
Summary: Tools to access and modify virtual machine disk images
|
||||
Name: guestfs-tools
|
||||
Version: 1.54.0
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
License: GPL-2.0-or-later AND LGPL-2.0-or-later
|
||||
|
||||
# Build only for architectures that have a kernel
|
||||
@ -42,17 +42,24 @@ Source2: libguestfs.keyring
|
||||
Source3: copy-patches.sh
|
||||
|
||||
# Patches are maintained in the following repository:
|
||||
# https://github.com/rwmjones/guestfs-tools/commits/rhel-10.1
|
||||
# https://github.com/rwmjones/guestfs-tools/commits/rhel-10.2
|
||||
|
||||
# Patches.
|
||||
Patch0001: 0001-docs-Move-release-note-about-GNU-gettext-to-build-se.patch
|
||||
Patch0002: 0002-builder-Build-fedora-42-template.patch
|
||||
Patch0003: 0003-builder-Update-link-to-templates-to-use-https.patch
|
||||
Patch0004: 0004-builder-Replace-cpu-host-with-cpu-max-in-example.patch
|
||||
Patch0005: 0005-customize-Fixes-for-selinux-relabelling-and-Windows-.patch
|
||||
Patch0006: 0006-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch
|
||||
Patch0007: 0007-RHEL-builder-Disable-opensuse-repository.patch
|
||||
Patch0008: 0008-RHEL-10-m4-Depend-on-libguestfs-1.56.1-2.el10-for-gu.patch
|
||||
Patch0002: 0002-builder-Update-link-to-templates-to-use-https.patch
|
||||
Patch0003: 0003-builder-Replace-cpu-host-with-cpu-max-in-example.patch
|
||||
Patch0004: 0004-customize-Fixes-for-selinux-relabelling-and-Windows-.patch
|
||||
Patch0005: 0005-Update-common-submodule.patch
|
||||
Patch0006: 0006-.gitignore-Ignore-.bak-files.patch
|
||||
Patch0007: 0007-builder-sysprep-Use-quoted-string-literals-in-a-few-.patch
|
||||
Patch0008: 0008-builder-templates-make-template.ml-Fix-quoting.patch
|
||||
Patch0009: 0009-builder-templates-make-template.ml-Use-quoted-string.patch
|
||||
Patch0010: 0010-builder-templates-make-template.ml-Add-str-and-unix-.patch
|
||||
Patch0011: 0011-daemon-generator-Use-power-of-2-for-initial-size-of-.patch
|
||||
Patch0012: 0012-builder-Build-fedora-42-template.patch
|
||||
Patch0013: 0013-Update-common-submodule.patch
|
||||
Patch0014: 0014-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch
|
||||
Patch0015: 0015-RHEL-builder-Disable-opensuse-repository.patch
|
||||
|
||||
# Basic build requirements.
|
||||
BuildRequires: autoconf, automake, libtool, gettext-devel
|
||||
@ -406,6 +413,10 @@ end
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Sep 22 2025 Richard W.M. Jones <rjones@redhat.com> - 1.54.0-4
|
||||
- Fix pnputils after virt-customize --inject-virtio-win
|
||||
resolves: RHEL-116537
|
||||
|
||||
* Wed Aug 13 2025 Richard W.M. Jones <rjones@redhat.com> - 1.54.0-3
|
||||
- Rebase to guestfs-tools 1.54.0
|
||||
resolves: RHEL-81734
|
||||
|
Loading…
Reference in New Issue
Block a user