Re: Running tlmgr/tlshell with sudo
Karl Berry <[email protected]>
| Newsgroups | gmane.comp.tex.live |
|---|---|
| Message-ID | <[email protected]> |
Bruno, I'm somewhat baffled. If you run any command as sudo, anything
that's created will have root ownership. Using -H or not is immaterial.
I don't believe our scripts ever try to chown anything, and I don't
think they should.
You-all have said that it's standard practice to use sudo to install
things on the Mac. So I do not know how you ever end up with a TL tree
that is not entirely owned by root -- does the MacTeX installer chown
everything after? Or maybe it is owned by root, and that's ok? But your
msg implies otherwise.
--
Norbert did insert code into fmtutil and updmap to try to avoid the need
for -H, but this is a different question from the ownership of what is
created. Here are his comments (it's the same for fmtutil):
# $HOME and sudo and updmap-sys horror
# some instances of sudo do not reset $HOME to the home of root
# as an effect of "sudo updmap" creates root owned files in the home
# of a normal user, and "sudo updmap-sys" uses map files and updmap.cfg
# files from the directory of a normal user, but creating files
# in TEXMFSYSCONFIG. This is *all* wrong.
# we check: if we are running as UID 0 (root) on Unix and the
# ENV{HOME} is NOT the same as the one of root, then give a warning
# and reset it to the real home dir of root.
sub reset_root_home { ... }
As far as I can tell, no other scripts (not tlmgr, not install-tl, not
tlshell, not anything) have this kludge. Maybe I'm wrong.
So, overall, I'm not sure what to do about this. --thanks, karl.