Skip to content

Commit

Permalink
Merge pull request #56 from myii/fix/use-updated-package-name-on-fedo…
Browse files Browse the repository at this point in the history
…ra-34

fix(fedora-34): use `iptables-compat` package for installation
  • Loading branch information
javierbertoli authored Jun 16, 2021
2 parents 583be09 + 650c318 commit 2ba9477
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 2ba9477

Please sign in to comment.