Skip to content

Support ARM64 Linux and new TinyTeX naming scheme#14181

Open
cderv wants to merge 5 commits intomainfrom
fix/issue-12124
Open

Support ARM64 Linux and new TinyTeX naming scheme#14181
cderv wants to merge 5 commits intomainfrom
fix/issue-12124

Conversation

@cderv
Copy link
Collaborator

@cderv cderv commented Mar 9, 2026

quarto install tinytex fails on ARM64 Linux because needsSourceInstall() blocks non-x86_64 platforms and tinyTexPkgName() only generates old-style filenames. TinyTeX has since added ARM64 Linux prebuilt binaries and adopted a new platform-aware naming scheme for all platforms:

The TinyTeX install shell scripts were updated (rstudio/tinytex#486) to handle this transition with version-gated logic: if version > v2026.03.02, use new names; otherwise use old names. However, quarto install tinytex always fetches the latest monthly release via the GitHub API (/releases/latest) — there is no pinned version to compare against. So instead, tinyTexPkgName() now generates candidate filenames for both new and old naming schemes (new preferred, old as fallback) and picks the first match from the release assets. This handles the transition seamlessly regardless of which naming convention a given release uses.

Changes

  • Remove the needsSourceInstall() prereq gate that blocked ARM64 Linux
  • Update tinyTexPkgName() to generate candidate filenames for both naming schemes, with platform and architecture awareness (new naming: TinyTeX-linux-arm64-v2026.04.tar.xz, old: TinyTeX-arm64-v2026.03.02.tar.gz)
  • Update tinyTexUrl() to iterate candidates and match first available asset
  • Change tar xfz to tar xf in unzip() for automatic compression detection (.tar.gz, .tgz, .tar.xz)
  • Add .exe self-extracting archive support in unzip() for the new Windows naming
  • Add unit tests for package name generation covering all platform/arch combinations
  • Add asset-existence tests that verify candidate names match actual TinyTeX release assets

Fixes #12124

cderv added 4 commits March 9, 2026 17:28
Change `tar xfz` to `tar xf` for automatic compression detection,
handling .tar.gz, .tgz, and .tar.xz files. Add .exe branch for
self-extracting 7z archives used by TinyTeX's new Windows naming.
Pure logic tests for all platform/arch combos via options parameter.
Asset-existence tests verify candidates match actual release assets,
catching naming drift in CI.
Remove the needsSourceInstall() prereq gate that blocks ARM64 Linux.
Update tinyTexPkgName() to generate candidate filenames for both new
(TinyTeX-{os}[-{arch}]-{ver}.{ext}) and old naming schemes, with new
preferred and old as fallback. Update tinyTexUrl() to pick the first
matching asset from release. Handles the transition seamlessly as
releases adopt new naming.

Fixes #12124
@posit-snyk-bot
Copy link
Collaborator

posit-snyk-bot commented Mar 9, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@cderv
Copy link
Collaborator Author

cderv commented Mar 9, 2026

I would like to merge this for 1.9 - ok with this @cscheid ?

This PR adds support for both the old and new schemes. CI passes to it means TinyTeX can still be installed. And when next monthly release we install will have the new names, we'll support it without patch.

Copy link
Contributor

@yihui yihui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder what are the differences between the installation method in src/tools/impl/tinytex.ts and the scripts install-bin-windows.bat/install-bin-unix.sh in https://github.com/rstudio/tinytex/tree/main/tools. If the main purpose of the typescript re-implementation was to allow a custom installation directory, this is already supported in the installation scripts via the TINYTEX_DIR env var.

Ideally I think we should just download the installation scripts and run them (with desired env vars set), otherwise we are making strong assumptions about the installers that are too specific (e.g., the URLs, compression formats, etc). They don't change often (no changes in the past 6 years), but there's no guarantee. That said, backward compatibility will definitely be provided, and older filenames won't disappear overnight.

BTW, TinyTeX has also started supporting binaries for musl/Alpine Linux (currently daily build only). I'm not sure if it's worth adding the support here.

Only attempt self-extracting .exe on Windows in unzip().
Include candidate filenames in TinyTeX download error for easier
debugging when naming drift occurs.
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.

quarto install tinytex does not seem to work on Linux ARM and errors badly

3 participants