More Information

These instructions are based on the JPackage Rebuilding Instructions.

Initial Setup

Before you can run rpmbuild, you need to setup a directory tree and a .rpmmacros file.

Full directions here

Installing the Source RPM

Make sure to complete the "Initial Setup" section first as the install step uses the .rpmmacros file and rpm tree you created.

Download the source rpm to /tmp.

Install the rpm, you do '''not''' want or need to be root for this command.

rpm -U /tmp/xxx-yyy.src.rpm

NOTE - It is common to see a series of warnings about users and groups that don't exist. These may be safely ignored:

warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root

The installation should have deposited a spec file in ${HOME}/rpm/SPECS and a bunch of source files in ${HOME}/rpm/SOURCES.

Install build dependencies

cd ${HOME}/rpm/SPECS
yum-builddep packagename.spec

Building the Package

Change directories to the rpm/SPECS subdirectory.

cd ${HOME}/rpm/SPECS

Kick off the build:

rpmbuild -bb packagename.spec

Some packages take quite a while to build.

Harvesting the Binary RPM

When the build completes, the binary rpms are deposited in rpm/RPMS.

ls -lart ${HOME}/rpm/RPMS

Enjoy!

Please let me know if there are issues/problems/confusion with these directions.