Skip to content

Commit b12dfb2

Browse files
committed
chore: tweaks
1 parent 960817d commit b12dfb2

File tree

8 files changed

+13
-30
lines changed

8 files changed

+13
-30
lines changed

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
TeX Live and publishing packages (`bookdown`, `rticles`, etc.) are no longer included.
99
Use `rocker/verse` or add `install_verse.sh` in a downstream image if LaTeX is needed.
1010
([#989](https://github.com/rocker-org/rocker-versioned2/pull/989))
11+
- `rocker/verse` and `install_texlive.sh` now install TeX Live from Ubuntu/Debian apt packages
12+
instead of the CTAN installer, so CTAN snapshot pinning is no longer part of the versioning scheme.
1113

1214
### Changes in pre-built images
1315

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ Compared to `r-base`, this stack:
3535
For the amd64 platform, RSPM serves compiled Linux binaries of R packages and greatly speeds up package installs.
3636
- Non-latest R version images installs all R packages from a fixed snapshot of CRAN mirror at a given date.
3737
This setting ensures that the same version of the R package is installed no matter when the installation is performed.
38-
- In addition to CRAN mirror, the version of RStudio Server installed in `rocker/rstudio` and
39-
the date of CTAN mirror set in `rocker/verse` are also fixed.
38+
- In addition to CRAN mirror, the version of RStudio Server installed in `rocker/rstudio` is also fixed.
4039
Please check [the document about versions](https://github.com/rocker-org/rocker-versioned2/wiki/Versions) for details.
4140
- Provides images that are generally smaller than the `r-base` series.
4241

build/args/4.4.3.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"ubuntu_version": "24.04",
77
"cran": "https://p3m.dev/cran/__linux__/noble/2025-04-10",
88
"rstudio_version": "2024.12.1+563",
9-
"ctan": "https://www.texlive.info/tlnet-archive/2025/04/10/tlnet",
109
"r_major_latest": false,
1110
"r_minor_latest": true
1211
}

build/args/4.5.2.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"ubuntu_version": "24.04",
77
"cran": "https://p3m.dev/cran/__linux__/noble/2026-03-10",
88
"rstudio_version": "2026.01.1+403",
9-
"ctan": "https://www.texlive.info/tlnet-archive/2026/03/10/tlnet",
109
"r_major_latest": false,
1110
"r_minor_latest": false
1211
}

build/args/4.5.3.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"ubuntu_version": "24.04",
77
"cran": "https://p3m.dev/cran/__linux__/noble/latest",
88
"rstudio_version": "2026.01.1+403",
9-
"ctan": "https://mirror.ctan.org/systems/texlive/tlnet",
109
"r_major_latest": true,
1110
"r_minor_latest": true
1211
}

build/args/devel.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"ubuntu_version": null,
77
"cran": "https://cloud.r-project.org",
88
"rstudio_version": "2026.01.1+403",
9-
"ctan": "https://mirror.ctan.org/systems/texlive/tlnet",
109
"r_major_latest": null,
1110
"r_minor_latest": null
1211
}

build/scripts/generate-args.R

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -108,22 +108,6 @@ is_rstudio_deb_available <- function(rstudio_version, ubuntu_series) {
108108
}
109109

110110

111-
#' Get the latest CTAN URL for a given date
112-
#' @param date A [Date] class vector.
113-
#' If `NA`, the "latest" URL will be returned.
114-
#' @return A character of CTAN URL.
115-
#' @examples
116-
#' latest_ctan_url(as.Date(c("2023-10-30", NA)))
117-
latest_ctan_url <- function(date) {
118-
.url <- dplyr::if_else(
119-
is.na(date), "https://mirror.ctan.org/systems/texlive/tlnet",
120-
stringr::str_c("https://www.texlive.info/tlnet-archive/", format(date, "%Y/%m/%d"), "/tlnet")
121-
)
122-
123-
.url
124-
}
125-
126-
127111
#' Paste each element of vectors in a cartesian product
128112
#' @param ... Dynamic dots. Character vectors to paste.
129113
#' @return A character vector.
@@ -195,7 +179,6 @@ rocker_versioned_args <- function(
195179
dplyr::semi_join(df_available_rstudio, by = c("ubuntu_series", "rstudio_version")) |>
196180
dplyr::slice_max(rstudio_version, with_ties = FALSE, by = c(r_version, ubuntu_series)) |>
197181
dplyr::mutate(
198-
ctan = latest_ctan_url(r_freeze_date),
199182
cran = purrr::pmap_chr(
200183
list(r_freeze_date, ubuntu_series, r_version),
201184
\(...) latest_p3m_cran_url_linux(...)
@@ -209,7 +192,6 @@ rocker_versioned_args <- function(
209192
ubuntu_version,
210193
cran,
211194
rstudio_version,
212-
ctan,
213195
r_major_latest,
214196
r_minor_latest
215197
)
@@ -224,8 +206,6 @@ dplyr::add_row(
224206
ubuntu_series = "latest",
225207
cran = "https://cloud.r-project.org",
226208
rstudio_version = x$rstudio_version |>
227-
utils::tail(1),
228-
ctan = x$ctan |>
229209
utils::tail(1)
230210
))()
231211

scripts/install_texlive.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,17 @@ fi
1414

1515
export DEBIAN_FRONTEND=noninteractive
1616

17-
if [ "$(find /var/lib/apt/lists/* 2>/dev/null | wc -l)" = "0" ]; then
18-
apt-get update
19-
fi
17+
# a function to install apt packages only if they are not installed
18+
function apt_install() {
19+
if ! dpkg -s "$@" >/dev/null 2>&1; then
20+
if [ "$(find /var/lib/apt/lists/* 2>/dev/null | wc -l)" = "0" ]; then
21+
apt-get update
22+
fi
23+
apt-get install -y --no-install-recommends "$@"
24+
fi
25+
}
2026

21-
apt-get install -y --no-install-recommends \
27+
apt_install \
2228
lmodern \
2329
texlive-fonts-recommended \
2430
texlive-latex-base \

0 commit comments

Comments
 (0)