[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: FAQ ? Source RPMS in alternate location

On Thu, 9 Nov 2000 10:29:14 -0800 (PST), Perry Hutchison wrote:

>I am using Red Hat 6.2, and want to work on some user-level code
>(mailx, fvwm).  In order to do this, I think I want to create a
>new RPM database, and install and build SRPMs, under an alternate
>root directory (~/devel or some such).  The problem is that it's
>not immediately evident how --root and %_topdir interact.  Is there
>a cookbook somewhere which describes how to set this up without
>having to become an RPM wizard?

It sounds like you want to build RPM's as a normal user, and have
your build tree appear under your home directory. Is that correct? If
so, you just need to create ~/.rpmmacros with %_topdir set to your
private build root, and create the top level directories that RPM

I've created a special user named "rpm" just for this purpose, so
~rpm/.rpmmacros contains "%_topdir /home/rpm" and I've created the
directories /home/rpm/{BUILD, RPMS/i386, SOURCES, SPECS, SRPMS,
download/redhat}. (download/redhat contains a partial mirror of the
Red Hat FTP SRPM tree. It's where I put things when I download them
from a RH mirror.)

I also add "%buildroot %{_topdir}/var/tmp" to .rpmmacros and create
/home/rpm/var/tmp, so big packages (like the kernel) will install to
the /home partition, not the /var partition (which on my machine is
relatively small).

To build an RPM:

    # Become the packager
    su rpm
    # move to the directory where you downloaded the package
    cd ~/download/...
    # unpack the sources
    rpm -i package.src.rpm
    # build and re-package
    cd ~/SPECS
    rpm -ba package.spec
    # Test the package (dry run)
    cd ~/RPMS/i386
    rpm -U -vv --test package.i386.rpm
    # install the package
    rpm -U -vv package.i386.rpm


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []