Friday, November 1, 2013

RPM Signing & Package Updating

I'm recording this info to the blog simply to help me to remember how to do this...again.

Tasks:

  • Generate a GPG key
  • Export a public key
  • Import a public key
  • Sign a package
  • Update the Bedrock repo

Generate a GPG key

$ cd
$ gpg --gen-key

...go through some Q&A...you should already have generated a key for Bedrock

$ gpg --list-keys
/home/rlauer/.gnupg/pubring.gpg
-------------------------------
pub   2048R/15A3460B 2013-11-16
uid                  OpenBedrock <webmaster@openbedrock.net>
sub   2048R/D58CB0A3 2013-11-16

...remember your passphrase?

Export a public key

$ gpg --export -a 'OpenBedrock' > RPM-GPG-KEY-openbedrock.org
$ sudo cp RPM-GPG-KEY-openbedrock.org \
/var/www/vhosts/bedrock-repos/html/RPM-GPG-KEY-openbedrock.org

Import a public key

$ sudo rpm --import RPM-GPG-KEY-openbedrock.org

Sign a package

$ cd
$ rpm --resign ~/rpm/RPMS/noarch/bedrock-2.3.4-3.noarch.rpm

Update a the Bedrock Repo

$ sudo cp ~/rpm/RPMS/noarch/bedrock-2.3.4-3.noarch.rpm \
/var/www/vhosts/bedrock-repos/html/pub/bedrock/noarch
$ sudo createrepo /var/www/vhosts/bedrock-repos/html/pub/bedrock



No comments:

Post a Comment

Note: Only a member of this blog may post a comment.