By thomas, Thu, 04/02/2009 - 23:56

RPMs are the key to a Red Hat based system. They make administration of packages simple elegant and very easy to maintain. Building RPMs is not a difficult task. If you maintain your software with packages rather than installing from source, your updates will be painless and you will be able to roll back to previous versions without pain also.

Ok, so you know you want to use rpms, how do you start?

The easiest way I think is to build an actual package. The example I usually do is tar, it's one of the easiest things to build.

Some notes before you proceed though, always create your RPMs as yourself or as a build user, never use root. Why, because when running as root you can place files into their final locations on the filesystem without knowing it (eg /usr/bin), this is strictly bad practice. The only things that should be placing files into folders like /usr/bin, /usr/sbin are packages, not package builds.

There are some other caveats to building packages, for now lets get started building a package. The first step is to download the source for the package we wish to build and start making a spec file for our package