-
Notifications
You must be signed in to change notification settings - Fork 461
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
Allow passing all keyring
params in apt::source
#1147
Conversation
We don't need apt::keyring::keyring_thing, it should just be apt::keyring::thing.
Being able to provide the dir, filename, and full file path makes the logic too complicated for users of this defined type. We should only allow providing the filename and dir, and then compute the full path from those. Otherwise, someone could pass all three parameters, in which case the filename and dir would be ignored, which could be confusing.
This uses the same logic as apt::keyring itself, and what I think would be the least surprising logic: 1. Passing both `dir` and `filename`: you have provided the full path, so that is used in the signed-by setting. 2. Passing just the `filename` means you want to use the default dir, /etc/apt/keyrings. 3. Passing just the `dir` means you want to use the given directory, and the `name` attribute as the filename. 4. Passing only `name` means use `name` with the default dir.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As in the other PR, I think it's a good change but we should wait until we've more breaking changes
I'm intending to make use of this to modernize puppetlabs-puppet_agent in https://github.com/puppetlabs/puppetlabs-puppet_agent/blob/bd687442d8eaf9a08cb3f138f1e7a965c46f8490/manifests/osfamily/debian.pp |
@bastelfreak IMO these aren't backwards-incompatible changes since there hasn't been a release done with |
Ended up not needing this for puppetlabs/puppetlabs-puppet_agent#681, but I think these changes are good still. |
@kenyon oh right! |
Allow passing all `keyring` params in `apt::source`
apt::keyring
attributes