SHA256
1
0
forked from pool/libvirt
libvirt/libvirt.spec

583 lines
22 KiB
RPMSpec
Raw Normal View History

#
# spec file for package libvirt (Version 0.4.6)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
%define with_xen 1
%define with_lxc 0
%define with_selinux 0
# Xen is available only on i386 x86_64
%ifnarch %ix86 x86_64
%define with_xen 0
%endif
%if 0%{?suse_version} > 1100
%define with_lxc 1
%define with_selinux 1
%endif
Name: libvirt
BuildRequires: PolicyKit-devel bridge-utils cyrus-sasl-devel fdupes gettext gnutls-devel iptables-devel libxml2-devel lvm2 ncurses-devel parted-devel pkg-config python-devel readline-devel util-linux xhtml-dtd
%if %{with_xen}
BuildRequires: xen-devel
%endif
%if 0%{?suse_version} > 1030
BuildRequires: libavahi-devel
%else
BuildRequires: avahi-devel
%endif
%if %{with_selinux}
BuildRequires: libselinux-devel
%endif
# Only for directory ownership:
BuildRequires: gtk-doc
Url: http://libvirt.org/
License: LGPL v2.1 or later
Group: Development/Libraries/C and C++
AutoReqProv: yes
Version: 0.4.6
Release: 6
Summary: A C toolkit to interract with the virtualization capabilities of Linux
Requires: readline
Requires: ncurses
Requires: bridge-utils
Requires: iptables
Requires: cyrus-sasl
Requires: lvm2
Requires: parted
#Requires: /usr/bin/qemu-img
Recommends: cyrus-sasl-digestmd5
Requires: dnsmasq
Requires: PolicyKit >= 0.6
Requires: socat
Requires: open-iscsi
Source0: %{name}-%{version}.tar.bz2
Source1: libvirtd.init
Patch0: socat.patch
Patch1: libvirtd-defaults.patch
Patch2: fs-storage-driver.patch
Patch3: snapshots.patch
Patch4: vif-parsing.patch
Patch5: xen-maxmem.patch
Patch6: cgroup.patch
Patch7: lxc_res_mem.patch
Patch8: cgshares.patch
Patch9: lxcsched.patch
Patch10: lxcvirsh.patch
Patch11: cgmajor.patch
Patch12: lxcpty.patch
Patch13: clone.patch
Patch14: vnc-port.patch
Patch15: suse-network.patch
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
License: LGPL v2.1 or later
Summary: A C toolkit to interract with the virtualization capabilities of Linux
Group: Development/Libraries/C and C++
Requires: %{name} = %{version} libxml2-devel
%if %{with_xen}
Requires: xen-devel
%endif
%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.
Authors:
--------
Daniel Veillard <veillard@redhat.com>
Karel Zak <kzak@redhat.com>
%package doc
License: LGPL v2.1 or later
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.
Authors:
--------
Daniel Veillard <veillard@redhat.com>
Karel Zak <kzak@redhat.com>
%package python
License: LGPL v2.1 or later
Summary: A C toolkit to interract with the virtualization capabilities of Linux
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
%py_requires
%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
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13
%patch14 -p1
%patch15 -p1
rm po/no.*
%build
%if ! %{with_xen}
%define _without_xen --without-xen
%endif
%if ! %{with_lxc}
%define _without_lxc --without-lxc
%endif
%if %{with_selinux}
%define _with_selinux --with-selinux
%endif
autoreconf -f -i
export CFLAGS="$RPM_OPT_FLAGS"
%configure %{?_without_xen} \
%{?_without_lxc} \
%{?_with_selinux} \
--libexecdir=%{_libdir}/%{name} \
--with-init-script=none \
--with-remote-pid-file=%{_localstatedir}/run/libvirtd.pid \
--with-xen-proxy=no \
ac_cv_path_DNSMASQ=/usr/sbin/dnsmasq \
ac_cv_path_QEMU_IMG=/usr/bin/qemu-img-xen \
ac_cv_path_ISCSIADM=/sbin/iscsiadm
make DOCS_DIR=%{_docdir}/%{name}-python EXAMPLE_DIR=%{_docdir}/%{name}-python/examples HTML_DIR=%{_docdir}/%{name}
cd docs/examples ; make index.html ; cd ../..
%install
%makeinstall DOCS_DIR=%{_docdir}/%{name}-python EXAMPLE_DIR=%{_docdir}/%{name}-python/examples HTML_DIR=%{_docdir}/%{name}
cp -a AUTHORS ChangeLog COPYING NEWS README TODO $RPM_BUILD_ROOT%{_docdir}/%{name}/
# remove currently unsupported locale(s)
rm -rf $RPM_BUILD_ROOT/usr/share/locale/sr@latin
# for now, do not install the default network definition
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/default.xml
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml
# do not package augeas config files for now
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd.aug
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_qemu.aug
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd.aug
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug
mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/run/libvirt
mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/lib/libvirt
rm $RPM_BUILD_ROOT%{_docdir}/%{name}/{*.c,examples.x*}
rm $RPM_BUILD_ROOT%{_libdir}/*.*a $RPM_BUILD_ROOT%{py_sitedir}/*.*a
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
)
# 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
%find_lang %{name}
%clean
rm -rf $RPM_BUILD_ROOT
%post
/sbin/ldconfig
%{fillup_and_insserv -f -y libvirtd}
%preun
%stop_on_removal libvirtd
%postun
/sbin/ldconfig
%restart_on_update libvirtd
%insserv_cleanup
%files -f %{name}.lang
%defattr(-, root, root)
%{_bindir}/virsh
%{_sbindir}/libvirtd
%doc %dir %{_docdir}/%{name}
%doc %{_docdir}/%{name}/[CNRT]*
%doc %{_docdir}/%{name}/AUTHORS
%doc %{_mandir}/man1/virsh.1*
%{_libdir}/*.so.*
%dir %{_libdir}/%{name}
%if 0%{?suse_version} > 1030
%{_libdir}/%{name}/libvirt_parthelper
%endif
%if %{with_lxc}
%attr(0755, root, root) %{_libdir}/%{name}/libvirt_lxc
%endif
%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
%dir /%{_localstatedir}/run/libvirt/
%dir /%{_localstatedir}/lib/libvirt/
%config /etc/init.d/libvirtd
%{_sbindir}/rclibvirtd
%config %{_sysconfdir}/libvirt/libvirtd.conf
%config %{_sysconfdir}/libvirt/qemu.conf
%config %{_sysconfdir}/sasl2/libvirt.conf
%if 0%{?suse_version} > 1030
%{_datadir}/PolicyKit/policy/org.libvirt.unix.policy
%endif
%files devel
%defattr(-, root, root)
%{_includedir}/libvirt
%{_libdir}/*.so
%{_libdir}/pkgconfig/libvirt.pc
%files doc
%defattr(-, root, root)
%{_datadir}/gtk-doc/html/libvirt
%doc %{_docdir}/%{name}/*.gif
%doc %{_docdir}/%{name}/*.html
%doc %{_docdir}/%{name}/html
%files python
%defattr(-, root, root)
%doc %{_docdir}/%{name}-python
%{py_sitedir}/libvirt.py*
%{py_sitedir}/libvirtmod*
%changelog
* Wed Nov 05 2008 jfehlig@novell.com
- Expose networks managed outside of libvirt as read-only.
bnc#441633
* Wed Nov 05 2008 jfehlig@novell.com
- Fix vnc port assignement in domain XML
bnc#441625
* Thu Oct 23 2008 jfehlig@novell.com
- Add upstream patches to fix ordering problem with setting up
cgroup containment on LXC domains.
bnc#437816
* Mon Oct 20 2008 jfehlig@novell.com
- Remove IA64 from list of architectures supporting Xen.
* Fri Oct 10 2008 jfehlig@novell.com
- Added upstream patches providing additional LXC support
bnc#433881
* Mon Oct 06 2008 jfehlig@novell.com
- Use xend vs hypercall interface to change max mem setting
bnc#431766
* Wed Oct 01 2008 jfehlig@novell.com
- Enabled libvirtd listen mode in libvirtd init script.
* Tue Sep 30 2008 jfehlig@novell.com
- Updated to version 0.4.6
- avoid a segfault if missing qemu emulator
- reading vncdisplay from xend domain
- segfault in OpenVZ
- fix parsing of pool without a source
- Fixed bug in network interface parsing
- vif-parsing.patch submitted upstream
* Tue Sep 16 2008 jfehlig@novell.com
- open-iscsi package required for iscsi storage backend
* Mon Sep 15 2008 jfehlig@novell.com
- Updated to version 0.4.5
- NETNS support for Linux containers
- unified XML domain and network parsing for all drivers
- OpenVZ features improvements
- OpenVZ and Linux containers support now default
- USB device passthrough for QEmu/KVM
- storage pool source discovery
- other bug fixes and improvements
* Thu Sep 04 2008 kwolf@suse.de
- Added Python bindings for the snapshot functions
* Wed Sep 03 2008 kwolf@suse.de
- Implemented listing of snapshots for Xen and in virsh
* Tue Sep 02 2008 kwolf@suse.de
- Added snapshot support. Implemented snapshot_create/apply/delete
for Xen.
* Fri Aug 29 2008 jfehlig@novell.com
- Fixed bugs in nfs storage pool creation/deletion
* Thu Aug 28 2008 jfehlig@novell.com
- Fixed bugs in LVM storage pool creation.
logical-storage-driver.patch submitted upstream
* Wed Aug 27 2008 jfehlig@novell.com
- Changed mDNS advertisement of libvirtd service to disabled by
default. Enable in libvirtd.conf.
- Disable libvirtd from listening on TLS socket by default. User
must enable after setting up CA and issuing certificates.
* Mon Aug 25 2008 jfehlig@novell.com
- Enabled iscsi storage driver support
- Enabled ssh transport using socat. SuSE's version of netcat
does not support connecting to UDS.
- Fixed spec file breakage due to SELinux enablement
* Fri Aug 22 2008 prusnak@suse.cz
- enabled SELinux support [Fate#303662]
* Mon Aug 11 2008 jfehlig@novell.com
- Cleanup of libvirtd init script
- Removed dnsmasq from BuildRequires
* Sat Aug 09 2008 jfehlig@novell.com
- Adjustments to spec file
+ Added /var/lib/libvirt directory
+ Enabled LXC support if suse_version > 1100, fate #304001
+ Cleaned up some rpmlint warnings
* Sun Jul 06 2008 jfehlig@novell.com
- Updated to libvirt 0.4.4
+ Bug fixes: QEmu network serialization, internal memory allocation
fixes, virsh large file config problem, xen list APIs when max is
zero, string escape problems in the xm driver
+ Improvements: add autogen to tarballs, improve iSCSI support
+ Cleanups: const-ness fixed, string helpers for enumeations
- spec file adjustments
+ Remove ExclusiveArch
+ Common spec file for all products
+ Support for building/running without Xen
* Fri May 09 2008 jfehlig@novell.com
- Adjust libvirtd PolicyKit configuration file to match standard
suse procedures. bnc#388769
* Mon May 05 2008 jfehlig@novell.com
- Fix path to iptables. bnc#386280
* Thu Apr 24 2008 jfehlig@novell.com
- Fix Xen 3.2 hypercalls. bnc#378798
* Thu Apr 10 2008 jfehlig@novell.com
- Fix NULL pointer dereference in auth callback. bnc#373180,
bnc#354995
* Wed Jan 09 2008 jfehlig@novell.com
- Remove Requires of nc package. netcat is the equivalent but it
does not support unix domain sockets so no need to require it
either.
* Tue Jan 08 2008 coolo@suse.de
- do not require a non existant package, but change it to a recommend
to digestmd5
* Fri Jan 04 2008 jfehlig@novell.com
- Updated to libvirt-0.4.0
- SASL based authentication for libvirt remote support
- PolicyKit authentication
- Documentation: example files for QEMU and libvirtd configuations,
authentication documentation updates
- Bug fixes, improvements and code cleanup
* Tue Oct 09 2007 jfehlig@novell.com
- Updated to libvirt 0.3.3
- Avahi mDNS daemon export
- NUMA support
- Bug fixes
- Cleanup rpmlint warnings
* Mon Oct 08 2007 jfehlig@novell.com
- Removed 'jobs' option from make invocation in spec file. Appears
to be a subtle dependency issue in one of the makefiles which is
causing problems with generation of python bindings when jobs > 1.
Bug #329032.
* Mon Aug 20 2007 jfehlig@novell.com
- Added init script for libvirtd. libvirtd is needed to support
management of qemu/kvm guests. Some Xen networking is handled
through libvirt as well - bug #298021.
* Mon Jul 23 2007 jfehlig@novell.com
- Update to libvirt-0.3.0
- Secure Remote support
- Documentation: remote support, description of the URI connection
strings, update of virsh man page, matrix of libvirt API/hypervisor
support with version informations
- Bug fixes: examples Makefile.am generation, SetMem fix, URI
handling and ordering of drivers, fix virsh help without hypervisor,
id marshalling fix, fix virConnectGetMaxVcpus on remote, avoid
a realloc leak, scheduler parameters handling for Xen, various
early remote bug fixes, remove virsh leaks of domains references,
configCache refill bug, fix XML serialization bugs
- Improvements: QEmu switch to XDR-based protocol, device attach/detach
commands OCaml bindings, new entry points virDomainGetConnect and
virNetworkGetConnect useful for bindings, reunitifaction of remote
and qemu daemon under a single libvirtd with a config file
- Cleanups: parsing of connection URIs, messages from virsh,
Coverage files, Solaris fixes, avoid [r]index calls, release
information in Xen backend, virsh cpupin command cleanups,
xen:/// suppport as standard Xen URI, improve driver
selection/decline mechanism, error reporting on XML dump,
Remove unused virDomainKernel structure, daemon event loop event
handling, various unifications cleanup in the daemon merging,
internal file and timer monitoring API, remove libsysfs dependancy,
call brctl program directly, virBuffer functions cleanups,
make init script LSB compliant, error handling on lookup functions,
remove internal virGetDomainByID, revamp of xen subdrivers interfaces
- Localization updates
* Tue Jun 12 2007 ccoffing@novell.com
- Update to libvirt-0.2.3.
- Fix duplicate files found by rpmlint.
* Wed May 23 2007 ccoffing@novell.com
- Fix rpmlint errors.
* Fri Apr 27 2007 ccoffing@novell.com
- Update to libvirt-0.2.2.
* Wed Mar 07 2007 sbrabec@suse.cz
- Created -doc subpackage (#248813).
- Do not remove valid locales.
- Fixed docdir destination.
- Build with CFLAGS.
- Spec file cleanup.
* Tue Feb 20 2007 jfehlig@novell.com
- Removed usr/lib/libvirt_proxy setuid binary from package. Fixes
bug #246610.
* Fri Feb 16 2007 jfehlig@novell.com
- Updated to latest release. Many of the issues seen in virt-manager
have been caused by bugs / missing functionality in libvirt. This
upate provides a better basis for virt-manager.
* Wed Jan 10 2007 jfehlig@novell.com
- Updated to latest release, version 0.1.10. Submitting to SLES10 SP1
to provide base functionality for FATE feature 301181.
- more localizations
- bug fixes:
- VCPU info breakages on xen 3.0.3
- xenDaemonListDomains buffer overflow (Daniel Berrange)
- reference count bug when creating Xen domains (Daniel Berrange)
- improvements:
- support graphic framebuffer for Xen paravirt (Daniel Berrange)
- VNC listen IP range support (Daniel Berrange)
- support for default Xen config files and inactive domains of 3.0.4 (Daniel Berrange)
* Fri Dec 08 2006 jfehlig@novell.com
- Updated to latest release, version 0.1.9.
- python bindings: release interpeter lock when calling C (Daniel Berrange)
- don't raise HTTP error when looking informations for a domain
- some refactoring to use the driver for all entry points
- better error reporting (Daniel Berrange)
- fix OS reporting when running as non-root
- provide XML parsing errors
- extension of the test framework (Daniel Berrange)
- fix the reconnect regression test
- python bindings: Domain instances now link to the Connect to avoid garbage collection and disconnect
- separate the notion of maximum memory and current use at the XML level
- Fix a memory leak (Daniel Berrange)
- add support for shareable drives
- add support for non-bridge style networking configs for guests(Daniel Berrange)
- python bindings: fix unsigned long marshalling (Daniel Berrange)
- new config APIs virConfNew() and virConfSetValue() to build configs from scratch
- hot plug device support based on Michel Ponceau patch
- added support for inactive domains, new APIs, various associated cleanup (Daniel Berrange)
- special device model for HVM guests (Daniel Berrange)
- add API to dump core of domains (but requires a patched xend)
- pygrub bootloader informations take over <os> informations
- updated the localization strings
* Fri Oct 20 2006 jfehlig@novell.com
- Updated to latest release, version 0.1.8.
- Bug for system with page size != 4k
- vcpu number initialization (Philippe Berthault)
- don't label crashed domains as shut off (Peter Vetere)
- fix virsh man page (Noriko Mizumoto)
- blktapdd support for alternate drivers like blktap (Daniel Berrange)
- memory leak fixes (xend interface and XML parsing) (Daniel Berrange)
- compile fix
- mlock/munlock size fixes (Daniel Berrange)
- improve error reporting
- Updated to latest release, version 0.1.7.
- fix a memory bug on getting vcpu informations from xend (Daniel Berrange)
- fix another problem in the hypercalls change in Xen changeset
86d26e6ec89b when getting domain informations (Daniel Berrange)
* Tue Sep 26 2006 jfehlig@novell.com
- Updated to latest release, version 0.1.6. This release includes
fix in hypercall driver so local patch has been removed.
* Wed Sep 13 2006 jfehlig@novell.com
- Fixed bug in hypercall driver introduced in version 0.1.5.
Patch sumbmitted upstream and included locally until next release.
* Mon Sep 11 2006 jfehlig@novell.com
- Updated to latest release, version 0.1.5
- Support for new hypercalls change in Xen changeset 86d26e6ec89b
- bug fixes: virParseUUID() was wrong, netwoking for paravirt guestsi
(Daniel Berrange), virsh on non-existent domains (Daniel Berrange),
string cast bug when handling error in python (Pete Vetere), HTTP
500 xend error code handling (Pete Vetere and Daniel Berrange)
- improvements: test suite for SEXPR <-> XML format conversions (Daniel
Berrange), virsh output regression suite (Daniel Berrange), new environ
variable VIRSH_DEFAULT_CONNECT_URI for the default URI when connecting
(Daniel Berrange), graphical console support for paravirt guests
(Jeremy Katz), parsing of simple Xen config files (with Daniel Berrange),
early work on defined (not running) domains (Daniel Berrange),
virsh output improvement (Daniel Berrange
* Mon Aug 28 2006 jfehlig@novell.com
- Updated to latest release, version 0.1.4
- bug fixes: spec file fix (Mark McLoughlin), error report problem (with
Hugh Brock), long integer in Python bindings (with Daniel Berrange), XML
generation bug for CDRom (Daniel Berrange), bug whem using number() XPath
function (Mark McLoughlin), fix python detection code, remove duplicate
initialization errors (Daniel Berrange)
- improvements: UUID in XML description (Peter Vetere), proxy code
cleanup, virtual CPU and affinity support + virsh support (Michel
Ponceau, Philippe Berthault, Daniel Berrange), port and tty informations
for console in XML (Daniel Berrange), added XML dump to driver and proxy
support (Daniel Berrange), extention of boot options with support for
floppy and cdrom (Daniel Berrange), features block in XML to report/ask
PAE, ACPI, APIC for HVM domains (Daniel Berrange), fail saide-effect
operations when using read-only connection, large improvements to test
driver (Daniel Berrange)
- documentation: spelling (Daniel Berrange), test driver examples.
* Wed Aug 16 2006 jfehlig@novell.com
- Added ExclusiveArch tag so as to only build on x86 and x86_64
* Mon Jul 31 2006 jfehlig@novell.com
- initial submission of libvirt package, version 0.1.3