2007-01-11 01:44:36 +01:00
|
|
|
#
|
2009-09-27 00:09:58 +02:00
|
|
|
# spec file for package libvirt (Version 0.7.1)
|
2007-01-11 01:44:36 +01:00
|
|
|
#
|
2009-01-12 02:05:34 +01:00
|
|
|
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2007-01-11 01:44:36 +01:00
|
|
|
#
|
2008-08-10 01:31:46 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2007-01-11 01:44:36 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
# norootforbuild
|
|
|
|
|
2008-07-08 22:02:35 +02:00
|
|
|
%define with_xen 1
|
2008-08-10 01:31:46 +02:00
|
|
|
%define with_lxc 0
|
2008-09-01 17:06:07 +02:00
|
|
|
%define with_selinux 0
|
2008-10-22 18:17:33 +02:00
|
|
|
# Xen is available only on i386 x86_64
|
2008-10-26 00:53:14 +02:00
|
|
|
%ifnarch %ix86 x86_64
|
2008-07-08 22:02:35 +02:00
|
|
|
%define with_xen 0
|
|
|
|
%endif
|
2008-08-10 01:31:46 +02:00
|
|
|
%if 0%{?suse_version} > 1100
|
|
|
|
%define with_lxc 1
|
2008-09-01 17:06:07 +02:00
|
|
|
%define with_selinux 1
|
2008-08-10 01:31:46 +02:00
|
|
|
%endif
|
2008-04-10 22:28:26 +02:00
|
|
|
|
2007-01-11 01:44:36 +01:00
|
|
|
Name: libvirt
|
2009-09-27 00:09:58 +02:00
|
|
|
BuildRequires: bridge-utils cyrus-sasl-devel device-mapper-devel fdupes gettext gnutls-devel hal-devel iptables-devel libxml2-devel lvm2 ncurses-devel parted-devel pkg-config python-devel readline-devel util-linux xhtml-dtd
|
2008-07-08 22:02:35 +02:00
|
|
|
%if %{with_xen}
|
|
|
|
BuildRequires: xen-devel
|
|
|
|
%endif
|
|
|
|
%if 0%{?suse_version} > 1030
|
2008-08-10 01:31:46 +02:00
|
|
|
BuildRequires: libavahi-devel
|
2008-07-08 22:02:35 +02:00
|
|
|
%else
|
|
|
|
BuildRequires: avahi-devel
|
|
|
|
%endif
|
2008-09-01 17:06:07 +02:00
|
|
|
%if %{with_selinux}
|
|
|
|
BuildRequires: libselinux-devel
|
|
|
|
%endif
|
2009-02-03 22:58:24 +01:00
|
|
|
%ifarch x86_64 ia64
|
|
|
|
BuildRequires: libnuma-devel
|
|
|
|
%endif
|
2009-09-27 00:09:58 +02:00
|
|
|
%if 0%{?suse_version} > 1110
|
|
|
|
BuildRequires: polkit >= 0.9
|
|
|
|
%else
|
|
|
|
BuildRequires: PolicyKit-devel >= 0.6
|
|
|
|
%endif
|
2007-03-07 22:48:39 +01:00
|
|
|
# Only for directory ownership:
|
|
|
|
BuildRequires: gtk-doc
|
2007-10-10 00:17:47 +02:00
|
|
|
Url: http://libvirt.org/
|
2008-01-07 16:31:17 +01:00
|
|
|
License: LGPL v2.1 or later
|
2007-01-11 01:44:36 +01:00
|
|
|
Group: Development/Libraries/C and C++
|
2007-10-10 00:17:47 +02:00
|
|
|
AutoReqProv: yes
|
2009-09-27 00:09:58 +02:00
|
|
|
Version: 0.7.1
|
2009-04-24 23:15:55 +02:00
|
|
|
Release: 1
|
2007-01-11 01:44:36 +01:00
|
|
|
Summary: A C toolkit to interract with the virtualization capabilities of Linux
|
2008-07-08 22:02:35 +02:00
|
|
|
Requires: readline
|
|
|
|
Requires: ncurses
|
2008-01-07 16:31:17 +01:00
|
|
|
Requires: bridge-utils
|
|
|
|
Requires: iptables
|
|
|
|
Requires: cyrus-sasl
|
2008-07-08 22:02:35 +02:00
|
|
|
Requires: lvm2
|
|
|
|
Requires: parted
|
2008-10-08 18:23:52 +02:00
|
|
|
#Requires: /usr/bin/qemu-img
|
2008-01-10 14:41:53 +01:00
|
|
|
Recommends: cyrus-sasl-digestmd5
|
2009-04-24 23:15:55 +02:00
|
|
|
Recommends: logrotate
|
2008-07-08 22:02:35 +02:00
|
|
|
Requires: dnsmasq
|
2008-01-07 16:31:17 +01:00
|
|
|
Requires: PolicyKit >= 0.6
|
2008-09-01 17:06:07 +02:00
|
|
|
Requires: socat
|
2008-10-08 18:23:52 +02:00
|
|
|
Requires: open-iscsi
|
2009-01-29 01:42:42 +01:00
|
|
|
Requires: nfs-client
|
|
|
|
Requires: hal
|
2009-09-27 00:09:58 +02:00
|
|
|
%if 0%{?suse_version} > 1100
|
|
|
|
Requires: polkit >= 0.9
|
|
|
|
%else
|
|
|
|
Requires: PolicyKit >= 0.6
|
|
|
|
%endif
|
2007-08-21 02:37:22 +02:00
|
|
|
Source0: %{name}-%{version}.tar.bz2
|
|
|
|
Source1: libvirtd.init
|
2009-09-27 00:09:58 +02:00
|
|
|
# Upstream patches
|
|
|
|
Patch0: devmap-no-pkgconfig.patch
|
2009-09-29 16:37:33 +02:00
|
|
|
Patch1: xen-refcnt.patch
|
|
|
|
Patch2: vshdeinit-recurse.patch
|
2009-09-27 00:09:58 +02:00
|
|
|
# Need to go upstream
|
|
|
|
Patch100: socat.patch
|
|
|
|
Patch101: clone.patch
|
|
|
|
Patch102: migrate-params.patch
|
|
|
|
Patch103: xen-pv-cdrom.patch
|
|
|
|
Patch104: detach-disk.patch
|
|
|
|
# Our patches
|
|
|
|
Patch200: libvirtd-defaults.patch
|
|
|
|
Patch201: suse-network.patch
|
|
|
|
Patch202: snapshots.patch
|
2007-01-11 01:44:36 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
%description
|
|
|
|
Libvirt is a C toolkit to interract with the virtualization
|
|
|
|
capabilities Linux. Virtualization of the Linux Operating System means
|
|
|
|
the ability to run multiple instances of Operating Systems concurently
|
|
|
|
on a single hardware system where the basic resources are driven by a
|
|
|
|
Linux instance. The library aims to provide long term stable C API
|
|
|
|
initially for the Xen paravirtualization but should be able to
|
|
|
|
integrate other virtualization mechanisms if needed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Daniel Veillard <veillard@redhat.com>
|
|
|
|
Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
%package devel
|
2008-04-10 22:28:26 +02:00
|
|
|
License: LGPL v2.1 or later
|
2007-01-11 01:44:36 +01:00
|
|
|
Summary: A C toolkit to interract with the virtualization capabilities of Linux
|
|
|
|
Group: Development/Libraries/C and C++
|
2008-07-08 22:02:35 +02:00
|
|
|
Requires: %{name} = %{version} libxml2-devel
|
|
|
|
%if %{with_xen}
|
|
|
|
Requires: xen-devel
|
2009-01-29 01:42:42 +01:00
|
|
|
Requires: pkg-config
|
2008-07-08 22:02:35 +02:00
|
|
|
%endif
|
2007-01-11 01:44:36 +01:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
Libvirt is a C toolkit to interract with the virtualization
|
|
|
|
capabilities Linux. Virtualization of the Linux Operating System means
|
|
|
|
the ability to run multiple instances of Operating Systems concurently
|
|
|
|
on a single hardware system where the basic resources are driven by a
|
|
|
|
Linux instance. The library aims to provide long term stable C API
|
|
|
|
initially for the Xen paravirtualization but should be able to
|
|
|
|
integrate other virtualization mechanisms if needed.
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-03-07 22:48:39 +01:00
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Daniel Veillard <veillard@redhat.com>
|
|
|
|
Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
%package doc
|
2008-04-10 22:28:26 +02:00
|
|
|
License: LGPL v2.1 or later
|
2007-03-07 22:48:39 +01:00
|
|
|
Summary: A C toolkit to interract with the virtualization capabilities of Linux
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
Libvirt is a C toolkit to interract with the virtualization
|
|
|
|
capabilities Linux. Virtualization of the Linux Operating System means
|
|
|
|
the ability to run multiple instances of Operating Systems concurently
|
|
|
|
on a single hardware system where the basic resources are driven by a
|
|
|
|
Linux instance. The library aims to provide long term stable C API
|
|
|
|
initially for the Xen paravirtualization but should be able to
|
|
|
|
integrate other virtualization mechanisms if needed.
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-01-11 01:44:36 +01:00
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Daniel Veillard <veillard@redhat.com>
|
|
|
|
Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
%package python
|
2008-04-10 22:28:26 +02:00
|
|
|
License: LGPL v2.1 or later
|
2007-01-11 01:44:36 +01:00
|
|
|
Summary: A C toolkit to interract with the virtualization capabilities of Linux
|
|
|
|
Group: Development/Libraries/C and C++
|
2007-03-07 22:48:39 +01:00
|
|
|
Requires: %{name} = %{version}
|
|
|
|
%py_requires
|
2007-01-11 01:44:36 +01:00
|
|
|
|
|
|
|
%description python
|
|
|
|
Libvirt is a C toolkit to interract with the virtualization
|
|
|
|
capabilities Linux. Virtualization of the Linux Operating System means
|
|
|
|
the ability to run multiple instances of Operating Systems concurently
|
|
|
|
on a single hardware system where the basic resources are driven by a
|
|
|
|
Linux instance. The library aims to provide long term stable C API
|
|
|
|
initially for the Xen paravirtualization but should be able to
|
|
|
|
integrate other virtualization mechanisms if needed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Daniel Veillard <veillard@redhat.com>
|
|
|
|
Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
%prep
|
2007-03-07 22:48:39 +01:00
|
|
|
%setup -q
|
2008-04-10 22:28:26 +02:00
|
|
|
%patch0 -p1
|
2009-09-29 16:37:33 +02:00
|
|
|
%patch1 -p1
|
|
|
|
%patch2 -p1
|
2009-09-27 00:09:58 +02:00
|
|
|
%patch100 -p1
|
|
|
|
%patch101
|
|
|
|
%patch102 -p1
|
|
|
|
%patch103 -p1
|
|
|
|
%patch104 -p1
|
|
|
|
%patch200 -p1
|
|
|
|
%patch201 -p1
|
|
|
|
%patch202 -p1
|
2007-01-11 01:44:36 +01:00
|
|
|
|
|
|
|
%build
|
2008-07-08 22:02:35 +02:00
|
|
|
%if ! %{with_xen}
|
|
|
|
%define _without_xen --without-xen
|
|
|
|
%endif
|
2008-10-08 18:23:52 +02:00
|
|
|
%if ! %{with_lxc}
|
|
|
|
%define _without_lxc --without-lxc
|
2008-08-10 01:31:46 +02:00
|
|
|
%endif
|
2008-09-01 17:06:07 +02:00
|
|
|
%if %{with_selinux}
|
|
|
|
%define _with_selinux --with-selinux
|
|
|
|
%endif
|
2007-03-07 22:48:39 +01:00
|
|
|
autoreconf -f -i
|
2008-10-26 00:53:14 +02:00
|
|
|
export CFLAGS="$RPM_OPT_FLAGS"
|
2009-04-24 23:15:55 +02:00
|
|
|
%configure --disable-static --with-pic \
|
|
|
|
%{?_without_xen} \
|
2008-10-08 18:23:52 +02:00
|
|
|
%{?_without_lxc} \
|
2008-09-01 17:06:07 +02:00
|
|
|
%{?_with_selinux} \
|
2008-07-08 22:02:35 +02:00
|
|
|
--libexecdir=%{_libdir}/%{name} \
|
|
|
|
--with-init-script=none \
|
2008-08-10 01:31:46 +02:00
|
|
|
--with-remote-pid-file=%{_localstatedir}/run/libvirtd.pid \
|
2008-08-14 00:03:43 +02:00
|
|
|
--with-xen-proxy=no \
|
|
|
|
ac_cv_path_DNSMASQ=/usr/sbin/dnsmasq \
|
2008-10-08 18:23:52 +02:00
|
|
|
ac_cv_path_QEMU_IMG=/usr/bin/qemu-img-xen \
|
2009-01-29 01:42:42 +01:00
|
|
|
ac_cv_path_ISCSIADM=/sbin/iscsiadm \
|
2009-04-24 23:15:55 +02:00
|
|
|
ac_cv_path_MODPROBE=/sbin/modprobe \
|
|
|
|
ac_cv_path_UDEVADM=/sbin/udevadm \
|
2009-01-29 01:42:42 +01:00
|
|
|
ac_cv_path_SHOWMOUNT=/usr/sbin/showmount
|
2009-04-24 23:15:55 +02:00
|
|
|
make %{?jobs:-j%jobs} DOCS_DIR=%{_docdir}/%{name}-python EXAMPLE_DIR=%{_docdir}/%{name}-python/examples HTML_DIR=%{_docdir}/%{name}
|
2007-01-11 01:44:36 +01:00
|
|
|
|
|
|
|
%install
|
2007-03-07 22:48:39 +01:00
|
|
|
%makeinstall DOCS_DIR=%{_docdir}/%{name}-python EXAMPLE_DIR=%{_docdir}/%{name}-python/examples HTML_DIR=%{_docdir}/%{name}
|
2007-06-14 15:38:05 +02:00
|
|
|
cp -a AUTHORS ChangeLog COPYING NEWS README TODO $RPM_BUILD_ROOT%{_docdir}/%{name}/
|
2009-01-12 02:05:34 +01:00
|
|
|
cd docs ; cp -a *.html $RPM_BUILD_ROOT%{_docdir}/%{name} ; cp -a *.png $RPM_BUILD_ROOT%{_docdir}/%{name} ; cd ..
|
2008-08-10 01:31:46 +02:00
|
|
|
# remove currently unsupported locale(s)
|
2008-01-07 16:31:17 +01:00
|
|
|
rm -rf $RPM_BUILD_ROOT/usr/share/locale/sr@latin
|
2009-04-24 23:15:55 +02:00
|
|
|
# don't autostart the default network
|
2007-08-21 02:37:22 +02:00
|
|
|
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml
|
2008-08-10 01:31:46 +02:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/run/libvirt
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/lib/libvirt
|
2007-06-14 15:38:05 +02:00
|
|
|
rm $RPM_BUILD_ROOT%{_docdir}/%{name}/{*.c,examples.x*}
|
2007-03-07 22:48:39 +01:00
|
|
|
rm $RPM_BUILD_ROOT%{_libdir}/*.*a $RPM_BUILD_ROOT%{py_sitedir}/*.*a
|
2007-06-14 15:38:05 +02:00
|
|
|
ln_dupes()
|
|
|
|
{
|
|
|
|
target=""
|
|
|
|
fdupes -r "$1" | while read file; do
|
|
|
|
if [ -z "$file" ] || [ -z "$target" ]; then
|
|
|
|
target="$file"
|
|
|
|
continue
|
|
|
|
fi
|
|
|
|
ln -sf "${target#.}" "$file"
|
|
|
|
done
|
|
|
|
}
|
|
|
|
(
|
|
|
|
cd $RPM_BUILD_ROOT
|
|
|
|
ln_dupes .%{_docdir}/%{name}
|
|
|
|
ln_dupes ./usr/share/locale
|
|
|
|
)
|
2007-08-21 02:37:22 +02:00
|
|
|
# init script
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/etc/init.d
|
|
|
|
install %SOURCE1 $RPM_BUILD_ROOT/etc/init.d/libvirtd
|
|
|
|
ln -s /etc/init.d/libvirtd $RPM_BUILD_ROOT/usr/sbin/rclibvirtd
|
2007-03-07 22:48:39 +01:00
|
|
|
%find_lang %{name}
|
2007-01-11 01:44:36 +01:00
|
|
|
|
|
|
|
%clean
|
2007-03-07 22:48:39 +01:00
|
|
|
rm -rf $RPM_BUILD_ROOT
|
2007-01-11 01:44:36 +01:00
|
|
|
|
2009-04-24 23:15:55 +02:00
|
|
|
%post -p /sbin/ldconfig
|
2007-01-11 01:44:36 +01:00
|
|
|
|
2007-08-21 02:37:22 +02:00
|
|
|
%preun
|
|
|
|
%stop_on_removal libvirtd
|
|
|
|
|
|
|
|
%postun
|
|
|
|
/sbin/ldconfig
|
|
|
|
%restart_on_update libvirtd
|
|
|
|
%insserv_cleanup
|
2007-01-11 01:44:36 +01:00
|
|
|
|
2007-03-07 22:48:39 +01:00
|
|
|
%files -f %{name}.lang
|
2007-01-11 01:44:36 +01:00
|
|
|
%defattr(-, root, root)
|
|
|
|
%{_bindir}/virsh
|
2009-07-24 01:36:28 +02:00
|
|
|
%{_bindir}/virt-xml-validate
|
2007-07-24 01:32:16 +02:00
|
|
|
%{_sbindir}/libvirtd
|
2007-03-07 22:48:39 +01:00
|
|
|
%doc %dir %{_docdir}/%{name}
|
|
|
|
%doc %{_docdir}/%{name}/[CNRT]*
|
|
|
|
%doc %{_docdir}/%{name}/AUTHORS
|
|
|
|
%doc %{_mandir}/man1/virsh.1*
|
2009-07-24 01:36:28 +02:00
|
|
|
%doc %{_mandir}/man1/virt-xml-validate.1*
|
2007-05-01 22:58:45 +02:00
|
|
|
%{_libdir}/*.so.*
|
2008-07-08 22:02:35 +02:00
|
|
|
%dir %{_libdir}/%{name}
|
2008-08-10 01:31:46 +02:00
|
|
|
%if 0%{?suse_version} > 1030
|
2008-07-08 22:02:35 +02:00
|
|
|
%{_libdir}/%{name}/libvirt_parthelper
|
2008-08-10 01:31:46 +02:00
|
|
|
%endif
|
2008-10-08 18:23:52 +02:00
|
|
|
%if %{with_lxc}
|
|
|
|
%attr(0755, root, root) %{_libdir}/%{name}/libvirt_lxc
|
|
|
|
%endif
|
2007-08-21 02:37:22 +02:00
|
|
|
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/
|
|
|
|
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/
|
|
|
|
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/
|
|
|
|
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/autostart
|
2009-04-24 23:15:55 +02:00
|
|
|
%config %{_sysconfdir}/libvirt/qemu/networks/default.xml
|
|
|
|
%config %{_sysconfdir}/logrotate.d/libvirtd
|
2008-08-10 01:31:46 +02:00
|
|
|
%dir /%{_localstatedir}/run/libvirt/
|
|
|
|
%dir /%{_localstatedir}/lib/libvirt/
|
2007-08-21 02:37:22 +02:00
|
|
|
%config /etc/init.d/libvirtd
|
|
|
|
%{_sbindir}/rclibvirtd
|
2008-01-07 16:31:17 +01:00
|
|
|
%config %{_sysconfdir}/libvirt/libvirtd.conf
|
|
|
|
%config %{_sysconfdir}/libvirt/qemu.conf
|
|
|
|
%config %{_sysconfdir}/sasl2/libvirt.conf
|
2009-09-27 00:09:58 +02:00
|
|
|
%if 0%{?suse_version} > 1110
|
|
|
|
%{_datadir}/polkit-1/actions/org.libvirt.unix.policy
|
|
|
|
%else
|
2008-10-08 18:23:52 +02:00
|
|
|
%{_datadir}/PolicyKit/policy/org.libvirt.unix.policy
|
2008-07-08 22:02:35 +02:00
|
|
|
%endif
|
2009-04-24 23:15:55 +02:00
|
|
|
%{_datadir}/libvirt
|
|
|
|
%{_datadir}/augeas
|
2007-01-11 01:44:36 +01:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-, root, root)
|
2007-03-07 22:48:39 +01:00
|
|
|
%{_includedir}/libvirt
|
|
|
|
%{_libdir}/*.so
|
2007-01-11 01:44:36 +01:00
|
|
|
%{_libdir}/pkgconfig/libvirt.pc
|
2007-03-07 22:48:39 +01:00
|
|
|
|
|
|
|
%files doc
|
|
|
|
%defattr(-, root, root)
|
|
|
|
%{_datadir}/gtk-doc/html/libvirt
|
|
|
|
%doc %{_docdir}/%{name}/*.gif
|
2009-01-12 02:05:34 +01:00
|
|
|
%doc %{_docdir}/%{name}/*.png
|
2007-03-07 22:48:39 +01:00
|
|
|
%doc %{_docdir}/%{name}/*.html
|
|
|
|
%doc %{_docdir}/%{name}/html
|
2007-01-11 01:44:36 +01:00
|
|
|
|
|
|
|
%files python
|
|
|
|
%defattr(-, root, root)
|
2007-03-07 22:48:39 +01:00
|
|
|
%doc %{_docdir}/%{name}-python
|
|
|
|
%{py_sitedir}/libvirt.py*
|
|
|
|
%{py_sitedir}/libvirtmod*
|
2008-01-07 16:31:17 +01:00
|
|
|
|
2007-02-25 23:29:40 +01:00
|
|
|
%changelog
|