From af105256ad25964d77fc81d310d388ddd4d01da5 Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Thu, 28 May 2026 23:28:20 +0100 Subject: [PATCH] apt: remove fullstaq-ruby keyring if the unsupported keybox database format --- cookbooks/apt/recipes/fullstaq-ruby.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/cookbooks/apt/recipes/fullstaq-ruby.rb b/cookbooks/apt/recipes/fullstaq-ruby.rb index ddcf1a433..4a34a0d6b 100644 --- a/cookbooks/apt/recipes/fullstaq-ruby.rb +++ b/cookbooks/apt/recipes/fullstaq-ruby.rb @@ -19,9 +19,19 @@ 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 + 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]}" components ["main"] - key "394F883E0C43569450FDFB92A9AF1C7C2ED65CC0" # https://raw.githubusercontent.com/fullstaq-ruby/server-edition/main/fullstaq-ruby.asc + key "https://raw.githubusercontent.com/fullstaq-ruby/server-edition/main/fullstaq-ruby.asc" end -- 2.47.3