Re: compiling problem - Mailing list pgsql-ports

From Tom Lane
Subject Re: compiling problem
Date
Msg-id 26909.1125456991@sss.pgh.pa.us
Whole thread Raw
In response to Re: compiling problem  (tzacos <tzacos@free.fr>)
List pgsql-ports
tzacos <tzacos@free.fr> writes:
> Tom Lane a �crit :
>> Don't do it as root.  There's seldom any good reason to run software
>> builds as root.

> the problem is that you can use rpm without being root

[ I suppose you meant "can't" ]  Sure you can --- use rpmbuild anyway.

Actually installing the RPM after you built it needs root, for obvious
reasons, but there's no reason to do the build process as root.  I can
assure you that no one within Red Hat ever runs rpmbuild as root.

The done thing is to create a personal ~/rpmwork directory, with
subdirectories BUILD RPMS SOURCES SPECS and SRPMS, then create a
~/.rpmmacros file containing

%_topdir /home/..you../rpmwork

Then you build an SRPM by putting it in ~/rpmwork/SRPMS and running
rpmbuild there.  This results in RPMS under ~/rpmwork/RPMS, which
you can install via "sudo rpm -i ...".  But you don't do the actual
build as root, because that violates the ancient safety principle of
doing as little as possible as root.

            regards, tom lane

pgsql-ports by date:

Previous
From: tzacos
Date:
Subject: Re: compiling problem
Next
From: Martijn de Munnik
Date:
Subject: Compile with Solaris 10 AMD 64bit Sun CC