From a6b4e73743187ea59d5816497d8511ce0751ee38 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 19 Jan 2024 13:41:19 +0000 Subject: [PATCH] Fix virt-customize --chown invalid format resolves: RHEL-21899 --- .guestfs-tools.metadata | 2 + ...er-Add-a-test-of-the-chown-parameter.patch | 63 +++++++++++++++++++ ...of-libguestfs-winsupport-features-ex.patch | 2 +- ...-builder-Disable-opensuse-repository.patch | 2 +- guestfs-tools.spec | 11 ++-- 5 files changed, 74 insertions(+), 6 deletions(-) create mode 100644 .guestfs-tools.metadata create mode 100644 0002-builder-Add-a-test-of-the-chown-parameter.patch rename 0002-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch => 0003-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch (91%) rename 0003-RHEL-builder-Disable-opensuse-repository.patch => 0004-RHEL-builder-Disable-opensuse-repository.patch (94%) diff --git a/.guestfs-tools.metadata b/.guestfs-tools.metadata new file mode 100644 index 0000000..df5c7a5 --- /dev/null +++ b/.guestfs-tools.metadata @@ -0,0 +1,2 @@ +7a64ba52bca3a3591d2e639a6bc9002d61e7d374 guestfs-tools-1.51.6.tar.gz +b15f24873be9b9c35184d09e15a4230bef8e550e guestfs-tools-1.51.6.tar.gz.sig diff --git a/0002-builder-Add-a-test-of-the-chown-parameter.patch b/0002-builder-Add-a-test-of-the-chown-parameter.patch new file mode 100644 index 0000000..751ebec --- /dev/null +++ b/0002-builder-Add-a-test-of-the-chown-parameter.patch @@ -0,0 +1,63 @@ +From 5f9beb89443f84640efc52ee6cd68f7f880fb66b Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Fri, 19 Jan 2024 13:22:51 +0000 +Subject: [PATCH] builder: Add a test of the --chown parameter + +Also update the libguestfs common submodule, pulling in this change +from libguestfs: + + generator/customize.ml: Split --chown parameter on ':' character + +and this patch to common/mltools: + + mltools/libosinfo-c.c: Fix off-by-one error + +(cherry picked from commit 299dc5ec2a0bdd9adecef75adc6a5eca0dc685b1) +--- + builder/test-virt-builder.sh | 4 ++++ + common | 2 +- + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/builder/test-virt-builder.sh b/builder/test-virt-builder.sh +index 705788a3c..f839fd7af 100755 +--- a/builder/test-virt-builder.sh ++++ b/builder/test-virt-builder.sh +@@ -69,6 +69,7 @@ virt-builder phony-fedora \ + --write '/etc/append6: + ' \ + --append-line '/etc/append6:line2' \ ++ --chown 1:1:/etc/append6 \ + --firstboot Makefile --firstboot-command 'echo "hello"' \ + --firstboot-install "minicom,inkscape" + +@@ -112,6 +113,7 @@ echo append5: + cat /etc/append5 + echo append6: + cat /etc/append6 ++stat /etc/append6 | grep '^[ug]id:' + + echo ----- + EOF +@@ -154,6 +156,8 @@ append6: + + line2 + ++uid: 1 ++gid: 1 + -----" ]; then + echo "$0: unexpected output:" + cat test-virt-builder.out +Submodule common 0dba002c2..54869c987: +diff --git a/common/mlcustomize/customize_cmdline.ml b/common/mlcustomize/customize_cmdline.ml +index 245d9960a..48ee33445 100644 +--- a/common/mlcustomize/customize_cmdline.ml ++++ b/common/mlcustomize/customize_cmdline.ml +@@ -157,7 +157,7 @@ let rec argspec () = + let len = String.length arg in + String.sub arg 0 i, String.sub arg (i+1) (len-(i+1)) + and split_string_triplet option_name arg = +- match String.nsplit ~max:3 "," arg with ++ match String.nsplit ~max:3 ":" arg with + | [a; b; c] -> a, b, c + | _ -> + error (f_"invalid format for '--%s' parameter, see the man page") diff --git a/0002-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch b/0003-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch similarity index 91% rename from 0002-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch rename to 0003-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch index 55d3d58..dc5d573 100644 --- a/0002-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch +++ b/0003-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch @@ -1,4 +1,4 @@ -From 1ea6c78c7fc6a3ebbe818409ba41be6d1f178381 Mon Sep 17 00:00:00 2001 +From b5fdf9eac368a1c5df4ddd93ce40884924e6092a 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/0003-RHEL-builder-Disable-opensuse-repository.patch b/0004-RHEL-builder-Disable-opensuse-repository.patch similarity index 94% rename from 0003-RHEL-builder-Disable-opensuse-repository.patch rename to 0004-RHEL-builder-Disable-opensuse-repository.patch index 6970e67..a80dcfb 100644 --- a/0003-RHEL-builder-Disable-opensuse-repository.patch +++ b/0004-RHEL-builder-Disable-opensuse-repository.patch @@ -1,4 +1,4 @@ -From 3ad2b829e42b535a7a6f01dda06cc9c9d4f09664 Mon Sep 17 00:00:00 2001 +From 511de43cdca80381d52360e050bf57f7079f46d6 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 21 Nov 2022 13:03:22 +0000 Subject: [PATCH] RHEL: builder: Disable opensuse repository diff --git a/guestfs-tools.spec b/guestfs-tools.spec index c948ba7..6a5f7a2 100644 --- a/guestfs-tools.spec +++ b/guestfs-tools.spec @@ -19,7 +19,7 @@ Summary: Tools to access and modify virtual machine disk images Name: guestfs-tools Version: 1.51.6 -Release: 1%{?dist} +Release: 2%{?dist} License: GPL-2.0-or-later AND LGPL-2.0-or-later # Build only for architectures that have a kernel @@ -49,8 +49,9 @@ Source3: copy-patches.sh # Patches. Patch0001: 0001-Update-common-submodule.patch -Patch0002: 0002-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch -Patch0003: 0003-RHEL-builder-Disable-opensuse-repository.patch +Patch0002: 0002-builder-Add-a-test-of-the-chown-parameter.patch +Patch0003: 0003-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch +Patch0004: 0004-RHEL-builder-Disable-opensuse-repository.patch %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool, gettext-devel @@ -409,12 +410,14 @@ end %changelog -* Mon Dec 11 2023 Richard W.M. Jones - 1.51.6-1 +* Fri Jan 19 2024 Richard W.M. Jones - 1.51.6-2 - Rebase to guestfs-tools 1.51.6 - Implement --key all:... resolves: RHEL-19030 - Fix crash because of off-by-one error resolves: RHEL-19062 +- Fix virt-customize --chown invalid format + resolves: RHEL-21899 * Thu Jun 08 2023 Laszlo Ersek - 1.50.1-3 - let virt-inspector recognize "--key /dev/mapper/VG-LV:key:password"