From 24363aa6636dbd3892caa90b0faf2344ede6f075 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Feb 2026 15:03:11 +0000 Subject: [PATCH 1/4] Initial plan From 7b5fe46525dc9b448181ab83eb7b26f18c66bced Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Feb 2026 15:08:34 +0000 Subject: [PATCH 2/4] Fix SDKMAN GLIBC compatibility for RHEL 8 systems Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com> --- src/java/devcontainer-feature.json | 2 +- src/java/install.sh | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/java/devcontainer-feature.json b/src/java/devcontainer-feature.json index c50bc15a2..6a964c312 100644 --- a/src/java/devcontainer-feature.json +++ b/src/java/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "java", - "version": "1.7.0", + "version": "1.7.1", "name": "Java (via SDKMAN!)", "documentationURL": "https://github.com/devcontainers/features/tree/main/src/java", "description": "Installs Java, SDKMAN! (if not installed), and needed dependencies.", diff --git a/src/java/install.sh b/src/java/install.sh index 39a2d77c6..be8a59363 100644 --- a/src/java/install.sh +++ b/src/java/install.sh @@ -297,6 +297,11 @@ if [ ! -d "${SDKMAN_DIR}" ]; then usermod -a -G sdkman ${USERNAME} umask 0002 # Install SDKMAN + # For RHEL 8 systems (glibc 2.28), disable native version to avoid glibc compatibility issues + # SDKMAN native binaries require glibc 2.30+ which is not available in RHEL 8 / AlmaLinux 8 / Rocky 8 + if [ "${ADJUSTED_ID}" = "rhel" ] && [ "${MAJOR_VERSION_ID}" = "8" ]; then + export SDKMAN_NATIVE_VERSION="false" + fi curl -sSL "https://get.sdkman.io?rcupdate=false" | bash chown -R "${USERNAME}:sdkman" ${SDKMAN_DIR} find ${SDKMAN_DIR} -type d -print0 | xargs -d '\n' -0 chmod g+s From e7031f33c8da3b59b1e0703612c31a530f8b3809 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Feb 2026 16:34:22 +0000 Subject: [PATCH 3/4] Fix SDKMAN native binary removal for RHEL 8 systems Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com> --- src/java/devcontainer-feature.json | 2 +- src/java/install.sh | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/java/devcontainer-feature.json b/src/java/devcontainer-feature.json index 6a964c312..9591c3592 100644 --- a/src/java/devcontainer-feature.json +++ b/src/java/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "java", - "version": "1.7.1", + "version": "1.7.2", "name": "Java (via SDKMAN!)", "documentationURL": "https://github.com/devcontainers/features/tree/main/src/java", "description": "Installs Java, SDKMAN! (if not installed), and needed dependencies.", diff --git a/src/java/install.sh b/src/java/install.sh index be8a59363..dad04af3e 100644 --- a/src/java/install.sh +++ b/src/java/install.sh @@ -303,6 +303,17 @@ if [ ! -d "${SDKMAN_DIR}" ]; then export SDKMAN_NATIVE_VERSION="false" fi curl -sSL "https://get.sdkman.io?rcupdate=false" | bash + # For RHEL 8 systems, also disable native version in config file and remove native binaries + if [ "${ADJUSTED_ID}" = "rhel" ] && [ "${MAJOR_VERSION_ID}" = "8" ]; then + # Disable native version in config to prevent future usage + if [ -f "${SDKMAN_DIR}/etc/config" ]; then + sed -i 's/sdkman_native_version=.*/sdkman_native_version=false/' "${SDKMAN_DIR}/etc/config" + fi + # Remove native binaries if they were installed + if [ -d "${SDKMAN_DIR}/libexec" ]; then + rm -rf "${SDKMAN_DIR}/libexec" + fi + fi chown -R "${USERNAME}:sdkman" ${SDKMAN_DIR} find ${SDKMAN_DIR} -type d -print0 | xargs -d '\n' -0 chmod g+s # Add sourcing of sdkman into bashrc/zshrc files (unless disabled) From 344e86ff3112cb50ac4b07c26f23cfb41772ddab Mon Sep 17 00:00:00 2001 From: Abdurrahmaan Iqbal Date: Fri, 13 Feb 2026 12:17:47 +0000 Subject: [PATCH 4/4] Disable for RHEL 8 --- src/java/install.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/java/install.sh b/src/java/install.sh index dad04af3e..b9aee12d9 100644 --- a/src/java/install.sh +++ b/src/java/install.sh @@ -303,11 +303,16 @@ if [ ! -d "${SDKMAN_DIR}" ]; then export SDKMAN_NATIVE_VERSION="false" fi curl -sSL "https://get.sdkman.io?rcupdate=false" | bash - # For RHEL 8 systems, also disable native version in config file and remove native binaries + # For RHEL 8 systems, also disable native CLI in config file and remove native binaries if [ "${ADJUSTED_ID}" = "rhel" ] && [ "${MAJOR_VERSION_ID}" = "8" ]; then - # Disable native version in config to prevent future usage + # Disable native CLI in config to prevent future usage + # The SDKMAN config key is sdkman_native_enable (checked in sdkman-main.sh) if [ -f "${SDKMAN_DIR}/etc/config" ]; then - sed -i 's/sdkman_native_version=.*/sdkman_native_version=false/' "${SDKMAN_DIR}/etc/config" + if grep -q "sdkman_native_enable" "${SDKMAN_DIR}/etc/config"; then + sed -i 's/sdkman_native_enable=.*/sdkman_native_enable=false/' "${SDKMAN_DIR}/etc/config" + else + echo "sdkman_native_enable=false" >> "${SDKMAN_DIR}/etc/config" + fi fi # Remove native binaries if they were installed if [ -d "${SDKMAN_DIR}/libexec" ]; then