Skip to content

Commit fe40078

Browse files
(CAT-2100) Add Debian 12 support
- Add all Debian 11 and above platforms to have expected privileges. - Add ruby package for Debian 12 - When downloading the mariadb-server package '/var/log/mysql' is automatically created for other platforms, but that is not the case with Debian 12. So, make sure the directory is present. - Debian 12 uses utf8mb3 encoding since utf8 is not supported on it. - Skip Debian-12-arm platform from tests since the mysql binaries, 'my_print_defaults' and 'mysql_config_editor', are not supported for ARM architecture.
1 parent 6ffe520 commit fe40078

File tree

8 files changed

+19
-6
lines changed

8 files changed

+19
-6
lines changed

.fixtures.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ fixtures:
66
"provision": "https://github.com/puppetlabs/provision.git"
77
puppet_agent:
88
repo: 'https://github.com/puppetlabs/puppetlabs-puppet_agent.git'
9-
ref: v4.13.0
9+
ref: v4.21.0

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
- name: Setup Acceptance Test Matrix
4040
id: get-matrix
4141
run: |
42-
bundle exec matrix_from_metadata_v2 --exclude-platforms '["Ubuntu-22.04-arm", "RedHat-9-arm"]'
42+
bundle exec matrix_from_metadata_v2 --exclude-platforms '["Debian-12-arm", "Ubuntu-22.04-arm", "RedHat-9-arm"]'
4343
4444
Acceptance:
4545
name: "${{matrix.platforms.label}}, ${{matrix.collection}}"

.github/workflows/nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
- name: Setup Acceptance Test Matrix
3939
id: get-matrix
4040
run: |
41-
bundle exec matrix_from_metadata_v2 --exclude-platforms '["Ubuntu-22.04-arm", "RedHat-9-arm"]'
41+
bundle exec matrix_from_metadata_v2 --exclude-platforms '["Debian-12-arm", "Ubuntu-22.04-arm", "RedHat-9-arm"]'
4242
4343
Acceptance:
4444
name: "${{matrix.platforms.label}}, ${{matrix.collection}}"

manifests/backup/xtrabackup.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
}
8787
}
8888
else {
89-
if $facts['os']['family'] == 'debian' and $facts['os']['release']['major'] == '11' or
89+
if ($facts['os']['name'] == 'debian' and versioncmp($facts['os']['release']['major'], '11') >= 0) or
9090
($facts['os']['name'] == 'Ubuntu' and versioncmp($facts['os']['release']['major'], '22.04') >= 0) {
9191
mysql_grant { "${backupuser}@localhost/*.*":
9292
ensure => $ensure,

manifests/params.pp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@
217217
'9' => 'ruby-mysql2', # stretch
218218
'10' => 'ruby-mysql2', # buster
219219
'11' => 'ruby-mysql2', # bullseye
220+
'12' => 'ruby-mysql2', # bookworm
220221
'16.04' => 'ruby-mysql', # xenial
221222
'18.04' => 'ruby-mysql2', # bionic
222223
'20.04' => 'ruby-mysql2', # focal

manifests/server/installdb.pp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
$basedir = $mysql::server::_options['mysqld']['basedir']
1414
$config_file = $mysql::server::config_file
1515
$log_error = $mysql::server::_options['mysqld']['log-error']
16+
$log_dir = '/var/log/mysql'
1617

1718
if $mysql::server::manage_config_file and $config_file != $mysql::params::config_file {
1819
$_config_file=$config_file
@@ -30,6 +31,12 @@
3031
}
3132
}
3233

34+
file { $log_dir:
35+
ensure => 'directory',
36+
owner => $mysqluser,
37+
group => $mysql::server::mysql_group,
38+
}
39+
3340
mysql_datadir { $datadir:
3441
ensure => 'present',
3542
datadir => $datadir,

metadata.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
"operatingsystem": "Debian",
4040
"operatingsystemrelease": [
4141
"10",
42-
"11"
42+
"11",
43+
"12"
4344
]
4445
},
4546
{

spec/spec_helper_acceptance_local.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,12 @@ def sles_15?
3636
os[:family] == 'sles' && os[:release].to_i == 15
3737
end
3838

39+
def debian_12?
40+
os[:family] == 'debian' && os[:release].to_i == 12
41+
end
42+
3943
def charset
40-
@charset ||= (ubuntu_2204? || sles_15?) ? 'utf8mb3' : 'utf8'
44+
@charset ||= (debian_12? || ubuntu_2204? || sles_15?) ? 'utf8mb3' : 'utf8'
4145
end
4246

4347
RSpec.configure do |c|

0 commit comments

Comments
 (0)