diff --git a/libguestfs.changes b/libguestfs.changes index 257a3b4..4a960ed 100644 --- a/libguestfs.changes +++ b/libguestfs.changes @@ -1,9 +1,3 @@ -------------------------------------------------------------------- -Mon Mar 18 18:46:34 UTC 2013 - dmueller@suse.com - -- use proper build conditionals so that it can be influenced - outside spec file (via e.g. prjconf) - ------------------------------------------------------------------- Wed Mar 6 20:27:13 CET 2013 - ohering@suse.de diff --git a/libguestfs.spec b/libguestfs.spec index 8214d4c..6ee5bbe 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -1,7 +1,7 @@ # # spec file for package libguestfs # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2011 Michal Hrusecky # # All modifications and additions to the file contributed by third parties @@ -16,7 +16,6 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - %define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) %if !%opt # get rid of /usr/lib/rpm/find-debuginfo.sh @@ -25,34 +24,34 @@ %undefine _build_create_debug %endif -# disable certain features for a SLES11 build -# in Virtualization repo in OBS they're reenabled via prjconf -%if %suse_version == 1110 -%bcond_with ocaml_bindings -%bcond_with lua_bindings -%bcond_with python_bindings -%bcond_with perl_bindings -%bcond_with hivex -%bcond_with zerofree -%bcond_without ext4_writeable -%else -%bcond_without ocaml_bindings -%bcond_without lua_bindings -%bcond_without python_bindings -%bcond_without perl_bindings -%bcond_without hivex -%bcond_without zerofree -%bcond_with ext4_writeable -%endif - -%bcond_without fuse - +%define with_ocaml_tools 1 +%define with_ocaml_bindings 1 +%define with_lua_bindings 1 +%define with_python_bindings 1 +%define with_perl_bindings 1 %if %suse_version > 1210 -%bcond_without ruby_bindings +%define with_ruby_bindings 1 %else -%bcond_with ruby_bindings +%define with_ruby_bindings 0 %endif - +%define with_fuse 1 +%define with_hivex 1 +%define with_zerofree 1 +# disable certain features for a SLES11 build +%if %suse_version == 1110 +%if "%_project" == "Virtualization" +# leave features enabled in OBS main repo +%else +%define with_ocaml_bindings 0 +%define with_lua_bindings 0 +%define with_perl_bindings 0 +%define with_python_bindings 0 +%define with_ruby_bindings 0 +%define with_hivex 0 +%define with_zerofree 0 +%endif +%endif +# # The following defines are overridden in the individual subpackages %define _configure_fuse --disable-fuse %define _configure_lua --disable-lua @@ -82,6 +81,9 @@ Name: libguestfs %if "%{?_ignore_exclusive_arch}" == "" ExclusiveArch: %ix86 x86_64 %endif +BuildRequires: libacl-devel +BuildRequires: autoconf +BuildRequires: automake BuildRequires: aaa_base BuildRequires: attr-devel BuildRequires: augeas-devel @@ -91,7 +93,6 @@ BuildRequires: file-devel BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: gperf -BuildRequires: libacl-devel BuildRequires: libcap-devel %if %suse_version >= 1220 BuildRequires: libconfig-devel @@ -99,34 +100,36 @@ BuildRequires: libconfig-devel BuildRequires: libtool BuildRequires: libvirt-devel >= 0.10.2 BuildRequires: ncurses-devel -%if %{with perl_bindings} %if %suse_version < 1140 BuildRequires: perl-macros %endif -%endif BuildRequires: pcre-devel BuildRequires: pkg-config BuildRequires: readline-devel -%if %{with ocaml_bindings} +# +%if %{with_ocaml_bindings} +%define with_ocaml_tools 1 +%endif +%if %{with_ocaml_tools} # Required to build tools, its independent from bindings BuildRequires: ocaml BuildRequires: ocaml-findlib %define _configure_ocaml --enable-ocaml %endif # -%if %{with fuse} +%if %{with_fuse} BuildRequires: fuse-devel %define _configure_fuse --enable-fuse %endif # -%if %{with hivex} +%if %{with_hivex} BuildRequires: hivex-devel %endif # Url: http://libguestfs.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-build Summary: Compatibility package for guestfs-tools -License: GPL-2.0 +License: GPL-2 Group: System/Filesystems Version: 1.20.3 Release: 0 @@ -158,12 +161,11 @@ virtual machines. %package -n guestfs-tools Summary: Tools for accessing and modifying virtual machine disk images -License: GPL-2.0 Group: System/Filesystems Provides: %{name} = %{version} Obsoletes: %{name} < %{version} Requires: kvm >= 1.1 -%if %{with perl_bindings} +%if %{with_perl_bindings} Requires: perl(Data::Dumper) Requires: perl(File::Basename) Requires: perl(File::Temp) @@ -173,12 +175,12 @@ Requires: perl(Pod::Usage) Requires: perl(String::ShellQuote) Requires: perl(Sys::Guestfs) Requires: perl(Sys::Guestfs::Lib) -%{perl_requires} -%if %{with hivex} +%if %{with_hivex} Requires: perl(Win::Hivex) Requires: perl(Win::Hivex::Regedit) %endif %endif +%{perl_requires} Recommends: guestfs-data Conflicts: guestfs-data < %{version} Conflicts: libguestfs0 < %{version} @@ -201,7 +203,6 @@ virtual machines. %package -n guestfsd Summary: Daemon for the libguestfs appliance -License: GPL-2.0 Group: System/Filesystems %description -n guestfsd @@ -210,10 +211,9 @@ and performs the requested action by calling the helper binaries. This package is only required for building the appliance. # -%if %{with ocaml_bindings} +%if %{with_ocaml_bindings} %package -n ocaml-libguestfs Summary: Provides OCaml support for libguestfs -License: GPL-2.0 Group: System/Filesystems # @@ -222,17 +222,15 @@ Allows OCaml scripts to directly use libguestfs. %package -n ocaml-libguestfs-devel Summary: Provides OCaml support for libguestfs -License: GPL-2.0 Group: Development/Libraries/Other %description -n ocaml-libguestfs-devel Allows OCaml scripts to directly use libguestfs. %endif # -%if %{with perl_bindings} +%if %{with_perl_bindings} %package -n perl-Sys-Guestfs Summary: Provides Perl support for libguestfs -License: GPL-2.0 Group: System/Filesystems BuildRequires: perl BuildRequires: perl(Data::Dumper) @@ -241,7 +239,7 @@ BuildRequires: perl(Locale::TextDomain) BuildRequires: perl(Pod::Usage) BuildRequires: perl(String::ShellQuote) BuildRequires: perl(Sys::Virt) -%if %{with hivex} +%if %{with_hivex} BuildRequires: perl(Win::Hivex) BuildRequires: perl(Win::Hivex::Regedit) %endif @@ -257,10 +255,9 @@ Requires: perl(Locale::TextDomain) Allows Perl scripts to directly use libguestfs. %endif # -%if %{with lua_bindings} +%if %{with_lua_bindings} %package -n lua-libguestfs Summary: Provides Lua support for libguestfs -License: GPL-2.0 Group: System/Filesystems BuildRequires: lua-devel %define _configure_lua --enable-lua @@ -270,10 +267,9 @@ BuildRequires: lua-devel Allows lua scripts to directly use libguestfs. %endif # -%if %{with python_bindings} +%if %{with_python_bindings} %package -n python-libguestfs Summary: Provides Python support for libguestfs -License: GPL-2.0 Group: System/Filesystems %define pyver %(python -c "import sys; print sys.version[:3]") BuildRequires: python @@ -287,10 +283,9 @@ Obsoletes: libguestfs-python < %{version} Allows Python scripts to directly use libguestfs. %endif # -%if %{with ruby_bindings} +%if %{with_ruby_bindings} %package -n rubygem-libguestfs Summary: Ruby bindings for libguestfs -License: GPL-2.0 Group: System/Filesystems BuildRequires: ruby BuildRequires: ruby-devel @@ -319,9 +314,15 @@ BuildRequires: e2fsprogs # ext4 in the sles11 kernel-binary.rpm packages operates only in read-only mode. # The generated initrd operates inside the temporary guest on image files. # For that reason it needs to make modifications to any kind of filesystems. -%if %{with ext4_writeable} +# Make use of an ext4 driver with write support. But: +# This package exists only in the internal buildservice, so require it only there. +%if %suse_version == 1110 +%if "%_project" == "Virtualization" +# package does not exist in OBS main repo +%else BuildRequires: ext4-writeable-kmp-default %endif +%endif BuildRequires: file BuildRequires: findutils BuildRequires: gawk @@ -348,11 +349,10 @@ BuildRequires: udev BuildRequires: util-linux BuildRequires: xfsprogs BuildRequires: xz -%if %{with zerofree} +%if %{with_zerofree} BuildRequires: zerofree %endif Summary: Virtual machine needed for libguestfs -License: GPL-2.0 Group: System/Filesystems Provides: libguestfs-data = %{version} Obsoletes: libguestfs-data < %{version} @@ -364,7 +364,6 @@ This package provides such an image, an initrd and a kernel. %package devel Summary: Development files for libguestfs -License: GPL-2.0 Group: Development/Libraries/Other Requires: libguestfs0 = %{version} @@ -387,8 +386,8 @@ guestfish, or use virt-rescue to get a rescue shell for fixing unbootable virtual machines. %package -n libguestfs0 -Summary: Runtime library of libguestfs License: LGPL-2.1 +Summary: Runtime library of libguestfs Group: System/Filesystems %description -n libguestfs0 @@ -481,7 +480,7 @@ export NO_BRP_STRIP_DEBUG=true %endif %makeinstall #remove ocaml bindings files if they are disable via rpm macro -%if !%{with ocaml_bindings} +%if !%{with_ocaml_bindings} rm -rfv $RPM_BUILD_ROOT%{_libdir}/ocaml %endif rm -rfv $RPM_BUILD_ROOT%{guestfs_docdir} @@ -490,7 +489,7 @@ find $RPM_BUILD_ROOT -type f \( \ -name "virt-list-partitions" -o -name "virt-list-partitions.*" -o \ -name "virt-tar" -o -name "virt-tar.*" \ \) -print -delete -%if %{with perl_bindings} +%if %{with_perl_bindings} # Delete empty perl bootstrap files find $RPM_BUILD_ROOT -name "*.bs" -size 0c -print -delete # Delete unused perl script without executable permissions @@ -656,7 +655,7 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root) %{_libdir}/guestfs -%if %{with ocaml_bindings} +%if %{with_ocaml_bindings} %files -n ocaml-libguestfs %defattr(-,root,root) %dir %{_libdir}/ocaml @@ -678,13 +677,13 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/ocaml/guestfs/*.mli %endif # -%if %{with lua_bindings} +%if %{with_lua_bindings} %files -n lua-libguestfs %defattr(-,root,root) %{_libdir}/lua %endif # -%if %{with perl_bindings} +%if %{with_perl_bindings} %post -n perl-Sys-Guestfs -p /sbin/ldconfig %postun -n perl-Sys-Guestfs -p /sbin/ldconfig @@ -693,13 +692,13 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root) %endif # -%if %{with python_bindings} +%if %{with_python_bindings} %files -n python-libguestfs %defattr(-,root,root) %{_libdir}/python%{pyver}/site-packages/* %endif # -%if %{with ruby_bindings} +%if %{with_ruby_bindings} %files -n rubygem-libguestfs %defattr(-,root,root) %{_libdir}/ruby