From 921cbcfab0c402af91715750c82919156ade16f1d6049577af8ff52baa45535f Mon Sep 17 00:00:00 2001 From: Charles Arnold Date: Tue, 14 Sep 2021 17:44:16 +0000 Subject: [PATCH] - Newer cpio versions must be told to extract over symlinks libguestfs.test.simple.create-opensuse-guest-crypt-on-lvm.sh libguestfs.test.simple.create-opensuse-guest.sh libguestfs.test.simple.create-sles12-guest-crypt-on-lvm.sh libguestfs.test.simple.create-sles12-guest.sh - Allow the use busybox dhcp client appliance.patch netconfig.patch - Update to version 1.44.2 makefile-ocaml-find-guestfs.patch * Port libguestfs to use pcre2 instead of pcre * inspection: More reliable detection of Linux split /usr configurations * python: Relicense setup.py to LGPLv2+ (originally GPLv2+) * lib: qemu: Don't use -enable-fips option. * rust: Fix deprecated use of panic!(format!(...)) * point users to Libera Chat rather than FreeNode * python: Don't leak fields when creating Python structs * appliance: Add IBM850 iconv converter for syslinux * launch: board model for RISC-V * lib: Add osinfo information for Windows Server 2022 Datacenter * lib: Autodetect backing format for qemu-img create -b * appliance: Fix searching for shared libraries on usr-merged Debian systems * appliance: Add mount package for Debian * m4/guestfs-appliance.m4: Add support for Alma and Cloud Linux * daemon/luks.c: Ignore bogus GCC -fanalyzer double-free warning * daemon/xattr.c: Increase size of temporary buffer for %zu * daemon/utils.c: Fix potential unbounded stack usage * Various other bug fixes - Upstream bug fixes post 1.44.2 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libguestfs?expand=0&rev=480 --- ...troduce-a-wrapper-around-xmlParseURI.patch | 48 ++++++++-------- 0004-python-include-dirs.patch | 11 ++++ ...aml-examples-Link-examples-to-gnulib.patch | 42 ++++++++++++++ ...sysprep-Link-explicitly-with-pthread.patch | 55 +++++++++++++++++++ appliance.patch | 12 ++++ e26cfa44-daemon-Build-with--pthread.patch | 26 +++++++++ libguestfs-1.44.1.tar.gz | 3 - libguestfs-1.44.2.tar.gz | 3 + libguestfs-1.44.2.tar.gz.sig | 17 ++++++ libguestfs.changes | 45 +++++++++++++++ libguestfs.spec | 12 +++- ...mple.create-opensuse-guest-crypt-on-lvm.sh | 2 +- ...estfs.test.simple.create-opensuse-guest.sh | 2 +- ...simple.create-sles12-guest-crypt-on-lvm.sh | 2 +- libguestfs.test.simple.create-sles12-guest.sh | 2 +- makefile-ocaml-find-guestfs.patch | 44 +++++++++++++++ netconfig.patch | 16 ++++-- 17 files changed, 305 insertions(+), 37 deletions(-) create mode 100644 0004-python-include-dirs.patch create mode 100644 489b14b7-ocaml-examples-Link-examples-to-gnulib.patch create mode 100644 68a02c2f-customize--resize--sparsify--sysprep-Link-explicitly-with-pthread.patch create mode 100644 e26cfa44-daemon-Build-with--pthread.patch delete mode 100644 libguestfs-1.44.1.tar.gz create mode 100644 libguestfs-1.44.2.tar.gz create mode 100644 libguestfs-1.44.2.tar.gz.sig create mode 100644 makefile-ocaml-find-guestfs.patch diff --git a/0001-Introduce-a-wrapper-around-xmlParseURI.patch b/0001-Introduce-a-wrapper-around-xmlParseURI.patch index a0c676f..d760b8b 100644 --- a/0001-Introduce-a-wrapper-around-xmlParseURI.patch +++ b/0001-Introduce-a-wrapper-around-xmlParseURI.patch @@ -37,10 +37,10 @@ libvirt URLs. create mode 100644 common/utils/libxml2-utils.c create mode 100644 common/utils/libxml2-utils.h -Index: libguestfs-1.43.2/common/mlxml/Makefile.am +Index: libguestfs-1.44.2/common/mlxml/Makefile.am =================================================================== ---- libguestfs-1.43.2.orig/common/mlxml/Makefile.am -+++ libguestfs-1.43.2/common/mlxml/Makefile.am +--- libguestfs-1.44.2.orig/common/mlxml/Makefile.am ++++ libguestfs-1.44.2/common/mlxml/Makefile.am @@ -54,6 +54,7 @@ libmlxml_a_CPPFLAGS = \ -I. \ -I$(top_builddir) \ @@ -49,10 +49,10 @@ Index: libguestfs-1.43.2/common/mlxml/Makefile.am -I$(shell $(OCAMLC) -where) libmlxml_a_CFLAGS = \ $(WARN_CFLAGS) $(WERROR_CFLAGS) \ -Index: libguestfs-1.43.2/common/mlxml/xml-c.c +Index: libguestfs-1.44.2/common/mlxml/xml-c.c =================================================================== ---- libguestfs-1.43.2.orig/common/mlxml/xml-c.c -+++ libguestfs-1.43.2/common/mlxml/xml-c.c +--- libguestfs-1.44.2.orig/common/mlxml/xml-c.c ++++ libguestfs-1.44.2/common/mlxml/xml-c.c @@ -27,17 +27,21 @@ #include #include @@ -133,19 +133,19 @@ Index: libguestfs-1.43.2/common/mlxml/xml-c.c + xmlFreeURI (uri); CAMLreturn (rv); } -Index: libguestfs-1.43.2/common/mlxml/xml.ml +Index: libguestfs-1.44.2/common/mlxml/xml.ml =================================================================== ---- libguestfs-1.43.2.orig/common/mlxml/xml.ml -+++ libguestfs-1.43.2/common/mlxml/xml.ml +--- libguestfs-1.44.2.orig/common/mlxml/xml.ml ++++ libguestfs-1.44.2/common/mlxml/xml.ml @@ -162,3 +162,4 @@ type uri = { } external parse_uri : string -> uri = "mllib_xml_parse_uri" +external parse_nonstandard_uri : string -> uri = "mllib_xml_parse_nonstandard_uri" -Index: libguestfs-1.43.2/common/mlxml/xml.mli +Index: libguestfs-1.44.2/common/mlxml/xml.mli =================================================================== ---- libguestfs-1.43.2.orig/common/mlxml/xml.mli -+++ libguestfs-1.43.2/common/mlxml/xml.mli +--- libguestfs-1.44.2.orig/common/mlxml/xml.mli ++++ libguestfs-1.44.2/common/mlxml/xml.mli @@ -115,3 +115,7 @@ val parse_uri : string -> uri Note this is different from the {!URI} module which is specialized for parsing the [-a] parameter on the command line. This function @@ -154,10 +154,10 @@ Index: libguestfs-1.43.2/common/mlxml/xml.mli +val parse_nonstandard_uri : string -> uri +(** Similar to {!parse_uri} but only for use with our non-standard + URIs. See [guestfs_int_parse_nonstandard_uri] in [common/utils]. *) -Index: libguestfs-1.43.2/common/options/uri.c +Index: libguestfs-1.44.2/common/options/uri.c =================================================================== ---- libguestfs-1.43.2.orig/common/options/uri.c -+++ libguestfs-1.43.2/common/options/uri.c +--- libguestfs-1.44.2.orig/common/options/uri.c ++++ libguestfs-1.44.2/common/options/uri.c @@ -38,6 +38,7 @@ #include "guestfs.h" @@ -178,13 +178,13 @@ Index: libguestfs-1.43.2/common/options/uri.c getprogname (), arg); return -1; } -Index: libguestfs-1.43.2/common/utils/Makefile.am +Index: libguestfs-1.44.2/common/utils/Makefile.am =================================================================== ---- libguestfs-1.43.2.orig/common/utils/Makefile.am -+++ libguestfs-1.43.2/common/utils/Makefile.am -@@ -28,12 +28,15 @@ libutils_la_SOURCES = \ - libxml2-cleanups.c \ +--- libguestfs-1.44.2.orig/common/utils/Makefile.am ++++ libguestfs-1.44.2/common/utils/Makefile.am +@@ -29,12 +29,15 @@ libutils_la_SOURCES = \ libxml2-writer-macros.h \ + pcre2-cleanups.c \ stringlists-utils.c \ + libxml2-utils.c \ + libxml2-utils.h \ @@ -199,10 +199,10 @@ Index: libguestfs-1.43.2/common/utils/Makefile.am libutils_la_CFLAGS = \ $(WARN_CFLAGS) $(WERROR_CFLAGS) \ $(GCC_VISIBILITY_HIDDEN) \ -Index: libguestfs-1.43.2/common/utils/libxml2-utils.c +Index: libguestfs-1.44.2/common/utils/libxml2-utils.c =================================================================== --- /dev/null -+++ libguestfs-1.43.2/common/utils/libxml2-utils.c ++++ libguestfs-1.44.2/common/utils/libxml2-utils.c @@ -0,0 +1,178 @@ +/* libguestfs + * Copyright (C) 2017 Red Hat Inc. @@ -382,10 +382,10 @@ Index: libguestfs-1.43.2/common/utils/libxml2-utils.c + + return out; +} -Index: libguestfs-1.43.2/common/utils/libxml2-utils.h +Index: libguestfs-1.44.2/common/utils/libxml2-utils.h =================================================================== --- /dev/null -+++ libguestfs-1.43.2/common/utils/libxml2-utils.h ++++ libguestfs-1.44.2/common/utils/libxml2-utils.h @@ -0,0 +1,27 @@ +/* libguestfs + * Copyright (C) 2017 Red Hat Inc. diff --git a/0004-python-include-dirs.patch b/0004-python-include-dirs.patch new file mode 100644 index 0000000..996f05b --- /dev/null +++ b/0004-python-include-dirs.patch @@ -0,0 +1,11 @@ +--- libguestfs-1.43.2/python/setup.py.in.orig 2020-10-07 11:50:58.255281701 -0600 ++++ libguestfs-1.43.2/python/setup.py.in 2020-10-07 11:51:19.023282602 -0600 +@@ -64,7 +64,7 @@ This package contains the Python binding + 'structs.c', + 'stringlists-utils.c'], + +- include_dirs=['.', '../lib'], ++ include_dirs=['.', '../lib', '../include'], + libraries=['guestfs'], + define_macros=[('GUESTFS_PRIVATE', '1')], + ) diff --git a/489b14b7-ocaml-examples-Link-examples-to-gnulib.patch b/489b14b7-ocaml-examples-Link-examples-to-gnulib.patch new file mode 100644 index 0000000..ef52a51 --- /dev/null +++ b/489b14b7-ocaml-examples-Link-examples-to-gnulib.patch @@ -0,0 +1,42 @@ +Subject: ocaml/examples: Link examples to gnulib +From: Richard W.M. Jones rjones@redhat.com Sat Sep 11 09:36:08 2021 +0100 +Date: Sat Sep 11 09:36:08 2021 +0100: +Git: 489b14b75e5f30010d8a8c8d3a10ecc52b629563 + +It's unclear why exactly the OCaml library is using replacement +symbols, but it is so we need gnulib. Note this only applies in the +stable-1.44 branch since upstream we have finally got rid of gnulib, +because of exactly these kinds of problems that it causes everyone. + +ocamlfind ocamlopt -cclib -L../../lib/.libs -package unix -linkpkg \ + -warn-error A -I .. mlguestfs.cmxa create_disk.ml -o create_disk +../libmlguestfs.a(libguestfsocaml_a-guestfs-c.o): In function `guestfs_finalize': +/home/rjones/d/libguestfs-1.44/ocaml/guestfs-c.c:86: undefined reference to `rpl_free' +/home/rjones/d/libguestfs-1.44/ocaml/guestfs-c.c:88: undefined reference to `rpl_free' +../libmlguestfs.a(libguestfsocaml_a-guestfs-c.o): In function `guestfs_int_ocaml_set_event_callback': +/home/rjones/d/libguestfs-1.44/ocaml/guestfs-c.c:239: undefined reference to `rpl_free' +../libmlguestfs.a(libguestfsocaml_a-guestfs-c.o): In function `guestfs_int_ocaml_delete_event_callback': +/home/rjones/d/libguestfs-1.44/ocaml/guestfs-c.c:266: undefined reference to `rpl_free' +../libmlguestfs.a(libguestfsocaml_a-guestfs-c.o): In function `guestfs_int_ocaml_event_to_string': +/home/rjones/d/libguestfs-1.44/ocaml/guestfs-c.c:290: undefined reference to `rpl_free' +../libmlguestfs.a(libguestfsocaml_a-guestfs-c-actions.o):/home/rjones/d/libguestfs-1.44/ocaml/guestfs-c-actions.c:1188: more undefined references to `rpl_free' follow +collect2: error: ld returned 1 exit status +File "caml_startup", line 1: +Error: Error during linking +make[2]: *** [Makefile:2272: create_disk] Error 2 + +diff --git a/ocaml/examples/Makefile.am b/ocaml/examples/Makefile.am +index 19cbebdf9..d8c3dd4c5 100644 +--- a/ocaml/examples/Makefile.am ++++ b/ocaml/examples/Makefile.am +@@ -48,7 +48,9 @@ if HAVE_OCAML + + noinst_SCRIPTS = create_disk debug_logging inspect_vm + +-OCAMLFINDFLAGS = -cclib -L$(top_builddir)/lib/.libs ++OCAMLFINDFLAGS = \ ++ -cclib -L$(top_builddir)/lib/.libs \ ++ -cclib -L$(top_builddir)/gnulib/lib/.libs -cclib -lgnu + + if HAVE_OCAMLOPT + create_disk: create_disk.ml diff --git a/68a02c2f-customize--resize--sparsify--sysprep-Link-explicitly-with-pthread.patch b/68a02c2f-customize--resize--sparsify--sysprep-Link-explicitly-with-pthread.patch new file mode 100644 index 0000000..75ed180 --- /dev/null +++ b/68a02c2f-customize--resize--sparsify--sysprep-Link-explicitly-with-pthread.patch @@ -0,0 +1,55 @@ +Subject: customize, resize, sparsify, sysprep: Link explicitly with pthread +From: Richard W.M. Jones rjones@redhat.com Thu Mar 4 11:57:44 2021 +0000 +Date: Sat Sep 11 09:42:12 2021 +0100: +Git: 68a02c2f6c7b4243ecb298c0d9539f0fc51a52ce + +Cherry picked from guestfs-tools commit 87543dad61. + +diff --git a/customize/Makefile.am b/customize/Makefile.am +index c926687b3..fb418d7bf 100644 +--- a/customize/Makefile.am ++++ b/customize/Makefile.am +@@ -169,6 +169,7 @@ OCAMLLINKFLAGS = \ + $(LINK_CUSTOM_OCAMLC_ONLY) + + OCAMLCLIBS = \ ++ -pthread -lpthread \ + -lutils \ + $(LIBTINFO_LIBS) \ + $(LIBCRYPT_LIBS) \ +diff --git a/resize/Makefile.am b/resize/Makefile.am +index fa88cc634..936d2b05e 100644 +--- a/resize/Makefile.am ++++ b/resize/Makefile.am +@@ -72,6 +72,7 @@ OCAMLPACKAGES += -package gettext-stub + endif + + OCAMLCLIBS = \ ++ -pthread -lpthread \ + -lprogress \ + -lutils \ + $(LIBTINFO_LIBS) \ +diff --git a/sparsify/Makefile.am b/sparsify/Makefile.am +index fa964e8af..4d1af85d6 100644 +--- a/sparsify/Makefile.am ++++ b/sparsify/Makefile.am +@@ -80,6 +80,7 @@ OCAMLPACKAGES += -package gettext-stub + endif + + OCAMLCLIBS = \ ++ -pthread -lpthread \ + -lprogress \ + -lutils \ + $(LIBTINFO_LIBS) \ +diff --git a/sysprep/Makefile.am b/sysprep/Makefile.am +index 69bb92820..250c74913 100644 +--- a/sysprep/Makefile.am ++++ b/sysprep/Makefile.am +@@ -129,6 +129,7 @@ OCAMLPACKAGES += -package gettext-stub + endif + + OCAMLCLIBS = \ ++ -pthread -lpthread \ + -lvisit \ + -lstructs \ + -lutils \ diff --git a/appliance.patch b/appliance.patch index 571b9ed..fc29438 100644 --- a/appliance.patch +++ b/appliance.patch @@ -2,6 +2,18 @@ Index: libguestfs-1.42.0/appliance/init =================================================================== --- libguestfs-1.42.0.orig/appliance/init +++ libguestfs-1.42.0/appliance/init +@@ -127,8 +127,10 @@ if test "$guestfs_network" = 1; then + rm -f /etc/dhcp/dhclient-enter-hooks.d/resolved + if dhclient --version >/dev/null 2>&1; then + dhclient $iface +- else ++ elif dhcpcd --version ; then + dhcpcd $iface ++ elif busybox udhcpc --help ; then ++ busybox udhcpc --quit -v + fi + fi + @@ -245,7 +245,8 @@ else echo "Note: The contents of / (root) are the rescue appliance." if ! test -d "/sysroot/dev"; then diff --git a/e26cfa44-daemon-Build-with--pthread.patch b/e26cfa44-daemon-Build-with--pthread.patch new file mode 100644 index 0000000..f99cd89 --- /dev/null +++ b/e26cfa44-daemon-Build-with--pthread.patch @@ -0,0 +1,26 @@ +Subject: daemon: Build with -pthread +From: Richard W.M. Jones rjones@redhat.com Sat Sep 11 09:27:17 2021 +0100 +Date: Sat Sep 11 09:27:17 2021 +0100: +Git: e26cfa445a1947503a03c55d8d65263530747062 + +The daemon failed to link with glibc < 2.34 because we didn't include +the separate pthread library. Adding -pthread fixes this. + +Note this change was also make upstream in commit 733d2182b6 ("Remove +the tools.") although I think either by accident or unrelated. + +Reported-by: Toolybird +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2003326 + +diff --git a/daemon/Makefile.am b/daemon/Makefile.am +index 86aa920e8..b670bb1e2 100644 +--- a/daemon/Makefile.am ++++ b/daemon/Makefile.am +@@ -255,6 +255,7 @@ guestfsd_CPPFLAGS = \ + -I$(top_srcdir)/common/utils \ + -I$(top_builddir)/common/utils + guestfsd_CFLAGS = \ ++ -pthread \ + $(WARN_CFLAGS) $(WERROR_CFLAGS) \ + $(RPC_CFLAGS) \ + $(AUGEAS_CFLAGS) \ diff --git a/libguestfs-1.44.1.tar.gz b/libguestfs-1.44.1.tar.gz deleted file mode 100644 index ceeb860..0000000 --- a/libguestfs-1.44.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:72b7dcdd32da1c17c932cf5a0a70b3bd68bc93e94828ad66a539f2e616adb025 -size 23798268 diff --git a/libguestfs-1.44.2.tar.gz b/libguestfs-1.44.2.tar.gz new file mode 100644 index 0000000..93b46c3 --- /dev/null +++ b/libguestfs-1.44.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6ea0cd73eb6e5186b14ae48139f16f8701866ad8fb4954dea9c3e4aaa79a1bb9 +size 23854577 diff --git a/libguestfs-1.44.2.tar.gz.sig b/libguestfs-1.44.2.tar.gz.sig new file mode 100644 index 0000000..5cc18de --- /dev/null +++ b/libguestfs-1.44.2.tar.gz.sig @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- + +iQJFBAABCAAvFiEE93dPsa0HSn6Mh2fqkXOPc+G3aKAFAmE3zKERHHJpY2hAYW5u +ZXhpYS5vcmcACgkQkXOPc+G3aKBGyRAAiV+CFfaAi06iqJ6H9YTfNOB/wK6XPPmu +DG+sLCXBVR/YYe93Myt/T+6+6U9Ue7d1BTGQ6UhHc/E8IbnFPWNi/8tdQSL9W+Nm +KEkfZNDROnnO1vHX8nR/rAuwdcDCHZR5suh58K8TvY/1+i362zNFxY/YMFujExK5 +z4kCcP9GjEECoPgvu/RtOJm9YrRdbF0QzF9Fu7ZqhQFbaMkCJg9IDB/mSz5t/mWE +e08rHqwqYsygBCfHCX9lALhNWQO0x/WX2QZrgbcIgMijgWrmTq5czTwkWGPG/CMO ++8tkyF6r1HKHtpz1UsIXsHflOCVk0f0twTncYYltifecZq2sR9UODLBgRPMaTSYa +TLz2jcuSd98yFmkSORr8JNIOGyX8jatFLQT85PqsDZ7MIIilMTT27rYQkY5/EJcN +Yetn3mc+hsbXYjk/eCeZvPVnkD98JQaOlW3+lybTkdS9HWNc3lzaS1M64OSYOzMo +PQL9OAm+ScLzQvvefCKGcLVUGoRvmcabvkg8buYRZb2WuM2uY+xHsLWGWLROxAwa +cI9N+bvD1qyDoze3yjti0WWwBDxCYG/Wz/bJpuwawDx60VEyFUARyk4182nCz2E/ +PE+t2z0xLYsbj3bT1grI+Ay8EJEP0u6R88PO7CW7l2jZUYpZNHyFlOCgyG3nB1LF +u4tbE+OLPyA= +=06k/ +-----END PGP SIGNATURE----- diff --git a/libguestfs.changes b/libguestfs.changes index 94cc158..97201c2 100644 --- a/libguestfs.changes +++ b/libguestfs.changes @@ -1,3 +1,43 @@ +------------------------------------------------------------------- +Mon Sep 13 16:34:08 MDT 2021 - carnold@suse.com + +- Newer cpio versions must be told to extract over symlinks + libguestfs.test.simple.create-opensuse-guest-crypt-on-lvm.sh + libguestfs.test.simple.create-opensuse-guest.sh + libguestfs.test.simple.create-sles12-guest-crypt-on-lvm.sh + libguestfs.test.simple.create-sles12-guest.sh +- Allow the use busybox dhcp client + appliance.patch + netconfig.patch + +------------------------------------------------------------------- +Mon Sep 13 15:02:23 MDT 2021 - carnold@suse.com + +- Update to version 1.44.2 + makefile-ocaml-find-guestfs.patch + * Port libguestfs to use pcre2 instead of pcre + * inspection: More reliable detection of Linux split /usr configurations + * python: Relicense setup.py to LGPLv2+ (originally GPLv2+) + * lib: qemu: Don't use -enable-fips option. + * rust: Fix deprecated use of panic!(format!(...)) + * point users to Libera Chat rather than FreeNode + * python: Don't leak fields when creating Python structs + * appliance: Add IBM850 iconv converter for syslinux + * launch: board model for RISC-V + * lib: Add osinfo information for Windows Server 2022 Datacenter + * lib: Autodetect backing format for qemu-img create -b + * appliance: Fix searching for shared libraries on usr-merged Debian systems + * appliance: Add mount package for Debian + * m4/guestfs-appliance.m4: Add support for Alma and Cloud Linux + * daemon/luks.c: Ignore bogus GCC -fanalyzer double-free warning + * daemon/xattr.c: Increase size of temporary buffer for %zu + * daemon/utils.c: Fix potential unbounded stack usage + * Various other bug fixes +- Upstream bug fixes post 1.44.2 + e26cfa44-daemon-Build-with--pthread.patch + 489b14b7-ocaml-examples-Link-examples-to-gnulib.patch + 68a02c2f-customize--resize--sparsify--sysprep-Link-explicitly-with-pthread.patch + ------------------------------------------------------------------- Mon Jul 19 01:01:01 UTC 2021 - ohering@suse.de @@ -49,6 +89,11 @@ Tue Apr 13 13:13:13 UTC 2021 - ohering@suse.de - Remove ocaml_native_compiler conditional build native target unconditionally +------------------------------------------------------------------- +Fri Apr 9 09:09:09 UTC 2021 - ohering@suse.de + +- Require current ocaml-rpm-macros + ------------------------------------------------------------------- Tue Jan 12 05:38:44 MST 2021 - carnold@suse.com diff --git a/libguestfs.spec b/libguestfs.spec index 9abb4ad..1928d76 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -18,7 +18,7 @@ # needsbinariesforbuild -Version: 1.44.1 +Version: 1.44.2 Release: 0 %{?ocaml_preserve_bytecode} @@ -101,11 +101,11 @@ BuildRequires: dhcp-client BuildRequires: libjansson-devel BuildRequires: pcre-devel BuildRequires: pkg-config -BuildRequires: pkgconfig(python3) BuildRequires: qemu-tools BuildRequires: readline-devel BuildRequires: supermin >= 5.1.6 BuildRequires: pkgconfig(dbus-1) +BuildRequires: pkgconfig(python3) # Required to build tools, its independent from bindings BuildRequires: glib2-devel BuildRequires: ocaml >= 4.01 @@ -141,16 +141,24 @@ Summary: Compatibility package for guestfs-tools # Upstream patches License: GPL-2.0-only +# Upstream +Patch1: e26cfa44-daemon-Build-with--pthread.patch +Patch2: 489b14b7-ocaml-examples-Link-examples-to-gnulib.patch +Patch3: 68a02c2f-customize--resize--sparsify--sysprep-Link-explicitly-with-pthread.patch + # Pending upstram review Patch50: 0001-Introduce-a-wrapper-around-xmlParseURI.patch Patch51: 0002-common-extract-UTF-8-conversion-function.patch Patch52: 0003-inspector-rpm-summary-and-description-may-not-be-utf.patch +Patch53: 0004-python-include-dirs.patch # Our patches Patch100: appliance.patch Patch101: netconfig.patch Patch102: libguestfs.env.patch +Patch103: makefile-ocaml-find-guestfs.patch Source0: https://download.libguestfs.org/1.44-stable/libguestfs-%{version}.tar.gz +Source1: https://download.libguestfs.org/1.44-stable/libguestfs-%{version}.tar.gz.sig Source3: libguestfs.rpmlintrc Source100: mount-rootfs-and-chroot.sh Source101: README diff --git a/libguestfs.test.simple.create-opensuse-guest-crypt-on-lvm.sh b/libguestfs.test.simple.create-opensuse-guest-crypt-on-lvm.sh index 0bb635d..25fab1b 100644 --- a/libguestfs.test.simple.create-opensuse-guest-crypt-on-lvm.sh +++ b/libguestfs.test.simple.create-opensuse-guest-crypt-on-lvm.sh @@ -62,7 +62,7 @@ _exit() { } _unrpm() { - CPIO_OPTS="--extract --unconditional --preserve-modification-time --make-directories" + CPIO_OPTS="--extract --unconditional --preserve-modification-time --make-directories --extract-over-symlinks" FILES="$@" for f in $FILES; do echo -ne "$f:\t" diff --git a/libguestfs.test.simple.create-opensuse-guest.sh b/libguestfs.test.simple.create-opensuse-guest.sh index 3da3c15..3f7303e 100644 --- a/libguestfs.test.simple.create-opensuse-guest.sh +++ b/libguestfs.test.simple.create-opensuse-guest.sh @@ -59,7 +59,7 @@ _exit() { } _unrpm() { - CPIO_OPTS="--extract --unconditional --preserve-modification-time --make-directories" + CPIO_OPTS="--extract --unconditional --preserve-modification-time --make-directories --extract-over-symlinks" FILES="$@" for f in $FILES; do echo -ne "$f:\t" diff --git a/libguestfs.test.simple.create-sles12-guest-crypt-on-lvm.sh b/libguestfs.test.simple.create-sles12-guest-crypt-on-lvm.sh index 079bd26..2e02910 100644 --- a/libguestfs.test.simple.create-sles12-guest-crypt-on-lvm.sh +++ b/libguestfs.test.simple.create-sles12-guest-crypt-on-lvm.sh @@ -63,7 +63,7 @@ _exit() { } _unrpm() { - CPIO_OPTS="--extract --unconditional --preserve-modification-time --make-directories" + CPIO_OPTS="--extract --unconditional --preserve-modification-time --make-directories --extract-over-symlinks" FILES="$@" for f in $FILES; do echo -ne "$f:\t" diff --git a/libguestfs.test.simple.create-sles12-guest.sh b/libguestfs.test.simple.create-sles12-guest.sh index dbac628..4c96c55 100644 --- a/libguestfs.test.simple.create-sles12-guest.sh +++ b/libguestfs.test.simple.create-sles12-guest.sh @@ -60,7 +60,7 @@ _exit() { } _unrpm() { - CPIO_OPTS="--extract --unconditional --preserve-modification-time --make-directories" + CPIO_OPTS="--extract --unconditional --preserve-modification-time --make-directories --extract-over-symlinks" FILES="$@" for f in $FILES; do echo -ne "$f:\t" diff --git a/makefile-ocaml-find-guestfs.patch b/makefile-ocaml-find-guestfs.patch new file mode 100644 index 0000000..fbe1ab5 --- /dev/null +++ b/makefile-ocaml-find-guestfs.patch @@ -0,0 +1,44 @@ +--- libguestfs-1.44.2/common/mlprogress/Makefile.am.orig 2021-09-14 10:01:16.710596638 -0600 ++++ libguestfs-1.44.2/common/mlprogress/Makefile.am 2021-09-14 10:01:25.526596848 -0600 +@@ -67,7 +67,7 @@ BOBJECTS = $(SOURCES_ML:.ml=.cmo) + XOBJECTS = $(BOBJECTS:.cmo=.cmx) + + OCAMLPACKAGES = \ +- -package str,unix,guestfs \ ++ -package str,unix \ + -I $(top_builddir)/common/utils/.libs \ + -I $(top_builddir)/ocaml \ + -I $(builddir) +--- libguestfs-1.44.2/common/mlvisit/Makefile.am.orig 2021-09-14 10:37:51.790648944 -0600 ++++ libguestfs-1.44.2/common/mlvisit/Makefile.am 2021-09-14 10:44:53.878659002 -0600 +@@ -68,7 +68,7 @@ BOBJECTS = $(SOURCES_ML:.ml=.cmo) + XOBJECTS = $(BOBJECTS:.cmo=.cmx) + + OCAMLPACKAGES = \ +- -package str,unix,guestfs \ ++ -package str,unix \ + -I $(top_builddir)/common/mlutils \ + -I $(top_builddir)/ocaml \ + -I $(top_builddir)/common/utils/.libs \ +--- libguestfs-1.44.2/common/mltools/Makefile.am.orig 2021-09-14 10:38:03.082649213 -0600 ++++ libguestfs-1.44.2/common/mltools/Makefile.am 2021-09-14 10:45:08.230659344 -0600 +@@ -114,7 +114,7 @@ BOBJECTS = $(SOURCES_ML:.ml=.cmo) + XOBJECTS = $(BOBJECTS:.cmo=.cmx) + + OCAMLPACKAGES = \ +- -package str,unix,guestfs \ ++ -package str,unix \ + -I $(top_builddir)/common/utils/.libs \ + -I $(top_builddir)/gnulib/lib/.libs \ + -I $(top_builddir)/ocaml \ +--- libguestfs-1.44.2/common/mlcustomize/Makefile.am.orig 2021-09-14 10:44:24.598658304 -0600 ++++ libguestfs-1.44.2/common/mlcustomize/Makefile.am 2021-09-14 10:44:35.654658567 -0600 +@@ -82,7 +82,7 @@ BOBJECTS = $(SOURCES_ML:.ml=.cmo) + XOBJECTS = $(BOBJECTS:.cmo=.cmx) + + OCAMLPACKAGES = \ +- -package str,unix,guestfs \ ++ -package str,unix \ + -I $(top_builddir)/common/utils/.libs \ + -I $(top_builddir)/ocaml \ + -I $(top_builddir)/common/mlstdutils \ diff --git a/netconfig.patch b/netconfig.patch index b4db54a..821501d 100644 --- a/netconfig.patch +++ b/netconfig.patch @@ -1,8 +1,16 @@ -Index: libguestfs-1.44.0/appliance/packagelist.in +Index: libguestfs-1.44.2/appliance/packagelist.in =================================================================== ---- libguestfs-1.44.0.orig/appliance/packagelist.in -+++ libguestfs-1.44.0/appliance/packagelist.in -@@ -130,6 +130,7 @@ ifelse(SUSE,1, +--- libguestfs-1.44.2.orig/appliance/packagelist.in ++++ libguestfs-1.44.2/appliance/packagelist.in +@@ -118,6 +118,7 @@ ifelse(SUSE,1, + dnl It seems no other augeas package depends on it. + augeas-lenses + btrfsprogs ++ busybox + cdrkit-cdrtools-compat + cryptsetup + dhcpcd +@@ -133,6 +134,7 @@ ifelse(SUSE,1, ntfs-3g reiserfs squashfs