Unverified Commit 17518581 authored by Dmytro Kyrychuk's avatar Dmytro Kyrychuk Committed by GitHub

common-utils: add bash-completion (#1048)

* common-utils: add bash-completion

Resolve #1043

* update centos7 .repo files to reference vault.centos.org instead of mirrorlist.centos.org

Copied from src/git/install.sh

---------
Co-authored-by: 's avatarSamruddhi Khandale <skhandale@microsoft.com>
parent 5f4d2010
{
"id": "common-utils",
"version": "2.4.4",
"version": "2.4.5",
"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.",
......
......@@ -32,6 +32,7 @@ install_debian_packages() {
if [ "${PACKAGES_ALREADY_INSTALLED}" != "true" ]; then
package_list="${package_list} \
apt-utils \
bash-completion \
openssh-client \
gnupg2 \
dirmngr \
......@@ -170,6 +171,7 @@ install_redhat_packages() {
if [ "${PACKAGES_ALREADY_INSTALLED}" != "true" ]; then
package_list="${package_list} \
gawk \
bash-completion \
openssh-clients \
gnupg2 \
iproute \
......@@ -254,6 +256,7 @@ install_alpine_packages() {
if [ "${PACKAGES_ALREADY_INSTALLED}" != "true" ]; then
apk add --no-cache \
openssh-client \
bash-completion \
gnupg \
procps \
lsof \
......@@ -343,6 +346,7 @@ if [ "${ID}" = "debian" ] || [ "${ID_LIKE}" = "debian" ]; then
ADJUSTED_ID="debian"
elif [[ "${ID}" = "rhel" || "${ID}" = "fedora" || "${ID}" = "mariner" || "${ID_LIKE}" = *"rhel"* || "${ID_LIKE}" = *"fedora"* || "${ID_LIKE}" = *"mariner"* ]]; then
ADJUSTED_ID="rhel"
VERSION_CODENAME="${ID}${VERSION_ID}"
elif [ "${ID}" = "alpine" ]; then
ADJUSTED_ID="alpine"
else
......@@ -350,6 +354,14 @@ else
exit 1
fi
if [ "${ADJUSTED_ID}" = "rhel" ] && [ "${VERSION_CODENAME-}" = "centos7" ]; then
# As of 1 July 2024, mirrorlist.centos.org no longer exists.
# Update the repo files to reference vault.centos.org.
sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo
fi
# Install packages for appropriate OS
case "${ADJUSTED_ID}" in
"debian")
......
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