From d036cb30b450afa9427d2421cc8e380caad50f5a991541d40c41980f6365da2d Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sun, 16 Jul 2017 09:23:54 +0000 Subject: [PATCH 1/5] - update to version 1.36.5: * btrfs_replace: fix position of subcommand options * lib: Move close_file_descriptors into guestfs-internal.h. * daemon: lvm: Pass --yes option to force pvresize (RHBZ#1460577). * lib: direct, uml: Unblock SIGTERM in the hypervisor and recovery processes (RHBZ#1460338). * lib: create: Allow any [[:alnum:]]+ string as a backingfmt parameter (RHBZ#1459979). * mllib: Handle empty files correctly in read_first_line_from_file. * resize: make sure the input disk is read-only * v2v: tell v2v the real root device to mkinitrd * mllib: Export which in "stdlib mode". * mllib: Export prog, quiet, trace, verbose in "stdlib mode". * btrfs_replace: fix position of subcommand options - drop 0000-hotfix.patch - add download location for source verification purposes OBS-URL: https://build.opensuse.org/package/show/Virtualization/libguestfs?expand=0&rev=395 --- 0000-hotfix.patch | 15 --------------- libguestfs-1.36.4.tar.xz | 3 --- libguestfs-1.36.5.tar.gz | 3 +++ libguestfs.changes | 18 ++++++++++++++++++ libguestfs.spec | 17 ++++++++--------- 5 files changed, 29 insertions(+), 27 deletions(-) delete mode 100644 0000-hotfix.patch delete mode 100644 libguestfs-1.36.4.tar.xz create mode 100644 libguestfs-1.36.5.tar.gz diff --git a/0000-hotfix.patch b/0000-hotfix.patch deleted file mode 100644 index 4a9294a..0000000 --- a/0000-hotfix.patch +++ /dev/null @@ -1,15 +0,0 @@ -Index: libguestfs-1.36.4/v2v/convert_linux.ml -=================================================================== ---- libguestfs-1.36.4.orig/v2v/convert_linux.ml -+++ libguestfs-1.36.4/v2v/convert_linux.ml -@@ -514,7 +514,9 @@ let rec convert (g : G.guestfs) inspect - else if family = `SUSE_family - && g#is_file ~followsymlinks:true "/sbin/mkinitrd" then ( - ignore ( -- g#command [| "/sbin/mkinitrd"; -+ g#command [| "/usr/bin/env"; -+ "rootdev=" ^ inspect.i_root; -+ "/sbin/mkinitrd"; - "-m"; String.concat " " modules; - "-i"; initrd; - "-k"; kernel.ki_vmlinuz; diff --git a/libguestfs-1.36.4.tar.xz b/libguestfs-1.36.4.tar.xz deleted file mode 100644 index d83bbf0..0000000 --- a/libguestfs-1.36.4.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c9bc559fb1b5339dd7a74f834263480b857d3c4d4dc275abc8e3087ef6e6deaa -size 6550456 diff --git a/libguestfs-1.36.5.tar.gz b/libguestfs-1.36.5.tar.gz new file mode 100644 index 0000000..9111c1d --- /dev/null +++ b/libguestfs-1.36.5.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c2f7c10c42de04567a9b5cfd8345a995fb951ded9a7fbe72fae061d66dfe8f98 +size 23012703 diff --git a/libguestfs.changes b/libguestfs.changes index f0f0134..225210d 100644 --- a/libguestfs.changes +++ b/libguestfs.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Sun Jul 16 09:07:22 UTC 2017 - dmueller@suse.com + +- update to version 1.36.5: + * btrfs_replace: fix position of subcommand options + * lib: Move close_file_descriptors into guestfs-internal.h. + * daemon: lvm: Pass --yes option to force pvresize (RHBZ#1460577). + * lib: direct, uml: Unblock SIGTERM in the hypervisor and recovery processes (RHBZ#1460338). + * lib: create: Allow any [[:alnum:]]+ string as a backingfmt parameter (RHBZ#1459979). + * mllib: Handle empty files correctly in read_first_line_from_file. + * resize: make sure the input disk is read-only + * v2v: tell v2v the real root device to mkinitrd + * mllib: Export which in "stdlib mode". + * mllib: Export prog, quiet, trace, verbose in "stdlib mode". + * btrfs_replace: fix position of subcommand options +- drop 0000-hotfix.patch +- add download location for source verification purposes + ------------------------------------------------------------------- Thu Jun 1 16:12:07 UTC 2017 - cbosdonnat@suse.com diff --git a/libguestfs.spec b/libguestfs.spec index e4e47d3..58c35f4 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -1,7 +1,7 @@ # # spec file for package libguestfs # -# Copyright (c) 2017 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2011 Michal Hrusecky # # All modifications and additions to the file contributed by third parties @@ -18,7 +18,7 @@ # needsbinariesforbuild -Version: 1.36.4 +Version: 1.36.5 Release: 0 %{ocaml_preserve_bytecode} @@ -70,7 +70,6 @@ Name: libguestfs %if "%{?_ignore_exclusive_arch}" == "" ExclusiveArch: x86_64 ppc64 ppc64le s390x aarch64 %endif -%{ocaml_preserve_bytecode} BuildRequires: aaa_base BuildRequires: attr-devel BuildRequires: augeas-devel >= 1.0.0 @@ -140,10 +139,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build Summary: Compatibility package for guestfs-tools License: GPL-2.0 Group: System/Filesystems -Patch0: 0000-hotfix.patch Patch100: appliance.patch -Source0: %{name}-%{version}.tar.xz +Source0: http://download.libguestfs.org/1.36-stable/libguestfs-%{version}.tar.gz Source1: libguestfs.rpmlintrc Source100: mount-rootfs-and-chroot.sh Source789653: Pod-Simple-3.23.tar.xz @@ -200,7 +198,7 @@ Requires: perl(Win::Hivex) Requires: perl(Win::Hivex::Regedit) %endif %endif -Requires: guestfs-data +Requires: guestfs-data >= %{version} %if %{with fuse} Requires: fuse @@ -210,7 +208,6 @@ Requires: fuse Requires: curl Requires: gpg2 Requires: xz -Conflicts: guestfs-data < %{version} Conflicts: libguestfs0 < %{version} %description -n guestfs-tools @@ -244,9 +241,9 @@ This package is only required for building the appliance. %if %{with ocaml_bindings} %package -n ocaml-libguestfs Summary: Provides OCaml support for libguestfs +# License: GPL-2.0 Group: System/Filesystems -# %description -n ocaml-libguestfs Allows OCaml scripts to directly use libguestfs. @@ -294,6 +291,7 @@ Summary: Provides Lua support for libguestfs License: GPL-2.0 Group: System/Filesystems BuildRequires: lua-devel +Requires: guestfs-data >= %{version} %define _configure_lua --enable-lua # @@ -313,6 +311,7 @@ BuildRequires: python-devel # Provides: libguestfs-python = %{version} Obsoletes: libguestfs-python < %{version} +Requires: guestfs-data >= %{version} %description -n python-libguestfs Allows Python scripts to directly use libguestfs. @@ -326,6 +325,7 @@ Group: System/Filesystems BuildRequires: ruby BuildRequires: ruby-devel BuildRequires: rubygem-rake +Requires: guestfs-data >= %{version} %define _configure_ruby --enable-ruby # @@ -526,7 +526,6 @@ It can import a variety of guest operating systems from libvirt-managed hosts. %prep : _ignore_exclusive_arch '%{?_ignore_exclusive_arch}' %setup -q -a 789653 -%patch0 -p1 %patch100 -p1 %build From 2426376ef617a967cd6c030959a72cfe64f0e331b5678bde091fd609c914d81c Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 17 Jul 2017 07:05:45 +0000 Subject: [PATCH 2/5] - add dependency on augeas (bsc#1048620) OBS-URL: https://build.opensuse.org/package/show/Virtualization/libguestfs?expand=0&rev=396 --- libguestfs.changes | 5 +++++ libguestfs.spec | 2 ++ 2 files changed, 7 insertions(+) diff --git a/libguestfs.changes b/libguestfs.changes index 225210d..2aa209e 100644 --- a/libguestfs.changes +++ b/libguestfs.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jul 17 07:05:10 UTC 2017 - dmueller@suse.com + +- add dependency on augeas (bsc#1048620) + ------------------------------------------------------------------- Sun Jul 16 09:07:22 UTC 2017 - dmueller@suse.com diff --git a/libguestfs.spec b/libguestfs.spec index 58c35f4..01f2032 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -407,6 +407,8 @@ BuildRequires: ldmtool # at runtime based on the packages it will find on the host. # Thus if there is no libaugeas, libhivex, etc on the host, # the appliance will fail to start the guestfsd. +Requires: augeas +Requires: augeas-lenses Requires: libaugeas0 Requires: libcap2 Requires: libhivex0 From b10082bf9fdb003e31a0ec1080da1c119024b3783ea69321a61653cb63bcd6f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= Date: Wed, 19 Jul 2017 10:33:56 +0000 Subject: [PATCH 3/5] Accepting request 511369 from home:cbosdonnat:branches:Virtualization - add missing dependency on guestfs-data (bsc#1048848) OBS-URL: https://build.opensuse.org/request/show/511369 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libguestfs?expand=0&rev=397 --- appliance.patch | 25 +++++++++++++++++++++++-- libguestfs.changes | 5 +++++ libguestfs.spec | 1 + 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/appliance.patch b/appliance.patch index d0267c5..e7f4aad 100644 --- a/appliance.patch +++ b/appliance.patch @@ -1,5 +1,7 @@ ---- a/appliance/init -+++ b/appliance/init +Index: libguestfs-1.36.5/appliance/init +=================================================================== +--- libguestfs-1.36.5.orig/appliance/init ++++ libguestfs-1.36.5/appliance/init @@ -206,7 +206,9 @@ else echo echo "Note: The contents of / are the rescue appliance." @@ -11,3 +13,22 @@ echo run_bash_with_ctty echo +Index: libguestfs-1.36.5/m4/guestfs_appliance.m4 +=================================================================== +--- libguestfs-1.36.5.orig/m4/guestfs_appliance.m4 ++++ libguestfs-1.36.5/m4/guestfs_appliance.m4 +@@ -97,9 +97,13 @@ AC_MSG_CHECKING([which Linux distro for + if test -f /etc/os-release; then + ( . /etc/os-release && echo $ID | tr '@<:@:lower:@:>@' '@<:@:upper:@:>@' ) >&AS_MESSAGE_LOG_FD + DISTRO="`. /etc/os-release && echo $ID | tr '@<:@:lower:@:>@' '@<:@:upper:@:>@'`" ++ if test -z "$DISTRO"; then ++ ( . /etc/os-release && echo $ID_LIKE | tr '@<:@:lower:@:>@' '@<:@:upper:@:>@' ) >&AS_MESSAGE_LOG_FD ++ DISTRO="`. /etc/os-release && echo $ID_LIKE | tr '@<:@:lower:@:>@' '@<:@:upper:@:>@'`" ++ fi + AS_CASE([$DISTRO], + [FEDORA | RHEL | CENTOS],[DISTRO=REDHAT], +- [OPENSUSE | SLED | SLES],[DISTRO=SUSE], ++ [OPENSUSE | SLED | SLES | SUSE],[DISTRO=SUSE], + [ARCH],[DISTRO=ARCHLINUX]) + elif test -f /etc/debian_version; then + DISTRO=DEBIAN diff --git a/libguestfs.changes b/libguestfs.changes index 2aa209e..16c9a4b 100644 --- a/libguestfs.changes +++ b/libguestfs.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jul 18 14:07:54 UTC 2017 - cbosdonnat@suse.com + +- add missing dependency on guestfs-data (bsc#1048848) + ------------------------------------------------------------------- Mon Jul 17 07:05:10 UTC 2017 - dmueller@suse.com diff --git a/libguestfs.spec b/libguestfs.spec index 01f2032..c6258d2 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -277,6 +277,7 @@ BuildRequires: perl(Win::Hivex::Regedit) # Provides: libguestfs-perl = %{version} Obsoletes: libguestfs-perl < %{version} +Requires: guestfs-data >= %{version} Requires: perl(File::Temp) Requires: perl(Locale::TextDomain) %perl_requires From ae33b331feff1963b8993d071fe4057a9fe19b274d846655f66b5afb42d50c85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= Date: Mon, 31 Jul 2017 08:31:57 +0000 Subject: [PATCH 4/5] Accepting request 513144 from home:cbosdonnat:branches:Virtualization - Add missing dependency on guestfs-data (bsc#1048848) - Add conflict with old virt-v2v (bsc#1050069) OBS-URL: https://build.opensuse.org/request/show/513144 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libguestfs?expand=0&rev=398 --- 0000-hotfix.patch | 0 libguestfs.changes | 4 ++-- libguestfs.spec | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 0000-hotfix.patch diff --git a/0000-hotfix.patch b/0000-hotfix.patch new file mode 100644 index 0000000..473a0f4 diff --git a/libguestfs.changes b/libguestfs.changes index 16c9a4b..a93679f 100644 --- a/libguestfs.changes +++ b/libguestfs.changes @@ -1,7 +1,8 @@ ------------------------------------------------------------------- Tue Jul 18 14:07:54 UTC 2017 - cbosdonnat@suse.com -- add missing dependency on guestfs-data (bsc#1048848) +- Add missing dependency on guestfs-data (bsc#1048848) +- Add conflict with old virt-v2v (bsc#1050069) ------------------------------------------------------------------- Mon Jul 17 07:05:10 UTC 2017 - dmueller@suse.com @@ -23,7 +24,6 @@ Sun Jul 16 09:07:22 UTC 2017 - dmueller@suse.com * mllib: Export which in "stdlib mode". * mllib: Export prog, quiet, trace, verbose in "stdlib mode". * btrfs_replace: fix position of subcommand options -- drop 0000-hotfix.patch - add download location for source verification purposes ------------------------------------------------------------------- diff --git a/libguestfs.spec b/libguestfs.spec index c6258d2..18ad20e 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -139,6 +139,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build Summary: Compatibility package for guestfs-tools License: GPL-2.0 Group: System/Filesystems +Patch0: 0000-hotfix.patch Patch100: appliance.patch Source0: http://download.libguestfs.org/1.36-stable/libguestfs-%{version}.tar.gz @@ -154,7 +155,7 @@ Source10005: libguestfs.test.simple.create-sles12-guest-crypt-on-lvm.sh # Requires: guestfs-tools -Requires: virt-v2v +Requires: virt-v2v = %{version} %description libguestfs is a set of tools for accessing and modifying virtual machine (VM) @@ -507,6 +508,8 @@ License: GPL-2.0 Group: System/Management Requires: libguestfs0 = %{version} Requires: qemu-block-ssh +# Conflicts with the old perl version +Conflicts: virt-v2v <= 0.9.1 %description -n virt-v2v virt-v2v is a tool for converting and importing virtual machines to @@ -529,6 +532,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 +%patch0 -p1 %patch100 -p1 %build From 308f6baa27e8162bff2e34cb042cef038eb4e850a6b298cada75bbb9b0cab866 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= Date: Wed, 2 Aug 2017 16:04:59 +0000 Subject: [PATCH 5/5] Accepting request 514065 from home:cbosdonnat:branches:Virtualization - Fix python binding package * Replace python-libguestfs by python[23]-libguestfs packages * Add egg-info to python[23]-libguestfs package OBS-URL: https://build.opensuse.org/request/show/514065 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libguestfs?expand=0&rev=399 --- libguestfs.changes | 3 +++ libguestfs.spec | 50 +++++++++++++++++++++++++++++++++++++--------- 2 files changed, 44 insertions(+), 9 deletions(-) diff --git a/libguestfs.changes b/libguestfs.changes index a93679f..615cef1 100644 --- a/libguestfs.changes +++ b/libguestfs.changes @@ -3,6 +3,9 @@ Tue Jul 18 14:07:54 UTC 2017 - cbosdonnat@suse.com - Add missing dependency on guestfs-data (bsc#1048848) - Add conflict with old virt-v2v (bsc#1050069) +- Fix python binding package + * Replace python-libguestfs by python[23]-libguestfs packages + * Add egg-info to python[23]-libguestfs package ------------------------------------------------------------------- Mon Jul 17 07:05:10 UTC 2017 - dmueller@suse.com diff --git a/libguestfs.spec b/libguestfs.spec index 18ad20e..11e4ef9 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -302,21 +302,38 @@ Allows lua scripts to directly use libguestfs. %endif # %if %{with python_bindings} -%package -n python-libguestfs -Summary: Provides Python support for libguestfs +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%package -n python2-libguestfs +Summary: Provides Python 2 support for libguestfs License: GPL-2.0 Group: System/Filesystems -%define pyver %(python -c "import sys; print sys.version[:3]") +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} BuildRequires: python -BuildRequires: python-devel +BuildRequires: python-rpm-macros %define _configure_python --enable-python # -Provides: libguestfs-python = %{version} Obsoletes: libguestfs-python < %{version} +Obsoletes: python-libguestfs < %{version} +Provides: python-libguestfs = %{version} Requires: guestfs-data >= %{version} -%description -n python-libguestfs -Allows Python scripts to directly use libguestfs. +%description -n python2-libguestfs +Allows Python 2 scripts to directly use libguestfs. + +%package -n python3-libguestfs +Summary: Provides Python 3 support for libguestfs +License: GPL-2.0 +Group: System/Filesystems +%define _configure_python --enable-python +# +Obsoletes: libguestfs-python < %{version} +Obsoletes: python-libguestfs < %{version} +Provides: python-libguestfs = %{version} +Requires: guestfs-data >= %{version} + +%description -n python3-libguestfs +Allows Python 3 scripts to directly use libguestfs. %endif # %if %{with ruby_bindings} @@ -621,6 +638,17 @@ find $RPM_BUILD_ROOT -name "*.bs" -size 0c -print -delete 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=['$RPM_BUILD_ROOT/%{_libdir}'], libraries=:" setup.py +make stamp-extra-files +# Build needs libguestfs library to be installed +%python_build +%python_install +popd +%endif + # find $RPM_BUILD_ROOT -name "*.la" -print -delete rm -fv $RPM_BUILD_ROOT/%{_libdir}/*.a @@ -703,9 +731,13 @@ rm -rf $RPM_BUILD_ROOT %endif # %if %{with python_bindings} -%files -n python-libguestfs +%files -n python2-libguestfs %defattr(-,root,root) -%{_libdir}/python%{pyver}/site-packages/* +%{python2_sitearch}/* + +%files -n python3-libguestfs +%defattr(-,root,root) +%{python3_sitearch}/* %endif # %if %{with ruby_bindings}