Make sure we always create the polkit policy
There were cases (like Cloud Edition) where we would not create the polkit policy if firewalld.conf already existed.
This commit is contained in:
parent
5daf27c45b
commit
bc01174b62
@ -8,7 +8,7 @@
|
||||
Summary: A firewall daemon with D-Bus interface providing a dynamic firewall
|
||||
Name: firewalld
|
||||
Version: 0.3.14.1
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
URL: http://www.firewalld.org
|
||||
License: GPLv2+
|
||||
Source0: https://fedorahosted.org/released/firewalld/%{name}-%{version}.tar.bz2
|
||||
@ -208,27 +208,35 @@ rm -f %{buildroot}%{_datadir}/polkit-1/actions/org.fedoraproject.FirewallD1.poli
|
||||
# If we don't yet have a symlink or existing file for firewalld.conf,
|
||||
# create it. Note: this will intentionally reset the policykit policy
|
||||
# at the same time, so they are in sync.
|
||||
if [ ! -e %{_sysconfdir}/firewalld/firewalld.conf ]; then
|
||||
# Import /etc/os-release to get the variant definition
|
||||
. /etc/os-release || :
|
||||
|
||||
# Import /etc/os-release to get the variant definition
|
||||
. /etc/os-release || :
|
||||
|
||||
if [ ! -e %{_sysconfdir}/firewalld/firewalld.conf ]; then
|
||||
case "$VARIANT_ID" in
|
||||
server)
|
||||
ln -sf firewalld-server.conf %{_sysconfdir}/firewalld/firewalld.conf || :
|
||||
ln -sf org.fedoraproject.FirewallD1.server.policy %{_datadir}/polkit-1/actions/org.fedoraproject.FirewallD1.policy || :
|
||||
;;
|
||||
workstation)
|
||||
ln -sf firewalld-workstation.conf %{_sysconfdir}/firewalld/firewalld.conf || :
|
||||
ln -sf org.fedoraproject.FirewallD1.desktop.policy %{_datadir}/polkit-1/actions/org.fedoraproject.FirewallD1.policy || :
|
||||
;;
|
||||
*)
|
||||
ln -sf firewalld-standard.conf %{_sysconfdir}/firewalld/firewalld.conf
|
||||
# The standard firewall policy will be the same as Server
|
||||
ln -sf org.fedoraproject.FirewallD1.server.policy %{_datadir}/polkit-1/actions/org.fedoraproject.FirewallD1.policy || :
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ ! -e %{_datadir}/polkit-1/actions/org.fedoraproject.FirewallD1.policy ]; then
|
||||
case "$VARIANT_ID" in
|
||||
workstation)
|
||||
ln -sf org.fedoraproject.FirewallD1.desktop.policy %{_datadir}/polkit-1/actions/org.fedoraproject.FirewallD1.policy || :
|
||||
;;
|
||||
*)
|
||||
# For all other editions, we'll use the Server polkit policy
|
||||
ln -sf org.fedoraproject.FirewallD1.server.policy %{_datadir}/polkit-1/actions/org.fedoraproject.FirewallD1.policy || :
|
||||
esac
|
||||
fi
|
||||
|
||||
%post -n firewall-applet
|
||||
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
|
||||
@ -354,6 +362,10 @@ fi
|
||||
%{_mandir}/man1/firewall-config*.1*
|
||||
|
||||
%changelog
|
||||
* Tue Jun 16 2015 Stephen Gallagher <sgallagh@redhat.com> 0.3.14.1-2
|
||||
- Fix issue with missing polkit policy when installing firewalld on
|
||||
Cloud Edition.
|
||||
|
||||
* Fri Jun 12 2015 Thomas Woerner <twoerner@redhat.com> - 0.3.14.1-1
|
||||
- firewall-applet
|
||||
- do not use isSystemTrayAvailable check to fix KDE5 startup
|
||||
|
Loading…
Reference in New Issue
Block a user