-j2 default and sudo usage

Anil Madhavapeddy anil at recoil.org
Fri Jul 31 07:57:13 PDT 2009

On Thu, Jul 30, 2009 at 10:36:16PM -0700, Toby Peterson wrote:
> On Jul 30, 2009, at 7:39 AM, Anil Madhavapeddy wrote:
>> Also, how do folks typically do non-root builds to ensure stuff isn't 
>> sneaking out of the fakeroot? I've chowned a bunch of directories to my 
>> user, and manually invoking fakeroot works; it would be nice if sudo were 
>> automatically called when required (e.g. for install).  Is there a knob 
>> for this, or do you generally just invoke targets manually and add sudo 
>> when required?
> We do attempt to drop privileges when possible, but ports may still end up 
> writing to incorrect places during certain phases. If I'm feeling 
> particularly paranoid, I do the following:
> port -d destroot
> <look for anything bogus>
> sudo port -d install

I'm having an utterly bizarre issue while porting ocsigen.  If I run the
whole port build under sudo, it does something which results in:

shock avsm$ sudo ls
Illegal instruction
shock avsm$ md5 /usr/bin/sudo
md5: /usr/bin/sudo: Permission denied
shock avsm$ ls -la /usr/bin/sudo
-r-s--x--x  1 root  wheel  211232 24 Sep  2007 /usr/bin/sudo
shock avsm$ ls -la /dev/null
ls: /dev/null: No such file or directory

A reboot corrects the issue, and it happens every time.  If I run
the port destroot target without sudo, then it works fine and doesn't
appear to have any denied commands; so I was looking for a way to
explictly raise privileges and examine the command before it was
run as root.

Does this sort of problem ring any bells with anyone?

Anil Madhavapeddy                                 http://anil.recoil.org

More information about the macports-dev mailing list