[tlu] PATH not propagated to *-sys scripts (Yosemite)

Jeffrey Goldberg jeffrey at goldmark.org
Fri Jul 11 08:45:25 CEST 2014


On Jul 10, 2014, at 4:14 PM, Adam R. Maxwell <amaxwell at mac.com> wrote:
>> 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.

Good to know.

I notice in the source that you do not look at files in /etc/paths.d/* but just look at /etc/paths and then hardcode /usr/texbin in addition to what you find there.

>> 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

Yep.

>> 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…

Indeed.

>> 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.

Yeah. I see that now. But I tested that anyway to see if there were different paths for different users. Now that I look at the source, I see that that is entirely irrelevant.

>> 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.

I understand, but it is possible that the problem I’m running into is related to using a deprecated technique. With luck the problem is idiosyncratic to me. I haven’t seen this discussed elsewhere (though I haven’t check Apple Dev forums, which is where I really should.)

> Haven't tried under 10.10 myself yet, so yours is the first report. Sorry for the trouble.

No worries. I can manually run fmtutil-sys when needed.


> I can't post betas or releases on googlecode anymore,

That’s annoying.

> 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,

I can take a look now that I’ve grabbed a copy of the source.

> but modifying fmtutil to dump them might be quicker.

Yep.

Thanks for your help. I’ll report back what I discover.

Cheers,

-j






More information about the tlu mailing list