Skip to content

Commit

Permalink
Update for Fedora 39 and 40 (#60)
Browse files Browse the repository at this point in the history
* Update for Fedora 39 and 40

* rspec fixup

* Remove centos stream 8 testing

* Kitchen fedora fixup

* fixup
  • Loading branch information
bmhughes authored Jul 31, 2024
1 parent 385d2d7 commit 2d83f5d
Show file tree
Hide file tree
Showing 24 changed files with 71 additions and 108 deletions.
25 changes: 17 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ jobs:
os:
- almalinux-8
- almalinux-9
- centos-7
- centos-stream-8
# - centos-7
- centos-stream-9
- fedora-latest
- rockylinux-8
Expand All @@ -45,10 +44,12 @@ jobs:
- 'remi-php82'
exclude:
- os: almalinux-8
suite: remi-php56
suite: remi-test
- os: almalinux-9
suite: remi-test
- os: almalinux-8
suite: remi-php56
- os: centos-stream-8
- os: almalinux-9
suite: remi-php56
- os: centos-stream-9
suite: remi-php56
Expand All @@ -62,8 +63,6 @@ jobs:
suite: remi-php70
- os: almalinux-9
suite: remi-php70
- os: centos-stream-8
suite: remi-php70
- os: centos-stream-9
suite: remi-php70
- os: fedora-latest
Expand All @@ -76,8 +75,6 @@ jobs:
suite: remi-php71
- os: almalinux-9
suite: remi-php71
- os: centos-stream-8
suite: remi-php71
- os: centos-stream-9
suite: remi-php71
- os: fedora-latest
Expand All @@ -100,12 +97,24 @@ jobs:
suite: remi-php73
- os: fedora-latest
suite: remi-php73
- os: rockylinux-8
suite: remi-php73
- os: rockylinux-9
suite: remi-php73
- os: almalinux-9
suite: remi-php74
- os: centos-stream-9
suite: remi-php74
- os: fedora-latest
suite: remi-php74
- os: rockylinux-8
suite: remi-php74
- os: fedora-latest
suite: remi-php80
- os: almalinux-9
suite: remi-php81
- os: rockylinux-9
suite: remi-php82
fail-fast: false

steps:
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ This file is used to list changes made in each version of the yum-remi-chef coo

## Unreleased

- Update for Fedora 39 and 40

## 7.0.8 - *2024-05-06*

## 7.0.7 - *2024-05-06*
Expand Down
4 changes: 3 additions & 1 deletion attributes/remi-gpgkey.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
'https://rpms.remirepo.net/RPM-GPG-KEY-remi2021'
when 36, 37
'https://rpms.remirepo.net/RPM-GPG-KEY-remi2022'
when 38
when 38, 39
'https://rpms.remirepo.net/RPM-GPG-KEY-remi2023'
when 40
'https://rpms.remirepo.net/RPM-GPG-KEY-remi2024'
else
Chef::Log.fatal("Fedora #{node['platform_version'].to_i} is not currently supported by this cookbook")
end
Expand Down
6 changes: 3 additions & 3 deletions libraries/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ def remi_gpg_key
'https://rpms.remirepo.net/RPM-GPG-KEY-remi2021'
when 36, 37
'https://rpms.remirepo.net/RPM-GPG-KEY-remi2022'
when 38 # future proofing
when 38, 39
'https://rpms.remirepo.net/RPM-GPG-KEY-remi2023'
when 40
'https://rpms.remirepo.net/RPM-GPG-KEY-remi2024'
end
when 'rhel'
case node['platform_version'].to_i
Expand Down Expand Up @@ -67,5 +69,3 @@ def remi_repo_description(repo_slug)
end
end
end

Chef::Resource.include ::YumRemiChef::Cookbook::Helpers
2 changes: 2 additions & 0 deletions resources/_partials/_common.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
unified_mode true

include YumRemiChef::Cookbook::Helpers

property :gpgkey, String, default: lazy { remi_gpg_key }
property :gpgcheck, [true, false], default: true
property :enabled, [true, false], default: true
Expand Down
4 changes: 0 additions & 4 deletions resources/remi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
property :debug_baseurl, String, default: lazy { remi_repo_baseurl('debug-remi') }
property :debug_description, String, default: lazy { remi_repo_description('debug-remi') }

action_class do
include YumRemiChef::Cookbook::Helpers
end

action :create do
yum_remi_safe 'default' unless fedora?

Expand Down
4 changes: 0 additions & 4 deletions resources/remi_modular.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
property :debug_baseurl, String, default: lazy { remi_repo_baseurl('debug-modular') }
property :debug_description, String, default: lazy { remi_repo_description('debug-modular') }

action_class do
include YumRemiChef::Cookbook::Helpers
end

action :create do
raise "`remi-modular` is not available for #{node['platform']} #{node['platform_version'].to_i}" if rhel_7?

Expand Down
4 changes: 0 additions & 4 deletions resources/remi_php56.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
property :debug_baseurl, String, default: lazy { remi_repo_baseurl('debug-php56') }
property :debug_description, String, default: lazy { remi_repo_description('debug-php56') }

action_class do
include YumRemiChef::Cookbook::Helpers
end

action :create do
raise "`remi-php56` is not available for #{node['platform']} #{node['platform_version'].to_i}" if rhel_8_or_fedora?

Expand Down
4 changes: 0 additions & 4 deletions resources/remi_php70.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
property :debug_baseurl, String, default: lazy { remi_repo_baseurl('debug-php70') }
property :debug_description, String, default: lazy { remi_repo_description('debug-php70') }

action_class do
include YumRemiChef::Cookbook::Helpers
end

action :create do
raise "`remi-php70` is not available for #{node['platform']} #{node['platform_version'].to_i}" if rhel_8_or_fedora?

Expand Down
4 changes: 0 additions & 4 deletions resources/remi_php71.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
property :debug_baseurl, String, default: lazy { remi_repo_baseurl('debug-php71') }
property :debug_description, String, default: lazy { remi_repo_description('debug-php71') }

action_class do
include YumRemiChef::Cookbook::Helpers
end

action :create do
raise "`remi-php71` is not available for #{node['platform']} #{node['platform_version'].to_i}" if rhel_8_or_fedora?

Expand Down
4 changes: 0 additions & 4 deletions resources/remi_php72.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
property :debug_baseurl, String, default: lazy { remi_repo_baseurl('debug-php72') }
property :debug_description, String, default: lazy { remi_repo_description('debug-php72') }

action_class do
include YumRemiChef::Cookbook::Helpers
end

action :create do
raise "`remi-php72` is not available for #{node['platform']} #{node['platform_version'].to_i}" if fedora?

Expand Down
4 changes: 0 additions & 4 deletions resources/remi_php73.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
property :debug_baseurl, String, default: lazy { remi_repo_baseurl('debug-php73') }
property :debug_description, String, default: lazy { remi_repo_description('debug-php73') }

action_class do
include YumRemiChef::Cookbook::Helpers
end

action :create do
raise "`remi-php73` is not available for #{node['platform']} #{node['platform_version'].to_i}" if fedora?

Expand Down
4 changes: 0 additions & 4 deletions resources/remi_php74.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
property :debug_baseurl, String, default: lazy { remi_repo_baseurl('debug-php74') }
property :debug_description, String, default: lazy { remi_repo_description('debug-php74') }

action_class do
include YumRemiChef::Cookbook::Helpers
end

action :create do
raise "`remi-php74` is not available for #{node['platform']} #{node['platform_version'].to_i}" if fedora?

Expand Down
4 changes: 0 additions & 4 deletions resources/remi_php80.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
property :debug_baseurl, String, default: lazy { remi_repo_baseurl('debug-php80') }
property :debug_description, String, default: lazy { remi_repo_description('debug-php80') }

action_class do
include YumRemiChef::Cookbook::Helpers
end

action :create do
yum_remi 'default'

Expand Down
4 changes: 0 additions & 4 deletions resources/remi_php81.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
property :debug_baseurl, String, default: lazy { remi_repo_baseurl('debug-php81') }
property :debug_description, String, default: lazy { remi_repo_description('debug-php81') }

action_class do
include YumRemiChef::Cookbook::Helpers
end

action :create do
yum_remi 'default'

Expand Down
4 changes: 0 additions & 4 deletions resources/remi_php82.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
property :debug_baseurl, String, default: lazy { remi_repo_baseurl('debug-php82') }
property :debug_description, String, default: lazy { remi_repo_description('debug-php82') }

action_class do
include YumRemiChef::Cookbook::Helpers
end

action :create do
yum_remi 'default'

Expand Down
4 changes: 0 additions & 4 deletions resources/remi_safe.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
property :debug_baseurl, String, default: lazy { remi_repo_baseurl('debug-safe') }
property :debug_description, String, default: lazy { remi_repo_description('debug-safe') }

action_class do
include YumRemiChef::Cookbook::Helpers
end

action :create do
include_recipe 'yum-epel' unless fedora?

Expand Down
4 changes: 0 additions & 4 deletions resources/remi_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
property :debug_baseurl, String, default: lazy { remi_repo_baseurl('debug-test') }
property :debug_description, String, default: lazy { remi_repo_description('debug-test') }

action_class do
include YumRemiChef::Cookbook::Helpers
end

action :create do
yum_remi 'default'

Expand Down
12 changes: 6 additions & 6 deletions spec/remi_modular_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
default_attributes['yum']['remi-modular']['enabled'] = true
default_attributes['yum']['remi-modular']['managed'] = true

context 'on CentOS 7' do
platform 'centos', '7'
# context 'on CentOS 7' do
# platform 'centos', '7'

it do
expect { chef_run }.to raise_error /`remi-modular` is not available for centos 7/
end
end
# it do
# expect { chef_run }.to raise_error /`remi-modular` is not available for centos 7/
# end
# end

context 'on AlmaLinux 8' do
platform 'almalinux', '8'
Expand Down
24 changes: 12 additions & 12 deletions spec/remi_php56_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@
it { is_expected.to create_yum_repository('remi-php56-debuginfo') }
end

context 'on AlmaLinux 8' do
platform 'almalinux', '8'
# context 'on AlmaLinux 8' do
# platform 'almalinux', '8'

it do
expect { chef_run }.to raise_error /`remi-php56` is not available for almalinux 8/
end
end
# it do
# expect { chef_run }.to raise_error /`remi-php56` is not available for almalinux 8/
# end
# end

context 'on AlmaLinux 9' do
platform 'almalinux', '9'
# context 'on AlmaLinux 9' do
# platform 'almalinux', '9'

it do
expect { chef_run }.to raise_error /`remi-php56` is not available for almalinux 9/
end
end
# it do
# expect { chef_run }.to raise_error /`remi-php56` is not available for almalinux 9/
# end
# end
end
24 changes: 12 additions & 12 deletions spec/remi_php70_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@
it { is_expected.to create_yum_repository('remi-php70-debuginfo') }
end

context 'on AlmaLinux 8' do
platform 'almalinux', '8'
# context 'on AlmaLinux 8' do
# platform 'almalinux', '8'

it do
expect { chef_run }.to raise_error /`remi-php70` is not available for almalinux 8/
end
end
# it do
# expect { chef_run }.to raise_error /`remi-php70` is not available for almalinux 8/
# end
# end

context 'on AlmaLinux 9' do
platform 'almalinux', '9'
# context 'on AlmaLinux 9' do
# platform 'almalinux', '9'

it do
expect { chef_run }.to raise_error /`remi-php70` is not available for almalinux 9/
end
end
# it do
# expect { chef_run }.to raise_error /`remi-php70` is not available for almalinux 9/
# end
# end
end
24 changes: 12 additions & 12 deletions spec/remi_php71_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@
it { is_expected.to create_yum_repository('remi-php71-debuginfo') }
end

context 'on AlmaLinux 8' do
platform 'almalinux', '8'
# context 'on AlmaLinux 8' do
# platform 'almalinux', '8'

it do
expect { chef_run }.to raise_error /`remi-php71` is not available for almalinux 8/
end
end
# it do
# expect { chef_run }.to raise_error /`remi-php71` is not available for almalinux 8/
# end
# end

context 'on AlmaLinux 9' do
platform 'almalinux', '9'
# context 'on AlmaLinux 9' do
# platform 'almalinux', '9'

it do
expect { chef_run }.to raise_error /`remi-php71` is not available for almalinux 9/
end
end
# it do
# expect { chef_run }.to raise_error /`remi-php71` is not available for almalinux 9/
# end
# end
end
2 changes: 1 addition & 1 deletion test/integration/inspec/controls/remi_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
its('remi.gpgkey') do
should cmp case os.name
when 'fedora'
'https://rpms.remirepo.net/RPM-GPG-KEY-remi2023'
'https://rpms.remirepo.net/RPM-GPG-KEY-remi2024'
else # rhel
case os.release.to_i
when 7
Expand Down
2 changes: 1 addition & 1 deletion test/integration/inspec/controls/remi_test_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
its('remi-test.gpgkey') do
should cmp case os.name
when 'fedora'
'https://rpms.remirepo.net/RPM-GPG-KEY-remi2023'
'https://rpms.remirepo.net/RPM-GPG-KEY-remi2024'
else # rhel
case os.release.to_i
when 7
Expand Down

0 comments on commit 2d83f5d

Please sign in to comment.