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
This commit is contained in:
Stephen Gallagher 2015-04-23 13:25:57 -04:00
parent 88e1545c03
commit 07c43f280d

View File

@ -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 || :
;;