[rhn-users] Recompiling packages

Jay Turner jkt at redhat.com
Thu Apr 8 18:17:59 UTC 2004


On Thu, Apr 08, 2004 at 04:35:37PM +0200, Henrik Johansson wrote:
> 
> Hi,
> 
> I need to recompile the rhdb (postgres) database.
> I only need to add 1 or 2 flags to configure and
> keep the rest as the standard installation.
> 
> I have installed the src rpm.
> 
> I don't know how to go about it from here.
> I want to make sure that all is in compliance
> with standard RH methodology (if there is such).
> 
> Do I just un tar the source and hit compile with my 
> added flags?
> If that is so then how do I produce a bin rpm for install.
> 
> I'm really new with rpm but familiar with compiling from
> source.

You can untar the source tarball, make the changes you need, recreate the
tarball again then run the following:

cd /usr/src/redhat/SPECS
rpmbuild --ba rhdb.spec (I might have the name of the spec file incorrect
 			 here, but just substitute whatever the correct
			 spec file name is)

That will kick off a recompile which will create both binary and source
packages for you.  They will land in /usr/src/redhat/RPMS and
/usr/src/redhat/SRPMS respectively.

One note, you might want to edit the spec file before recompiling and
adding/changing the release field in order to having the resulting packages
be different in name from the current packages.

- jkt

-- 
--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*
Jay Turner, QA Technical Lead      jkt at redhat.com             Red Hat, Inc. 

        Reality is merely an illusion, albeit a very persistent one.
                                                   - Albert Einstein





More information about the rhn-users mailing list