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

apt-key does not output short key IDs in debian 9 #52

Closed
chrisrlong opened this issue Feb 21, 2019 · 2 comments
Closed

apt-key does not output short key IDs in debian 9 #52

chrisrlong opened this issue Feb 21, 2019 · 2 comments

Comments

@chrisrlong
Copy link
Contributor

Hi,

The provider code:

if keys && keyring
installed_keys = []
if ::File.exist?(keyring)
cmd = Mixlib::ShellOut.new("LANG=C apt-key --keyring #{keyring} list")
cmd.run_command
cmd.error!
output = cmd.stdout.split("\n")
Chef::Log.debug("apt-key output: #{output.join("\n")}")
installed_keys = output.select { |x| x.start_with?('pub') }.map do |x|
x[%r{pub./(?[A-Z0-9])}, 'keyid']
end
end

Does not detect the debian 9 apt-key output:

pub rsa4096 2016-10-05 [SC]
72EC F46A 56B4 AD39 C907 BBB7 1646 B01B 86E5 0310
uid [ unknown] Yarn Packaging yarn@dan.cx

Every chef pass reinstalls all the keys.

@chrisrlong
Copy link
Contributor Author

please see PR #53

@malmond77
Copy link
Contributor

Thanks for the report, and the PR. Let's follow up there.

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

No branches or pull requests

2 participants