From 7f0f21c3573dd5d40ce4dd69ee8a920ae6812095326bec8994e7c50b7a95e79b Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Wed, 15 Aug 2012 18:06:38 +0000 Subject: [PATCH] - Update to version 1.19.30 move python, perl and ruby bindings to extra package OBS-URL: https://build.opensuse.org/package/show/Virtualization/libguestfs?expand=0&rev=4 --- libguestfs-1.13.14.tar.bz2 | 3 - libguestfs-1.19.30.patch | 28 +++++++++ libguestfs-1.19.30.tar.gz | 3 + libguestfs.changes | 6 ++ libguestfs.spec | 119 ++++++++++++++++++++++++++++++------- 5 files changed, 135 insertions(+), 24 deletions(-) delete mode 100644 libguestfs-1.13.14.tar.bz2 create mode 100644 libguestfs-1.19.30.patch create mode 100644 libguestfs-1.19.30.tar.gz diff --git a/libguestfs-1.13.14.tar.bz2 b/libguestfs-1.13.14.tar.bz2 deleted file mode 100644 index 46cb72c..0000000 --- a/libguestfs-1.13.14.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6bf9d1627a712b583c91e0cd0ecf973024761e4428c465e3cd675af06b5fbe02 -size 3891453 diff --git a/libguestfs-1.19.30.patch b/libguestfs-1.19.30.patch new file mode 100644 index 0000000..2622cb2 --- /dev/null +++ b/libguestfs-1.19.30.patch @@ -0,0 +1,28 @@ +[ 193s] ERROR: RPATH "/home/abuild/rpmbuild/BUILD/libguestfs-1.19.30/src/.libs" on /home/abuild/rpmbuild/BUILDROOT/libguestfs-1.19.30-1.x86_64/usr/lib/perl5/site_perl/5.16.0/x86_64-linux-thread-multi/auto/Sys/Guestfs/Guestfs.so is not allowed +[ 193s] ERROR: RPATH "/home/abuild/rpmbuild/BUILD/libguestfs-1.19.30/src/.libs" on /home/abuild/rpmbuild/BUILDROOT/libguestfs-1.19.30-1.x86_64/usr/lib/perl5/site_perl/5.16.0/x86_64-linux-thread-multi/auto/Sys/Guestfs/Guestfs.so is not allowed +--- + perl/Makefile.am | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +Index: libguestfs-1.19.30/perl/Makefile.am +=================================================================== +--- libguestfs-1.19.30.orig/perl/Makefile.am ++++ libguestfs-1.19.30/perl/Makefile.am +@@ -65,6 +65,8 @@ all: Makefile-pl src_deps + + Makefile-pl: Makefile.PL + perl Makefile.PL INSTALLDIRS=$(INSTALLDIRS) PREFIX=$(prefix) ++ @set -x ; \ ++ for i in `grep -wl ^LD_RUN_PATH Makefile*` ; do sed -i~ 's@^LD_RUN_PATH.*@LD_RUN_PATH=@' $$i ; done + + # No! Otherwise it is deleted before the clean-local rule runs. + #CLEANFILES = Makefile-pl +@@ -74,7 +76,7 @@ clean-local: + rm -f Makefile-pl + + install-data-hook: +- $(MAKE) -f Makefile-pl DESTDIR=$(DESTDIR) install ++ $(MAKE) -f Makefile-pl DESTDIR=$(DESTDIR) install_vendor + + endif + diff --git a/libguestfs-1.19.30.tar.gz b/libguestfs-1.19.30.tar.gz new file mode 100644 index 0000000..6657988 --- /dev/null +++ b/libguestfs-1.19.30.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:84c70dfe6b85c4fcf0f3788be104b3d288dca51a8b9bbe430d3e2b2914d61519 +size 7951991 diff --git a/libguestfs.changes b/libguestfs.changes index 57ca636..701de2c 100644 --- a/libguestfs.changes +++ b/libguestfs.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Aug 15 20:05:40 CEST 2012 - ohering@suse.de + +- Update to version 1.19.30 + move python, perl and ruby bindings to extra package + ------------------------------------------------------------------- Tue Aug 7 11:12:47 CEST 2012 - ohering@suse.de diff --git a/libguestfs.spec b/libguestfs.spec index 0d49451..a48e01b 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -1,3 +1,6 @@ +%define with_python 1 +%define with_perl 1 +%define with_ruby 1 # Copyright (c) 2011 Michal Hrusecky # # All modifications and additions to the file contributed by third parties @@ -14,20 +17,57 @@ Name: libguestfs ExclusiveArch: %ix86 x86_64 -BuildRequires: gcc gcc-c++ libtool automake autoconf pkg-config ruby gperf genisoimage qemu kvm pcre-devel libvirt-devel ncurses-devel readline-devel xz ruby-devel rubygem-rake hivex-devel +BuildRequires: gcc gcc-c++ libtool automake autoconf pkg-config gperf genisoimage qemu kvm pcre-devel libvirt-devel ncurses-devel readline-devel xz hivex-devel +# +%if %{with_perl} +BuildRequires: perl +BuildRequires: perl-macros +BuildRequires: perl(Getopt::Long) +BuildRequires: perl(Data::Dumper) +BuildRequires: perl(Locale::TextDomain) +BuildRequires: perl(Pod::Usage) +%if 0 +BuildRequires: perl(Win::Hivex) +BuildRequires: perl(Win::Hivex::Regedit) +BuildRequires: perl(String::ShellQuote) +%endif +BuildRequires: perl(Sys::Virt) + +%{perl_requires} +%define _configure_perl --enable-perl +%else +%define _configure_perl --disable-perl +%endif +# +%if %{with_python} +%define pyver %(python -c "import sys; print sys.version[:3]") +BuildRequires: python python-devel +%define _configure_python --enable-python +%else +%define _configure_python --disable-python +%endif +# +%if %{with_ruby} +BuildRequires: ruby ruby-devel rubygem-rake +%define _configure_ruby --enable-ruby +%else +%define _configure_ruby --disable-ruby +%endif +# # libconfig-devel fuse-devel libulockmgr1 Url: http://libguestfs.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-build -License: GPLv2 +License: LGPL-2.1 Summary: Tools for accessing and modifying virtual machine disk images Group: System/Filesystems -Version: 1.13.14 +Version: 1.19.30 Release: 1 +Patch: libguestfs-1.19.30.patch Patch1: libguestfs-1.13.14-disable-erlang.patch Patch2: libguestfs-1.13.14-provided-appliance.patch Patch3: libguestfs-1.13.14-no-machine.patch Patch5: libguestfs-1.13.14-ruby.patch -Source0: %{name}-%{version}.tar.bz2 +Source0: %{name}-%{version}.tar.gz Source1: guestfs.tar.xz Recommends: %{name}-data @@ -48,9 +88,7 @@ guestfish, or use virt-rescue to get a rescue shell for fixing unbootable virtual machines. %package doc -License: GPLv2 Summary: Documentation for libguestfs -Group: System/Filesystems %description doc Documentation for libguestfs. @@ -70,10 +108,27 @@ All this functionality is available through a convenient shell called guestfish, or use virt-rescue to get a rescue shell for fixing unbootable virtual machines. +# +%if %{with_perl} +%package perl +Summary: Allows Perl scripts to directly use libguestfs +Requires: perl = %{perl_version} + +%description perl +Provides Perl support for libguestfs. +%endif +# +%if %{with_python} +%package python +Summary: Allows Python scripts to directly use libguestfs + +%description python +Provides Python support for libguestfs. +%endif +# +%if %{with_ruby} %package -n rubygem-libguestfs -License: GPLv2 Summary: Ruby bindings for libguestfs -Group: System/Filesystems %description -n rubygem-libguestfs Ruby bindings for libguestfs. @@ -92,14 +147,12 @@ ISOs, SD cards, and dozens more. libguestfs doesn't need root permissions. All this functionality is available through a convenient shell called guestfish, or use virt-rescue to get a rescue shell for fixing unbootable virtual machines. - +%endif %package data -License: GPLv2 Summary: Virtual machine needed for libguestfs Version: 15 Requires: %{name} -Group: System/Filesystems %description data libguestfs needs for it's run virtual machine image. This package provides such @@ -107,9 +160,7 @@ an image. %package devel -License: GPLv2 Summary: Development files for libguestfs -Group: System/Filesystems %description devel Development files for libguestfs. @@ -130,9 +181,7 @@ guestfish, or use virt-rescue to get a rescue shell for fixing unbootable virtual machines. %package -n libguestfs0 -License: GPLv2 Summary: libguestfs library -Group: System/Filesystems %description -n libguestfs0 Library for libguestfs. @@ -156,22 +205,31 @@ virtual machines. %prep %setup -q -%patch1 -%patch2 -%patch3 -%patch5 +%patch -p1 %build autoreconf -fi -export vmchannel_test=no -%configure --disable-appliance --disable-perl --disable-python --disable-ocaml --disable-haskell --disable-php --enable-rpath=no --disable-rpath --disable-static +%configure \ + --help || : +%configure \ + --disable-appliance \ + --disable-haskell \ + --disable-ocaml \ + --disable-php \ + %{_configure_perl} \ + %{_configure_python} \ + %{_configure_ruby} \ + --disable-rpath \ + --disable-static make %{?jobs:-j%jobs} %install %makeinstall +find $RPM_BUILD_ROOT \( -name "*.pod" -o -name ".packlist" \) -print0 | xargs -0 --no-run-if-empty rm -fv rm -f $RPM_BUILD_ROOT/%{_libdir}/*.{l,}a xz -cd %{S:1} | tar -C $RPM_BUILD_ROOT/%{_libdir} -xvf - %find_lang %{name} +# %clean rm -rf $RPM_BUILD_ROOT @@ -187,9 +245,28 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root) %{_libdir}/guestfs +# +%if %{with_perl} +%post perl -p /sbin/ldconfig + +%postun perl -p /sbin/ldconfig + +%files perl -f %{name}.files +%defattr(-,root,root) +%perl_vendorarch/* +%endif +# +%if %{with_python} +%files python +%defattr(-,root,root) +%{_libdir}/python%{pyver}/site-packages/* +%endif +# +%if %{with_ruby} %files -n rubygem-libguestfs %defattr(-,root,root) %{_libdir}/ruby +%endif %files -n libguestfs0 %defattr(-,root,root)