Ainsi parlait Brian J. Murrell :
> On Wed, Oct 17, 2001 at 09:28:22PM +0200, Han wrote:
> > Digital Wokan ([EMAIL PROTECTED]) wrote:
> > > Guillaume Rousse wrote:
> > >> So, is there a standard procedure for self-made/autoconf-generated
> > >> makefiles to only perfoms those commands if installed as root ? I
> > >> looked at some available software, but i didn't find a clue.
> > >
> > > Check if UID=0 perhaps?
> >
> > That is the evil way. The devine way is id -u ;)
>
> Uhm, no, the devine way is to NEVER, EVER, EVER build RPMs as root.
> There is never a reason for it.  People used to tell me that the
> kernel RPM was an exception.  Horse-pucky.  I had a kernel RPM[1]
> that did not require root to build it.
>
> The general rule is that if you need to do something as root in an
> RPM, move it to the scriptlets.
My initial point was not how to do this in RPM case, but how, as a software 
creator, can i create a stand-alone makefile allowing a tarball user to 
install everything properly, without forcing a packager to patch it for 
building as non-root ?
Manually checking for uid is a solution, but as it seems like a common 
problem, i was wondering if there was some kind of conditional execution 
already existing in autoconf.
-- 
Guillaume Rousse <[EMAIL PROTECTED]>
GPG key http://lis.snv.jussieu.fr/~rousse/gpgkey.html

Reply via email to