aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Spicer <joshspicer@github.com>2022-05-25 22:53:54 +0300
committerGitHub <noreply@github.com>2022-05-25 22:53:54 +0300
commita4d434f22df175f6e337fef8f099a197b574f64b (patch)
tree5cc16619a5b99f0305c488d6f1ba29e2a2db926c
parent343465890b2b710fd6c9cf33b1365d24a9603147 (diff)
sync with jammy updates (#21)
sync with jammy updates (https://github.com/microsoft/vscode-dev-containers/commit/053a0557211c98e5b9f0e8ccf755f6f143b05ef4) and other minor additions since copy over
-rw-r--r--settings.env3
-rw-r--r--src/desktop-lite/install.sh16
-rw-r--r--src/dotnet/install.sh29
-rw-r--r--src/java/feature.json16
-rw-r--r--src/jupyterlab/install.sh7
-rw-r--r--src/powershell/install.sh2
-rw-r--r--src/rust/feature.json24
-rw-r--r--src/sshd/install.sh9
8 files changed, 87 insertions, 19 deletions
diff --git a/settings.env b/settings.env
index cbad1ca..97707ea 100644
--- a/settings.env
+++ b/settings.env
@@ -13,7 +13,8 @@ POWERSHELL_ARCHIVE_VERSION_CODENAMES="stretch buster bionic focal"
AZCLI_ARCHIVE_ARCHITECTURES="amd64"
AZCLI_ARCHIVE_VERSION_CODENAMES="stretch buster bullseye bionic focal"
DOTNET_ARCHIVE_ARCHITECTURES="amd64"
-DOTNET_ARCHIVE_VERSION_CODENAMES="buster bullseye bionic focal hirsute"
+DOTNET_ARCHIVE_VERSION_CODENAMES="buster bullseye bionic focal hirsute jammy"
+DOTNET_VERSION_CODENAMES_REQUIRE_OLDER_LIBSSL_1="buster bullseye bionic focal hirsute"
DOTNET_CDN_FEED_URI="https://dotnetcli.azureedge.net"
HELM_GPG_KEYS_URI="https://raw.githubusercontent.com/helm/helm/main/KEYS"
MICROSOFT_GPG_KEYS_URI="https://packages.microsoft.com/keys/microsoft.asc"
diff --git a/src/desktop-lite/install.sh b/src/desktop-lite/install.sh
index aeddac3..ac149c4 100644
--- a/src/desktop-lite/install.sh
+++ b/src/desktop-lite/install.sh
@@ -56,6 +56,11 @@ package_list="
nano \
locales"
+# Packages to attempt to install if essential tools are missing (ie: vncpasswd).
+# This is useful, at least, for Ubuntu 22.04 (jammy)
+package_list_additional="
+ tigervnc-tools"
+
set -e
if [ "$(id -u)" -ne 0 ]; then
@@ -164,6 +169,10 @@ check_packages() {
fi
}
+##########################
+# Install starts here #
+##########################
+
# Ensure apt is in non-interactive to avoid prompts
export DEBIAN_FRONTEND=noninteractive
@@ -191,6 +200,12 @@ fi
# Install X11, fluxbox and VS Code dependencies
check_packages ${package_list}
+# On newer versions of Ubuntu (22.04),
+# we need an additional package that isn't provided in earlier versions
+if ! type vncpasswd > /dev/null 2>&1; then
+ check_packages ${package_list_additional}
+fi
+
# Install Emoji font if available in distro - Available in Debian 10+, Ubuntu 18.04+
if dpkg-query -W fonts-noto-color-emoji > /dev/null 2>&1 && ! dpkg -s fonts-noto-color-emoji > /dev/null 2>&1; then
apt-get -y install --no-install-recommends fonts-noto-color-emoji
@@ -391,4 +406,3 @@ In both cases, use the password "${VNC_PASSWORD}" when connecting
(*) Done!
EOF
-
diff --git a/src/dotnet/install.sh b/src/dotnet/install.sh
index f560186..3dd2cc8 100644
--- a/src/dotnet/install.sh
+++ b/src/dotnet/install.sh
@@ -18,10 +18,12 @@ ACCESS_GROUP=${6:-"dotnet"}
MICROSOFT_GPG_KEYS_URI="https://packages.microsoft.com/keys/microsoft.asc"
DOTNET_ARCHIVE_ARCHITECTURES="amd64"
-DOTNET_ARCHIVE_VERSION_CODENAMES="buster bullseye bionic focal hirsute"
+DOTNET_ARCHIVE_VERSION_CODENAMES="buster bullseye bionic focal hirsute jammy"
# Feed URI sourced from the official dotnet-install.sh
# https://github.com/dotnet/install-scripts/blob/1b98b94a6f6d81cc4845eb88e0195fac67caa0a6/src/dotnet-install.sh#L1342-L1343
DOTNET_CDN_FEED_URI="https://dotnetcli.azureedge.net"
+# Ubuntu 22.04 and on do not ship with libssl1.1, which is required for versions of .NET < 6.0
+DOTNET_VERSION_CODENAMES_REQUIRE_OLDER_LIBSSL_1="buster bullseye bionic focal hirsute"
# Exit on failure.
set -e
@@ -295,7 +297,14 @@ install_using_dotnet_releases_url() {
# - libgcc-s1 OR libgcc1 depending on OS
# - the latest libicuXX depending on OS (eg libicu57 for stretch)
# - also installs libc6 and libstdc++6 which are required by .NET
- check_packages curl ca-certificates tar jq icu-devtools libgssapi-krb5-2 libssl1.1 zlib1g
+ check_packages curl ca-certificates tar jq icu-devtools libgssapi-krb5-2 zlib1g
+
+ # Starting with Ubuntu 22.04 (jammy), libssl1.1 does not ship with the OS anymore.
+ if [[ "${DOTNET_VERSION_CODENAMES_REQUIRE_OLDER_LIBSSL_1}" = *"${VERSION_CODENAME}"* ]]; then
+ check_packages libssl1.1
+ else
+ check_packages libssl3.0
+ fi
get_full_version_details "${sdk_or_runtime}"
# exports DOTNET_DOWNLOAD_URL, DOTNET_DOWNLOAD_HASH, DOTNET_DOWNLOAD_NAME
@@ -343,6 +352,18 @@ EOF
export DEBIAN_FRONTEND=noninteractive
+# Dotnet 3.1 and 5.0 are not supported on Ubuntu 22.04 (jammy)+,
+# due to lack of libssl3.0 support.
+# See: https://github.com/microsoft/vscode-dev-containers/issues/1458#issuecomment-1135077775
+# NOTE: This will only guard against installation of the dotnet versions we propose via 'features'.
+# The user can attempt to install any other version at their own risk.
+if [[ "${DOTNET_VERSION}" = "3.1" ]] || [[ "${DOTNET_VERSION}" = "5.0" ]]; then
+ if [[ ! "${DOTNET_VERSION_CODENAMES_REQUIRE_OLDER_LIBSSL_1}" = *"${VERSION_CODENAME}"* ]]; then
+ err "Dotnet ${DOTNET_VERSION} is not supported on Ubuntu ${VERSION_CODENAME} due to a change in the 'libssl' dependency across distributions.\n Please upgrade your version of dotnet, or downgrade your OS version."
+ exit 1
+ fi
+fi
+
# Determine if the user wants to download .NET Runtime only, or .NET SDK & Runtime
# and set the appropriate variables.
if [ "${DOTNET_RUNTIME_ONLY}" = "true" ]; then
@@ -362,13 +383,15 @@ architecture="$(dpkg --print-architecture)"
use_dotnet_releases_url="false"
if [[ "${DOTNET_ARCHIVE_ARCHITECTURES}" = *"${architecture}"* ]] && [[ "${DOTNET_ARCHIVE_VERSION_CODENAMES}" = *"${VERSION_CODENAME}"* ]]; then
+ echo "Detected ${VERSION_CODENAME} on ${architecture}. Attempting to install dotnet from apt"
install_using_apt "${DOTNET_SDK_OR_RUNTIME}" || use_dotnet_releases_url="true"
else
use_dotnet_releases_url="true"
fi
if [ "${use_dotnet_releases_url}" = "true" ]; then
- install_using_dotnet_releases_url "${DOTNET_SDK_OR_RUNTIME}"
+ echo "Could not install dotnet from apt. Attempting to install dotnet from releases url"
+ install_using_dotnet_releases_url "${DOTNET_SDK_OR_RUNTIME}"
fi
echo "Done!" \ No newline at end of file
diff --git a/src/java/feature.json b/src/java/feature.json
index 5914bd7..64d5d65 100644
--- a/src/java/feature.json
+++ b/src/java/feature.json
@@ -4,23 +4,31 @@
"options": {
"version": {
"type": "string",
- "proposals": ["lts", "latest", "none", "17", "11", "8"],
+ "proposals": [
+ "lts",
+ "latest",
+ "none",
+ "17",
+ "11",
+ "8"
+ ],
"default": "lts",
"description": "Select or enter a Java version to install"
}
},
"buildArg": "_VSC_INSTALL_JAVA",
- "extensions": ["vscjava.vscode-java-pack"],
+ "extensions": [
+ "vscjava.vscode-java-pack"
+ ],
"containerEnv": {
"SDKMAN_DIR": "/usr/local/sdkman",
"PATH": "${SDKMAN_DIR}/bin:${SDKMAN_DIR}/candidates/java/current/bin:${PATH}"
},
"settings": {
- "java.home": "/extension-java-home",
"java.import.gradle.java.home": "/usr/local/sdkman/candidates/java/current"
},
"install": {
"app": "",
"file": "install.sh"
}
-}
+} \ No newline at end of file
diff --git a/src/jupyterlab/install.sh b/src/jupyterlab/install.sh
index f6c93f9..76bb93c 100644
--- a/src/jupyterlab/install.sh
+++ b/src/jupyterlab/install.sh
@@ -14,7 +14,7 @@ set -e
VERSION=${1:-"latest"}
USERNAME=${2:-"automatic"}
PYTHON=${3:-"python"}
-ALLOW_ORIGIN=${4:-""}
+ALLOW_ALL_ORIGINS=${4:-""}
# If in automatic mode, determine if a user already exists, if not use vscode
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
@@ -70,6 +70,7 @@ else
sudoUserIf ${PYTHON} -m pip install jupyterlab=="${VERSION}" --no-cache-dir
fi
-if [ "${ALLOW_ORIGIN}" = 'true' ]; then
+if [ "${ALLOW_ALL_ORIGINS}" = 'true' ]; then
addToJupyterConfig "c.ServerApp.allow_origin = '*'"
-fi
+ addToJupyterConfig "c.NotebookApp.allow_origin = '*'"
+fi \ No newline at end of file
diff --git a/src/powershell/install.sh b/src/powershell/install.sh
index 3110356..b8630c4 100644
--- a/src/powershell/install.sh
+++ b/src/powershell/install.sh
@@ -122,7 +122,7 @@ install_using_apt() {
install_using_github() {
# Fall back on direct download if no apt package exists in microsoft pool
- check_packages curl ca-certificates gnupg2 dirmngr libc6 libgcc1 libgssapi-krb5-2 liblttng-ust0 libstdc++6 libunwind8 libuuid1 zlib1g libicu[0-9][0-9]
+ check_packages curl ca-certificates gnupg2 dirmngr libc6 libgcc1 libgssapi-krb5-2 libstdc++6 libunwind8 libuuid1 zlib1g libicu[0-9][0-9]
if ! type git > /dev/null 2>&1; then
apt_get_update_if_needed
apt-get install -y --no-install-recommends git
diff --git a/src/rust/feature.json b/src/rust/feature.json
index 3604ced..147969f 100644
--- a/src/rust/feature.json
+++ b/src/rust/feature.json
@@ -4,13 +4,23 @@
"options": {
"version": {
"type": "string",
- "proposals": ["latest", "none", "1.55", "1.54", "1.53"],
+ "proposals": [
+ "latest",
+ "none",
+ "1.55",
+ "1.54",
+ "1.53"
+ ],
"default": "latest",
"description": "Select or enter a version of Rust to install."
},
"profile": {
"type": "string",
- "proposals": ["minimal", "default", "complete"],
+ "proposals": [
+ "minimal",
+ "default",
+ "complete"
+ ],
"default": "minimal",
"description": "Select a rustup install profile."
}
@@ -18,7 +28,7 @@
"extensions": [
"vadimcn.vscode-lldb",
"mutantdino.resourcemonitor",
- "matklad.rust-analyzer",
+ "rust-lang.rust-analyzer",
"tamasfe.even-better-toml",
"serayuzgur.crates"
],
@@ -27,8 +37,12 @@
"RUSTUP_HOME": "/usr/local/rustup",
"PATH": "${CARGO_HOME}/bin:${PATH}"
},
- "capAdd": [ "SYS_PTRACE" ],
- "securityOpt": ["seccomp=unconfined"],
+ "capAdd": [
+ "SYS_PTRACE"
+ ],
+ "securityOpt": [
+ "seccomp=unconfined"
+ ],
"settings": {
"lldb.executable": "/usr/bin/lldb",
"files.watcherExclude": {
diff --git a/src/sshd/install.sh b/src/sshd/install.sh
index eb33a09..3e8d2ec 100644
--- a/src/sshd/install.sh
+++ b/src/sshd/install.sh
@@ -75,6 +75,13 @@ elif [ "${NEW_PASSWORD}" != "skip" ]; then
echo "${USERNAME}:${NEW_PASSWORD}" | chpasswd
fi
+if [ $(getent group ssh) ]; then
+ echo "'ssh' group already exists."
+else
+ echo "adding 'ssh' group, as it does not already exist."
+ groupadd ssh
+fi
+
# Add user to ssh group
if [ "${USERNAME}" != "root" ]; then
usermod -aG ssh ${USERNAME}
@@ -166,4 +173,4 @@ echo -e "Done!\n\n- Port: ${SSHD_PORT}\n- User: ${USERNAME}"
if [ "${EMIT_PASSWORD}" = "true" ]; then
echo "- Password: ${NEW_PASSWORD}"
fi
-echo -e "\nForward port ${SSHD_PORT} to your local machine and run:\n\n ssh -p ${SSHD_PORT} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o GlobalKnownHostsFile=/dev/null ${USERNAME}@localhost\n"
+echo -e "\nForward port ${SSHD_PORT} to your local machine and run:\n\n ssh -p ${SSHD_PORT} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o GlobalKnownHostsFile=/dev/null ${USERNAME}@localhost\n" \ No newline at end of file