RPMAs some of you visiting this blog have noticed, currently the RPM’s I made for PHP aren’t available in any yum repository, making you have to check our blog every time for updates. Although I’m quite happy to have you visiting our blog more often, things really should be easier :-)

I’ll take you through the steps I took to setup the yum repository for labcoding.com; with my next PHP update I’ll repost the instructions on enabling this repository (as described below).

Although mock is great for creating many repositories, for now I’ll stick to a CentOS 4 and CentOS 5 repository, in which the CentOS 5 repository will eventually contain my PHP rpm’s. Unfortunately I cannot make x86_64 RPM’s at the moment, due to lack of a machine running CentOS 5 on 64 bit. However, using my source RPM’s and recompiling should give no issues.

Installing ‘createrepo’

Createrepo is a program that creates a repomd (xml-based rpm metadata) file, these files contain information on when RPM’s were last updated and which ones are actually present in the repository. This way a ‘yum’ instance only needs to refresh this file to know if there are new RPM’s available.

My repository will reside in /var/www/html/yum/centos/4

Place my RPM’s in the (CentOS 5) repository:

Running creatorepo, will create a repodata directory, containing the XML (repomd) files.

You’re basically all ready to use your repository!

However, I find it important to have SIGNED RPM’s, so people know for sure the RPM’s in my repository are actually the ones I build.

I’ll use PGP to sign the RPM’s. First we’ll start by creating our own PGP key.

Great! Now we have our key, that we can use to sign RPM.

Check if we indeed have a key:

Make an export of our public key, so users can import it for use with the Repository. The key will be used to verify that the RPM’s are signed by the repository ‘owner’ (in this case, me).

Signing the packages:

All set!

Now, to enable the Labcoding yum repository, do the following:

Make a labcoding.repo file:

Paste the following:

Testing if it works:

Thats all for now!

Ivo

Share and Enjoy:
  • Digg
  • del.icio.us
  • Furl
  • Slashdot
  • Spurl
  • StumbleUpon
  • Technorati