failure of "port selfupdate"
Ryan Schmidt
ryandesign at macports.org
Mon Dec 20 12:47:53 PST 2010
On Dec 20, 2010, at 12:28, William H. Magill wrote:
> On Dec 19, 2010, at 11:42 PM, Ryan Schmidt wrote:
>> On Dec 19, 2010, at 20:01, William H. Magill wrote:
>>> ls: ./man: Permission denied
>>> 4 lrwx------ 1 root admin 9 Feb 12 2010 ./man
>>
>> That seems to show that ./man is an actual directory, not a symlink as it should be, and that it has permissions 700 instead of 755. Fix the permissions of this directory with:
>>
>> sudo chmod 755 ./man
>>
>> If the files and directories inside it also have incorrect permissions, more involved permissions fixing may be necessary.
>
> I've seen this "problem" before, and I've never gotten a satisfactory explanation for it.
> /opt/local/man IS a symbolic link, not a directory, yet the link has different permissions than the underlying directory.
> (note, no acl involved.)
>
> As root:
>
> sudo ls -alse /opt/local
> total 4
> 0 drwxr-xr-x 13 root admin 442 Feb 12 2010 .
> 0 drwxr-xr-x 3 root admin 102 Aug 27 2009 ..
> 0 drwxr-xr-x 27 root admin 918 Feb 12 2010 bin
> 0 drwxr-xr-x 3 root admin 102 Aug 27 2009 etc
> 0 drwxr-xr-x 5 root admin 170 Sep 19 2009 include
> 0 drwxr-xr-x 35 root admin 1190 Feb 12 2010 lib
> 0 drwxr-xr-x 3 root admin 102 Aug 27 2009 libexec
> 4 lrwx------ 1 root admin 9 Feb 12 2010 man -> share/man
> 0 drwxr-xr-x 3 root admin 102 Aug 27 2009 sbin
> 0 drwxr-xr-x 9 root admin 306 Feb 12 2010 share
> 0 drwxr-xr-x 2 root admin 68 Feb 12 2010 src
> 0 drwxr-xr-x 3 root admin 102 Aug 27 2009 var
> 0 drwxr-xr-x 2 root admin 68 Feb 12 2010 www
>
> sudo ls -als /opt/local/share
> total 0
> 0 drwxr-xr-x 9 root admin 306 Feb 12 2010 .
> 0 drwxr-xr-x 13 root admin 442 Feb 12 2010 ..
> 0 drwxr-xr-x 3 root admin 102 Aug 27 2009 info
> 0 drwxr-xr-x 5 root admin 170 Feb 12 2010 macports
> 0 drwxr-xr-x 24 root admin 816 Aug 27 2009 man
> 0 drwxr-xr-x 85 root admin 2890 Aug 27 2009 nls
> 0 drwxr-xr-x 2 root admin 68 Feb 12 2010 skel
> 0 drwxr-xr-x 6 root admin 204 Sep 19 2009 tabset
> 0 drwxr-xr-x 44 root admin 1496 Sep 19 2009 terminfo
>
> as myself:
>
> ls -als /opt/local
> total 4
> 0 drwxr-xr-x 13 root admin 442 Feb 12 2010 .
> 0 drwxr-xr-x 3 root admin 102 Aug 27 2009 ..
> 0 drwxr-xr-x 27 root admin 918 Feb 12 2010 bin
> 0 drwxr-xr-x 3 root admin 102 Aug 27 2009 etc
> 0 drwxr-xr-x 5 root admin 170 Sep 19 2009 include
> 0 drwxr-xr-x 35 root admin 1190 Feb 12 2010 lib
> 0 drwxr-xr-x 3 root admin 102 Aug 27 2009 libexec
>
> ls: /opt/local/man: Permission denied
> 4 lrwx------ 1 root admin 9 Feb 12 2010 man
> 0 drwxr-xr-x 3 root admin 102 Aug 27 2009 sbin
> 0 drwxr-xr-x 9 root admin 306 Feb 12 2010 share
> 0 drwxr-xr-x 2 root admin 68 Feb 12 2010 src
> 0 drwxr-xr-x 3 root admin 102 Aug 27 2009 var
> 0 drwxr-xr-x 2 root admin 68 Feb 12 2010 www
>
> ls -als /opt/local/share
> total 0
> 0 drwxr-xr-x 9 root admin 306 Feb 12 2010 .
> 0 drwxr-xr-x 13 root admin 442 Feb 12 2010 ..
> 0 drwxr-xr-x 3 root admin 102 Aug 27 2009 info
> 0 drwxr-xr-x 5 root admin 170 Feb 12 2010 macports
> 0 drwxr-xr-x 24 root admin 816 Aug 27 2009 man
> 0 drwxr-xr-x 85 root admin 2890 Aug 27 2009 nls
> 0 drwxr-xr-x 2 root admin 68 Feb 12 2010 skel
> 0 drwxr-xr-x 6 root admin 204 Sep 19 2009 tabset
> 0 drwxr-xr-x 44 root admin 1496 Sep 19 2009 terminfo
Curious. Well, you should be able to set the permissions of this man symlink right by running:
sudo chmod -h 755 /opt/local/man
> I would assume that the link was created by either macports or possibly darwinports, ages ago.
Mhm, I think it's still part of the install process today. It's normal for it to be there, though it should have 755 permissions, not 700 like on your system.
>> Ports should install manpages in /opt/local/share/man, not /opt/local/man; if you have any port that has a location in /opt/local/min registered to it, we need to fix that port, so please tell us what port it is.
>
> Man pages are apparently all installed in /opt/local/share/man (or at least that is were the files wind up by virtue of that link.
Still, ports must install files to /opt/local/share/man; attempting to install files to /opt/local/man is an error which must be corrected in any port where this problem is found. Such ports should be easy enough to spot, since they will print a warning during the destroot phase that they are violating the mtree.
> There seems to be a mix of them... "most" are fine, but many are of the same nature as the /opt/local/man link.
>
> Again, from my account... just the top of the list.
>
> ls -alse /opt/local/man/man3
> total 2784
> 0 drwxr-xr-x 691 root admin 23494 Sep 19 2009 .
> 0 drwxr-xr-x 24 root admin 816 Aug 27 2009 ..
> 0 -rw-r--r-- 1 root admin 0 Aug 27 2009 .turd_MacPorts
>
> ls: /opt/local/man/man3/COLOR_PAIR.3x.gz: Permission denied
> 4 lrwx------ 1 root admin 16 Sep 19 2009 COLOR_PAIR.3x.gz
>
> ls: /opt/local/man/man3/PAIR_NUMBER.3x.gz: Permission denied
> 4 lrwx------ 1 root admin 15 Sep 19 2009 PAIR_NUMBER.3x.gz
>
> ls: /opt/local/man/man3/_nc_free_and_exit.3x.gz: Permission denied
> 4 lrwx------ 1 root admin 19 Sep 19 2009 _nc_free_and_exit.3x.gz
>
> ...
> just picking the first two...
> 4 -rw-r--r-- 1 root admin 3810 Sep 19 2009 curs_attr.3x.gz
> 4 -rw-r--r-- 1 root admin 1478 Sep 19 2009 curs_beep.3x.gz
> 4 -rw-r--r-- 1 root admin 1852 Sep 19 2009 curs_bkgd.3x.gz
> 4 -rw-r--r-- 1 root admin 1838 Sep 19 2009 curs_bkgrnd.3x.gz
> 4 -rw-r--r-- 1 root admin 2088 Sep 19 2009 curs_border.3x.gz
> 4 -rw-r--r-- 1 root admin 1980 Sep 19 2009 curs_border_set.3x.gz
> 4 -rw-r--r-- 1 root admin 2114 Sep 19 2009 curs_clear.3x.gz
> 4 -rw-r--r-- 1 root admin 4033 Sep 19 2009 curs_color.3x.gz
>
>
> but from root
>
> sudo ls -alse /opt/local/man/man3
> total 2784
> 0 drwxr-xr-x 691 root admin 23494 Sep 19 2009 .
> 0 drwxr-xr-x 24 root admin 816 Aug 27 2009 ..
> 0 -rw-r--r-- 1 root admin 0 Aug 27 2009 .turd_MacPorts
> 4 lrwx------ 1 root admin 16 Sep 19 2009 COLOR_PAIR.3x.gz -> curs_color.3x.gz
> 4 lrwx------ 1 root admin 15 Sep 19 2009 PAIR_NUMBER.3x.gz -> curs_attr.3x.gz
> 4 lrwx------ 1 root admin 19 Sep 19 2009 _nc_free_and_exit.3x.gz -> curs_memleaks.3x.gz
> 4 lrwx------ 1 root admin 19 Sep 19 2009 _nc_freeall.3x.gz -> curs_memleaks.3x.gz
>
> ....
>
> 4 -rw-r--r-- 1 root admin 3810 Sep 19 2009 curs_attr.3x.gz
> 4 -rw-r--r-- 1 root admin 1478 Sep 19 2009 curs_beep.3x.gz
> 4 -rw-r--r-- 1 root admin 1852 Sep 19 2009 curs_bkgd.3x.gz
> 4 -rw-r--r-- 1 root admin 1838 Sep 19 2009 curs_bkgrnd.3x.gz
> 4 -rw-r--r-- 1 root admin 2088 Sep 19 2009 curs_border.3x.gz
> 4 -rw-r--r-- 1 root admin 1980 Sep 19 2009 curs_border_set.3x.gz
> 4 -rw-r--r-- 1 root admin 2114 Sep 19 2009 curs_clear.3x.gz
> 4 -rw-r--r-- 1 root admin 4033 Sep 19 2009 curs_color.3x.gz
Ok, all those seem to be part of the ncursesw port. On my system, they have the correct permissions. You could try deactivating and then reactivating ncursesw:
sudo port -f deactivate ncursesw
sudo port activate ncursesw
If that doesn't help, you could try rebuilding the port:
sudo port -n upgrade --force ncursesw
> checking build system type... i386-apple-darwin10.5.0
> checking host system type... i386-apple-darwin10.5.0
> checking target system type... i386-apple-darwin10.5.0
> checking MacPorts version... 1.9.2
> checking for sw_vers... /usr/bin/sw_vers
> checking for defaults... /usr/bin/defaults
> checking for xcode-select... no
> checking Mac OS X version... 10.6.5
> checking Xcode version... 3.2.5
> checking for gcc... no
> checking for cc... no
> checking for cl.exe... no
> configure: error: in `/opt/local/var/macports/sources/rsync.macports.org/release/base':
> configure: error: no acceptable C compiler found in $PATH
> See `config.log' for more details
Seeing the config.log might be interesting, but it will probably just confirm that you don't seem to have an acceptable C compiler, though it seemed to identify that you do have Xcode 3.2.5. Did you install Xcode in a nonstandard location? If so, tell MacPorts of it by editing the developer_dir setting in macports.conf. Or did you omit the UNIX development tools when installing Xcode? If so, install Xcode again, including those components; they're required for MacPorts.
More information about the macports-users
mailing list