Package: tex-common Version: 6.17 Severity: normal X-Debbugs-Cc: stu...@debian.org
Dear Maintainer, The postinst for tex-common is sensitive to the locale settings from the environment and so can fail in strange ways. Users can end up with odd locale settings in a chroot (as I did, where my login environment had leaked into the chroot but the specified locale was not installed), when connecting over ssh (the remote system's locale settings are applied to the remote session), or through simple misconfiguration. While the particularly odd locale seettings that I had in the chroot were my fault, the postinst should be robust to such failures. ----- 8< ----- Setting up tex-common (6.17) ... debconf: falling back to frontend: Readline Running mktexlsr. This may take some time... done. Running updmap-sys. This may take some time... done. Running mktexlsr /var/lib/texmf ... done. Building format(s) --all. This may take some time... fmtutil failed. Output has been stored in /tmp/fmtutil.YvPIYmjZ Please include this file if you report a bug. dpkg: error processing package tex-common (--configure): installed tex-common package post-installation script subprocess returned error exit status 1 ----- 8< ----- The log file mentioned ends with the following lines: ----- 8< ----- fmtutil [ERROR]: running `luahbtex -ini -jobname=luahbtex -progname=luahbtex luatex.ini </dev/null' return status: 1 fmtutil [ERROR]: returning error due to option --strict fmtutil [ERROR]: running `luatex -ini -jobname=luatex -progname=luatex luatex.ini </dev/null' return status: 1 fmtutil [ERROR]: returning error due to option --strict fmtutil [ERROR]: running `luatex -ini -jobname=dvilualatex-dev -progname=dvilualatex-dev dvilualatex.ini </dev/null' return status: 1 fmtutil [ERROR]: returning error due to option --strict fmtutil [ERROR]: running `luatex -ini -jobname=dviluatex -progname=dviluatex dviluatex.ini </dev/null' return status: 1 fmtutil [ERROR]: returning error due to option --strict fmtutil [ERROR]: running `luatex -ini -jobname=dvilualatex -progname=dvilualatex dvilualatex.ini </dev/null' return status: 1 fmtutil [ERROR]: returning error due to option --strict fmtutil [ERROR]: running `luahbtex -ini -jobname=lualatex-dev -progname=lualatex-dev lualatex.ini </dev/null' return status: 1 fmtutil [ERROR]: returning error due to option --strict fmtutil [ERROR]: running `luahbtex -ini -jobname=lualatex -progname=lualatex lualatex.ini </dev/null' return status: 1 fmtutil [ERROR]: returning error due to option --strict ----- 8< ----- Running the offending command on its own gave: ----- 8< ----- $ luahbtex -ini -jobname=luahbtex -progname=luahbtex luatex.ini </dev/null Unable to read environment locale: exit now. ----- 8< ----- Feeding in some environment variables to see if I could convince it to behave: ----- 8< ----- $ LANG=C LANGUAGE=C LC_CTYPE=C LC_NUMERIC=C LC_TIME=C LC_COLLATE=C LC_MONETARY=C LC_MESSAGES=C LC_PAPER=C LC_NAME=C LC_ADDRESS=C luahbtex -ini -jobname=luahbtex -progname=luahbtex luatex.ini </dev/null bash: warning: setlocale: LC_COLLATE: cannot change locale (en_AU.UTF-8) bash: warning: setlocale: LC_CTYPE: cannot change locale (en_AU.UTF-8) bash: warning: setlocale: LC_MESSAGES: cannot change locale (en_AU.UTF-8) bash: warning: setlocale: LC_NUMERIC: cannot change locale (en_AU.UTF-8) bash: warning: setlocale: LC_TIME: cannot change locale (en_GB.UTF-8) This is LuaHBTeX, Version 1.15.0 (TeX Live 2022/Debian) (INITEX) restricted system commands enabled. (/usr/share/texlive/texmf-dist/tex/generic/tex-ini-files/luatex.ini [... snip lots of output before exiting successfully ...] ----- 8< ----- (I can't explain why it's still looking for en_AU there when I have asked for the C locale, but at least it exited cleanly) Installing the 'locales' package and correctly configuring it to the locales that were in the environment was also enough. >From a Debian perspective, tex-common depending on the locales package is not a nice thing to do; it's also not sufficient to solve this bug, since installing the locales package is not the same as configuring the particular locale required. Adding some locale overrides to the postinst would be better, but it might mean that users do not get error messages displayed to them in their preferred language. regards Stuart