Skip to content

Commit 0027dcb

Browse files
authored
Fix CentOS Stream 10 (#600)
Signed-off-by: Dan Webb <dan.webb@damacus.io>
1 parent c88c9c8 commit 0027dcb

File tree

6 files changed

+20
-9
lines changed

6 files changed

+20
-9
lines changed

mise.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
1-
# .mise.toml
2-
31
[env]
4-
PATH = "/opt/chef-workstation/bin:/opt/chef-workstation/embedded/bin:{{env.PATH}}"
5-
KITCHEN_LOCAL_YAML = "kitchen.dokken.yml"
2+
_.path = "/opt/chef-workstation/bin"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Disable epel-next for CentOS Stream 10 as it doesn't exist
2+
if platform_family?('rhel') && node['platform_version'].to_i >= 10
3+
default['yum']['epel-next']['managed'] = false
4+
end

test/cookbooks/test/recipes/config_3.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
http_response 'set-header Expires %[date(3600),http_date]'
3535
default_backend 'servers'
3636
option %w(dontlog-normal)
37-
extra_options('bind-process' => 'odd')
37+
# bind-process is deprecated in HAProxy 2.5+ and removed in 3.x
38+
extra_options('bind-process' => 'odd') unless node['platform_version'].to_i >= 10
3839
hash_type 'consistent'
3940
end
4041

test/cookbooks/test/recipes/source_lua.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
# install lua dependencies
44
case node['platform_family']
55
when 'rhel', 'fedora'
6-
package %w(
6+
# Use pcre2-devel on RHEL/CentOS >= 10, pcre-devel on older versions
7+
pcre_pkg = node['platform_version'].to_i >= 10 ? 'pcre2-devel' : 'pcre-devel'
8+
package %W(
79
readline-devel
810
ncurses-devel
9-
pcre-devel
11+
#{pcre_pkg}
1012
openssl-devel
1113
zlib-devel
1214
)

test/cookbooks/test/recipes/source_openssl.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
# package %w(build-essential zlib1g-dev) if platform_family?('debian')
44

5+
# Install perl modules for OpenSSL configure script on RHEL/CentOS >= 10
6+
package %w(perl-FindBin perl-lib perl-File-Compare perl-File-Copy perl-IPC-Cmd perl-Pod-Html) if platform_family?('rhel', 'fedora') && node['platform_version'].to_i >= 10
7+
58
# package %w(make gcc perl pcre-devel zlib-devel perl-core) if platform_family?('rhel')
69

710
# override environment variable

test/integration/config_3/controls/config_spec.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,14 @@
7272
' http-response set-header Expires %\[date\(3600\),http_date\]',
7373
' default_backend servers',
7474
' option dontlog-normal',
75-
' bind-process odd',
76-
' hash-type consistent',
7775
]
7876

77+
platform_version = os.release.to_i
78+
if platform_version < 10
79+
cfg_content << ' bind-process odd'
80+
end
81+
cfg_content << ' hash-type consistent'
82+
7983
describe file('/etc/haproxy/haproxy.cfg') do
8084
its('content') { should match(/#{cfg_content.join('\n')}/) }
8185
end

0 commit comments

Comments
 (0)