Tuesday, March 9, 2010

Building RPMs Part 4

Building with Koji

We use Koji to build a package on different architectures such as i386, x86_64, ppc32, and ppc64. This will allow us to check if the rpm package we created will work on different machines with different architectures. When building for the 'Fedora Project' they will provide you with a certificate so you could use their servers. Using Koji can also be a good way to monitor errors and to get stats of how long it takes to build.

I'm not going to lie, I haven't done much with Koji. I've only used it as a client and haven't created my own Koji farm yet. But I'll explain how to get a certificate from Fedora and how to submit your package for building.

First thing is to create an account with the Fedora Project. click here to start creating your account. Once your account is done click here to create your certificate.

Now save it to your build user's home directory. Let's install Koji as root before we do anything else.

yum install fedora-packager


Now run this as your build user.
fedora-packager-setup
Now when I downloaded the certificate it got a file called dogencert which I changed to .fedora.cert
mv dogencert ~/.fedora.cert
Now we can start to build.
koji build dist-f12 --scratch 'rpmbuild/SRPMS/packagename.src.rpm'
And now we just play the waiting game to see if all is well.

If I missed anything please comment below and I will gladly add it to my 4 piece HowTo.

No comments:

Post a Comment