Skip to content

Commit

Permalink
Initial attempt to add Rocky Linux support
Browse files Browse the repository at this point in the history
  • Loading branch information
electrocucaracha committed Jan 12, 2023
1 parent 3c46118 commit e7c5834
Show file tree
Hide file tree
Showing 24 changed files with 40 additions and 25 deletions.
2 changes: 2 additions & 0 deletions ci/update_distros.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ _vagrant_pull "opensuse_leap" "opensuse/Leap-15.2.x86_64" "opensuse/leap"
_vagrant_pull "debian_jessie" "generic/debian8" "debian:jessie"
_vagrant_pull "debian_stretch" "generic/debian9" "debian:stretch"
_vagrant_pull "debian_buster" "generic/debian10" "debian:buster"
_vagrant_pull "rocky_8" "rockylinux/8" "rockylinux:8"
_vagrant_pull "rocky_9" "rockylinux/9" "rockylinux:9"

if [ "$msg" ]; then
echo -e "$msg"
Expand Down
8 changes: 8 additions & 0 deletions distros_supported.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,11 @@ linux:
name: generic/debian10
version: "4.2.6"
image: debian:buster
- alias: rocky_8
name: rockylinux/8
version: "7.0.0"
image: rockylinux:8
- alias: rocky_9
name: rockylinux/9
version: "1.0.0"
image: rockylinux:9
4 changes: 2 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function update_repos {
echo '* libraries/restart-without-asking boolean true' | sudo debconf-set-selections
sudo apt-get update
;;
rhel | centos | fedora)
rhel | centos | fedora | rocky)
PKG_MANAGER=$(command -v dnf || command -v yum)
if ! sudo "$PKG_MANAGER" repolist | grep "epel/"; then
sudo -H -E "$PKG_MANAGER" -q -y install epel-release
Expand Down Expand Up @@ -171,7 +171,7 @@ function main {
INSTALLER_CMD+=" install"
PKG_OS_FAMILY="Debian"
;;
rhel | centos | fedora)
rhel | centos | fedora | rocky)
INSTALLER_CMD="$(command -v dnf || command -v yum) -y"
if [[ ${PKG_DEBUG:-false} == "false" ]]; then
INSTALLER_CMD+=" --quiet --errorlevel=0"
Expand Down
2 changes: 1 addition & 1 deletion src/act/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function install_pkgs {
# shellcheck disable=SC2068
$INSTALLER_CMD --no-install-recommends install $@
;;
rhel | centos | fedora)
rhel | centos | fedora | rocky)
INSTALLER_CMD+="$(command -v dnf || command -v yum) -y"
if [[ ${PKG_DEBUG:-false} == "false" ]]; then
INSTALLER_CMD+=" --quiet --errorlevel=0"
Expand Down
2 changes: 1 addition & 1 deletion src/aws/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function install_pkgs {
# shellcheck disable=SC2068
$INSTALLER_CMD --no-install-recommends install $@
;;
rhel | centos | fedora)
rhel | centos | fedora | rocky)
INSTALLER_CMD+="$(command -v dnf || command -v yum) -y"
if [[ ${PKG_DEBUG:-false} == "false" ]]; then
INSTALLER_CMD+=" --quiet --errorlevel=0"
Expand Down
2 changes: 1 addition & 1 deletion src/cni-plugins/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function install_pkgs {
# shellcheck disable=SC2068
$INSTALLER_CMD --no-install-recommends install $@
;;
rhel | centos | fedora)
rhel | centos | fedora | rocky)
INSTALLER_CMD+="$(command -v dnf || command -v yum) -y"
if [[ ${PKG_DEBUG:-false} == "false" ]]; then
INSTALLER_CMD+=" --quiet --errorlevel=0"
Expand Down
2 changes: 1 addition & 1 deletion src/crystal-lang/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function install_pkgs {
# shellcheck disable=SC2068
$INSTALLER_CMD --no-install-recommends install $@
;;
rhel | centos | fedora)
rhel | centos | fedora | rocky)
INSTALLER_CMD+="$(command -v dnf || command -v yum) -y"
if [[ ${PKG_DEBUG:-false} == "false" ]]; then
INSTALLER_CMD+=" --quiet --errorlevel=0"
Expand Down
7 changes: 6 additions & 1 deletion src/docker/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function main {
fi
INSTALLER_CMD+=" install -y --no-recommends"
;;
rhel | centos | fedora)
rhel | centos | fedora | rocky)
INSTALLER_CMD+="$(command -v dnf || command -v yum) -y install"
if [[ ${PKG_DEBUG:-false} == "false" ]]; then
INSTALLER_CMD+=" --quiet --errorlevel=0"
Expand Down Expand Up @@ -138,6 +138,11 @@ function main {
sudo sed -i "s/FirewallBackend=.*/FirewallBackend=iptables/g" /etc/firewalld/firewalld.conf
sudo systemctl restart firewalld
;;
rocky)
export PKG_DOCKER_INSTALL_ROOTLESS=false
sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
$INSTALLER_CMD docker-ce docker-ce-cli containerd.io
;;
ubuntu | debian)
if [[ $VERSION_ID != "20.04" ]]; then
# Issue has been submitted for this case (https://github.com/wagoodman/dive/issues/418)
Expand Down
2 changes: 1 addition & 1 deletion src/go-lang/_requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if ! command -v go; then
sudo apt-get update -qq >/dev/null
sudo apt-get install -y -qq -o=Dpkg::Use-Pty=0 golang
;;
rhel | centos | fedora)
rhel | centos | fedora | rocky)
# shellcheck disable=SC2046
sudo $(command -v dnf || command -v yum) -y --quiet --errorlevel=0 install golang
;;
Expand Down
2 changes: 1 addition & 1 deletion src/go-lang/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function main {
sudo apt autoremove -y -qq golang
fi
;;
rhel | centos | fedora)
rhel | centos | fedora | rocky)
if rpm -q golang &>/dev/null; then
# shellcheck disable=SC2046
sudo $(command -v dnf || command -v yum) -y --quiet --errorlevel=0 autoremove golang
Expand Down
2 changes: 1 addition & 1 deletion src/helm/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function install_pkgs {
# shellcheck disable=SC2068
$INSTALLER_CMD --no-install-recommends install $@
;;
rhel | centos | fedora)
rhel | centos | fedora | rocky)
INSTALLER_CMD+="$(command -v dnf || command -v yum) -y"
if [[ ${PKG_DEBUG:-false} == "false" ]]; then
INSTALLER_CMD+=" --quiet --errorlevel=0"
Expand Down
2 changes: 1 addition & 1 deletion src/kind/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function install_pkgs {
# shellcheck disable=SC2068
$INSTALLER_CMD --no-install-recommends install $@
;;
rhel | centos | fedora)
rhel | centos | fedora | rocky)
INSTALLER_CMD+="$(command -v dnf || command -v yum) -y"
if [[ ${PKG_DEBUG:-false} == "false" ]]; then
INSTALLER_CMD+=" --quiet --errorlevel=0"
Expand Down
2 changes: 1 addition & 1 deletion src/kubectl/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function install_pkgs {
# shellcheck disable=SC2068
$INSTALLER_CMD --no-install-recommends install $@
;;
rhel | centos | fedora)
rhel | centos | fedora | rocky)
INSTALLER_CMD+="$(command -v dnf || command -v yum) -y"
if [[ ${PKG_DEBUG:-false} == "false" ]]; then
INSTALLER_CMD+=" --quiet --errorlevel=0"
Expand Down
2 changes: 1 addition & 1 deletion src/libvirt/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function main {
echo '* libraries/restart-without-asking boolean true' | sudo debconf-set-selections
sudo apt-get update
;;
rhel | centos | fedora)
rhel | centos | fedora | rocky)
PKG_MANAGER=$(command -v dnf || command -v yum)
INSTALLER_CMD="${PKG_MANAGER} -y"
if [[ ${PKG_DEBUG:-false} == "false" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion src/nfs/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function main {
sudo apt update
sudo -H -E apt-get -y install --no-install-recommends nfs-kernel-server
;;
rhel | centos | fedora)
rhel | centos | fedora | rocky)
INSTALLER_CMD="sudo -H -E $(command -v dnf || command -v yum) -y install nfs-utils"
if _vercmp "${VERSION_ID}" '<=' "7"; then
INSTALLER_CMD+=" nfs-utils-lib"
Expand Down
2 changes: 1 addition & 1 deletion src/nodejs/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function main {
sudo update-ca-certificates
INSTALLER_CMD+=" --no-install-recommends nodejs"
;;
rhel | centos | fedora)
rhel | centos | fedora | rocky)
url="https://rpm"
INSTALLER_CMD+="$(command -v dnf || command -v yum) -y"
if [[ ${PKG_DEBUG:-false} == "false" ]]; then
Expand Down
6 changes: 3 additions & 3 deletions src/pip/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function main {
fi
INSTALLER_CMD+=" --no-install-recommends install"
;;
rhel | centos | fedora)
rhel | centos | fedora | rocky)
PKG_MANAGER=$(command -v dnf || command -v yum)
INSTALLER_CMD="sudo -H -E ${PKG_MANAGER} -y"
if [[ ${PKG_DEBUG:-false} == "false" ]]; then
Expand Down Expand Up @@ -97,7 +97,7 @@ function main {
# shellcheck disable=SC2086
$INSTALLER_CMD $pkgs
;;
rhel | centos | fedora)
rhel | centos | fedora | rocky)
$INSTALLER_CMD yum-utils python2
for file in yum yum-config-manager; do
echo "INFO: Setting $file to use python 2"
Expand All @@ -122,7 +122,7 @@ function main {
pkgs="python3-setuptools python3.4"
sudo sed -i "s|#! /usr/bin/python|#! $(command -v python2)|g" "$(command -v lsb_release)"
;;
rhel | centos | fedora)
rhel | centos | fedora | rocky)
pkgs="python3"
;;
esac
Expand Down
2 changes: 1 addition & 1 deletion src/podman/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ EOF
$INSTALLER_CMD --reinstall ca-certificates
sudo apt-get update
;;
rhel | centos | fedora)
rhel | centos | fedora | rocky)
PKG_MANAGER=$(command -v dnf || command -v yum)
INSTALLER_CMD="sudo -H -E ${PKG_MANAGER} -y"
if [[ ${PKG_DEBUG:-false} == "false" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion src/qat-driver/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function main {
echo '* libraries/restart-without-asking boolean true' | sudo debconf-set-selections
sudo apt-get update
;;
rhel | centos | fedora)
rhel | centos | fedora | rocky)
PKG_MANAGER=$(command -v dnf || command -v yum)
sudo "${PKG_MANAGER}" groups mark install -y "Development Tools"
sudo "${PKG_MANAGER}" groups install -y "Development Tools"
Expand Down
2 changes: 1 addition & 1 deletion src/qemu/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ function main {
install_pmdk
fi
;;
rhel | centos | fedora)
rhel | centos | fedora | rocky)
configure_flags+=" --enable-numa"
PKG_MANAGER=$(command -v dnf || command -v yum)
sudo -H -E "${PKG_MANAGER}" -y install python36 gcc make \
Expand Down
2 changes: 1 addition & 1 deletion src/skopeo/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function main {
$INSTALLER_CMD --reinstall ca-certificates
sudo apt-get update
;;
rhel | centos | fedora)
rhel | centos | fedora | rocky)
INSTALLER_CMD+="$(command -v dnf || command -v yum) -y"
if [[ ${PKG_DEBUG:-false} == "false" ]]; then
INSTALLER_CMD+=" --quiet --errorlevel=0"
Expand Down
2 changes: 1 addition & 1 deletion src/terraform/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function main {
fi
INSTALLER_CMD+=" --no-install-recommends install"
;;
rhel | centos | fedora)
rhel | centos | fedora | rocky)
INSTALLER_CMD+="$(command -v dnf || command -v yum) -y"
if [[ ${PKG_DEBUG:-false} == "false" ]]; then
INSTALLER_CMD+=" --quiet --errorlevel=0"
Expand Down
2 changes: 1 addition & 1 deletion src/vagrant/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ function main {
fi
fi
;;
rhel | centos | fedora)
rhel | centos | fedora | rocky)
vagrant_pkg+="rpm"
PKG_MANAGER=$(command -v dnf || command -v yum)
if [[ ${PKG_DEBUG:-false} == "true" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion src/virtualbox/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function main {
sudo apt-get update -qq >/dev/null
eval "sudo apt-get install -y -qq -o=Dpkg::Use-Pty=0 $pkgs"
;;
rhel | centos | fedora)
rhel | centos | fedora | rocky)
PKG_MANAGER=$(command -v dnf || command -v yum)
if [[ ${PKG_DEBUG:-false} == "true" ]]; then
sudo curl -o /etc/yum.repos.d/virtualbox.repo https://download.virtualbox.org/virtualbox/rpm/el/virtualbox.repo
Expand Down

0 comments on commit e7c5834

Please sign in to comment.