diff --git a/.github/workflows/test-kitchen.yml b/.github/workflows/test-kitchen.yml index c079240cc..2f7253ad6 100644 --- a/.github/workflows/test-kitchen.yml +++ b/.github/workflows/test-kitchen.yml @@ -12,7 +12,7 @@ concurrency: jobs: kitchen: name: Test Kitchen - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest permissions: packages: read strategy: @@ -119,6 +119,7 @@ jobs: - wiki os: - ubuntu-2204 + - ubuntu-2404 include: - os: ubuntu-2004 suite: mailman @@ -179,6 +180,14 @@ jobs: os: ubuntu-2204 - suite: web-rails os: ubuntu-2204 + - suite: mailman + os: ubuntu-2404 + - suite: osqa + os: ubuntu-2404 + - suite: otrs + os: ubuntu-2404 + - suite: taginfo + os: ubuntu-2404 fail-fast: false steps: - name: Login to GitHub Container Registry diff --git a/.kitchen.yml b/.kitchen.yml index 0af8c80de..0ecb1dddf 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -51,6 +51,15 @@ platforms: - RUN /usr/bin/apt-get update -y - RUN /usr/bin/apt-get install -y eatmydata - RUN echo /usr/lib/$(uname -m)-linux-gnu/libeatmydata.so >>/etc/ld.so.preload + - name: ubuntu-24.04 + driver: + image: ghcr.io/test-kitchen/dokken/ubuntu-24.04 + privileged: true + pid_one_command: /bin/systemd + intermediate_instructions: + - RUN /usr/bin/apt-get update -y + - RUN /usr/bin/apt-get install -y eatmydata + - RUN echo /usr/lib/$(uname -m)-linux-gnu/libeatmydata.so >>/etc/ld.so.preload - name: debian-12 driver: image: ghcr.io/test-kitchen/dokken/debian-12 diff --git a/cookbooks/backup/metadata.rb b/cookbooks/backup/metadata.rb index d5baa1664..c35950e0a 100644 --- a/cookbooks/backup/metadata.rb +++ b/cookbooks/backup/metadata.rb @@ -7,3 +7,4 @@ version "1.0.0" supports "ubuntu" depends "accounts" +depends "awscli" diff --git a/cookbooks/backup/recipes/default.rb b/cookbooks/backup/recipes/default.rb index 64e63fdee..6bf5c7ae9 100644 --- a/cookbooks/backup/recipes/default.rb +++ b/cookbooks/backup/recipes/default.rb @@ -18,11 +18,11 @@ # include_recipe "accounts" +include_recipe "awscli" package %w[ perl libdate-calc-perl - awscli ] directory "/store/backup" do diff --git a/cookbooks/chef/recipes/default.rb b/cookbooks/chef/recipes/default.rb index a27b99cbd..f024098a6 100644 --- a/cookbooks/chef/recipes/default.rb +++ b/cookbooks/chef/recipes/default.rb @@ -35,6 +35,8 @@ os_release = if platform?("debian") && node[:lsb][:release].to_f > 11 11 + elsif platform?("ubuntu") && node[:lsb][:release].to_f > 22.04 + 22.04 else node[:lsb][:release] end diff --git a/cookbooks/clamav/recipes/default.rb b/cookbooks/clamav/recipes/default.rb index 938b2f5ab..7d07d73ac 100644 --- a/cookbooks/clamav/recipes/default.rb +++ b/cookbooks/clamav/recipes/default.rb @@ -22,14 +22,17 @@ package %w[ clamav-daemon clamav-freshclam - clamav-unofficial-sigs ] -template "/etc/clamav-unofficial-sigs.conf.d/50-chef.conf" do - source "clamav-unofficial-sigs.conf.erb" - owner "root" - group "root" - mode "644" +if platform?("ubuntu") && node[:lsb][:release].to_f < 24.04 + package "clamav-unofficial-sigs" + + template "/etc/clamav-unofficial-sigs.conf.d/50-chef.conf" do + source "clamav-unofficial-sigs.conf.erb" + owner "root" + group "root" + mode "644" + end end execute "freshclam" do diff --git a/cookbooks/elasticsearch/recipes/default.rb b/cookbooks/elasticsearch/recipes/default.rb index a48ee9987..0c4be4071 100644 --- a/cookbooks/elasticsearch/recipes/default.rb +++ b/cookbooks/elasticsearch/recipes/default.rb @@ -25,7 +25,12 @@ when "8.x" then include_recipe "apt::elasticsearch8" end -package "default-jre-headless" +if node[:elasticsearch][:version] == "6.x" + package "openjdk-11-jre-headless" +else + package "default-jre-headless" +end + package "elasticsearch" template "/etc/elasticsearch/elasticsearch.yml" do diff --git a/cookbooks/fail2ban/recipes/default.rb b/cookbooks/fail2ban/recipes/default.rb index 216572989..97b54c48c 100644 --- a/cookbooks/fail2ban/recipes/default.rb +++ b/cookbooks/fail2ban/recipes/default.rb @@ -25,7 +25,7 @@ ruby-webrick ] -if platform?("debian") +if platform?("debian") || (platform?("ubuntu") && node[:lsb][:release].to_f >= 24.04) package "python3-inotify" else package "gamin" diff --git a/cookbooks/php/attributes/default.rb b/cookbooks/php/attributes/default.rb index 5dd05a52b..8b2b17d2e 100644 --- a/cookbooks/php/attributes/default.rb +++ b/cookbooks/php/attributes/default.rb @@ -1,8 +1,14 @@ default[:php][:version] = if platform?("debian") - "8.2" - elsif node[:lsb][:release].to_f < 22.04 - "7.4" - else - "8.1" + "8.2" # PHP version for Debian + elsif platform?("ubuntu") + case node[:lsb][:release].to_f + when 24.04 + "8.3" # PHP version for Ubuntu 24.04 + when 22.04 + "8.1" # PHP version for Ubuntu 22.04 + when 20.04 + "7.4" # PHP version for Ubuntu 20.04 + end end + default[:php][:fpm][:options] = {} diff --git a/cookbooks/ruby/attributes/default.rb b/cookbooks/ruby/attributes/default.rb index eefaf2247..14bb604f5 100644 --- a/cookbooks/ruby/attributes/default.rb +++ b/cookbooks/ruby/attributes/default.rb @@ -1,9 +1,15 @@ default[:ruby][:version] = if platform?("debian") - "3.1" - elsif node[:lsb][:release].to_f < 22.04 - "2.7" - else - "3.0" + "3.1" # ruby version for Debian + elsif platform?("ubuntu") + case node[:lsb][:release].to_f + when 24.04 + "3.2" # ruby version for Ubuntu 24.04 + when 22.04 + "3.0" # ruby version for Ubuntu 22.04 + when 20.04 + "2.7" # ruby version for Ubuntu 20.04 + end end + default[:ruby][:gem] = "/usr/bin/gem#{node[:ruby][:version]}" default[:ruby][:bundle] = "/usr/bin/bundle#{node[:ruby][:version]}" diff --git a/cookbooks/spamassassin/recipes/default.rb b/cookbooks/spamassassin/recipes/default.rb index db498b75f..4225b9fd3 100644 --- a/cookbooks/spamassassin/recipes/default.rb +++ b/cookbooks/spamassassin/recipes/default.rb @@ -19,7 +19,7 @@ package "spamassassin" -service_name = if platform?("debian") +service_name = if platform?("debian") || (platform?("ubuntu") && node[:lsb][:release].to_f >= 24.04) "spamd" else "spamassassin" diff --git a/test/integration/mail/inspec/spamassassin_spec.rb b/test/integration/mail/inspec/spamassassin_spec.rb index 18506eaa0..2b14c3962 100644 --- a/test/integration/mail/inspec/spamassassin_spec.rb +++ b/test/integration/mail/inspec/spamassassin_spec.rb @@ -1,4 +1,4 @@ -service_name = if os.name == "debian" +service_name = if os.name == "debian" || (os.name == "ubuntu" && os.release.to_f >= 24.04) "spamd" else "spamassassin" diff --git a/test/integration/openssh/inspec/openssh_spec.rb b/test/integration/openssh/inspec/openssh_spec.rb index 6560895eb..b135057d7 100644 --- a/test/integration/openssh/inspec/openssh_spec.rb +++ b/test/integration/openssh/inspec/openssh_spec.rb @@ -13,5 +13,7 @@ describe port(22) do it { should be_listening } - its("protocols") { should cmp %w[tcp tcp6] } + its("protocols") { should include "tcp" } + # https://github.com/inspec/inspec/issues/3209 + # its("protocols") { should include "tcp6" } end diff --git a/test/integration/spamassassin/inspec/spamassassin_spec.rb b/test/integration/spamassassin/inspec/spamassassin_spec.rb index 18506eaa0..2b14c3962 100644 --- a/test/integration/spamassassin/inspec/spamassassin_spec.rb +++ b/test/integration/spamassassin/inspec/spamassassin_spec.rb @@ -1,4 +1,4 @@ -service_name = if os.name == "debian" +service_name = if os.name == "debian" || (os.name == "ubuntu" && os.release.to_f >= 24.04) "spamd" else "spamassassin"