Blame SOURCES/firewalld-0.4.4.4-policy-choice_rhbz#1449754.patch

843f86
commit 0c480ec760c3ecaeea325041bdffc6d3d1153d88
843f86
Author: Thomas Woerner <twoerner@redhat.com>
843f86
Date:   Wed May 17 17:56:39 2017 +0200
843f86
843f86
    Rename extension for policy choices (server and desktop) to .policy.choice (RHBZ#1449754)
843f86
    
843f86
    This is done at installation time to still use autofoo targets etc. A change in firewall-offline command to fix --policy-server and --policy-desktop options
843f86
    has been needed for this also.
843f86
843f86
diff --git a/config/Makefile.am b/config/Makefile.am
843f86
index 33cb7da..bdc5651 100644
843f86
--- a/config/Makefile.am
843f86
+++ b/config/Makefile.am
843f86
@@ -347,5 +347,7 @@ uninstall-local: $(UNINSTALL_TARGETS)
843f86
 
843f86
 install-data-hook:
843f86
 	cd $(DESTDIR)$(polkit1_actiondir) && \
843f86
+		mv org.fedoraproject.FirewallD1.server.policy org.fedoraproject.FirewallD1.server.policy.choice && \
843f86
+		mv org.fedoraproject.FirewallD1.desktop.policy org.fedoraproject.FirewallD1.desktop.policy.choice && \
843f86
 		rm -f org.fedoraproject.FirewallD1.policy && \
843f86
-		$(LN_S) org.fedoraproject.FirewallD1.server.policy org.fedoraproject.FirewallD1.policy
843f86
+		$(LN_S) org.fedoraproject.FirewallD1.server.policy.choice org.fedoraproject.FirewallD1.policy
843f86
diff --git a/src/firewall-offline-cmd b/src/firewall-offline-cmd
843f86
index b1e8a6c..ebeb1ec 100755
843f86
--- a/src/firewall-offline-cmd
843f86
+++ b/src/firewall-offline-cmd
843f86
@@ -478,13 +478,13 @@ def pk_symlink(product='server'):
843f86
     _PK_DIR = '/usr/share/polkit-1/actions/'
843f86
     _PK_NAME = 'org.fedoraproject.FirewallD1.'
843f86
     os.chdir(_PK_DIR)
843f86
-    if os.path.isfile(_PK_NAME+product+'.policy'):
843f86
+    if os.path.isfile(_PK_NAME+product+'.policy.choice'):
843f86
         if os.path.isfile(_PK_NAME+'policy'):
843f86
             os.remove(_PK_NAME+'policy')
843f86
-        os.symlink(_PK_NAME+product+'.policy', _PK_NAME+'policy')
843f86
-        cmd.print_and_exit('symlink '+_PK_DIR+_PK_NAME+product+'.policy -> '+_PK_NAME+'policy')
843f86
+        os.symlink(_PK_NAME+product+'.policy.choice', _PK_NAME+'policy')
843f86
+        cmd.print_and_exit('symlink '+_PK_DIR+_PK_NAME+product+'.policy.choice -> '+_PK_NAME+'policy')
843f86
     else:
843f86
-        cmd.fail('no such file '+_PK_DIR+_PK_NAME+product+'.policy')
843f86
+        cmd.fail('no such file '+_PK_DIR+_PK_NAME+product+'.policy.choice')
843f86
 
843f86
 # system-config-firewall
843f86
 def read_sysconfig_args(config_file=SYSTEM_CONFIG_FIREWALL):