Skip to content

Commit d45353f

Browse files
authored
Merge pull request #904 from rstudio/fix-connect-tinytex-permissions
Fix permissions errors when calling TinyTeX packages from `pandoc`
2 parents 68568f1 + 0551e7f commit d45353f

File tree

3 files changed

+48
-3
lines changed

3 files changed

+48
-3
lines changed

connect/Dockerfile.ubuntu2204

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ ARG QUARTO_VERSION=1.4.557
1212
ARG SCRIPTS_DIR=/opt/positscripts
1313

1414
### Install Quarto ###
15-
RUN QUARTO_VERSION=${QUARTO_VERSION} ${SCRIPTS_DIR}/install_quarto.sh --install-tinytex --add-path-tinytex \
15+
# TODO: Remove `HOME="/opt"` once Quarto supports custom install locations for TinyTeX, see quarto-dev/quarto-cli#11800.
16+
RUN HOME="/opt" QUARTO_VERSION=${QUARTO_VERSION} ${SCRIPTS_DIR}/install_quarto.sh --install-tinytex --add-path-tinytex \
1617
&& ln -s /opt/quarto/${QUARTO_VERSION}/bin/quarto /usr/local/bin/quarto
1718

1819
SHELL [ "/bin/bash", "-o", "pipefail", "-c"]
@@ -45,7 +46,6 @@ RUN apt-get update --fix-missing \
4546
&& apt-get clean \
4647
&& rm -rf /var/lib/apt/lists/*
4748

48-
4949
### Configure Connect ###
5050
EXPOSE 3939/tcp
5151
ENV RSC_LICENSE ""

connect/NEWS.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# 2025-03-10
2+
3+
- Quarto TinyTeX installation path has been updated from `/root/.TinyTeX` to `/opt/.TinyTeX` to fix potential permission
4+
issues when called from a non-root user. As a result, Quarto will no longer recognize TinyTeX as a managed
5+
installation. This change is not expected to affect the existing functionality of Quarto or TinyTeX for end users.
6+
TinyTeX's relevant packages will still be linked to `/usr/local/bin` as before.
7+
18
# 2024-05-30
29

310
- BREAKING:

connect/test/goss.yaml

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ package:
1414
installed: true
1515
cracklib-runtime:
1616
installed: true
17+
# Necessary for `tlmgr` to work properly
18+
perl:
19+
installed: true
1720

1821
port:
1922
tcp6:3939:
@@ -49,6 +52,38 @@ file:
4952
/usr/local/bin/quarto:
5053
exists: true
5154
filetype: symlink
55+
/opt/.TinyTeX:
56+
exists: true
57+
filetype: directory
58+
mode: "0755"
59+
/opt/.TinyTeX/bin/x86_64-linux/tlmgr:
60+
exists: true
61+
filetype: symlink
62+
mode: "0777"
63+
linked-to: ../../texmf-dist/scripts/texlive/tlmgr.pl
64+
/opt/.TinyTeX/bin/x86_64-linux/tex:
65+
exists: true
66+
filetype: file
67+
mode: "0755"
68+
/opt/.TinyTeX/bin/x86_64-linux/pdflatex:
69+
exists: true
70+
filetype: symlink
71+
linked-to: pdftex
72+
mode: "0777"
73+
/opt/.TinyTeX/bin/x86_64-linux/pdftex:
74+
exists: true
75+
filetype: file
76+
mode: "0755"
77+
/usr/local/bin/tex:
78+
exists: true
79+
filetype: symlink
80+
linked-to: /opt/.TinyTeX/bin/x86_64-linux/tex
81+
mode: "0777"
82+
/usr/local/bin/pdflatex:
83+
exists: true
84+
filetype: symlink
85+
linked-to: /opt/.TinyTeX/bin/x86_64-linux/pdflatex
86+
mode: "0777"
5287
/tmp/startup.log:
5388
exists: true
5489
contents:
@@ -115,9 +150,12 @@ command:
115150
title: quarto_check
116151
exit-status: 0
117152

153+
118154
# Ensure TinyTeX is installed
119155
"quarto list tools":
120156
title: quarto_tinytex_installed
121157
exit-status: 0
122158
stderr:
123-
- "/tinytex\\s+Up to date\\s+v\\d{4}\\.\\d{2}(\\.\\d{2})?\\s+v\\d{4}\\.\\d{2}(\\.\\d{2})?/"
159+
- "/tinytex\\s+External Installation/"
160+
# TODO: Reenable this once Quarto supports custom install locations for TinyTeX, see quarto-dev/quarto-cli#11800.
161+
# - "/tinytex\\s+Up to date\\s+v\\d{4}\\.\\d{2}(\\.\\d{2})?\\s+v\\d{4}\\.\\d{2}(\\.\\d{2})?/"

0 commit comments

Comments
 (0)