From 7d474d11660c136c2c2a40f99b340fc103c91a44 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 31 Aug 2021 23:43:52 +0100 Subject: [PATCH 01/11] Rebuild for updated ntfs-3g CVE (RHBZ#1999788) --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index e363c76..2b4b75f 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -57,7 +57,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.45.7 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1139,6 +1139,9 @@ rm ocaml/html/.gitignore %changelog +* Tue Aug 31 2021 Richard W.M. Jones - 1:1.45.7-2 +- Rebuild for updated ntfs-3g CVE (RHBZ#1999788) + * Tue Aug 31 2021 Richard W.M. Jones - 1:1.45.7-1 - New upstream development version 1.45.7. - Fix to work with qemu 6.1 (RHBZ#1998820) From 67d5781a549591a2f0344af8731601d373c0df6a Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 23 Sep 2021 15:55:13 +0100 Subject: [PATCH 02/11] New upstream stable branch version 1.46.0 (cherry picked from commit 05680b55f64b8018054a8c34e74a16c07c6989f1) --- libguestfs.spec | 11 +++++++---- sources | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 2b4b75f..57fff21 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -21,7 +21,7 @@ # (however KVM would work if it was available in Koji, so this # is not a bug) %if !0%{?rhel} -%global test_arches x86_64 +%global test_arches armv7hl x86_64 %else # RHEL 9 only: # x86-64: "/lib64/libc.so.6: CPU ISA level is lower than required" @@ -45,7 +45,7 @@ %endif # The source directory. -%global source_directory 1.45-development +%global source_directory 1.46-stable # Filter perl provides. %{?perl_default_filter} @@ -56,8 +56,8 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.45.7 -Release: 2%{?dist} +Version: 1.46.0 +Release: 1%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1139,6 +1139,9 @@ rm ocaml/html/.gitignore %changelog +* Thu Sep 23 2021 Richard W.M. Jones - 1:1.46.0-1 +- New upstream stable branch version 1.46.0 + * Tue Aug 31 2021 Richard W.M. Jones - 1:1.45.7-2 - Rebuild for updated ntfs-3g CVE (RHBZ#1999788) diff --git a/sources b/sources index b1659fa..9681d10 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.45.7.tar.gz) = 16cdfb59077f753908b46a5a7ffcbb5b878cd224fa4a5b87878ebae2c0c3981f0b68f2df2c35c9f44676886922eb9afbcdacb5d6ee2d34b28e053440face7132 -SHA512 (libguestfs-1.45.7.tar.gz.sig) = 1a999eba5275821e7013deea3803aa2ad2ebcd082b8f9a978ffce45e23d3f42af4c5e78700914d79804b42530c1cfd629d98b4977fe35bd11ed3f97dad705ea9 +SHA512 (libguestfs-1.46.0.tar.gz) = 9b1670dff924e046ab82ff1ce6e25428d95b88700b507d4f1dd68a309641e376d14520c7b5aa5bbb81a6ba5c708ebcc46b6fe0970d903a3ed79e76d4ccdca614 +SHA512 (libguestfs-1.46.0.tar.gz.sig) = d4c8e4629377d42e8e9f1cc88ad7885999c9ae94a2ee2e683960b397b1a92411c289bddb65d4c3c350915bba16c949011639614b9ec54037bf43833e917b7858 From 20a94abb618d81a3605d4347ee84e40c383f4329 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 23 Sep 2021 16:09:29 +0100 Subject: [PATCH 03/11] Remove BUGS file, no longer provided upstream (cherry picked from commit 1a2b1681decd2925e73b7dab155ff8bc3106a78f) --- libguestfs.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 57fff21..4574e1f 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -958,7 +958,7 @@ rm ocaml/html/.gitignore %files devel -%doc AUTHORS BUGS HACKING TODO README +%doc AUTHORS HACKING TODO README %doc examples/*.c %{_libdir}/libguestfs.so %{_sbindir}/libguestfs-make-fixed-appliance @@ -1141,6 +1141,7 @@ rm ocaml/html/.gitignore %changelog * Thu Sep 23 2021 Richard W.M. Jones - 1:1.46.0-1 - New upstream stable branch version 1.46.0 +- Remove BUGS file, no longer provided upstream * Tue Aug 31 2021 Richard W.M. Jones - 1:1.45.7-2 - Rebuild for updated ntfs-3g CVE (RHBZ#1999788) From c1cbeaf4dd104b5ccc73d2908bf14fa9183ed732 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 23 Sep 2021 19:38:09 +0100 Subject: [PATCH 04/11] Disable tests on armv7 virtio devices cannot be found by the guest. It could be similar to https://bugzilla.redhat.com/show_bug.cgi?id=2006709 which was reported against ppc64le. (cherry picked from commit 9386c1d522d1392db74ff722209835d8b6e4cc8d) --- libguestfs.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 4574e1f..5462817 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -13,7 +13,7 @@ # # Currently the basic sanity check is *broken* on: # -# arm: times out when running the test +# arm: cannot see virtio devices (similar to RHBZ#2006709 ?) # aarch64: "MSI is not supported by interrupt controller" (RHBZ#1414081) # ppc64: qemu doesn't work with TCG (RHBZ#1614948) # ppc64le: kernel doesn't boot on qemu (RHBZ#1435873) @@ -21,7 +21,7 @@ # (however KVM would work if it was available in Koji, so this # is not a bug) %if !0%{?rhel} -%global test_arches armv7hl x86_64 +%global test_arches x86_64 %else # RHEL 9 only: # x86-64: "/lib64/libc.so.6: CPU ISA level is lower than required" From 70909ccb836b901dbd500d4fb9372898514856cc Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 9 Dec 2021 19:25:07 +0000 Subject: [PATCH 05/11] New upstream stable branch version 1.46.1 --- libguestfs.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 5462817..8ab931c 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -56,7 +56,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.46.0 +Version: 1.46.1 Release: 1%{?dist} License: LGPLv2+ @@ -1139,6 +1139,9 @@ rm ocaml/html/.gitignore %changelog +* Thu Dec 09 2021 Richard W.M. Jones - 1:1.46.1-1 +- New upstream stable branch version 1.46.1 + * Thu Sep 23 2021 Richard W.M. Jones - 1:1.46.0-1 - New upstream stable branch version 1.46.0 - Remove BUGS file, no longer provided upstream diff --git a/sources b/sources index 9681d10..cb89168 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.46.0.tar.gz) = 9b1670dff924e046ab82ff1ce6e25428d95b88700b507d4f1dd68a309641e376d14520c7b5aa5bbb81a6ba5c708ebcc46b6fe0970d903a3ed79e76d4ccdca614 -SHA512 (libguestfs-1.46.0.tar.gz.sig) = d4c8e4629377d42e8e9f1cc88ad7885999c9ae94a2ee2e683960b397b1a92411c289bddb65d4c3c350915bba16c949011639614b9ec54037bf43833e917b7858 +SHA512 (libguestfs-1.46.1.tar.gz) = 28749578f01585a050975adb0ecafcc85cfa3b8940804e7e6846d64f4eabe2a65ca5a6084fdb4b34c97e388c5e4ec98703d41e0768c85c830b9b651874ebe45d +SHA512 (libguestfs-1.46.1.tar.gz.sig) = e80a4979a261bc0b9b35d857c2a52dae1124eeea65969923cc2f9c63f077493b0ae2166ea763a1c7a7a2055a752b3a736d06b890925d9d3daf08b67348d96eb6 From 14d602dc8871638e626bbcde8c5dce14cd9bbf28 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 24 Dec 2021 10:12:34 +0000 Subject: [PATCH 06/11] New upstream stable branch version 1.46.2 --- libguestfs.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 8ab931c..f0056cd 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -56,7 +56,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.46.1 +Version: 1.46.2 Release: 1%{?dist} License: LGPLv2+ @@ -1139,6 +1139,9 @@ rm ocaml/html/.gitignore %changelog +* Fri Dec 24 2021 Richard W.M. Jones - 1:1.46.2-1 +- New upstream stable branch version 1.46.2 + * Thu Dec 09 2021 Richard W.M. Jones - 1:1.46.1-1 - New upstream stable branch version 1.46.1 diff --git a/sources b/sources index cb89168..2438fc6 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.46.1.tar.gz) = 28749578f01585a050975adb0ecafcc85cfa3b8940804e7e6846d64f4eabe2a65ca5a6084fdb4b34c97e388c5e4ec98703d41e0768c85c830b9b651874ebe45d -SHA512 (libguestfs-1.46.1.tar.gz.sig) = e80a4979a261bc0b9b35d857c2a52dae1124eeea65969923cc2f9c63f077493b0ae2166ea763a1c7a7a2055a752b3a736d06b890925d9d3daf08b67348d96eb6 +SHA512 (libguestfs-1.46.2.tar.gz) = 6a7a77c72dc3120e40d6719e1d652d8d803df44355e1f1c22e7d787d051f4922b8a80be7a9f4a389f6c078c22f2c8349607695f67fa642c08c38aad6bf3416bc +SHA512 (libguestfs-1.46.2.tar.gz.sig) = 30a335aee7fb024a8f9a28d5995ef42f64a895338f2ac0ece917c3bbdf79b20c11ce582e9341e31bbed6a9db11c082d3de4a1b8ada742efa87467d9a2223c350 From 4b9154eaac6c822585af621f7ae4baf2613b5a38 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 14 Mar 2022 14:15:32 +0000 Subject: [PATCH 07/11] New upstream stable branch version 1.48.0 Remove the RHEL (downstream) patches as they are out of date. --- ...L-Remove-libguestfs-live-RHBZ-798980.patch | 55 -- ...Remove-9p-APIs-from-RHEL-RHBZ-921710.patch | 329 ---------- ...upported-remote-drive-protocols-RHBZ.patch | 609 ------------------ ...-Remove-User-Mode-Linux-RHBZ-1144197.patch | 72 --- ...of-libguestfs-winsupport-features-ex.patch | 69 -- ...crypto-policies-back-ends-opensslcnf.patch | 33 - libguestfs.spec | 40 +- sources | 4 +- 8 files changed, 16 insertions(+), 1195 deletions(-) delete mode 100644 0001-RHEL-Remove-libguestfs-live-RHBZ-798980.patch delete mode 100644 0002-RHEL-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch delete mode 100644 0003-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch delete mode 100644 0004-RHEL-Remove-User-Mode-Linux-RHBZ-1144197.patch delete mode 100644 0005-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch delete mode 100644 0006-RHEL-Create-etc-crypto-policies-back-ends-opensslcnf.patch diff --git a/0001-RHEL-Remove-libguestfs-live-RHBZ-798980.patch b/0001-RHEL-Remove-libguestfs-live-RHBZ-798980.patch deleted file mode 100644 index ef3bcac..0000000 --- a/0001-RHEL-Remove-libguestfs-live-RHBZ-798980.patch +++ /dev/null @@ -1,55 +0,0 @@ -From fb09175a21b9ee333e3ad01ab9c8652263200ca4 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Fri, 21 Dec 2012 15:50:11 +0000 -Subject: [PATCH 1/6] RHEL: Remove libguestfs live (RHBZ#798980). - -This isn't supported in RHEL. - -Disable daemon tests that require the 'unix' backend. ---- - lib/launch-unix.c | 7 +++++++ - tests/Makefile.am | 3 --- - 2 files changed, 7 insertions(+), 3 deletions(-) - -diff --git a/lib/launch-unix.c b/lib/launch-unix.c -index 0d344f9df..74dd1bb4a 100644 ---- a/lib/launch-unix.c -+++ b/lib/launch-unix.c -@@ -37,6 +37,12 @@ - static int - launch_unix (guestfs_h *g, void *datav, const char *sockpath) - { -+ error (g, -+ "launch: In RHEL, only the 'libvirt' or 'direct' method is supported.\n" -+ "In particular, \"libguestfs live\" is not supported."); -+ return -1; -+ -+#if 0 - int r, daemon_sock = -1; - struct sockaddr_un addr; - uint32_t size; -@@ -106,6 +112,7 @@ launch_unix (guestfs_h *g, void *datav, const char *sockpath) - g->conn = NULL; - } - return -1; -+#endif - } - - static int -diff --git a/tests/Makefile.am b/tests/Makefile.am -index 690e09b5e..919e2f248 100644 ---- a/tests/Makefile.am -+++ b/tests/Makefile.am -@@ -328,9 +328,6 @@ EXTRA_DIST += create/test-disk-create.sh - - check_DATA = daemon/captive-daemon.pm - --TESTS += \ -- daemon/test-daemon-start.pl \ -- daemon/test-btrfs.pl - EXTRA_DIST += \ - daemon/test-daemon-start.pl \ - daemon/test-btrfs.pl --- -2.31.1 - diff --git a/0002-RHEL-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch b/0002-RHEL-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch deleted file mode 100644 index 6496e82..0000000 --- a/0002-RHEL-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch +++ /dev/null @@ -1,329 +0,0 @@ -From e0af86a09b80b5fa0c5f308ae6f34d8315c1dc4d Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Thu, 18 Jul 2013 18:31:53 +0100 -Subject: [PATCH 2/6] RHEL: Remove 9p APIs from RHEL (RHBZ#921710). - ---- - daemon/9p.c | 182 -------------------------------------- - daemon/Makefile.am | 1 - - docs/C_SOURCE_FILES | 1 - - generator/actions_core.ml | 21 ----- - generator/proc_nr.ml | 2 - - gobject/Makefile.inc | 2 - - po/POTFILES | 2 - - tests/Makefile.am | 1 - - 8 files changed, 212 deletions(-) - delete mode 100644 daemon/9p.c - -diff --git a/daemon/9p.c b/daemon/9p.c -deleted file mode 100644 -index 743a96abd..000000000 ---- a/daemon/9p.c -+++ /dev/null -@@ -1,182 +0,0 @@ --/* libguestfs - the guestfsd daemon -- * Copyright (C) 2011 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 -- * the Free Software Foundation; either version 2 of the License, or -- * (at your option) any later version. -- * -- * This program is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this program; if not, write to the Free Software -- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -- */ -- --#include -- --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include -- --#include "ignore-value.h" -- --#include "daemon.h" --#include "actions.h" -- --#define BUS_PATH "/sys/bus/virtio/drivers/9pnet_virtio" -- --static void --modprobe_9pnet_virtio (void) --{ -- /* Required with Linux 5.6 and maybe earlier kernels. For unclear -- * reasons the module is not an automatic dependency of the 9p -- * module so doesn't get loaded automatically. -- */ -- ignore_value (command (NULL, NULL, "modprobe", "9pnet_virtio", NULL)); --} -- --/* https://bugzilla.redhat.com/show_bug.cgi?id=714981#c1 */ --char ** --do_list_9p (void) --{ -- CLEANUP_FREE_STRINGSBUF DECLARE_STRINGSBUF (r); -- DIR *dir; -- -- modprobe_9pnet_virtio (); -- -- dir = opendir (BUS_PATH); -- if (!dir) { -- perror ("opendir: " BUS_PATH); -- if (errno != ENOENT) { -- reply_with_perror ("opendir: " BUS_PATH); -- return NULL; -- } -- -- /* If this directory doesn't exist, it probably means that -- * the virtio driver isn't loaded. Don't return an error -- * in this case, but return an empty list. -- */ -- if (end_stringsbuf (&r) == -1) -- return NULL; -- -- return take_stringsbuf (&r); -- } -- -- while (1) { -- struct dirent *d; -- -- errno = 0; -- d = readdir (dir); -- if (d == NULL) break; -- -- if (STRPREFIX (d->d_name, "virtio")) { -- CLEANUP_FREE char *mount_tag_path = NULL; -- if (asprintf (&mount_tag_path, BUS_PATH "/%s/mount_tag", -- d->d_name) == -1) { -- reply_with_perror ("asprintf"); -- closedir (dir); -- return NULL; -- } -- -- /* A bit unclear, but it looks like the virtio transport allows -- * the mount tag length to be unlimited (or up to 65536 bytes). -- * See: linux/include/linux/virtio_9p.h -- */ -- CLEANUP_FREE char *mount_tag = read_whole_file (mount_tag_path, NULL); -- if (mount_tag == 0) -- continue; -- -- if (add_string (&r, mount_tag) == -1) { -- closedir (dir); -- return NULL; -- } -- } -- } -- -- /* Check readdir didn't fail */ -- if (errno != 0) { -- reply_with_perror ("readdir: /sys/block"); -- closedir (dir); -- return NULL; -- } -- -- /* Close the directory handle */ -- if (closedir (dir) == -1) { -- reply_with_perror ("closedir: /sys/block"); -- return NULL; -- } -- -- /* Sort the tags. */ -- if (r.size > 0) -- sort_strings (r.argv, r.size); -- -- /* NULL terminate the list */ -- if (end_stringsbuf (&r) == -1) -- return NULL; -- -- return take_stringsbuf (&r); --} -- --/* Takes optional arguments, consult optargs_bitmask. */ --int --do_mount_9p (const char *mount_tag, const char *mountpoint, const char *options) --{ -- CLEANUP_FREE char *mp = NULL, *opts = NULL, *err = NULL; -- struct stat statbuf; -- int r; -- -- ABS_PATH (mountpoint, 0, return -1); -- -- mp = sysroot_path (mountpoint); -- if (!mp) { -- reply_with_perror ("malloc"); -- return -1; -- } -- -- /* Check the mountpoint exists and is a directory. */ -- if (stat (mp, &statbuf) == -1) { -- reply_with_perror ("%s", mountpoint); -- return -1; -- } -- if (!S_ISDIR (statbuf.st_mode)) { -- reply_with_perror ("%s: mount point is not a directory", mountpoint); -- return -1; -- } -- -- /* Add trans=virtio to the options. */ -- if ((optargs_bitmask & GUESTFS_MOUNT_9P_OPTIONS_BITMASK) && -- STRNEQ (options, "")) { -- if (asprintf (&opts, "trans=virtio,%s", options) == -1) { -- reply_with_perror ("asprintf"); -- return -1; -- } -- } -- else { -- opts = strdup ("trans=virtio"); -- if (opts == NULL) { -- reply_with_perror ("strdup"); -- return -1; -- } -- } -- -- modprobe_9pnet_virtio (); -- r = command (NULL, &err, -- "mount", "-o", opts, "-t", "9p", mount_tag, mp, NULL); -- if (r == -1) { -- reply_with_error ("%s on %s: %s", mount_tag, mountpoint, err); -- return -1; -- } -- -- return 0; --} -diff --git a/daemon/Makefile.am b/daemon/Makefile.am -index 6f13bd43c..cc4dbcd85 100644 ---- a/daemon/Makefile.am -+++ b/daemon/Makefile.am -@@ -84,7 +84,6 @@ guestfsd_SOURCES = \ - ../common/protocol/guestfs_protocol.h \ - ../common/utils/cleanups.h \ - ../common/utils/guestfs-utils.h \ -- 9p.c \ - acl.c \ - actions.h \ - available.c \ -diff --git a/docs/C_SOURCE_FILES b/docs/C_SOURCE_FILES -index 6a97d8b0e..896314e7e 100644 ---- a/docs/C_SOURCE_FILES -+++ b/docs/C_SOURCE_FILES -@@ -43,7 +43,6 @@ common/visit/visit.c - common/visit/visit.h - common/windows/windows.c - common/windows/windows.h --daemon/9p.c - daemon/acl.c - daemon/actions.h - daemon/augeas.c -diff --git a/generator/actions_core.ml b/generator/actions_core.ml -index bb602ee02..db8156c51 100644 ---- a/generator/actions_core.ml -+++ b/generator/actions_core.ml -@@ -6157,27 +6157,6 @@ This returns true iff the device exists and contains all zero bytes. - - Note that for large devices this can take a long time to run." }; - -- { defaults with -- name = "list_9p"; added = (1, 11, 12); -- style = RStringList (RPlainString, "mounttags"), [], []; -- shortdesc = "list 9p filesystems"; -- longdesc = "\ --List all 9p filesystems attached to the guest. A list of --mount tags is returned." }; -- -- { defaults with -- name = "mount_9p"; added = (1, 11, 12); -- style = RErr, [String (PlainString, "mounttag"); String (PlainString, "mountpoint")], [OString "options"]; -- camel_name = "Mount9P"; -- shortdesc = "mount 9p filesystem"; -- longdesc = "\ --Mount the virtio-9p filesystem with the tag C on the --directory C. -- --If required, C will be automatically added to the options. --Any other options required can be passed in the optional C --parameter." }; -- - { defaults with - name = "list_dm_devices"; added = (1, 11, 15); - style = RStringList (RDevice, "devices"), [], []; -diff --git a/generator/proc_nr.ml b/generator/proc_nr.ml -index 74b95baf7..6b6cb7353 100644 ---- a/generator/proc_nr.ml -+++ b/generator/proc_nr.ml -@@ -295,8 +295,6 @@ let proc_nr = [ - 282, "internal_autosync"; - 283, "is_zero"; - 284, "is_zero_device"; --285, "list_9p"; --286, "mount_9p"; - 287, "list_dm_devices"; - 288, "ntfsresize"; - 289, "btrfs_filesystem_resize"; -diff --git a/gobject/Makefile.inc b/gobject/Makefile.inc -index 650f8ddac..c4e735967 100644 ---- a/gobject/Makefile.inc -+++ b/gobject/Makefile.inc -@@ -94,7 +94,6 @@ guestfs_gobject_headers= \ - include/guestfs-gobject/optargs-mksquashfs.h \ - include/guestfs-gobject/optargs-mkswap.h \ - include/guestfs-gobject/optargs-mktemp.h \ -- include/guestfs-gobject/optargs-mount_9p.h \ - include/guestfs-gobject/optargs-mount_local.h \ - include/guestfs-gobject/optargs-ntfsclone_out.h \ - include/guestfs-gobject/optargs-ntfsfix.h \ -@@ -188,7 +187,6 @@ guestfs_gobject_sources= \ - src/optargs-mksquashfs.c \ - src/optargs-mkswap.c \ - src/optargs-mktemp.c \ -- src/optargs-mount_9p.c \ - src/optargs-mount_local.c \ - src/optargs-ntfsclone_out.c \ - src/optargs-ntfsfix.c \ -diff --git a/po/POTFILES b/po/POTFILES -index 29205b6a6..23afe619c 100644 ---- a/po/POTFILES -+++ b/po/POTFILES -@@ -26,7 +26,6 @@ common/utils/stringlists-utils.c - common/utils/utils.c - common/visit/visit.c - common/windows/windows.c --daemon/9p.c - daemon/acl.c - daemon/augeas.c - daemon/available.c -@@ -264,7 +263,6 @@ gobject/src/optargs-mkfs_btrfs.c - gobject/src/optargs-mksquashfs.c - gobject/src/optargs-mkswap.c - gobject/src/optargs-mktemp.c --gobject/src/optargs-mount_9p.c - gobject/src/optargs-mount_local.c - gobject/src/optargs-ntfsclone_out.c - gobject/src/optargs-ntfsfix.c -diff --git a/tests/Makefile.am b/tests/Makefile.am -index 919e2f248..e3613fec4 100644 ---- a/tests/Makefile.am -+++ b/tests/Makefile.am -@@ -43,7 +43,6 @@ check-slow: - check-valgrind: - $(MAKE) VG="@VG@" check - --TESTS += 9p/test-9p.sh - EXTRA_DIST += 9p/test-9p.sh - - SLOW_TESTS += bigdirs/test-big-dirs.pl --- -2.31.1 - diff --git a/0003-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch b/0003-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch deleted file mode 100644 index 841ec13..0000000 --- a/0003-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch +++ /dev/null @@ -1,609 +0,0 @@ -From fddb44d1a2c77739c9441d2cc0acfef9e62718a6 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Mon, 29 Jul 2013 14:47:56 +0100 -Subject: [PATCH 3/6] RHEL: Disable unsupported remote drive protocols - (RHBZ#962113). - -This disables support for unsupported remote drive protocols: - - * ftp - * ftps - * http - * https - * tftp - * gluster - * iscsi - * sheepdog - * ssh - -Note 'nbd' is not disabled, and of course 'file' works. - -We hope to gradually add some of these back over the lifetime of RHEL. ---- - docs/guestfs-testing.pod | 20 ----- - fish/guestfish.pod | 66 ++-------------- - fish/test-add-uri.sh | 32 -------- - generator/actions_core.ml | 50 +------------ - lib/drives.c | 8 ++ - lib/guestfs.pod | 100 ------------------------- - tests/disks/test-qemu-drive-libvirt.sh | 28 ------- - tests/disks/test-qemu-drive.sh | 60 --------------- - 8 files changed, 16 insertions(+), 348 deletions(-) - -diff --git a/docs/guestfs-testing.pod b/docs/guestfs-testing.pod -index f558964bf..8f264ed17 100644 ---- a/docs/guestfs-testing.pod -+++ b/docs/guestfs-testing.pod -@@ -109,26 +109,6 @@ image. To exit, type C. - If you get an error, try enabling debugging (add C<-v> to the command - line). Also make sure that L succeeds. - --=head2 Try to open a remote guest image with guestfish. -- --You may also have to disable libvirt by setting this: -- -- export LIBGUESTFS_BACKEND=direct -- --If you have a disk image available over HTTP/FTP, try to open it. -- -- guestfish --ro -i --format=raw -a http://www.example.com/disk.img -- --For SSH you will need to make sure that ssh-agent is set up so you --don't need a password to log in to the remote machine. Then a command --similar to this should work: -- -- guestfish --ro -i --format=raw \ -- -a ssh://remote.example.com/path/to/disk.img -- --If you get an error, try enabling debugging (add C<-v> to the command --line). Also make sure that L succeeds. -- - =head2 Run virt-alignment-scan on all your guests. - - Run L on guests or disk images: -diff --git a/fish/guestfish.pod b/fish/guestfish.pod -index 9f086f110..bb4167b06 100644 ---- a/fish/guestfish.pod -+++ b/fish/guestfish.pod -@@ -131,9 +131,9 @@ To list what is available do: - - =head2 Remote drives - --Access a remote disk using ssh: -+Access a remote disk using NBD: - -- guestfish -a ssh://example.com/path/to/disk.img -+ guestfish -a nbd://example.com - - =head2 Remote control - -@@ -1134,12 +1134,12 @@ L>. - On the command line, you can use the I<-a> option to add network - block devices using a URI-style format, for example: - -- guestfish -a ssh://root@example.com/disk.img -+ guestfish -a nbd://example.com - - URIs I be used with the L command. The equivalent - command using the API directly is: - -- > add /disk.img protocol:ssh server:tcp:example.com username:root -+ > add /disk.img protocol:nbd server:tcp:example.com - - The possible I<-a URI> formats are described below. - -@@ -1149,40 +1149,6 @@ The possible I<-a URI> formats are described below. - - Add the local disk image (or device) called F. - --=head2 B<-a ftp://[user@]example.com[:port]/disk.img> -- --=head2 B<-a ftps://[user@]example.com[:port]/disk.img> -- --=head2 B<-a http://[user@]example.com[:port]/disk.img> -- --=head2 B<-a https://[user@]example.com[:port]/disk.img> -- --=head2 B<-a tftp://[user@]example.com[:port]/disk.img> -- --Add a disk located on a remote FTP, HTTP or TFTP server. -- --The equivalent API command would be: -- -- > add /disk.img protocol:(ftp|...) server:tcp:example.com -- --=head2 B<-a gluster://example.com[:port]/volname/image> -- --Add a disk image located on GlusterFS storage. -- --The server is the one running C, and may be C. -- --The equivalent API command would be: -- -- > add volname/image protocol:gluster server:tcp:example.com -- --=head2 B<-a iscsi://example.com[:port]/target-iqn-name[/lun]> -- --Add a disk located on an iSCSI server. -- --The equivalent API command would be: -- -- > add target-iqn-name/lun protocol:iscsi server:tcp:example.com -- - =head2 B<-a nbd://example.com[:port]> - - =head2 B<-a nbd://example.com[:port]/exportname> -@@ -1217,35 +1183,13 @@ The equivalent API command would be: - - > add pool/disk protocol:rbd server:tcp:example.com:port - --=head2 B<-a sheepdog://[example.com[:port]]/volume/image> -- --Add a disk image located on a Sheepdog volume. -- --The server name is optional. Although libguestfs and Sheepdog --supports multiple servers, only at most one server can be specified --when using this URI syntax. -- --The equivalent API command would be: -- -- > add volume protocol:sheepdog [server:tcp:example.com] -- --=head2 B<-a ssh://[user@]example.com[:port]/disk.img> -- --Add a disk image located on a remote server, accessed using the Secure --Shell (ssh) SFTP protocol. SFTP is supported out of the box by all --major SSH servers. -- --The equivalent API command would be: -- -- > add /disk protocol:ssh server:tcp:example.com [username:user] -- - Note that the URIs follow the syntax of - L: in particular, there - are restrictions on the allowed characters for the various components - of the URI. Characters such as C<:>, C<@>, and C B be - percent-encoded: - -- $ guestfish -a ssh://user:pass%40word@example.com/disk.img -+ $ guestfish -a rbd://user:pass%40word@example.com[:port]/pool/disk - - In this case, the password is C. - -diff --git a/fish/test-add-uri.sh b/fish/test-add-uri.sh -index 21d424984..ddabeb639 100755 ---- a/fish/test-add-uri.sh -+++ b/fish/test-add-uri.sh -@@ -40,14 +40,6 @@ function fail () - $VG guestfish -x -a file://$abs_builddir/test-add-uri.img test-add-uri.out 2>&1 - grep -sq 'add_drive ".*/test-add-uri.img"' test-add-uri.out || fail - --# curl --$VG guestfish -x -a ftp://user@example.com/disk.img test-add-uri.out 2>&1 --grep -sq 'add_drive "/disk.img" "protocol:ftp" "server:tcp:example.com" "username:user"' test-add-uri.out || fail -- --# gluster --$VG guestfish -x -a gluster://example.com/disk test-add-uri.out 2>&1 --grep -sq 'add_drive "disk" "protocol:gluster" "server:tcp:example.com"' test-add-uri.out || fail -- - # NBD - $VG guestfish -x -a nbd://example.com test-add-uri.out 2>&1 - grep -sq 'add_drive "" "protocol:nbd" "server:tcp:example.com"' test-add-uri.out || fail -@@ -67,29 +59,5 @@ grep -sq 'add_drive "pool/disk" "protocol:rbd" "server:tcp:example.com:6789"' te - $VG guestfish -x -a rbd:///pool/disk test-add-uri.out 2>&1 - grep -sq 'add_drive "pool/disk" "protocol:rbd"' test-add-uri.out || fail - --# sheepdog --$VG guestfish -x -a sheepdog:///volume/image test-add-uri.out 2>&1 --grep -sq 'add_drive "volume/image" "protocol:sheepdog"' test-add-uri.out || fail -- --$VG guestfish -x -a sheepdog://example.com:3000/volume/image test-add-uri.out 2>&1 --grep -sq 'add_drive "volume/image" "protocol:sheepdog" "server:tcp:example.com:3000"' test-add-uri.out || fail -- --# ssh --$VG guestfish -x -a ssh://example.com/disk.img test-add-uri.out 2>&1 --grep -sq 'add_drive "/disk.img" "protocol:ssh" "server:tcp:example.com"' test-add-uri.out || fail -- --$VG guestfish -x -a ssh://user@example.com/disk.img test-add-uri.out 2>&1 --grep -sq 'add_drive "/disk.img" "protocol:ssh" "server:tcp:example.com" "username:user"' test-add-uri.out || fail -- --$VG guestfish -x -a ssh://user@example.com:2000/disk.img test-add-uri.out 2>&1 --grep -sq 'add_drive "/disk.img" "protocol:ssh" "server:tcp:example.com:2000" "username:user"' test-add-uri.out || fail -- --# iSCSI --$VG guestfish -x -a iscsi://example.com/iqn.2015-12.com.libguestfs:test1/0 test-add-uri.out 2>&1 --grep -sq 'add_drive "iqn.2015-12.com.libguestfs:test1/0" "protocol:iscsi" "server:tcp:example.com"' test-add-uri.out || fail -- --$VG guestfish -x -a iscsi://user:password@example.com/iqn.2015-12.com.libguestfs:test2/0 test-add-uri.out 2>&1 --grep -sq 'add_drive "iqn.2015-12.com.libguestfs:test2/0" "protocol:iscsi" "server:tcp:example.com" "username:user" "secret:password"' test-add-uri.out || fail -- - rm test-add-uri.out - rm test-add-uri.img -diff --git a/generator/actions_core.ml b/generator/actions_core.ml -index db8156c51..b87071e3b 100644 ---- a/generator/actions_core.ml -+++ b/generator/actions_core.ml -@@ -297,29 +297,6 @@ F is interpreted as a local file or device. - This is the default if the optional protocol parameter - is omitted. - --=item C -- --Connect to a remote FTP, HTTP or TFTP server. --The C parameter must also be supplied - see below. -- --See also: L -- --=item C -- --Connect to the GlusterFS server. --The C parameter must also be supplied - see below. -- --See also: L -- --=item C -- --Connect to the iSCSI server. --The C parameter must also be supplied - see below. --The C parameter may be supplied. See below. --The C parameter may be supplied. See below. -- --See also: L. -- - =item C - - Connect to the Network Block Device server. -@@ -336,22 +313,6 @@ The C parameter may be supplied. See below. - - See also: L. - --=item C -- --Connect to the Sheepdog server. --The C parameter may also be supplied - see below. -- --See also: L. -- --=item C -- --Connect to the Secure Shell (ssh) server. -- --The C parameter must be supplied. --The C parameter may be supplied. See below. -- --See also: L. -- - =back - - =item C -@@ -362,13 +323,8 @@ is a list of server(s). - Protocol Number of servers required - -------- -------------------------- - file List must be empty or param not used at all -- ftp|ftps|http|https|tftp Exactly one -- gluster Exactly one -- iscsi Exactly one - nbd Exactly one - rbd Zero or more -- sheepdog Zero or more -- ssh Exactly one - - Each list element is a string specifying a server. The string must be - in one of the following formats: -@@ -384,10 +340,10 @@ for the protocol is used (see F). - - =item C - --For the C, C, C, C, C, C, C --and C protocols, this specifies the remote username. -+For the C -+protocol, this specifies the remote username. - --If not given, then the local username is used for C, and no authentication -+If not given, then no authentication - is attempted for ceph. But note this sometimes may give unexpected results, for - example if using the libvirt backend and if the libvirt backend is configured to - start the qemu appliance as a special user such as C. If in doubt, -diff --git a/lib/drives.c b/lib/drives.c -index 46af66db4..c81ded5d7 100644 ---- a/lib/drives.c -+++ b/lib/drives.c -@@ -168,6 +168,7 @@ create_drive_non_file (guestfs_h *g, - return drv; - } - -+#if 0 /* DISABLED IN RHEL 8 */ - static struct drive * - create_drive_curl (guestfs_h *g, - const struct drive_create_data *data) -@@ -226,6 +227,7 @@ create_drive_gluster (guestfs_h *g, - - return create_drive_non_file (g, data); - } -+#endif /* DISABLED IN RHEL 8 */ - - static int - nbd_port (void) -@@ -294,6 +296,7 @@ create_drive_rbd (guestfs_h *g, - return create_drive_non_file (g, data); - } - -+#if 0 /* DISABLED IN RHEL 8 */ - static struct drive * - create_drive_sheepdog (guestfs_h *g, - const struct drive_create_data *data) -@@ -394,6 +397,7 @@ create_drive_iscsi (guestfs_h *g, - - return create_drive_non_file (g, data); - } -+#endif /* DISABLED IN RHEL 8 */ - - /** - * Create the special F drive. -@@ -856,6 +860,7 @@ guestfs_impl_add_drive_opts (guestfs_h *g, const char *filename, - drv = create_drive_file (g, &data); - } - } -+#if 0 /* DISABLED IN RHEL 8 */ - else if (STREQ (protocol, "ftp")) { - data.protocol = drive_protocol_ftp; - drv = create_drive_curl (g, &data); -@@ -880,6 +885,7 @@ guestfs_impl_add_drive_opts (guestfs_h *g, const char *filename, - data.protocol = drive_protocol_iscsi; - drv = create_drive_iscsi (g, &data); - } -+#endif /* DISABLED IN RHEL 8 */ - else if (STREQ (protocol, "nbd")) { - data.protocol = drive_protocol_nbd; - drv = create_drive_nbd (g, &data); -@@ -888,6 +894,7 @@ guestfs_impl_add_drive_opts (guestfs_h *g, const char *filename, - data.protocol = drive_protocol_rbd; - drv = create_drive_rbd (g, &data); - } -+#if 0 /* DISABLED IN RHEL 8 */ - else if (STREQ (protocol, "sheepdog")) { - data.protocol = drive_protocol_sheepdog; - drv = create_drive_sheepdog (g, &data); -@@ -900,6 +907,7 @@ guestfs_impl_add_drive_opts (guestfs_h *g, const char *filename, - data.protocol = drive_protocol_tftp; - drv = create_drive_curl (g, &data); - } -+#endif /* DISABLED IN RHEL 8 */ - else { - error (g, _("unknown protocol ā€˜%s’"), protocol); - drv = NULL; /*FALLTHROUGH*/ -diff --git a/lib/guestfs.pod b/lib/guestfs.pod -index ff58aa0bb..1af00f1bb 100644 ---- a/lib/guestfs.pod -+++ b/lib/guestfs.pod -@@ -715,70 +715,6 @@ servers. The server string is documented in - L. The C and C parameters are - also optional, and if not given, then no authentication will be used. - --=head3 FTP, HTTP AND TFTP -- --Libguestfs can access remote disks over FTP, FTPS, HTTP, HTTPS --or TFTP protocols. -- --To do this, set the optional C and C parameters of --L like this: -- -- char **servers = { "www.example.org", NULL }; -- guestfs_add_drive_opts (g, "/disk.img", -- GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw", -- GUESTFS_ADD_DRIVE_OPTS_PROTOCOL, "http", -- GUESTFS_ADD_DRIVE_OPTS_SERVER, servers, -- -1); -- --The C can be one of C<"ftp">, C<"ftps">, C<"http">, --C<"https"> or C<"tftp">. -- --C (the C parameter) is a list which must have a --single element. The single element is a string defining the web, --FTP or TFTP server. The format of this string is documented in --L. -- --=head3 GLUSTER -- --Libguestfs can access Gluster disks. -- --To do this, set the optional C and C parameters of --L like this: -- -- char **servers = { "gluster.example.org:24007", NULL }; -- guestfs_add_drive_opts (g, "volname/image", -- GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw", -- GUESTFS_ADD_DRIVE_OPTS_PROTOCOL, "gluster", -- GUESTFS_ADD_DRIVE_OPTS_SERVER, servers, -- -1); -- --C (the C parameter) is a list which must have a --single element. The single element is a string defining the Gluster --server. The format of this string is documented in --L. -- --Note that gluster usually requires the client process (ie. libguestfs) --to run as B and will give unfathomable errors if it is not --(eg. "No data available"). -- --=head3 ISCSI -- --Libguestfs can access iSCSI disks remotely. -- --To do this, set the optional C and C parameters like --this: -- -- char **server = { "iscsi.example.org:3000", NULL }; -- guestfs_add_drive_opts (g, "target-iqn-name/lun", -- GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw", -- GUESTFS_ADD_DRIVE_OPTS_PROTOCOL, "iscsi", -- GUESTFS_ADD_DRIVE_OPTS_SERVER, server, -- -1); -- --The C parameter is a list which must have a single element. --The single element is a string defining the iSCSI server. The format --of this string is documented in L. -- - =head3 NETWORK BLOCK DEVICE - - Libguestfs can access Network Block Device (NBD) disks remotely. -@@ -841,42 +777,6 @@ L - - =back - --=head3 SHEEPDOG -- --Libguestfs can access Sheepdog disks. -- --To do this, set the optional C and C parameters of --L like this: -- -- char **servers = { /* optional servers ... */ NULL }; -- guestfs_add_drive_opts (g, "volume", -- GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw", -- GUESTFS_ADD_DRIVE_OPTS_PROTOCOL, "sheepdog", -- GUESTFS_ADD_DRIVE_OPTS_SERVER, servers, -- -1); -- --The optional list of C may be zero or more server addresses --(C<"hostname:port">). The format of the server strings is documented --in L. -- --=head3 SSH -- --Libguestfs can access disks over a Secure Shell (SSH) connection. -- --To do this, set the C and C and (optionally) --C parameters of L like this: -- -- char **server = { "remote.example.com", NULL }; -- guestfs_add_drive_opts (g, "/path/to/disk.img", -- GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw", -- GUESTFS_ADD_DRIVE_OPTS_PROTOCOL, "ssh", -- GUESTFS_ADD_DRIVE_OPTS_SERVER, server, -- GUESTFS_ADD_DRIVE_OPTS_USERNAME, "remoteuser", -- -1); -- --The format of the server string is documented in --L. -- - =head2 INSPECTION - - Libguestfs has APIs for inspecting an unknown disk image to find out -diff --git a/tests/disks/test-qemu-drive-libvirt.sh b/tests/disks/test-qemu-drive-libvirt.sh -index 595a95a5e..b49534c94 100755 ---- a/tests/disks/test-qemu-drive-libvirt.sh -+++ b/tests/disks/test-qemu-drive-libvirt.sh -@@ -65,34 +65,6 @@ check_output - grep -sq -- '-drive file=rbd:abc-def/ghi-jkl:auth_supported=none,' "$DEBUG_QEMU_FILE" || fail ceph2 - rm "$DEBUG_QEMU_FILE" - --# Gluster. -- --$guestfish -d gluster run ||: --check_output --grep -sq -- '-drive file=gluster://1.2.3.4:1234/volname/image,' "$DEBUG_QEMU_FILE" || fail gluster --rm "$DEBUG_QEMU_FILE" -- --# iSCSI. -- --$guestfish -d iscsi run ||: --check_output --grep -sq -- '-drive file=iscsi://1.2.3.4:1234/iqn.2003-01.org.linux-iscsi.fedora' "$DEBUG_QEMU_FILE" || fail iscsi --rm "$DEBUG_QEMU_FILE" -- --# NBD. -- --$guestfish -d nbd run ||: --check_output --grep -sq -- '-drive file=nbd:1.2.3.4:1234,' "$DEBUG_QEMU_FILE" || fail nbd --rm "$DEBUG_QEMU_FILE" -- --# Sheepdog. -- --$guestfish -d sheepdog run ||: --check_output --grep -sq -- '-drive file=sheepdog:volume,' "$DEBUG_QEMU_FILE" || fail sheepdog --rm "$DEBUG_QEMU_FILE" -- - # Local, stored in a pool. - - $guestfish -d pool1 run ||: -diff --git a/tests/disks/test-qemu-drive.sh b/tests/disks/test-qemu-drive.sh -index 12937fb30..b3e4f9903 100755 ---- a/tests/disks/test-qemu-drive.sh -+++ b/tests/disks/test-qemu-drive.sh -@@ -62,45 +62,6 @@ check_output - grep -sq -- '-drive file=rbd:abc-def/ghi-jkl:auth_supported=none,' "$DEBUG_QEMU_FILE" || fail - rm "$DEBUG_QEMU_FILE" - --# HTTP. -- --guestfish < -Date: Fri, 19 Sep 2014 13:38:20 +0100 -Subject: [PATCH 4/6] RHEL: Remove User-Mode Linux (RHBZ#1144197). - -This isn't supported in RHEL. ---- - lib/launch-uml.c | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -diff --git a/lib/launch-uml.c b/lib/launch-uml.c -index 5aec50a57..8b9fcd770 100644 ---- a/lib/launch-uml.c -+++ b/lib/launch-uml.c -@@ -44,7 +44,9 @@ struct backend_uml_data { - char umid[UML_UMID_LEN+1]; /* umid=<...> unique ID. */ - }; - -+#if 0 - static void print_vmlinux_command_line (guestfs_h *g, char **argv); -+#endif - - /* Run uml_mkcow to create a COW overlay. */ - static char * -@@ -81,6 +83,7 @@ create_cow_overlay_uml (guestfs_h *g, void *datav, struct drive *drv) - return make_cow_overlay (g, drv->src.u.path); - } - -+#if 0 - /* Test for features which are not supported by the UML backend. - * Possibly some of these should just be warnings, not errors. - */ -@@ -133,10 +136,17 @@ uml_supported (guestfs_h *g) - - return true; - } -+#endif - - static int - launch_uml (guestfs_h *g, void *datav, const char *arg) - { -+ error (g, -+ "launch: In RHEL, only the 'libvirt' or 'direct' method is supported.\n" -+ "In particular, User-Mode Linux (UML) is not supported."); -+ return -1; -+ -+#if 0 - struct backend_uml_data *data = datav; - CLEANUP_FREE_STRINGSBUF DECLARE_STRINGSBUF (cmdline); - int console_sock = -1, daemon_sock = -1; -@@ -496,8 +506,10 @@ launch_uml (guestfs_h *g, void *datav, const char *arg) - } - g->state = CONFIG; - return -1; -+#endif - } - -+#if 0 - /* This is called from the forked subprocess just before vmlinux runs, - * so it can just print the message straight to stderr, where it will - * be picked up and funnelled through the usual appliance event API. -@@ -527,6 +539,7 @@ print_vmlinux_command_line (guestfs_h *g, char **argv) - - fputc ('\n', stderr); - } -+#endif - - static int - shutdown_uml (guestfs_h *g, void *datav, int check_for_errors) --- -2.31.1 - diff --git a/0005-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch b/0005-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch deleted file mode 100644 index 7edf33e..0000000 --- a/0005-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch +++ /dev/null @@ -1,69 +0,0 @@ -From b33e943827b2decc2a01f198f1b300a3c3f6710e Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Tue, 7 Jul 2015 09:28:03 -0400 -Subject: [PATCH 5/6] RHEL: Reject use of libguestfs-winsupport features except - for virt-* tools (RHBZ#1240276). - -Fix the tests: it doesn't let us use guestfish for arbitrary Windows -edits. ---- - generator/c.ml | 16 ++++++++++++++++ - test-data/phony-guests/make-windows-img.sh | 1 + - tests/charsets/test-charset-fidelity.c | 2 ++ - 3 files changed, 19 insertions(+) - -diff --git a/generator/c.ml b/generator/c.ml -index ea69abf76..56ee38aa4 100644 ---- a/generator/c.ml -+++ b/generator/c.ml -@@ -1846,6 +1846,22 @@ and generate_client_actions actions () = - check_args_validity c_name style; - trace_call name c_name style; - -+ (* RHEL 8 *) -+ if name = "mount" || name = "mount_ro" || name = "mount_options" || -+ name = "mount_vfs" then ( -+ pr " if (g->program && !STRPREFIX (g->program, \"virt-\")) {\n"; -+ pr " CLEANUP_FREE char *vfs_type = guestfs_vfs_type (g, mountable);\n"; -+ pr " if (vfs_type && STREQ (vfs_type, \"ntfs\")) {\n"; -+ pr " error (g, \"mount: unsupported filesystem type\");\n"; -+ pr " if (trace_flag)\n"; -+ pr " guestfs_int_trace (g, \"%%s = %%s (error)\",\n"; -+ pr " \"%s\", \"-1\");\n" name; -+ pr " return %s;\n" (string_of_errcode errcode); -+ pr " }\n"; -+ pr " }\n"; -+ pr "\n"; -+ ); -+ - (* Calculate the total size of all FileIn arguments to pass - * as a progress bar hint. - *) -diff --git a/test-data/phony-guests/make-windows-img.sh b/test-data/phony-guests/make-windows-img.sh -index 30908a918..73cf5144e 100755 ---- a/test-data/phony-guests/make-windows-img.sh -+++ b/test-data/phony-guests/make-windows-img.sh -@@ -37,6 +37,7 @@ fi - - # Create a disk image. - guestfish < -Date: Tue, 29 Jun 2021 15:29:11 +0100 -Subject: [PATCH 6/6] RHEL: Create - /etc/crypto-policies/back-ends/opensslcnf.config - -https://bugzilla.redhat.com/show_bug.cgi?id=1977214#c13 ---- - appliance/init | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/appliance/init b/appliance/init -index b1c4d09ea..be46f9648 100755 ---- a/appliance/init -+++ b/appliance/init -@@ -70,6 +70,14 @@ if ! test -e /etc/mtab; then - ln -s /proc/mounts /etc/mtab - fi - -+# openssl 3 requires /etc/crypto-policies/back-ends/opensslcnf.config -+# to exist, but it is created in a %post script in crypto-policies -+# https://bugzilla.redhat.com/show_bug.cgi?id=1977214#c13 -+if ! test -r /etc/crypto-policies/back-ends/opensslcnf.config && -+ test -f /usr/share/crypto-policies/DEFAULT/opensslcnf.txt; then -+ ln -s /usr/share/crypto-policies/DEFAULT/opensslcnf.txt /etc/crypto-policies/back-ends/opensslcnf.config -+fi -+ - # devtmpfs is required since udev 176 - mount -t devtmpfs /dev /dev - mkdir -p /dev/pts --- -2.31.1 - diff --git a/libguestfs.spec b/libguestfs.spec index f0056cd..ceb067b 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -1,3 +1,4 @@ +%undefine _package_note_flags # Architectures on which golang works. #% global golang_arches aarch64 % {arm} % {ix86} x86_64 # In theory the above, in practice golang is so often broken that @@ -10,18 +11,8 @@ # we only do a sanity check that kernel/qemu/libvirt/appliance is not # broken. To perform the full test suite, see instructions here: # https://www.redhat.com/archives/libguestfs/2015-September/msg00078.html -# -# Currently the basic sanity check is *broken* on: -# -# arm: cannot see virtio devices (similar to RHBZ#2006709 ?) -# aarch64: "MSI is not supported by interrupt controller" (RHBZ#1414081) -# ppc64: qemu doesn't work with TCG (RHBZ#1614948) -# ppc64le: kernel doesn't boot on qemu (RHBZ#1435873) -# s390x: qemu TCG cannot emulate enough to boot the kernel -# (however KVM would work if it was available in Koji, so this -# is not a bug) %if !0%{?rhel} -%global test_arches x86_64 +%global test_arches aarch64 %{power64} s390x x86_64 %else # RHEL 9 only: # x86-64: "/lib64/libc.so.6: CPU ISA level is lower than required" @@ -45,7 +36,7 @@ %endif # The source directory. -%global source_directory 1.46-stable +%global source_directory 1.48-stable # Filter perl provides. %{?perl_default_filter} @@ -56,7 +47,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.46.2 +Version: 1.48.0 Release: 1%{?dist} License: LGPLv2+ @@ -91,16 +82,6 @@ Source7: libguestfs.keyring # Maintainer script which helps with handling patches. Source8: copy-patches.sh -# Downstream (RHEL-only) patches. -%if 0%{?rhel} -Patch9001: 0001-RHEL-Remove-libguestfs-live-RHBZ-798980.patch -Patch9002: 0002-RHEL-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch -Patch9003: 0003-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch -Patch9004: 0004-RHEL-Remove-User-Mode-Linux-RHBZ-1144197.patch -Patch9005: 0005-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch -Patch9006: 0006-RHEL-Create-etc-crypto-policies-back-ends-opensslcnf.patch -%endif - %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool, gettext-devel %endif @@ -332,8 +313,11 @@ Requires: yajl%{?_isa} # For core mount-local (FUSE) API. Requires: fuse -# For core disk-create API. +# For core APIs: Requires: /usr/bin/qemu-img +Requires: coreutils +Requires: grep +Requires: tar # For qemu direct and libvirt backends. Requires: qemu-kvm-core @@ -349,7 +333,7 @@ Suggests: qemu-block-ssh Recommends: libvirt-daemon-config-network Requires: libvirt-daemon-driver-qemu >= 7.1.0 Requires: libvirt-daemon-driver-secret -Recommends: libvirt-daemon-driver-storage-core +Requires: libvirt-daemon-driver-storage-core Requires: selinux-policy >= 3.11.1-63 %ifarch aarch64 @@ -938,7 +922,7 @@ rm ocaml/html/.gitignore %{_mandir}/man1/guestfs-performance.1* %{_mandir}/man1/guestfs-recipes.1* %{_mandir}/man1/guestfs-release-notes-1*.1* -%{_mandir}/man1/guestfs-release-notes-historical.1* +%{_mandir}/man1/guestfs-release-notes.1* %{_mandir}/man1/guestfs-security.1* %{_mandir}/man1/guestmount.1* %{_mandir}/man1/guestunmount.1* @@ -1139,6 +1123,10 @@ rm ocaml/html/.gitignore %changelog +* Mon Mar 14 2022 Richard W.M. Jones - 1:1.48.0-1 +- New upstream stable branch version 1.48.0 +- Remove the RHEL (downstream) patches as they are out of date. + * Fri Dec 24 2021 Richard W.M. Jones - 1:1.46.2-1 - New upstream stable branch version 1.46.2 diff --git a/sources b/sources index 2438fc6..3fe554a 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.46.2.tar.gz) = 6a7a77c72dc3120e40d6719e1d652d8d803df44355e1f1c22e7d787d051f4922b8a80be7a9f4a389f6c078c22f2c8349607695f67fa642c08c38aad6bf3416bc -SHA512 (libguestfs-1.46.2.tar.gz.sig) = 30a335aee7fb024a8f9a28d5995ef42f64a895338f2ac0ece917c3bbdf79b20c11ce582e9341e31bbed6a9db11c082d3de4a1b8ada742efa87467d9a2223c350 +SHA512 (libguestfs-1.48.0.tar.gz) = b2486f32a3958c2b3e68d3f547dcd192dc7f8c59e0efd8660cd27cae9c218ce4fc2a60480dcb6bb0d10d8abbc2d2f4796075aea1cfab5e3c7cd12c38d4352fe2 +SHA512 (libguestfs-1.48.0.tar.gz.sig) = d884d4b5cdd5470978a56c8e31843847567221693711f4e35415c4ca992ad92d872be531641d945314556da65a7573d8cec5748d571ba4204c4bab81ee39bb1e From eba9481e796aed22df19555c7afedc89e00de1ae Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 14 Apr 2022 17:04:34 +0100 Subject: [PATCH 08/11] New upstream stable branch version 1.48.1 (cherry picked from commit 51cdb68f0925969b3c667c9677b1eb65e5ebf67a) --- libguestfs.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index ceb067b..e7a73cb 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -47,7 +47,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.48.0 +Version: 1.48.1 Release: 1%{?dist} License: LGPLv2+ @@ -1123,6 +1123,9 @@ rm ocaml/html/.gitignore %changelog +* Thu Apr 14 2022 Richard W.M. Jones - 1:1.48.1-1 +- New upstream stable branch version 1.48.1 + * Mon Mar 14 2022 Richard W.M. Jones - 1:1.48.0-1 - New upstream stable branch version 1.48.0 - Remove the RHEL (downstream) patches as they are out of date. diff --git a/sources b/sources index 3fe554a..6f7bd92 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.48.0.tar.gz) = b2486f32a3958c2b3e68d3f547dcd192dc7f8c59e0efd8660cd27cae9c218ce4fc2a60480dcb6bb0d10d8abbc2d2f4796075aea1cfab5e3c7cd12c38d4352fe2 -SHA512 (libguestfs-1.48.0.tar.gz.sig) = d884d4b5cdd5470978a56c8e31843847567221693711f4e35415c4ca992ad92d872be531641d945314556da65a7573d8cec5748d571ba4204c4bab81ee39bb1e +SHA512 (libguestfs-1.48.1.tar.gz) = 34cad3cb9ebfe2d6294fda8eede873470d75aad2eadc5b245556122a3e09b5d51fc012c0144997b66070feb97fe9613f0f9328a973c30839dae74f446a4a4b3c +SHA512 (libguestfs-1.48.1.tar.gz.sig) = 2addd2767237cc5e00031b68d50d50e0ac6f1da570aefd6e2bba76e919d10f3648802b113bfe99efe9e8c336e96bf6e6e179731d686b09cb5f4bf29f4790ffc0 From eeb964091aaf553d0df372abebd5b94e8fe8a2a3 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 12 May 2022 15:30:33 +0100 Subject: [PATCH 09/11] New upstream stable branch version 1.48.2 (cherry picked from commit 62097e0f8be816fd1149c6e150749c8f122ddeed) --- libguestfs.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index e7a73cb..63eee59 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -47,7 +47,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.48.1 +Version: 1.48.2 Release: 1%{?dist} License: LGPLv2+ @@ -1123,6 +1123,9 @@ rm ocaml/html/.gitignore %changelog +* Thu May 12 2022 Richard W.M. Jones - 1:1.48.2-1 +- New upstream stable branch version 1.48.2 + * Thu Apr 14 2022 Richard W.M. Jones - 1:1.48.1-1 - New upstream stable branch version 1.48.1 diff --git a/sources b/sources index 6f7bd92..c7103a7 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.48.1.tar.gz) = 34cad3cb9ebfe2d6294fda8eede873470d75aad2eadc5b245556122a3e09b5d51fc012c0144997b66070feb97fe9613f0f9328a973c30839dae74f446a4a4b3c -SHA512 (libguestfs-1.48.1.tar.gz.sig) = 2addd2767237cc5e00031b68d50d50e0ac6f1da570aefd6e2bba76e919d10f3648802b113bfe99efe9e8c336e96bf6e6e179731d686b09cb5f4bf29f4790ffc0 +SHA512 (libguestfs-1.48.2.tar.gz) = 3cbec961fbed3bfdb2ba6ab240756ffd61fed76be1e754b0286a87e298ba95dae6d7435aa5f5cff84dd2f42aa7576a2f197df83f987f0e44ed4d268f76be5e19 +SHA512 (libguestfs-1.48.2.tar.gz.sig) = 1554d1a911c06fb59cea2e56b845272d1e33056e36b74f9e6507d5cff433340ba3e90b8957dbd706f0f2ea32e45d1dc11f394212a314c5b954677faa66c4c8de From 70a777d8a2d2b451eccaf6f76e6d982bd58b2879 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 21 May 2022 11:13:29 +0100 Subject: [PATCH 10/11] Add upstream patch which helps debugging appliance generation. (cherry picked from commit 4c4ca3eda2970e9284c792ca8144220bd26a81df) (cherry picked from commit f3ee3b7d21cb7006671a15605974556330275ed6) --- ...Print-guestfsd.deps-after-generation.patch | 27 +++++++++++++++++++ libguestfs.spec | 10 +++++-- 2 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 0001-appliance-Print-guestfsd.deps-after-generation.patch diff --git a/0001-appliance-Print-guestfsd.deps-after-generation.patch b/0001-appliance-Print-guestfsd.deps-after-generation.patch new file mode 100644 index 0000000..619db45 --- /dev/null +++ b/0001-appliance-Print-guestfsd.deps-after-generation.patch @@ -0,0 +1,27 @@ +From b5260d8cd62f93b1cc4faf285bc3b6d8e0168e3b Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Sat, 21 May 2022 11:10:29 +0100 +Subject: [PATCH] appliance: Print guestfsd.deps after generation + +Sometimes generating this file fails. To help with debugging these +situatons, print the guestfsd.deps file after it has been generated. +--- + appliance/Makefile.am | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/appliance/Makefile.am b/appliance/Makefile.am +index 6dd1df75a6..9a0ba98a06 100644 +--- a/appliance/Makefile.am ++++ b/appliance/Makefile.am +@@ -101,6 +101,8 @@ guestfsd.deps: ../daemon/guestfsd + sort -u > $@.t + rm -f ld.so.cache.txt + mv $@.t $@ ++ @echo "guestfsd.deps:" ++ @cat $@ + + packagelist: packagelist.in Makefile guestfsd.deps + m4 $(PACKAGELIST_CPP_FLAGS) $< | \ +-- +2.35.1 + diff --git a/libguestfs.spec b/libguestfs.spec index 63eee59..e9ca5d9 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -29,7 +29,7 @@ # If there are patches which touch autotools files, set this to 1. %if !0%{?rhel} -%global patches_touch_autotools %{nil} +%global patches_touch_autotools 1 %else # On RHEL the downstream patches always touch autotools files. %global patches_touch_autotools 1 @@ -48,7 +48,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.48.2 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -82,6 +82,9 @@ Source7: libguestfs.keyring # Maintainer script which helps with handling patches. Source8: copy-patches.sh +# Upstream patch which helps debugging appliance generation. +Patch1: 0001-appliance-Print-guestfsd.deps-after-generation.patch + %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool, gettext-devel %endif @@ -1123,6 +1126,9 @@ rm ocaml/html/.gitignore %changelog +* Sat May 21 2022 Richard W.M. Jones - 1:1.48.2-2 +- Add upstream patch which helps debugging appliance generation. + * Thu May 12 2022 Richard W.M. Jones - 1:1.48.2-1 - New upstream stable branch version 1.48.2 From 03196d1dc7c3f70fe213f0ccc0cf46d7b468677b Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 26 May 2022 12:40:16 +0100 Subject: [PATCH 11/11] New upstream stable branch version 1.48.3 (cherry picked from commit 37ee41668a7692859f83d4d99a0d457f943cc1ef) --- ...Print-guestfsd.deps-after-generation.patch | 27 ------------------- libguestfs.spec | 12 ++++----- sources | 4 +-- 3 files changed, 8 insertions(+), 35 deletions(-) delete mode 100644 0001-appliance-Print-guestfsd.deps-after-generation.patch diff --git a/0001-appliance-Print-guestfsd.deps-after-generation.patch b/0001-appliance-Print-guestfsd.deps-after-generation.patch deleted file mode 100644 index 619db45..0000000 --- a/0001-appliance-Print-guestfsd.deps-after-generation.patch +++ /dev/null @@ -1,27 +0,0 @@ -From b5260d8cd62f93b1cc4faf285bc3b6d8e0168e3b Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Sat, 21 May 2022 11:10:29 +0100 -Subject: [PATCH] appliance: Print guestfsd.deps after generation - -Sometimes generating this file fails. To help with debugging these -situatons, print the guestfsd.deps file after it has been generated. ---- - appliance/Makefile.am | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/appliance/Makefile.am b/appliance/Makefile.am -index 6dd1df75a6..9a0ba98a06 100644 ---- a/appliance/Makefile.am -+++ b/appliance/Makefile.am -@@ -101,6 +101,8 @@ guestfsd.deps: ../daemon/guestfsd - sort -u > $@.t - rm -f ld.so.cache.txt - mv $@.t $@ -+ @echo "guestfsd.deps:" -+ @cat $@ - - packagelist: packagelist.in Makefile guestfsd.deps - m4 $(PACKAGELIST_CPP_FLAGS) $< | \ --- -2.35.1 - diff --git a/libguestfs.spec b/libguestfs.spec index e9ca5d9..ba2c6a3 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -29,7 +29,7 @@ # If there are patches which touch autotools files, set this to 1. %if !0%{?rhel} -%global patches_touch_autotools 1 +%global patches_touch_autotools %{nil} %else # On RHEL the downstream patches always touch autotools files. %global patches_touch_autotools 1 @@ -47,8 +47,8 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.48.2 -Release: 2%{?dist} +Version: 1.48.3 +Release: 1%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -82,9 +82,6 @@ Source7: libguestfs.keyring # Maintainer script which helps with handling patches. Source8: copy-patches.sh -# Upstream patch which helps debugging appliance generation. -Patch1: 0001-appliance-Print-guestfsd.deps-after-generation.patch - %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool, gettext-devel %endif @@ -1126,6 +1123,9 @@ rm ocaml/html/.gitignore %changelog +* Thu May 26 2022 Richard W.M. Jones - 1:1.48.3-1 +- New upstream stable branch version 1.48.3 + * Sat May 21 2022 Richard W.M. Jones - 1:1.48.2-2 - Add upstream patch which helps debugging appliance generation. diff --git a/sources b/sources index c7103a7..4ddd628 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.48.2.tar.gz) = 3cbec961fbed3bfdb2ba6ab240756ffd61fed76be1e754b0286a87e298ba95dae6d7435aa5f5cff84dd2f42aa7576a2f197df83f987f0e44ed4d268f76be5e19 -SHA512 (libguestfs-1.48.2.tar.gz.sig) = 1554d1a911c06fb59cea2e56b845272d1e33056e36b74f9e6507d5cff433340ba3e90b8957dbd706f0f2ea32e45d1dc11f394212a314c5b954677faa66c4c8de +SHA512 (libguestfs-1.48.3.tar.gz) = d88b7869e6098af1f7748dc2e8163b245ea251fcdf962a71e3735f5a1748c9e87a17be259802da3e0bb13569d7f7233b2c5a554b20a2a7758e1974a30a70b786 +SHA512 (libguestfs-1.48.3.tar.gz.sig) = f372cddfb661727c7e33505b9f038828e8341a229098c089b0b9f2167fc6308045e402cbfea653dfc0bd5343e2c9f9e2757af7923515615ac38430c132620de7