|
|
@ -10,6 +10,10 @@ set -euo pipefail |
|
|
|
# report why it failed. This is meant to be run as part of the build workflow to verify the built |
|
|
|
# report why it failed. This is meant to be run as part of the build workflow to verify the built |
|
|
|
# .rpm meets some basic criteria for validity. |
|
|
|
# .rpm meets some basic criteria for validity. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Notably, CentOS 7 is EOL, so we need to point to the vault for updates. It's not clear what alternative |
|
|
|
|
|
|
|
# we may use in the future that supports linux/386 as the platform was dropped in CentOS 8+9. The docker_image |
|
|
|
|
|
|
|
# is passed in as the third argument so that the script can determine if it needs to point to the vault for updates. |
|
|
|
|
|
|
|
|
|
|
|
# set this so we can locate and execute the verify_bin.sh script for verifying version output |
|
|
|
# set this so we can locate and execute the verify_bin.sh script for verifying version output |
|
|
|
SCRIPT_DIR="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" |
|
|
|
SCRIPT_DIR="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" |
|
|
|
|
|
|
|
|
|
|
@ -20,6 +24,7 @@ function usage { |
|
|
|
function main { |
|
|
|
function main { |
|
|
|
local rpm_path="${1:-}" |
|
|
|
local rpm_path="${1:-}" |
|
|
|
local expect_version="${2:-}" |
|
|
|
local expect_version="${2:-}" |
|
|
|
|
|
|
|
local docker_image="${3:-}" |
|
|
|
local got_version |
|
|
|
local got_version |
|
|
|
|
|
|
|
|
|
|
|
if [[ -z "${rpm_path}" ]]; then |
|
|
|
if [[ -z "${rpm_path}" ]]; then |
|
|
@ -34,6 +39,12 @@ function main { |
|
|
|
exit 1 |
|
|
|
exit 1 |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [[ -z "${docker_image}" ]]; then |
|
|
|
|
|
|
|
echo "ERROR: docker image argument is required" |
|
|
|
|
|
|
|
usage |
|
|
|
|
|
|
|
exit 1 |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
# expand globs for path names, if this fails, the script will exit |
|
|
|
# expand globs for path names, if this fails, the script will exit |
|
|
|
rpm_path=$(echo ${rpm_path}) |
|
|
|
rpm_path=$(echo ${rpm_path}) |
|
|
|
|
|
|
|
|
|
|
@ -43,6 +54,12 @@ function main { |
|
|
|
exit 1 |
|
|
|
exit 1 |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# CentOS 7 is EOL, so we need to point to the vault for updates |
|
|
|
|
|
|
|
if [[ "$docker_image" == *centos:7 ]]; then |
|
|
|
|
|
|
|
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* |
|
|
|
|
|
|
|
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
yum -y clean all |
|
|
|
yum -y clean all |
|
|
|
yum -y update |
|
|
|
yum -y update |
|
|
|
yum -y install which openssl |
|
|
|
yum -y install which openssl |
|
|
|