libvirt.spec.in: remove polkit conditional

Both RHEL and Fedora build with polkit enabled at all
times.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrange 2016-05-04 16:31:38 +01:00
parent e0db77c38e
commit a770e90809

View File

@ -79,7 +79,6 @@
%define with_selinux 0%{!?_without_selinux:1} %define with_selinux 0%{!?_without_selinux:1}
# A few optional bits off by default, we enable later # A few optional bits off by default, we enable later
%define with_polkit 0%{!?_without_polkit:0}
%define with_fuse 0%{!?_without_fuse:0} %define with_fuse 0%{!?_without_fuse:0}
%define with_yajl 0%{!?_without_yajl:0} %define with_yajl 0%{!?_without_yajl:0}
%define with_nwfilter 0%{!?_without_nwfilter:0} %define with_nwfilter 0%{!?_without_nwfilter:0}
@ -170,7 +169,6 @@
%define with_fuse 0%{!?_without_fuse:1} %define with_fuse 0%{!?_without_fuse:1}
%endif %endif
%define with_polkit 0%{!?_without_polkit:1}
%define with_yajl 0%{!?_without_yajl:1} %define with_yajl 0%{!?_without_yajl:1}
# Enable sanlock library for lock management with QEMU # Enable sanlock library for lock management with QEMU
@ -378,7 +376,6 @@ BuildRequires: ebtables
%endif %endif
BuildRequires: module-init-tools BuildRequires: module-init-tools
BuildRequires: cyrus-sasl-devel BuildRequires: cyrus-sasl-devel
%if %{with_polkit}
%if 0%{?fedora} || 0%{?rhel} >= 7 %if 0%{?fedora} || 0%{?rhel} >= 7
# F22 polkit-devel doesn't pull in polkit anymore, which we need for pkcheck # F22 polkit-devel doesn't pull in polkit anymore, which we need for pkcheck
BuildRequires: polkit >= 0.112 BuildRequires: polkit >= 0.112
@ -386,7 +383,6 @@ BuildRequires: polkit-devel >= 0.112
%else %else
BuildRequires: polkit-devel >= 0.93 BuildRequires: polkit-devel >= 0.93
%endif %endif
%endif
%if %{with_storage_fs} %if %{with_storage_fs}
# For mount/umount in FS driver # For mount/umount in FS driver
BuildRequires: util-linux BuildRequires: util-linux
@ -462,10 +458,8 @@ BuildRequires: util-linux
BuildRequires: nfs-utils BuildRequires: nfs-utils
%endif %endif
%if %{with_firewalld} || %{with_polkit}
# Communication with the firewall and polkit daemons use DBus # Communication with the firewall and polkit daemons use DBus
BuildRequires: dbus-devel BuildRequires: dbus-devel
%endif
# Fedora build root suckage # Fedora build root suckage
BuildRequires: gawk BuildRequires: gawk
@ -511,13 +505,11 @@ Requires: module-init-tools
# for /sbin/ip & /sbin/tc # for /sbin/ip & /sbin/tc
Requires: iproute Requires: iproute
Requires: avahi-libs Requires: avahi-libs
%if %{with_polkit}
%if 0%{?fedora} || 0%{?rhel} >= 7 %if 0%{?fedora} || 0%{?rhel} >= 7
Requires: polkit >= 0.112 Requires: polkit >= 0.112
%else %else
Requires: polkit >= 0.93 Requires: polkit >= 0.93
%endif %endif
%endif
%if %{with_cgconfig} %if %{with_cgconfig}
Requires: libcgroup Requires: libcgroup
%endif %endif
@ -1088,10 +1080,6 @@ rm -rf .git
%define _without_vmware --without-vmware %define _without_vmware --without-vmware
%endif %endif
%if ! %{with_polkit}
%define _without_polkit --without-polkit
%endif
%if ! %{with_uml} %if ! %{with_uml}
%define _without_uml --without-uml %define _without_uml --without-uml
%endif %endif
@ -1223,7 +1211,7 @@ rm -f po/stamp-po
%{?_without_libxl} \ %{?_without_libxl} \
--with-sasl \ --with-sasl \
--with-avahi \ --with-avahi \
%{?_without_polkit} \ --with-polkit \
--with-libvirtd \ --with-libvirtd \
%{?_without_uml} \ %{?_without_uml} \
%{?_without_phyp} \ %{?_without_phyp} \
@ -1385,12 +1373,10 @@ then
fi fi
%pre daemon %pre daemon
%if %{with_polkit}
# 'libvirt' group is just to allow password-less polkit access to # 'libvirt' group is just to allow password-less polkit access to
# libvirtd. The uid number is irrelevant, so we use dynamic allocation # libvirtd. The uid number is irrelevant, so we use dynamic allocation
# described at the above link. # described at the above link.
getent group libvirt >/dev/null || groupadd -r libvirt getent group libvirt >/dev/null || groupadd -r libvirt
%endif
exit 0 exit 0
@ -1708,11 +1694,9 @@ exit 0
%{_datadir}/augeas/lenses/tests/test_libvirt_lockd.aug %{_datadir}/augeas/lenses/tests/test_libvirt_lockd.aug
%endif %endif
%if %{with_polkit}
%{_datadir}/polkit-1/actions/org.libvirt.unix.policy %{_datadir}/polkit-1/actions/org.libvirt.unix.policy
%{_datadir}/polkit-1/actions/org.libvirt.api.policy %{_datadir}/polkit-1/actions/org.libvirt.api.policy
%{_datadir}/polkit-1/rules.d/50-libvirt.rules %{_datadir}/polkit-1/rules.d/50-libvirt.rules
%endif
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/ %dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/