- Update to libvirt 1.0.1
- Introduce virtlockd daemon - parallels: add disk and network device support - Add virDomainSendProcessSignal API - Introduce virDomainFSTrim() public API - add fuse support for libvirt lxc - Add Gluster protocol as supported network disk backend - various snapshot improvements - Add upstream patches to fix bugs in 1.0.1 66ff2ddc-virtlockd-systemd-file-perms.patch, 462a6962-script-fixes1.patch, cb854b8f-script-fixes2.patch, 5ec4b22b-script-fixes3.patch, a1fd56cb-script-fixes4.patch, 68e7bc45-libxl-link-fix.patch - Rework SUSE patches for the various init scripts Dropped use-init-script-redhat.patch and added libvirtd-init-script.patch, libvirt-guests-init-script.patch, and virtlockd-init-script.patch - Drop upstream patches: 371ddc98-xen-sysctl-9.patch, 416eca18-xenstore-header-fix.patch, f644361b-virCommand-env.patch, 2b32735a-virCommand-env.patch, 9785f2b6-fix-xen-sysctl9.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=238
This commit is contained in:
223
libvirt.spec
223
libvirt.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package libvirt
|
||||
#
|
||||
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2013 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
|
||||
@@ -36,53 +36,59 @@
|
||||
%define with_libvirtd 0%{!?_without_libvirtd:%{server_drivers}}
|
||||
%define with_avahi 0%{!?_without_avahi:%{server_drivers}}
|
||||
|
||||
# Then the hypervisor drivers that run on local host
|
||||
# Then the hypervisor drivers that run in libvirtd
|
||||
%define with_xen 0%{!?_without_xen:%{server_drivers}}
|
||||
%define with_qemu 0%{!?_without_qemu:%{server_drivers}}
|
||||
%define with_openvz 0%{!?_without_openvz:%{server_drivers}}
|
||||
%define with_lxc 0%{!?_without_lxc:%{server_drivers}}
|
||||
%define with_vbox 0%{!?_without_vbox:%{server_drivers}}
|
||||
%define with_uml 0%{!?_without_uml:%{server_drivers}}
|
||||
%define with_libxl 0%{!?_without_libxl:%{server_drivers}}
|
||||
%define with_vmware 0%{!?_without_vmware:%{server_drivers}}
|
||||
|
||||
# Then the hypervisor drivers that talk via a native remote protocol
|
||||
# Then the hypervisor drivers that run outside libvirtd, in libvirt.so
|
||||
%define with_openvz 0%{!?_without_openvz:%{server_drivers}}
|
||||
%define with_vbox 0%{!?_without_vbox:%{server_drivers}}
|
||||
%define with_vmware 0%{!?_without_vmware:%{server_drivers}}
|
||||
%define with_phyp 0%{!?_without_phyp:0}
|
||||
%define with_esx 0%{!?_without_esx:1}
|
||||
%define with_xenapi 0%{!?_without_xenapi:1}
|
||||
%define with_hyperv 0%{!?_without_hyperv:0}
|
||||
%define with_xenapi 0%{!?_without_xenapi:1}
|
||||
%define with_parallels 0%{!?_without_parallels:1}
|
||||
|
||||
# Then the secondary host drivers
|
||||
# Then the secondary host drivers, which run inside libvirtd
|
||||
%define with_interface 0%{!?_without_interface:%{server_drivers}}
|
||||
%define with_network 0%{!?_without_network:%{server_drivers}}
|
||||
%define with_storage_fs 0%{!?_without_storage_fs:%{server_drivers}}
|
||||
%define with_storage_lvm 0%{!?_without_storage_lvm:%{server_drivers}}
|
||||
%define with_storage_iscsi 0%{!?_without_storage_iscsi:%{server_drivers}}
|
||||
%define with_storage_disk 0%{!?_without_storage_disk:%{server_drivers}}
|
||||
%define with_storage_mpath 0%{!?_without_storage_mpath:%{server_drivers}}
|
||||
%define with_storage_rbd 0
|
||||
%define with_storage_sheepdog 0
|
||||
%define with_numactl 0%{!?_without_numactl:%{server_drivers}}
|
||||
%define with_selinux 0%{!?_without_selinux:%{server_drivers}}
|
||||
%define with_apparmor 0%{!?_without_apparmor:%{server_drivers}}
|
||||
|
||||
# Optional bits on by default
|
||||
%define with_polkit 0%{!?_without_polkit:1}
|
||||
%define with_udev 0%{!?_without_udev:1}
|
||||
%define with_audit 0%{!?_without_audit:1}
|
||||
|
||||
# A few optional bits off by default, we enable later
|
||||
%define with_capng 0%{!?_without_capng:0}
|
||||
%define with_netcf 0%{!?_without_netcf:0}
|
||||
%define with_netcontrol 0%{!?_without_netcontrol:0}
|
||||
%define with_udev 0%{!?_without_udev:0}
|
||||
%define with_hal 0%{!?_without_hal:0}
|
||||
%define with_yajl 0%{!?_without_yajl:0}
|
||||
%define with_nwfilter 0%{!?_without_nwfilter:0}
|
||||
%define with_libpcap 0%{!?_without_libpcap:0}
|
||||
%define with_macvtap 0%{!?_without_macvtap:0}
|
||||
%define with_libnl 0%{!?_without_libnl:0}
|
||||
%define with_audit 0%{!?_without_audit:0}
|
||||
%define with_dtrace 0%{!?_without_dtrace:0}
|
||||
%define with_cgconfig 0%{!?_without_cgconfig:0}
|
||||
%define with_sanlock 0%{!?_without_sanlock:0}
|
||||
%define with_systemd 0%{!?_without_systemd:0}
|
||||
%define with_numad 0%{!?_without_numad:0}
|
||||
%define with_firewalld 0%{!?_without_firewalld:0}
|
||||
%define with_libssh2_transport 0%{!?_without_libssh2_transport:0}
|
||||
|
||||
# Non-server/HV driver defaults which are always enabled
|
||||
%define with_python 0%{!?_without_python:1}
|
||||
%define with_sasl 0%{!?_without_sasl:1}
|
||||
@@ -95,9 +101,10 @@
|
||||
%define with_libxl 0
|
||||
%endif
|
||||
|
||||
# Temporarily disable building the libxl driver since the current
|
||||
# implementation only works with Xen 4.1
|
||||
%define with_libxl 0
|
||||
# libxl is only compatible with Xen >= 4.2 (i.e. suse_version > 12.2)
|
||||
%if 0%{?suse_version} <= 1220
|
||||
%define with_libxl 0
|
||||
%endif
|
||||
|
||||
# numactl only on x86_64 and ia64
|
||||
%ifnarch x86_64 ia64
|
||||
@@ -114,6 +121,7 @@
|
||||
%define with_vmware 0
|
||||
%define with_xenapi 0
|
||||
%define with_hyperv 0
|
||||
%define with_parallels 0
|
||||
%endif
|
||||
|
||||
# Enable phyp driver for IBM Power systems
|
||||
@@ -127,13 +135,6 @@
|
||||
%define with_selinux 0
|
||||
%endif
|
||||
|
||||
# udev is used to manage host devices in 11.1 or newer
|
||||
%if 0%{?suse_version} > 1110
|
||||
%define with_udev 0%{!?_without_udev:%{server_drivers}}
|
||||
%else
|
||||
%define with_hal 0%{!?_without_hal:%{server_drivers}}
|
||||
%endif
|
||||
|
||||
# netcontrol is used to manage network interfaces on openSUSE >= 12.1
|
||||
%if 0%{?suse_version} >= 1210
|
||||
%define with_netcontrol 0%{!?_without_netcontrol:%{server_drivers}}
|
||||
@@ -148,10 +149,7 @@
|
||||
# Enable yajl library for JSON mode with QEMU
|
||||
%define with_yajl 0%{!?_without_yajl:%{server_drivers}}
|
||||
|
||||
# All supported version of openSUSE/SLE contain audit
|
||||
%define with_audit 0%{!?_without_audit:1}
|
||||
|
||||
%if 0%{?suse_version} > 1140
|
||||
%if 0%{?suse_version} >= 1210
|
||||
%define with_systemd 0%{!?_without_systemd:1}
|
||||
%endif
|
||||
|
||||
@@ -163,16 +161,18 @@
|
||||
# Disable some drivers when building without libvirt daemon.
|
||||
# The logic is the same as in configure.ac
|
||||
%if ! %{with_libvirtd}
|
||||
%define with_interface 0
|
||||
%define with_network 0
|
||||
%define with_qemu 0
|
||||
%define with_lxc 0
|
||||
%define with_uml 0
|
||||
%define with_hal 0
|
||||
%define with_udev 0
|
||||
%define with_storage_fs 0
|
||||
%define with_storage_lvm 0
|
||||
%define with_storage_iscsi 0
|
||||
%define with_storage_mpath 0
|
||||
%define with_storage_rbd 0
|
||||
%define with_storage_sheepdog 0
|
||||
%define with_storage_disk 0
|
||||
%endif
|
||||
|
||||
@@ -195,6 +195,23 @@
|
||||
%define with_libnl 1
|
||||
%endif
|
||||
|
||||
# Pull in cgroups config system
|
||||
%if %{with_qemu} || %{with_lxc}
|
||||
%define with_cgconfig 0%{!?_without_cgconfig:1}
|
||||
%endif
|
||||
|
||||
%if %{with_udev}
|
||||
%define with_nodedev 1
|
||||
%else
|
||||
%define with_nodedev 0
|
||||
%endif
|
||||
|
||||
%if %{with_storage_fs} || %{with_storage_mpath} || %{with_storage_iscsi} || %{with_storage_lvm} || %{with_storage_disk}
|
||||
%define with_storage 1
|
||||
%else
|
||||
%define with_storage 0
|
||||
%endif
|
||||
|
||||
%define _fwdefdir /etc/sysconfig/SuSEfirewall2.d/services
|
||||
|
||||
BuildRequires: bridge-utils
|
||||
@@ -220,9 +237,6 @@ BuildRequires: xen-devel
|
||||
%if %{with_sasl}
|
||||
BuildRequires: cyrus-sasl-devel
|
||||
%endif
|
||||
%if %{with_hal}
|
||||
BuildRequires: hal-devel
|
||||
%endif
|
||||
%if %{with_udev}
|
||||
BuildRequires: libpciaccess0-devel >= 0.10.9
|
||||
BuildRequires: libudev-devel >= 145
|
||||
@@ -312,6 +326,9 @@ BuildRequires: parted-devel
|
||||
# For Multipath support
|
||||
BuildRequires: device-mapper-devel
|
||||
%endif
|
||||
%if %{with_storage_rbd}
|
||||
BuildRequires: ceph-devel
|
||||
%endif
|
||||
%if %{with_audit}
|
||||
BuildRequires: audit-devel
|
||||
%endif
|
||||
@@ -320,7 +337,7 @@ BuildRequires: audit-devel
|
||||
BuildRequires: systemtap-sdt-devel
|
||||
%endif
|
||||
%if %{with_sanlock}
|
||||
BuildRequires: sanlock-devel >= 1.8
|
||||
BuildRequires: sanlock-devel >= 2.4
|
||||
%endif
|
||||
%if %{with_systemd}
|
||||
BuildRequires: systemd
|
||||
@@ -328,7 +345,7 @@ BuildRequires: systemd
|
||||
|
||||
Name: libvirt
|
||||
Url: http://libvirt.org/
|
||||
Version: 1.0.0
|
||||
Version: 1.0.1
|
||||
Release: 0
|
||||
Summary: A C toolkit to interact with the virtualization capabilities of Linux
|
||||
License: LGPL-2.1+
|
||||
@@ -359,9 +376,6 @@ Recommends: ebtables
|
||||
%endif
|
||||
Recommends: logrotate
|
||||
Recommends: nfs-client
|
||||
%if %{with_hal}
|
||||
Requires: hal
|
||||
%endif
|
||||
%if %{with_udev}
|
||||
Requires: udev >= 145
|
||||
%endif
|
||||
@@ -411,6 +425,12 @@ Source1: libvirtd.init
|
||||
Source2: libvirtd-relocation-server.fw
|
||||
Source99: baselibs.conf
|
||||
# Upstream patches
|
||||
Patch0: 66ff2ddc-virtlockd-systemd-file-perms.patch
|
||||
Patch1: 462a6962-script-fixes1.patch
|
||||
Patch2: cb854b8f-script-fixes2.patch
|
||||
Patch3: 5ec4b22b-script-fixes3.patch
|
||||
Patch4: a1fd56cb-script-fixes4.patch
|
||||
Patch5: 68e7bc45-libxl-link-fix.patch
|
||||
# Need to go upstream
|
||||
Patch100: xen-name-for-devid.patch
|
||||
Patch101: clone.patch
|
||||
@@ -418,9 +438,11 @@ Patch102: xen-pv-cdrom.patch
|
||||
Patch103: AF_PACKET.patch
|
||||
# Our patches
|
||||
Patch200: libvirtd-defaults.patch
|
||||
Patch201: use-init-script-redhat.patch
|
||||
Patch202: relax-qemu-usergroup-check.patch
|
||||
Patch203: suse-qemu-conf.patch
|
||||
Patch201: libvirtd-init-script.patch
|
||||
Patch202: libvirt-guests-init-script.patch
|
||||
Patch203: virtlockd-init-script.patch
|
||||
Patch204: relax-qemu-usergroup-check.patch
|
||||
Patch205: suse-qemu-conf.patch
|
||||
%if %{with_apparmor}
|
||||
Patch250: install-apparmor-profiles.patch
|
||||
%endif
|
||||
@@ -456,6 +478,8 @@ Recommends: cyrus-sasl-digestmd5
|
||||
# So remote clients can access libvirt over SSH tunnel
|
||||
# (client invokes 'nc' against the UNIX socket on the server)
|
||||
Recommends: netcat-openbsd
|
||||
# Needed for probing the power management features of the host.
|
||||
Recommends: pm-utils
|
||||
|
||||
%description client
|
||||
Libvirt is a C toolkit to interact with the virtualization
|
||||
@@ -514,7 +538,7 @@ Authors:
|
||||
%package lock-sanlock
|
||||
Summary: Sanlock lock manager plugin for QEMU driver
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: sanlock >= 1.8
|
||||
Requires: sanlock >= 2.4
|
||||
#for virt-sanlock-cleanup require augeas
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: augeas
|
||||
@@ -546,6 +570,12 @@ Authors:
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch100 -p1
|
||||
%patch101
|
||||
%patch102 -p1
|
||||
@@ -554,6 +584,8 @@ Authors:
|
||||
%patch201 -p1
|
||||
%patch202 -p1
|
||||
%patch203 -p1
|
||||
%patch204 -p1
|
||||
%patch205 -p1
|
||||
%if %{with_apparmor}
|
||||
%patch250 -p1
|
||||
%endif
|
||||
@@ -595,6 +627,9 @@ Authors:
|
||||
%if ! %{with_hyperv}
|
||||
%define _without_hyperv --without-hyperv
|
||||
%endif
|
||||
%if ! %{with_parallels}
|
||||
%define _without_parallels --without-parallels
|
||||
%endif
|
||||
%if ! %{with_libxl}
|
||||
%define _without_libxl --without-libxl
|
||||
%endif
|
||||
@@ -616,6 +651,12 @@ Authors:
|
||||
%if ! %{with_storage_mpath}
|
||||
%define _without_storage_mpath --without-storage-mpath
|
||||
%endif
|
||||
%if ! %{with_storage_rbd}
|
||||
%define _without_storage_rbd --without-storage-rbd
|
||||
%endif
|
||||
%if ! %{with_storage_sheepdog}
|
||||
%define _without_storage_sheepdog --without-storage-sheepdog
|
||||
%endif
|
||||
%if ! %{with_numactl}
|
||||
%define _without_numactl --without-numactl
|
||||
%endif
|
||||
@@ -637,9 +678,6 @@ Authors:
|
||||
%if ! %{with_netcontrol}
|
||||
%define _without_netcontrol --without-netcontrol
|
||||
%endif
|
||||
%if ! %{with_hal}
|
||||
%define _without_hal --without-hal
|
||||
%endif
|
||||
%if ! %{with_udev}
|
||||
%define _without_udev --without-udev
|
||||
%endif
|
||||
@@ -658,6 +696,9 @@ Authors:
|
||||
%if ! %{with_dtrace}
|
||||
%define _without_dtrace --without-dtrace
|
||||
%endif
|
||||
%if ! %{with_interface}
|
||||
%define _without_interface --without-interface
|
||||
%endif
|
||||
%if ! %{with_network}
|
||||
%define _without_network --without-network
|
||||
%endif
|
||||
@@ -677,9 +718,6 @@ Authors:
|
||||
%define _without_sanlock --without-sanlock
|
||||
%endif
|
||||
%if %{with_systemd}
|
||||
# Use 'systemd+redhat' (see patch use-init-script-redhat.patch),
|
||||
# so if someone installs upstart or legacy init scripts, they can
|
||||
# still start libvirtd
|
||||
%define init_scripts --with-init_script=systemd+redhat
|
||||
%else
|
||||
%define init_scripts --with-init_script=redhat
|
||||
@@ -687,6 +725,9 @@ Authors:
|
||||
%if ! %{with_driver_modules}
|
||||
%define _without_driver_modules --without-driver-modules
|
||||
%endif
|
||||
%if %{with_firewalld}
|
||||
%define _with_firewalld --with-firewalld
|
||||
%endif
|
||||
|
||||
autoreconf -f -i
|
||||
export CFLAGS="$RPM_OPT_FLAGS"
|
||||
@@ -696,40 +737,44 @@ export CFLAGS="$RPM_OPT_FLAGS"
|
||||
%{?_without_openvz} \
|
||||
%{?_without_lxc} \
|
||||
%{?_without_vbox} \
|
||||
%{?_without_libxl} \
|
||||
%{?_without_xenapi} \
|
||||
%{?_without_sasl} \
|
||||
%{?_without_avahi} \
|
||||
%{?_without_polkit} \
|
||||
%{?_without_python} \
|
||||
%{?_without_libvirtd} \
|
||||
%{?_without_uml} \
|
||||
%{?_without_phyp} \
|
||||
%{?_without_esx} \
|
||||
%{?_without_vmware} \
|
||||
%{?_without_hyperv} \
|
||||
%{?_without_libxl} \
|
||||
%{?_without_libvirtd} \
|
||||
%{?_without_vmware} \
|
||||
%{?_without_parallels} \
|
||||
%{?_without_interface} \
|
||||
%{?_without_network} \
|
||||
%{?_without_storage_fs} \
|
||||
%{?_without_storage_lvm} \
|
||||
%{?_without_storage_iscsi} \
|
||||
%{?_without_storage_disk} \
|
||||
%{?_without_storage_mpath} \
|
||||
%{?_without_storage_rbd} \
|
||||
%{?_without_storage_sheepdog} \
|
||||
%{?_without_numactl} \
|
||||
%{?_without_numad} \
|
||||
%{?_without_selinux} \
|
||||
%{?_without_apparmor} \
|
||||
%{?_without_capng} \
|
||||
%{?_without_netcf} \
|
||||
%{?_without_netcontrol} \
|
||||
%{?_without_hal} \
|
||||
%{?_without_selinux} \
|
||||
%{?_without_apparmor} \
|
||||
%{?_without_udev} \
|
||||
%{?_without_yajl} \
|
||||
%{?_without_sanlock} \
|
||||
%{?_without_libpcap} \
|
||||
%{?_without_macvtap} \
|
||||
%{?_without_polkit} \
|
||||
%{?_without_audit} \
|
||||
%{?_without_dtrace} \
|
||||
%{?_without_network} \
|
||||
%{?_without_sasl} \
|
||||
%{?_without_avahi} \
|
||||
%{?_without_python} \
|
||||
%{?_without_libpcap} \
|
||||
%{?_without_sanlock} \
|
||||
%{?_without_driver_modules} \
|
||||
%{?_with_firewalld} \
|
||||
--libexecdir=%{_libdir}/%{name} \
|
||||
--with-qemu-user=%{qemu_user} \
|
||||
--with-qemu-group=%{qemu_group} \
|
||||
@@ -790,12 +835,23 @@ rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/nwfilter
|
||||
%endif
|
||||
|
||||
# init scripts
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/init.d
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/init.d
|
||||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/adm/fillup-templates
|
||||
%if %{with_libvirtd}
|
||||
# Currently using our own libvirtd init script
|
||||
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/libvirtd
|
||||
install %SOURCE1 $RPM_BUILD_ROOT%{_sysconfdir}/init.d/libvirtd
|
||||
ln -s /etc/init.d/libvirtd $RPM_BUILD_ROOT%{_sbindir}/rclibvirtd
|
||||
mv $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/libvirtd $RPM_BUILD_ROOT%{_localstatedir}/adm/fillup-templates/sysconfig.libvirtd
|
||||
rm -f $RPM_BUILD_ROOT/usr/lib/sysctl.d/libvirtd.conf
|
||||
# For other services, use the in-tree scripts
|
||||
mv $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/virtlockd $RPM_BUILD_ROOT%{_sysconfdir}/init.d/virtlockd
|
||||
ln -s /etc/init.d/virtlockd $RPM_BUILD_ROOT%{_sbindir}/rcvirtlockd
|
||||
mv $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/virtlockd $RPM_BUILD_ROOT%{_localstatedir}/adm/fillup-templates/sysconfig.virtlockd
|
||||
%endif
|
||||
mv $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/libvirt-guests $RPM_BUILD_ROOT%{_sysconfdir}/init.d/libvirt-guests
|
||||
ln -s /etc/init.d/libvirt-guests $RPM_BUILD_ROOT%{_sbindir}/rclibvirt-guests
|
||||
mv $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/libvirt-guests $RPM_BUILD_ROOT%{_localstatedir}/adm/fillup-templates/sysconfig.libvirt-guests
|
||||
#install firewall definitions format is described here:
|
||||
#/usr/share/SuSEfirewall2/services/TEMPLATE
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_fwdefdir}
|
||||
@@ -808,6 +864,7 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%pre
|
||||
%if %{with_systemd}
|
||||
%service_add_pre libvirtd.service
|
||||
%service_add_pre virtlockd.service virtlockd.socket
|
||||
%endif
|
||||
%{_bindir}/getent group libvirt >/dev/null || \
|
||||
%{_sbindir}/groupadd -r libvirt 2>/dev/null
|
||||
@@ -826,43 +883,68 @@ then
|
||||
fi
|
||||
%endif
|
||||
%if %{with_systemd}
|
||||
%service_add_post libvirtd.service libvirt-guests.service
|
||||
%service_add_post libvirtd.service
|
||||
%service_add_post virtlockd.service virtlockd.socket
|
||||
%endif
|
||||
%if 0%{?sles_version}
|
||||
%{fillup_and_insserv -y libvirtd}
|
||||
%{fillup_and_insserv -y -n libvirtd libvirtd}
|
||||
%else # ! sles
|
||||
%{fillup_only -n libvirtd}
|
||||
%endif
|
||||
%{fillup_only -n libvirt-guests}
|
||||
%{fillup_only -n virtlockd}
|
||||
%endif
|
||||
|
||||
%preun
|
||||
%if %{with_libvirtd}
|
||||
%if %{with_systemd}
|
||||
%service_del_preun libvirtd.service libvirt-guests.service
|
||||
%service_del_preun libvirtd.service
|
||||
%service_del_preun virtlockd.service virtlockd.socket
|
||||
%endif
|
||||
%stop_on_removal libvirtd
|
||||
%stop_on_removal virtlockd
|
||||
%endif
|
||||
|
||||
%postun
|
||||
/sbin/ldconfig
|
||||
%if %{with_libvirtd}
|
||||
%if %{with_systemd}
|
||||
%service_del_postun libvirtd.service libvirt-guests.service
|
||||
%service_del_postun libvirtd.service
|
||||
%service_del_postun virtlockd.service virtlockd.socket
|
||||
%endif
|
||||
%restart_on_update libvirtd
|
||||
%restart_on_update virtlockd
|
||||
%endif
|
||||
%insserv_cleanup
|
||||
|
||||
%post client -p /sbin/ldconfig
|
||||
%post client
|
||||
/sbin/ldconfig
|
||||
%if %{with_systemd}
|
||||
%service_add_post libvirt-guests.service
|
||||
%endif
|
||||
%{fillup_only -n libvirt-guests}
|
||||
|
||||
%postun client -p /sbin/ldconfig
|
||||
%preun client
|
||||
%if %{with_systemd}
|
||||
%service_del_preun libvirt-guests.service
|
||||
%endif
|
||||
%stop_on_removal libvirt-guests
|
||||
if [ $1 = 0 ]; then
|
||||
rm -f /var/lib/libvirt/libvirt-guests
|
||||
fi
|
||||
|
||||
%postun client
|
||||
/sbin/ldconfig
|
||||
%if %{with_systemd}
|
||||
%service_del_postun libvirt-guests.service
|
||||
%endif
|
||||
%insserv_cleanup
|
||||
|
||||
%if %{with_libvirtd}
|
||||
|
||||
%files
|
||||
%defattr(-, root, root)
|
||||
%{_sbindir}/libvirtd
|
||||
%{_sbindir}/virtlockd
|
||||
%dir %{_libdir}/%{name}
|
||||
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/
|
||||
%if %{with_network}
|
||||
@@ -879,8 +961,13 @@ fi
|
||||
%{_localstatedir}/adm/fillup-templates/sysconfig.libvirtd
|
||||
%config /etc/init.d/libvirtd
|
||||
%{_sbindir}/rclibvirtd
|
||||
%{_localstatedir}/adm/fillup-templates/sysconfig.virtlockd
|
||||
%config /etc/init.d/virtlockd
|
||||
%{_sbindir}/rcvirtlockd
|
||||
%if %{with_systemd}
|
||||
%{_unitdir}/libvirtd.service
|
||||
%{_unitdir}/virtlockd.service
|
||||
%{_unitdir}/virtlockd.socket
|
||||
%endif
|
||||
%config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd
|
||||
@@ -889,6 +976,8 @@ fi
|
||||
%dir %{_datadir}/augeas/lenses/tests
|
||||
%{_datadir}/augeas/lenses/libvirtd.aug
|
||||
%{_datadir}/augeas/lenses/tests/test_libvirtd.aug
|
||||
%{_datadir}/augeas/lenses/libvirt_lockd.aug
|
||||
%{_datadir}/augeas/lenses/tests/test_libvirt_lockd.aug
|
||||
%if %{with_dtrace}
|
||||
%{_datadir}/systemtap/tapset/libvirt_probes.stp
|
||||
%{_datadir}/systemtap/tapset/libvirt_functions.stp
|
||||
@@ -898,6 +987,8 @@ fi
|
||||
%dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/boot/
|
||||
%dir %attr(0711, root, root) %{_localstatedir}/cache/libvirt/
|
||||
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/
|
||||
%dir %attr(0755, root, root) %{_libdir}/%{name}/lock-driver
|
||||
%attr(0755, root, root) %{_libdir}/%{name}/lock-driver/lockd.so
|
||||
%if %{with_polkit}
|
||||
%if 0%{?suse_version} > 1110
|
||||
%{_datadir}/polkit-1/actions/org.libvirt.unix.policy
|
||||
@@ -907,6 +998,7 @@ fi
|
||||
%endif
|
||||
%if %{with_qemu}
|
||||
%config(noreplace) %{_sysconfdir}/libvirt/qemu.conf
|
||||
%config(noreplace) %{_sysconfdir}/libvirt/qemu-lockd.conf
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.qemu
|
||||
%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/
|
||||
%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/cache/libvirt/qemu/
|
||||
@@ -966,6 +1058,7 @@ fi
|
||||
%{_bindir}/virt-host-validate
|
||||
%dir %{_libdir}/%{name}
|
||||
%{_libdir}/lib*.so.*
|
||||
%attr(0755, root, root) %{_libdir}/%{name}/libvirt-guests.sh
|
||||
%{_localstatedir}/adm/fillup-templates/sysconfig.libvirt-guests
|
||||
%config /etc/init.d/libvirt-guests
|
||||
%{_sbindir}/rclibvirt-guests
|
||||
|
Reference in New Issue
Block a user