From 07c43f280dc99674ad2f7151890f3b4c083edd58 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Thu, 23 Apr 2015 13:25:57 -0400 Subject: [PATCH] Update per-product config specification to latest version See: https://fedoraproject.org/w/index.php?title=User:Sgallagh/Per-Product_Configuration_Packaging_Draft&oldid=410792 --- firewalld.spec | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/firewalld.spec b/firewalld.spec index 2321b66..768def8 100644 --- a/firewalld.spec +++ b/firewalld.spec @@ -43,6 +43,9 @@ Requires: python3-firewall = %{version}-%{release} Requires: python2-firewall = %{version}-%{release} %endif #0%{?use_python3} +Provides: variant_config(Server) +Provides: variant_config(Workstation) + # Remove old config subpackages Obsoletes: firewalld-config-standard <= 0.3.13 Obsoletes: firewalld-config-cloud <= 0.3.13 @@ -198,18 +201,14 @@ rm -f %{buildroot}%{_datadir}/polkit-1/actions/org.fedoraproject.FirewallD1.poli # 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 + . /etc/os-release || : - # Make sure that we remove any dangling links - rm -f %{_sysconfdir}/firewalld/firewalld.conf || : - rm -f %{_datadir}/polkit-1/actions/org.fedoraproject.FirewallD1.policy || : - - case $VARIANT in - "Server") + case "$VARIANT" 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") + 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 || : ;;