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

fixing a serious bug or ignore tag?

Dear release team,

concerning tex-common bug #607857

very recently a well hidden policy violation has been found by
piuparts, namely that the TeX packages create /usr/local/share/texmf
but never remove it.

Some explanation: /usr/local/share/texmf (henceforth /u/l/s/t) is
used for local adaptions/additions of the TeX installation. On
several request we now create that dir in the tex-common postinst,
which is permitted by policy, and try to remove it in the postrm,
in case it is empty.

Furthermore, we believed that we made sure that none of *our* tools
and packages shipped in Debian creates files in /u/l/s/t so that 
it can be actually removed.

So only in case an admin actually puts files there the directory
will remain.

Now piuparts showed that it is not the case that we don't create files
there. In fact installation of texlive-base will create an (quasi empty)
ls-R file in /u/l/s/t. After some debugging we found that none of our
code is creating it, but a call to another utility, updmap-sys which
manages font mappings for TeX, calls mktexlsr without any path
specification, thus creating ls-R in /u/l/s/t.

The solution to that is as follows:
- call updmap-sys in tex-common's trigger action with the argument
  --nohash to supress calls to mktexlsr
  This might create new files in /var/lib/texmf, namely the files
  that defined font mappings for dvips/xdvi/pdftex.
- call mktexlsr only on /var/lib/texmf to make sure that if these
  files are created anew, then they can also be found.

This requires the following change in tex-common's postinst (diff is 
against postinst.in, so the lines are a bit off):

Index: postinst.in
--- postinst.in	(revision 4741)
+++ postinst.in	(working copy)
@@ -141,9 +141,31 @@
                         tempfile=$(mktemp -p /tmp updmap.XXXXXXXX)
                         printf "Running updmap-sys. This may take some time... "
-                        if updmap-sys > $tempfile 2>&1 ; then
+                        # call updmap with --nohash so that no ls-R files
+                        # are created in /usr/local/share/texmf/
+                        # see bug report #607857
+                        # instead of that we call mktexlsr /var/lib/texmf
+                        # afterwards. This can be done without checks as
+                        # we know that dhit_libkpathsea_configured and
+                        # since mktexlsr and updmap are in the same package
+                        # and we checked for updmap already
+                        if updmap-sys --nohash > $tempfile 2>&1 ; then
                             rm -f $tempfile
                             echo "done."
+                            tempfile=$(mktemp -p /tmp mktexlsr.XXXXXXXX)
+                            printf "Running mktexlsr /var/lib/texmf ... "
+                            if mktexlsr /var/lib/texmf > $tempfile 2>&1 ; then
+                                rm -f $tempfile
+                                echo "done."
+                            else
+                                exec >&2
+                                echo
+                                echo "mktexlsr /var/lib/texmf failed. Output has been stored in"
+                                echo "$tempfile"
+                                echo "Please include this file if you report a bug."
+                                echo
+                                exit 1
+                            fi
                             exec >&2

Now we would like to ask you on your opinion how to proceed with this bug.
I see two options:
- either we upload the fixed package to unstable and you grant it 
  a freeze exception (or do whatever has to be done that it moves to testing)
- you give that bug a release-ignore tag

Since we are in deep freeze I didn't upload till now, but wanted to ask
your opinion beforehand, if this bug warrants an upload of a new package,
or a release-ignore tag is preferrable.

Thanks a lot and all the best


Norbert Preining            preining@{jaist.ac.jp, logic.at, debian.org}
JAIST, Japan                                 TeX Live & Debian Developer
DSA: 0x09C5B094   fp: 14DF 2E6C 0307 BE6D AD76  A9C0 D2BF 4AA3 09C5 B094
MEATH (adj.)
Warm and very slightly clammy. Descriptive of the texture of your
hands after the automatic drying machine has turned itself off, just
damp enough to make it embarrassing if you have to shake hands with
someone immediately afterwards.
			--- Douglas Adams, The Meaning of Liff

Reply to: