[tlu] PATH not propagated to *-sys scripts (Yosemite)
Adam R. Maxwell
amaxwell at mac.com
Fri Jul 11 00:14:42 CEST 2014
> On Jul 10, 2014, at 9:37, Jeffrey Goldberg <jeffrey at goldmark.org> wrote:
>
> I am not certain whether this is an issue in tlu (Version 1.17 (1.17)) or in MacTeX installation on OS X 10.10 (developer preview),
>
> I will present log files and samples below that illustrate my description here.
>
> Summary: /usr/texbin appears to be in my path and remains in the PATH when I use sudo. When I run fmutil-sys and updmap-sys from the command-line they work without error. But when they are called via tlu, they fail as if /usr/texbin is not in the path.
>
> According to tlu logs, tlu is correctly picking up /usr/texbin in PATH.
It uses a fixed PATH based on the system config file /etc/paths and whatever you specify in TLU prefs. Your shell PATH is ignored completely.
>
> 2014-07-10 00:52:10 +0000 Notice +[TLMEnvironment updatePathEnvironment][62979] Using PATH = "(
> "/usr/local/bin",
> "/usr/bin",
> "/bin",
> "/usr/sbin",
> "/sbin",
> "/usr/texbin"
Looks normal
> 2014-07-10 00:54:22 +0000 Warning tlu_ipctask[63295] running fmtutil-sys --no-error-if-no-engine=luajittex --byfmt latex ...
> 2014-07-10 00:54:22 +0000 Warning tlu_ipctask[63295]
> 2014-07-10 00:54:22 +0000 Warning tlu_ipctask[63295] fmtutil-sys --no-error-if-no-engine=luajittex --byfmt latex failed (status 127), output:
> 2014-07-10 00:54:22 +0000 Warning tlu_ipctask[63295] /usr/texbin/fmtutil-sys: line 22: kpsewhich: command not found
> 2014-07-10 00:54:22 +0000 Warning tlu_ipctask[63295] /usr/texbin/fmtutil-sys: line 23: kpsewhich: command not found
> 2014-07-10 00:54:22 +0000 Warning tlu_ipctask[63295] /usr/texbin/fmtutil-sys: line 29: exec: fmtutil: not found
>
> which looks like the PATH used within the fmtutil-sys script does not include /usr/texbin .
The privileged helper should be picking up the PATH variable from TLU, so this isn't good…
>
> I have to confess that I don’t fully understand how PATH and other environment variables are propagated under sudo versus OS X privilege escalation.
It's propagated by default, but sudo is irrelevant to TLU.
> I also haven’t checked the tlu source to see if it is using the deprecated AuthorizationExecuteWithPrivileges approach or the 10.7 and greater XPC approach.
I use AEWP. XPC would be a tremendous effort for no gain, other than satisfying Apple's flavor-of-the-month approach to security and privileged tools. Aside from that, I still support 10.6.8 and I'm not sure how far back the necessary launchd/XPC stuff exists (much less works as advertised).
> One thing that might be useful is to log the environment after privilege escalation.
>
> Any help at sorting this out and also learning whether this is just a problem for me would be appreciated.
Haven't tried under 10.10 myself yet, so yours is the first report. Sorry for the trouble.
I can't post betas or releases on googlecode anymore, so it might be a while before I can get a test version up. If you want to log envvars, modifying the source would be easy, but modifying fmtutil to dump them might be quicker.
Adam
More information about the tlu
mailing list