@@ -14,10 +14,17 @@ def rstudio_base_scripts(r_version):
14
14
shiny_proxy_version = "1.1"
15
15
shiny_sha256sum = "80f1e48f6c824be7ef9c843bb7911d4981ac7e8a963e0eff823936a8b28476ee"
16
16
17
- rstudio_url = "https://download2.rstudio.org/server/bionic/amd64/rstudio-server-2022.02.1-461-amd64.deb"
18
- rstudio_sha256sum = (
19
- "239e8d93e103872e7c6d827113d88871965f82ffb0397f5638025100520d8a54"
20
- )
17
+
18
+ # RStudio server has different builds based on wether OpenSSL 3 or 1.1 is available in the base
19
+ # image. 3 is present Jammy+, 1.1 until then. Instead of hardcoding URLs based on distro, we actually
20
+ # check for the dependency itself directly in the code below. You can find these URLs in
21
+ # https://posit.co/download/rstudio-server/, toggling between Ubuntu 22 (for openssl3) vs earlier versions (openssl 1.1)
22
+ # you may forget about openssl, but openssl never forgets you.
23
+ rstudio_openssl3_url = 'https://download2.rstudio.org/server/jammy/amd64/rstudio-server-2022.12.0-353-amd64.deb'
24
+ rstudio_openssl3_sha256sum = 'a5aa2202786f9017a6de368a410488ea2e4fc6c739f78998977af214df0d6288'
25
+
26
+ rstudio_openssl1_url = 'https://download2.rstudio.org/server/bionic/amd64/rstudio-server-2022.12.0-353-amd64.deb'
27
+ rstudio_openssl1_sha256sum = 'bb88e37328c304881e60d6205d7dac145525a5c2aaaf9da26f1cb625b7d47e6e'
21
28
rsession_proxy_version = "2.0.1"
22
29
23
30
return [
@@ -27,11 +34,18 @@ def rstudio_base_scripts(r_version):
27
34
# but here it's important because these recommend r-base,
28
35
# which will upgrade the installed version of R, undoing our pinned version
29
36
rf"""
30
- curl --silent --location --fail { rstudio_url } > /tmp/rstudio.deb && \
37
+ apt-get update > /dev/null && \
38
+ if apt-cache search libssl3 > /dev/null; then \
39
+ RSTUDIO_URL="{ rstudio_openssl3_url } " ;\
40
+ RSTUDIO_HASH="{ rstudio_openssl3_sha256sum } " ;\
41
+ else \
42
+ RSTUDIO_URL="{ rstudio_openssl1_url } " ;\
43
+ RSTUDIO_HASH="{ rstudio_openssl1_sha256sum } " ;\
44
+ fi && \
45
+ curl --silent --location --fail ${{RSTUDIO_URL}} > /tmp/rstudio.deb && \
31
46
curl --silent --location --fail { shiny_server_url } > /tmp/shiny.deb && \
32
- echo ' { rstudio_sha256sum } /tmp/rstudio.deb' | sha256sum -c - && \
47
+ echo "${{RSTUDIO_HASH} } /tmp/rstudio.deb' | sha256sum -c - && \
33
48
echo '{ shiny_sha256sum } /tmp/shiny.deb' | sha256sum -c - && \
34
- apt-get update > /dev/null && \
35
49
apt install -y --no-install-recommends /tmp/rstudio.deb /tmp/shiny.deb && \
36
50
rm /tmp/*.deb && \
37
51
apt-get -qq purge && \
0 commit comments