Web Projects Outsourcing

Creating self-signed RPM packages in Fedora

Creating your own self-signed rpms is a pain in the neck for newbies, especially when you start reading online docs form fedora docs site. You have an impression that people writing that stuff were specially trained to use understandable language so that all laymen should keep away.

However, everything is quite fast and beautiful.

rpm, package, Fedora, self-signed

Install needed stuff.

Setup development tree.

Generate a key, answer a couple of very simple to most people questions, remember resulting ID.

Save and import the key

Check ~/.rpmmacros file:

[sourcecode lang=”plain”]
%_topdir %(echo "$HOME")/rpmbuild
%_builddir %_topdir/BUILD
%_rpmdir %_topdir/RPMS
%_sourcedir %_topdir/SOURCES
%_specdir %_topdir/SPECS
%_srcrpmdir %_topdir/SRPMS
%_buildrootdir %_topdir/BUILDROOT
%_query_all_fmt %%{name}-%%{version}-%%{release}.%%{arch}
%_signature gpg
%_gpg_name Generated Key Id here

Sign previously built packages.

Check previously built packages.

You now should be able to install self-signed packages with yum avoiding using –nogpgcheck key.

Example: Building conky with nvidia support (file names and architectures might differ, use with care).

Edit .spec file:

Search for just two lines, replaceĀ  “Release: 1%{?dist}” with “Release: 1%{?dist}_alec” , replace “%{!?with_mpd: –enable-nvidia} \” with “–enable-nvidia \“, save.

Build and install.


Leave a Reply

Your email address will not be published. Required fields are marked *

1 + five =