sous-chefs / apt

Development repository for the apt cookbook
https://supermarket.chef.io/cookbooks/apt
Apache License 2.0
202 stars 266 forks source link

Adding apt key doesn't work on Ubuntu 16.10 #216

Closed redundent closed 7 years ago

redundent commented 7 years ago

Cookbook version

5.0.1

Chef-client version

12.16.42

Platform Details

Ubuntu 16.10

Scenario:

Using apt_repository with a key specified does not add the key. The execute is "Skipped due to not_if"

Steps to Reproduce:

Add an apt repo with a key. For example:

apt_repository 'google-cloud-sdk' do
    uri 'https://packages.cloud.google.com/apt'
    components ['main']
    distribution 'cloud-sdk-yakkety'
    key 'https://packages.cloud.google.com/apt/doc/apt-key.gpg'
end

Expected Result:

https://packages.cloud.google.com/apt/doc/apt-key.gpg should be added to the list of keys

Actual Result:

Key is not added. Execution is skipped.

Appears to be due to this Debian issue: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=829232 Output of apt-key finger has been changed which causes the extraction of the fingerprint to fail.

tas50 commented 7 years ago

We've removed the apt_update and apt_repository resources from this cookbook as they were merged into core chef. I'm going to close this issue out now. If you think it's still valid against a new chef-client release please open it up against the chef/chef repo so we can work on it where the code now resides.

jeremiahsnapp commented 7 years ago

Thanks for reporting this @redundent I followed up with this in the following issue.

https://github.com/chef/chef/issues/5831

CC @tas50