From 61eede1ba388bd4bb8165dd060ce9da62a513d0c Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 14 Sep 2021 12:32:48 +0100 Subject: [PATCH] Specify backing format for qemu 6.1 resolves: rhbz#1999419 --- ...backing-format-for-qemu-img-create-b.patch | 49 +++++++++++++++++++ ...L-Remove-libguestfs-live-RHBZ-798980.patch | 2 +- ...Remove-9p-APIs-from-RHEL-RHBZ-921710.patch | 2 +- ...upported-remote-drive-protocols-RHBZ.patch | 2 +- ...-Remove-User-Mode-Linux-RHBZ-1144197.patch | 2 +- ...of-libguestfs-winsupport-features-ex.patch | 2 +- ...crypto-policies-back-ends-opensslcnf.patch | 2 +- libguestfs.spec | 19 ++++--- 8 files changed, 67 insertions(+), 13 deletions(-) create mode 100644 0005-lib-Autodetect-backing-format-for-qemu-img-create-b.patch rename 0005-RHEL-Remove-libguestfs-live-RHBZ-798980.patch => 0006-RHEL-Remove-libguestfs-live-RHBZ-798980.patch (95%) rename 0006-RHEL-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch => 0007-RHEL-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch (99%) rename 0007-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch => 0008-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch (99%) rename 0008-RHEL-Remove-User-Mode-Linux-RHBZ-1144197.patch => 0009-RHEL-Remove-User-Mode-Linux-RHBZ-1144197.patch (96%) rename 0009-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch => 0010-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch (97%) rename 0010-RHEL-Create-etc-crypto-policies-back-ends-opensslcnf.patch => 0011-RHEL-Create-etc-crypto-policies-back-ends-opensslcnf.patch (94%) diff --git a/0005-lib-Autodetect-backing-format-for-qemu-img-create-b.patch b/0005-lib-Autodetect-backing-format-for-qemu-img-create-b.patch new file mode 100644 index 0000000..fbff694 --- /dev/null +++ b/0005-lib-Autodetect-backing-format-for-qemu-img-create-b.patch @@ -0,0 +1,49 @@ +From 6be87872732ca8e298152a9eeebde151fe2bd4a2 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 31 Aug 2021 08:27:15 +0100 +Subject: [PATCH] lib: Autodetect backing format for qemu-img create -b + +qemu 6.1 has decided to change qemu-img create so that a backing +format (-F) is required if a backing file (-b) is specified. Since we +don't want to change the libguestfs API to force callers to specify +this because that would be an API break, autodetect it. + +This is similar to commit c8c181e8d9 ("launch: libvirt: Autodetect +backing format for readonly drive overlays"). + +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1998820 +(cherry picked from commit 45de287447bb18d59749fbfc1ec5072413090109) +--- + lib/create.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/lib/create.c b/lib/create.c +index 44a7df25f..75a4d3a28 100644 +--- a/lib/create.c ++++ b/lib/create.c +@@ -255,6 +255,7 @@ disk_create_qcow2 (guestfs_h *g, const char *filename, int64_t size, + const struct guestfs_disk_create_argv *optargs) + { + const char *backingformat = NULL; ++ CLEANUP_FREE char *backingformat_free = NULL; + const char *preallocation = NULL; + const char *compat = NULL; + int clustersize = -1; +@@ -270,6 +271,14 @@ disk_create_qcow2 (guestfs_h *g, const char *filename, int64_t size, + return -1; + } + } ++ else if (backingfile) { ++ /* Since qemu 6.1, qemu-img create has requires a backing format (-F) ++ * parameter if backing file (-b) is used (RHBZ#1998820). ++ */ ++ backingformat = backingformat_free = guestfs_disk_format (g, backingfile); ++ if (!backingformat) ++ return -1; ++ } + if (optargs->bitmask & GUESTFS_DISK_CREATE_PREALLOCATION_BITMASK) { + if (STREQ (optargs->preallocation, "off") || + STREQ (optargs->preallocation, "sparse")) +-- +2.31.1 + diff --git a/0005-RHEL-Remove-libguestfs-live-RHBZ-798980.patch b/0006-RHEL-Remove-libguestfs-live-RHBZ-798980.patch similarity index 95% rename from 0005-RHEL-Remove-libguestfs-live-RHBZ-798980.patch rename to 0006-RHEL-Remove-libguestfs-live-RHBZ-798980.patch index 4dd49c5..9c93374 100644 --- a/0005-RHEL-Remove-libguestfs-live-RHBZ-798980.patch +++ b/0006-RHEL-Remove-libguestfs-live-RHBZ-798980.patch @@ -1,4 +1,4 @@ -From 53efe7ddea016a3d27f39af3ea0445e0b1d234be Mon Sep 17 00:00:00 2001 +From 9dc4c156eef3ad0eb62aa50acbc4198fd1e335cc Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 21 Dec 2012 15:50:11 +0000 Subject: [PATCH] RHEL: Remove libguestfs live (RHBZ#798980). diff --git a/0006-RHEL-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch b/0007-RHEL-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch similarity index 99% rename from 0006-RHEL-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch rename to 0007-RHEL-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch index 2b9b7c8..8c644d3 100644 --- a/0006-RHEL-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch +++ b/0007-RHEL-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch @@ -1,4 +1,4 @@ -From 9594b98014ac1dfdfc652d41f4eba38e510c00fe Mon Sep 17 00:00:00 2001 +From 421f0716461427ec1deddaea3e51ba6ba7ccf71c Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 18 Jul 2013 18:31:53 +0100 Subject: [PATCH] RHEL: Remove 9p APIs from RHEL (RHBZ#921710). diff --git a/0007-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch b/0008-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch similarity index 99% rename from 0007-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch rename to 0008-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch index 824151f..78aba95 100644 --- a/0007-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch +++ b/0008-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch @@ -1,4 +1,4 @@ -From 3f8f68460ffadca3af181cb7c2b0495b85b53f82 Mon Sep 17 00:00:00 2001 +From b7007f7b1524c8f5d001eda10ebf040b0ae4ca43 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 29 Jul 2013 14:47:56 +0100 Subject: [PATCH] RHEL: Disable unsupported remote drive protocols diff --git a/0008-RHEL-Remove-User-Mode-Linux-RHBZ-1144197.patch b/0009-RHEL-Remove-User-Mode-Linux-RHBZ-1144197.patch similarity index 96% rename from 0008-RHEL-Remove-User-Mode-Linux-RHBZ-1144197.patch rename to 0009-RHEL-Remove-User-Mode-Linux-RHBZ-1144197.patch index b608b6d..eb27805 100644 --- a/0008-RHEL-Remove-User-Mode-Linux-RHBZ-1144197.patch +++ b/0009-RHEL-Remove-User-Mode-Linux-RHBZ-1144197.patch @@ -1,4 +1,4 @@ -From 0d0c34cba36156e0205cf7ad7d419c8be0ba99cf Mon Sep 17 00:00:00 2001 +From dbca97559bc6d44d91dafbf3b7435a0d909fb6fa Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 19 Sep 2014 13:38:20 +0100 Subject: [PATCH] RHEL: Remove User-Mode Linux (RHBZ#1144197). diff --git a/0009-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch b/0010-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch similarity index 97% rename from 0009-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch rename to 0010-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch index 8442731..7b1a024 100644 --- a/0009-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch +++ b/0010-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch @@ -1,4 +1,4 @@ -From 3508207fa46f45d5bdd0125f04790428e74aed48 Mon Sep 17 00:00:00 2001 +From b7dd5ace0488cfa0b9caa3ea673edb13324d806e 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/0010-RHEL-Create-etc-crypto-policies-back-ends-opensslcnf.patch b/0011-RHEL-Create-etc-crypto-policies-back-ends-opensslcnf.patch similarity index 94% rename from 0010-RHEL-Create-etc-crypto-policies-back-ends-opensslcnf.patch rename to 0011-RHEL-Create-etc-crypto-policies-back-ends-opensslcnf.patch index 17d10aa..57a6982 100644 --- a/0010-RHEL-Create-etc-crypto-policies-back-ends-opensslcnf.patch +++ b/0011-RHEL-Create-etc-crypto-policies-back-ends-opensslcnf.patch @@ -1,4 +1,4 @@ -From 6c98e1924ff73ee5c9361d0ff83d656ac8ee0e77 Mon Sep 17 00:00:00 2001 +From fa865ee05a6269c46b1cd2fe5311ac6663260e29 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 29 Jun 2021 15:29:11 +0100 Subject: [PATCH] RHEL: Create /etc/crypto-policies/back-ends/opensslcnf.config diff --git a/libguestfs.spec b/libguestfs.spec index 746eacd..89f3030 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.6 -Release: 13%{?dist} +Release: 14%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -99,15 +99,16 @@ Patch0001: 0001-build-Don-t-use-non-POSIX-tests.patch Patch0002: 0002-python-Don-t-leak-fields-when-creating-Python-struct.patch Patch0003: 0003-appliance-Add-IBM850-iconv-converter-for-syslinux.patch Patch0004: 0004-lib-direct-Remove-use-of-sga.patch +Patch0005: 0005-lib-Autodetect-backing-format-for-qemu-img-create-b.patch # Downstream (RHEL-only) patches. %if 0%{?rhel} -Patch0005: 0005-RHEL-Remove-libguestfs-live-RHBZ-798980.patch -Patch0006: 0006-RHEL-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch -Patch0007: 0007-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch -Patch0008: 0008-RHEL-Remove-User-Mode-Linux-RHBZ-1144197.patch -Patch0009: 0009-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch -Patch0010: 0010-RHEL-Create-etc-crypto-policies-back-ends-opensslcnf.patch +Patch0006: 0006-RHEL-Remove-libguestfs-live-RHBZ-798980.patch +Patch0007: 0007-RHEL-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch +Patch0008: 0008-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch +Patch0009: 0009-RHEL-Remove-User-Mode-Linux-RHBZ-1144197.patch +Patch0010: 0010-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch +Patch0011: 0011-RHEL-Create-etc-crypto-policies-back-ends-opensslcnf.patch %endif %if 0%{patches_touch_autotools} @@ -1147,6 +1148,10 @@ rm ocaml/html/.gitignore %changelog +* Tue Sep 14 2021 Richard W.M. Jones - 1:1.45.6-14 +- Specify backing format for qemu 6.1 + resolves: rhbz#1999419 + * Mon Sep 13 2021 Richard W.M. Jones - 1:1.45.6-13 - Remove use of sga resolves: rhbz#2002325