Backports: add keyring support #1162
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds support for the
keyringparameter ofapt::source(puppetlabs-apt/manifests/source.pp
Line 90 in 0871cad
apt::backportsclass. This is needed to allow for addingsigned-by=…to the backportssources.list.dentry created by this class. The default is to use the Debian or Ubuntu archive keyring installed by the debian-archive-keyring or ubuntu-keyring packages. If$keyis specified, then that parameter takes precedence to avoid breaking existing setups that specify$key, since otherwise we would be providing both$keyand$keyringtoapt::source, which is an error (puppetlabs-apt/manifests/source.pp
Line 136 in 0871cad
I didn't make an effort to support linuxmint or other OSes besides Debian and Ubuntu, since we only declare support for Debian and Ubuntu:
puppetlabs-apt/metadata.json
Lines 16 to 32 in 0871cad
params.ppand use hiera data, since the default value for$keyringwould be different (linuxmint would use/usr/share/keyrings/linuxmint-keyring.gpg, for example).Easiest to review the individual commits.