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

Add new RPM GPG key for zabbix-3.2 and higher #300

Merged
merged 4 commits into from
Oct 20, 2016

Conversation

yevtushenko
Copy link
Contributor

The RPM packages are signed with 082ab56ba14fe591 key:

[user@host ~]# rpm -qpi zabbix-agent-3.2.1-1.el6.x86_64.rpm | grep Signature
Signature   : RSA/10, Mon 03 Oct 2016 12:55:23 PM UTC, Key ID 082ab56ba14fe591
[user@host ~]# rpm -qpi zabbix-agent-3.2.1-1.el7.x86_64.rpm | grep Signature
Signature   : RSA/10, Mon 03 Oct 2016 12:55:29 PM UTC, Key ID 082ab56ba14fe591

The key installed by puppet-zabbix module isn't correct:

[user@host ~]# wget -q http://repo.zabbix.com/RPM-GPG-KEY-ZABBIX -O - | gpg --with-fingerprint
pub  1024D/79EA5ED4 2012-10-28 Zabbix SIA <packager@zabbix.com>
      Key fingerprint = FBAB D5FB 2025 5ECA B22E  E194 D13D 58E4 79EA 5ED4
sub  1024g/7E1DEF85 2012-10-28

This one is correct (take a look at last 4 octets of fingerprint):

[user@host ~]# wget -q
http://repo.zabbix.com/RPM-GPG-KEY-ZABBIX-A14FE591 -O - | gpg --with-fingerprint
pub  2048R/A14FE591 2016-07-15 Zabbix LLC <packager@zabbix.com>
      Key fingerprint = A184 8F53 52D0 22B9 471D  83D0 082A B56B A14F E591
sub  2048R/E709712C 2016-07-15

@yevtushenko
Copy link
Contributor Author

I realized that only zabbix-3.2 packages are signed with new key RPM-GPG-KEY-ZABBIX-A14FE591.

The 3.0 packages are signed with d13d58e479ea5ed4:

[user@host ~]# rpm -qpi zabbix-agent-3.0.1-2.el6.x86_64.rpm | grep Signature
warning: zabbix-agent-3.0.1-2.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 79ea5ed4: NOKEY
Signature   : DSA/SHA1, Wed Apr  6 03:19:25 2016, Key ID d13d58e479ea5ed4

So I'll adapt my changes to handle both keys for different zabbix versions.

@yevtushenko yevtushenko changed the title Fix incorrect RPM GPG key. Add new RPM GPG key for zabbix-3.2 and higher Oct 19, 2016
@yevtushenko
Copy link
Contributor Author

@bastelfreak I've added version comparison, so the new zabbix-3.2 RPMs will use new gpg key.

@bastelfreak
Copy link
Member

Thanks @yevtushenko. looks good so far. Are you able to add spec tests as well?

@yevtushenko
Copy link
Contributor Author

yevtushenko commented Oct 19, 2016

@bastelfreak Can you please travis checks? It fails on HostnameItem string in zabbix_agentd config file. This check doesn't related to my changes

Failure/Error: it { should contain_file('/etc/zabbix/zabbix_agentd.conf').with_content %r{^HostnameItem=system.hostname$} }
  expected that the catalogue would contain File[/etc/zabbix/zabbix_agentd.conf] with content set to /^HostnameItem=system.hostname$/ but it is set to nil

@yevtushenko
Copy link
Contributor Author

@bastelfreak I'll add checks for GPG keys soon.

@bastelfreak
Copy link
Member

strange, I'm not really sure why this fails.This is broken on master as well, but the last merges were successful. I'm looking into this right now.

@bastelfreak bastelfreak mentioned this pull request Oct 19, 2016
@bastelfreak
Copy link
Member

@yevtushenko fixed in #302, please rebase after this is merged.

:operatingsystemmajrelease => '6',
:architecture => 'x86_64',
:osfamily => 'RedHat',
:$majorrelease => '6',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove the $. is it possible for you to migrate (parts of) this spec file into rspec-puppet-facts? Basic example: https://github.com/voxpupuli/puppet-zabbix/blob/master/spec/classes/userparameter_spec.rb#L7-L15

@yevtushenko
Copy link
Contributor Author

@bastelfreak Will be done soon.

@yevtushenko
Copy link
Contributor Author

@bastelfreak I hope I understand you correctly and did what you asked for :)

@bastelfreak
Copy link
Member

thanks @yevtushenko !

@bastelfreak bastelfreak merged commit e04e9b4 into voxpupuli:master Oct 20, 2016
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

Successfully merging this pull request may close these issues.

None yet

2 participants