GPG Sign RPMs
As I build a ‘fair’ amount of RPM’s which are available to other people; I was thinking: how do one actually sign RPM’s with a GPG key.
Well here is what I did to get it working:
# gpg –gen-key
…..
Real name: <your name>
Email adresss: <your email>
Comment: rpm build
……
Remember the passphrase, as you will need to use it with you sign an rpm.
As I build rpm’s on multible PC’s I import this key to all the PC’s / Users on these PC’s
First export the key:
# gpg –export-secret-key KEY; gpg –export KEY) > my-key-for-rpms.asc
KEY can be found with: gpg –list-keys
This key can be imported with gpg –import <keyfile>
Now you have to modify your $HOME/.rpmmacros, add:
%_gpg_name <information>
%_signature gpg
When you do a gpg –list-keys you will see:
pub xxxxx/yyyyyyyyyy <date> <information>
It’s the <information> you have to add to your .rpmmacros.
Now you should be able to sign rpms with either rpm or rpmbuild:
# rpm –addsign <rpm-file>
# rpmbuild –sign -ba <spec.file>
You can see the signature with:
# rpm –checksig <rpm-file>
It should show something like: <rpm-file> (sha1) dsa sha1 md5 gpg OK
Now you’re done….. Have fun.
recent books
- Gary Gibson
- Nova War
- Adrian Tchaikovsky
- Heirs of the Blade
- Brian Herbert,Kevin J. Anderson
- Sisterhood of Dune
- Michael Cobley
- The Ascendant Stars
- Michael Cobley
- The Orphaned Worlds
- Markus Heitz
- The Revenge Of The Dwarves
- Christopher Paolini
- Inheritance
- Tom Holt
- The Better Mousetrap
- Frederick Forsyth
- The Afghan
- Terry Pratchett
- Snuff
charities
recent comments
- Balkan 2011 – Part 6 | Casper's Life on Balkan 2011 – Part 1
- Balkan 2011 – Part 5 | Casper's Life on Balkan 2011 – Part 1
- Balkan 2011 – Part 4 | Casper's Life on Balkan 2011 – Part 1
- Balkan 2011 – Part 2 | Casper's Life on Balkan 2011 – Part 3
- Balkan 2011 – Part 2 | Casper's Life on Balkan 2011 – Part 1
categories
- apple (61)
- books (5)
- chat (1)
- computers (32)
- driving (11)
- gps (7)
- graphics (1)
- hardware (18)
- howto (7)
- idm (6)
- internet (5)
- iphone (8)
- kvm (1)
- life in it's simplest form… (29)
- linux (11)
- motorbikes (20)
- music (3)
- networking (1)
- opinion (11)
- os (5)
- osx (26)
- photography (13)
- politics (8)
- programming (3)
- rant (18)
- rhel6 (1)
- science fiction (1)
- software (44)
- technology (7)
- trash (2)
- travel (20)
- tv (3)
- uncategorized (3)
- video (1)
- vmware (1)
- widget (1)
- wireless (1)
- wordpress (1)
- xen (1)







