From 6afaac76de4d93804690c0bcb1ca42a7d3006d58 Mon Sep 17 00:00:00 2001 From: Robin Kraft Date: Thu, 3 Aug 2023 13:54:43 +0200 Subject: [PATCH] feat: add Debian12 Compability --- manifests/params.pp | 1 + metadata.json | 3 ++- spec/acceptance/mod_php_spec.rb | 4 ++++ spec/classes/mod/php_spec.rb | 11 +++++++++++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/manifests/params.pp b/manifests/params.pp index fbdeb0401e..d540992c0c 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -313,6 +313,7 @@ '9' => '7.0', # Debian Stretch '10' => '7.3', # Debian Buster '11' => '7.4', # Debian Bullseye + '12' => '8.2', # Debian Bookworm '20.04' => '7.4', # Ubuntu Foccal Fossal '22.04' => '8.1', # Ubuntu Jammy default => '7.2', # Ubuntu Bionic, Cosmic and Disco diff --git a/metadata.json b/metadata.json index 6a49d16645..2e67b598a1 100644 --- a/metadata.json +++ b/metadata.json @@ -49,7 +49,8 @@ "operatingsystem": "Debian", "operatingsystemrelease": [ "10", - "11" + "11", + "12" ] }, { diff --git a/spec/acceptance/mod_php_spec.rb b/spec/acceptance/mod_php_spec.rb index c6323e74ab..5c9f41e21f 100644 --- a/spec/acceptance/mod_php_spec.rb +++ b/spec/acceptance/mod_php_spec.rb @@ -36,6 +36,10 @@ class { 'apache::mod::php': } describe file("#{apache_hash['mod_dir']}/php7.4.conf") do it { is_expected.to contain 'DirectoryIndex index.php' } end + elsif os[:family] == 'debian' && os[:release] =~ %r{^12\.} + describe file("#{apache_hash['mod_dir']}/php8.2.conf") do + it { is_expected.to contain 'DirectoryIndex index.php' } + end elsif os[:family] == 'ubuntu' && os[:release] == '18.04' describe file("#{apache_hash['mod_dir']}/php7.2.conf") do it { is_expected.to contain 'DirectoryIndex index.php' } diff --git a/spec/classes/mod/php_spec.rb b/spec/classes/mod/php_spec.rb index 67e7d86b76..ad5b0a9429 100644 --- a/spec/classes/mod/php_spec.rb +++ b/spec/classes/mod/php_spec.rb @@ -84,6 +84,17 @@ } end end + when '12' + context 'on bookworm' do + it { is_expected.to contain_apache__mod('php8.2') } + it { is_expected.to contain_package('libapache2-mod-php8.2') } + + it { + expect(subject).to contain_file('php8.2.load').with( + content: "LoadModule php8_module /usr/lib/apache2/modules/libphp8.2.so\n", + ) + } + end when '18.04' context 'on bionic' do let :params do