From d0e7044cbcaa9a93a246e1ddbe0e8ba5ce42009d Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 22 Sep 2018 13:22:24 +0100 Subject: [PATCH 1/9] New upstream version 1.39.11. --- libguestfs.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 2c00192..b4c47cb 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -39,7 +39,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.39.8 +Version: 1.39.11 Release: 1%{?dist} License: LGPLv2+ @@ -1403,6 +1403,9 @@ install -m 0644 utils/boot-benchmark/boot-benchmark.1 $RPM_BUILD_ROOT%{_mandir}/ %changelog +* Sat Sep 22 2018 Richard W.M. Jones - 1:1.39.11-1 +- New upstream version 1.39.11. + * Fri Jul 27 2018 Richard W.M. Jones - 1:1.39.8-1 - New upstream version 1.39.8. diff --git a/sources b/sources index b4ec43e..f4b421e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libguestfs-1.39.8.tar.gz) = b3cdcac0dcc6ab1e8d2c2057d34c2045b830bd9d9ad9925d65f238abae28a6b2f90bd70003ed4619ef140317d6f18ad404e89565a3bf1346a82ab2bca2bd5827 +SHA512 (libguestfs-1.39.11.tar.gz) = 0276d442c66f0c4b4e3f6f5c6a7b70295b77c9420f0058479846c163ec001b565be0c00558b8600950029350dc399b4f0e3d7f2ab634ad665617f9664bfe1af7 From 77b2298fc929bf2a87a5d4cc387a57f3544326ac Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 12 Oct 2018 13:59:42 +0100 Subject: [PATCH 2/9] lib: Add Recommends for libvirt-daemon-config-network so that networking works out of the box. (cherry picked from commit 3c0504323ef572cfe0b6d8158d4c61c9e49ce7f7) --- libguestfs.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index b4c47cb..c68fece 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -40,7 +40,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.39.11 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ # Source and patches. @@ -214,6 +214,7 @@ Requires: libvirt-daemon-kvm >= 0.10.2-3 %else Requires: libvirt-daemon-qemu >= 0.10.2-3 %endif +Recommends: libvirt-daemon-config-network Requires: selinux-policy >= 3.11.1-63 # For UML backend (this backend only works on x86). @@ -1403,6 +1404,10 @@ install -m 0644 utils/boot-benchmark/boot-benchmark.1 $RPM_BUILD_ROOT%{_mandir}/ %changelog +* Fri Oct 12 2018 Richard W.M. Jones - 1:1.39.11-2 +- lib: Add Recommends for libvirt-daemon-config-network so that networking + works out of the box. + * Sat Sep 22 2018 Richard W.M. Jones - 1:1.39.11-1 - New upstream version 1.39.11. From 937b7cc56a3ec68f699353969f17930971888ff8 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 8 Jan 2019 13:40:44 +0000 Subject: [PATCH 3/9] Small fix for qemu behaviour (RHBZ#1664318). (cherry picked from commit 2404f718a08c82ecc697f64b7d539f2a44d210ee) --- ...-info-U-option-to-avoid-locking-erro.patch | 103 ++++++++++++++++++ libguestfs.spec | 6 + 2 files changed, 109 insertions(+) create mode 100644 0001-lib-Use-qemu-img-info-U-option-to-avoid-locking-erro.patch diff --git a/0001-lib-Use-qemu-img-info-U-option-to-avoid-locking-erro.patch b/0001-lib-Use-qemu-img-info-U-option-to-avoid-locking-erro.patch new file mode 100644 index 0000000..8628850 --- /dev/null +++ b/0001-lib-Use-qemu-img-info-U-option-to-avoid-locking-erro.patch @@ -0,0 +1,103 @@ +From f00f920ad3b15ab8e9e8f201c16e7628b6b7b109 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Wed, 12 Sep 2018 17:16:20 +0100 +Subject: [PATCH] lib: Use qemu-img info -U option to avoid locking error. + +https://bugs.launchpad.net/qemu/+bug/1740364 +--- + lib/guestfs-internal.h | 3 +++ + lib/handle.c | 2 ++ + lib/info.c | 39 +++++++++++++++++++++++++++++++++++++++ + 3 files changed, 44 insertions(+) + +diff --git a/lib/guestfs-internal.h b/lib/guestfs-internal.h +index 471244264..6c339ae81 100644 +--- a/lib/guestfs-internal.h ++++ b/lib/guestfs-internal.h +@@ -510,6 +510,9 @@ struct guestfs_h { + /* Cached features. */ + struct cached_feature *features; + size_t nr_features; ++ ++ /* Used by lib/info.c. -1 = not tested or error; else 0 or 1. */ ++ int qemu_img_supports_U_option; + }; + + /** +diff --git a/lib/handle.c b/lib/handle.c +index a47aaafab..297ff6d67 100644 +--- a/lib/handle.c ++++ b/lib/handle.c +@@ -101,6 +101,8 @@ guestfs_create_flags (unsigned flags, ...) + + g->memsize = DEFAULT_MEMSIZE; + ++ g->qemu_img_supports_U_option = -1; /* not tested, see lib/info.c */ ++ + /* Start with large serial numbers so they are easy to spot + * inside the protocol. + */ +diff --git a/lib/info.c b/lib/info.c +index 2eadc1c11..4dee7a26a 100644 +--- a/lib/info.c ++++ b/lib/info.c +@@ -57,6 +57,7 @@ cleanup_json_t_decref (void *ptr) + #endif + + static json_t *get_json_output (guestfs_h *g, const char *filename); ++static int qemu_img_supports_U_option (guestfs_h *g); + static void set_child_rlimits (struct command *); + + char * +@@ -149,6 +150,11 @@ get_json_output (guestfs_h *g, const char *filename) + + guestfs_int_cmd_add_arg (cmd, "qemu-img"); + guestfs_int_cmd_add_arg (cmd, "info"); ++ switch (qemu_img_supports_U_option (g)) { ++ case -1: return NULL; ++ case 0: break; ++ default: guestfs_int_cmd_add_arg (cmd, "-U"); ++ } + guestfs_int_cmd_add_arg (cmd, "--output"); + guestfs_int_cmd_add_arg (cmd, "json"); + if (filename[0] == '/') +@@ -218,3 +224,36 @@ set_child_rlimits (struct command *cmd) + guestfs_int_cmd_set_child_rlimit (cmd, RLIMIT_CPU, 10 /* seconds */); + #endif + } ++ ++/** ++ * Test if the qemu-img info command supports the C<-U> option to ++ * disable locking. The result is memoized in the handle. ++ * ++ * Note this option was added in qemu 2.11. We can remove this test ++ * when we can assume everyone is using qemu >= 2.11. ++ */ ++static int ++qemu_img_supports_U_option (guestfs_h *g) ++{ ++ if (g->qemu_img_supports_U_option >= 0) ++ return g->qemu_img_supports_U_option; ++ ++ CLEANUP_CMD_CLOSE struct command *cmd = guestfs_int_new_command (g); ++ int r; ++ ++ guestfs_int_cmd_add_string_unquoted (cmd, ++ "qemu-img --help | " ++ "grep -sqE -- '\\binfo\\b.*-U\\b'"); ++ r = guestfs_int_cmd_run (cmd); ++ if (r == -1) ++ return -1; ++ if (!WIFEXITED (r)) { ++ guestfs_int_external_command_failed (g, r, ++ "qemu-img info -U option test", ++ NULL); ++ return -1; ++ } ++ ++ g->qemu_img_supports_U_option = WEXITSTATUS (r) == 0; ++ return g->qemu_img_supports_U_option; ++} +-- +2.19.2 + diff --git a/libguestfs.spec b/libguestfs.spec index c68fece..287a6e9 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -50,6 +50,9 @@ Source0: http://libguestfs.org/download/1.38-stable/%{name}-%{version}.tar Source1: http://libguestfs.org/download/1.38-stable/%{name}-%{version}.tar.gz.sig %endif +# https://bugzilla.redhat.com/show_bug.cgi?id=1664318 +Patch1: 0001-lib-Use-qemu-img-info-U-option-to-avoid-locking-erro.patch + # Replacement README file for Fedora users. Source4: README-replacement.in @@ -1404,6 +1407,9 @@ install -m 0644 utils/boot-benchmark/boot-benchmark.1 $RPM_BUILD_ROOT%{_mandir}/ %changelog +* Tue Jan 08 2019 Richard W.M. Jones - 1:1.39.11-3 +- Small fix for qemu behaviour (RHBZ#1664318). + * Fri Oct 12 2018 Richard W.M. Jones - 1:1.39.11-2 - lib: Add Recommends for libvirt-daemon-config-network so that networking works out of the box. From 565ee872e63c4e2423ea25761e6026852ae0066d Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 8 Jan 2019 13:42:13 +0000 Subject: [PATCH 4/9] Forgot to update Release in previous commit. (cherry picked from commit 3f9aa057a9ce3d8cdc1ba0ce883a8e8514040f7b) --- libguestfs.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 287a6e9..3cc8bc2 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -40,7 +40,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.39.11 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPLv2+ # Source and patches. From 8f870aa765055f01b88b5f568ea18cabf6211974 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 17 Jan 2019 15:22:28 +0000 Subject: [PATCH 5/9] Remove patch which is now upstream. (cherry picked from commit 6f261cafbaa73b4d700ce6e7552d29e2c2ba2809) --- ...-info-U-option-to-avoid-locking-erro.patch | 103 ------------------ libguestfs.spec | 3 - 2 files changed, 106 deletions(-) delete mode 100644 0001-lib-Use-qemu-img-info-U-option-to-avoid-locking-erro.patch diff --git a/0001-lib-Use-qemu-img-info-U-option-to-avoid-locking-erro.patch b/0001-lib-Use-qemu-img-info-U-option-to-avoid-locking-erro.patch deleted file mode 100644 index 8628850..0000000 --- a/0001-lib-Use-qemu-img-info-U-option-to-avoid-locking-erro.patch +++ /dev/null @@ -1,103 +0,0 @@ -From f00f920ad3b15ab8e9e8f201c16e7628b6b7b109 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Wed, 12 Sep 2018 17:16:20 +0100 -Subject: [PATCH] lib: Use qemu-img info -U option to avoid locking error. - -https://bugs.launchpad.net/qemu/+bug/1740364 ---- - lib/guestfs-internal.h | 3 +++ - lib/handle.c | 2 ++ - lib/info.c | 39 +++++++++++++++++++++++++++++++++++++++ - 3 files changed, 44 insertions(+) - -diff --git a/lib/guestfs-internal.h b/lib/guestfs-internal.h -index 471244264..6c339ae81 100644 ---- a/lib/guestfs-internal.h -+++ b/lib/guestfs-internal.h -@@ -510,6 +510,9 @@ struct guestfs_h { - /* Cached features. */ - struct cached_feature *features; - size_t nr_features; -+ -+ /* Used by lib/info.c. -1 = not tested or error; else 0 or 1. */ -+ int qemu_img_supports_U_option; - }; - - /** -diff --git a/lib/handle.c b/lib/handle.c -index a47aaafab..297ff6d67 100644 ---- a/lib/handle.c -+++ b/lib/handle.c -@@ -101,6 +101,8 @@ guestfs_create_flags (unsigned flags, ...) - - g->memsize = DEFAULT_MEMSIZE; - -+ g->qemu_img_supports_U_option = -1; /* not tested, see lib/info.c */ -+ - /* Start with large serial numbers so they are easy to spot - * inside the protocol. - */ -diff --git a/lib/info.c b/lib/info.c -index 2eadc1c11..4dee7a26a 100644 ---- a/lib/info.c -+++ b/lib/info.c -@@ -57,6 +57,7 @@ cleanup_json_t_decref (void *ptr) - #endif - - static json_t *get_json_output (guestfs_h *g, const char *filename); -+static int qemu_img_supports_U_option (guestfs_h *g); - static void set_child_rlimits (struct command *); - - char * -@@ -149,6 +150,11 @@ get_json_output (guestfs_h *g, const char *filename) - - guestfs_int_cmd_add_arg (cmd, "qemu-img"); - guestfs_int_cmd_add_arg (cmd, "info"); -+ switch (qemu_img_supports_U_option (g)) { -+ case -1: return NULL; -+ case 0: break; -+ default: guestfs_int_cmd_add_arg (cmd, "-U"); -+ } - guestfs_int_cmd_add_arg (cmd, "--output"); - guestfs_int_cmd_add_arg (cmd, "json"); - if (filename[0] == '/') -@@ -218,3 +224,36 @@ set_child_rlimits (struct command *cmd) - guestfs_int_cmd_set_child_rlimit (cmd, RLIMIT_CPU, 10 /* seconds */); - #endif - } -+ -+/** -+ * Test if the qemu-img info command supports the C<-U> option to -+ * disable locking. The result is memoized in the handle. -+ * -+ * Note this option was added in qemu 2.11. We can remove this test -+ * when we can assume everyone is using qemu >= 2.11. -+ */ -+static int -+qemu_img_supports_U_option (guestfs_h *g) -+{ -+ if (g->qemu_img_supports_U_option >= 0) -+ return g->qemu_img_supports_U_option; -+ -+ CLEANUP_CMD_CLOSE struct command *cmd = guestfs_int_new_command (g); -+ int r; -+ -+ guestfs_int_cmd_add_string_unquoted (cmd, -+ "qemu-img --help | " -+ "grep -sqE -- '\\binfo\\b.*-U\\b'"); -+ r = guestfs_int_cmd_run (cmd); -+ if (r == -1) -+ return -1; -+ if (!WIFEXITED (r)) { -+ guestfs_int_external_command_failed (g, r, -+ "qemu-img info -U option test", -+ NULL); -+ return -1; -+ } -+ -+ g->qemu_img_supports_U_option = WEXITSTATUS (r) == 0; -+ return g->qemu_img_supports_U_option; -+} --- -2.19.2 - diff --git a/libguestfs.spec b/libguestfs.spec index 3cc8bc2..18fd029 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -50,9 +50,6 @@ Source0: http://libguestfs.org/download/1.38-stable/%{name}-%{version}.tar Source1: http://libguestfs.org/download/1.38-stable/%{name}-%{version}.tar.gz.sig %endif -# https://bugzilla.redhat.com/show_bug.cgi?id=1664318 -Patch1: 0001-lib-Use-qemu-img-info-U-option-to-avoid-locking-erro.patch - # Replacement README file for Fedora users. Source4: README-replacement.in From de78e0f74f6ebe9ad650b872ca33f4a8b07ecf6a Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 17 Jan 2019 15:25:59 +0000 Subject: [PATCH 6/9] New upstream version 1.40.1. --- libguestfs.spec | 7 +++++-- sources | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 18fd029..fb8fb4f 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -39,8 +39,8 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.39.11 -Release: 3%{?dist} +Version: 1.40.1 +Release: 1%{?dist} License: LGPLv2+ # Source and patches. @@ -1404,6 +1404,9 @@ install -m 0644 utils/boot-benchmark/boot-benchmark.1 $RPM_BUILD_ROOT%{_mandir}/ %changelog +* Thu Jan 17 2019 Richard W.M. Jones - 1:1.40.1-1 +- New upstream version 1.40.1. + * Tue Jan 08 2019 Richard W.M. Jones - 1:1.39.11-3 - Small fix for qemu behaviour (RHBZ#1664318). diff --git a/sources b/sources index f4b421e..9c4f7ce 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ -SHA512 (libguestfs-1.39.11.tar.gz) = 0276d442c66f0c4b4e3f6f5c6a7b70295b77c9420f0058479846c163ec001b565be0c00558b8600950029350dc399b4f0e3d7f2ab634ad665617f9664bfe1af7 +SHA512 (libguestfs-1.40.1.tar.gz) = 6c1701a1484d6471f0fcbc5c8778dab6dac2f834d5f6f7467132be2d71667f36e741df0da2a71c65cb6c5d04d12aaccc3c062d90e8dff0c07eed9cdf0f207b4a +SHA512 (libguestfs-1.40.1.tar.gz.sig) = 9c846bfdf93dc56514436e7a2c8fbf3da22ab304efffbf668a2c0d3e7b71ebec3b71a5d39474150705b8d3eff1001370cb60c82d0992433ebc5435b999013801 From b0374a28d9ca59ef44da619b0a2732b1869b8cae Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 17 Jan 2019 15:41:15 +0000 Subject: [PATCH 7/9] - Add new virt-v2v man pages. (cherry picked from commit 955f13fda695c9dda63933294be20f0b097dd1e1) --- libguestfs.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libguestfs.spec b/libguestfs.spec index fb8fb4f..fb788e6 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -1252,6 +1252,12 @@ install -m 0644 utils/boot-benchmark/boot-benchmark.1 $RPM_BUILD_ROOT%{_mandir}/ %{_bindir}/virt-v2v-copy-to-local %{_mandir}/man1/virt-v2v.1* %{_mandir}/man1/virt-v2v-copy-to-local.1* +%{_mandir}/man1/virt-v2v-input-vmware.1* +%{_mandir}/man1/virt-v2v-input-xen.1* +%{_mandir}/man1/virt-v2v-output-local.1* +%{_mandir}/man1/virt-v2v-output-openstack.1* +%{_mandir}/man1/virt-v2v-output-rhv.1* +%{_mandir}/man1/virt-v2v-support.1* %{_mandir}/man1/virt-v2v-test-harness.1* %{_datadir}/virt-tools @@ -1406,6 +1412,7 @@ install -m 0644 utils/boot-benchmark/boot-benchmark.1 $RPM_BUILD_ROOT%{_mandir}/ %changelog * Thu Jan 17 2019 Richard W.M. Jones - 1:1.40.1-1 - New upstream version 1.40.1. +- Add new virt-v2v man pages. * Tue Jan 08 2019 Richard W.M. Jones - 1:1.39.11-3 - Small fix for qemu behaviour (RHBZ#1664318). From 28e764c0bf9cbb04f06cd1f5c1230119f705caa2 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 17 Jan 2019 19:30:33 +0000 Subject: [PATCH 8/9] nbdkit Python3 plugin is called "python3" in Fedora, adjust configure line. (cherry picked from commit f17a33dea60952bff466b6c7ad24651c656952d0) --- libguestfs.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index fb788e6..61075e0 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -40,7 +40,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.40.1 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ # Source and patches. @@ -903,6 +903,7 @@ fi %{configure} \\\ --with-default-backend=libvirt \\\ --with-extra="fedora=%{fedora},release=%{release},libvirt" \\\ + --with-virt-v2v-nbdkit-python-plugin=python3 \\\ $extra %ifnarch %{golang_arches} %global localconfigure %{localconfigure} --disable-golang @@ -1410,6 +1411,9 @@ install -m 0644 utils/boot-benchmark/boot-benchmark.1 $RPM_BUILD_ROOT%{_mandir}/ %changelog +* Thu Jan 17 2019 Richard W.M. Jones - 1:1.40.1-2 +- nbdkit Python3 plugin is called "python3" in Fedora, adjust configure line. + * Thu Jan 17 2019 Richard W.M. Jones - 1:1.40.1-1 - New upstream version 1.40.1. - Add new virt-v2v man pages. From 803c7b802d2f12d2d0c7c77fa9268e2ad75f3adc Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 2 Sep 2019 21:12:56 +0100 Subject: [PATCH 9/9] New upstream version 1.40.2. --- libguestfs.spec | 7 +++++-- sources | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 61075e0..05bf4cb 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -39,8 +39,8 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.40.1 -Release: 2%{?dist} +Version: 1.40.2 +Release: 1%{?dist} License: LGPLv2+ # Source and patches. @@ -1411,6 +1411,9 @@ install -m 0644 utils/boot-benchmark/boot-benchmark.1 $RPM_BUILD_ROOT%{_mandir}/ %changelog +* Mon Sep 02 2019 Richard W.M. Jones - 1:1.40.2-1 +- New upstream version 1.40.2. + * Thu Jan 17 2019 Richard W.M. Jones - 1:1.40.1-2 - nbdkit Python3 plugin is called "python3" in Fedora, adjust configure line. diff --git a/sources b/sources index 9c4f7ce..2a8eaf5 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.40.1.tar.gz) = 6c1701a1484d6471f0fcbc5c8778dab6dac2f834d5f6f7467132be2d71667f36e741df0da2a71c65cb6c5d04d12aaccc3c062d90e8dff0c07eed9cdf0f207b4a -SHA512 (libguestfs-1.40.1.tar.gz.sig) = 9c846bfdf93dc56514436e7a2c8fbf3da22ab304efffbf668a2c0d3e7b71ebec3b71a5d39474150705b8d3eff1001370cb60c82d0992433ebc5435b999013801 +SHA512 (libguestfs-1.40.2.tar.gz) = d288f15d5a70b4b87a4271ea2eb7dc0ec4f48fdb136b8f62003352a069f75573de873e1063763889f410fb1b99951252e9a48dd73bf0233047f21aae43ac6de2 +SHA512 (libguestfs-1.40.2.tar.gz.sig) = 7e7db806c7051010367a82c89fb4ac6af2824c28f54cc7df561010ad6a87562fb3c2d4e3bfc14f7cc7308344b1dfb8532f88969ac59cfd17745717dc305c81b9