Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add both GPG keys when installing repos on SLES #157

Merged
merged 2 commits into from
Feb 5, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions lib/beaker-puppet/install_utils/foss_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1036,8 +1036,11 @@ def install_puppetlabs_release_repo_on( hosts, repo = nil, opts = options )
# package. We'll have to remember to update this block when
# we update the signing keys
if variant == 'sles' && version >= '11'
on host, "wget -O /tmp/puppet-gpg-key http://yum.puppetlabs.com/RPM-GPG-KEY-puppet"
on host, "rpm --import /tmp/puppet-gpg-key"
%w[puppet puppet-20250406].each do |gpg_key|
on host, "wget -O /tmp/#{gpg_key} https://yum.puppet.com/RPM-GPG-KEY-#{gpg_key}"
on host, "rpm --import /tmp/#{gpg_key}"
on host, "rm -f /tmp/#{gpg_key}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally I'd suggest to avoid the temporary file altogether by using rpm --import <(wget -O - $URL) but I don't know if it works here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this doesn't work as expected (tested on SLES 12):

tragic-yarn:~ # rpm --import <(wget -q -O - https://yum.puppet.com/RPM-GPG-KEY-puppet)
error: /dev/fd/63: import read failed(0).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rpmkeys --import can take a URL directly on Fedora, but just gives import read failed(2) on openSUSE Tumbleweed for some reason, even though it's using the same version of rpm. 🤷‍♂️

end
end

if variant == 'cisco_nexus'
Expand Down