Non-working non-root install

Ryan Schmidt ryandesign at macports.org
Tue Sep 22 06:59:34 PDT 2009


On Sep 21, 2009, at 23:24, Bryan Blackburn wrote:

> On Wed, Sep 02, 2009 at 10:21:53AM -0500, Ryan Schmidt said:
>
>> On Aug 31, 2009, at 11:25, Ryan Schmidt wrote:
>>
>>> I am attaching a script which reproduces the problem on my system
>>> (clean install of Snow Leopard), and the output I get. When you run
>>> it, do you see the problem on your system as well? You need to edit
>>> the user in the script. Note that it installs MacPorts in /tmp/mp
>>> and downloads the MacPorts source to /tmp/macportsbase. You can
>>> edit these at the top of the script too if you want.
>>
>> Can somebody please test what happens when they run this script on
>> their system? It will not affect your current MacPorts install. The
>> version of the script attached to this email is updated so that you
>> don't need to enter your username manually.
>
> This should be fixed in r58093 (trunk) and r58094 (1.8 branch) now;  
> I wasn't
> seeing it initially as it only appears to happen on 10.6 but was  
> running
> 10.5 at the time.
>
> The basic problem is that Tcl doesn't like to set a permission of  
> 0444 when
> also using '-creator {}' when you aren't root.  The way the code was
> initially working was that all attributes that 'file attributes'  
> returns
> were being set on the newly-installed file, as can be seen when you  
> try it:
>
> $ tclsh
> % file attributes /mach_kernel
> -group wheel -owner root -permissions 00644 -readonly 0 -creator {} - 
> type {} -hidden 1 -rsrclength 0
>
> For man pages, the permission mode is 0444, combined with not being  
> root and
> using that '-creator {}', it fails:
>
> $ touch /tmp/foo
> $ tclsh
> % file attributes /tmp/foo -permissions 0444 -creator {}
> could not set attributes of "/tmp/foo": permission denied
>
> However, 0644 is fine, or using 0444 without creator is also fine.   
> The code
> now just specifically sets the permissions, owner, and group,  
> ignoring the
> other bits.

Thanks, that works for me. I marked ticket #20887 resolved.

http://trac.macports.org/ticket/20887


Maybe you could take a look at #20896 too? Though there we're not  
talking about something that has never worked before (non-root install  
on Snow Leopard); we're talking about something that used to work in  
MacPorts 1.7.1 (non-root install on Tiger and Leopard). So I don't  
think it'll be the same solution. Rather I guess this might be fallout  
from the GSoC '08 privileges branch.

http://trac.macports.org/ticket/20896



More information about the macports-users mailing list