[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#358330: fmtutil-sys: use local user texmf.cnf when configuring system wide files



Vincent Danjean <Vincent.Danjean@ens-lyon.org> wrote:

> Looking in details in fmtutil, I see that the messages come from the
> cache_vars
>
> Here is now what I tested :
> root@atsina danjean# TEXMFVAR=/var/lib/texmf
> root@atsina danjean# TEXMFCONFIG=/etc/texmf
> root@atsina danjean# RUNNING_AS_SYS=true
> root@atsina danjean# export TEXMFVAR TEXMFCONFIG RUNNING_AS_SYS
> root@atsina danjean# kpsewhich '--expand-var=$VARTEXFONTS'
> /var/cache/fonts
> root@atsina danjean# export KPSE_DOT="/users/huron/danjean"
> root@atsina danjean# kpsewhich '--expand-var=$VARTEXFONTS'
> /users/huron/danjean/texmf.cnf: Permission denied
> /var/cache/fonts
>
> So the messages are due to the lines 560-565 of fmtutil:
>   thisdir=`pwd`
>
>   : ${KPSE_DOT=$thisdir}
>   export KPSE_DOT

Thanks for the analysis.  I had something like this in the back of my
mind, but it didn't uncover itself...

> I do not know why KPSE_DOT is set to the current directory (which can be
> any directory, there is no "cd" before) and I do not know the purpose of
> this variable (I'm not yet TeX guru ;-) )

I don't know, either.  I'll ask upstream.

>> As long as HOME is root's real home directory, I don't think much bad
>> should happen - or phrased differently, root shouldn't have a f'cked up
>> texmf.cnf in their home directory.  But I think we have already
>> discussed this a while ago, does anybody in the team remember?
>
> There seems to be some things about that (the RUNNING_AS_SYS variable),
> but it does not seems very usefull (no other use than to print or not a
> message, at least in fmtutil)

Oh, it's useful for more than the message printing - if you are root and
it is not set, fmtutil-sys is called which sets the correct variables
and calls fmtutil again.  Without it we'd get into an endless loop.

Regards, Frank
-- 
Frank Küster
Single Molecule Spectroscopy, Protein Folding @ Inst. f. Biochemie, Univ. Zürich
Debian Developer (teTeX)




Reply to: