From 5258a80c67e92b548c7a53d27be1a30669308521 Mon Sep 17 00:00:00 2001 From: Eljo George Date: Mon, 8 Jan 2024 13:16:23 -0800 Subject: [PATCH 1/3] Alpine - Install libssl1.1 only if available (#793) --- src/common-utils/main.sh | 7 ++++++- test/common-utils/alpine-3-18.sh | 16 ++++++++++++++++ test/common-utils/scenarios.json | 7 +++++++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100755 test/common-utils/alpine-3-18.sh diff --git a/src/common-utils/main.sh b/src/common-utils/main.sh index 26f0a7512..6214d2580 100644 --- a/src/common-utils/main.sh +++ b/src/common-utils/main.sh @@ -265,7 +265,6 @@ install_alpine_packages() { libstdc++ \ krb5-libs \ libintl \ - libssl1.1 \ lttng-ust \ tzdata \ userspace-rcu \ @@ -279,6 +278,12 @@ install_alpine_packages() { shadow \ strace + # # Include libssl1.1 if available (not available for 3.19 and newer) + LIBSSL1_PKG=libssl1.1 + if [[ $(apk search --no-cache -a $LIBSSL1_PKG | grep $LIBSSL1_PKG) ]]; then + apk add --no-cache $LIBSSL1_PKG + fi + # Install man pages - package name varies between 3.12 and earlier versions if apk info man > /dev/null 2>&1; then apk add --no-cache man man-pages diff --git a/test/common-utils/alpine-3-18.sh b/test/common-utils/alpine-3-18.sh new file mode 100755 index 000000000..eaf384b9e --- /dev/null +++ b/test/common-utils/alpine-3-18.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +set -e + +# Optional: Import test library +source dev-container-features-test-lib + +# Definition specific tests +. /etc/os-release +check "non-root user" test "$(whoami)" = "devcontainer" +check "distro" test "${ID}" = "alpine" +check "bashrc" ls /etc/bash/bashrc +check "libssl1.1 is installed" grep "libssl1.1" <(apk list --no-cache libssl1.1) + +# Report result +reportResults \ No newline at end of file diff --git a/test/common-utils/scenarios.json b/test/common-utils/scenarios.json index c1ee18dde..eef2bffcd 100644 --- a/test/common-utils/scenarios.json +++ b/test/common-utils/scenarios.json @@ -162,6 +162,13 @@ "common-utils": {} } }, + "alpine-3-18": { + "image": "alpine:3.18", + "remoteUser": "devcontainer", + "features": { + "common-utils": {} + } + }, "devcontainer-info": { "build": { "dockerfile": "Dockerfile" From 562305d37b97d47331d96306ffc2a0a3cce55e64 Mon Sep 17 00:00:00 2001 From: Eljo George Date: Mon, 8 Jan 2024 14:53:08 -0800 Subject: [PATCH 2/3] Bump version for common-utils (#794) Version bump for https://github.com/devcontainers/features/pull/793 --- src/common-utils/devcontainer-feature.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common-utils/devcontainer-feature.json b/src/common-utils/devcontainer-feature.json index 329f8dec8..dbe466beb 100644 --- a/src/common-utils/devcontainer-feature.json +++ b/src/common-utils/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "common-utils", - "version": "2.3.1", + "version": "2.3.2", "name": "Common Utilities", "documentationURL": "https://github.com/devcontainers/features/tree/main/src/common-utils", "description": "Installs a set of common command line utilities, Oh My Zsh!, and sets up a non-root user.", From 6c87ba7564e9db5f7cc380c238b196e5fc676cd9 Mon Sep 17 00:00:00 2001 From: gmeans Date: Tue, 16 Jan 2024 19:01:41 -0500 Subject: [PATCH 3/3] Fix kubectl zsh completions typo (#792) * fix typo * version bump --------- Co-authored-by: Eljo George --- src/kubectl-helm-minikube/devcontainer-feature.json | 2 +- src/kubectl-helm-minikube/install.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kubectl-helm-minikube/devcontainer-feature.json b/src/kubectl-helm-minikube/devcontainer-feature.json index 4206772b2..fa8ea6138 100644 --- a/src/kubectl-helm-minikube/devcontainer-feature.json +++ b/src/kubectl-helm-minikube/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "kubectl-helm-minikube", - "version": "1.1.5", + "version": "1.1.6", "name": "Kubectl, Helm, and Minikube", "documentationURL": "https://github.com/devcontainers/features/tree/main/src/kubectl-helm-minikube", "description": "Installs latest version of kubectl, Helm, and optionally minikube. Auto-detects latest versions and installs needed dependencies.", diff --git a/src/kubectl-helm-minikube/install.sh b/src/kubectl-helm-minikube/install.sh index 35444c5dc..5deb377c3 100755 --- a/src/kubectl-helm-minikube/install.sh +++ b/src/kubectl-helm-minikube/install.sh @@ -148,7 +148,7 @@ if [ ${KUBECTL_VERSION} != "none" ]; then kubectl completion bash > /etc/bash_completion.d/kubectl # kubectl zsh completion - if [ -e "${USERHOME}}/.oh-my-zsh" ]; then + if [ -e "${USERHOME}/.oh-my-zsh" ]; then mkdir -p "${USERHOME}/.oh-my-zsh/completions" kubectl completion zsh > "${USERHOME}/.oh-my-zsh/completions/_kubectl" chown -R "${USERNAME}" "${USERHOME}/.oh-my-zsh"