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

Correctly calculate rpmname for all gpg versions #126

Merged
merged 2 commits into from
Dec 19, 2018
Merged

Correctly calculate rpmname for all gpg versions #126

merged 2 commits into from
Dec 19, 2018

Conversation

towo
Copy link
Member

@towo towo commented Nov 14, 2018

Pull Request (PR) description

ensure => present for yum::gpgkey is inconsistent with newer versions of GPG (presumably starting with 2.2, but I have a limited sample size). Change has occured between 2.0.9 and 2.2.5.

Observed behaviour

GPG >2.2 (?)
hawking:~ # gpg --version
gpg (GnuPG) 2.2.5
libgcrypt 1.8.2
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: /root/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
        CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2

Current method:

hawking:~ # gpg /etc/pki/rpm-gpg/Puppet.key 2>/dev/null | head -1
pub   rsa4096 2016-08-18 [SC] [expires: 2021-08-17]

Proposed method:

hawking:~ # gpg --with-colons /etc/pki/rpm-gpg/Puppet.key 2>/dev/null | head -n 1 | cut -d: -f5
7F438280EF8D349F
GPG < 2.2
kepler:~ # gpg --version
gpg (GnuPG) 2.0.9
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: ~/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA
Cipher: 3DES, CAST5, BLOWFISH, AES, AES192, AES256,

Current method:

kepler:~ # gpg /etc/pki/rpm-gpg/Puppet.key
pub  4096R/EF8D349F 2016-08-18 Puppet, Inc. Release Key (Puppet, Inc. Release Key) <release@puppet.com>

Proposed method:

kepler:~ # gpg --with-colons /etc/pki/rpm-gpg/Puppet.key 2>/dev/null | head -n 1 | cut -d: -f5
7F438280EF8D349F

This Pull Request (PR) fixes the following issues

Fixes #125

@bastelfreak
Copy link
Member

Thanks for the spec tests. Can you please have a look at the rubocop issue?

Testing for existence of the appropriate `exec` resources depending on
the parameters supplied.

Does not test for `$rpmname` being correct.
@towo
Copy link
Member Author

towo commented Dec 12, 2018

There, all good now.

@bastelfreak bastelfreak merged commit ce42920 into voxpupuli:master Dec 19, 2018
@bastelfreak bastelfreak added the bug Something isn't working label Dec 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gpgkey applied on every run due to output change
2 participants