From 478356277a16c5366a39b9bf01328896d0dcba14 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 6 Sep 2026 11:27:26 +0100 Subject: [PATCH] Drop some Debian 12 and Ubuntu 24.04 support code --- cookbooks/clamav/recipes/default.rb | 66 ++++++++++------------------ cookbooks/php/attributes/default.rb | 4 -- cookbooks/podman/recipes/default.rb | 19 +++----- cookbooks/python/recipes/default.rb | 13 +++--- cookbooks/ruby/attributes/default.rb | 4 -- 5 files changed, 35 insertions(+), 71 deletions(-) diff --git a/cookbooks/clamav/recipes/default.rb b/cookbooks/clamav/recipes/default.rb index 9353c4936..212e41c5f 100644 --- a/cookbooks/clamav/recipes/default.rb +++ b/cookbooks/clamav/recipes/default.rb @@ -22,56 +22,34 @@ include_recipe "accounts" package %w[ clamav-daemon clamav-freshclam + clamdscan + fangfrisch ] -if platform?("debian") && node[:platform_version].to_i >= 13 - package "clamav-unofficial-sigs" do - action :remove - end - - package %w[ - fangfrisch - clamdscan - ] - - directory "/var/lib/fangfrisch" do - owner "clamav" - group "clamav" - mode "775" - end - - template "/etc/fangfrisch.conf" do - source "fangfrisch.conf.erb" - owner "root" - group "root" - mode "644" - end - - execute "fangfrisch-initdb" do - command "/usr/bin/fangfrisch --conf /etc/fangfrisch.conf initdb" - user "clamav" - group "clamav" - not_if do - ::File.exist?("/var/lib/fangfrisch/db.sqlite") - end - end +directory "/var/lib/fangfrisch" do + owner "clamav" + group "clamav" + mode "775" +end - service "fangfrisch.timer" do - action [:enable, :start] - end +template "/etc/fangfrisch.conf" do + source "fangfrisch.conf.erb" + owner "root" + group "root" + mode "644" +end - file "/etc/clamav-unofficial-sigs.conf.d/50-chef.conf" do - action :delete +execute "fangfrisch-initdb" do + command "/usr/bin/fangfrisch --conf /etc/fangfrisch.conf initdb" + user "clamav" + group "clamav" + not_if do + ::File.exist?("/var/lib/fangfrisch/db.sqlite") end -else - package "clamav-unofficial-sigs" +end - template "/etc/clamav-unofficial-sigs.conf.d/50-chef.conf" do - source "clamav-unofficial-sigs.conf.erb" - owner "root" - group "root" - mode "644" - end +service "fangfrisch.timer" do + action [:enable, :start] end execute "freshclam" do diff --git a/cookbooks/php/attributes/default.rb b/cookbooks/php/attributes/default.rb index e4c142e8c..36c4fbeb9 100644 --- a/cookbooks/php/attributes/default.rb +++ b/cookbooks/php/attributes/default.rb @@ -2,13 +2,9 @@ default[:php][:version] = if platform?("debian") case node[:platform_version].to_i when 13 "8.4" # PHP version for Debian 13 Trixie - when 12 - "8.2" # PHP version for Debian 12 Bookworm end 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 diff --git a/cookbooks/podman/recipes/default.rb b/cookbooks/podman/recipes/default.rb index 3ed2e697d..725b2063f 100644 --- a/cookbooks/podman/recipes/default.rb +++ b/cookbooks/podman/recipes/default.rb @@ -18,17 +18,14 @@ # package %w[ + aardvark-dns + fuse-overlayfs + passt podman slirp4netns uidmap - fuse-overlayfs ] -if platform?("debian") && node[:platform_version].to_i >= 13 - package "passt" - package "aardvark-dns" -end - ruby_block "subuid-containers" do block do File.open("/etc/subuid", "a") do |file| @@ -75,10 +72,8 @@ service "podman-system-prune.timer" do end # Reset graph driver if vfs which is very slow. overlay is the default on Debian 13 and later. -if platform?("debian") && node[:platform_version].to_i >= 13 - execute "podman-fix-graph-driver" do - command "podman system reset --force" - only_if "test $(podman info --format '{{json .Store}}' | jq -r .graphDriverName) = 'vfs'" - ignore_failure true - end +execute "podman-fix-graph-driver" do + command "podman system reset --force" + only_if "test $(podman info --format '{{json .Store}}' | jq -r .graphDriverName) = 'vfs'" + ignore_failure true end diff --git a/cookbooks/python/recipes/default.rb b/cookbooks/python/recipes/default.rb index 1270968e5..78f66df07 100644 --- a/cookbooks/python/recipes/default.rb +++ b/cookbooks/python/recipes/default.rb @@ -17,10 +17,9 @@ # limitations under the License. # -package "python3" -package "python3-pip" -if platform?("debian") && node[:platform_version].to_i >= 13 - package "python3-venv" -end - -package "virtualenv" +package %w[ + python3 + python3-pip + python3-venv + virtualenv +] diff --git a/cookbooks/ruby/attributes/default.rb b/cookbooks/ruby/attributes/default.rb index 00a967b06..8cdb71078 100644 --- a/cookbooks/ruby/attributes/default.rb +++ b/cookbooks/ruby/attributes/default.rb @@ -4,13 +4,9 @@ default[:ruby][:system_version] = if platform?("debian") case node[:platform_version].to_i when 13 "3.3" - when 12 - "3.1" end 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.47.3