Skip to content

Commit

Permalink
Merge pull request #1653 from puppetlabs/CAT-2100-add-debian-12-support
Browse files Browse the repository at this point in the history
(CAT-2100) Add Debian 12 support
  • Loading branch information
shubhamshinde360 authored Oct 25, 2024
2 parents be2a27c + 074067a commit d8d2e16
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ fixtures:
"provision": "https://github.com/puppetlabs/provision.git"
puppet_agent:
repo: 'https://github.com/puppetlabs/puppetlabs-puppet_agent.git'
ref: v4.13.0
ref: v4.21.0
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Setup Acceptance Test Matrix
id: get-matrix
run: |
bundle exec matrix_from_metadata_v2 --exclude-platforms '["Ubuntu-22.04-arm", "RedHat-9-arm"]'
bundle exec matrix_from_metadata_v2 --exclude-platforms '["Debian-12-arm", "Ubuntu-22.04-arm", "RedHat-9-arm"]'
Acceptance:
name: "${{matrix.platforms.label}}, ${{matrix.collection}}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Setup Acceptance Test Matrix
id: get-matrix
run: |
bundle exec matrix_from_metadata_v2 --exclude-platforms '["Ubuntu-22.04-arm", "RedHat-9-arm"]'
bundle exec matrix_from_metadata_v2 --exclude-platforms '["Debian-12-arm", "Ubuntu-22.04-arm", "RedHat-9-arm"]'
Acceptance:
name: "${{matrix.platforms.label}}, ${{matrix.collection}}"
Expand Down
2 changes: 1 addition & 1 deletion manifests/backup/xtrabackup.pp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
}
}
else {
if $facts['os']['family'] == 'debian' and $facts['os']['release']['major'] == '11' or
if ($facts['os']['name'] == 'debian' and versioncmp($facts['os']['release']['major'], '11') >= 0) or
($facts['os']['name'] == 'Ubuntu' and versioncmp($facts['os']['release']['major'], '22.04') >= 0) {
mysql_grant { "${backupuser}@localhost/*.*":
ensure => $ensure,
Expand Down
1 change: 1 addition & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@
'9' => 'ruby-mysql2', # stretch
'10' => 'ruby-mysql2', # buster
'11' => 'ruby-mysql2', # bullseye
'12' => 'ruby-mysql2', # bookworm
'16.04' => 'ruby-mysql', # xenial
'18.04' => 'ruby-mysql2', # bionic
'20.04' => 'ruby-mysql2', # focal
Expand Down
7 changes: 7 additions & 0 deletions manifests/server/installdb.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
$basedir = $mysql::server::_options['mysqld']['basedir']
$config_file = $mysql::server::config_file
$log_error = $mysql::server::_options['mysqld']['log-error']
$log_dir = '/var/log/mysql'

if $mysql::server::manage_config_file and $config_file != $mysql::params::config_file {
$_config_file=$config_file
Expand All @@ -30,6 +31,12 @@
}
}

file { $log_dir:
ensure => 'directory',
owner => $mysqluser,
group => $mysql::server::mysql_group,
}

mysql_datadir { $datadir:
ensure => 'present',
datadir => $datadir,
Expand Down
3 changes: 2 additions & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
"operatingsystem": "Debian",
"operatingsystemrelease": [
"10",
"11"
"11",
"12"
]
},
{
Expand Down
6 changes: 5 additions & 1 deletion spec/spec_helper_acceptance_local.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,12 @@ def sles_15?
os[:family] == 'sles' && os[:release].to_i == 15
end

def debian_12?
os[:family] == 'debian' && os[:release].to_i == 12
end

def charset
@charset ||= (ubuntu_2204? || sles_15?) ? 'utf8mb3' : 'utf8'
@charset ||= (debian_12? || ubuntu_2204? || sles_15?) ? 'utf8mb3' : 'utf8'
end

RSpec.configure do |c|
Expand Down

0 comments on commit d8d2e16

Please sign in to comment.