rpm spec cleanup and split off client only package

* libvirt.spec.in: make a client rpm with shared libs, client binaries
  and resources needed by those, and a small number of fixes and
  cleanups in the spec file.
This commit is contained in:
Daniel Veillard 2009-07-21 11:16:15 +02:00
parent 4567905790
commit 7641c3c782

View File

@ -76,23 +76,15 @@ Source: libvirt-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
URL: http://libvirt.org/ URL: http://libvirt.org/
BuildRequires: python python-devel BuildRequires: python python-devel
Requires: libxml2
Requires: readline # The client side, i.e. shared libs and virsh are in a subpackage
Requires: ncurses Requires: libvirt-client = %{version}-%{release}
Requires: dnsmasq Requires: dnsmasq
Requires: bridge-utils Requires: bridge-utils
Requires: iptables Requires: iptables
# needed for device enumeration # needed for device enumeration
Requires: hal Requires: hal
# So remote clients can access libvirt over SSH tunnel
# (client invokes 'nc' against the UNIX socket on the server)
Requires: nc
%if %{with_sasl}
Requires: cyrus-sasl
# Not technically required, but makes 'out-of-box' config
# work correctly & doesn't have onerous dependencies
Requires: cyrus-sasl-md5
%endif
%if %{with_polkit} %if %{with_polkit}
Requires: PolicyKit >= 0.6 Requires: PolicyKit >= 0.6
%endif %endif
@ -186,24 +178,43 @@ BuildRequires: numactl-devel
%if %{with_capng} %if %{with_capng}
BuildRequires: capng-devel >= 0.5.0 BuildRequires: capng-devel >= 0.5.0
%endif %endif
Obsoletes: libvir
# Fedora build root suckage # Fedora build root suckage
BuildRequires: gawk BuildRequires: gawk
%description %description
Libvirt is a C toolkit to interact with the virtualization capabilities Libvirt is a C toolkit to interact with the virtualization capabilities
of recent versions of Linux (and other OSes). of recent versions of Linux (and other OSes). The main package includes
the libvirtd server exporting the virtualization support.
%package client
Summary: client side library and utilities of the libvirt library
Group: Development/Libraries
Requires: libxml2
Requires: readline
Requires: ncurses
# So remote clients can access libvirt over SSH tunnel
# (client invokes 'nc' against the UNIX socket on the server)
Requires: nc
%if %{with_sasl}
Requires: cyrus-sasl
# Not technically required, but makes 'out-of-box' config
# work correctly & doesn't have onerous dependencies
Requires: cyrus-sasl-md5
%endif
%description client
Shared libraries and client binaries needed to access to the
virtualization capabilities of recent versions of Linux (and other OSes).
%package devel %package devel
Summary: Libraries, includes, etc. to compile with the libvirt library Summary: Libraries, includes, etc. to compile with the libvirt library
Group: Development/Libraries Group: Development/Libraries
Requires: libvirt = %{version} Requires: libvirt = %{version}-%{release}
Requires: pkgconfig Requires: pkgconfig
%if %{with_xen} %if %{with_xen}
Requires: xen-devel Requires: xen-devel
%endif %endif
Obsoletes: libvir-devel
%description devel %description devel
Includes and documentations for the C library providing an API to use Includes and documentations for the C library providing an API to use
@ -213,8 +224,7 @@ the virtualization capabilities of recent versions of Linux (and other OSes).
%package python %package python
Summary: Python bindings for the libvirt library Summary: Python bindings for the libvirt library
Group: Development/Libraries Group: Development/Libraries
Requires: libvirt = %{version} Requires: libvirt = %{version}-%{release}
Obsoletes: libvir-python
%description python %description python
The libvirt-python package contains a module that permits applications The libvirt-python package contains a module that permits applications
@ -322,6 +332,7 @@ of recent versions of Linux (and other OSes).
--with-init-script=redhat \ --with-init-script=redhat \
--with-remote-pid-file=%{_localstatedir}/run/libvirtd.pid --with-remote-pid-file=%{_localstatedir}/run/libvirtd.pid
make %{?_smp_mflags} make %{?_smp_mflags}
gzip -9 ChangeLog
%install %install
rm -fr %{buildroot} rm -fr %{buildroot}
@ -399,15 +410,10 @@ fi
%postun %postun
/sbin/ldconfig /sbin/ldconfig
%files -f %{name}.lang %files
%defattr(-, root, root) %defattr(-, root, root)
%doc AUTHORS ChangeLog NEWS README COPYING.LIB TODO %doc AUTHORS ChangeLog.gz NEWS README COPYING.LIB TODO
%{_mandir}/man1/virsh.1*
%{_mandir}/man1/virt-xml-validate.1*
%{_bindir}/virsh
%{_bindir}/virt-xml-validate
%{_libdir}/lib*.so.*
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/ %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/
%if %{with_qemu} %if %{with_qemu}
@ -427,26 +433,12 @@ fi
%config(noreplace) %{_sysconfdir}/libvirt/qemu.conf %config(noreplace) %{_sysconfdir}/libvirt/qemu.conf
%endif %endif
%if %{with_sasl}
%config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf
%endif
%if %{with_qemu} %if %{with_qemu}
%dir %{_datadir}/libvirt/ %dir %{_datadir}/libvirt/
%dir %{_datadir}/libvirt/networks/ %dir %{_datadir}/libvirt/networks/
%{_datadir}/libvirt/networks/default.xml %{_datadir}/libvirt/networks/default.xml
%endif %endif
%dir %{_datadir}/libvirt/
%dir %{_datadir}/libvirt/schemas/
%{_datadir}/libvirt/schemas/domain.rng
%{_datadir}/libvirt/schemas/network.rng
%{_datadir}/libvirt/schemas/storagepool.rng
%{_datadir}/libvirt/schemas/storagevol.rng
%{_datadir}/libvirt/schemas/nodedev.rng
%{_datadir}/libvirt/schemas/capability.rng
%dir %{_localstatedir}/run/libvirt/ %dir %{_localstatedir}/run/libvirt/
%dir %{_localstatedir}/lib/libvirt/ %dir %{_localstatedir}/lib/libvirt/
@ -507,6 +499,30 @@ fi
%doc docs/*.xml %doc docs/*.xml
%files client -f %{name}.lang
%defattr(-, root, root)
%doc AUTHORS ChangeLog.gz NEWS README COPYING.LIB TODO
%{_mandir}/man1/virsh.1*
%{_mandir}/man1/virt-xml-validate.1*
%{_bindir}/virsh
%{_bindir}/virt-xml-validate
%{_libdir}/lib*.so.*
%dir %{_datadir}/libvirt/
%dir %{_datadir}/libvirt/schemas/
%{_datadir}/libvirt/schemas/domain.rng
%{_datadir}/libvirt/schemas/network.rng
%{_datadir}/libvirt/schemas/storagepool.rng
%{_datadir}/libvirt/schemas/storagevol.rng
%{_datadir}/libvirt/schemas/nodedev.rng
%{_datadir}/libvirt/schemas/capability.rng
%if %{with_sasl}
%config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf
%endif
%files devel %files devel
%defattr(-, root, root) %defattr(-, root, root)