Compile an SRPM

Download SRPM into a directory of choice. Generally files out to go into:

/usr/src/redhat/SRPMS

Then run:

rpm --rebuild <file>-<version>.src.rpm

This will then build the new RPM. Everything will then happen automatically, and the newly built RPMs will go here:

/usr/src/redhat/RPM/<cpu-type>

If the configuration file needs to be changed then run:

rpm -i <file>-<version>.src.rpm

The spec file will be extracted to:

/usr/src/redhat/SPEC

Generally it would be called:

<file>-<version>.spec

Changes can now be made to the spec file. Once the changes are complete the RPM needs to be made using it:

rpm -bb --clean --rmsource <file>-<version>.spec

If the build goes ok, the file will end up in the normal location:

/usr/src/redhat/RPM/<cpu-type>

Building a Kernel RPM (build UP and SMP Kernels)

rpmbuild --target i386 --with up --with smp --without BOOT --without debug <spec file>

Posted

in

by

Tags: