Actually, the FAQ item for "So with MacPorts under /opt/local I can
use /usr/local freely?" at https://trac.macports.org/wiki/FAQ
clarifies that trace mode must be used to hide /usr/local. That code
is in porttrace.tcl. Note that this isn't the default behavior for
port.

On Mon, Mar 23, 2015 at 9:00 PM, Cyrille Artho <cyrille.ar...@gmail.com> wrote:
> It's been over 15 years since I last used tcl... :-)
>
> It's an interesting programming language and probably the first widely
> used one that allows for "dictionary-style" parameters like in Python,
> so you can set parameters by name.
>
> This file (portsandbox.tcl) does not seem to use this feature, though.
>
> The top part sets the sandbox profile based on the command you
> execute. It seems most commands have an empty profile, but package
> removal and installations from source require a profile.
>
> The profile looks a bit cryptic because the arguments are passed as
> strings in nested parentheses, which appear in a tcl string, hence the
> quoting of quotes that are passed to sandbox-exec.
>
> The given profile basically allows writes only to /dev/null, a few
> other locations, and temporary files.
>
> However, I can't see anything to disallowing *reading* files, and I
> can't find anything about /usr/local here.
>
>
> On Tue, Mar 24, 2015 at 9:39 AM, Alexander Hansen
> <alexanderk.han...@gmail.com> wrote:
>> I don’t do TCL, so that’s just absolute gibberish to me.
>>
>>> On Mar 23, 2015, at 5:27 PM, Jack Howarth <howarth.at.f...@gmail.com> wrote:
>>>
>>> Alexander,
>>>        Attached is the current MacPorts portsandbox.tcl which just
>>> seems to setup a profile to send to /usr/bin/sandbox-exec.
>>>                    Jack
>>>
>>> On Mon, Mar 23, 2015 at 7:33 PM, Alexander Hansen
>>> <alexanderk.han...@gmail.com> wrote:
>>>>
>>>>
>>>>> On Mar 23, 2015, at 4:26 PM, Cyrille Artho <cyrille.ar...@gmail.com> 
>>>>> wrote:
>>>>>
>>>>> Hi all,
>>>>> Thank you for your responses. I see that autotools are very eager to
>>>>> look into /usr/local no matter what, so I have built gcc by
>>>>> temporarily renaming /usr/local this time. I will try the other
>>>>> workaround next time.
>>>>>
>>>>> Incidentally, Mac Ports seems to have found a solution:
>>>>>
>>>>> "Note that starting with 2.3.0, MacPorts can automatically hide
>>>>> /usr/local (and all other files a port does not depend on) from ports'
>>>>> build systems. This feature is called trace mode and is activated by
>>>>> providing the -t flag to port".
>>>>>
>>>>> This seems to work in almost all cases. I wonder if it is possible to
>>>>> implement this for fink? (I don't know how the "trace mode" works, but
>>>>> having this option would be helpful if it is known to work well.)
>>>>>
>>>>> On Tue, Mar 24, 2015 at 4:07 AM, Alexander Hansen
>>>>> <alexanderk.han...@gmail.com> wrote:
>>>>>>
>>>>
>>>> It’s not just autotools, but the compilers as well.
>>>>
>>>> We could likely do it in Fink if someone who is familiar with the Macports 
>>>> build system can translate how they to it to how we could do it.
>>>>
>>>> --
>>>> Alexander Hansen, Ph.D.
>>>> Fink User Liaison
>>>>
>>> <portsandbox.tcl>
>>
>
>
>
> --
> Regards,
> Cyrille Artho

Attachment: porttrace.tcl
Description: Tcl script

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Fink-users mailing list
Fink-users@lists.sourceforge.net
List archive:
http://news.gmane.org/gmane.os.macosx.fink.user
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-users

Reply via email to