Daniel Berger
2/2/2008 6:01:00 PM
John Joyce wrote:
>
> On Feb 2, 2008, at 9:51 AM, fw wrote:
>
>> On Sun, 2008-02-03 at 00:37 +0900, John Joyce wrote:
>>
>> [..snip..]
>>
>>> Sure!
>>> Many installers run as root, so often building with make would
>>> require sudo,
>>> same can be for rake.
>>> Anytime something needs to write to a directory not owned by the user.
>>>
>>
>> Building as root != installing as root. The build process _should_
>> always be able to run as any user, though installation may have to run
>> with elevated privileges depending on permissions on the target file
>> system.
>>
>> Felix
>>
>>
> Well, sometimes installers do build something!
> But as far as running as root it definitely depends on where the build
> takes place and what it needs to do.
> It most definitely cannot run as any user on every system.
> If it needs to write to a directory without write access for the uid
> then you need to run as another user with more privileges.
> Normally, you would expect a good make/rake build process to do
> everything in a directory already owned under current uid, but that's
> just not always the case.
> On OS X for example, you normally do need to run sudo for building
> things with make or rake. If not, then your system has been changed in a
> lot of ways.
John, I think you misunderstand. I'm only talking about the build
process, not installation, i.e. the difference between "make" and "make
install".
Typically, I create two separate Rake tasks, build and install. It would
only be the build task where I would temporarily drop root, then restore
it before it reaches the install task.
Regards,
Dan