Signing RPM packages using GPG

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Signing RPM packages using GPG
# 1  
Old 07-15-2009
Signing RPM packages using GPG

I am having difficulty getting rpm to trust the gpg key I have used to sign rpm packages I am creating.

I used gpg --gen-key to create the key. I chose RSA, 1024.

Code:
[rpmbuild@localhost etc]$ gpg --list-key
/home/rpmbuild/.gnupg/pubring.gpg
---------------------------------
pub   1024R/42A05359 2009-07-15
uid                  ******************** replaced ********
sub   1024R/37B2DA7E 2009-07-15

I signed the packages using --sign when building the rpm's using rpmbuild. Here is the output from rpm --checksig on one of my packages:

Code:
[rpmbuild@localhost x86_64]$ rpm --checksig Crypt-GeneratePassword-0.03-1.x86_64.rpm
Crypt-GeneratePassword-0.03-1.x86_64.rpm: RSA sha1 (MD5) (PGP) md5 NOT OK (MISSING KEYS: PGP#42a05359)

I believe that what I need to do is register my signature with rpm. I have tried the following:
Code:
gpg --output gpg_pub_key --export '<key_name>'

[rpmbuild@localhost .gnupg]$ rpm --import ./gpg_pub_key
error: ./gpg_pub_key: import read failed(-1).

My goal is to add these to a custom channel on our satellite server, so I guess I'll need to add the gpg signature.

Any idea's?
Padow
# 2  
Old 07-27-2009
Hi you will get that error message if you already have the key imported, you cant import a key twice etc..
in a normal terminal type gpg --list-keys to see if its already imported
# 3  
Old 07-27-2009
I corrected the issue by importing the key as root.
Padow
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Use SMB/CIFS signing when mounting Win shares

Hi, We have a number of Windows Server 2003 shares mounted on our AIX server via CIFS, using a command similar to this: mkcifsmnt -f /test -d testshare -h testserver -c testuser -p pass -w DOMAIN The windows servers are currently being upgraded to 2012, and as part of this they are setting... (0 Replies)
Discussion started by: AndyG
0 Replies

2. Fedora

Looking for RPM packages

Hi all, Trying to get the following packages for an ARM 71 device running an image of Fedora 18. I need these system livraries for compilation. gtk2-devel-2.22.0-2.fc14.i686.rpm proj-devel-4.7.0-3.fc14.i686.rpm proj-4.7.0-3.fc14.i686.rpm Anyone know where I could find them? Thanks in... (3 Replies)
Discussion started by: fedora18
3 Replies

3. Programming

RPM packages

Hi all, I have also posted in the UNIX for Dummies forum. Wasn't sure which would be best. Trying to get the following packages for an ARM 71 device running an image of Fedora 18. I need these system livraries for compilation. gtk2-devel-2.22.0-2.fc14.i686.rpm... (0 Replies)
Discussion started by: fedora18
0 Replies

4. Red Hat

Unable to add packages through rpm

I was trying to install some packages. We already installed all the dependent packages. But i was unable to install any of the packages..... What might be the reason ?? Please tell me !!! (1 Reply)
Discussion started by: vamshigvk475
1 Replies

5. AIX

Rpm issue with autoconf-2.63-1.AIX6.1.noarch.rpm

dears i am trying to install the autoconf-2.63-1.aix6.1.noarch.rpm but its shows the below error message . P700_dev/svn/dependencies>rpm -i autoconf-2.63-1.aix6.1.noarch.rpm error: failed dependencies: m4 is needed by autoconf-2.63-1 P700_dev/svn/dependencies> (6 Replies)
Discussion started by: thecobra151
6 Replies

6. Cybersecurity

[PGP/GnuPG] Importing and signing keys

Hi, I need to export an existing PGP key and import it into GnuPG on a different machine. This is how I did the export: pgp -kx myuser _myuser_public pgp -kx myuser _myuser_private secring.skr (this is from the pgp installation directory that contains secring.skr). This produced two... (0 Replies)
Discussion started by: imchi
0 Replies

7. Red Hat

Installing rpm packages

Hi guys, I am trying to install some packages for my oracle 11g r2 installation, the below error shows up when I try below: warning: glibc-devel-2.5-24.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186 error: Failed dependencies: glibc-headers is needed by... (8 Replies)
Discussion started by: messi777
8 Replies

8. Shell Programming and Scripting

awk to check for rpm packages

I have a list of rpm packages... and want to check if the version is equal to or greater than the package in the package list. This is what I have so far... but I would like to add more intelligence to it. while read line do COUNT=`rpm -qa --qf "%{n}-%{v}-%{r} (%{arch})\n" | grep -c "$line"` ... (0 Replies)
Discussion started by: linux4life
0 Replies

9. Shell Programming and Scripting

How to make RPM not write to RPM database if RPM fails to deploy?

How to make RPM not write to RPM database if RPM fails to deploy? IE I create an rpm spec file that contains the following if then exit 1 fi My rpm will fail at deployment, but if I do rpm -qa , I can see the rpm in the rpm db (3 Replies)
Discussion started by: 3junior
3 Replies

10. Linux

where to edit yum or rpm packages to update

I am setting up a new server with the goal of porting a solaris server to centos. I want to compile some packages myself (ie) http, ssl, mysql, etc. The reason for this is the downloadable rpm packages are very old. I probably want to make sure the kernel is up to date, but the individual pages... (2 Replies)
Discussion started by: csross
2 Replies
Login or Register to Ask a Question