Skip to content

(PE-32680) Fix GPG key refresh for PE 2023.8.0 and earlier - #308

Open
cthorn42 wants to merge 1 commit into
puppetlabs:mainfrom
cthorn42:PE-fix-2023-8-0-gpg-key-expiry
Open

(PE-32680) Fix GPG key refresh for PE 2023.8.0 and earlier#308
cthorn42 wants to merge 1 commit into
puppetlabs:mainfrom
cthorn42:PE-fix-2023-8-0-gpg-key-expiry

Conversation

@cthorn42

Copy link
Copy Markdown
Collaborator

Summary

  • Extends the existing PE-32680 GPG key workaround to cover PE 2023.8.0 and earlier (previously capped at 2019.8.4)
  • Fixes the default GPG_URL, which pointed at a dead Artifactory link (404) — curl lacked --fail, so the 404 body was silently written into the key file instead of erroring, and rpm --import failed with "not an armored public key". Now defaults to https://yum.puppet.com/RPM-GPG-KEY-puppet, a live copy of the same key with a renewed (non-expired) self-signature, and curl --fail now errors loudly on a bad download instead of corrupting the key file
  • Some PE releases ship a second, separately-dated copy of the key (e.g. GPG-KEY-puppet-2025-04-06) alongside the undated one, which frictionless install scripts read directly. Only the undated file was being refreshed, so the dated copy stayed expired and frictionless installs kept failing GPG verification even after the URL fix. Now refreshes any dated siblings found alongside the undated file

Test plan

  • Verified against a live PE 2023.8.0 install/frictionless-agent run on SLES 15 (previously failing with expired-key signature errors on both the master's local repo and the frictionless agent's zypper repo)
  • setup/install.rb in pe_acceptance_tests now passes cleanly end to end (pre_suite: 1 passed / 0 failed / 0 errored) with this gem loaded via BEAKER_PE_VERSION=file://...

🤖 Generated with Claude Code

Extends the existing PE-32680 GPG key workaround to cover PE 2023.8.0
and earlier (previously capped at 2019.8.4), and fixes two bugs that
were silently breaking the refresh itself:

- The default GPG_URL pointed at a dead Artifactory link (404). Since
  curl lacked --fail, the 404 body was written straight into the key
  file instead of erroring, and rpm --import failed with "not an
  armored public key". Now defaults to https://yum.puppet.com/RPM-GPG-KEY-puppet,
  a live copy of the same key with a renewed (non-expired)
  self-signature, and curl now fails loudly on a bad download.

- Some PE releases ship a second, separately-dated copy of the key
  (e.g. GPG-KEY-puppet-2025-04-06) alongside the undated one, which
  frictionless install scripts read directly. Only the undated file
  was being refreshed, so the dated copy stayed expired and frictionless
  installs kept failing GPG verification even after the above fix.
  Now refreshes any dated siblings found alongside the undated file.

Verified against a live PE 2023.8.0 install/frictionless-agent run on
SLES 15 (previously failing with expired-key signature errors on both
the master's local repo and the frictionless agent's zypper repo);
setup/install.rb now passes cleanly end to end.
@cthorn42
cthorn42 requested review from a team as code owners July 24, 2026 17:59
@cthorn42

Copy link
Copy Markdown
Collaborator Author

@cthorn42

Copy link
Copy Markdown
Collaborator Author

Failures are due to PE main CI issues around the pe-puppetserver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants