From ec6081571a18e8a1f6fe4698e8c700ea3941a0dc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 10 Feb 2026 11:25:25 +0000 Subject: [PATCH 01/13] Initial plan From e08d8b6c57ecfa98213804675f41d52247b506f5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 10 Feb 2026 11:29:44 +0000 Subject: [PATCH 02/13] Fix conda installation by switching from apt repository to direct Miniconda installer Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com> --- src/conda/devcontainer-feature.json | 80 ++++++++++++++--------------- src/conda/install.sh | 29 +++++++---- 2 files changed, 59 insertions(+), 50 deletions(-) diff --git a/src/conda/devcontainer-feature.json b/src/conda/devcontainer-feature.json index 39615464d..cfe9d0a2d 100644 --- a/src/conda/devcontainer-feature.json +++ b/src/conda/devcontainer-feature.json @@ -1,43 +1,43 @@ { - "id": "conda", - "version": "1.1.0", - "name": "Conda", - "description": "A cross-platform, language-agnostic binary package manager", - "documentationURL": "https://github.com/devcontainers/features/tree/main/src/conda", - "options": { - "version": { - "type": "string", - "proposals": [ - "latest", - "4.11.0", - "4.12.0" - ], - "default": "latest", - "description": "Select or enter a conda version." - }, - "addCondaForge": { - "type": "boolean", - "default": false, - "description": "Add conda-forge channel to the config?" - } + "id": "conda", + "version": "1.2.0", + "name": "Conda", + "description": "A cross-platform, language-agnostic binary package manager", + "documentationURL": "https://github.com/devcontainers/features/tree/main/src/conda", + "options": { + "version": { + "type": "string", + "proposals": [ + "latest", + "4.11.0", + "4.12.0" + ], + "default": "latest", + "description": "Select or enter a conda version." }, - "containerEnv": { - "CONDA_DIR": "/opt/conda", - "CONDA_SCRIPT": "/opt/conda/etc/profile.d/conda.sh", - "PATH": "/opt/conda/bin:${PATH}" - }, - "customizations": { - "vscode": { - "settings": { - "github.copilot.chat.codeGeneration.instructions": [ - { - "text": "This dev container includes the conda package manager pre-installed and available on the `PATH` for data science and Python development. Additional packages installed using Conda will be downloaded from Anaconda or another repository configured by the user. A user can install different versions of Python than the one in this dev container by running a command like: conda install python=3.7" - } - ] - } - } - }, - "installsAfter": [ - "ghcr.io/devcontainers/features/common-utils" - ] + "addCondaForge": { + "type": "boolean", + "default": false, + "description": "Add conda-forge channel to the config?" + } + }, + "containerEnv": { + "CONDA_DIR": "/opt/conda", + "CONDA_SCRIPT": "/opt/conda/etc/profile.d/conda.sh", + "PATH": "/opt/conda/bin:${PATH}" + }, + "customizations": { + "vscode": { + "settings": { + "github.copilot.chat.codeGeneration.instructions": [ + { + "text": "This dev container includes the conda package manager pre-installed and available on the `PATH` for data science and Python development. Additional packages installed using Conda will be downloaded from Anaconda or another repository configured by the user. A user can install different versions of Python than the one in this dev container by running a command like: conda install python=3.7" + } + ] + } + } + }, + "installsAfter": [ + "ghcr.io/devcontainers/features/common-utils" + ] } diff --git a/src/conda/install.sh b/src/conda/install.sh index 4d1cf2237..f10ca2710 100644 --- a/src/conda/install.sh +++ b/src/conda/install.sh @@ -72,21 +72,30 @@ if ! conda --version &> /dev/null ; then fi usermod -a -G conda "${USERNAME}" - # Install dependencies - check_packages curl ca-certificates gnupg2 + # Install dependencies (only curl and ca-certificates needed for direct download) + check_packages curl ca-certificates echo "Installing Conda..." - curl -sS https://repo.anaconda.com/pkgs/misc/gpgkeys/anaconda.asc | gpg --dearmor > /usr/share/keyrings/conda-archive-keyring.gpg - echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/conda-archive-keyring.gpg] https://repo.anaconda.com/pkgs/misc/debrepo/conda stable main" > /etc/apt/sources.list.d/conda.list - apt-get update -y - - CONDA_PKG="conda=${VERSION}-0" + # Download Miniconda installer directly (avoiding apt repository with SHA1 signature issues) + TEMP_INSTALLER="/tmp/miniconda_installer_$$.sh" + MINICONDA_BASE_URL="https://repo.anaconda.com/miniconda" + + # Determine installer filename based on requested version if [ "${VERSION}" = "latest" ]; then - CONDA_PKG="conda" + INSTALLER_NAME="Miniconda3-latest-Linux-x86_64.sh" + else + INSTALLER_NAME="Miniconda3-py39_${VERSION}-Linux-x86_64.sh" fi - - check_packages $CONDA_PKG + + # Fetch the installer script + curl -fsSL "${MINICONDA_BASE_URL}/${INSTALLER_NAME}" -o "${TEMP_INSTALLER}" + + # Execute installation in silent mode to target directory + bash "${TEMP_INSTALLER}" -b -u -p "${CONDA_DIR}" + + # Clean up installer file + rm -f "${TEMP_INSTALLER}" CONDA_SCRIPT="/opt/conda/etc/profile.d/conda.sh" . $CONDA_SCRIPT From 6120521e540dcbe38c3a7de74e92766403e7ee26 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 10 Feb 2026 11:30:24 +0000 Subject: [PATCH 03/13] Add error handling for Miniconda download and installation Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com> --- src/conda/install.sh | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/src/conda/install.sh b/src/conda/install.sh index f10ca2710..0b18d2dff 100644 --- a/src/conda/install.sh +++ b/src/conda/install.sh @@ -85,14 +85,32 @@ if ! conda --version &> /dev/null ; then if [ "${VERSION}" = "latest" ]; then INSTALLER_NAME="Miniconda3-latest-Linux-x86_64.sh" else + # Note: Specific conda versions may require corresponding Python version adjustments + # The py39 base works with conda 4.11.0 and 4.12.0 (as per feature options) INSTALLER_NAME="Miniconda3-py39_${VERSION}-Linux-x86_64.sh" fi - # Fetch the installer script - curl -fsSL "${MINICONDA_BASE_URL}/${INSTALLER_NAME}" -o "${TEMP_INSTALLER}" + # Fetch the installer script with error handling + if ! curl -fsSL "${MINICONDA_BASE_URL}/${INSTALLER_NAME}" -o "${TEMP_INSTALLER}"; then + echo "ERROR: Failed to download Miniconda installer from ${MINICONDA_BASE_URL}/${INSTALLER_NAME}" + echo "Please verify the version specified is valid." + rm -f "${TEMP_INSTALLER}" + exit 1 + fi + + # Verify the installer was downloaded successfully + if [ ! -f "${TEMP_INSTALLER}" ] || [ ! -s "${TEMP_INSTALLER}" ]; then + echo "ERROR: Miniconda installer file is missing or empty" + rm -f "${TEMP_INSTALLER}" + exit 1 + fi # Execute installation in silent mode to target directory - bash "${TEMP_INSTALLER}" -b -u -p "${CONDA_DIR}" + if ! bash "${TEMP_INSTALLER}" -b -u -p "${CONDA_DIR}"; then + echo "ERROR: Miniconda installation failed. Check system requirements and disk space." + rm -f "${TEMP_INSTALLER}" + exit 1 + fi # Clean up installer file rm -f "${TEMP_INSTALLER}" From 4f1f1f328cb22fff94f379900381377cc67ac538 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 10 Feb 2026 12:15:10 +0000 Subject: [PATCH 04/13] Use APT::Key::GPGVCommand=1 option to bypass SHA1 signature check Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com> --- src/conda/devcontainer-feature.json | 2 +- src/conda/install.sh | 47 ++++++----------------------- 2 files changed, 11 insertions(+), 38 deletions(-) diff --git a/src/conda/devcontainer-feature.json b/src/conda/devcontainer-feature.json index cfe9d0a2d..9698ade3d 100644 --- a/src/conda/devcontainer-feature.json +++ b/src/conda/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "conda", - "version": "1.2.0", + "version": "1.1.1", "name": "Conda", "description": "A cross-platform, language-agnostic binary package manager", "documentationURL": "https://github.com/devcontainers/features/tree/main/src/conda", diff --git a/src/conda/install.sh b/src/conda/install.sh index 0b18d2dff..2ef077d43 100644 --- a/src/conda/install.sh +++ b/src/conda/install.sh @@ -72,48 +72,21 @@ if ! conda --version &> /dev/null ; then fi usermod -a -G conda "${USERNAME}" - # Install dependencies (only curl and ca-certificates needed for direct download) - check_packages curl ca-certificates + # Install dependencies + check_packages curl ca-certificates gnupg2 echo "Installing Conda..." - # Download Miniconda installer directly (avoiding apt repository with SHA1 signature issues) - TEMP_INSTALLER="/tmp/miniconda_installer_$$.sh" - MINICONDA_BASE_URL="https://repo.anaconda.com/miniconda" - - # Determine installer filename based on requested version + curl -sS https://repo.anaconda.com/pkgs/misc/gpgkeys/anaconda.asc | gpg --dearmor > /usr/share/keyrings/conda-archive-keyring.gpg + echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/conda-archive-keyring.gpg] https://repo.anaconda.com/pkgs/misc/debrepo/conda stable main" > /etc/apt/sources.list.d/conda.list + apt-get update -y -o APT::Key::GPGVCommand=1 + + CONDA_PKG="conda=${VERSION}-0" if [ "${VERSION}" = "latest" ]; then - INSTALLER_NAME="Miniconda3-latest-Linux-x86_64.sh" - else - # Note: Specific conda versions may require corresponding Python version adjustments - # The py39 base works with conda 4.11.0 and 4.12.0 (as per feature options) - INSTALLER_NAME="Miniconda3-py39_${VERSION}-Linux-x86_64.sh" + CONDA_PKG="conda" fi - - # Fetch the installer script with error handling - if ! curl -fsSL "${MINICONDA_BASE_URL}/${INSTALLER_NAME}" -o "${TEMP_INSTALLER}"; then - echo "ERROR: Failed to download Miniconda installer from ${MINICONDA_BASE_URL}/${INSTALLER_NAME}" - echo "Please verify the version specified is valid." - rm -f "${TEMP_INSTALLER}" - exit 1 - fi - - # Verify the installer was downloaded successfully - if [ ! -f "${TEMP_INSTALLER}" ] || [ ! -s "${TEMP_INSTALLER}" ]; then - echo "ERROR: Miniconda installer file is missing or empty" - rm -f "${TEMP_INSTALLER}" - exit 1 - fi - - # Execute installation in silent mode to target directory - if ! bash "${TEMP_INSTALLER}" -b -u -p "${CONDA_DIR}"; then - echo "ERROR: Miniconda installation failed. Check system requirements and disk space." - rm -f "${TEMP_INSTALLER}" - exit 1 - fi - - # Clean up installer file - rm -f "${TEMP_INSTALLER}" + + check_packages $CONDA_PKG CONDA_SCRIPT="/opt/conda/etc/profile.d/conda.sh" . $CONDA_SCRIPT From 4886b5f6f73c0c4a3ae4e1be22951ac0b2c9f711 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 10 Feb 2026 12:15:55 +0000 Subject: [PATCH 05/13] Fix version to 1.2.1 for semantic versioning --- src/conda/devcontainer-feature.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conda/devcontainer-feature.json b/src/conda/devcontainer-feature.json index 9698ade3d..927495af7 100644 --- a/src/conda/devcontainer-feature.json +++ b/src/conda/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "conda", - "version": "1.1.1", + "version": "1.2.1", "name": "Conda", "description": "A cross-platform, language-agnostic binary package manager", "documentationURL": "https://github.com/devcontainers/features/tree/main/src/conda", From 1e8679994a2d855f3f3f9fe65ba895532c7e6e38 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 10 Feb 2026 12:37:53 +0000 Subject: [PATCH 06/13] Revert to Miniconda installer approach - APT option caused gpgv errors Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com> --- src/conda/install.sh | 47 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 37 insertions(+), 10 deletions(-) diff --git a/src/conda/install.sh b/src/conda/install.sh index 2ef077d43..0b18d2dff 100644 --- a/src/conda/install.sh +++ b/src/conda/install.sh @@ -72,21 +72,48 @@ if ! conda --version &> /dev/null ; then fi usermod -a -G conda "${USERNAME}" - # Install dependencies - check_packages curl ca-certificates gnupg2 + # Install dependencies (only curl and ca-certificates needed for direct download) + check_packages curl ca-certificates echo "Installing Conda..." - curl -sS https://repo.anaconda.com/pkgs/misc/gpgkeys/anaconda.asc | gpg --dearmor > /usr/share/keyrings/conda-archive-keyring.gpg - echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/conda-archive-keyring.gpg] https://repo.anaconda.com/pkgs/misc/debrepo/conda stable main" > /etc/apt/sources.list.d/conda.list - apt-get update -y -o APT::Key::GPGVCommand=1 - - CONDA_PKG="conda=${VERSION}-0" + # Download Miniconda installer directly (avoiding apt repository with SHA1 signature issues) + TEMP_INSTALLER="/tmp/miniconda_installer_$$.sh" + MINICONDA_BASE_URL="https://repo.anaconda.com/miniconda" + + # Determine installer filename based on requested version if [ "${VERSION}" = "latest" ]; then - CONDA_PKG="conda" + INSTALLER_NAME="Miniconda3-latest-Linux-x86_64.sh" + else + # Note: Specific conda versions may require corresponding Python version adjustments + # The py39 base works with conda 4.11.0 and 4.12.0 (as per feature options) + INSTALLER_NAME="Miniconda3-py39_${VERSION}-Linux-x86_64.sh" fi - - check_packages $CONDA_PKG + + # Fetch the installer script with error handling + if ! curl -fsSL "${MINICONDA_BASE_URL}/${INSTALLER_NAME}" -o "${TEMP_INSTALLER}"; then + echo "ERROR: Failed to download Miniconda installer from ${MINICONDA_BASE_URL}/${INSTALLER_NAME}" + echo "Please verify the version specified is valid." + rm -f "${TEMP_INSTALLER}" + exit 1 + fi + + # Verify the installer was downloaded successfully + if [ ! -f "${TEMP_INSTALLER}" ] || [ ! -s "${TEMP_INSTALLER}" ]; then + echo "ERROR: Miniconda installer file is missing or empty" + rm -f "${TEMP_INSTALLER}" + exit 1 + fi + + # Execute installation in silent mode to target directory + if ! bash "${TEMP_INSTALLER}" -b -u -p "${CONDA_DIR}"; then + echo "ERROR: Miniconda installation failed. Check system requirements and disk space." + rm -f "${TEMP_INSTALLER}" + exit 1 + fi + + # Clean up installer file + rm -f "${TEMP_INSTALLER}" CONDA_SCRIPT="/opt/conda/etc/profile.d/conda.sh" . $CONDA_SCRIPT From aee1849062cb2b63b35090d3c51a6f9da1949b23 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 10 Feb 2026 12:38:33 +0000 Subject: [PATCH 07/13] Use mktemp for secure temporary file creation Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com> --- src/conda/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conda/install.sh b/src/conda/install.sh index 0b18d2dff..f48e9cfdc 100644 --- a/src/conda/install.sh +++ b/src/conda/install.sh @@ -78,7 +78,7 @@ if ! conda --version &> /dev/null ; then echo "Installing Conda..." # Download Miniconda installer directly (avoiding apt repository with SHA1 signature issues) - TEMP_INSTALLER="/tmp/miniconda_installer_$$.sh" + TEMP_INSTALLER="$(mktemp -t miniconda_installer_XXXXXX.sh)" MINICONDA_BASE_URL="https://repo.anaconda.com/miniconda" # Determine installer filename based on requested version From ff28af66e919410e6f26e19d289adcb1dc48caae Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 10 Feb 2026 16:42:55 +0000 Subject: [PATCH 08/13] Replace Miniconda installer with direct .deb package download and apt install Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com> --- src/conda/install.sh | 61 +++++++++++++++++++++++++++----------------- 1 file changed, 38 insertions(+), 23 deletions(-) diff --git a/src/conda/install.sh b/src/conda/install.sh index f48e9cfdc..573946c25 100644 --- a/src/conda/install.sh +++ b/src/conda/install.sh @@ -72,48 +72,63 @@ if ! conda --version &> /dev/null ; then fi usermod -a -G conda "${USERNAME}" - # Install dependencies (only curl and ca-certificates needed for direct download) + # Install dependencies check_packages curl ca-certificates echo "Installing Conda..." - # Download Miniconda installer directly (avoiding apt repository with SHA1 signature issues) - TEMP_INSTALLER="$(mktemp -t miniconda_installer_XXXXXX.sh)" - MINICONDA_BASE_URL="https://repo.anaconda.com/miniconda" + # Download .deb package directly from repository (bypassing SHA1 signature issue) + TEMP_DEB="$(mktemp -t conda_XXXXXX.deb)" + CONDA_REPO_BASE="https://repo.anaconda.com/pkgs/misc/debrepo/conda/pool/main/c/conda" - # Determine installer filename based on requested version + # Determine package filename based on requested version if [ "${VERSION}" = "latest" ]; then - INSTALLER_NAME="Miniconda3-latest-Linux-x86_64.sh" + # For latest, we need to query the repository to find the current version + # Use the Packages file from the repository + PACKAGES_URL="https://repo.anaconda.com/pkgs/misc/debrepo/conda/dists/stable/main/binary-$(dpkg --print-architecture)/Packages" + echo "Fetching package list to determine latest version..." + CONDA_PKG_INFO=$(curl -fsSL "${PACKAGES_URL}" | grep -A 20 "^Package: conda$" | head -n 21) + CONDA_VERSION=$(echo "${CONDA_PKG_INFO}" | grep "^Version:" | head -n 1 | awk '{print $2}') + + if [ -z "${CONDA_VERSION}" ]; then + echo "ERROR: Could not determine latest conda version" + rm -f "${TEMP_DEB}" + exit 1 + fi + + CONDA_PKG_NAME="conda_${CONDA_VERSION}_all.deb" else - # Note: Specific conda versions may require corresponding Python version adjustments - # The py39 base works with conda 4.11.0 and 4.12.0 (as per feature options) - INSTALLER_NAME="Miniconda3-py39_${VERSION}-Linux-x86_64.sh" + CONDA_PKG_NAME="conda_${VERSION}-0_all.deb" fi - # Fetch the installer script with error handling - if ! curl -fsSL "${MINICONDA_BASE_URL}/${INSTALLER_NAME}" -o "${TEMP_INSTALLER}"; then - echo "ERROR: Failed to download Miniconda installer from ${MINICONDA_BASE_URL}/${INSTALLER_NAME}" + # Download the .deb package + CONDA_DEB_URL="${CONDA_REPO_BASE}/${CONDA_PKG_NAME}" + echo "Downloading conda package from ${CONDA_DEB_URL}..." + + if ! curl -fsSL "${CONDA_DEB_URL}" -o "${TEMP_DEB}"; then + echo "ERROR: Failed to download conda .deb package from ${CONDA_DEB_URL}" echo "Please verify the version specified is valid." - rm -f "${TEMP_INSTALLER}" + rm -f "${TEMP_DEB}" exit 1 fi - # Verify the installer was downloaded successfully - if [ ! -f "${TEMP_INSTALLER}" ] || [ ! -s "${TEMP_INSTALLER}" ]; then - echo "ERROR: Miniconda installer file is missing or empty" - rm -f "${TEMP_INSTALLER}" + # Verify the package was downloaded successfully + if [ ! -f "${TEMP_DEB}" ] || [ ! -s "${TEMP_DEB}" ]; then + echo "ERROR: Conda .deb package file is missing or empty" + rm -f "${TEMP_DEB}" exit 1 fi - # Execute installation in silent mode to target directory - if ! bash "${TEMP_INSTALLER}" -b -u -p "${CONDA_DIR}"; then - echo "ERROR: Miniconda installation failed. Check system requirements and disk space." - rm -f "${TEMP_INSTALLER}" + # Install the package using apt (which handles dependencies automatically) + echo "Installing conda package..." + if ! apt-get install -y "${TEMP_DEB}"; then + echo "ERROR: Failed to install conda package" + rm -f "${TEMP_DEB}" exit 1 fi - # Clean up installer file - rm -f "${TEMP_INSTALLER}" + # Clean up downloaded package + rm -f "${TEMP_DEB}" CONDA_SCRIPT="/opt/conda/etc/profile.d/conda.sh" . $CONDA_SCRIPT From 9d6e22306da7a289551c1c5d4833aae732461581 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 10 Feb 2026 16:44:17 +0000 Subject: [PATCH 09/13] Fix apt-get install syntax and improve error handling Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com> --- src/conda/devcontainer-feature.json | 2 +- src/conda/install.sh | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/conda/devcontainer-feature.json b/src/conda/devcontainer-feature.json index 927495af7..b1d7faa91 100644 --- a/src/conda/devcontainer-feature.json +++ b/src/conda/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "conda", - "version": "1.2.1", + "version": "1.2.2", "name": "Conda", "description": "A cross-platform, language-agnostic binary package manager", "documentationURL": "https://github.com/devcontainers/features/tree/main/src/conda", diff --git a/src/conda/install.sh b/src/conda/install.sh index 573946c25..52c77b175 100644 --- a/src/conda/install.sh +++ b/src/conda/install.sh @@ -85,19 +85,23 @@ if ! conda --version &> /dev/null ; then if [ "${VERSION}" = "latest" ]; then # For latest, we need to query the repository to find the current version # Use the Packages file from the repository - PACKAGES_URL="https://repo.anaconda.com/pkgs/misc/debrepo/conda/dists/stable/main/binary-$(dpkg --print-architecture)/Packages" + ARCH="$(dpkg --print-architecture 2>/dev/null || echo "amd64")" + PACKAGES_URL="https://repo.anaconda.com/pkgs/misc/debrepo/conda/dists/stable/main/binary-${ARCH}/Packages" echo "Fetching package list to determine latest version..." - CONDA_PKG_INFO=$(curl -fsSL "${PACKAGES_URL}" | grep -A 20 "^Package: conda$" | head -n 21) + CONDA_PKG_INFO=$(curl -fsSL "${PACKAGES_URL}" | grep -A 30 "^Package: conda$" | head -n 31) CONDA_VERSION=$(echo "${CONDA_PKG_INFO}" | grep "^Version:" | head -n 1 | awk '{print $2}') if [ -z "${CONDA_VERSION}" ]; then - echo "ERROR: Could not determine latest conda version" + echo "ERROR: Could not determine latest conda version from ${PACKAGES_URL}" + echo "This may indicate an unsupported architecture or repository unavailability." rm -f "${TEMP_DEB}" exit 1 fi CONDA_PKG_NAME="conda_${CONDA_VERSION}_all.deb" else + # For specific versions, try the standard naming pattern + # Note: Package revision suffix (e.g., -0, -1) may vary; -0 is most common CONDA_PKG_NAME="conda_${VERSION}-0_all.deb" fi @@ -121,7 +125,7 @@ if ! conda --version &> /dev/null ; then # Install the package using apt (which handles dependencies automatically) echo "Installing conda package..." - if ! apt-get install -y "${TEMP_DEB}"; then + if ! apt-get install -y "./${TEMP_DEB}"; then echo "ERROR: Failed to install conda package" rm -f "${TEMP_DEB}" exit 1 From 54beeba978cd7a3752e9e21ea799d20240f4547d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 10 Feb 2026 17:09:44 +0000 Subject: [PATCH 10/13] Fix package filename - use architecture-specific deb and extract Filename from Packages Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com> --- src/conda/install.sh | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/src/conda/install.sh b/src/conda/install.sh index 52c77b175..493e46b67 100644 --- a/src/conda/install.sh +++ b/src/conda/install.sh @@ -79,30 +79,41 @@ if ! conda --version &> /dev/null ; then # Download .deb package directly from repository (bypassing SHA1 signature issue) TEMP_DEB="$(mktemp -t conda_XXXXXX.deb)" - CONDA_REPO_BASE="https://repo.anaconda.com/pkgs/misc/debrepo/conda/pool/main/c/conda" + CONDA_REPO_BASE="https://repo.anaconda.com/pkgs/misc/debrepo/conda" # Determine package filename based on requested version + ARCH="$(dpkg --print-architecture 2>/dev/null || echo "amd64")" + PACKAGES_URL="https://repo.anaconda.com/pkgs/misc/debrepo/conda/dists/stable/main/binary-${ARCH}/Packages" + if [ "${VERSION}" = "latest" ]; then # For latest, we need to query the repository to find the current version - # Use the Packages file from the repository - ARCH="$(dpkg --print-architecture 2>/dev/null || echo "amd64")" - PACKAGES_URL="https://repo.anaconda.com/pkgs/misc/debrepo/conda/dists/stable/main/binary-${ARCH}/Packages" echo "Fetching package list to determine latest version..." CONDA_PKG_INFO=$(curl -fsSL "${PACKAGES_URL}" | grep -A 30 "^Package: conda$" | head -n 31) CONDA_VERSION=$(echo "${CONDA_PKG_INFO}" | grep "^Version:" | head -n 1 | awk '{print $2}') + CONDA_FILENAME=$(echo "${CONDA_PKG_INFO}" | grep "^Filename:" | head -n 1 | awk '{print $2}') - if [ -z "${CONDA_VERSION}" ]; then - echo "ERROR: Could not determine latest conda version from ${PACKAGES_URL}" + if [ -z "${CONDA_VERSION}" ] || [ -z "${CONDA_FILENAME}" ]; then + echo "ERROR: Could not determine latest conda version or filename from ${PACKAGES_URL}" echo "This may indicate an unsupported architecture or repository unavailability." rm -f "${TEMP_DEB}" exit 1 fi - CONDA_PKG_NAME="conda_${CONDA_VERSION}_all.deb" + CONDA_PKG_NAME="${CONDA_FILENAME}" else - # For specific versions, try the standard naming pattern - # Note: Package revision suffix (e.g., -0, -1) may vary; -0 is most common - CONDA_PKG_NAME="conda_${VERSION}-0_all.deb" + # For specific versions, query the Packages file to find the exact filename + echo "Fetching package list to find version ${VERSION}..." + CONDA_PKG_INFO=$(curl -fsSL "${PACKAGES_URL}" | grep -B 5 "^Version: ${VERSION}" | grep -A 30 "^Package: conda$" | head -n 31) + CONDA_FILENAME=$(echo "${CONDA_PKG_INFO}" | grep "^Filename:" | head -n 1 | awk '{print $2}') + + if [ -z "${CONDA_FILENAME}" ]; then + echo "ERROR: Could not find conda version ${VERSION} in ${PACKAGES_URL}" + echo "Please verify the version specified is valid." + rm -f "${TEMP_DEB}" + exit 1 + fi + + CONDA_PKG_NAME="${CONDA_FILENAME}" fi # Download the .deb package From 51c0e8696eb872765dbda7df7a3380be4e1f6b5b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 10 Feb 2026 17:10:02 +0000 Subject: [PATCH 11/13] Update version to 1.2.3 Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com> --- src/conda/devcontainer-feature.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conda/devcontainer-feature.json b/src/conda/devcontainer-feature.json index b1d7faa91..a46a27713 100644 --- a/src/conda/devcontainer-feature.json +++ b/src/conda/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "conda", - "version": "1.2.2", + "version": "1.2.3", "name": "Conda", "description": "A cross-platform, language-agnostic binary package manager", "documentationURL": "https://github.com/devcontainers/features/tree/main/src/conda", From 57c7a77534231ded08b6240d11409b21f555b7e7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 10 Feb 2026 17:20:57 +0000 Subject: [PATCH 12/13] Fix apt-get install path - remove ./ prefix for absolute paths Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com> --- src/conda/devcontainer-feature.json | 2 +- src/conda/install.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conda/devcontainer-feature.json b/src/conda/devcontainer-feature.json index a46a27713..b8e8c404b 100644 --- a/src/conda/devcontainer-feature.json +++ b/src/conda/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "conda", - "version": "1.2.3", + "version": "1.2.4", "name": "Conda", "description": "A cross-platform, language-agnostic binary package manager", "documentationURL": "https://github.com/devcontainers/features/tree/main/src/conda", diff --git a/src/conda/install.sh b/src/conda/install.sh index 493e46b67..51d1a981f 100644 --- a/src/conda/install.sh +++ b/src/conda/install.sh @@ -136,7 +136,7 @@ if ! conda --version &> /dev/null ; then # Install the package using apt (which handles dependencies automatically) echo "Installing conda package..." - if ! apt-get install -y "./${TEMP_DEB}"; then + if ! apt-get install -y "${TEMP_DEB}"; then echo "ERROR: Failed to install conda package" rm -f "${TEMP_DEB}" exit 1 From bbbb460975cb520e8aee389891b7b9eea28d696f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Feb 2026 14:10:30 +0000 Subject: [PATCH 13/13] Fix version matching for specific conda versions - handle version suffixes Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com> --- src/conda/devcontainer-feature.json | 2 +- src/conda/install.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/conda/devcontainer-feature.json b/src/conda/devcontainer-feature.json index b8e8c404b..cd590f9b7 100644 --- a/src/conda/devcontainer-feature.json +++ b/src/conda/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "conda", - "version": "1.2.4", + "version": "1.2.5", "name": "Conda", "description": "A cross-platform, language-agnostic binary package manager", "documentationURL": "https://github.com/devcontainers/features/tree/main/src/conda", diff --git a/src/conda/install.sh b/src/conda/install.sh index 51d1a981f..ef3b6010f 100644 --- a/src/conda/install.sh +++ b/src/conda/install.sh @@ -103,7 +103,8 @@ if ! conda --version &> /dev/null ; then else # For specific versions, query the Packages file to find the exact filename echo "Fetching package list to find version ${VERSION}..." - CONDA_PKG_INFO=$(curl -fsSL "${PACKAGES_URL}" | grep -B 5 "^Version: ${VERSION}" | grep -A 30 "^Package: conda$" | head -n 31) + # Search for version pattern - user may specify 4.12.0 but package has 4.12.0-0 + CONDA_PKG_INFO=$(curl -fsSL "${PACKAGES_URL}" | grep -A 30 "^Package: conda$" | grep -B 5 -A 25 "^Version: ${VERSION}") CONDA_FILENAME=$(echo "${CONDA_PKG_INFO}" | grep "^Filename:" | head -n 1 | awk '{print $2}') if [ -z "${CONDA_FILENAME}" ]; then