@@ -10,6 +10,10 @@ set -euo pipefail
10
10
# report why it failed. This is meant to be run as part of the build workflow to verify the built
11
11
# .rpm meets some basic criteria for validity.
12
12
13
+ # Notably, CentOS 7 is EOL, so we need to point to the vault for updates. It's not clear what alternative
14
+ # we may use in the future that supports linux/386 as the platform was dropped in CentOS 8+9. The docker_image
15
+ # is passed in as the third argument so that the script can determine if it needs to point to the vault for updates.
16
+
13
17
# set this so we can locate and execute the verify_bin.sh script for verifying version output
14
18
SCRIPT_DIR=" $( cd -- " $( dirname " $0 " ) " > /dev/null 2>&1 ; pwd -P ) "
15
19
@@ -20,6 +24,7 @@ function usage {
20
24
function main {
21
25
local rpm_path=" ${1:- } "
22
26
local expect_version=" ${2:- } "
27
+ local docker_image=" ${3:- } "
23
28
local got_version
24
29
25
30
if [[ -z " ${rpm_path} " ]]; then
@@ -34,6 +39,12 @@ function main {
34
39
exit 1
35
40
fi
36
41
42
+ if [[ -z " ${docker_image} " ]]; then
43
+ echo " ERROR: docker image argument is required"
44
+ usage
45
+ exit 1
46
+ fi
47
+
37
48
# expand globs for path names, if this fails, the script will exit
38
49
rpm_path=$( echo ${rpm_path} )
39
50
@@ -43,6 +54,12 @@ function main {
43
54
exit 1
44
55
fi
45
56
57
+ # CentOS 7 is EOL, so we need to point to the vault for updates
58
+ if [[ " $docker_image " == * centos:7 ]]; then
59
+ sed -i ' s/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
60
+ sed -i ' s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
61
+ fi
62
+
46
63
yum -y clean all
47
64
yum -y update
48
65
yum -y install which openssl
0 commit comments