Unverified Commit 3e0c0ae1 authored by Jeff Putsch's avatar Jeff Putsch Committed by GitHub

allow common-utils to be installed on "minimal" RHEL-based distributions (#811)

* allow common-utils to be installed on "minimal" RHEL-based distributions.

* bump version to reflect bug fix

* add missing test scripts for alma scenarios

---------
Co-authored-by: 's avatarJeff Putsch <jputsch@analog.com>
parent 4697d25c
{ {
"id": "common-utils", "id": "common-utils",
"version": "2.4.0", "version": "2.4.1",
"name": "Common Utilities", "name": "Common Utilities",
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/common-utils", "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.", "description": "Installs a set of common command line utilities, Oh My Zsh!, and sets up a non-root user.",
...@@ -66,4 +66,4 @@ ...@@ -66,4 +66,4 @@
"description": "Add packages from non-free Debian repository? (Debian only)" "description": "Add packages from non-free Debian repository? (Debian only)"
} }
} }
} }
\ No newline at end of file
...@@ -155,9 +155,12 @@ install_debian_packages() { ...@@ -155,9 +155,12 @@ install_debian_packages() {
install_redhat_packages() { install_redhat_packages() {
local package_list="" local package_list=""
local remove_epel="false" local remove_epel="false"
local install_cmd=dnf local install_cmd=microdnf
if ! type dnf > /dev/null 2>&1; then if ! type microdnf > /dev/null 2>&1; then
install_cmd=yum install_cmd=dnf
if ! type dnf > /dev/null 2>&1; then
install_cmd=yum
fi
fi fi
if [ "${PACKAGES_ALREADY_INSTALLED}" != "true" ]; then if [ "${PACKAGES_ALREADY_INSTALLED}" != "true" ]; then
......
#!/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 "${PLATFORM_ID}" = "platform:el8"
check "curl" curl --version
check "jq" jq --version
# Report result
reportResults
\ No newline at end of file
#!/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 "${PLATFORM_ID}" = "platform:el8"
check "curl" curl --version
check "jq" jq --version
# Report result
reportResults
\ No newline at end of file
#!/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 "${PLATFORM_ID}" = "platform:el9"
check "curl" curl --version
check "jq" jq --version
# Report result
reportResults
\ No newline at end of file
#!/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 "${PLATFORM_ID}" = "platform:el9"
check "curl" curl --version
check "jq" jq --version
# Report result
reportResults
\ No newline at end of file
#!/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 "${PLATFORM_ID}" = "platform:el8"
check "curl" curl --version
check "jq" jq --version
# Report result
reportResults
\ No newline at end of file
#!/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 "${PLATFORM_ID}" = "platform:el9"
check "curl" curl --version
check "jq" jq --version
# Report result
reportResults
\ No newline at end of file
...@@ -41,6 +41,34 @@ ...@@ -41,6 +41,34 @@
"common-utils": {} "common-utils": {}
} }
}, },
"alma-8": {
"image": "almalinux:8",
"remoteUser": "devcontainer",
"features": {
"common-utils": {}
}
},
"alma-9": {
"image": "almalinux:9",
"remoteUser": "devcontainer",
"features": {
"common-utils": {}
}
},
"alma-8-minimal": {
"image": "almalinux:8-minimal",
"remoteUser": "devcontainer",
"features": {
"common-utils": {}
}
},
"alma-9-minimal": {
"image": "almalinux:9-minimal",
"remoteUser": "devcontainer",
"features": {
"common-utils": {}
}
},
"rocky-8": { "rocky-8": {
"image": "rockylinux:8", "image": "rockylinux:8",
"remoteUser": "devcontainer", "remoteUser": "devcontainer",
...@@ -55,6 +83,20 @@ ...@@ -55,6 +83,20 @@
"common-utils": {} "common-utils": {}
} }
}, },
"rocky-8-minimal": {
"image": "rockylinux:8-minimal",
"remoteUser": "devcontainer",
"features": {
"common-utils": {}
}
},
"rocky-9-minimal": {
"image": "rockylinux:9-minimal",
"remoteUser": "devcontainer",
"features": {
"common-utils": {}
}
},
"fedora": { "fedora": {
"image": "fedora", "image": "fedora",
"remoteUser": "devcontainer", "remoteUser": "devcontainer",
...@@ -209,4 +251,4 @@ ...@@ -209,4 +251,4 @@
"common-utils": {} "common-utils": {}
} }
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment