diff options
author | Karl Berry <karl@freefriends.org> | 2019-08-13 22:43:09 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-08-13 22:43:09 +0000 |
commit | 0104a8417f2ddda2d30bbfa2b7fa33e75405676a (patch) | |
tree | 6a068385addff93e0ebf338b23f76be88b64db43 /Build/source/texk/kpathsea/doc | |
parent | 43853632d39f7c6ddc69d0d5adbb2d336e450c4a (diff) |
warn about unusual characters in program name qualifiers
git-svn-id: svn://tug.org/texlive/trunk@51875 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/kpathsea/doc')
-rw-r--r-- | Build/source/texk/kpathsea/doc/kpathsea.info | 127 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/doc/kpathsea.texi | 24 |
2 files changed, 87 insertions, 64 deletions
diff --git a/Build/source/texk/kpathsea/doc/kpathsea.info b/Build/source/texk/kpathsea/doc/kpathsea.info index 19aca80756b..959873b6e8c 100644 --- a/Build/source/texk/kpathsea/doc/kpathsea.info +++ b/Build/source/texk/kpathsea/doc/kpathsea.info @@ -522,8 +522,8 @@ mentions most features. The format of 'texmf.cnf' files follows: * Comments start with '%', either at the beginning of a line or preceded by whitespace, and continue to the end of the line. That - is, as with most shells, a '%' in the "middle" of a value does not - start a comment. Examples: + is, similar to most shells, a '%' in the "middle" of a value does + not start a comment. Examples: % this is a comment var = a%b % but the value of var will be "a%b". @@ -543,11 +543,12 @@ mentions most features. The format of 'texmf.cnf' files follows: * The VARIABLE name may contain any character other than whitespace, '=', or '.', but sticking to 'A-Za-z_' is safest. - * If '.PROGNAME' is present, the definition only applies if the - program that is running is named (i.e., the last component of - 'argv[0]' is) PROGNAME or 'PROGNAME.{exe,bat,cmd,...}'. Most - notably, this allows different flavors of TeX to have different - search paths. + * If '.PROGNAME' is present (preceding spaces are ignored), the + definition only applies if the program that is running is named + (i.e., the last component of 'argv[0]' is) PROGNAME or + 'PROGNAME.{exe,bat,cmd,...}'. Most notably, this allows different + flavors of TeX to have different search paths. The PROGNAME value + is used literally, without variable or other expansions. * VALUE may contain any characters except '%' and '@'. (These restrictions are only necessary because of the processing done on @@ -579,6 +580,16 @@ However, there seemed little advantage in this, since all the information would have to passed back to Kpathsea and parsed there anyway, since the 'sh' process couldn't affect its parent's environment. + The combination of spaces being ignored before the '.' of a program +name qualifer and the optional '=' for the assignment has an unexpected +consequence: if the value begins with a literal '.' and the '=' is +omitted, the intended value is interpreted as a program name. For +example, a line 'var .;/some/path' is taken as an empty value for 'var' +running under the program named ';/some/path'. To diagnose this, +Kpathsea warns if the program name contains a path separator or other +special character. The simplest way to avoid the problem is to use the +'='. + The implementation of all this is in 'kpathsea/cnf.c'. @@ -3256,7 +3267,7 @@ Index (line 46) * cmr10, as fallback font: Fallback font. (line 15) * cmr10.vf: Searching overview. (line 31) -* cnf.c: Config files. (line 86) +* cnf.c: Config files. (line 97) * cnf.h: Programming with config files. (line 27) * comments, in fontmap files: Fontmap. (line 27) @@ -3285,7 +3296,7 @@ Index * config.status: Bug checklist. (line 27) * configuration bugs: Bug checklist. (line 27) * configuration file, source for path: Path sources. (line 20) -* configuration files as shell scripts.: Config files. (line 79) +* configuration files as shell scripts.: Config files. (line 80) * configuration of mktex scripts: mktex configuration. (line 6) * configure options for mktex scripts: mktex configuration. (line 12) * context diff: Bug checklist. (line 52) @@ -3676,7 +3687,7 @@ Index (line 49) * resolutions, last-resort: Fallback font. (line 6) * retrieving TeX: unixtex.ftp. (line 6) -* right-hand side of variable assignments: Config files. (line 56) +* right-hand side of variable assignments: Config files. (line 57) * RISINPUTS: Supported file formats. (line 173) * Rokicki, Tom: History. (line 12) @@ -3700,7 +3711,7 @@ Index * setgid scripts: Security. (line 40) * SFDFONTS: Supported file formats. (line 177) -* shell scripts as configuration files: Config files. (line 79) +* shell scripts as configuration files: Config files. (line 80) * shell variables: Variable expansion. (line 17) * shell_escape, example for code: Programming with config files. (line 10) @@ -3929,52 +3940,52 @@ Node: Path searching16905 Node: Searching overview17632 Node: Path sources21451 Node: Config files22677 -Node: Path expansion26604 -Node: Default expansion27557 -Node: Variable expansion29627 -Node: Tilde expansion31028 -Node: Brace expansion32008 -Node: KPSE_DOT expansion32947 -Node: Subdirectory expansion33460 -Node: Casefolding search35814 -Node: Casefolding rationale36583 -Node: Casefolding examples37922 -Node: Filename database42972 -Node: ls-R44030 -Node: Filename aliases47706 -Node: Database format48884 -Node: Invoking kpsewhich49897 -Node: Path searching options50852 -Node: Specially-recognized files60450 -Node: Auxiliary tasks61805 -Node: Standard options65530 -Node: TeX support65886 -Node: Supported file formats67240 -Node: File lookup74905 -Node: Glyph lookup76654 -Node: Basic glyph lookup77778 -Node: Fontmap78658 -Node: Fallback font81187 -Node: Suppressing warnings82099 -Node: mktex scripts83226 -Node: mktex configuration84441 -Node: mktex script names90244 -Node: mktex script arguments91630 -Node: Programming92509 -Node: Programming overview93082 -Node: Calling sequence95943 -Node: Program-specific files102475 -Node: Programming with config files103498 -Node: Reporting bugs105085 -Node: Bug checklist105763 -Node: Mailing lists109235 -Node: Debugging109910 -Node: Logging114987 -Node: Common problems116854 -Node: Unable to find files117331 -Node: Slow path searching119741 -Node: Unable to generate fonts121116 -Node: TeX or Metafont failing123587 -Node: Index124789 +Node: Path expansion27283 +Node: Default expansion28236 +Node: Variable expansion30306 +Node: Tilde expansion31707 +Node: Brace expansion32687 +Node: KPSE_DOT expansion33626 +Node: Subdirectory expansion34139 +Node: Casefolding search36493 +Node: Casefolding rationale37262 +Node: Casefolding examples38601 +Node: Filename database43651 +Node: ls-R44709 +Node: Filename aliases48385 +Node: Database format49563 +Node: Invoking kpsewhich50576 +Node: Path searching options51531 +Node: Specially-recognized files61129 +Node: Auxiliary tasks62484 +Node: Standard options66209 +Node: TeX support66565 +Node: Supported file formats67919 +Node: File lookup75584 +Node: Glyph lookup77333 +Node: Basic glyph lookup78457 +Node: Fontmap79337 +Node: Fallback font81866 +Node: Suppressing warnings82778 +Node: mktex scripts83905 +Node: mktex configuration85120 +Node: mktex script names90923 +Node: mktex script arguments92309 +Node: Programming93188 +Node: Programming overview93761 +Node: Calling sequence96622 +Node: Program-specific files103154 +Node: Programming with config files104177 +Node: Reporting bugs105764 +Node: Bug checklist106442 +Node: Mailing lists109914 +Node: Debugging110589 +Node: Logging115666 +Node: Common problems117533 +Node: Unable to find files118010 +Node: Slow path searching120420 +Node: Unable to generate fonts121795 +Node: TeX or Metafont failing124266 +Node: Index125468 End Tag Table diff --git a/Build/source/texk/kpathsea/doc/kpathsea.texi b/Build/source/texk/kpathsea/doc/kpathsea.texi index ff8fdbe8725..db619f50129 100644 --- a/Build/source/texk/kpathsea/doc/kpathsea.texi +++ b/Build/source/texk/kpathsea/doc/kpathsea.texi @@ -647,7 +647,7 @@ mentions most features. The format of @file{texmf.cnf} files follows: @cindex comments, in @file{texmf.cnf} Comments start with @samp{%}, either at the beginning of a line or preceded by whitespace, and continue to the end of the line. That is, -as with most shells, a @samp{%} in the ``middle'' of a value does not +similar to most shells, a @samp{%} in the ``middle'' of a value does not start a comment. Examples: @example @@ -681,11 +681,13 @@ lines is not ignored. The @var{variable} name may contain any character other than whitespace, @samp{=}, or @samp{.}, but sticking to @samp{A-Za-z_} is safest. -@item If @samp{.@var{progname}} is present, the definition only -applies if the program that is running is named (i.e., the last -component of @code{argv[0]} is) @var{progname} or -@file{@var{progname}.@{exe,bat,cmd,...@}}. Most notably, this allows -different flavors of @TeX{} to have different search paths. +@item If @samp{.@var{progname}} is present (preceding spaces are +ignored), the definition only applies if the program that is running +is named (i.e., the last component of @code{argv[0]} is) +@var{progname} or @file{@var{progname}.@{exe,bat,cmd,...@}}. Most +notably, this allows different flavors of @TeX{} to have different +search paths. The @var{progname} value is used literally, without +variable or other expansions. @item @cindex right-hand side of variable assignments @@ -727,6 +729,16 @@ advantage in this, since all the information would have to passed back to Kpathsea and parsed there anyway, since the @code{sh} process couldn't affect its parent's environment. +The combination of spaces being ignored before the @code{.} of a +program name qualifer and the optional @samp{=} for the assignment has +an unexpected consequence: if the value begins with a literal @samp{.} +and the @samp{=} is omitted, the intended value is interpreted as a +program name. For example, a line @code{var .;/some/path} is taken as +an empty value for @code{var} running under the program named +@samp{;/some/path}. To diagnose this, Kpathsea warns if the program +name contains a path separator or other special character. The +simplest way to avoid the problem is to use the @code{=}. + @flindex cnf.c The implementation of all this is in @file{kpathsea/cnf.c}. |