From cdb13d7b3b9d8cb9c9bb084bda6cadaf6409c798 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 6 Sep 2026 10:08:24 +0100 Subject: [PATCH] Remove key cleanup code used for Debian 12 to 13 upgrades --- cookbooks/apt/recipes/fullstaq-ruby.rb | 10 --------- cookbooks/apt/recipes/hwraid.rb | 10 --------- .../apt/recipes/management-component-pack.rb | 21 +------------------ 3 files changed, 1 insertion(+), 40 deletions(-) diff --git a/cookbooks/apt/recipes/fullstaq-ruby.rb b/cookbooks/apt/recipes/fullstaq-ruby.rb index d9c2278da..d9dad7d37 100644 --- a/cookbooks/apt/recipes/fullstaq-ruby.rb +++ b/cookbooks/apt/recipes/fullstaq-ruby.rb @@ -19,16 +19,6 @@ include_recipe "apt" -if platform?("debian") && node[:platform_version].to_i >= 13 - # First remove the repo if the keyring is in the unsupported keybox database format - # Use apt_repository to remove the repository to ensure apt update is triggered later - apt_repository "fullstaq-ruby-remove" do - action :remove - repo_name "fullstaq-ruby" - only_if { ::File.exist?("/etc/apt/keyrings/fullstaq-ruby.gpg") && ::File.binread("/etc/apt/keyrings/fullstaq-ruby.gpg", 12)[8..11] == "KBXf" } - end -end - apt_repository "fullstaq-ruby" do uri "https://apt.fullstaqruby.org" distribution "#{node[:platform]}-#{node[:platform_version]}" diff --git a/cookbooks/apt/recipes/hwraid.rb b/cookbooks/apt/recipes/hwraid.rb index c30e3e41a..30d2b8623 100644 --- a/cookbooks/apt/recipes/hwraid.rb +++ b/cookbooks/apt/recipes/hwraid.rb @@ -31,16 +31,6 @@ distribution_name = if platform?("debian") "precise" end -if platform?("debian") && node[:platform_version].to_i >= 13 - # First remove the repo if the keyring is in the unsupported keybox database format - # Use apt_repository to remove the repository to ensure apt update is triggered later - apt_repository "hwraid-remove" do - action :remove - repo_name "hwraid" - only_if { ::File.exist?("/etc/apt/keyrings/hwraid.gpg") && ::File.binread("/etc/apt/keyrings/hwraid.gpg", 12)[8..11] == "KBXf" } - end -end - apt_repository "hwraid" do uri "https://hwraid.le-vert.net/#{platform_name}" distribution distribution_name diff --git a/cookbooks/apt/recipes/management-component-pack.rb b/cookbooks/apt/recipes/management-component-pack.rb index a1edd82a3..9874d5e26 100644 --- a/cookbooks/apt/recipes/management-component-pack.rb +++ b/cookbooks/apt/recipes/management-component-pack.rb @@ -36,33 +36,14 @@ if platform?("debian") [] end - if node[:platform_version].to_i >= 13 - # First remove the repo if the keyring is in the unsupported keybox database format - # Use apt_repository to remove the repository to ensure apt update is triggered later - apt_repository "mcp-remove" do - action :remove - repo_name "mcp" - only_if { ::File.exist?("/etc/apt/keyrings/mcp.gpg") && ::File.binread("/etc/apt/keyrings/mcp.gpg", 12)[8..11] == "KBXf" } - end - end - apt_repository "mcp" do uri "https://downloads.linux.hpe.com/SDR/repo/mcp" distribution "#{distribution}/current" components ["non-free"] key "https://downloads.linux.hpe.com/SDR/hpePublicKey2048_key2.pub" end - if node.dig(:dmi, :system, :product_name).to_s.end_with?("Gen9") - if node[:platform_version].to_i >= 13 - # First remove the repo if the keyring is in the unsupported keybox database format - # Use apt_repository to remove the repository to ensure apt update is triggered later - apt_repository "mcp-gen9-remove" do - action :remove - repo_name "mcp-gen9" - only_if { ::File.exist?("/etc/apt/keyrings/mcp-gen9.gpg") && ::File.binread("/etc/apt/keyrings/mcp-gen9.gpg", 12)[8..11] == "KBXf" } - end - end + if node.dig(:dmi, :system, :product_name).to_s.end_with?("Gen9") apt_repository "mcp-gen9" do uri "https://downloads.linux.hpe.com/SDR/repo/mcp" distribution "stretch/current-gen9" -- 2.47.3