]> git.pld-linux.org Git - packages/libguestfs.git/blobdiff - libguestfs.spec
- fix python install
[packages/libguestfs.git] / libguestfs.spec
index 65e52a057880f317364bfa0a6457d4529a18b6a6..f893fa8106aef4351c8d89457a12d38ac6f4d3e4 100644 (file)
@@ -1,21 +1,18 @@
 # TODO:
-# - finish haskell bindings (when finished upstream, not ready as of 1.20.2)
+# - finish haskell bindings (when finished upstream, not ready as of 1.30.4)
 # - PLD appliance support? (needs at least package list adjustment)
-# - unpackaged files
-#        /usr/share/man/ja/man1/libguestfs-make-fixed-appliance.1.gz
-#        /usr/share/man/ja/man3/guestfs-ruby.3.gz
-#        /usr/share/man/uk/man1/libguestfs-make-fixed-appliance.1.gz
-#        /usr/share/man/uk/man3/guestfs-ruby.3.gz
 #
 # Conditional build:
 %bcond_with    static_libs     # build static libraries
 %bcond_with    appliance       # appliance build (no PLD support)
 %bcond_without erlang          # Erlang binding
 %bcond_without golang          # Go language binding
+%bcond_without gtk             # GTK+ based virt-p2v
 %bcond_with    haskell         # Haskell (GHC) binding [incomplete, nothing is installed]
 %bcond_without java            # Java binding
 %bcond_without lua             # Lua binding
 %bcond_without ocaml           # OCaml binding and tools
+%bcond_without ocaml_opt       # skip building native optimized binaries (bytecode is always built)
 %bcond_without perl            # Perl binding
 %bcond_without perltools       # Perl tools
 %bcond_without php             # PHP binding
 %bcond_without ruby            # Ruby binding
 %bcond_without systemtap       # systemtap/dtrace probes
 
+%if 0%{!?php_name:1}
 %define                php_name        php55
+%endif
+
+%ifarch x32
+%undefine      with_erlang
+%undefine      with_golang
+%undefine      with_ocaml_opt
+%endif
+
 %include       /usr/lib/rpm/macros.perl
 %include       /usr/lib/rpm/macros.java
 Summary:       Library and tools for accessing and modifying virtual machine disk images
 Summary(pl.UTF-8):     Biblioteka i narzędzia do dostępu i modyfikacji obrazów dysków maszyn wirtualnych
 Name:          libguestfs
-Version:       1.26.0
-Release:       3
+Version:       1.30.4
+Release:       5
 License:       LGPL v2+
 Group:         Libraries
-Source0:       http://libguestfs.org/download/1.26-stable/%{name}-%{version}.tar.gz
-# Source0-md5: fc00de0acc81441aeddcb1b8cc82b68a
+Source0:       http://libguestfs.org/download/1.30-stable/%{name}-%{version}.tar.gz
+# Source0-md5: 1703d870544fbd4f43259f5339834e44
 Patch0:                ncurses.patch
 Patch1:                augeas-libxml2.patch
 Patch2:                %{name}-link.patch
 Patch3:                %{name}-completionsdir.patch
+Patch4:                golang14nosrcpkg.patch
 URL:           http://libguestfs.org/
 BuildRequires: acl-devel
 BuildRequires: attr-devel
@@ -47,12 +54,14 @@ BuildRequires:      autoconf >= 2.50
 BuildRequires: automake
 BuildRequires: bison
 BuildRequires: cdrkit-mkisofs
+BuildRequires: cpio
 BuildRequires: db-utils
 BuildRequires: flex
-BuildRequires: gettext-devel
+BuildRequires: gettext-tools
 BuildRequires: glib2-devel >= 1:2.26.0
 BuildRequires: gobject-introspection-devel >= 1.30.0
 BuildRequires: gperf
+%{?with_gtk:BuildRequires:     gtk+2-devel >= 2.0}
 BuildRequires: gtk-doc >= 1.14
 BuildRequires: hivex-devel >= 1.2.7
 BuildRequires: libcap-devel
@@ -74,8 +83,8 @@ BuildRequires:        qemu-img >= 1.0
 BuildRequires: readline-devel
 BuildRequires: rpmbuild(macros) >= 1.656
 # libsystemd-journal
-BuildRequires: systemd-devel
-BuildRequires: yajl-devel >= 2
+BuildRequires: systemd-devel >= 1:196
+BuildRequires: yajl-devel >= 2.0.4
 %if %{with appliance}
 BuildRequires: supermin >= 5.1.0
 %endif
@@ -99,12 +108,15 @@ BuildRequires:     lua52
 BuildRequires: lua52-devel
 %endif
 %if %{with ocaml}
-BuildRequires: ocaml
+BuildRequires: ocaml >= 1:4.0
 BuildRequires: ocaml-camlp4
 BuildRequires: ocaml-fileutils-devel
 BuildRequires: ocaml-findlib
 BuildRequires: ocaml-gettext-devel
+BuildRequires: ocaml-libvirt-devel >= 0.6.1.4-4
 BuildRequires: ocaml-pcre-devel
+# for virt-builder
+BuildRequires: xz-devel
 %endif
 %if %{with perl}
 BuildRequires: perl-ExtUtils-MakeMaker
@@ -129,8 +141,8 @@ BuildRequires:      %{php_name}-devel
 BuildRequires: %{php_name}-program
 %endif
 %if %{with python}
-BuildRequires: python
-BuildRequires: python-devel
+BuildRequires: python >= 1:2.7
+BuildRequires: python-devel >= 1:2.7
 BuildRequires: rpm-pythonprov
 %endif
 %if %{with ruby}
@@ -146,6 +158,7 @@ BuildRequires:      ruby-rubygems
 BuildRequires: systemtap-sdt-devel
 %endif
 Requires:      qemu-common >= 1.1.0
+Requires:      yajl >= 2.0.4
 Suggests:      db-utils
 Suggests:      icoutils
 Suggests:      netpbm-progs
@@ -248,6 +261,12 @@ Requires:  %{name} = %{version}-%{release}
 %{?with_ocaml:Requires:        ocaml-libguestfs = %{version}-%{release}}
 %{?with_perltools:Requires:    perl-libguestfs = %{version}-%{release}}
 Requires:      augeas-libs >= 1.0.0
+%if %{with ocaml}
+Requires:      ocaml-libvirt >= 0.6.1.4-4
+Suggests:      unzip
+Suggests:      xz
+Suggests:      zip
+%endif
 
 %description tools
 libguestfs tools for accessing and modifying virtual machine (VM) disk
@@ -417,25 +436,34 @@ Bashowe uzupełnianie argumentów dla narzędzi libguestfs.
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 
 %build
+# preserve dir across libtoolize
+%{__mv} build-aux/snippet{,.back}
 %{__libtoolize}
+%{__mv} build-aux/snippet{.back,}
 %{__aclocal} -I m4
 %{__autoconf}
 %{__autoheader}
 %{__automake}
 %configure \
        vmchannel_test=no \
+       DB_DUMP=/usr/bin/db_dump \
+       DB_LOAD=/usr/bin/db_load \
        %{?with_lua:LUA=/usr/bin/lua5.2} \
        PBMTEXT=/usr/bin/pbmtext \
        PNMTOPNG=/usr/bin/pnmtopng \
        BMPTOPNM=/usr/bin/bmptopnm \
        PAMCUT=/usr/bin/pamcut \
+       UNZIP=/usr/bin/unzip \
        WRESTOOL=/usr/bin/wrestool \
        QEMU=%{_bindir}/qemu \
+       ZIP=/usr/bin/zip \
        --with-completionsdir=%{_datadir}/bash-completion/completions \
        --with-html-dir=%{_gtkdocdir} \
        --with-java=%{?with_java:%{java_home}}%{!?with_java:no} \
+       --with-python-installdir=%{py_sitedir} \
        --with-qemu=qemu \
        --enable-install-daemon \
        %{!?with_appliance:--disable-appliance} \
@@ -452,7 +480,7 @@ Bashowe uzupełnianie argumentów dla narzędzi libguestfs.
        --disable-silent-rules \
        %{__enable_disable static_libs static}
 
-%{__make} \
+%{__make} -j1 \
        INSTALLDIRS=vendor
 
 %install
@@ -477,6 +505,19 @@ rm -rf $RPM_BUILD_ROOT
 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
 %py_postclean
 
+%if %{without appliance}
+%{__rm} $RPM_BUILD_ROOT%{_mandir}/{ja,uk}/man1/libguestfs-make-fixed-appliance.1
+%endif
+%if %{with ocaml}
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/dll*.so.owner
+%else
+%{__rm} $RPM_BUILD_ROOT%{_mandir}/{ja,uk}/man1/virt-{builder,index-validate,resize,sparsify,sysprep,v2v-test-harness}.1 \
+       $RPM_BUILD_ROOT%{_mandir}/{ja,uk}/man3/guestfs-ocaml.3
+%endif
+%if %{without ruby}
+%{__rm} $RPM_BUILD_ROOT%{_mandir}/{ja,uk}/man3/guestfs-ruby.3
+%endif
+
 %find_lang %{name}
 
 %clean
@@ -550,29 +591,24 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/guestunmount
 %attr(755,root,root) %{_bindir}/libguestfs-test-tool
 %attr(755,root,root) %{_bindir}/virt-alignment-scan
-%attr(755,root,root) %{_bindir}/virt-builder
 %attr(755,root,root) %{_bindir}/virt-cat
 %attr(755,root,root) %{_bindir}/virt-copy-in
 %attr(755,root,root) %{_bindir}/virt-copy-out
-%attr(755,root,root) %{_bindir}/virt-customize
 %attr(755,root,root) %{_bindir}/virt-df
+%attr(755,root,root) %{_bindir}/virt-dib
 %attr(755,root,root) %{_bindir}/virt-diff
 %attr(755,root,root) %{_bindir}/virt-edit
 %attr(755,root,root) %{_bindir}/virt-filesystems
 %attr(755,root,root) %{_bindir}/virt-format
-%attr(755,root,root) %{_bindir}/virt-index-validate
+%attr(755,root,root) %{_bindir}/virt-get-kernel
 %attr(755,root,root) %{_bindir}/virt-inspector
+%attr(755,root,root) %{_bindir}/virt-log
 %attr(755,root,root) %{_bindir}/virt-ls
 %attr(755,root,root) %{_bindir}/virt-rescue
 %attr(755,root,root) %{_bindir}/virt-tar-in
 %attr(755,root,root) %{_bindir}/virt-tar-out
 %attr(755,root,root) %{_sbindir}/guestfsd
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libguestfs-tools.conf
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/virt-builder
-%dir /etc/xdg/virt-builder
-%dir /etc/xdg/virt-builder/repos.d
-%config(noreplace) %verify(not md5 mtime size) /etc/xdg/virt-builder/repos.d/libguestfs.conf
-%config(noreplace) %verify(not md5 mtime size) /etc/xdg/virt-builder/repos.d/libguestfs.gpg
 %{_mandir}/man1/guestfish.1*
 %{_mandir}/man1/guestfs-faq.1*
 %{_mandir}/man1/guestfs-performance.1*
@@ -582,18 +618,18 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man1/guestunmount.1*
 %{_mandir}/man1/libguestfs-test-tool.1*
 %{_mandir}/man1/virt-alignment-scan.1*
-%{_mandir}/man1/virt-builder.1*
 %{_mandir}/man1/virt-cat.1*
 %{_mandir}/man1/virt-copy-in.1*
 %{_mandir}/man1/virt-copy-out.1*
-%{_mandir}/man1/virt-customize.1*
 %{_mandir}/man1/virt-df.1*
+%{_mandir}/man1/virt-dib.1*
 %{_mandir}/man1/virt-diff.1*
 %{_mandir}/man1/virt-edit.1*
 %{_mandir}/man1/virt-filesystems.1*
 %{_mandir}/man1/virt-format.1*
-%{_mandir}/man1/virt-index-validate.1*
+%{_mandir}/man1/virt-get-kernel.1*
 %{_mandir}/man1/virt-inspector.1*
+%{_mandir}/man1/virt-log.1*
 %{_mandir}/man1/virt-ls.1*
 %{_mandir}/man1/virt-rescue.1*
 %{_mandir}/man1/virt-tar-in.1*
@@ -609,7 +645,7 @@ rm -rf $RPM_BUILD_ROOT
 %lang(ja) %{_mandir}/ja/man1/guestunmount.1*
 %lang(ja) %{_mandir}/ja/man1/libguestfs-test-tool.1*
 %lang(ja) %{_mandir}/ja/man1/virt-alignment-scan.1*
-%lang(ja) %{_mandir}/ja/man1/virt-builder.1*
+%lang(ja) %{_mandir}/ja/man1/virt-diff.1*
 %lang(ja) %{_mandir}/ja/man1/virt-cat.1*
 %lang(ja) %{_mandir}/ja/man1/virt-copy-in.1*
 %lang(ja) %{_mandir}/ja/man1/virt-copy-out.1*
@@ -617,8 +653,8 @@ rm -rf $RPM_BUILD_ROOT
 %lang(ja) %{_mandir}/ja/man1/virt-edit.1*
 %lang(ja) %{_mandir}/ja/man1/virt-filesystems.1*
 %lang(ja) %{_mandir}/ja/man1/virt-format.1*
-%lang(ja) %{_mandir}/ja/man1/virt-index-validate.1*
 %lang(ja) %{_mandir}/ja/man1/virt-inspector.1*
+%lang(ja) %{_mandir}/ja/man1/virt-log.1*
 %lang(ja) %{_mandir}/ja/man1/virt-ls.1*
 %lang(ja) %{_mandir}/ja/man1/virt-rescue.1*
 %lang(ja) %{_mandir}/ja/man1/virt-tar-in.1*
@@ -633,34 +669,56 @@ rm -rf $RPM_BUILD_ROOT
 %lang(uk) %{_mandir}/uk/man1/guestunmount.1*
 %lang(uk) %{_mandir}/uk/man1/libguestfs-test-tool.1*
 %lang(uk) %{_mandir}/uk/man1/virt-alignment-scan.1*
-%lang(uk) %{_mandir}/uk/man1/virt-builder.1*
 %lang(uk) %{_mandir}/uk/man1/virt-cat.1*
 %lang(uk) %{_mandir}/uk/man1/virt-copy-in.1*
 %lang(uk) %{_mandir}/uk/man1/virt-copy-out.1*
 %lang(uk) %{_mandir}/uk/man1/virt-df.1*
+%lang(uk) %{_mandir}/uk/man1/virt-diff.1*
 %lang(uk) %{_mandir}/uk/man1/virt-edit.1*
 %lang(uk) %{_mandir}/uk/man1/virt-filesystems.1*
 %lang(uk) %{_mandir}/uk/man1/virt-format.1*
-%lang(uk) %{_mandir}/uk/man1/virt-index-validate.1*
 %lang(uk) %{_mandir}/uk/man1/virt-inspector.1*
+%lang(uk) %{_mandir}/uk/man1/virt-log.1*
 %lang(uk) %{_mandir}/uk/man1/virt-ls.1*
 %lang(uk) %{_mandir}/uk/man1/virt-rescue.1*
 %lang(uk) %{_mandir}/uk/man1/virt-tar-in.1*
 %lang(uk) %{_mandir}/uk/man1/virt-tar-out.1*
 %lang(uk) %{_mandir}/uk/man5/libguestfs-tools.conf.5*
 %if %{with ocaml}
+%attr(755,root,root) %{_bindir}/virt-builder
+%attr(755,root,root) %{_bindir}/virt-customize
+%attr(755,root,root) %{_bindir}/virt-index-validate
 %attr(755,root,root) %{_bindir}/virt-resize
 %attr(755,root,root) %{_bindir}/virt-sparsify
 %attr(755,root,root) %{_bindir}/virt-sysprep
+%attr(755,root,root) %{_bindir}/virt-v2v
+# compat dir symlink
+%{_sysconfdir}/virt-builder
+%dir /etc/xdg/virt-builder
+%dir /etc/xdg/virt-builder/repos.d
+%config(noreplace) %verify(not md5 mtime size) /etc/xdg/virt-builder/repos.d/libguestfs.conf
+%config(noreplace) %verify(not md5 mtime size) /etc/xdg/virt-builder/repos.d/libguestfs.gpg
+%{_mandir}/man1/virt-builder.1*
+%{_mandir}/man1/virt-customize.1*
+%{_mandir}/man1/virt-index-validate.1*
 %{_mandir}/man1/virt-resize.1*
 %{_mandir}/man1/virt-sparsify.1*
 %{_mandir}/man1/virt-sysprep.1*
+%{_mandir}/man1/virt-v2v.1*
+%lang(ja) %{_mandir}/ja/man1/virt-builder.1*
+%lang(ja) %{_mandir}/ja/man1/virt-customize.1*
+%lang(ja) %{_mandir}/ja/man1/virt-index-validate.1*
 %lang(ja) %{_mandir}/ja/man1/virt-resize.1*
 %lang(ja) %{_mandir}/ja/man1/virt-sparsify.1*
 %lang(ja) %{_mandir}/ja/man1/virt-sysprep.1*
+%lang(ja) %{_mandir}/ja/man1/virt-v2v.1*
+%lang(uk) %{_mandir}/uk/man1/virt-builder.1*
+%lang(uk) %{_mandir}/uk/man1/virt-customize.1*
+%lang(uk) %{_mandir}/uk/man1/virt-index-validate.1*
 %lang(uk) %{_mandir}/uk/man1/virt-resize.1*
 %lang(uk) %{_mandir}/uk/man1/virt-sparsify.1*
 %lang(uk) %{_mandir}/uk/man1/virt-sysprep.1*
+%lang(uk) %{_mandir}/uk/man1/virt-v2v.1*
 %endif
 %if %{with perltools}
 %attr(755,root,root) %{_bindir}/virt-list-filesystems
@@ -685,6 +743,22 @@ rm -rf $RPM_BUILD_ROOT
 %lang(uk) %{_mandir}/uk/man1/virt-win-reg.1*
 %endif
 
+%if %{with gtk}
+%attr(755,root,root) %{_bindir}/virt-p2v-make-disk
+%attr(755,root,root) %{_bindir}/virt-p2v-make-kickstart
+%attr(755,root,root) %{_libexecdir}/virt-p2v
+%{_datadir}/virt-p2v
+%{_mandir}/man1/virt-p2v.1*
+%{_mandir}/man1/virt-p2v-make-disk.1*
+%{_mandir}/man1/virt-p2v-make-kickstart.1*
+%lang(ja) %{_mandir}/ja/man1/virt-p2v.1*
+%lang(ja) %{_mandir}/ja/man1/virt-p2v-make-disk.1*
+%lang(ja) %{_mandir}/ja/man1/virt-p2v-make-kickstart.1*
+%lang(uk) %{_mandir}/uk/man1/virt-p2v.1*
+%lang(uk) %{_mandir}/uk/man1/virt-p2v-make-disk.1*
+%lang(uk) %{_mandir}/uk/man1/virt-p2v-make-kickstart.1*
+%endif
+
 %if %{with appliance}
 %attr(755,root,root) %{_sbindir}/libguestfs-make-fixed-appliance
 %{_mandir}/man1/libguestfs-make-fixed-appliance.1*
@@ -716,7 +790,7 @@ rm -rf $RPM_BUILD_ROOT
 %dir %{_libdir}/golang/pkg/linux_*/libguestfs.org
 %dir %{_libdir}/golang/pkg/linux_*/libguestfs.org/guestfs
 %{_libdir}/golang/pkg/linux_*/libguestfs.org/guestfs/guestfs.a
-%{_libdir}/golang/src/pkg/libguestfs.org
+%{_libdir}/golang/src/libguestfs.org
 %{_mandir}/man3/guestfs-golang.3*
 %lang(ja) %{_mandir}/ja/man3/guestfs-golang.3*
 %lang(uk) %{_mandir}/uk/man3/guestfs-golang.3*
@@ -751,20 +825,33 @@ rm -rf $RPM_BUILD_ROOT
 %files -n ocaml-libguestfs
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllmlguestfs.so
-%{_libdir}/ocaml/stublibs/dllmlguestfs.so.owner
+%attr(755,root,root) %{_libdir}/ocaml/stublibs/dllv2v_test_harness.so
+%dir %{_libdir}/ocaml/guestfs
+%{_libdir}/ocaml/guestfs/META
+%{_libdir}/ocaml/guestfs/mlguestfs.cma
 
 %files -n ocaml-libguestfs-devel
 %defattr(644,root,root,755)
-%dir %{_libdir}/ocaml/guestfs
-%{_libdir}/ocaml/guestfs/META
 %{_libdir}/ocaml/guestfs/guestfs.cmi
-%{_libdir}/ocaml/guestfs/guestfs.cmx
 %{_libdir}/ocaml/guestfs/guestfs.mli
 %{_libdir}/ocaml/guestfs/libmlguestfs.a
+%dir %{_libdir}/ocaml/v2v_test_harness
+%{_libdir}/ocaml/v2v_test_harness/META
+%{_libdir}/ocaml/v2v_test_harness/libv2v_test_harness.a
+%{_libdir}/ocaml/v2v_test_harness/v2v_test_harness.cmi
+%{_libdir}/ocaml/v2v_test_harness/v2v_test_harness.mli
+%if %{with ocaml_opt}
+%{_libdir}/ocaml/guestfs/guestfs.cmx
 %{_libdir}/ocaml/guestfs/mlguestfs.a
-%{_libdir}/ocaml/guestfs/mlguestfs.cma
 %{_libdir}/ocaml/guestfs/mlguestfs.cmxa
+%{_libdir}/ocaml/v2v_test_harness/v2v_test_harness.a
+%{_libdir}/ocaml/v2v_test_harness/v2v_test_harness.cmx
+%{_libdir}/ocaml/v2v_test_harness/v2v_test_harness.cmxa
+%endif
+%{_mandir}/man1/virt-v2v-test-harness.1*
 %{_mandir}/man3/guestfs-ocaml.3*
+%lang(ja) %{_mandir}/ja/man1/virt-v2v-test-harness.1*
+%lang(uk) %{_mandir}/uk/man1/virt-v2v-test-harness.1*
 %lang(ja) %{_mandir}/ja/man3/guestfs-ocaml.3*
 %lang(uk) %{_mandir}/uk/man3/guestfs-ocaml.3*
 %endif
@@ -775,7 +862,6 @@ rm -rf $RPM_BUILD_ROOT
 %{perl_vendorarch}/Sys/Guestfs.pm
 %{perl_vendorarch}/Sys/bindtests.pl
 %dir %{perl_vendorarch}/auto/Sys/Guestfs
-%{perl_vendorarch}/auto/Sys/Guestfs/Guestfs.bs
 %attr(755,root,root) %{perl_vendorarch}/auto/Sys/Guestfs/Guestfs.so
 %{_mandir}/man3/guestfs-perl.3*
 %{_mandir}/man3/Sys::Guestfs.3pm*
This page took 0.079436 seconds and 4 git commands to generate.