diff --git a/0000-hotfix.patch b/0000-hotfix.patch index 4a9294a..473a0f4 100644 --- a/0000-hotfix.patch +++ b/0000-hotfix.patch @@ -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/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-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..615cef1 100644 --- a/libguestfs.changes +++ b/libguestfs.changes @@ -1,3 +1,34 @@ +------------------------------------------------------------------- +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 + +- add dependency on augeas (bsc#1048620) + +------------------------------------------------------------------- +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 +- 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..11e4ef9 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 @@ -143,7 +142,7 @@ 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 @@ -156,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) @@ -200,7 +199,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 +209,6 @@ Requires: fuse Requires: curl Requires: gpg2 Requires: xz -Conflicts: guestfs-data < %{version} Conflicts: libguestfs0 < %{version} %description -n guestfs-tools @@ -244,9 +242,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. @@ -280,6 +278,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 @@ -294,6 +293,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 # @@ -302,20 +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} @@ -326,6 +344,7 @@ Group: System/Filesystems BuildRequires: ruby BuildRequires: ruby-devel BuildRequires: rubygem-rake +Requires: guestfs-data >= %{version} %define _configure_ruby --enable-ruby # @@ -407,6 +426,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 @@ -504,6 +525,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 @@ -615,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 @@ -697,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}