Rick Moen wrote:
> Chris F.A. Johnson <cfajohnson@gmail.com> wrote:
>> On 2006-08-01, chuckcar wrote:
>
>>> Try compiling a package sometime *without* root authority
>>
>> Never compile as root.
>>
>>> - won't happen
>>
>> Of course it will; that is what you should do.
>>
>> You only need to be root to install the package.
>
> I say this with some trepidation, because it could be seen as a slam
> against our Scarlet Chapeau-wearing friends (and I do not so intend,
> nor do I engage in distro-bashing generally): There seems to be a
> very common misconception among (many) users of RPM-based
> distributions, and particularly of Red Hat [Enterprise] Linux, that
> one cannot build packages unless one is wielding root-user authority.
Agreed. But there are some security reasons: for example, the behavior of
LD_LIBRARY_PATH is different for mere mortal users than it is for root, and
it can be worth building as root to make sure you haven't incorporated any
dependencies on that variable. It can also help prevent someone slipping a
fascinating library into a local directory, to be compiled by the builder
and published as an RPM, and cause people to go nuts figuring out where it
came from.
> I'm every bit as guilty of this as most people: It's a bit of a pain
> in the neck to set up the build-dir and dotfile contents necessary to
> _avoid_ the need for root access -- and I'm actually typing this on an
> RHEL laptop where I, too, haven't bothered. (I did, then somehow lost
> the dotfile stuff, and hadn't redone it yet -- but hadn't needed to
> build RPMs recently, so I have an excuse.)
Yeah, and sometimes it breaks the compilation wihen you do it in the more
sensible, local user way.
>
> Anyhow, pro bono publico, I've just put a link up to a nice _short_
> piece on the subject in the RedHat page of my knowledgebase
> (http://linuxmafia.com/kb/RedHat/ ).