[MacPorts] #18131: paranoid umask breaks the installed symlinks
MacPorts
noreply at macports.org
Wed Jan 21 01:59:23 PST 2009
#18131: paranoid umask breaks the installed symlinks
-------------------------------------+--------------------------------------
Reporter: akim.demaille@… | Owner: macports-tickets@…
Type: defect | Status: new
Priority: Normal | Milestone: Port Bugs
Component: ports | Version: 1.7.0
Keywords: | Port:
-------------------------------------+--------------------------------------
Hi all,
It is the second time (second machine) that my texlive_base
installation fails: I can't run pdflatex, but I can run pdflatex
--version!!!
Since it was the second time, I decided to track down the issue.
It turns out that when launched to actually compile something, pdftex
runs readlink(2), probably to decide what its behavior should be
depending on its name. This is most probably *after* options such as
--version are processed.
Here, our sysadm has installed paranoid rights: our umask is 066, and
as a result the symbolic links created are not readable. This is not
nice as it results in {{{ls -l /opt/local/bin}}} complaining that it
can read the links. But it is not a real problem usually.
Here, since pdflatex (a symlink to pdftex) wants to readlink, it
fails.
It is easy to reproduce harmlessly:
{{{
cd /tmp
sudo su
umask 066
ln -s /opt/local/bin/pdftex pdflatex
exit
ls -l pdflatex
./pdflatex --version
./pdflatex
}}}
It turns out that I found no way to chmod the symlink itself, so I had
to recreate them all. Using zsh that's easy:
{{{
sudo su
umask 022
cd /opt/local/bin
for i in *(@)
do
ln -sf $(readlink $i) $i
done
}}}
I suggest that texlive_base make sure the umask is correct.
As a matter of fact, I think port(1) should do it, instead of pushing
this down to all the ports.
Cheers.
--
Ticket URL: <http://trac.macports.org/ticket/18131>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list