Support ARM64 Linux and new TinyTeX naming scheme#14181
Conversation
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
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
|
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. |
yihui
left a comment
There was a problem hiding this comment.
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.
quarto install tinytexfails on ARM64 Linux becauseneedsSourceInstall()blocks non-x86_64 platforms andtinyTexPkgName()only generates old-style filenames. TinyTeX has since added ARM64 Linux prebuilt binaries and adopted a new platform-aware naming scheme for all platforms:TinyTeX-{os}[-{arch}]-{ver}.{ext}naming with.tar.xzcompressionThe 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 tinytexalways 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
needsSourceInstall()prereq gate that blocked ARM64 LinuxtinyTexPkgName()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)tinyTexUrl()to iterate candidates and match first available assettar xfztotar xfinunzip()for automatic compression detection (.tar.gz,.tgz,.tar.xz).exeself-extracting archive support inunzip()for the new Windows namingFixes #12124