From 94a946cc2c4ba08b123b291e1c358d7902fac510 Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Mon, 7 Jul 2025 13:52:43 +0100 Subject: [PATCH] Switch apt_repository repos to using url for key retrieval --- cookbooks/apt/recipes/elasticsearch6.rb | 2 +- cookbooks/apt/recipes/elasticsearch7.rb | 2 +- cookbooks/apt/recipes/elasticsearch8.rb | 2 +- cookbooks/apt/recipes/grafana.rb | 8 +------- cookbooks/apt/recipes/hwraid.rb | 2 +- cookbooks/apt/recipes/management-component-pack.rb | 10 +++++----- cookbooks/apt/recipes/passenger.rb | 2 +- cookbooks/apt/recipes/postgresql.rb | 2 +- cookbooks/apt/recipes/yarn.rb | 2 +- 9 files changed, 13 insertions(+), 19 deletions(-) diff --git a/cookbooks/apt/recipes/elasticsearch6.rb b/cookbooks/apt/recipes/elasticsearch6.rb index 74c02a324..66844f61c 100644 --- a/cookbooks/apt/recipes/elasticsearch6.rb +++ b/cookbooks/apt/recipes/elasticsearch6.rb @@ -23,5 +23,5 @@ apt_repository "elasticsearch6.x" do uri "https://artifacts.elastic.co/packages/6.x/apt" distribution "stable" components ["main"] - key "D27D666CD88E42B4" + key "https://artifacts.elastic.co/GPG-KEY-elasticsearch" end diff --git a/cookbooks/apt/recipes/elasticsearch7.rb b/cookbooks/apt/recipes/elasticsearch7.rb index 6dc824177..57737b635 100644 --- a/cookbooks/apt/recipes/elasticsearch7.rb +++ b/cookbooks/apt/recipes/elasticsearch7.rb @@ -23,7 +23,7 @@ apt_repository "elasticsearch7.x" do uri "https://artifacts.elastic.co/packages/7.x/apt" distribution "stable" components ["main"] - key "D27D666CD88E42B4" + key "https://artifacts.elastic.co/GPG-KEY-elasticsearch" end # Workaround for mediawiki 1.39.x which ONLY supports elasticsearch 7.10.2 diff --git a/cookbooks/apt/recipes/elasticsearch8.rb b/cookbooks/apt/recipes/elasticsearch8.rb index 61a94f7aa..b9991e474 100644 --- a/cookbooks/apt/recipes/elasticsearch8.rb +++ b/cookbooks/apt/recipes/elasticsearch8.rb @@ -23,5 +23,5 @@ apt_repository "elasticsearch8.x" do uri "https://artifacts.elastic.co/packages/8.x/apt" distribution "stable" components ["main"] - key "D27D666CD88E42B4" + key "https://artifacts.elastic.co/GPG-KEY-elasticsearch" end diff --git a/cookbooks/apt/recipes/grafana.rb b/cookbooks/apt/recipes/grafana.rb index ef6531c1f..5738c23d4 100644 --- a/cookbooks/apt/recipes/grafana.rb +++ b/cookbooks/apt/recipes/grafana.rb @@ -19,15 +19,9 @@ include_recipe "apt" -remote_file "/etc/apt/trusted.gpg.d/grafana.asc" do - source "https://packages.grafana.com/gpg.key" - owner "root" - group "root" - mode "644" -end - apt_repository "grafana" do uri "https://packages.grafana.com/enterprise/deb" distribution "stable" components ["main"] + key "https://packages.grafana.com/gpg.key" end diff --git a/cookbooks/apt/recipes/hwraid.rb b/cookbooks/apt/recipes/hwraid.rb index fa5d9e1f9..c8d99bdef 100644 --- a/cookbooks/apt/recipes/hwraid.rb +++ b/cookbooks/apt/recipes/hwraid.rb @@ -35,5 +35,5 @@ apt_repository "hwraid" do uri "https://hwraid.le-vert.net/#{platform_name}" distribution distribution_name components ["main"] - key "6005210E23B3D3B4" + key "https://hwraid.le-vert.net/debian/hwraid.le-vert.net.gpg.key" end diff --git a/cookbooks/apt/recipes/management-component-pack.rb b/cookbooks/apt/recipes/management-component-pack.rb index 92d81f989..b94d3ccac 100644 --- a/cookbooks/apt/recipes/management-component-pack.rb +++ b/cookbooks/apt/recipes/management-component-pack.rb @@ -28,7 +28,7 @@ if platform?("debian") uri "https://downloads.linux.hpe.com/SDR/repo/mcp" distribution "#{node[:lsb][:codename]}/current" components ["non-free"] - key "C208ADDE26C2B797" + key ["https://downloads.linux.hpe.com/SDR/hpePublicKey2048_key1.pub", "https://downloads.linux.hpe.com/SDR/hpePublicKey2048_key2.pub"] end if node[:dmi][:system][:product_name].end_with?("Gen9") @@ -36,7 +36,7 @@ if platform?("debian") uri "https://downloads.linux.hpe.com/SDR/repo/mcp" distribution "stretch/current-gen9" components ["non-free"] - key "C208ADDE26C2B797" + key ["https://downloads.linux.hpe.com/SDR/hpePublicKey2048_key1.pub", "https://downloads.linux.hpe.com/SDR/hpePublicKey2048_key2.pub"] end end elsif platform?("ubuntu") @@ -45,21 +45,21 @@ elsif platform?("ubuntu") uri "https://downloads.linux.hpe.com/SDR/repo/mcp" distribution "jammy/current" components ["non-free"] - key "C208ADDE26C2B797" + key ["https://downloads.linux.hpe.com/SDR/hpePublicKey2048_key1.pub", "https://downloads.linux.hpe.com/SDR/hpePublicKey2048_key2.pub"] end apt_repository "mcp-focal-gen10" do uri "https://downloads.linux.hpe.com/SDR/repo/mcp" distribution "focal/current-gen10" components ["non-free"] - key "C208ADDE26C2B797" + key ["https://downloads.linux.hpe.com/SDR/hpePublicKey2048_key1.pub", "https://downloads.linux.hpe.com/SDR/hpePublicKey2048_key2.pub"] end else apt_repository "mcp-bionic-gen9" do uri "https://downloads.linux.hpe.com/SDR/repo/mcp" distribution "bionic/current-gen9" components ["non-free"] - key "C208ADDE26C2B797" + key ["https://downloads.linux.hpe.com/SDR/hpePublicKey2048_key1.pub", "https://downloads.linux.hpe.com/SDR/hpePublicKey2048_key2.pub"] end end end diff --git a/cookbooks/apt/recipes/passenger.rb b/cookbooks/apt/recipes/passenger.rb index 136175ba0..b7e208dd6 100644 --- a/cookbooks/apt/recipes/passenger.rb +++ b/cookbooks/apt/recipes/passenger.rb @@ -22,5 +22,5 @@ include_recipe "apt" apt_repository "passenger" do uri "https://oss-binaries.phusionpassenger.com/apt/passenger" components ["main"] - key "561F9B9CAC40B2F7" + key "https://oss-binaries.phusionpassenger.com/auto-software-signing-gpg-key.txt" end diff --git a/cookbooks/apt/recipes/postgresql.rb b/cookbooks/apt/recipes/postgresql.rb index 66e4c1c92..6fe6377d1 100644 --- a/cookbooks/apt/recipes/postgresql.rb +++ b/cookbooks/apt/recipes/postgresql.rb @@ -23,5 +23,5 @@ apt_repository "postgresql" do uri "https://apt.postgresql.org/pub/repos/apt" distribution "#{node[:lsb][:codename]}-pgdg" components ["main"] - key "7FCC7D46ACCC4CF8" + key "https://www.postgresql.org/media/keys/ACCC4CF8.asc" end diff --git a/cookbooks/apt/recipes/yarn.rb b/cookbooks/apt/recipes/yarn.rb index 7451e96a9..fe5059bb3 100644 --- a/cookbooks/apt/recipes/yarn.rb +++ b/cookbooks/apt/recipes/yarn.rb @@ -23,5 +23,5 @@ apt_repository "yarn" do uri "https://dl.yarnpkg.com/debian" distribution "stable" components ["main"] - key "1646B01B86E50310" + key "https://dl.yarnpkg.com/debian/pubkey.gpg" end -- 2.39.5