Bug 864875

Summary: non-texlive files (e.g., preview.sty) in /usr/share/texmf are not in the path
Product: [Fedora] Fedora Reporter: Colin Macdonald <cbm>
Component: texliveAssignee: Jindrich Novy <jnovy>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: jamatos, jan.teichmann, jnovy, michal, pertusus, peter, pknirsch
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-20 15:33:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Colin Macdonald 2012-10-10 10:29:43 UTC
/usr/share/texmf is not in the tex path so fedora packages that are not part of texlive but install tex files don't work (notably tex-preview.noarch for preview.sty, but probably asymptote and others too).

Here's an except from the maillist:

>> the tex-preview present in Fedora actually should be compatible
>> because TL2012 is configured to look into /usr/share/texmf as well.
>
> That does not appear to be the case, as several threads have
> discussed.  /usr/share/texmf-local is in the path.  Some of us have
> symlinked that to /usr/share/texmf as a workaround.
>
> E.g., José Matos said a few months ago:
>
>> According to texconfig
>>
>> kpathsea variables
>> ...
>> TEXMF={/usr/share/texlive/texmf-config,/usr/share/texlive/texmf-var,/root/texmf,!!/usr/share/texlive/texmf-config,!!/usr/share/texlive/texmf-var,!!/usr/share/texlive/texmf,!!/usr/share/texlive/../texmf-local,!!/usr/share/texlive/texmf-dist}
>> ...
>>
>> Note that /usr/share/texmf is not in that search path.


And finally, here is a workaround (in my experience running texhash was not necessary).

>>
>> Since /usr/share/texmf-local is in the list making it a symbolic link to
>> /usr/share/texmf (after running texhash) shows it again:
>>
>> $ kpsewhere preview.sty
>> /usr/share/texlive/../texmf-local/tex/latex/preview/preview.sty

Comment 1 Colin Macdonald 2012-10-10 10:34:27 UTC
see also bug #855298, which previously reported the preview.sty problem.

Comment 2 Jonathan Underwood 2012-10-10 16:19:29 UTC
*** Bug 855298 has been marked as a duplicate of this bug. ***

Comment 3 Jindrich Novy 2012-10-19 12:27:14 UTC
*** Bug 867656 has been marked as a duplicate of this bug. ***

Comment 4 Fedora Update System 2012-10-20 05:25:13 UTC
texlive-2012-3.20121019_r28030.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/texlive-2012-3.20121019_r28030.fc18

Comment 5 Michal Jaegermann 2012-10-20 19:55:17 UTC
(In reply to comment #0)

> 
> And finally, here is a workaround (in my experience running texhash was not
> necessary).

Such workaround does not really work.  See bug #868556 for bad sideffects.
Just running texhash clearly cannot work without expanding a kpathsea search
path in a configuration while dropping an extra link, even inside of
/usr/share/texlive/texmf-local/ would hack around the issue.

And what about a situation when you want to add some system-wide but local
packages?  Abusing directory descibed by TEXMFLOCAL looks like an awfull idea
even if old value for that looked actually saner if you wanted to be sure
that system updates will not clobber your changes/additions.

Comment 6 Fedora Update System 2012-10-21 05:59:56 UTC
Package texlive-2012-3.20121019_r28030.fc18, PyX-0.11.1-4.fc18, evince-3.6.1-2.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing texlive-2012-3.20121019_r28030.fc18 PyX-0.11.1-4.fc18 evince-3.6.1-2.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-16563/PyX-0.11.1-4.fc18,evince-3.6.1-2.fc18,texlive-2012-3.20121019_r28030.fc18
then log in and leave karma (feedback).

Comment 7 Colin Macdonald 2012-10-21 08:50:53 UTC
Ahh!  My suggestion (actually Jose's) of symlinking was a quick *work-around* for users who wanted to be able to compile their documents while waiting for a real fix.

I certainly wasn't suggesting this symlink be the official solution...  Probably there is another way to get "/usr/share/texmf" in the path.

Comment 8 José Matos 2012-10-23 12:53:26 UTC
(In reply to comment #7)
> Ahh!  My suggestion (actually Jose's) of symlinking was a quick
> *work-around* for users who wanted to be able to compile their documents
> while waiting for a real fix.

You are right, it was a quick hack to solve the problem while waiting for a better solution.

I suspect that the right place to change this is the file
/usr/share/texlive/texmf/web2c/texmf.cnf

where TEXMF is set.

Comment 9 Jindrich Novy 2012-10-23 12:59:58 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > Ahh!  My suggestion (actually Jose's) of symlinking was a quick
> > *work-around* for users who wanted to be able to compile their documents
> > while waiting for a real fix.
> 
> You are right, it was a quick hack to solve the problem while waiting for a
> better solution.
> 
> I suspect that the right place to change this is the file
> /usr/share/texlive/texmf/web2c/texmf.cnf
> 
> where TEXMF is set.

Yup, but there is a problem that if TEXMFLOCAL is set directly to /usr/share/texmf then /usr/share/texlive/texmf-local won't be visible to kpathsea.

Comment 10 José Matos 2012-10-23 14:17:23 UTC
My proposal is to leave TEXMFLOCAL alone.

The question then comes why don't we have TEXMFMAIN as

TEXMFMAIN = $TEXMFROOT/../texmf

Does TEXMFMAIN needs to live in /usr/share/texlive/?

If it does then another possibility is

TEXMFMAIN = $TEXMFROOT/{texmf,../texmf}

but I am speculating on the last one, I did not test it.

Comment 11 José Matos 2012-10-23 14:38:50 UTC
To add further to the above debian has TEXMFMAIN as /usr/share/texmf

As can be seen going from
http://www.tug.org/texlive/debian.html

with the rules in

http://people.debian.org/~preining/TeX/Debian-TeX-Policy/ch5.html#s-tds-libkpse

I agree with the rationale there.

The role of the trees TEXMFMAIN and TEXMFDIST in Debian differ from upstream's original usage. Upstream uses TEXMFMAIN for the files that have to match the binary executables and TEXMFDIST for other TeX input files that are replaced when a new texmf tarball appears; this distinction is not necessary on a system with a decent package managment system. Instead, the basic TeX packages install their files into their TEXMFDIST directories [2] , while TEXMFMAIN is used by TeX add-on packages for their files and allows them to shadow older versions provided by the basic TeX packages. A couple of files from the basic TeX packages still need to be placed in TEXMFMAIN [3].

FWIW also I have never installed debian. :-)

Comment 12 Michal Jaegermann 2012-10-23 15:50:00 UTC
(In reply to comment #9)

> 
> Yup, but there is a problem that if TEXMFLOCAL is set directly to
> /usr/share/texmf then /usr/share/texlive/texmf-local won't be visible to
> kpathsea.

I fail to see anything which would stop you from, say, putting a link to
/usr/share/texmf _inside_ a directory designated as TEXMFLOCAL.  Searches are here recursive or at least can be made that way.  Another obvious option would be to expand a default TEXMF value in texmf.cnf by adding to it another tree (in this particular case /usr/share/texmf).  Of course each and every user can do that for her/himself, and a comment at the top of texmf.cnf says exactly how to perform "private" modifications,  but it would seem to me that good defaults would be preferable.

Assuming that all stuff from /usr/share/texmf/ will eventually migrate to new locations (which may take quite a while) you may be left then with a "dead" symlink somewhere in /usr/share/texlive/ tree. In that sense expanding a default TEXMF, possibly indirectly through one of its components, looks like a safer possibility.

Comment 13 Fedora Update System 2012-12-20 15:33:38 UTC
texlive-2012-3.20121019_r28030.fc18, PyX-0.11.1-4.fc18, evince-3.6.1-2.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.