Skip to content

Commit

Permalink
fix(fedora-34): use iptables-compat package for installation
Browse files Browse the repository at this point in the history
  • Loading branch information
myii committed Jun 16, 2021
1 parent 583be09 commit 650c318
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
4 changes: 3 additions & 1 deletion iptables/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -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] %}
Expand Down
18 changes: 12 additions & 6 deletions test/integration/default/controls/packages_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down

0 comments on commit 650c318

Please sign in to comment.