Skip to content

Commit 22c8083

Browse files
committed
[ci skip] [packaging] Fix CentOS-8 packaging, fix pgpro-std tests
1 parent 0834e54 commit 22c8083

File tree

3 files changed

+33
-6
lines changed

3 files changed

+33
-6
lines changed

packaging/pkg/scripts/rpm.sh

+8
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,15 @@ ulimit -n 1024
2020

2121
if [ ${DISTRIB} = 'centos' ] ; then
2222
sed -i 's|^baseurl=http://|baseurl=https://|g' /etc/yum.repos.d/*.repo
23+
if [ ${DISTRIB_VERSION} = '8' ]; then
24+
sed -i 's|mirrorlist|#mirrorlist|g' /etc/yum.repos.d/CentOS-*.repo
25+
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*.repo
26+
fi
2327
yum update -y
28+
if [ ${DISTRIB_VERSION} = '8' ]; then
29+
sed -i 's|mirrorlist|#mirrorlist|g' /etc/yum.repos.d/CentOS-*.repo
30+
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*.repo
31+
fi
2432
fi
2533

2634
# PACKAGES NEEDED

packaging/test/scripts/rpm.sh

+10-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,16 @@ PG_TOG=$(echo $PG_VERSION | sed 's|\.||g')
1515

1616
if [ ${DISTRIB} != 'rhel' -o ${DISTRIB_VERSION} != '7' ]; then
1717
# update of rpm package is broken in rhel-7 (26/12/2022)
18-
yum update -y
18+
#yum update -y
19+
if [ ${DISTRIB} = 'centos' -a ${DISTRIB_VERSION} = '8' ]; then
20+
sed -i 's|mirrorlist|#mirrorlist|g' /etc/yum.repos.d/CentOS-*.repo
21+
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*.repo
22+
fi
23+
yum update -y
24+
if [ ${DISTRIB} = 'centos' -a ${DISTRIB_VERSION} = '8' ]; then
25+
sed -i 's|mirrorlist|#mirrorlist|g' /etc/yum.repos.d/CentOS-*.repo
26+
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*.repo
27+
fi
1928
fi
2029
# yum upgrade -y || echo 'some packages in docker failed to upgrade'
2130
# yum install -y sudo

packaging/test/scripts/rpm_forks.sh

+15-5
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,15 @@ PG_TOG=$(echo $PG_VERSION | sed 's|\.||g')
1515

1616
if [ ${DISTRIB} != 'rhel' -o ${DISTRIB_VERSION} != '7' ]; then
1717
# update of rpm package is broken in rhel-7 (26/12/2022)
18+
if [ ${DISTRIB} = 'centos' -a ${DISTRIB_VERSION} = '8' ]; then
19+
sed -i 's|mirrorlist|#mirrorlist|g' /etc/yum.repos.d/CentOS-*.repo
20+
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*.repo
21+
fi
1822
yum update -y
23+
if [ ${DISTRIB} = 'centos' -a ${DISTRIB_VERSION} = '8' ]; then
24+
sed -i 's|mirrorlist|#mirrorlist|g' /etc/yum.repos.d/CentOS-*.repo
25+
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*.repo
26+
fi
1927
fi
2028

2129
if [ ${PBK_EDITION} == 'ent' ]; then
@@ -80,11 +88,13 @@ if [ $PBK_EDITION == 'std' ] ; then
8088

8189
# install POSTGRESQL
8290
# rpm -ivh https://download.postgresql.org/pub/repos/yum/reporpms/EL-${DISTRIB_VERSION}-x86_64/pgdg-redhat-repo-latest.noarch.rpm
83-
if [[ ${PG_VERSION} == '11' ]] || [[ ${PG_VERSION} == '12' ]]; then
84-
rpm -ivh https://repo.postgrespro.ru/pgpro-${PG_VERSION}/keys/postgrespro-std-${PG_VERSION}.${DISTRIB}.yum-${PG_VERSION}-0.3.noarch.rpm
85-
else
86-
rpm -ivh https://repo.postgrespro.ru/pgpro-${PG_VERSION}/keys/postgrespro-std-${PG_VERSION}.${DISTRIB}.yum-${PG_VERSION}-0.3.noarch.rpm
87-
fi
91+
#if [[ ${PG_VERSION} == '11' ]] || [[ ${PG_VERSION} == '12' ]]; then
92+
# rpm -ivh https://repo.postgrespro.ru/pgpro-${PG_VERSION}/keys/postgrespro-std-${PG_VERSION}.${DISTRIB}.yum-${PG_VERSION}-0.3.noarch.rpm
93+
#else
94+
# rpm -ivh https://repo.postgrespro.ru/pgpro-${PG_VERSION}/keys/postgrespro-std-${PG_VERSION}.${DISTRIB}.yum-${PG_VERSION}-0.3.noarch.rpm
95+
#fi
96+
curl -o pgpro-repo-add.sh https://repo.postgrespro.ru/pgpro-${PG_VERSION}/keys/pgpro-repo-add.sh
97+
sh pgpro-repo-add.sh
8898

8999
if [[ ${PG_VERSION} == '9.6' ]]; then
90100
yum install -y postgrespro${PG_TOG}-server.x86_64

0 commit comments

Comments
 (0)