Merge pull request #9557 from zmstone/1215-final-sync-of-release-50

1215 final sync of release 50
This commit is contained in:
Zaiming (Stone) Shi 2022-12-15 10:50:14 +01:00 committed by GitHub
commit ebd49bec41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 3 deletions

View File

@ -128,8 +128,11 @@ case "$UNAME_M" in
aarch64)
ARCH='arm64'
;;
arm64)
ARCH='arm64'
;;
arm*)
ARCH=arm
ARCH='arm'
;;
esac

View File

@ -47,10 +47,11 @@ export EMQX_NAME
export PACKAGE_PATH="${CODE_PATH}/_packages/${EMQX_NAME}"
export RELUP_PACKAGE_PATH="${CODE_PATH}/_upgrade_base"
SYSTEM="$("$SCRIPTS"/get-distro.sh)"
if [ "$PACKAGE_TYPE" = 'tgz' ]; then
PKG_SUFFIX="tar.gz"
else
SYSTEM="$("$SCRIPTS"/get-distro.sh)"
case "${SYSTEM:-}" in
ubuntu*|debian*|raspbian*)
PKG_SUFFIX='deb'
@ -149,7 +150,15 @@ emqx_test(){
;;
"rpm")
# yum wants python2
alternatives --list | grep python && alternatives --set python /usr/bin/python2
case "${SYSTEM:-}" in
"el8")
# el8 is fine with python3
true
;;
*)
alternatives --list | grep python && alternatives --set python /usr/bin/python2
;;
esac
YUM_RES=$(yum install -y "${PACKAGE_PATH}/${packagename}"| tee /dev/null)
if [[ $YUM_RES =~ "Failed" ]]; then
echo "yum install failed"