In the new scheme of things, you need to yum install the rpm and rpm-build packages, but now also:
yum install rpm-signHopefully they will do something about the error messages, meanwhile folks just keep falling into open manholes.
rpmbuild -ba --sign yada.spec rpmbuild --rebuild --sign yada.specThis has become broken as of Fedora 15 and I have been signing the packages I build by hand. Part of the rub was that the rpm-build package was partitioned into two packages (rpm-build and rpm-sign) and I needed to install the rpm-sign package, but there seems to be further trouble.
You can sign the package after building it in the good old fashioned way:
rpm --addsign yada.rpmBe sure to be ready with your GPG passphrase, whatever way you do it.
It is also possible to replace your signature on a package (which would be required if you changed your public key) via:
rpm --resign yada.rpmYou can also add more than one signature to a package using the --resign switch, though this seems to be rarely if ever done.
You can check if a package is signed (and that everything is as it should be) using the --checksig switch (or equivalently the -K switch) like so:
rpm --checksig yada.rpm
An rpm that is not signed will look like this:
yada.rpm: sha1 md5 OK
An rpm that is signed will look like this:
yada.rpm: (sha1) dsa sha1 md5 gpg OK
You can load someones public key into your RPM database via:
su rpm --import RPM-GPG-KEY-billy
To look at all the keys in the RPM database, do this:
rpm -q gpg-pubkey --qf '%{name}-%{version}-%{release} --> %{summary}\n'This will yield output like:
rpm -q gpg-pubkey --qf '%{name}-%{version}-%{release} -- %{summary}\n' gpg-pubkey-d22e77f2-49ee1409 -- gpg(Fedora (11)) gpg-pubkey-ea46a458-42b36bab -- gpg(T. E. Pickering ) gpg-pubkey-74e5f972-4a79f709 -- gpg(Tom Trebisky ) gpg-pubkey-8fcff4da-49c51006 -- gpg(RPM Fusion free repository for Fedora (11) ) gpg-pubkey-8dc43844-49c510d6 -- gpg(RPM Fusion nonfree repository for Fedora (11) )
To erase one of the keys located via the above, do this:
rpm -e gpg-pubkey-74e5f972-4a79f709
To install a package that is signed if you don't have the key, use:
yum install --nogpgcheck packageThis is just what you need to do, if for example you have a package set up which contains the keys for all other packages.
Alternately, you could specify that signatures not be checked for an entire repository by modifying the file in /etc/yum.repos.d and setting gpgcheck=0.
Adventures in Computing / tom@mmto.org