Version-stable CTAN repo for the TinyTeX install #171
Version-stable CTAN repo for the TinyTeX install #171
Conversation
* Fixes rocker-org#169. * TeXLive release bound to the base Debian image. * CTAN repo exposed as build argument. * Backported down to verse:3.4.3. * Use http for TeXLive 2016: install-tl did not support https repositories. * Work around known non-breaking errors of `tlmgr path add` in TeXLive 2016 (https://tex.stackexchange.com/a/314079).
All images built locally via docker build --pull -t rocker/verse:3.6.1-texlive-stable .
for tag in 3.4.3 3.4.4 3.5.0 3.5.1 3.5.2 3.5.3 3.6.0 devel; \
do \
docker build --pull -t rocker/verse:$tag-texlive-stable $tag; \
done Summary of the setup for the various images collected via for tag in 3.4.3 3.4.4 3.5.0 3.5.1 3.5.2 3.5.3 3.6.0 3.6.1 devel; \
do \
echo rocker/verse:$tag; \
docker run --rm rocker/verse:$tag-texlive-stable sh -c ' \
cat /etc/os-release | grep PRETTY_NAME \
&& echo repo: $CTAN_REPO \
&& tex --version | head -n 1 \
'; \
done
|
Tested by producing the PDF report of the SmaRP Shiny app launched from RStudio in e.g. |
Looks great, 👏 Many thanks for this! |
Just a note: unfortunately, falling back to the 2016 version also introduces a bug in permissions handling that we had reported to TeXLive team and had patched, see #104 and rstudio/tinytex#77 (comment) . I believe this is what is now biting @annakrystalli in #172. I'm not sure of a great fix -- we can add |
@cboettig, I see we can have a problem here... Just to make sure we are on the same page, is it correct that the issue should still be revealed by using the header below, as you mentioned in in #104 (comment)? ---
title: "Untitled"
header-includes:
- \usepackage{bbm}
output: pdf_document
--- If that is the case, I can only reproduce the problem for
docker run --rm -p 8787:8787 -e DISABLE_AUTH=true --user=rstudio rocker/verse:latest R -e 'cat("---\ntitle: Untitled\nheader-includes:\n - \\usepackage{bbm}\noutput: pdf_document\n---\n", file = "~/test.Rmd") ; rmarkdown::render("~/test.Rmd")'
# [...]
# Output created: test.pdf
docker run --rm -p 8787:8787 -e DISABLE_AUTH=true --user=rstudio rocker/verse:devel R -e 'cat("---\ntitle: Untitled\nheader-includes:\n - \\usepackage{bbm}\noutput: pdf_document\n---\n", file = "~/test.Rmd") ; rmarkdown::render("~/test.Rmd")'
# [...]
# ! LaTeX Error: File `bbm.sty' not found. Can you please confirm I am not missing anything for the tags before |
@riccardoporreca no, for some reason
you will see two permission-related errors:
and also the error:
However, running the above with
so no error occurs. I'm not at all clear why |
@cboettig, thanks for details. In particular, when we see
it is because This is not any special to docker run --rm rocker/verse:latest R -e "tinytex::tlmgr_install('fancyhdr')"
I guess TeXLive 2016 might wrongly report a failure of This is not causing any issue other than So if there are actual issues with using TeX Live 2016 We clearly have an issue |
I also had a quick look at the Dockerfile. There however the base image docker pull rocker/binder:3.6.0
docker run --rm rocker/binder:3.6.0 sh -c ' \
cat /etc/os-release | grep PRETTY_NAME \
&& echo repo: $CTAN_REPO \
&& tex --version | head -n 1 \
'
|
Thanks for this! I was worried the successful test was due only to bbm already being installed, but I do see it is being installed twice. that explains why everything I tested gave me the 'already installed' message! So, with the 2018 version in devel, it does look like we have a permissions issue we will have to work around. yeah, good point about the |
@cboettig, I have been investigating the issue with the frozen TeX Live 2018 snapshot we use in Update: The approach discussed with @norbusan allows to manually "patch" the TeX Live installation to include the fix discussed in rstudio/tinytex#77 (comment), which is available in telnet archive but only used for the installer. I will include this in the |
@riccardoporreca Re your updated comment;
Is it possible to take this approach to patch what looks like to be mistaken error messages in the 2016 version in Appreciate your thoughts. Thanks! |
Unfortunately the fix to TeX Live mentioned by @norbusan in https://tex.stackexchange.com/a/314079 came after TeX Live 2016 was frozen, hence the same approach does not apply here. However, the corresponding fix was pretty straight-forward and isolated, see https://git.texlive.info/texlive/commit/Master/tlpkg/TeXLive/TLUtils.pm?id=69cee5e1ce4b20f6ebb6af77e19d49706a842a3e, so we could back-port it to the version-stable frozen TeX Live 2016 we use in Here is a quick PoC, reproducing the error... docker run --rm rocker/verse:3.6.1 bash -c '
tlmgr install multirow \
&& tlmgr path add \
&& echo SUCCESS'
## [...]
## [1/1, ??:??/??:??] install: multirow [3k]
## [...]
## tlmgr: An error has occurred. See above messages. Exiting. ...and w/o error after applying the patch docker run --rm rocker/verse:3.6.1 bash -c '
apt-get update && apt-get install patch \
&& wget -qO- \
"https://git.texlive.info/texlive/patch/Master/tlpkg/TeXLive/TLUtils.pm?id=69cee5e1ce4b20f6ebb6af77e19d49706a842a3e" | \
patch -i - /opt/TinyTeX/tlpkg/TeXLive/TLUtils.pm \
&& apt-get purge -y patch && apt-get clean \
&& tlmgr install multirow \
&& tlmgr path add \
&& echo SUCCESS'
## [...]
## The following NEW packages will be installed:
## patch
## [...]
## patching file /opt/TinyTeX/tlpkg/TeXLive/TLUtils.pm
## Hunk #1 succeeded at 1896 (offset -30 lines).
## [...]
## Removing patch (2.7.5-1+deb9u2) ...
## [...]
## [1/1, ??:??/??:??] install: multirow [3k]
## [...]
## SUCCESS @cboettig, if you agree with this approach I am happy to contribute a PR bringing this patch to all the |
* See https://tex.stackexchange.com/a/314079. * Apply the corresponding fix https://git.texlive.info/texlive/commit/Master/tlpkg/TeXLive/TLUtils.pm?id=69cee5e1ce4b20f6ebb6af77e19d49706a842a3e instead of the `||true` workaround from rocker-org#171. * Fixes /rocker-org/rocker#370.
Thanks @riccardoporreca this looks reasonable to me. |
ENV
. The default is onENV
rather thanARG
to allow going back to the nominal latest repo with empty argument:docker build --build-arg CTAN_REPO= -t rocker/verse:latest-repo .
tlmgr path add
in TeXLive 2016 (https://tex.stackexchange.com/a/314079).