From 3d9c0497f495b49741c325591150a8635b08da78 Mon Sep 17 00:00:00 2001 From: Jeff Neel <10672501+jeff350@users.noreply.github.com> Date: Mon, 12 Sep 2022 23:10:12 -0500 Subject: [PATCH 01/12] strip .0 --- bootstrap-salt.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 65e8f041a..fa0b4bc1f 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -639,10 +639,9 @@ elif [ "$ITYPE" = "onedir" ]; then if [ "$(echo "$1" | grep -E '^(latest)$')" != "" ]; then ONEDIR_REV="$1" shift - elif [ "$(echo "$1" | grep -E '^([3-9][0-9]{3}?-[0-9]$)')" != "" ]; then + elif [ "$(echo "$1" | grep -E '^([3-9][0-9]{3}(\.[0-9]))')" != "" ]; then # Handle the 3xxx.0 version as 3xxx archive (pin to minor) and strip the fake ".0" suffix - #ONEDIR_REV=$(echo "$1" | sed -E 's/^([3-9][0-9]{3})\.0$/\1/') - ONEDIR_REV="minor/$1" + ONEDIR_REV=$(echo "$1" | sed -E 's/^([3-9][0-9]{3})\.0$/\1/') shift else echo "Unknown stable version: $1 (valid: 3005, latest.)" From f9b6cf3628a39caaff05c87637b465cc9f3b417a Mon Sep 17 00:00:00 2001 From: Jeff Neel <10672501+jeff350@users.noreply.github.com> Date: Tue, 13 Sep 2022 00:14:46 -0500 Subject: [PATCH 02/12] fix regex --- bootstrap-salt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index fa0b4bc1f..957c8d061 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -639,7 +639,7 @@ elif [ "$ITYPE" = "onedir" ]; then if [ "$(echo "$1" | grep -E '^(latest)$')" != "" ]; then ONEDIR_REV="$1" shift - elif [ "$(echo "$1" | grep -E '^([3-9][0-9]{3}(\.[0-9]))')" != "" ]; then + elif [ "$(echo "$1" | grep -E '^([3-9][0-9]{3}(\.[0-9]*))')" != "" ]; then # Handle the 3xxx.0 version as 3xxx archive (pin to minor) and strip the fake ".0" suffix ONEDIR_REV=$(echo "$1" | sed -E 's/^([3-9][0-9]{3})\.0$/\1/') shift From 04257ca5b3da5714cb151b10f007bfddde6ea115 Mon Sep 17 00:00:00 2001 From: Jeff Neel <10672501+jeff350@users.noreply.github.com> Date: Tue, 13 Sep 2022 00:31:59 -0500 Subject: [PATCH 03/12] fix regex --- bootstrap-salt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 957c8d061..bc497b78d 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -639,7 +639,7 @@ elif [ "$ITYPE" = "onedir" ]; then if [ "$(echo "$1" | grep -E '^(latest)$')" != "" ]; then ONEDIR_REV="$1" shift - elif [ "$(echo "$1" | grep -E '^([3-9][0-9]{3}(\.[0-9]*))')" != "" ]; then + elif [ "$(echo "$1" | grep -E '^([3-9][0-9]{3}(\.[0-9]*)?)')" != "" ]; then # Handle the 3xxx.0 version as 3xxx archive (pin to minor) and strip the fake ".0" suffix ONEDIR_REV=$(echo "$1" | sed -E 's/^([3-9][0-9]{3})\.0$/\1/') shift From 9629b2615270ef52403796c0fe7549d3a5aa1ec1 Mon Sep 17 00:00:00 2001 From: Jeff Neel <10672501+jeff350@users.noreply.github.com> Date: Wed, 14 Sep 2022 08:31:44 -0500 Subject: [PATCH 04/12] support format MAJOR-MINOR --- bootstrap-salt.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index bc497b78d..4d9871cfe 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -639,6 +639,9 @@ elif [ "$ITYPE" = "onedir" ]; then if [ "$(echo "$1" | grep -E '^(latest)$')" != "" ]; then ONEDIR_REV="$1" shift + elif [ "$(echo "$1" | grep -E '^([3-9][0-9]{3}?-[0-9]$)')" != "" ]; then + ONEDIR_REV="minor/$1" + shift elif [ "$(echo "$1" | grep -E '^([3-9][0-9]{3}(\.[0-9]*)?)')" != "" ]; then # Handle the 3xxx.0 version as 3xxx archive (pin to minor) and strip the fake ".0" suffix ONEDIR_REV=$(echo "$1" | sed -E 's/^([3-9][0-9]{3})\.0$/\1/') From 2ff7097facfa23ea77e1673beee45053fb8673c1 Mon Sep 17 00:00:00 2001 From: Jeff Neel <10672501+jeff350@users.noreply.github.com> Date: Thu, 15 Sep 2022 13:44:19 -0500 Subject: [PATCH 05/12] correct regex as requested --- bootstrap-salt.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 4d9871cfe..809085c5e 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -636,15 +636,13 @@ elif [ "$ITYPE" = "onedir" ]; then if [ "$#" -eq 0 ];then ONEDIR_REV="latest" else - if [ "$(echo "$1" | grep -E '^(latest)$')" != "" ]; then + if [ "$(echo "$1" | grep -E '^(latest|3005)$')" != "" ]; then ONEDIR_REV="$1" shift - elif [ "$(echo "$1" | grep -E '^([3-9][0-9]{3}?-[0-9]$)')" != "" ]; then - ONEDIR_REV="minor/$1" - shift elif [ "$(echo "$1" | grep -E '^([3-9][0-9]{3}(\.[0-9]*)?)')" != "" ]; then # Handle the 3xxx.0 version as 3xxx archive (pin to minor) and strip the fake ".0" suffix ONEDIR_REV=$(echo "$1" | sed -E 's/^([3-9][0-9]{3})\.0$/\1/') + ONEDIR_REV="minor/$ONEDIR_REV" shift else echo "Unknown stable version: $1 (valid: 3005, latest.)" From 0ece40cd0fea1188188a9a7a89d84acf2d425ba7 Mon Sep 17 00:00:00 2001 From: "Gareth J. Greenaway" Date: Thu, 1 Sep 2022 13:05:48 -0700 Subject: [PATCH 06/12] Update the bootstrap script to work with final onedir releases. --- bootstrap-salt.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 19e412403..65e8f041a 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -639,10 +639,10 @@ elif [ "$ITYPE" = "onedir" ]; then if [ "$(echo "$1" | grep -E '^(latest)$')" != "" ]; then ONEDIR_REV="$1" shift - elif [ "$(echo "$1" | grep -E '^([3-9][0-9]{3}(\.[0-9]*)?)$')" != "" ]; then + elif [ "$(echo "$1" | grep -E '^([3-9][0-9]{3}?-[0-9]$)')" != "" ]; then # Handle the 3xxx.0 version as 3xxx archive (pin to minor) and strip the fake ".0" suffix - ONEDIR_REV=$(echo "$1" | sed -E 's/^([3-9][0-9]{3})\.0$/\1/') - ONEDIR_REV="minor/$ONEDIR_REV" + #ONEDIR_REV=$(echo "$1" | sed -E 's/^([3-9][0-9]{3})\.0$/\1/') + ONEDIR_REV="minor/$1" shift else echo "Unknown stable version: $1 (valid: 3005, latest.)" @@ -669,7 +669,7 @@ elif [ "$ITYPE" = "onedir_rc" ]; then ONEDIR_REV="minor/$1" shift else - echo "Unknown stable version: $1 (valid: 3005, latest.)" + echo "Unknown stable version: $1 (valid: 3005-1, latest.)" exit 1 fi fi @@ -4491,7 +4491,7 @@ enabled=1 enabled_metadata=1 _eof - fetch_url="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_DIR}/${__PY_VERSION_REPO}/redhat/${DISTRO_MAJOR_VERSION}/${CPU_ARCH_L}/" + fetch_url="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_DIR}/${__PY_VERSION_REPO}/redhat/${DISTRO_MAJOR_VERSION}/${CPU_ARCH_L}/${ONEDIR_REV}/" for key in $gpg_key; do __rpm_import_gpg "${fetch_url}${key}" || return 1 done From f95303449ce8df260cf7254389073a961343feaf Mon Sep 17 00:00:00 2001 From: Jeff Neel <10672501+jeff350@users.noreply.github.com> Date: Mon, 12 Sep 2022 23:10:12 -0500 Subject: [PATCH 07/12] strip .0 --- bootstrap-salt.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 65e8f041a..fa0b4bc1f 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -639,10 +639,9 @@ elif [ "$ITYPE" = "onedir" ]; then if [ "$(echo "$1" | grep -E '^(latest)$')" != "" ]; then ONEDIR_REV="$1" shift - elif [ "$(echo "$1" | grep -E '^([3-9][0-9]{3}?-[0-9]$)')" != "" ]; then + elif [ "$(echo "$1" | grep -E '^([3-9][0-9]{3}(\.[0-9]))')" != "" ]; then # Handle the 3xxx.0 version as 3xxx archive (pin to minor) and strip the fake ".0" suffix - #ONEDIR_REV=$(echo "$1" | sed -E 's/^([3-9][0-9]{3})\.0$/\1/') - ONEDIR_REV="minor/$1" + ONEDIR_REV=$(echo "$1" | sed -E 's/^([3-9][0-9]{3})\.0$/\1/') shift else echo "Unknown stable version: $1 (valid: 3005, latest.)" From 6e1d3a8ab4be163233ea97acce406f224e208f8d Mon Sep 17 00:00:00 2001 From: Jeff Neel <10672501+jeff350@users.noreply.github.com> Date: Tue, 13 Sep 2022 00:14:46 -0500 Subject: [PATCH 08/12] fix regex --- bootstrap-salt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index fa0b4bc1f..957c8d061 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -639,7 +639,7 @@ elif [ "$ITYPE" = "onedir" ]; then if [ "$(echo "$1" | grep -E '^(latest)$')" != "" ]; then ONEDIR_REV="$1" shift - elif [ "$(echo "$1" | grep -E '^([3-9][0-9]{3}(\.[0-9]))')" != "" ]; then + elif [ "$(echo "$1" | grep -E '^([3-9][0-9]{3}(\.[0-9]*))')" != "" ]; then # Handle the 3xxx.0 version as 3xxx archive (pin to minor) and strip the fake ".0" suffix ONEDIR_REV=$(echo "$1" | sed -E 's/^([3-9][0-9]{3})\.0$/\1/') shift From b8be8149bc238fd58b78e0e452634f09e7dc6096 Mon Sep 17 00:00:00 2001 From: Jeff Neel <10672501+jeff350@users.noreply.github.com> Date: Tue, 13 Sep 2022 00:31:59 -0500 Subject: [PATCH 09/12] fix regex --- bootstrap-salt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 957c8d061..bc497b78d 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -639,7 +639,7 @@ elif [ "$ITYPE" = "onedir" ]; then if [ "$(echo "$1" | grep -E '^(latest)$')" != "" ]; then ONEDIR_REV="$1" shift - elif [ "$(echo "$1" | grep -E '^([3-9][0-9]{3}(\.[0-9]*))')" != "" ]; then + elif [ "$(echo "$1" | grep -E '^([3-9][0-9]{3}(\.[0-9]*)?)')" != "" ]; then # Handle the 3xxx.0 version as 3xxx archive (pin to minor) and strip the fake ".0" suffix ONEDIR_REV=$(echo "$1" | sed -E 's/^([3-9][0-9]{3})\.0$/\1/') shift From 8e5464bbc494332b7f34775dbf7950ab46caadce Mon Sep 17 00:00:00 2001 From: Jeff Neel <10672501+jeff350@users.noreply.github.com> Date: Wed, 14 Sep 2022 08:31:44 -0500 Subject: [PATCH 10/12] support format MAJOR-MINOR --- bootstrap-salt.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index bc497b78d..4d9871cfe 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -639,6 +639,9 @@ elif [ "$ITYPE" = "onedir" ]; then if [ "$(echo "$1" | grep -E '^(latest)$')" != "" ]; then ONEDIR_REV="$1" shift + elif [ "$(echo "$1" | grep -E '^([3-9][0-9]{3}?-[0-9]$)')" != "" ]; then + ONEDIR_REV="minor/$1" + shift elif [ "$(echo "$1" | grep -E '^([3-9][0-9]{3}(\.[0-9]*)?)')" != "" ]; then # Handle the 3xxx.0 version as 3xxx archive (pin to minor) and strip the fake ".0" suffix ONEDIR_REV=$(echo "$1" | sed -E 's/^([3-9][0-9]{3})\.0$/\1/') From f741160d13e87ed1a74d9b375876d9788156ad30 Mon Sep 17 00:00:00 2001 From: Jeff Neel <10672501+jeff350@users.noreply.github.com> Date: Thu, 15 Sep 2022 13:44:19 -0500 Subject: [PATCH 11/12] correct regex as requested --- bootstrap-salt.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 4d9871cfe..809085c5e 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -636,15 +636,13 @@ elif [ "$ITYPE" = "onedir" ]; then if [ "$#" -eq 0 ];then ONEDIR_REV="latest" else - if [ "$(echo "$1" | grep -E '^(latest)$')" != "" ]; then + if [ "$(echo "$1" | grep -E '^(latest|3005)$')" != "" ]; then ONEDIR_REV="$1" shift - elif [ "$(echo "$1" | grep -E '^([3-9][0-9]{3}?-[0-9]$)')" != "" ]; then - ONEDIR_REV="minor/$1" - shift elif [ "$(echo "$1" | grep -E '^([3-9][0-9]{3}(\.[0-9]*)?)')" != "" ]; then # Handle the 3xxx.0 version as 3xxx archive (pin to minor) and strip the fake ".0" suffix ONEDIR_REV=$(echo "$1" | sed -E 's/^([3-9][0-9]{3})\.0$/\1/') + ONEDIR_REV="minor/$ONEDIR_REV" shift else echo "Unknown stable version: $1 (valid: 3005, latest.)" From b7bd0f47f3906bdd79eb4cb458ea0f44b5a5368d Mon Sep 17 00:00:00 2001 From: pjcreath Date: Fri, 17 Jun 2022 20:58:32 +0000 Subject: [PATCH 12/12] Install Oracle's EPEL repo on Oracle Linux 7 and 8. --- bootstrap-salt.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 809085c5e..6eed0f736 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -5287,6 +5287,15 @@ install_red_hat_enterprise_workstation_testing_post() { # Oracle Linux Install Functions # install_oracle_linux_stable_deps() { + # Install Oracle's EPEL. + if [ ${_EPEL_REPOS_INSTALLED} -eq $BS_FALSE ]; then + _EPEL_REPO=oracle-epel-release-el${DISTRO_MAJOR_VERSION} + if ! rpm -q "${_EPEL_REPO}" > /dev/null; then + __yum_install_noinput "${_EPEL_REPO}" + fi + _EPEL_REPOS_INSTALLED=$BS_TRUE + fi + install_centos_stable_deps || return 1 return 0 }