Skip to content

Commit

Permalink
Update yum config for CentOS Stream 9 (#172)
Browse files Browse the repository at this point in the history
The Powertools repo doesn't exist for CentOS Stream 9.  The equivalent
packages are in the CRB repo.
  • Loading branch information
pdohertybcov authored Mar 1, 2024
1 parent 921fae4 commit 9ccbf3e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

- CentOS Stream 9 uses 'crb' instead of the 'powertools' repo.

## 2.5.5 - *2023-10-26*

## 2.5.4 - *2023-09-29*
Expand Down
8 changes: 7 additions & 1 deletion resources/install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@
src_path = "#{Chef::Config['file_cache_path']}/ruby-build"

if platform_family?('rhel')
if node['platform_version'].to_i >= 8
if node['platform_version'].to_i == 9
package 'yum-utils'

execute 'yum-config-manager --enable crb' do
not_if 'yum-config-manager --dump crb | grep -q "enabled = 1"'
end
elsif node['platform_version'].to_i == 8
package 'yum-utils'

execute 'yum-config-manager --enable powertools' do
Expand Down

0 comments on commit 9ccbf3e

Please sign in to comment.