view kpathsea/INSTALL @ 2999:faa5d0421460

[project @ 1997-05-23 03:02:09 by jwe]
author jwe
date Fri, 23 May 1997 03:02:36 +0000
parents
children 1f0b06020e36
line wrap: on
line source

Contents:

Installation
  Simple installation
  Custom installation
    Disk space
    Kpathsea application distributions
    Changing search paths
      Default path features
      Default path generation
    Running `configure'
      `configure' shells
      `configure' options
      `configure' environment
      `configure' scenarios
      Shared library
    Running `make'
    Installing files
    Cleaning up
    Filename database generation
    `MakeTeX' scripts
      `MakeTeX' configuration
      `MakeTeX' script names
      `MakeTeX' script arguments
    Installation testing
  Security


Installation
************

  The procedure for Kpathsea (and Web2c, etc.) configuration and
installation follows.  If trouble, *note Common problems::., a copy of
which is in the file `kpathsea/BUGS'.

Simple installation
===================

  Installing TeX and friends for the first time can be a daunting
experience.  Thus, you may prefer to skip this whole thing and just get
precompiled executables: *note unixtex.ftp::..

  This section explains what to do if you wish to take the defaults for
everything (installing under `/usr/local'), and generally to install in
the simplest possible way.  Most steps here refer to corresponding
subsection in the next section which explains how to override defaults
and generally gives more details.

  1. Be sure you have enough disk space: approximately 8 megabytes for
     the compressed archives, 15MB for sources, 45MB for compilation,
     40MB for the (initial) installed system (including library files).
     *Note Disk space::.

  2. Retrieve these two distribution archives:
    `ftp://ftp.tug.org/tex/texk.tar.gz'
          These are the sources, which you will be compiling.

    `ftp://ftp.tug.org/tex/texmflib.tar.gz'
          This is a basic set of input files.  You should unpack it in
          the directory `/usr/local/share'; doing so will create a
          `texmf' subdirectory there.

     *Note Kpathsea application distributions::.

  3. When using the default search paths, there is no need to edit any
     distribution files. *Note Changing search paths::.

  4. At the top level of the distribution, run `sh configure'.  (If you
     have the GNU Bash shell installed, run `bash configure'.) *Note
     Running configure::.

  5. `make'. *Note Running make::.

  6. `make install'. *Note Installing files::.

  7. `make distclean'. *Note Cleaning up::.

  8. Set up a cron job to rebuild the filename database that makes
     searching faster.  This line will rebuild it every midnight:
          0 0 * * * cd /usr/local/share/texmf && /BINDIR/MakeTeXls-R
     *Note Filename database generation::, and *Note Filename
     database::.

  9. If you're installing Dvips, you also need to set up configuration
     files for your printers and make any additional PostScript fonts
     available.  *Note Installation: (dvips)Installation.  If you have
     any color printers, *note Color device configuration: (dvips)Color
     device configuration..

 10. The first time you run a DVI driver, a bunch of PK fonts will be
     built by Metafont via `MakeTeXPK' (and added to the filename
     database).  This will take some time.  Don't be alarmed; they will
     created only this first time (unless something is wrong with your
     path definitions).

     By default, `MakeTeXPK' assumes `/usr/local/share/texmf/fonts' is
     globally writable.  If you need a different arrangement, *note
     MakeTeX configuration::..

     *Note MakeTeX scripts::.

 11. For some simple tests, try `tex story \\bye' and `latex simple'.
     Then run `xdvi story' or `dvips simple' on the resulting DVI files
     to preview/print the documents.  *Note Installation testing::.

Custom installation
===================

  Most sites need to modify the default installation procedure in some
way, perhaps merely changing the prefix from `/usr/local', perhaps
adding extra compiler or loader options to work around `configure'
bugs.  This section explains how to override default choices.  For
additional distribution-specific information:
   * `dviljk/INSTALL'.

   * *Note Installation: (dvips)Installation.

   * *Note Installation: (web2c)Installation.

   * `xdvik/INSTALL'.

  These instructions are for Unix systems.  Other operating-system
specific distributions have their own instructions.  The code base
itself supports Amiga, DOS, OS/2, and VMS.

  Following are the same steps as in the previous section (which
describes the simplest installation), but with much more detail.

Disk space
----------

  Here is a table showing the disk space needed for each distribution
(described in the next section).  The `(totals)' line reflects the
`texk' source distribution and `texmflib'; the individual distributions
don't enter into it.  Sizes are in megabytes.  All numbers are
approximate.

dviljk        .9       3.8                            
dvipsk        .9       3.2                            
xdvik         .7       2.5                            
web2c         1.3      5.0                            
web           1.9      6.5       -         -          
texk          3.8      14.1      43.1      23.5       
texmflib      3.8      15.0      -         15.0       
(totals)      7.6      29.1      43.1      38.5       

Kpathsea application distributions
----------------------------------

  The archive `ftp://ftp.tug.org/tex/texk.tar.gz' contains all of the
Kpathsea applications I maintain, and the library itself.  For example,
since NeXT does not generally support X11, you'd probably want to skip
`xdvik' (or simply remove it after unpacking `texk.tar.gz'.  If you are
not interested in all of them, you can also retrieve them separately:

`dviljk.tar.gz'
     DVI to PCL, for LaserJet printers.

`dvipsk.tar.gz'
     DVI to PostScript, for previewers, printers, or PDF generation.

`web2c.tar.gz'
     The software needed to compile TeX and friends.

`web.tar.gz'
     The original WEB source files, also used in compilation.

`xdvik.tar.gz'
     DVI previewing under the X window system.

  If you want to use the Babel LaTeX package for support of non-English
typesetting, you may need to retrieve additional files.  See the file
`install.txt' in the Babel distribution.

Changing search paths
---------------------

  If the search paths for your installation differ from the standard
TeX directory structure (*note Introduction: (tds)Top.), edit the file
`kpathsea/texmf.cnf.in' as desired, before running `configure'.  For
example, if you have all your fonts or macros in one big directory.

  You may also wish to edit the file `MakeTeXnames.cnf', either before
or after installation, to control various aspects of `MakeTeXPK' and
friends.  *Note MakeTeX configuration::.

  You do not need to edit `texmf.cnf.in' to change the default
top-level or other installation *directories* (only the paths).  You
can and should do that when you run `configure' (next step).

  You also do not need to edit `texmf.cnf.in' if you are willing to
rely on `texmf.cnf' at runtime to define the paths, and let the
compile-time default paths be incorrect.  Usually there is no harm in
doing this.

  The section below explains default generation in more detail.

Default path features
.....................

  The purpose of having all the different files described in the section
above is to avoid having the same information in more than one place. If
you change the installation directories or top-level prefix at
`configure'-time, those changes will propagate through the whole
sequence.  And if you change the default paths in `texmf.cnf.in', those
changes are propagated to the compile-time defaults.

  The Make definitions are all repeated in several Makefile's; but
changing the top-level `Makefile' should suffice, as it passes down all
the variable definitions, thus overriding the submakes.  (The
definitions are repeated so you can run Make in the subdirectories, if
you should have occasion to.)

  By default, the bitmap font paths end with `/$MAKETEX_MODE', thus
including the device name (usually a Metafont mode name such as
`ljfour').  This distinguishes two different devices with the same
resolution--a write/white from a write/black 300dpi printer, for
example.

  However, since most sites don't have this complication, Kpathsea
(specifically, the `kpse_init_prog' function in `kpathsea/proginit.c')
has a special case: if the mode has not been explicitly set by the user
(or in a configuration file), it sets `MAKETEX_MODE' to `/'.  This
makes the default PK path, for example, expand into `.../pk//', so
fonts will be found even if there is no subdirectory for the mode (if
you arranged things that way because your site has only one printer,
for example) or if the program is mode-independent (e.g., `pktype').

  To make the paths independent of the mode, simply edit `texmf.cnf.in'
before installation, or the installed `texmf.cnf', and remove the
`$MAKETEX_MODE'.

  *Note MakeTeX script arguments::, for how this interacts with
`MakeTeXPK'.

  *Note TeX directory structure: TeX directory structure, for a
description of the default arrangement of the input files that comprise
the TeX system.  The file `kpathsea/HIER' is a copy of that section.

Default path generation
.......................

  This section describes how the default paths are constructed.

  You may wish to ignore the whole mess and simply edit `texmf.cnf'
after it is installed, perhaps even copying it into place beforehand so
you can complete the installation, if it seems necessary.

  To summarize the chain of events that go into defining the default
paths:

  1. `configure' creates a `Makefile' from each `Makefile.in'.

  2. When Make runs in the `kpathsea' directory, it creates a file
     `texmf.sed' that substitutes the Make value of `$(var)' for a
     string `@var@'.  The variables in question are the one that define
     the installation directories.

  3. `texmf.sed' (together with a little extra magic--see
     `kpathsea/Makefile') is applied to `texmf.cnf.in' to generate
     `texmf.cnf'.  This is the file that will eventually be installed
     and used.

  4. The definitions in `texmf.cnf' are recast as C `#define''s in
     `paths.h'.  These values will be the compile-time defaults; they
     are not used at runtime unless no `texmf.cnf' file can be found.

     (That's a lie: the compile-time defaults are what any extra :'s in
     `texmf.cnf' expand into; but the paths as distributed have no extra
     :'s, and there's no particular reason for them to.)

Running `configure'
-------------------

  Run `sh configure OPTIONS' (in the top-level directory, the one
containing `kpathsea/'), possibly using a shell other than `sh' (*note
configure shells::.).

  `configure' adapts the source distribution to the present system via
`#define''s in `*/c-auto.h', which are created from the corresponding
`c-auto.h.in'.  It also creates a `Makefile' from the corresponding
`Makefile.in', doing `@VAR@' and `ac_include' substitutions).

  `configure' is the best place to control the configuration,
compilation, and installed location of the software, either via
command-line options, or by setting environment variables before
invoking it.  For example, you can disable `MakeTeXPK' by default with
the option `--disable-maketexpk'.  *Note configure options::.

`configure' shells
..................

  If you have Bash, the GNU shell, use it if `sh' runs into trouble
(*note Top: (features)Top.).

  Most Bourne shell variants other than Bash cannot handle `configure'
scripts as generated by GNU Autoconf (*note Introduction:
(autoconf)Top.).  Specifically:
`ksh'
     The Korn shell may be installed as `/bin/sh' on AIX.  `/bin/bsh'
     may serve instead.

`ash'
     Ash is sometimes installed as `/bin/sh' on NetBSD, FreeBSD, and
     Linux systems.  `/bin/bash' should be available.

`Ultrix /bin/sh'
     `/bin/sh' under Ultrix is a DEC-grown shell that is notably
     deficient in many ways.  `/bin/sh5' may be necessary.

`configure' options
...................

  For a complete list of all `configure' options, run `configure
--help' or *note Running `configure' scripts: (autoconf)Invoking
configure. (a copy is in the file `kpathsea/CONFIGURE').  The generic
options are listed first in the `--help' output, and the
package-specific options come last.  The environment variables
`configure' pays attention to are listed below.

  Options particularly likely to be useful are `--prefix', `--datadir',
and the like; *note configure scenarios::..

  This section gives pointers to descriptions of the `--with' and
`--enable' options to `configure' that Kpathsea-using programs accept.

`--without-maketexmf-default'
`--without-maketexpk-default'
`--without-maketextfm-default'
`--with-maketextex-default'
     Enable or disable the dynamic generation programs.  *Note MakeTeX
     configuration::.

`--enable-shared'
     Build Kpathsea as a shared library, and link against it.  Also
     build the usual static library.  *Note Shared library::.

`--disable-static'
     Build only the shared library.

`configure' environment
.......................

  `configure' uses the value of the following environment variables in
determining your system's characteristics, and substitutes for them in
Makefile's:

`CC'
     The compiler to use: default is `gcc' if it's installed, otherwise
     `cc'.

`CFLAGS'
     Options to give the compiler: default is `-g -O2' for `gcc', `-g'
     otherwise.  `CFLAGS' comes after any other options.  You may need
     to include `-w' here if your compilations commonly have useless
     warnings (e.g., `NULL redefined'), or `configure' may fail to
     detect the presence of header files (it takes the messages on
     standard error to mean the header file doesn't exist).

`CPPFLAGS'
     Options to pass to the compiler preprocessor; this matters most for
     configuration, not the actual source compilation.  The `configure'
     script often does only preprocessing (e.g., to check for the
     existence of #include files), and `CFLAGS' is not used for this.
     You may need to set this to something like
     `-I/usr/local/include/wwwhatever' if you have the libwww library
     installed for hyper-xdvik (see `xdvik/INSTALL').

`DEFS'
     Additional preprocessor options, but not used by `configure'.
     Provided for enabling or disabling program features, as documented
     in the various program-specific installation instructions.  `DEFS'
     comes before any compiler options included by the distribution
     `Makefile's or by `configure'.

`LDFLAGS'
     Additional options to give to the loader.  `LDFLAGS' comes before
     any other linker options.

`LIBS'
     Additional libraries to link with.

`configure' scenarios
.....................

  Here are some common installation scenarios:

   * Including X support in Metafont.  This is disabled by default,
     since many sites have no use for it, and it's a leading cause of
     configuration problems.
          configure --with-x-toolkit

   * Putting the binaries, TeX files, GNU info files, etc. into a single
     TeX hierarchy, say TEXMF, requires overriding defaults in both
     `configure' and `make':
          configure --prefix=TEXMF --datadir=TEXMF
          make texmf=TEXMF

   * You can compile on multiple architectures simultaneously either by
     building symbolic link trees with the `lndir' script from the X11
     distribution, or with the `--srcdir' option:
          configure --srcdir=SRCDIR

   * If you are installing binaries for multiple architectures into a
     single hierarchy, you will probably want to override the default
     `bin' and `lib' directories, something like this:
          configure --prefix=TEXMF --datadir=TEXMF \
            --bindir=TEXMF/ARCH/bin --libdir=TEXMF/ARCH/lib
          make texmf=TEXMF
      (Unless you make provisions for architecture-specific files in
     other ways, e.g., with Depot or an automounter.)

   * To compile with optimization (to compile without debugging, remove
     the `-g'):
          env CFLAGS="-g -O" sh configure ...
      For a potential problem if you optimize, see *Note TeX or
     Metafont failing: TeX or Metafont failing.

Shared library
..............

  You can compile Kpathsea as a shared library on a few systems, by
specifying the option `--enable-shared' when you run `configure'.

  The main advantage in doing this is that the executables can then
share the code, thus decreasing memory and disk space requirements.

  On some systems, you can record the location of shared libraries in a
binary, usually by giving certain options to the linker.  Then
individual users do not need to set their system's environment variable
(e.g., `LD_LIBRARY_PATH') to find shared libraries.  If you want to do
this, you will need to add the necessary options to `LDFLAGS' yourself;
for example, on Solaris, include something like `-R${prefix}/lib'.
(Unfortunately, making this happen by default is very difficult,
because of interactions with an existing installed shared library.)

  Currently, shared library support is implemented only on SunOS 4
(Solaris 1) and SunOS 5 (Solaris 2).  If you're interested and willing
in adding support for other systems, please see the `configure' mode in
the `klibtool' script, especially the host-specific case statement
around line 250.

Running `make'
--------------

  `make' (still in the top-level directory).  This also creates the
`texmf.cnf' and `paths.h' files that define the default search paths,
and (by default) the `plain' and `latex' TeX formats.

  You can override directory names and other values at `make'-time.
`make/paths.make' lists the variables most commonly reset.  For
example, `make default_texsizes=600' changes the list of fallback
resolutions.

  You can also override each of `configure''s environment variables
(*note configure environment::.).  The Make variables have the same
names.

  Finally, you can supply additional options via the following
variables.  (`configure' does not use these.)

`XCPPFLAGS'
`XDEFS'
     Preprocessor options.

`XCFLAGS'
     Compiler options.

`XLDFLAGS'
     Loader options (included at beginning of link commands).

`XLOADLIBES'
     More loader options (included at end of link commands).

`XMAKEARGS'
     Additional Make arguments passed to all sub-`make''s. You may need
     to include assignments to the other variables here via `XMAKEARGS';
     for example: `make XMAKEARGS="CFLAGS=-O XDEFS=-DA4"'.

  It's generally a bad idea to use a different compiler (`CC') or
libraries (`LIBS') for compilation than you did for configuration,
since the values `configure' determined may then be incorrect.

  Adding compiler options to change the "universe" you are using
(typically BSD vs. system V) is generally a cause of trouble.  It's
best to use the native environment, whatever that is; `configure' and
the software usually adapt best to that.  In particular, under Solaris
2.x, you should not use the BSD-compatibility library (`libucb') or
include files (`ucbinclude').

  If you want to use the Babel LaTeX package for support of non-English
typesetting, you need to modify some files before making the LaTeX
format.  See the file `install.txt' in the Babel distribution.

Installing files
----------------

  The basic command is the usual `make install'.  For security issues,
*note Security::..

  The first time you install any manual in the GNU Info system, you
should add a line (you choose where) to the file `dir' in your
`$(infodir)' directory.  Sample text for this is given near the top of
the Texinfo source files (`kpathsea/kpathsea.texi',
`dvipsk/dvips.texi', and `web2c/doc/web2c.texi').  If you have a recent
version of the GNU Texinfo distribution installed
(`ftp://prep.ai.mit.edu/pub/gnu/texinfo-3.9.tar.gz' or later), this
should happen automatically.

  On the offchance that this is your first Info installation, the `dir'
file I use is included in the distribution as `etc/dir-example'.

  You may wish to use one of the following targets, especially if you
are installing on multiple architectures:
   * `make install-exec' to install in architecture-dependent
     directories, i.e., ones that depend on the `$(exec_prefix)' Make
     variable.  This includes links to binaries, libraries, etc., not
     just "executables".

   * `make install-data' to install in architecture-independent
     directories, such as documentation, configuration files, pool
     files, etc.

  If you use the Andrew File System, the normal path (e.g., PREFIX/bin)
only gets you to a read-only copy of the files, and you must specify a
different path for installation.  The best way to do this is by setting
the `prefix' variable on the `make' command line.  The sequence becomes
something like this:
     configure --prefix=/whatever
     make
     make install prefix=/afs/.SYSTEM.NAME/system/1.3/@sys/whatever
   With AFS, you will definitely want to use relative filenames in
`ls-R' (*note Filename database::.), not absolute filenames.  This is
done by default, but check anyway.

Cleaning up
-----------

The basic command is `make distclean'.  This removes all files created
by the build.

  Alternatively,
   * `make mostlyclean' if you intend to compile on another
     architecture.  For Web2c, since the generated C files are portable,
     they are not removed.  If the `lex' vs. `flex' situation is going
     to be different on the next machine, `rm web2c/lex.yy.c'.

   * `make clean' to remove files created by compiling, but leave
     configuration files and Makefiles.

   * `make maintainer-clean' to remove everything that the Makefiles can
     rebuild.  This is more than `distclean' removes, and you should
     only use it if you are thoroughly conversant with (and have the
     necessary versions of) Autoconf.

   * `make extraclean' to remove other junk, e.g., core files, log
     files, patch rejects.  This is independent of the other `clean'
     targets.

Filename database generation
----------------------------

  You will probably want to set up a `cron' entry on the appropriate
machine(s) to rebuild the filename database nightly or so, as in:
     0 0 * * * cd TEXMF && /BINDIR/MakeTeXls-R
   *Note Filename database::.

Although the `MakeTeX...' scripts make every effort to add
newly-created files on the fly, it can't hurt to make sure you get a
fresh version every so often.

`MakeTeX' scripts
-----------------

  If Kpathsea cannot otherwise find a file, for some file types it is
configured by default to invoke an external program to create it
dynamically (*note MakeTeX configuration::.).  This is most useful for
fonts (bitmaps, TFM's, and arbitrarily-sizable Metafont sources such as
the Sauter and DC fonts), since any given document can use fonts never
before referenced.  Trying to build all fonts in advance is therefore
impractical, if not impossible.

  The script is passed the name of the file to create and possibly other
arguments, as explained below.  It must echo the full pathname of the
file it created (and nothing else) to standard output; it can write
diagnostics to standard error.

`MakeTeX' configuration
.......................

  The following file types can run an external program to create missing
files: `pk', `tfm', `mf', `tex'; the scripts are named `MakeTeXPK',
`MakeTeXTFM', `MakeTeXMF', and `MakeTeXTeX'.

  In the absence of `configure' options specifying otherwise,
everything but `MakeTeXTeX' will be enabled by default. The `configure'
options to change the defaults are:

     --without-maketexmf-default
     --without-maketexpk-default
     --without-maketextfm-default
     --with-maketextex-default

  The `configure' setting is overridden if the environment variable or
configuration file value named for the script is set; e.g., `MAKETEXPK'
(*note MakeTeX script arguments::.).

  As distributed, all the scripts source a file
`texmf/web2c/MakeTeX.site' if it exists, so you can override various
defaults.  See `MakeTeXcommon', for instance, which defines the default
mode, resolution, directory permissions, some special directory names,
etc.  If you prefer not to change the distributed scripts, you can
simply create `MakeTeX.site' with the appropriate definitions (you do
not need to create it if you have nothing to put in it).
`MakeTeX.site' has no special syntax; it's an arbitrary Bourne shell
script.  The distribution contains a sample `MakeTeX.site' for you to
copy and modify as you please (it is not installed anywhere).

  In addition, you can configure a number of features with the
`MT_FEATURES' variable, which you can define:
   * in `MakeTeX.site', as just mentioned;

   * by editing the file `MakeTeXnames.cnf', either before `make
     install' (in the source hierarchy) or after (in the installed
     hierarchy);

   * or in the environment.

  By default, `MakeTeXPK' installs fonts into the standard TeX
directory structure (*note TeX directory structure: TeX directory
structure.).  It uses aliases and directory names from the Fontname
distribution (*note Introduction: (fontname)Top.). Most of the options
here change that.

`appendonlydir'
     Tell `MakeTeXmkdir' to create directories append-only, i.e., set
     their sticky bit (*note Mode Structure: (fileutils)Mode
     Structure.).

`dosnames'
     Use 8.3 names; e.g., `dpi600/cmr10.pk' instead of `cmr10.600pk'.

`nomode'
     Omit the directory level for the mode name; this is fine as long as
     you generate fonts for only one mode.

`strip'
     Omit the font supplier and typeface name directory levels.

`varfonts'
     Put `MakeTeXPK'-generated fonts under the directory named by
     `VARTEXFONTS'; the default value in `kpathsea/texmf.cnf.in' is
     `/var/tex/fonts', as recommended by the `Linux File System
     Standard' (but unless `varfonts' is enabled, nothing cares about
     that value).

     The `varfonts' setting in `MT_FEATURES' is overridden by the
     `USE_VARTEXFONTS' environment variable: if set to `1', the feature
     is enabled, and if set to `0', the feature is disabled.

`MakeTeX' script names
......................

  The following table shows the default name of the script for each
possible file types.  (The source is the variable `kpse_make_specs' in
`kpathsea/tex-make.c'.)

`MakeTeXPK'
     Glyph fonts.

`MakeTeXTeX'
     TeX input files.

`MakeTeXMF'
     Metafont input files.

`MakeTeXTFM'
     TFM files.

These names are overridden by an environment variable specific to the
program--for example, `DVIPSMAKEPK' for Dvipsk.

  If a `MakeTeX...' script fails, the invocation is appended to a file
`missfont.log' (by default) in the current directory.  You can then
execute the log file to create the missing files after fixing the
problem.

  If the current directory is not writable and the environment variable
or configuration file value `TEXMFOUTPUT' is set, its value is used.
Otherwise, nothing is written.  The name `missfont.log' is overridden
by the `MISSFONT_LOG' environment variable or configuration file value.

`MakeTeX' script arguments
..........................

  The first argument to a `MakeTeX' script is always the name of the
file to be created.

  In the default `MakeTeXPK' implementation, from three to five
additional arguments may also passed, via environment variables:

  1. The resolution to make the font at (`KPATHSEA_DPI').

  2. The "base dpi" the program is operating at (`MAKETEX_BASE_DPI'),
     i.e., the assumed resolution of the output device.

  3. A "magstep" string suitable for the Metafont `mag' variable
     (`MAKETEX_MAG').

  4. Optionally, a Metafont mode name to assign to the Metafont `mode'
     variable (`MAKETEX_MODE').  Otherwise, (the default) `MakeTeXPK'
     guesses the mode from the resolution.  *Note TeX directory
     structure: TeX directory structure.

  5. Optionally, a directory name. If the directory is absolute, it is
     used as-is. Otherwise, it is appended to the root destination
     directory set in the script (from environment variables `DESTDIR'
     or `MTP_DESTDIR' or a compile-time default). If this argument is
     not supplied, the mode name is appended to the root destination
     directory.

Kpathsea sets `KPATHSEA_DPI' appropriately for each attempt at building
a font.  It's up to the program using Kpathsea to set the others.
(*Note Calling sequence::.)

  You can change the specification for the arguments passed to the
external script by setting the environment variable named as the script
name, but all capitals--`MAKETEXPK', for example.  If you've changed
the script name by setting (say) `DVIPSMAKEPK' to `foo', then the spec
is taken from the environment variable `FOO'.

  The spec can contain any variable references, to the above variables
or any others.  As an example, the default spec for `MakeTeXPK' is:
     $KPATHSEA_DPI $MAKETEX_BASE_DPI $MAKETEX_MAG $MAKETEX_MODE

The convention of passing the name of the file to be created as the
first argument cannot be changed.

Installation testing
--------------------

  Besides the tests listed in *Note Simple installation::, you can try
running `make check'.  This includes the torture tests (trip, trap, and
mptrap) that come with Web2c (*note Torture tests: (web2c)Torture
tests.).

Security
========

  None of the programs in the TeX system require any special system
privileges, so there's no first-level security concern of people gaining
illegitimate root access.

  A TeX document, however, can write to arbitrary files, e.g.,
`~/.rhosts', and thus an unwitting user who runs TeX on a random
document is vulnerable to a trojan horse attack.  This loophole is
closed by default, but you can be permissive if you so desire in
`texmf.cnf'.  *Note tex invocation: (web2c)tex invocation.  MetaPost has
the same issue.

  Dvips, Xdvi, and TeX can also execute shell commands under some
circumstances.  To disable this, see the `-R' option in *Note Option
details: (dvips)Option details, the xdvi man page, and *Note tex
invocation: (web2c)tex invocation, respectively.

  Another security issue arises because it's very useful--almost
necessary--to make arbitrary fonts on user demand with `MakeTeXPK' and
friends.  Where do these files get installed?  By default, the
`MakeTeXPK' distributed with Kpathsea assumes a globally writable
`texmf' tree; this is the simplest and most convenient approach, but it
may not suit your situation.

  The first restriction you can apply is to make newly-created
directories under `texmf' be append-only with an option in
`MakeTeXnames.cnf'.  *Note MakeTeX configuration::.

  Another approach is to establish a group (or user) for TeX files,
make the `texmf' tree writable only to that group (or user), and make
`MakeTeXPK' et al. setgid to that group (or setuid to that user).  Then
users must invoke the scripts to install things.  (If you're worried
about the inevitable security holes in scripts, then you could write a
C wrapper to exec the script.)

  Finally, using a central writable `texmf' tree may be completely
impossible, because it's on an NFS filesystem that you cannot export
read/write, or AFS is in use, or simply because "it's policy".  Then
you must resort to each user's machine having its own local directory of
dynamically-created fonts; again, `MakeTeXnames.cnf' has an option to
do this, and again, *note MakeTeX configuration::..