[Ubuntu] Add Ubuntu-24.04 base image (#9754)

Co-authored-by: Alexey Ayupov <alexey-ayupov@github.com>
This commit is contained in:
Erik Bershel
2024-04-26 23:18:26 +02:00
committed by GitHub
parent 54f59dcb98
commit 3d2dd97aa7
23 changed files with 931 additions and 136 deletions

View File

@@ -42,6 +42,8 @@ apt-get update
# Install jq
apt-get install jq
# Install apt-fast using quick-install.sh
# https://github.com/ilikenwf/apt-fast
bash -c "$(curl -fsSL https://raw.githubusercontent.com/ilikenwf/apt-fast/master/quick-install.sh)"
if ! is_ubuntu24; then
# Install apt-fast using quick-install.sh
# https://github.com/ilikenwf/apt-fast
bash -c "$(curl -fsSL https://raw.githubusercontent.com/ilikenwf/apt-fast/master/quick-install.sh)"
fi

View File

@@ -11,7 +11,7 @@ source $HELPER_SCRIPTS/os.sh
# pin podman due to https://github.com/actions/runner-images/issues/7753
# https://bugs.launchpad.net/ubuntu/+source/libpod/+bug/2024394
#
if is_ubuntu20; then
if ! is_ubuntu22; then
install_packages=(podman buildah skopeo)
else
install_packages=(podman=3.4.4+ds1-1ubuntu1 buildah skopeo)
@@ -27,7 +27,7 @@ if is_ubuntu20; then
echo "deb [arch=amd64 signed-by=$GPG_KEY] ${REPO_URL}/ /" > $REPO_PATH
fi
# Install podman, buildah, scopeo container's tools
# Install podman, buildah, skopeo container's tools
apt-get update
apt-get -y install ${install_packages[@]}
mkdir -p /etc/containers

View File

@@ -48,6 +48,7 @@ done
gid=$(cut -d ":" -f 3 /etc/group | grep "^1..$" | sort -n | tail -n 1 | awk '{ print $1+1 }')
groupmod -g "$gid" docker
chgrp -hR docker /run/docker.sock
chgrp -hR docker /var/run/docker.sock
# Enable docker.service
systemctl is-active --quiet docker.service || systemctl start docker.service

View File

@@ -9,8 +9,10 @@ source $HELPER_SCRIPTS/os.sh
source $HELPER_SCRIPTS/install.sh
# Install GNU C++ compiler
add-apt-repository ppa:ubuntu-toolchain-r/test -y
apt-get update -y
if ! is_ubuntu24 ; then
add-apt-repository ppa:ubuntu-toolchain-r/test -y
apt-get update -y
fi
versions=$(get_toolset_value '.gcc.versions[]')

View File

@@ -9,8 +9,10 @@ source $HELPER_SCRIPTS/install.sh
source $HELPER_SCRIPTS/os.sh
# Install GNU Fortran compiler
add-apt-repository ppa:ubuntu-toolchain-r/test -y
apt-get update -y
if ! is_ubuntu24 ; then
add-apt-repository ppa:ubuntu-toolchain-r/test -y
apt-get update -y
fi
versions=$(get_toolset_value '.gfortran.versions[]')

View File

@@ -69,19 +69,22 @@ echo "deb [signed-by=/usr/share/keyrings/adoptium.gpg] https://packages.adoptium
# Get all the updates from enabled repositories.
apt-get update
defaultVersion=$(get_toolset_value '.java.default')
jdkVersionsToInstall=($(get_toolset_value ".java.versions[]"))
# While Ubuntu 24.04 binaries are not released in the Adoptium repo, we will not install Java
if ! is_ubuntu24; then
defaultVersion=$(get_toolset_value '.java.default')
jdkVersionsToInstall=($(get_toolset_value ".java.versions[]"))
for jdkVersionToInstall in ${jdkVersionsToInstall[@]}; do
install_open_jdk ${jdkVersionToInstall}
for jdkVersionToInstall in ${jdkVersionsToInstall[@]}; do
install_open_jdk ${jdkVersionToInstall}
if [[ ${jdkVersionToInstall} == ${defaultVersion} ]]
then
create_java_environment_variable ${jdkVersionToInstall} True
else
create_java_environment_variable ${jdkVersionToInstall} False
fi
done
if [[ ${jdkVersionToInstall} == ${defaultVersion} ]]
then
create_java_environment_variable ${jdkVersionToInstall} True
else
create_java_environment_variable ${jdkVersionToInstall} False
fi
done
fi
# Install Ant
apt-get install -y --no-install-recommends ant ant-optional

View File

@@ -73,11 +73,11 @@ for version in $php_versions; do
# https://github.com/krakjoe/pcov#interoperability
phpdismod -v $version pcov
if [[ $version == "7.2" || $version == "7.3" ]]; then
if [[ $version == "7.2" || $version == "7.3" || $version == "7.4" ]]; then
apt-get install -y --no-install-recommends php$version-recode
fi
if [[ $version != "8.0" && $version != "8.1" && $version != "8.2" ]]; then
if [[ $version != "8.0" && $version != "8.1" && $version != "8.2" && $version != "8.3" ]]; then
apt-get install -y --no-install-recommends php$version-xmlrpc php$version-json
fi
done

View File

@@ -6,8 +6,16 @@
# Source the helpers for use with the script
source $HELPER_SCRIPTS/install.sh
source $HELPER_SCRIPTS/os.sh
pwsh_version=$(get_toolset_value .pwsh.version)
# Install Powershell
apt-get install -y powershell=$pwsh_version*
if is_ubuntu24; then
dependency_path=$(download_with_retry "http://mirrors.kernel.org/ubuntu/pool/main/i/icu/libicu72_72.1-3ubuntu2_amd64.deb")
sudo dpkg -i "$dependency_path"
package_path=$(download_with_retry "https://github.com/PowerShell/PowerShell/releases/download/v7.4.2/powershell-lts_7.4.2-1.deb_amd64.deb")
sudo dpkg -i "$package_path"
else
apt-get install -y powershell=$pwsh_version*
fi

View File

@@ -16,9 +16,13 @@ apt-get install -y --no-install-recommends python3 python3-dev python3-pip pytho
# Set pipx custom directory
export PIPX_BIN_DIR=/opt/pipx_bin
export PIPX_HOME=/opt/pipx
python3 -m pip install pipx
python3 -m pipx ensurepath
if is_ubuntu24; then
apt-get install -y --no-install-recommends pipx
pipx ensurepath
else
python3 -m pip install pipx
python3 -m pipx ensurepath
fi
# Update /etc/environment
set_etc_environment_variable "PIPX_BIN_DIR" $PIPX_BIN_DIR
set_etc_environment_variable "PIPX_HOME" $PIPX_HOME

View File

@@ -21,7 +21,9 @@ rustup component add rustfmt clippy
if is_ubuntu22; then
cargo install bindgen-cli cbindgen cargo-audit cargo-outdated
else
fi
if is_ubuntu20; then
cargo install --locked bindgen-cli cbindgen cargo-audit cargo-outdated
fi