From 4dc3f0a4bcf6b036b38f6b2e60547763e5887e58 Mon Sep 17 00:00:00 2001 From: virtbuilder_pel7ppc64bebuilder0 Date: Wed, 6 Jun 2018 10:56:44 +0200 Subject: [PATCH] libvirt package update to working package Signed-off-by: virtbuilder_pel7ppc64bebuilder0 --- SPECS/libvirt.spec | 595 ++++++++++++++++++++------------------------- 1 file changed, 268 insertions(+), 327 deletions(-) diff --git a/SPECS/libvirt.spec b/SPECS/libvirt.spec index 1c321b0..86c4fae 100644 --- a/SPECS/libvirt.spec +++ b/SPECS/libvirt.spec @@ -1,108 +1,78 @@ %define supported_platform 1 -# Default to skipping autoreconf. Distros can change just this one line -# (or provide a command-line override) if they backport any patches that -# touch configure.ac or Makefile.am. -%{!?enable_autotools:%global enable_autotools 0} -# The hypervisor drivers that run in libvirtd -%define with_xen 0 -%define with_qemu 1 -%define with_lxc 1 -%define with_uml 0 -%define with_libxl 0 -%define with_vbox 0 -%define qemu_kvm_arches x86_64 ppc64 ppc64le aarch64 -%define with_qemu_tcg 1 -%define with_qemu_kvm 1 - -# Then the hypervisor drivers that run outside libvirtd, in libvirt.so -%define with_openvz 0 -%define with_vmware 0 -%define with_phyp 1 -%define with_esx 0 -%define with_hyperv 0 - -# Then the secondary host drivers, which run inside libvirtd +%global enable_autotools 0 +%define qemu_kvm_arches %{ix86} x86_64 ppc64 ppc64le + %define with_storage_rbd 1 %define with_storage_sheepdog 0 %define with_storage_gluster 1 %define with_numactl 1 - -# A few optional bits off by default, we enable later -%define with_fuse 1 -%define with_cgconfig 0 -%define with_sanlock 1 -%define with_systemd 1 -%define with_numad 1 -%define with_firewalld 0 -%define with_libssh2 1 -%define with_wireshark 0 -%define with_libssh 1 -%define with_pm_utils 1 - -# Finally set the OS / architecture specific special cases - -# Xen is available only on i386 x86_64 ia64 -%ifnarch %{ix86} x86_64 ia64 - %define with_xen 0 - %define with_libxl 0 -%endif - -# vbox is available only on i386 x86_64 -%ifnarch %{ix86} x86_64 - %define with_vbox 0 -%endif - -# Numactl is not available on s390[x] and ARM -%ifarch s390 s390x %{arm} - %define with_numactl 0 -%endif - -# Fedora 17 / RHEL-7 are first where we use systemd. Although earlier -# Fedora has systemd, libvirt still used sysvinit there. -%if 0%{?fedora} || 0%{?rhel} >= 7 - %define with_pm_utils 0 -%endif - -# Enable wireshark plugins for all distros shipping libvirt 1.2.2 or newer -%if 0%{?fedora} - %define with_wireshark 0%{!?_without_wireshark:1} -%endif - -# Pull in cgroups config system -%if %{with_qemu} || %{with_lxc} - %define with_cgconfig 0%{!?_without_cgconfig:1} -%endif - -# Force QEMU to run as non-root +%define with_storage_zfs 0 +%define with_fuse 1 +%define with_cgconfig 1 +%define with_sanlock 1 +%define with_systemd 1 +%define with_numad 1 +%define with_numactl 1 +%define with_firewalld 0 +%define with_pm_utils 1 +%define with_qemu 1 +%define with_qemu_tcg 1 +%define with_qemu_kvm 1 +%define with_lxc 1 +%define with_uml 0 +%define with_libxl 0 +%define with_esx 0 +%define with_openvz 0 +%define with_vbox 0 +%define with_phyp 1 +%define with_vmware 0 +%define with_xenapi 0 +%define with_hyperv 1 +%define with_vz 0 +%define with_systemd 1 +%define with_systemd_macros 1 +%define with_fuse 1 +%define with_libssh 1 +%define with_libssh2 1 +%define with_bash_completion 1 +%define with_cgconfig 1 +%define with_wireshark 0 +%define wireshark_plugindir %{_libdir}/wireshark/plugins +%define python python2 %define qemu_user qemu %define qemu_group qemu - -%define with_systemd_macros 1 - - -# RHEL releases provide stable tool chains and so it is safe to turn -# compiler warning into errors without being worried about frequent -# changes in reported warnings -%define enable_werror --enable-werror -### # # # %define enable_werror --disable-werror - +### ### ### %define enable_werror --enable-werror +%define enable_werror --disable-werror %define tls_priority "@LIBVIRT,SYSTEM" -### %define tls_priority "@SYSTEM" -### %define tls_priority "NORMAL" +# # # ### %define tls_priority "NORMAL" + Summary: Library providing a simple virtualization API Name: libvirt -Version: 4.2.0 +Version: 4.3.0 Release: 1%{?dist}%{?extra_release} License: LGPLv2+ Group: Development/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root -URL: http://libvirt.org/ +URL: https://libvirt.org/ -%if %(echo %{version} | grep -o \\. | wc -l) == 3 +%if %(echo %{version} | grep -q "\.0$"; echo $?) == 1 %define mainturl stable_updates/ %endif -Source: http://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.xz +Source: https://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.xz +Source1: symlinks + +Patch1: libvirt-RHEL-screenshot-Implement-multiple-screen-support.patch +Patch2: libvirt-RHEL-Support-virtio-disk-hotplug-in-JSON-mode.patch +Patch3: libvirt-RHEL-Add-support-for-QMP-I-O-error-reason.patch +Patch4: libvirt-RHEL-qemu-support-relative-backing-for-RHEL-7.0.z-qemu.patch +Patch5: libvirt-RHEL-Fix-maxvcpus-output.patch +#Patch6: libvirt-RHEL-Hack-around-changed-Broadwell-Haswell-CPUs.patch +Patch7: libvirt-RHEL-Add-rhel-machine-types-to-qemuDomainMachineNeedsFDC.patch +Patch8: libvirt-RHEL-qemu-Add-ability-to-set-sgio-values-for-hostdev.patch +Patch9: libvirt-RHEL-qemu-Add-check-for-unpriv-sgio-for-SCSI-generic-host-device.patch +Patch10: libvirt-RHEL-qemu-Support-vhost-user-multiqueue-with-QEMU-2.3.patch +Patch11: libvirt-RHEL-Define-ETHTOOL_-GS-COALESCE-when-building-on-older-kernels.patch Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-daemon-config-network = %{version}-%{release} @@ -119,9 +89,6 @@ Requires: libvirt-daemon-driver-qemu = %{version}-%{release} %if %{with_uml} Requires: libvirt-daemon-driver-uml = %{version}-%{release} %endif -%if %{with_xen} -Requires: libvirt-daemon-driver-xen = %{version}-%{release} -%endif %if %{with_vbox} Requires: libvirt-daemon-driver-vbox = %{version}-%{release} %endif @@ -144,19 +111,26 @@ BuildRequires: gettext-devel BuildRequires: libtool BuildRequires: /usr/bin/pod2man %endif +BuildRequires: gcc BuildRequires: git +%if 0%{?fedora} >= 27 || 0%{?rhel} > 7 +BuildRequires: perl-interpreter +%else BuildRequires: perl -BuildRequires: python +%endif +BuildRequires: %{python} %if %{with_systemd} BuildRequires: systemd-units %endif -%if %{with_xen} || %{with_libxl} +%if %{with_libxl} BuildRequires: xen-devel %endif BuildRequires: libxml2-devel -BuildRequires: xhtml1-dtds BuildRequires: libxslt BuildRequires: readline-devel +%if %{with_bash_completion} +BuildRequires: bash-completion >= 2.0 +%endif BuildRequires: ncurses-devel BuildRequires: gettext BuildRequires: libtasn1-devel @@ -197,11 +171,9 @@ BuildRequires: ebtables BuildRequires: module-init-tools BuildRequires: cyrus-sasl-devel %if 0%{?fedora} || 0%{?rhel} >= 7 -# F22 polkit-devel doesn't pull in polkit anymore, which we need for pkcheck BuildRequires: polkit >= 0.112 -BuildRequires: polkit-devel >= 0.112 %else -BuildRequires: polkit-devel >= 0.93 +BuildRequires: polkit >= 0.93 %endif # For mount/umount in FS driver BuildRequires: util-linux @@ -210,11 +182,6 @@ BuildRequires: util-linux BuildRequires: libacl-devel # From QEMU RPMs BuildRequires: /usr/bin/qemu-img -%else - %if %{with_xen} -# From Xen RPMs -BuildRequires: /usr/sbin/qcow-create - %endif %endif # For LVM drivers BuildRequires: lvm2 @@ -225,7 +192,7 @@ BuildRequires: parted-devel # For Multipath support BuildRequires: device-mapper-devel %if %{with_storage_rbd} - %if 0%{?rhel} >= 7 + %if 0%{?fedora} || 0%{?rhel} >= 7 BuildRequires: librados2-devel BuildRequires: librbd1-devel %else @@ -239,6 +206,12 @@ BuildRequires: glusterfs-devel >= 3.4.1 %if %{with_storage_sheepdog} BuildRequires: sheepdog %endif +%if %{with_storage_zfs} +# Support any conforming implementation of zfs. On stock Fedora +# this is zfs-fuse, but could be zfsonlinux upstream RPMs +BuildRequires: /sbin/zfs +BuildRequires: /sbin/zpool +%endif %if %{with_numactl} # For QEMU/LXC numa info BuildRequires: numactl-devel @@ -285,17 +258,18 @@ BuildRequires: numad %endif %if %{with_wireshark} - %if 0%{fedora} >= 24 BuildRequires: wireshark-devel >= 2.1.0 - %else -BuildRequires: wireshark-devel >= 1.12.1 - %endif %endif %if %{with_libssh} BuildRequires: libssh-devel >= 0.7.0 %endif +%if 0%{?fedora} > 27 || 0%{?rhel} > 7 +BuildRequires: rpcgen +BuildRequires: libtirpc-devel +%endif + Provides: bundled(gnulib) %description @@ -314,9 +288,6 @@ copy of the libvirt.org website documentation. %package daemon Summary: Server side daemon and supporting files for libvirt library Group: Development/Libraries -%ifarch ppc64 ppc64le -Patch1000: libvirt-systemd-smt-off.patch -%endif # All runtime requirements for the libvirt package (runtime requrements # for subpackages are listed later in those subpackages) @@ -464,11 +435,6 @@ Requires: util-linux %if %{with_qemu} # From QEMU RPMs Requires: /usr/bin/qemu-img -%else - %if %{with_xen} -# From Xen RPMs -Requires: /usr/sbin/qcow-create - %endif %endif %description daemon-driver-storage-core @@ -574,6 +540,21 @@ sheepdog volumes using. %endif +%if %{with_storage_zfs} +%package daemon-driver-storage-zfs +Summary: Storage driver plugin for ZFS +Group: Development/Libraries +Requires: libvirt-daemon-driver-storage-core = %{version}-%{release} +# Support any conforming implementation of zfs +Requires: /sbin/zfs +Requires: /sbin/zpool + +%description daemon-driver-storage-zfs +The storage driver backend adding implementation of the storage APIs for +ZFS volumes. +%endif + + %package daemon-driver-storage Summary: Storage driver plugin including all backends for the libvirtd daemon Group: Development/Libraries @@ -592,6 +573,9 @@ Requires: libvirt-daemon-driver-storage-rbd = %{version}-%{release} %if %{with_storage_sheepdog} Requires: libvirt-daemon-driver-storage-sheepdog = %{version}-%{release} %endif +%if %{with_storage_zfs} +Requires: libvirt-daemon-driver-storage-zfs = %{version}-%{release} +%endif %description daemon-driver-storage The storage driver plugin for the libvirtd daemon, providing @@ -613,7 +597,7 @@ Requires: gzip Requires: bzip2 Requires: lzop Requires: xz - %if 0%{?fedora} >= 24 + %if 0%{?fedora} || 0%{?rhel} > 7 Requires: systemd-container %endif @@ -631,7 +615,7 @@ Group: Development/Libraries Requires: libvirt-daemon = %{version}-%{release} # There really is a hard cross-driver dependency here Requires: libvirt-daemon-driver-network = %{version}-%{release} - %if 0%{?fedora} >= 24 + %if 0%{?fedora} || 0%{?rhel} > 7 Requires: systemd-container %endif @@ -655,19 +639,6 @@ User Mode Linux %endif -%if %{with_xen} -%package daemon-driver-xen -Summary: Xen driver plugin for the libvirtd daemon -Group: Development/Libraries -Requires: libvirt-daemon = %{version}-%{release} - -%description daemon-driver-xen -The Xen driver plugin for the libvirtd daemon, providing -an implementation of the hypervisor driver APIs using -Xen -%endif - - %if %{with_vbox} %package daemon-driver-vbox Summary: VirtualBox driver plugin for the libvirtd daemon @@ -686,6 +657,7 @@ VirtualBox Summary: Libxl driver plugin for the libvirtd daemon Group: Development/Libraries Requires: libvirt-daemon = %{version}-%{release} +Obsoletes: libvirt-daemon-driver-xen < 4.3.0 %description daemon-driver-libxl The Libxl driver plugin for the libvirtd daemon, providing @@ -778,15 +750,12 @@ capabilities of UML %endif -%if %{with_xen} || %{with_libxl} +%if %{with_libxl} %package daemon-xen Summary: Server side daemon & driver required to run XEN guests Group: Development/Libraries Requires: libvirt-daemon = %{version}-%{release} - %if %{with_xen} -Requires: libvirt-daemon-driver-xen = %{version}-%{release} - %endif %if %{with_libxl} Requires: libvirt-daemon-driver-libxl = %{version}-%{release} %endif @@ -836,6 +805,9 @@ Requires: gnutls-utils # Needed for probing the power management features of the host. Requires: pm-utils %endif +%if %{with_bash_completion} +Requires: %{name}-bash-completion = %{version}-%{release} +%endif %description client The client binaries needed to access the virtualization @@ -860,10 +832,20 @@ Summary: Set of tools to control libvirt daemon Group: Development/Libraries Requires: %{name}-libs = %{version}-%{release} Requires: readline +%if %{with_bash_completion} +Requires: %{name}-bash-completion = %{version}-%{release} +%endif %description admin The client side utilities to control the libvirt daemon. +%package bash-completion +Summary: Bash completion script +Group: Development/Libraries + +%description bash-completion +Bash completion script stub. + %if %{with_wireshark} %package wireshark Summary: Wireshark dissector plugin for libvirt RPC transactions @@ -921,13 +903,19 @@ Libvirt plugin for NSS for translating domain names into IP addresses. %prep -%if ! %{supported_platform} -echo "This RPM requires either Fedora >= 20 or RHEL >= 6" -exit 1 -%endif %setup -q +# "make dist" replaces all symlinks with a copy of the linked files; +# we need to replace all of them with the original symlinks +echo "Restoring symlinks" +while read lnk target; do + if [ -e $lnk ]; then + rm -rf $lnk + ln -s $target $lnk + fi +done <%{_sourcedir}/symlinks || exit 1 + # Patches have to be stored in a temporary file because RPM has # a limit on the length of the result of any macro expansion; # if the string is longer, it's silently cropped @@ -958,19 +946,13 @@ if [ $COUNT -ne $PATCHCOUNT ]; then exit 1 fi if [ $COUNT -gt 0 ]; then - xargs git am <$PATCHLIST # || exit 1 + xargs git am <$PATCHLIST || exit 1 fi echo "Applied $COUNT patches" rm -f $PATCHLIST rm -rf .git %build -%if %{with_xen} - %define arg_xen --with-xen -%else - %define arg_xen --without-xen -%endif - %if %{with_qemu} %define arg_qemu --with-qemu %else @@ -985,8 +967,10 @@ rm -rf .git %if %{with_lxc} %define arg_lxc --with-lxc + %define arg_login_shell --with-login-shell %else %define arg_lxc --without-lxc + %define arg_login_shell --without-login-shell %endif %if %{with_vbox} @@ -1049,6 +1033,12 @@ rm -rf .git %define arg_storage_gluster --without-storage-gluster %endif +%if %{with_storage_zfs} + %define arg_storage_zfs --with-storage-zfs +%else + %define arg_storage_zfs --without-storage-zfs +%endif + %if %{with_numactl} %define arg_numactl --with-numactl %else @@ -1093,7 +1083,7 @@ rm -rf .git %define when %(date +"%%F-%%T") %define where %(hostname) -%define who %{?packager}%{!?packager:Unknown} +%define who 'PowerEL Virt' %define arg_packager --with-packager="%{who}, %{when}, %{where}" %define arg_packager_version --with-packager-version="%{release}" @@ -1123,13 +1113,14 @@ rm -rf .git # place macros above and build commands below this comment +export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/%{name}.spec) + %if 0%{?enable_autotools} autoreconf -if %endif rm -f po/stamp-po -%configure %{?arg_xen} \ - %{?arg_qemu} \ +%configure %{?arg_qemu} \ %{?arg_openvz} \ %{?arg_lxc} \ %{?arg_vbox} \ @@ -1157,7 +1148,7 @@ rm -f po/stamp-po %{?arg_storage_rbd} \ %{?arg_storage_sheepdog} \ %{?arg_storage_gluster} \ - --without-storage-zfs \ + %{?arg_storage_zfs} \ --without-storage-vstorage \ %{?arg_numactl} \ %{?arg_numad} \ @@ -1188,20 +1179,22 @@ rm -f po/stamp-po %{?arg_loader_nvram} \ %{?enable_werror} \ --enable-expensive-tests \ - %{arg_init_script} -make %{?_smp_mflags} + %{arg_init_script} \ + %{?arg_login_shell} +make %{?_smp_mflags} V=1 gzip -9 ChangeLog %install rm -fr %{buildroot} +export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/%{name}.spec) + # Avoid using makeinstall macro as it changes prefixes rather than setting # DESTDIR. Newer make_install macro would be better but it's not available # on RHEL 5, thus we need to expand it here. -### make %{?_smp_mflags} install DESTDIR=%{?buildroot} SYSTEMD_UNIT_DIR=%{_unitdir} -make install DESTDIR=%{?buildroot} SYSTEMD_UNIT_DIR=%{_unitdir} +make %{?_smp_mflags} install DESTDIR=%{?buildroot} SYSTEMD_UNIT_DIR=%{_unitdir} V=1 -make %{?_smp_mflags} -C examples distclean +make %{?_smp_mflags} -C examples distclean V=1 rm -f $RPM_BUILD_ROOT%{_libdir}/*.la rm -f $RPM_BUILD_ROOT%{_libdir}/*.a @@ -1212,13 +1205,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/connection-driver/*.a rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/storage-backend/*.la rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/storage-backend/*.a %if %{with_wireshark} - %if 0%{fedora} >= 24 -rm -f $RPM_BUILD_ROOT%{_libdir}/wireshark/plugins/libvirt.la - %else -rm -f $RPM_BUILD_ROOT%{_libdir}/wireshark/plugins/*/libvirt.la -mv $RPM_BUILD_ROOT%{_libdir}/wireshark/plugins/*/libvirt.so \ - $RPM_BUILD_ROOT%{_libdir}/wireshark/plugins/libvirt.so - %endif +rm -f $RPM_BUILD_ROOT%{wireshark_plugindir}/libvirt.la %endif install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/lib/libvirt/dnsmasq/ @@ -1314,13 +1301,17 @@ exit 0 %if %{with_systemd} %if %{with_systemd_macros} - %systemd_post virtlockd.socket virtlogd.socket libvirtd.service + %systemd_post virtlockd.socket virtlockd-admin.socket + %systemd_post virtlogd.socket virtlogd-admin.socket + %systemd_post libvirtd.service %else if [ $1 -eq 1 ] ; then # Initial installation /bin/systemctl enable \ virtlockd.socket \ + virtlockd-admin.socket \ virtlogd.socket \ + virtlogd-admin.socket \ libvirtd.service >/dev/null 2>&1 || : fi %endif @@ -1340,24 +1331,34 @@ fi /sbin/chkconfig --add virtlockd %endif +# request daemon restart in posttrans +mkdir -p %{_localstatedir}/lib/rpm-state/libvirt || : +touch %{_localstatedir}/lib/rpm-state/libvirt/restart || : + %preun daemon %if %{with_systemd} %if %{with_systemd_macros} - %systemd_preun libvirtd.service virtlogd.socket virtlogd.service virtlockd.socket virtlockd.service + %systemd_preun libvirtd.service + %systemd_preun virtlogd.socket virtlogd-admin.socket virtlogd.service + %systemd_preun virtlockd.socket virtlockd-admin.socket virtlockd.service %else if [ $1 -eq 0 ] ; then # Package removal, not upgrade /bin/systemctl --no-reload disable \ libvirtd.service \ virtlogd.socket \ + virtlogd-admin.socket \ virtlogd.service \ virtlockd.socket \ + virtlockd-admin.socket \ virtlockd.service > /dev/null 2>&1 || : /bin/systemctl stop \ libvirtd.service \ virtlogd.socket \ + virtlogd-admin.socket \ virtlogd.service \ virtlockd.socket \ + virtlockd-admin.socket \ virtlockd.service > /dev/null 2>&1 || : fi %endif @@ -1378,23 +1379,11 @@ fi if [ $1 -ge 1 ] ; then /bin/systemctl reload-or-try-restart virtlockd.service >/dev/null 2>&1 || : /bin/systemctl reload-or-try-restart virtlogd.service >/dev/null 2>&1 || : - /bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 || : fi %else if [ $1 -ge 1 ]; then /sbin/service virtlockd reload > /dev/null 2>&1 || : /sbin/service virtlogd reload > /dev/null 2>&1 || : - /sbin/service libvirtd condrestart > /dev/null 2>&1 -fi -%endif - -%if %{with_systemd} -%else -%triggerpostun daemon -- libvirt-daemon < 1.2.1 -if [ "$1" -ge "1" ]; then - /sbin/service virtlockd reload > /dev/null 2>&1 || : - /sbin/service virtlogd reload > /dev/null 2>&1 || : - /sbin/service libvirtd condrestart > /dev/null 2>&1 fi %endif @@ -1405,18 +1394,30 @@ fi %triggerpostun daemon -- libvirt-daemon < 1.3.0 if [ $1 -ge 1 ] ; then %if %{with_systemd} - /bin/systemctl is-enabled libvirtd.service 1>/dev/null 2>&1 && - /bin/systemctl enable virtlogd.socket || : - /bin/systemctl is-active libvirtd.service 1>/dev/null 2>&1 && - /bin/systemctl start virtlogd.socket || : + /bin/systemctl is-enabled libvirtd.service 1>/dev/null 2>&1 && + /bin/systemctl enable virtlogd.socket virtlogd-admin.socket || : + /bin/systemctl is-active libvirtd.service 1>/dev/null 2>&1 && + /bin/systemctl start virtlogd.socket virtlogd-admin.socket || : %else - /sbin/chkconfig libvirtd 1>/dev/null 2>&1 && - /sbin/chkconfig virtlogd on || : - /sbin/service libvirtd status 1>/dev/null 2>&1 && - /sbin/service virtlogd start || : + /sbin/chkconfig libvirtd 1>/dev/null 2>&1 && + /sbin/chkconfig virtlogd on || : + /sbin/service libvirtd status 1>/dev/null 2>&1 && + /sbin/service virtlogd start || : + /sbin/service virtlockd reload > /dev/null 2>&1 || : + /sbin/service virtlogd reload > /dev/null 2>&1 || : %endif fi +%posttrans daemon +if [ -f %{_localstatedir}/lib/rpm-state/libvirt/restart ]; then +%if %{with_systemd} + /bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 || : +%else + /sbin/service libvirtd condrestart > /dev/null 2>&1 || : +%endif +fi +rm -rf %{_localstatedir}/lib/rpm-state/libvirt || : + %post daemon-config-network if test $1 -eq 1 && test ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml ; then # see if the network used by default network creates a conflict, @@ -1455,23 +1456,35 @@ if test $1 -eq 1 && test ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml ; ln -s ../default.xml %{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml # Make sure libvirt picks up the new network defininiton + mkdir -p %{_localstatedir}/lib/rpm-state/libvirt || : + touch %{_localstatedir}/lib/rpm-state/libvirt/restart || : +fi + +%posttrans daemon-config-network +if [ -f %{_localstatedir}/lib/rpm-state/libvirt/restart ]; then %if %{with_systemd} - /bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 ||: + /bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 || : %else /sbin/service libvirtd condrestart > /dev/null 2>&1 || : %endif - fi - +rm -rf %{_localstatedir}/lib/rpm-state/libvirt || : %post daemon-config-nwfilter cp %{_datadir}/libvirt/nwfilter/*.xml %{_sysconfdir}/libvirt/nwfilter/ # Make sure libvirt picks up the new nwfilter defininitons +mkdir -p %{_localstatedir}/lib/rpm-state/libvirt || : +touch %{_localstatedir}/lib/rpm-state/libvirt/restart || : + +%posttrans daemon-config-nwfilter +if [ -f %{_localstatedir}/lib/rpm-state/libvirt/restart ]; then %if %{with_systemd} - /bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 ||: + /bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 || : %else /sbin/service libvirtd condrestart > /dev/null 2>&1 || : %endif +fi +rm -rf %{_localstatedir}/lib/rpm-state/libvirt || : %if %{with_systemd} @@ -1561,7 +1574,7 @@ exit 0 %files %files docs -%doc AUTHORS ChangeLog.gz NEWS README +%doc AUTHORS ChangeLog.gz NEWS README README.md %doc libvirt-docs/* # API docs @@ -1591,14 +1604,15 @@ exit 0 %{_unitdir}/virt-guest-shutdown.target %{_unitdir}/virtlogd.service %{_unitdir}/virtlogd.socket +%{_unitdir}/virtlogd-admin.socket %{_unitdir}/virtlockd.service %{_unitdir}/virtlockd.socket +%{_unitdir}/virtlockd-admin.socket %else %{_sysconfdir}/rc.d/init.d/libvirtd %{_sysconfdir}/rc.d/init.d/virtlogd %{_sysconfdir}/rc.d/init.d/virtlockd %endif -%doc daemon/libvirtd.upstart %config(noreplace) %{_sysconfdir}/sysconfig/libvirtd %config(noreplace) %{_sysconfdir}/sysconfig/virtlogd %config(noreplace) %{_sysconfdir}/sysconfig/virtlockd @@ -1618,6 +1632,8 @@ exit 0 %dir %attr(0711, root, root) %{_localstatedir}/cache/libvirt/ +%dir %attr(0755, root, root) %{_libdir}/libvirt/ +%dir %attr(0755, root, root) %{_libdir}/libvirt/connection-driver/ %dir %attr(0755, root, root) %{_libdir}/libvirt/lock-driver %attr(0755, root, root) %{_libdir}/libvirt/lock-driver/lockd.so @@ -1721,6 +1737,11 @@ exit 0 %{_libdir}/%{name}/storage-backend/libvirt_storage_backend_sheepdog.so %endif +%if %{with_storage_zfs} +%files daemon-driver-storage-zfs +%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_zfs.so +%endif + %if %{with_qemu} %files daemon-driver-qemu %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/ @@ -1758,12 +1779,6 @@ exit 0 %{_libdir}/%{name}/connection-driver/libvirt_driver_uml.so %endif -%if %{with_xen} -%files daemon-driver-xen -%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/xen/ -%{_libdir}/%{name}/connection-driver/libvirt_driver_xen.so -%endif - %if %{with_libxl} %files daemon-driver-libxl %config(noreplace) %{_sysconfdir}/libvirt/libxl.conf @@ -1798,7 +1813,7 @@ exit 0 %files daemon-uml %endif -%if %{with_xen} || %{with_libxl} +%if %{with_libxl} %files daemon-xen %endif @@ -1837,6 +1852,10 @@ exit 0 %{_datadir}/systemtap/tapset/libvirt_qemu_probes*.stp %{_datadir}/systemtap/tapset/libvirt_functions.stp +%if %{with_bash_completion} +%{_datadir}/bash-completion/completions/virsh +%endif + %if %{with_systemd} %{_unitdir}/libvirt-guests.service @@ -1847,7 +1866,9 @@ exit 0 %attr(0755, root, root) %{_libexecdir}/libvirt-guests.sh %files libs -f %{name}.lang -%doc COPYING COPYING.LESSER +# RHEL6 doesn't have 'license' macro +%{!?_licensedir:%global license %%doc} +%license COPYING COPYING.LESSER %config(noreplace) %{_sysconfdir}/libvirt/libvirt.conf %config(noreplace) %{_sysconfdir}/libvirt/libvirt-admin.conf %{_libdir}/libvirt.so.* @@ -1884,11 +1905,14 @@ exit 0 %files admin %{_mandir}/man1/virt-admin.1* %{_bindir}/virt-admin +%{_datadir}/bash-completion/completions/virt-admin +%files bash-completion +%{_datadir}/bash-completion/completions/vsh %if %{with_wireshark} %files wireshark -%{_libdir}/wireshark/plugins/libvirt.so +%{wireshark_plugindir}/libvirt.so %endif %files nss @@ -1940,155 +1964,72 @@ exit 0 %changelog -* Mon May 8 2017 Daniel P. Berrange - 3.3.0-1 -- Rebase to version 3.3.0 - -* Mon Apr 3 2017 Daniel P. Berrange - 3.2.0-1 -- Rebase to version 3.2.0 - -* Fri Mar 3 2017 Daniel P. Berrange - 3.1.0-1 -- Rebase to version 3.1.0 - -* Fri Feb 10 2017 Fedora Release Engineering - 3.0.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Thu Jan 19 2017 Daniel P. Berrange - 3.0.0-1 -- Rebase to version 3.0.0 - -* Thu Jan 12 2017 Igor Gnatenko - 2.5.0-3 -- Rebuild for readline 7.x - -* Thu Dec 8 2016 Daniel P. Berrange - 2.5.0-2 -- Rebuild to pick up new libxen* soname - -* Mon Dec 5 2016 Daniel P. Berrange - 2.5.0-1 -- Rebase to version 2.5.0 - -* Wed Nov 2 2016 Daniel P. Berrange - 2.4.0-1 -- Rebase to version 2.4.0 - -* Thu Oct 6 2016 Daniel P. Berrange - 2.3.0-1 -- Rebase to version 2.3.0 - -* Mon Sep 5 2016 Daniel P. Berrange - 2.2.0-1 -- Rebase to version 2.2.0 - -* Tue Aug 2 2016 Daniel P. Berrange - 2.1.0-1 -- Rebase to version 2.1.0 - -* Sat Jul 23 2016 Richard W.M. Jones - 2.0.0-2 -- Rebuild to attempt to fix 'nothing provides libxenctrl.so.4.6()(64bit) needed - by libvirt-daemon-2.0.0-1.fc25.x86_64' - -* Fri Jul 1 2016 Daniel P. Berrange - 2.0.0-1 -- Rebase to version 2.0.0 -- Temporarily disable wireshark plugin due to broken wireshark headers (rhbz #1351984) - -* Mon Jun 13 2016 Richard W.M. Jones - 1.3.5-2 -- Rebuild against new glibc - (see https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/VUOTESHSWFRCYPXIVG6BSMAUITS7QCK2/). - -* Mon Jun 6 2016 Daniel P. Berrange - 1.3.5-1 -- Rebase to version 1.3.5 -- Pull in refactored, simplified spec file from upstream +* Thu May 3 2018 Daniel P. Berrangé - 4.3.0-1 +- Update to 4.2.0 release -* Fri May 20 2016 Cole Robinson - 1.3.4-2 -- Fix libxl video config via virt-install (bz #1334557) -- Advertise fedora edk2 firmware builds to apps (bz #1335395) +* Tue Apr 3 2018 Daniel P. Berrangé - 4.2.0-1 +- Update to 4.2.0 release -* Mon May 02 2016 Cole Robinson - 1.3.4-1 -- Rebased to version 1.3.4 +* Fri Mar 23 2018 Iryna Shcherbina - 4.1.0-3 +- Update Python 2 dependency declarations to new packaging standards + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) -* Tue Apr 19 2016 Cole Robinson - 1.3.3-3 -- Fix 200ms performance problem when waiting for monitor socket of new domains. +* Wed Mar 21 2018 Daniel P. Berrangé - 4.1.0-2 +- Fix systemd macro argument with line continuations (rhbz#1558648) -* Thu Apr 14 2016 Cole Robinson - 1.3.3-2 -- libvirt assigns same address to two PCI devices (bz #1325085) -- Fix build with -Werror +* Mon Mar 5 2018 Daniel Berrange - 4.1.0-1 +- Rebase to version 4.1.0 -* Thu Apr 07 2016 Cole Robinson - 1.3.3-1 -- Rebased to version 1.3.3 +* Wed Feb 07 2018 Fedora Release Engineering - 4.0.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild -* Thu Mar 17 2016 Cole Robinson - 1.3.2-3 -- Fix qemu:///session disconnect after 30 seconds -- Fix 'permission denied' errors trying to unlink disk images (bz #1289327) -- Fix qemu:///session connect race failures (bz #1271183) -- driver: log missing modules as INFO, not WARN (bz #1274849) +* Fri Jan 19 2018 Daniel P. Berrange - 4.0.0-1 +- Rebase to version 4.0.0 -* Wed Mar 9 2016 Richard W.M. Jones - 1.3.2-2 -- Add fix for RHBZ#1315606. +* Wed Dec 20 2017 Cole Robinson - 3.10.0-2 +- Rebuild for xen 4.10 -* Tue Mar 1 2016 Daniel Berrange - 1.3.2-1 -- Update to 1.3.2 release +* Tue Dec 5 2017 Daniel P. Berrange - 3.10.0-1 +- Rebase to version 3.10.0 -* Thu Feb 04 2016 Fedora Release Engineering - 1.3.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild +* Fri Nov 3 2017 Daniel P. Berrange - 3.9.0-1 +- Rebase to version 3.9.0 -* Tue Jan 19 2016 Daniel Berrange - 1.3.1-1 -- Update to 1.3.1 release +* Wed Oct 4 2017 Daniel P. Berrange - 3.8.0-1 +- Rebase to version 3.8.0 -* Wed Dec 9 2015 Daniel Berrange - 1.3.0-1 -- Update to 1.3.0 release +* Mon Sep 4 2017 Daniel P. Berrange - 3.7.0-1 +- Rebase to version 3.7.0 -* Wed Nov 11 2015 Cole Robinson - 1.2.21-1 -- Update to 1.2.21 release +* Wed Aug 2 2017 Daniel P. Berrange - 3.6.0-1 +- Rebase to version 3.6.0 -* Sun Oct 11 2015 Cole Robinson - 1.2.20-2 -- Rebuild for xen 4.6 +* Sun Jul 30 2017 Florian Weimer - 3.5.0-4 +- Rebuild with binutils fix for ppc64le (#1475636) -* Fri Oct 2 2015 Daniel P. Berrange - 1.2.20-1 -- Update to 1.2.20 release +* Tue Jul 25 2017 Daniel P. Berrange - 3.5.0-3 +- Disabled RBD on i386, arm, ppc64 (rhbz #1474743) -* Wed Sep 2 2015 Daniel P. Berrange - 1.2.19-1 -- Update to 1.2.19 release +* Mon Jul 17 2017 Cole Robinson - 3.5.0-2 +- Rebuild for xen 4.9 -* Tue Aug 4 2015 Daniel P. Berrange - 1.2.18-1 -- Update to 1.2.18 release +* Thu Jul 6 2017 Daniel P. Berrange - 3.5.0-1 +- Rebase to version 3.5.0 -* Wed Jul 29 2015 Richard W.M. Jones - 1.2.17-2 -- Fix 'Cannot write data: Broken pipe [code=38 domain=7]' (RHBZ#1247746). +* Fri Jun 2 2017 Daniel P. Berrange - 3.4.0-1 +- Rebase to version 3.4.0 -* Tue Jul 14 2015 Cole Robinson - 1.2.17-1 -- numerous improvements and refactoring of the parallels driver -- hardening of vcpu code -- hardening of migration code -- a lot of improvement and bug fixes - -* Sun Jul 12 2015 Peter Robinson 1.2.16-3 -- Rebuild (aarch64) - -* Tue Jun 16 2015 Daniel P. Berrange - 1.2.16-2 -- Rebuild for libwsman soname bump - -* Mon Jun 01 2015 Daniel P. Berrange - 1.2.16-1 -- Update to 1.2.16 release - -* Thu May 07 2015 Richard W.M. Jones - 1.2.15-2 -- Add Cole Robinson's patch to fix arch selection (bz# 1219198, bz#1219191) - -* Mon May 04 2015 Cole Robinson - 1.2.15-1 -- Rebased to version 1.2.15 - -* Wed Apr 15 2015 Cole Robinson - 1.2.14-2 -- Fix LXC domain startup (bz #1210397) -- Fix race starting multiple session daemons (bz #1200149) -- Fix change-media success messages -- Strip invalid control codes from XML (bz #1066564, bz #1184131) - -* Thu Apr 02 2015 Cole Robinson - 1.2.14-1 -- Rebased to version 1.2.14 - -* Tue Mar 10 2015 Cole Robinson - 1.2.13-2 -- Fix connecting to qemu:///session (bz #1198244) +* Mon May 8 2017 Daniel P. Berrange - 3.3.0-1 +- Rebase to version 3.3.0 -* Mon Mar 02 2015 Cole Robinson - 1.2.13-1 -- Rebased to version 1.2.13 -- lot of improvements around NUMA code -- a lot of improvement and bug fixes +* Mon Apr 3 2017 Daniel P. Berrange - 3.2.0-1 +- Rebase to version 3.2.0 -* Tue Feb 3 2015 Daniel P. Berrange - 1.2.12-2 -- Rebuild for changed xen soname +* Fri Mar 3 2017 Daniel P. Berrange - 3.1.0-1 +- Rebase to version 3.1.0 -* Tue Jan 27 2015 Daniel P. Berrange - 1.2.12-1 -- Update to 1.2.12 release +* Fri Feb 10 2017 Fedora Release Engineering - 3.0.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild +* Thu Jan 19 2017 Daniel P. Berrange - 3.0.0-1 +- Rebase to version 3.0.0