Issue #7714 has been reported by Stefan Kuehne.

----------------------------------------
Bug #7714: RPM Provider can't determine the version of unsigned packages
https://projects.puppetlabs.com/issues/7714

Author: Stefan Kuehne
Status: Unreviewed
Priority: Low
Assignee: 
Category: provider
Target version: 
Affected Puppet version: 2.6.4
Keywords: RPM-provider, signature, nosignature
Branch: 



If the rpm-provider tries to get the version of a package, he uses the command 
"rpm -q -qf "%{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}" -p 
/tmp/ruby-shadow.rpm" and extract the version.

Example:
server1:~ # rpm -q -qf "%{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} 
%{ARCH}" -p /tmp/puppet.rpm
puppet-2.6.4-3.1.x86_64


But if the package has no signature, puppet has a problem with the appearing 
warning message.

Example:

server1:~ # rpm -q -qf "%{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} 
%{ARCH}" -p /tmp/ruby-shadow.rpm
warning: /tmp/ruby-shadow.rpm: Header V3 DSA/SHA1 Signature, key ID f7d1aa3d: 
NOKEY
ruby-shadow-1.4.1-10.1.x86_64

Puppet can't determine the correct version of this rpm-file, which results in 
an error that he tries to install the file on every puppet-run.

Example (Debugoutput of a puppet run):

err: /Stage[main]/Allgemein::Facter/Package[ruby-shadow]/ensure: change from 
1.4.1-10.1 to Header-V3 failed: Could not update: Execution of '/bin/rpm -U 
--oldpackage /tmp/ruby-shadow.rpm' returned 1: warning: /tmp/ruby-shadow.rpm: 
Header V3 DSA/SHA1 Signature, key ID f7d1aa3d: NOKEY                            
             
        package ruby-shadow-1.4.1-10.1.x86_64 is already installed              
                                                                                
  
 at /etc/puppet/modules/allgemein/manifests/facter.pp:29                        
                                                                                
  

In this case, puppet identified the version as "Header-V3" and tries to install 
the package again. 

A quick workaround is to add the Parameter --nosignature in the command which 
get the version. This suppress the warning message. 


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to