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

Guard misses installed keys specified with "0x" #137

Closed
whiteley opened this issue Jun 1, 2015 · 4 comments
Closed

Guard misses installed keys specified with "0x" #137

whiteley opened this issue Jun 1, 2015 · 4 comments

Comments

@whiteley
Copy link
Contributor

whiteley commented Jun 1, 2015

In the repository provider, install_key_from_keyserver will accept a key starting with "0x" and install it successfully with the apt-key command but the logic in the not_if guard will fail causing it to be installed on every Chef run.

  • Should the repository resource validate the attribute to not contain "0x"?
  • Should "0x" be stripped from the string before the end_with? check?
@thommay
Copy link
Contributor

thommay commented Sep 1, 2015

@whiteley can you provide the output of apt-key fingerin this case and also your apt_repository block please?

@whiteley
Copy link
Contributor Author

whiteley commented Sep 1, 2015

I was able to reproduce this with the default test-kitchen setup in https://github.com/phlipper/chef-percona and created a gist which shows what I was trying to describe.

https://gist.github.com/whiteley/6ddc1d00b4560d0c46de

If you look at line 6 in apt_137.out you see that it's trying to match the correct key but the 0x breaks the end_with? check.

@whiteley
Copy link
Contributor Author

@thommay did you still need more info from me on this?

@tas50 tas50 added the Type: Bug label Aug 2, 2016
@tas50
Copy link
Contributor

tas50 commented Feb 9, 2017

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.

@tas50 tas50 closed this as completed Feb 9, 2017
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

3 participants