Skip to content

Set per-user TEXMFVAR for shared TinyTeX installs - #862

Open
bschwedler wants to merge 1 commit into
mainfrom
fix/tinytex-user-texmfvar
Open

bschwedler wants to merge 1 commit into
mainfrom
fix/tinytex-user-texmfvar

Conversation

@bschwedler

Copy link
Copy Markdown
Contributor

Refs #855

When install_tinytex_command is called with home_path, TinyTeX is a shared, root-owned install. Its bundled texmf.cnf sets TEXMFVAR = $TEXMFSYSVAR, so non-root users can't write the LuaLaTeX font cache and Quarto's default PDF engine fails with no writeable cache path. The macro now runs tlmgr conf texmf TEXMFVAR '~/.texlive/texmf-var' after the install; kpathsea expands the literal ~ from each user's HOME at runtime.

  • Only applies when home_path is set. Default calls are unchanged.
  • TEXMFCONFIG stays shared. It had no effect on rendering.
  • Setting only TEXMFCACHE does not fix it (openout_any = p).
  • The quoted ~ adds one hadolint SC2088 warning per Containerfile, which is below Bakery's default error threshold.

Verified on a local connect 2026.10.0 Ubuntu 24.04 amd64 build: as UID 999 with a fresh HOME, lualatex and quarto render with format: pdf fail before and succeed after; pdflatex works in both cases.

Product images pick this up when re-rendered. The non-root render goss tests from the issue will follow in images-connect and images-workbench.

When TinyTeX is installed to a shared, root-owned location via
home_path, its bundled texmf.cnf points TEXMFVAR at the shared
TEXMFSYSVAR. Non-root users cannot write the LuaLaTeX font cache
there, so Quarto's default PDF engine fails with "no writeable cache
path". Point TEXMFVAR at ~/.texlive/texmf-var, which kpathsea expands
from each user's HOME at runtime.

- Only applies when home_path is set; default calls are unchanged
- TEXMFCONFIG is left shared; it does not affect rendering
- The quoted tilde triggers a hadolint SC2088 warning, which is below
  the default failure threshold

Refs #855
@bschwedler
bschwedler marked this pull request as ready for review October 26, 2026 19:26
@github-actions

Copy link
Copy Markdown

Test Results

2 475 tests  ±0   2 475 ✅ ±0   7m 11s ⏱️ - 1m 38s
    1 suites ±0       0 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit c656986. ± Comparison against base commit 012b5ba.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant