Rebase to libguestfs 1.57.4
resolves: RHEL-111240
This commit is contained in:
parent
e0ed2a1c0d
commit
c64256b395
@ -1,4 +1,4 @@
|
||||
From adc7aeb5cc1aa90b9eb63b7c7d1c452155960146 Mon Sep 17 00:00:00 2001
|
||||
From 9de60bf0b7ae8c0d331b12f7bcf2b407babdc294 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Mon, 29 Jul 2013 14:47:56 +0100
|
||||
Subject: [PATCH] RHEL: Disable unsupported remote drive protocols
|
||||
@ -497,10 +497,10 @@ index 485d75718..e917cd1a6 100755
|
||||
|
||||
$guestfish -d nbd run ||:
|
||||
diff --git a/tests/disks/test-qemu-drive.sh b/tests/disks/test-qemu-drive.sh
|
||||
index d6ce0f07f..153b9c8cc 100755
|
||||
index f5ecccc3c..d699d37ca 100755
|
||||
--- a/tests/disks/test-qemu-drive.sh
|
||||
+++ b/tests/disks/test-qemu-drive.sh
|
||||
@@ -63,35 +63,6 @@ check_output
|
||||
@@ -64,35 +64,6 @@ check_output
|
||||
grep -sq -- '-drive file=rbd:abc-def/ghi-jkl:auth_supported=none,' "$DEBUG_QEMU_FILE" || fail
|
||||
rm "$DEBUG_QEMU_FILE"
|
||||
|
||||
@ -536,7 +536,7 @@ index d6ce0f07f..153b9c8cc 100755
|
||||
# NBD.
|
||||
|
||||
guestfish <<EOF ||:
|
||||
@@ -109,14 +80,3 @@ EOF
|
||||
@@ -110,14 +81,3 @@ EOF
|
||||
check_output
|
||||
grep -sq -- '-drive file=nbd:unix:/socket,' "$DEBUG_QEMU_FILE" || fail
|
||||
rm "$DEBUG_QEMU_FILE"
|
||||
@ -1,41 +0,0 @@
|
||||
From 30ccb9a3e6ce3f5abddde99e2c9c527738806609 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Thu, 11 Sep 2025 21:03:37 +0100
|
||||
Subject: [PATCH] daemon/selinux.ml: Use setfiles -A option to reduce memory
|
||||
usage
|
||||
|
||||
In filesystems that have many millions of files, the default behaviour
|
||||
of setfiles is to build a huge hash table containing every filename.
|
||||
This uses up lots of memory which prevents relabelling from happening
|
||||
in the reduced memory environment of the libguestfs appliance.
|
||||
|
||||
I added the setfiles -A option to change this default behaviour. If
|
||||
setfiles has the option then use it.
|
||||
|
||||
Fixes: https://issues.redhat.com/browse/RHEL-114292
|
||||
Related: https://issues.redhat.com/browse/RHEL-111165
|
||||
Related: https://issues.redhat.com/browse/RHEL-111505
|
||||
---
|
||||
daemon/selinux.ml | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/daemon/selinux.ml b/daemon/selinux.ml
|
||||
index 19da2c8a5..2b49e5eba 100644
|
||||
--- a/daemon/selinux.ml
|
||||
+++ b/daemon/selinux.ml
|
||||
@@ -73,6 +73,12 @@ let setfiles ?(force = false) specfile paths =
|
||||
*)
|
||||
if setfiles_has_option 'C' then List.push_back args "-C";
|
||||
|
||||
+ (* Use the -A option if available to reduce the amount of memory
|
||||
+ * used in filesystems with millions of files
|
||||
+ * See: https://issues.redhat.com/browse/RHEL-111505
|
||||
+ *)
|
||||
+ if setfiles_has_option 'A' then List.push_back args "-A";
|
||||
+
|
||||
(* If the appliance is being run with multiple vCPUs, running setfiles
|
||||
* 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
|
||||
--
|
||||
2.47.1
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 0c27052b03be0536f6f7ccdecf14248925edadb0 Mon Sep 17 00:00:00 2001
|
||||
From 8b6e6db7f64955748250fa5b987a85a8506520ec 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,101 +0,0 @@
|
||||
From 495f71affc7ade1842a8bc66f5f65862c444ca93 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'.
|
||||
---
|
||||
daemon/selinux.ml | 2 +-
|
||||
generator/memoized_cache.ml | 2 +-
|
||||
generator/optgroups.ml | 2 +-
|
||||
generator/pr.ml | 2 +-
|
||||
generator/tests_c_api.ml | 2 +-
|
||||
generator/utils.ml | 2 +-
|
||||
6 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/daemon/selinux.ml b/daemon/selinux.ml
|
||||
index 2b49e5eba..9802e8913 100644
|
||||
--- a/daemon/selinux.ml
|
||||
+++ b/daemon/selinux.ml
|
||||
@@ -35,7 +35,7 @@ let setfiles_has_option =
|
||||
let _, _, err = commandr "setfiles" [opt] in
|
||||
String.find err err_msg = -1
|
||||
in
|
||||
- let h = Hashtbl.create 13 in
|
||||
+ let h = Hashtbl.create 16 in
|
||||
fun flag ->
|
||||
try Hashtbl.find h flag
|
||||
with
|
||||
diff --git a/generator/memoized_cache.ml b/generator/memoized_cache.ml
|
||||
index 46ba929a3..8ae224edc 100644
|
||||
--- a/generator/memoized_cache.ml
|
||||
+++ b/generator/memoized_cache.ml
|
||||
@@ -44,7 +44,7 @@ let create ?(version = 1) ?(batch_size = 100) name lookup_fn =
|
||||
let filename = sprintf "generator/.%s.data.version.%d" name version in
|
||||
let memo =
|
||||
try with_open_in filename input_value
|
||||
- with _ -> Hashtbl.create 13 in
|
||||
+ with _ -> Hashtbl.create 16 in
|
||||
{
|
||||
memo; filename; lookup_fn; batch_size; unsaved_count = 0;
|
||||
}
|
||||
diff --git a/generator/optgroups.ml b/generator/optgroups.ml
|
||||
index 43c9fe75a..f65f0ccbd 100644
|
||||
--- a/generator/optgroups.ml
|
||||
+++ b/generator/optgroups.ml
|
||||
@@ -34,7 +34,7 @@ let optgroups_retired = [
|
||||
|
||||
(* Create list of optional groups. *)
|
||||
let optgroups =
|
||||
- let h = Hashtbl.create 13 in
|
||||
+ let h = Hashtbl.create 16 in
|
||||
List.iter (
|
||||
function
|
||||
| { optional = Some group } as fn ->
|
||||
diff --git a/generator/pr.ml b/generator/pr.ml
|
||||
index af9da9f68..615c241d0 100644
|
||||
--- a/generator/pr.ml
|
||||
+++ b/generator/pr.ml
|
||||
@@ -32,7 +32,7 @@ let lines = ref 0
|
||||
|
||||
(* Name of each file generated. *)
|
||||
let files = ref []
|
||||
-let fileshash = Hashtbl.create 13
|
||||
+let fileshash = Hashtbl.create 16
|
||||
|
||||
(* Print-to-current-output function, used everywhere. It has
|
||||
* printf-like semantics.
|
||||
diff --git a/generator/tests_c_api.ml b/generator/tests_c_api.ml
|
||||
index c9ef3b0c8..81f2cd6fe 100644
|
||||
--- a/generator/tests_c_api.ml
|
||||
+++ b/generator/tests_c_api.ml
|
||||
@@ -64,7 +64,7 @@ let rec generate_c_api_tests () =
|
||||
pr " size_t i;\n";
|
||||
pr " const char *no_tests[] = {\n";
|
||||
|
||||
- let hash : (string, bool) Hashtbl.t = Hashtbl.create 13 in
|
||||
+ let hash : (string, bool) Hashtbl.t = Hashtbl.create 16 in
|
||||
List.iter (
|
||||
fun { tests } ->
|
||||
let seqs = List.filter_map (
|
||||
diff --git a/generator/utils.ml b/generator/utils.ml
|
||||
index 88d8899b5..44b7c7d42 100644
|
||||
--- a/generator/utils.ml
|
||||
+++ b/generator/utils.ml
|
||||
@@ -109,7 +109,7 @@ let rstructs_used_by functions =
|
||||
| RStructListOnly, RStructListOnly -> RStructListOnly
|
||||
in
|
||||
|
||||
- let h = Hashtbl.create 13 in
|
||||
+ let h = Hashtbl.create 16 in
|
||||
|
||||
(* if elem->oldv exists, update entry using ||| operator,
|
||||
* else just add elem->newv to the hash
|
||||
--
|
||||
2.47.1
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From e78fadc8bf73b3824334cfb1ad5c922f5397cad7 Mon Sep 17 00:00:00 2001
|
||||
From 62c0af796f534188ff0ba9a628f9db6e4ade0cf8 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 13 May 2025 17:28:25 +0100
|
||||
Subject: [PATCH] RHEL: appliance/init: Run depmod -a to rebuild kernel module
|
||||
@ -34,8 +34,8 @@ ExcludeArch: %{ix86}
|
||||
Summary: Access and modify virtual machine disk images
|
||||
Name: libguestfs
|
||||
Epoch: 1
|
||||
Version: 1.57.3
|
||||
Release: 2%{?dist}
|
||||
Version: 1.57.4
|
||||
Release: 1%{?dist}
|
||||
License: LGPL-2.1-or-later
|
||||
|
||||
# Build only for architectures that have a kernel
|
||||
@ -73,11 +73,9 @@ Source8: copy-patches.sh
|
||||
# https://github.com/libguestfs/libguestfs/commits/rhel-10.2
|
||||
|
||||
# Patches.
|
||||
Patch0001: 0001-daemon-selinux.ml-Use-setfiles-A-option-to-reduce-me.patch
|
||||
Patch0002: 0002-daemon-generator-Use-power-of-2-for-initial-size-of-.patch
|
||||
Patch0003: 0003-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch
|
||||
Patch0004: 0004-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch
|
||||
Patch0005: 0005-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
|
||||
|
||||
@ -1080,8 +1078,8 @@ rm ocaml/html/.gitignore
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Sep 09 2025 Richard W.M. Jones <rjones@redhat.com> - 1:1.57.3-2
|
||||
- Rebase to libguestfs 1.57.3
|
||||
* Tue Sep 30 2025 Richard W.M. Jones <rjones@redhat.com> - 1:1.57.4-1
|
||||
- Rebase to libguestfs 1.57.4
|
||||
resolves: RHEL-111240
|
||||
- Add new libguestfs ntfs_chmod API
|
||||
resolves: RHEL-113833
|
||||
|
||||
4
sources
4
sources
@ -1,2 +1,2 @@
|
||||
SHA512 (libguestfs-1.57.3.tar.gz) = 09e0297c9ad47ca322c74f65eef6056dee140e6a625ab7bdd26ea76a9b1483288897ceaf24deff9c1373aa8dd791ce875261c5e07db14dc59a9c2a042ec99227
|
||||
SHA512 (libguestfs-1.57.3.tar.gz.sig) = c2c30b7728284156cc2ace79ce1f2eeb0b7d37064d09067033b0c4a2d3befac5e540eb1c436e41e1799f3133ab0c410d612312d66c66f237c4c7896b8a7a6cf6
|
||||
SHA512 (libguestfs-1.57.4.tar.gz) = 8f856323536866a0c000299bdce7de89bb66773f948943654e39dce37aee9359c486c626b9a1190bb4b44a53d70f76a86130363c285c9a2bfa504da1e470613d
|
||||
SHA512 (libguestfs-1.57.4.tar.gz.sig) = bd83857dc81611e42edef8ec718a57399ecd9464479f4c5bc7b0dfe49a212a6428b098a835a49f54d47c3711bdbe0272c1ebc68c351733fdce608c82fe82a896
|
||||
|
||||
Loading…
Reference in New Issue
Block a user