From bc01174b62f87c5276308b3a87a1507258acea54 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Tue, 16 Jun 2015 15:09:50 -0400 Subject: [PATCH] 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. --- firewalld.spec | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/firewalld.spec b/firewalld.spec index b4b7ebe..b205e49 100644 --- a/firewalld.spec +++ b/firewalld.spec @@ -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,25 +208,33 @@ 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 + 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 @@ -354,6 +362,10 @@ fi %{_mandir}/man1/firewall-config*.1* %changelog +* Tue Jun 16 2015 Stephen Gallagher 0.3.14.1-2 +- Fix issue with missing polkit policy when installing firewalld on + Cloud Edition. + * Fri Jun 12 2015 Thomas Woerner - 0.3.14.1-1 - firewall-applet - do not use isSystemTrayAvailable check to fix KDE5 startup