Red Hat Bugzilla – Bug 229377
Review Request: latexmk - a make-like utility for LaTeX documents
Last modified: 2007-11-30 17:11:57 EST
Spec URL: http://www.cs.usu.edu/~jerry/Projects/RPMS/latexmk/latexmk.spec
SRPM URL: http://www.cs.usu.edu/~jerry/Projects/RPMS/latexmk/latexmk-3.08n-1.src.rpm
Latexmk is a perl script for running LaTeX the correct number of times to resolve cross references, etc; it also runs auxiliary programs (bibtex, makeindex if necessary, and dvips and/or a previewer as requested). It has a number of other useful capabilities, for example to start a previewer and then run latex whenever the source files are updated, so that the previewer gives an up-to-date view of the document.
This is my first package submission. I need a sponsor.
This package produces no warnings from rpmlint. However, there is one issue that concerns me. The latexmk script looks in various unclean places for a global configuration file (see the definition of rc_system_files). If I am reading the FHS correctly, it should be looking for /etc/latexmk. On the other hand, I am not including a global configuration file in this package since the defaults are sane for a Fedora system. How should I handle this issue: ignore it, create an empty /etc/latexmk and patch the script to look there, something else?
While I'm waiting, I decided to go ahead and create an /etc/latexmk.conf showing
all of the configuration parameters with their default values, commented out.
The new spec file and source RPM are at the same URLs as before.
Some initial comments:
- md5sum of latexmk-308n.zip in source rpm does not match upstream
- The config file sets evince as pdf previewer, but there's no dependency on
evince. Maybe use xdg-open as the previewer for all pdf, ps and dvi by default
(and add a dependency on xdg-utils)?
- README.fedora is a too generic filename (think unpacking several source rpms),
rename eg. to latexmk-README.fedora in SourceX (README.fedora is ok when
installed to /usr/share/doc/latexmk-*)?
- rpmlint output on the source rpm, both easily fixable:
W: latexmk setup-not-quiet
W: latexmk mixed-use-of-spaces-and-tabs (spaces: line 1, tab: line 12)
Also, maybe some of the scripts in extra_scripts would be worth packaging in %doc?
I don't know why the md5sums did not match, but I downloaded the upstream zip
file again to fix this problem. I changed the use of evince to xdg-open as
suggested and added a dependency on xdg-utils. I changed the source RPM name of
README.fedora to latexmk-README.fedora as suggested. I fixed the rpmlint
complaints (and also learned that rpmlint applies to source RPMs, too, which I
did not know before). Finally, I put the entire extra_scripts directory (minus
the DOS .bat files) into %doc. The new URLs are:
Thanks for the review!
Looks almost ready now, however as noted in comment 2, I still think it would be
a good idea to set $dvi_previewer and $ps_previewer to xdg-open too in the
default config file. Otherwise the results eg. here (on a KDE-based desktop
quite capable of viewing dvi and ps with KDVI and KGhostView) are like:
$ latexmk -pv foo.tex
Starting previewer: 'start xdvi foo.dvi'
sh: xdvi: command not found
$ latexmk -pv -view=ps foo.tex
Starting previewer: 'start gv foo.ps'
sh: gv: command not found
> set $dvi_previewer and $ps_previewer to xdg-open
+1, that's precisely what xdg-open is designed for. :)
Unfortunately, the use of xdg-open means that latexmk does not know how to
refresh the previewer when the document changes, nor will the previewers always
display landscape documents correctly. Nevertheless, I have made this change.
I also added material to README.fedora describing how to configure latexmk for
particular previewers so that refreshing and viewing of landscape documents work
properly. Because I consider the breakage of refresh and landscape viewing to
be so critical, I put a note in the Summary directing people to the
README.fedora document for information on these topics. The new URLs are:
Yep, it looks like there's no perfect solution for this, but I also think that
the one in 3.08n-3 is a good default. Approved, and I will sponsor you, feel
free to proceed with http://fedoraproject.org/wiki/PackageMaintainers/Join
I just discovered that FC7 is using texlive to replace the now defunct tetex.
My spec file refers to tetex and tetex-devel. What is the preferred solution?
Should I Require the actual binaries (/usr/bin/latex, /usr/bin/pdflatex, etc.),
or use %if to Require tetex for FC6 and earlier and texlive for FC7 and later?
If the latter, how do I distinguish between <= FC6 and >= FC7? I suppose I need
to account for the FC7 test releases as well.
I would use dependencies on the actual required executables.
But if you wish to go the %if route, there's documentation about how to use
certain macros in the Fedora build system configuration at
http://fedoraproject.org/wiki/Packaging/DistTag . There's a good chance that
these macros are not available in all configurations people may want to rebuild
this package with (locally, on other distros etc) which may cause unwanted
results. That's why I personally only ever resort to that method if everything
else fails (hm, I wonder if I've ever actually had to do that).
New Package CVS Request
Package Name: latexmk
Short Description: A make-like utility for LaTeX documents
Branches: FC-5 FC-6
Sponsored, removing FE-NEEDSPONSOR blocker.