From 685f47c762acc719d4d7494cacff41bd6346cccded47a789b0a695c15eb94002 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Mon, 19 Jul 2021 09:02:47 +0000 Subject: [PATCH 1/6] - Remove obsolete yajl - Add conditional to ocaml_preserve_bytecode - Remove traces of python2 code - Use pkgconfig(python3) to refer to variants of python3 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libguestfs?expand=0&rev=474 --- libguestfs.changes | 8 ++++++++ libguestfs.spec | 18 +++++------------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/libguestfs.changes b/libguestfs.changes index d9a0f16..9a3fc9b 100644 --- a/libguestfs.changes +++ b/libguestfs.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Jul 19 01:01:01 UTC 2021 - ohering@suse.de + +- Remove obsolete yajl +- Add conditional to ocaml_preserve_bytecode +- Remove traces of python2 code +- Use pkgconfig(python3) to refer to variants of python3 + ------------------------------------------------------------------- Fri May 28 10:20:30 UTC 2021 - ohering@suse.de diff --git a/libguestfs.spec b/libguestfs.spec index 88f4b94..a7d76f2 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -20,7 +20,7 @@ Version: 1.44.1 Release: 0 -%{ocaml_preserve_bytecode} +%{?ocaml_preserve_bytecode} %bcond_without ocaml_bindings %bcond_without lua_bindings @@ -102,12 +102,11 @@ BuildRequires: dhcp-client BuildRequires: libjansson-devel BuildRequires: pcre-devel BuildRequires: pkg-config -BuildRequires: python3-devel +BuildRequires: pkgconfig(python3) BuildRequires: qemu-tools BuildRequires: readline-devel BuildRequires: supermin >= 5.1.6 BuildRequires: pkgconfig(dbus-1) -BuildRequires: pkgconfig(yajl) >= 2.0.4 # Required to build tools, its independent from bindings BuildRequires: glib2-devel BuildRequires: ocaml >= 4.01 @@ -310,8 +309,7 @@ Allows lua scripts to directly use libguestfs. Summary: Python 3 bindings for libguestfs License: GPL-2.0-only Group: Development/Languages/Python -BuildRequires: python3 -BuildRequires: python3-devel +BuildRequires: pkgconfig(python3) %define _configure_python --enable-python # Obsoletes: libguestfs-python < %{version} @@ -569,13 +567,6 @@ autoreconf -fi %configure \ --help || : -if python --version && ! pkg-config python -then - export PYTHON_LIBS="-lpython`python -c 'import distutils.sysconfig; print (distutils.sysconfig.get_python_version ());'`" - export PYTHON_CFLAGS="-I`python -c 'import distutils.sysconfig; print (distutils.sysconfig.get_python_inc ());'`" - export PYTHON_EXT_SUFFIX=.so -fi - # Defines these if using --with-distro=SUSE with configure export HAVE_RPM_TRUE= export HAVE_RPM_FALSE="#" @@ -657,7 +648,8 @@ sed -i -e "s:libraries=:library_dirs=['%{buildroot}/%{_libdir}'], libraries=:" s make stamp-extra-files # HACKY! Change config.h for python3 -sed 's/\(#define HAVE_PYSTRING_ASSTRING 1\)/\/* \1 *\//' -i config.h +sed 's/\(#define HAVE_PYSTRING_ASSTRING 1\)/\/* \1 *\//' -i~ config.h +diff -u "$_"~ "$_" && : equal %python3_build %python3_install popd From aa0545b4ec97fcad1df4195c4f3d238d8a92e7a673fdaf0d8f56c4c47a88eb39 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Mon, 19 Jul 2021 15:32:28 +0000 Subject: [PATCH 2/6] - Remove obsolete 0004-python-include-dirs.patch and related workaround in spec file OBS-URL: https://build.opensuse.org/package/show/Virtualization/libguestfs?expand=0&rev=475 --- 0004-python-include-dirs.patch | 11 ----------- libguestfs.changes | 2 ++ libguestfs.spec | 15 --------------- 3 files changed, 2 insertions(+), 26 deletions(-) delete mode 100644 0004-python-include-dirs.patch diff --git a/0004-python-include-dirs.patch b/0004-python-include-dirs.patch deleted file mode 100644 index 996f05b..0000000 --- a/0004-python-include-dirs.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- 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/libguestfs.changes b/libguestfs.changes index 9a3fc9b..eac3a1c 100644 --- a/libguestfs.changes +++ b/libguestfs.changes @@ -5,6 +5,8 @@ Mon Jul 19 01:01:01 UTC 2021 - ohering@suse.de - Add conditional to ocaml_preserve_bytecode - Remove traces of python2 code - Use pkgconfig(python3) to refer to variants of python3 +- Remove obsolete 0004-python-include-dirs.patch and related + workaround in spec file ------------------------------------------------------------------- Fri May 28 10:20:30 UTC 2021 - ohering@suse.de diff --git a/libguestfs.spec b/libguestfs.spec index a7d76f2..cf243ad 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -148,7 +148,6 @@ Group: System/Filesystems 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 @@ -540,7 +539,6 @@ It can import a variety of guest operating systems from libvirt-managed hosts. %patch50 -p1 %patch51 -p1 %patch52 -p1 -%patch53 -p1 %patch100 -p1 %patch101 -p1 %patch102 -p1 @@ -642,19 +640,6 @@ grep "%perl_vendorarch/" %{name}.files | tee t mv t %{name}.files %endif -%if %{with python_bindings} -pushd python -sed -i -e "s:libraries=:library_dirs=['%{buildroot}/%{_libdir}'], libraries=:" setup.py -make stamp-extra-files - -# HACKY! Change config.h for python3 -sed 's/\(#define HAVE_PYSTRING_ASSTRING 1\)/\/* \1 *\//' -i~ config.h -diff -u "$_"~ "$_" && : equal -%python3_build -%python3_install -popd -%endif - # Don't package the test harness (yet) rm -rf %{buildroot}/%{_libdir}/ocaml/v2v_test_harness From 4cfc54c6d8ce1facf04d7427e020c9d71bf2e0986fc2276529f0415b990468bf Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Mon, 19 Jul 2021 15:33:53 +0000 Subject: [PATCH 3/6] - Use autosetup OBS-URL: https://build.opensuse.org/package/show/Virtualization/libguestfs?expand=0&rev=476 --- libguestfs.changes | 1 + libguestfs.spec | 9 +-------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/libguestfs.changes b/libguestfs.changes index eac3a1c..e3c0f91 100644 --- a/libguestfs.changes +++ b/libguestfs.changes @@ -7,6 +7,7 @@ Mon Jul 19 01:01:01 UTC 2021 - ohering@suse.de - Use pkgconfig(python3) to refer to variants of python3 - Remove obsolete 0004-python-include-dirs.patch and related workaround in spec file +- Use autosetup ------------------------------------------------------------------- Fri May 28 10:20:30 UTC 2021 - ohering@suse.de diff --git a/libguestfs.spec b/libguestfs.spec index cf243ad..2c49dc4 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -534,14 +534,7 @@ It can import a variety of guest operating systems from libvirt-managed hosts. %prep : _ignore_exclusive_arch '%{?_ignore_exclusive_arch}' -%setup -q -a 789653 -#%setup -q -a 1 -a 2 -a 789653 -%patch50 -p1 -%patch51 -p1 -%patch52 -p1 -%patch100 -p1 -%patch101 -p1 -%patch102 -p1 +%autosetup -p1 -a 789653 %build %global _lto_cflags %{_lto_cflags} -ffat-lto-objects From 6020a4096b56527766333ac3bf42fd0768548f10acfe0ee4864cf503faaae410 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Mon, 19 Jul 2021 15:36:33 +0000 Subject: [PATCH 4/6] - Use _udevrulesdir OBS-URL: https://build.opensuse.org/package/show/Virtualization/libguestfs?expand=0&rev=477 --- libguestfs.changes | 1 + libguestfs.spec | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libguestfs.changes b/libguestfs.changes index e3c0f91..20b0033 100644 --- a/libguestfs.changes +++ b/libguestfs.changes @@ -8,6 +8,7 @@ Mon Jul 19 01:01:01 UTC 2021 - ohering@suse.de - Remove obsolete 0004-python-include-dirs.patch and related workaround in spec file - Use autosetup +- Use _udevrulesdir ------------------------------------------------------------------- Fri May 28 10:20:30 UTC 2021 - ohering@suse.de diff --git a/libguestfs.spec b/libguestfs.spec index 2c49dc4..c0024a5 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -43,7 +43,6 @@ Release: 0 %define _configure_python --disable-python %define _configure_ruby --disable-ruby -%define udevrulesdir /usr/lib/udev/rules.d # # use 'env LIBGUESTFS_HV=/path/to/kvm libguestfs-test-tool' to verify %define kvm_binary /bin/false @@ -602,7 +601,7 @@ build_it %{?_smp_mflags} || build_it %install %makeinstall \ INSTALLDIRS=vendor \ - udevrulesdir=%{udevrulesdir} + udevrulesdir=%{_udevrulesdir} find %{buildroot} -ls mkdir -p %{buildroot}/%{_datadir}/guestfs cp -avLt %{buildroot}/%{_datadir}/guestfs \ @@ -763,7 +762,7 @@ rm %{buildroot}/%{_datadir}/virt-p2v/p2v.ks.in %files -n guestfsd %defattr(-,root,root) -%{udevrulesdir} +%{_udevrulesdir} %{_sbindir}/guestfsd %{_mandir}/man8/* From b4892d1cff4aa1332e71f4c9fcac96dffe187264dd2ca71f0c98857631a6c5d7 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Mon, 19 Jul 2021 15:37:34 +0000 Subject: [PATCH 5/6] - Remove BuildRoot and defattr OBS-URL: https://build.opensuse.org/package/show/Virtualization/libguestfs?expand=0&rev=478 --- libguestfs.changes | 1 + libguestfs.spec | 14 -------------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/libguestfs.changes b/libguestfs.changes index 20b0033..98b720e 100644 --- a/libguestfs.changes +++ b/libguestfs.changes @@ -9,6 +9,7 @@ Mon Jul 19 01:01:01 UTC 2021 - ohering@suse.de workaround in spec file - Use autosetup - Use _udevrulesdir +- Remove BuildRoot and defattr ------------------------------------------------------------------- Fri May 28 10:20:30 UTC 2021 - ohering@suse.de diff --git a/libguestfs.spec b/libguestfs.spec index c0024a5..c1eeb98 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -137,7 +137,6 @@ BuildRequires: gtk2-devel %endif # URL: http://libguestfs.org/ -BuildRoot: %{_tmppath}/%{name}-%{version}-build Summary: Compatibility package for guestfs-tools # Upstream patches License: GPL-2.0-only @@ -678,11 +677,9 @@ rm %{buildroot}/%{_datadir}/virt-p2v/p2v.ks.in %postun -n libguestfs0 -p /sbin/ldconfig %files test -%defattr(-,root,root) %{_datadir}/guestfs %files -n guestfs-data -%defattr(-,root,root) %dir %{_libdir}/guestfs %dir %{_libdir}/guestfs/supermin.d %{_libdir}/guestfs/supermin.d/base.tar.gz @@ -695,12 +692,10 @@ rm %{buildroot}/%{_datadir}/virt-p2v/p2v.ks.in %{_libdir}/guestfs/supermin.d/zz-scripts.tar.gz %files -n guestfs-winsupport -%defattr(-,root,root) %{_libdir}/guestfs/supermin.d/zz-*winsupport* %if %{with ocaml_bindings} %files -n ocaml-libguestfs -%defattr(-,root,root) %dir %{_libdir}/ocaml %dir %{_libdir}/ocaml/guestfs %{_libdir}/ocaml/guestfs/META @@ -709,7 +704,6 @@ rm %{buildroot}/%{_datadir}/virt-p2v/p2v.ks.in %{_libdir}/ocaml/stublibs %files -n ocaml-libguestfs-devel -%defattr(-,root,root) %dir %{_libdir}/ocaml %dir %{_libdir}/ocaml/guestfs %{_libdir}/ocaml/guestfs/*.a @@ -720,7 +714,6 @@ rm %{buildroot}/%{_datadir}/virt-p2v/p2v.ks.in # %if %{with lua_bindings} %files -n lua-libguestfs -%defattr(-,root,root) %{_libdir}/lua %endif # @@ -730,29 +723,24 @@ rm %{buildroot}/%{_datadir}/virt-p2v/p2v.ks.in %postun -n perl-Sys-Guestfs -p /sbin/ldconfig %files -n perl-Sys-Guestfs -f %{name}.files -%defattr(-,root,root) %endif # %if %{with python_bindings} %files -n python3-libguestfs -%defattr(-,root,root) %{python3_sitearch}/* %endif # %if %{with ruby_bindings} %files -n rubygem-libguestfs -%defattr(-,root,root) %{_libdir}/ruby %endif %files -n libguestfs0 -%defattr(-,root,root) %license COPYING.LIB %{_libdir}/*.so.* %files devel -%defattr(-,root,root) %{_libdir}/*.so %{_libdir}/pkgconfig/* %{_includedir}/guestfs.h @@ -761,13 +749,11 @@ rm %{buildroot}/%{_datadir}/virt-p2v/p2v.ks.in %{_mandir}/man3/* %files -n guestfsd -%defattr(-,root,root) %{_udevrulesdir} %{_sbindir}/guestfsd %{_mandir}/man8/* %files -n guestfs-tools -f %{name}.lang -%defattr(-,root,root) %license COPYING %{_sbindir}/libguestfs-make-fixed-appliance %{_bindir}/* From 290c5249f343fcbd78912c747446cdc780a0900c6cd962d9685aae6a97615a5c Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Mon, 19 Jul 2021 15:38:22 +0000 Subject: [PATCH 6/6] - Remove Group tags OBS-URL: https://build.opensuse.org/package/show/Virtualization/libguestfs?expand=0&rev=479 --- libguestfs.changes | 1 + libguestfs.spec | 16 ---------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/libguestfs.changes b/libguestfs.changes index 98b720e..94cc158 100644 --- a/libguestfs.changes +++ b/libguestfs.changes @@ -10,6 +10,7 @@ Mon Jul 19 01:01:01 UTC 2021 - ohering@suse.de - Use autosetup - Use _udevrulesdir - Remove BuildRoot and defattr +- Remove Group tags ------------------------------------------------------------------- Fri May 28 10:20:30 UTC 2021 - ohering@suse.de diff --git a/libguestfs.spec b/libguestfs.spec index c1eeb98..9abb4ad 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -140,7 +140,6 @@ URL: http://libguestfs.org/ Summary: Compatibility package for guestfs-tools # Upstream patches License: GPL-2.0-only -Group: System/Filesystems # Pending upstram review Patch50: 0001-Introduce-a-wrapper-around-xmlParseURI.patch @@ -177,7 +176,6 @@ performing partial backups, cloning VMs, and much else besides. %package -n guestfs-tools Summary: Tools for accessing and modifying virtual machine disk images License: GPL-2.0-only -Group: System/Filesystems Provides: %{name} = %{version} Obsoletes: %{name} < %{version} Requires: libguestfs0 = %{version} @@ -230,7 +228,6 @@ virtual machines. %package -n guestfsd Summary: Daemon for the libguestfs appliance License: GPL-2.0-only -Group: System/Filesystems Conflicts: libaugeas0 < 1.0.0 %description -n guestfsd @@ -244,7 +241,6 @@ This package is only required for building the appliance. Summary: OCaml bindings for libguestfs # License: GPL-2.0-only -Group: Development/Languages/OCaml %description -n ocaml-libguestfs Allows OCaml scripts to directly use libguestfs. @@ -252,7 +248,6 @@ Allows OCaml scripts to directly use libguestfs. %package -n ocaml-libguestfs-devel Summary: Development files for libguesfs OCaml bindings License: GPL-2.0-only -Group: Development/Languages/OCaml %description -n ocaml-libguestfs-devel Allows OCaml scripts to directly use libguestfs. @@ -262,7 +257,6 @@ Allows OCaml scripts to directly use libguestfs. %package -n perl-Sys-Guestfs Summary: Perl bindings for libguestfs License: GPL-2.0-only -Group: Development/Languages/Perl BuildRequires: perl BuildRequires: perl(Data::Dumper) BuildRequires: perl(Getopt::Long) @@ -290,7 +284,6 @@ Allows Perl scripts to directly use libguestfs. %package -n lua-libguestfs Summary: Lua bindings for libguestfs License: GPL-2.0-only -Group: Development/Languages/Lua BuildRequires: lua-devel %define _configure_lua --enable-lua # @@ -305,7 +298,6 @@ Allows lua scripts to directly use libguestfs. %package -n python3-libguestfs Summary: Python 3 bindings for libguestfs License: GPL-2.0-only -Group: Development/Languages/Python BuildRequires: pkgconfig(python3) %define _configure_python --enable-python # @@ -321,7 +313,6 @@ Allows Python 3 scripts to directly use libguestfs. %package -n rubygem-libguestfs Summary: Ruby bindings for libguestfs License: GPL-2.0-only -Group: Development/Languages/Ruby BuildRequires: ruby BuildRequires: ruby-devel BuildRequires: rubygem(rake) @@ -335,7 +326,6 @@ Allows Ruby scripts to directly use libguestfs. %package test Summary: Testcases for libguestfs License: GPL-2.0-only -Group: Development/Tools/Other Requires: %{name} %description test @@ -439,7 +429,6 @@ Recommends: guestfs-winsupport Summary: Virtual machine needed for libguestfs License: GPL-2.0-only -Group: System/Filesystems Provides: libguestfs-data = %{version} Obsoletes: libguestfs-data < %{version} @@ -450,7 +439,6 @@ This package provides such an image, an initrd and a kernel. %package -n guestfs-winsupport Summary: Windows guest support in libguestfs License: GPL-2.0-or-later -Group: System/Filesystems Requires: libguestfs >= 1.32 BuildRequires: ntfs-3g BuildRequires: ntfsprogs @@ -462,7 +450,6 @@ Provides the needed pieces for libguestfs to handle Windows guests. %package devel Summary: Development files for libguestfs License: GPL-2.0-only -Group: Development/Libraries/C and C++ Requires: libguestfs0 = %{version} %description devel @@ -476,7 +463,6 @@ performing partial backups, cloning VMs, and much else besides. %package -n libguestfs0 Summary: Runtime library of libguestfs License: LGPL-2.1-only -Group: System/Libraries Requires: %{kvm_binary} Requires: db48-utils Requires: guestfs-data >= %{version} @@ -506,7 +492,6 @@ virtual machines. %package -n virt-v2v Summary: Convert a virtual machine to run on KVM License: GPL-2.0-only -Group: System/Management Requires: libguestfs0 = %{version} Requires: qemu-block-ssh # Conflicts with the old perl version @@ -521,7 +506,6 @@ from libvirt-managed hosts. %package -n virt-p2v Summary: Convert a physical machine to run on KVM License: GPL-2.0-only -Group: System/Management Requires: gawk Requires: virt-v2v = %{version}