[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



Frank Küster wrote:
> Hm, I cannot reproduce this:
> 
> frank@riesling:~$ su
> Password: 
> riesling:/home/frank# echo $HOME
> /root
> riesling:/home/frank# kpsewhich --var-value=TEXMFHOME
> /root/texmf
> riesling:/home/frank#
> 
> What am I (or you?) doing wrong?

I get the same results as you :
root@atsina danjean# kpsewhich --var-value=TEXMFHOME
/root/texmf
However :
root@atsina danjean# fmtutil-sys  --missing
/users/huron/danjean/texmf.cnf: Permission denied
/users/huron/danjean/texmf.cnf: Permission denied
/users/huron/danjean/texmf.cnf: Permission denied
/users/huron/danjean/texmf.cnf: Permission denied
/users/huron/danjean/texmf.cnf: Permission denied
/users/huron/danjean/texmf.cnf: Permission denied
/users/huron/danjean/texmf.cnf: Permission denied
/users/huron/danjean/texmf.cnf: Permission denied

In details:
root@atsina danjean# bash -x /usr/bin/fmtutil-sys  --missing
+ test -f /bin/ksh
+ test -z ''
+ unset RUNNING_KSH
+ test -f /bin/bsh
+ unset RUNNING_BSH
+ test -n ''
++ kpsewhich -var-value TEXMFSYSVAR
+ v=/var/lib/texmf
++ kpsewhich -var-value TEXMFSYSCONFIG
+ c=/etc/texmf
+ TEXMFVAR=/var/lib/texmf
+ TEXMFCONFIG=/etc/texmf
+ RUNNING_AS_SYS=true
+ export TEXMFVAR TEXMFCONFIG RUNNING_AS_SYS
+ case $argv0 in
+ exec fmtutil --missing
/users/huron/danjean/texmf.cnf: Permission denied
/users/huron/danjean/texmf.cnf: Permission denied
/users/huron/danjean/texmf.cnf: Permission denied
/users/huron/danjean/texmf.cnf: Permission denied
/users/huron/danjean/texmf.cnf: Permission denied
/users/huron/danjean/texmf.cnf: Permission denied
/users/huron/danjean/texmf.cnf: Permission denied
/users/huron/danjean/texmf.cnf: Permission denied

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

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 hope this will help you.

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

  Best regards,
    Vincent





Reply to: