pg.ddx.io  pgsql-ports@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: tzacos <tzacos@free.fr>
Cc: pgsql-ports@postgresql.org
Subject: Re: compiling problem
Date: Tue, 30 Aug 2005 22:56:31 -0400
Message-ID: <26909.1125456991@sss.pgh.pa.us> (raw)
In-Reply-To: <4314EC8A.40706@free.fr>
References: <4314E4CC.1030206@free.fr>
	<25643.1125443751@sss.pgh.pa.us>
	<4314EC8A.40706@free.fr>

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



view thread (4+ messages)

Message-ID: <26909.1125456991@sss.pgh.pa.us>
Permalink:  ../26909.1125456991@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/26909.1125456991@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-ports@postgresql.org
  Cc: tgl@sss.pgh.pa.us, tzacos@free.fr
  Subject: Re: compiling problem
  In-Reply-To: <26909.1125456991@sss.pgh.pa.us>
  References: <4314E4CC.1030206@free.fr> <25643.1125443751@sss.pgh.pa.us> <4314EC8A.40706@free.fr> <26909.1125456991@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox