From 650c318a0abd89bf6ae4f069b2d8eeb07acdc0ac Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Wed, 16 Jun 2021 12:38:55 +0100 Subject: [PATCH] fix(fedora-34): use `iptables-compat` package for installation * https://bugzilla.redhat.com/show_bug.cgi?id=1953178 --- iptables/init.sls | 4 +++- .../default/controls/packages_spec.rb | 18 ++++++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/iptables/init.sls b/iptables/init.sls index 23bdc6e..29cd0d4 100644 --- a/iptables/init.sls +++ b/iptables/init.sls @@ -6,7 +6,9 @@ {%- set install = firewall.install %} {%- set strict_mode = firewall.strict %} {%- set global_block_nomatch = firewall.block_nomatch %} -{%- set packages = firewall.pkgs %} +{#- TODO: Ideally, this Fedora 34 fix should be provided from `osfingermap.yaml` but that isn't available #} +{#- Resolve this when the new `map.jinja` is made available for this formula #} +{%- set packages = ['iptables-compat'] if grains.get('osfinger', '') == 'Fedora-34' else firewall.pkgs %} {%- set ipv4 = 'IPv4' %} {%- set ipv6 = 'IPv6' %} {%- set protocols = [ipv4] %} diff --git a/test/integration/default/controls/packages_spec.rb b/test/integration/default/controls/packages_spec.rb index 5a285ac..b4b0dfa 100644 --- a/test/integration/default/controls/packages_spec.rb +++ b/test/integration/default/controls/packages_spec.rb @@ -2,12 +2,18 @@ common_packages = ['iptables'] -case os[:name] -when 'debian', 'ubuntu' - all_packages = common_packages + %w[iptables-persistent netbase] -else - all_packages = common_packages -end +all_packages = + case platform[:name] + when 'debian', 'ubuntu' + common_packages + %w[iptables-persistent netbase] + else + case system.platform[:finger] + when 'fedora-34' + ['iptables-compat'] + else + common_packages + end + end control 'Packages' do all_packages.each do |p|