Customize RPMs with rpmrebuild

By: Joe ‘Zonker’ Brockmeier

Building packages is usually hard work, and best left to distro developers who have the time and patience to work the appropriate magic. However, if you’re an admin or user with a need to rebuild existing packages, rpmrebuild takes the pain out of creating new RPMs from installed packages.

What’s rpmrebuild useful for? A couple of scenarios come to mind. The first is when an RPM isn’t available from the original source for some reason — for example, if you built a custom RPM, or if you got an RPM from a third party and it’s no longer available online and you want to be able to use it on other systems.

It’s also useful if you want to distribute customized packages. For instance, if you wanted to distribute the OpenSSH daemon with customized configuration files, you could repackage the openssh-server package with rpmrebuild and use it instead of the stock package.

Getting started

The rpmrebuild utility should work on any recent RPM-based distro that has rpmbuild installed. If you don’t have rpmbuild, you’ll need to get it. I tested rpmrebuild on CentOS 5, so I used yum to grab the rpm-build package:

yum install rpm-build

After that, I grabbed the rpmrebuild RPM from the SourceForge.net download page and installed it with rpm -ivh rpmrebuild-2.1.0-1rpm4.noarch.rpm. Of course, the version number of the RPM may change over time.

Read more at Linux.com

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s