[MacPorts] #64020: TeX ignores openout_any configuration option

MacPorts noreply at macports.org
Sun Nov 21 03:20:25 UTC 2021


#64020: TeX ignores openout_any configuration option
--------------------------+---------------------------
 Reporter:  joel-coffman  |      Owner:  (none)
     Type:  defect        |     Status:  new
 Priority:  Normal        |  Milestone:
Component:  ports         |    Version:
 Keywords:                |       Port:  texlive-basic
--------------------------+---------------------------
 Possibly an application error or overlooked configuration setting
 somewhere, but TeX Live 2021 installed by MacPorts appears to ignore the
 `openout_any` configuration option in `texmf.cnf`.

 Consider the following minimum working example (`mwe.tex`):
 {{{
 #!tex
 \newwrite\handle
 \immediate\openout\handle=.test.abc
 \immediate\write\handle{Hello World!}
 \immediate\closeout\handle
 \bye
 }}}
 With pdfTeX installed by MacPorts, the `openout_any` configuration option
 in `/opt/local/etc/texmf/texmf.cnf` is set as follows:
 {{{
 % Do we allow TeX \input or \openin (openin_any), or \openout
 % (openout_any) on filenames starting with `.' (e.g., .rhosts) or
 % outside the current tree (e.g., /etc/passwd)?
 % a (any)        : any file can be opened.
 % r (restricted) : disallow opening dot files
 % p (paranoid)   : as `r' and disallow going to parent directories, and
 %                  restrict absolute paths to be under $TEXMFOUTPUT.
 openin_any = a
 openout_any = p
 }}}
 and `kpsewhich` confirms this value:
 {{{
 $ kpsewhich --all --var-value=openout_any
 p
 }}}
 but writing to a hidden (i.e., dot) file succeeds:
 {{{
 $ pdftex mwe.tex
 This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021/MacPorts
 2021.58693_0) (preloaded format=pdftex)
  restricted \write18 enabled.
 entering extended mode
 (./mwe.tex )
 No pages of output.
 Transcript written on mwe.log.
 }}}
 and
 {{{
 $ cat .test.abc
 Hello World!
 }}}

 Maybe the issue is that the `texmf.cnf` configuration is being overridden?
 No, because providing the configuration value as an environment variable
 (i.e., `openout_any=p pdftex mwe.tex`) still executes without error.

 In contrast, Debian 11 (bullseye) reports an error:
 {{{
 # pdftex test.tex
 This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020/Debian)
 (preloaded format=pdftex)
  restricted \write18 enabled.
 entering extended mode
 (./test.tex
 pdftex: Not writing to .test.abc (openout_any = p).

 ! I can't write on file `.test.abc'.
 l.2 \immediate\openout\handle=.test.abc

 (Press Enter to retry, or Control-D to exit; default file extension is
 `.tex')
 Please type another output file name:
 ! Emergency stop.
 l.2 \immediate\openout\handle=.test.abc

 !  ==> Fatal error occurred, no output PDF file produced!
 Transcript written on test.log.
 }}}
 but providing the configuration value as an environment variable (i.e.,
 `openout_any=a pdftex mwe.tex`) executes without error. Debian testing
 (bookworm), which uses TeX Live 2022, has the same behavior as Debian 11
 (bullseye).

 Thus, it appears that the MacPorts installation of TeX Live ignores the
 `openout_any` configuration option.

-- 
Ticket URL: <https://trac.macports.org/ticket/64020>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list