Re: Changes to the Policy (was: SVN tetex commit: r353 - in tex-common/trunk: debian doc)
On Don, 24 Nov 2005, Frank Küster wrote:
> + <item><file>/usr/share/texmf-tetex/</file>, part of <var>TEXMFDIST</var></item>
> + <item><file>/usr/share/texmf-texlive/</file>, part of <var>TEXMFDIST</var></item>
Please see attached diff to tex-common to implement this in tex-common,
together with user selection. Basic line:
. Move the comments in texmf.d/05TeXMF.cnf to texmf.d/00tex.cnf
. create two files 04DistSelection.tetex and 04DistSelection.texlive
. debian/config asks for wether tetex should come first or texlive
. link 04DistSelection.cnf -> 04DistSelection.$selecteddistributionfirst
Important question here is *what* we do if the file 04DistSelection.cnf
is present but *not* a link to one of these files.
ATM I recreate the file in any case as specified by the debconf
question, but this is probably not the best solution.
> + A package must not install files into (subdirectories of)
> + <file>/usr/share/texmf/doc</file>, which is a symbolic link to
> + <file>/usr/share/doc/texmf</file>.
Where should we put doc files? ATM I do the following:
. put all the doc files in /u/s/d/$package/...
. link /u/s/d/texlive/... -> /u/s/d/$package/...
and have a link /u/s/texmf-texlive/doc -> /u/s/d/texlive
Is this what we want?
> + <p>
> + Note that other subdirectories of <file>/etc/texmf/</file>
> + are not searched for TeX input files and can be used by
> + packages for configuration files that are not TeX input
> + files.
> + </p>
Probably it is better to state that /etc/texmf acts like a normal TDS
tree, so local sysadmins should know where to put the files, and what is
searched. You could put map files in ../fonts/map (which is not
.../tex).
Best wishes
Norbert
-------------------------------------------------------------------------------
Dr. Norbert Preining <preining AT logic DOT at> Università di Siena
gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
GIPPING (participial vb.)
The fish-like opening and closing of the jaws seen amongst people who
have recently been to the dentist and are puzzled as to whether their
teeth have been put back the right way up.
--- Douglas Adams, The Meaning of Liff
Index: debian/changelog
===================================================================
--- debian/changelog (Revision 352)
+++ debian/changelog (Arbeitskopie)
@@ -2,8 +2,10 @@
* change ls_R_magic to include ., ./, and ls-R so that kpathsea does
not moan about unusable entry. [preining]
+ * first try at the TEXMFDIST separation to texlive and tetex, including
+ debconf questions on the sort order. [preining]
- -- Norbert Preining <preining@logic.at> Wed, 23 Nov 2005 19:49:16 +0100
+ -- Norbert Preining <preining@logic.at> Thu, 24 Nov 2005 23:32:15 +0100
tex-common (0.11) unstable; urgency=low
Index: debian/postinst.in
===================================================================
--- debian/postinst.in (Revision 352)
+++ debian/postinst.in (Arbeitskopie)
@@ -105,6 +105,17 @@
# Now we check again for essential settings, in the generated texmf.cnf
check_texfontmaps /etc/texmf/texmf.cnf
+ #
+ # sort out the search order of DIST trees
+ db_get tex-common/tetexfirst || true
+ if [ "$RET" = true ] ; then
+ distext=tetex
+ else
+ distext=texlive
+ fi
+ ln -s /etc/texmf/texmf.d/04DistSelection.$distext /etc/texmf/texmf.d/04DistSelection.cnf
+
+
#
# set permission of ls-R files
db_get tex-common/managedlsr || true
Index: debian/templates
===================================================================
--- debian/templates (Revision 352)
+++ debian/templates (Arbeitskopie)
@@ -45,3 +45,15 @@
.
So if you had any private file in /etc/texmf/texmf.d/, then you should add
'.cnf' to its name; for example, 22mymacro => 22mymacro.cnf
+
+Template: tex-common/tetexfirst
+Type: boolean
+Default: true
+_Description: Search first in the teTeX tree and than in the TeX live tree
+ teTeX and TeX live packages for Debian can be used in parallel. This option
+ decides which tree is search first. If you choose true, than the teTeX
+ tree (/usr/share/texmf-tetex) will be searched first, otherwise (you selected
+ false) the TeX live tree (/usr/share/texmf-texlive).
+ .
+ If you plan to use only one of the two systems, you can ignore this setting
+ or set it so that your prefered system is searched first.
Index: debian/config.in
===================================================================
--- debian/config.in (Revision 352)
+++ debian/config.in (Arbeitskopie)
@@ -124,8 +124,40 @@
db_go
fi
fi
+
+#
+# now for the search order
+# the search order is specified by linking
+# 04DistSelection.cnf -> 04DistSelection.tetex or .texlive
+#
+tetexfirst=true
+if [ -L /etc/texmf/texmf.d/04DistSelection.cnf ] ; then
+ linkdest=`readline /etc/texmf/texmf.d/04DistSelection.cnf`
+ case $linkdest in
+ *04DistSelection.tetex) tetexfirst=true ;;
+ *04DistSelection.texlive) tetexfirst=false ;;
+ *) firsttetex=true;;
+ esac
+ db_set tex-common/tetexfirst $tetexfirst || true
+else
+ if [ -r /etc/texmf/texmf.d/04DistSelection.cnf ] ; then
+ # the file is readable but *not* a link
+ # what do we do??? leave it as it is?
+ db_set tex-common/tetexfirst $tetexfirst || true
+ else
+ # the file does not exist
+ db_set tex-common/tetexfirst $tetexfirst || true
+ fi
fi
+db_input low tex-common/tetexfirst || true
+db_go
+
+
#
+# end of the firstpass = TRUE if
+#
+fi
+#
# we do not care for user permissions in this setting!
#
Index: conf/texmf.d/00tex.cnf
===================================================================
--- conf/texmf.d/00tex.cnf (Revision 0)
+++ conf/texmf.d/00tex.cnf (Revision 0)
@@ -0,0 +1,56 @@
+% original texmf.cnf -- runtime path configuration file for kpathsea.
+% (If you change or delete `original' on the previous line, the
+% distribution won't install its version over yours.)
+% Public domain.
+%
+% What follows is a super-summary of what this .cnf file can
+% contain. Please read the Kpathsea manual for more information.
+%
+% texmf.cnf is generated from texmf.in, by replacing @var@ with the
+% value of the Make variable `var', via a sed file texmf.sed, generated
+% (once) by kpathsea/Makefile (itself generated from kpathsea/Makefile.in
+% by configure).
+%
+% Any identifier (sticking to A-Za-z_ for names is safest) can be assigned.
+% The `=' (and surrounding spaces) is optional.
+% No % or @ in texmf.in, for the sake of autogeneration.
+% (However, %'s and @'s can be edited into texmf.cnf or put in envvar values.)
+% $foo (or ${foo}) in a value expands to the envvar or cnf value of foo.
+%
+% Earlier entries (in the same or another file) override later ones, and
+% an environment variable foo overrides any texmf.cnf definition of foo.
+%
+% All definitions are read before anything is expanded, so you can use
+% variables before they are defined.
+%
+% If a variable assignment is qualified with `.PROGRAM', it is ignored
+% unless the current executable (last filename component of argv[0]) is
+% named PROGRAM. This foo.PROGRAM construct is not recognized on the
+% right-hand side. For environment variables, use FOO_PROGRAM.
+%
+% Which file formats use which paths for searches is described in the
+% various programs' and the kpathsea documentation.
+%
+% // means to search subdirectories (recursively).
+% A leading !! means to look only in the ls-R db, never on the disk.
+% A leading/trailing/doubled ; in the paths will be expanded into the
+% compile-time default. Probably not what you want.
+%
+% You can use brace notation, for example: /usr/local/{mytex:othertex}
+% expands to /usr/local/mytex:/usr/local/othertex. Instead of the path
+% separator you can use a comma: /usr/local/{mytex,othertex} also expands
+% to /usr/local/mytex:/usr/local/othertex. However, the use of the comma
+% instead of the path separator is deprecated.
+%
+% The text above assumes thet path separator is a colon (:). Non-UNIX
+% systems use different path separators, like the semicolon (;).
+
+% Part 1: Search paths and directories.
+
+% You can set an environment variable to override TEXMF if you're testing
+% a new TeX tree, without changing anything else.
+%
+% You may wish to use one of the $SELFAUTO... variables here so TeX will
+% find where to look dynamically. See the manual and the definition
+% below of TEXMFCNF.
+
Index: conf/texmf.d/04DistSelection.tetex
===================================================================
--- conf/texmf.d/04DistSelection.tetex (Revision 0)
+++ conf/texmf.d/04DistSelection.tetex (Revision 0)
@@ -0,0 +1,4 @@
+% The main distribution tree:
+% TEXMFDIST = /usr/share/texmf-dist
+% TEXMFDIST is use for teTeX and TeX live.
+TEXMFDIST = /usr/share/texmf-{tetex;texlive}
Index: conf/texmf.d/04DistSelection.texlive
===================================================================
--- conf/texmf.d/04DistSelection.texlive (Revision 0)
+++ conf/texmf.d/04DistSelection.texlive (Revision 0)
@@ -0,0 +1,4 @@
+% The main distribution tree:
+% TEXMFDIST = /usr/share/texmf-dist
+% TEXMFDIST is use for teTeX and TeX live.
+TEXMFDIST = /usr/share/texmf-{texlive;tetex}
Index: conf/texmf.d/05TeXMF.cnf
===================================================================
--- conf/texmf.d/05TeXMF.cnf (Revision 352)
+++ conf/texmf.d/05TeXMF.cnf (Arbeitskopie)
@@ -1,69 +1,7 @@
-% original texmf.cnf -- runtime path configuration file for kpathsea.
-% (If you change or delete `original' on the previous line, the
-% distribution won't install its version over yours.)
-% Public domain.
-%
-% What follows is a super-summary of what this .cnf file can
-% contain. Please read the Kpathsea manual for more information.
-%
-% texmf.cnf is generated from texmf.in, by replacing @var@ with the
-% value of the Make variable `var', via a sed file texmf.sed, generated
-% (once) by kpathsea/Makefile (itself generated from kpathsea/Makefile.in
-% by configure).
-%
-% Any identifier (sticking to A-Za-z_ for names is safest) can be assigned.
-% The `=' (and surrounding spaces) is optional.
-% No % or @ in texmf.in, for the sake of autogeneration.
-% (However, %'s and @'s can be edited into texmf.cnf or put in envvar values.)
-% $foo (or ${foo}) in a value expands to the envvar or cnf value of foo.
-%
-% Earlier entries (in the same or another file) override later ones, and
-% an environment variable foo overrides any texmf.cnf definition of foo.
-%
-% All definitions are read before anything is expanded, so you can use
-% variables before they are defined.
-%
-% If a variable assignment is qualified with `.PROGRAM', it is ignored
-% unless the current executable (last filename component of argv[0]) is
-% named PROGRAM. This foo.PROGRAM construct is not recognized on the
-% right-hand side. For environment variables, use FOO_PROGRAM.
-%
-% Which file formats use which paths for searches is described in the
-% various programs' and the kpathsea documentation.
-%
-% // means to search subdirectories (recursively).
-% A leading !! means to look only in the ls-R db, never on the disk.
-% A leading/trailing/doubled ; in the paths will be expanded into the
-% compile-time default. Probably not what you want.
-%
-% You can use brace notation, for example: /usr/local/{mytex:othertex}
-% expands to /usr/local/mytex:/usr/local/othertex. Instead of the path
-% separator you can use a comma: /usr/local/{mytex,othertex} also expands
-% to /usr/local/mytex:/usr/local/othertex. However, the use of the comma
-% instead of the path separator is deprecated.
-%
-% The text above assumes thet path separator is a colon (:). Non-UNIX
-% systems use different path separators, like the semicolon (;).
-
-% Part 1: Search paths and directories.
-
-% You can set an environment variable to override TEXMF if you're testing
-% a new TeX tree, without changing anything else.
-%
-% You may wish to use one of the $SELFAUTO... variables here so TeX will
-% find where to look dynamically. See the manual and the definition
-% below of TEXMFCNF.
-
% The tree containing the runtime files closely related to the specific
% program version used:
TEXMFMAIN = /usr/share/texmf
-% The main distribution tree:
-% TEXMFDIST = /usr/share/texmf-dist
-% TEXMFDIST is not used in Debian, everything is in $TEXMFMAIN
-TEXMFDIST = $TEXMFMAIN
-
-
% A place for local additions to a "standard" texmf tree.
% This tree is not used for local configuration maintained by
% texconfig, it uses TEXMFCONFIG below.
@@ -116,7 +54,7 @@
%
% For texconfig to work properly, TEXMFCONGIG and TEXMFVAR should be named
% explicitly and before all other trees.
-TEXMF = {$TEXMFCONFIG,$TEXMFVAR,$TEXMFHOME,$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFLOCAL,!!$TEXMFMAIN}
+TEXMF = {$TEXMFCONFIG,$TEXMFVAR,$TEXMFHOME,$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFLOCAL,!!$TEXMFMAIN,!!TEXMFDIST}
% The system trees. These are the trees that are shared by all the users.
SYSTEXMF = $TEXMFLOCAL;$TEXMFMAIN;$TEXMFDIST
@@ -133,7 +71,7 @@
% one of the TEXMF directories (avoids overlapping ls-R files).
%
% TEXMFDBS = $TEXMF;$VARTEXFONTS
-TEXMFDBS = $TEXMFSYSVAR;$TEXMFLOCAL;$TEXMFMAIN;$VARTEXFONTS
+TEXMFDBS = $TEXMFSYSVAR;$TEXMFLOCAL;$TEXMFMAIN;$VARTEXFONTS;$TEXMFDIST
% It may be convenient to define TEXMF like this:
% TEXMF = {$TEXMFHOME,!!$TEXMFLOCAL,!!$TEXMFMAIN,$HOME}
Reply to: