diff --git a/0002-add-kylinsec-platform.patch b/0002-add-kylinsec-platform.patch index 522dbffd0062e6afef5e6a90a8f8e1a3d49dcb90..a00038441096810c2d39a006ea7fa788b80a4fd3 100644 --- a/0002-add-kylinsec-platform.patch +++ b/0002-add-kylinsec-platform.patch @@ -1,17 +1,66 @@ -From 02f0141586b12ca76582550a22894134e28c7962 Mon Sep 17 00:00:00 2001 -From: xiewenhao -Date: Wed, 30 Mar 2022 17:32:43 +0800 -Subject: [PATCH 2/2] add kylinsec platform +From 58207338fe6b98b5eee54757d99e40f8621e0f04 Mon Sep 17 00:00:00 2001 +From: panchenbo +Date: Mon, 10 Apr 2023 10:15:12 +0800 +Subject: [PATCH] add support for KylinSec platform --- - openGauss-server-2.1.0/src/get_PlatForm_str.sh | 9 +++++++++ - 1 file changed, 9 insertions(+) + .../build/script/package_opengauss.sh | 10 ++++++---- + openGauss-server-2.1.0/src/get_PlatForm_str.sh | 13 +++++++++++++ + 2 files changed, 19 insertions(+), 4 deletions(-) +diff --git a/openGauss-server-2.1.0/build/script/package_opengauss.sh b/openGauss-server-2.1.0/build/script/package_opengauss.sh +index f6447b2..8b82cb1 100755 +--- a/openGauss-server-2.1.0/build/script/package_opengauss.sh ++++ b/openGauss-server-2.1.0/build/script/package_opengauss.sh +@@ -62,10 +62,12 @@ elif [ X"$kernel" == X"euleros" ]; then + dist_version="EulerOS" + elif [ X"$kernel" == X"kylin" ]; then + dist_version="Kylin" ++elif [ X"$kernel" == X"kylinsec" ]; then ++ dist_version="KylinSec" + elif [ X"$kernel" = X"ubuntu" ]; then + dist_version="Ubuntu" + else +- echo "We only support openEuler(aarch64), EulerOS(aarch64), CentOS, Kylin(aarch64) and Ubuntu(x86) platform." ++ echo "We only support openEuler(aarch64), EulerOS(aarch64), CentOS, Kylin(aarch64), KylinSec(aarch64) and Ubuntu(x86) platform." + echo "Kernel is $kernel" + exit 1 + fi +@@ -122,8 +124,8 @@ done + ##add platform architecture information + PLATFORM_ARCH=$(uname -p) + if [ "$PLATFORM_ARCH"X == "aarch64"X ] ; then +- if [ "$dist_version" != "openEuler" ] && [ "$dist_version" != "EulerOS" ] && [ "$dist_version" != "Kylin" ] ; then +- echo "We only support NUMA on openEuler(aarch64), EulerOS(aarch64), Kylin(aarch64) platform." ++ if [ "$dist_version" != "openEuler" ] && [ "$dist_version" != "EulerOS" ] && [ "$dist_version" != "Kylin" ] && [ "$dist_version" != "KylinSec" ] ; then ++ echo "We only support NUMA on openEuler(aarch64), EulerOS(aarch64), Kylin(aarch64), KylinSec(aarch64) platform." + exit 1 + fi + +@@ -220,7 +222,7 @@ ROOT_DIR=$(dirname "$ROOT_DIR") + PLAT_FORM_STR=$(sh "${ROOT_DIR}/src/get_PlatForm_str.sh") + if [ "${PLAT_FORM_STR}"x == "Failed"x ] + then +- echo "We only support openEuler(aarch64), EulerOS(aarch64), CentOS, Kylin(aarch64) platform." ++ echo "We only support openEuler(aarch64), EulerOS(aarch64), CentOS, Kylin(aarch64), KylinSec(aarch64) platform." + exit 1; + fi + diff --git a/openGauss-server-2.1.0/src/get_PlatForm_str.sh b/openGauss-server-2.1.0/src/get_PlatForm_str.sh -index 9fff29a..3f222cd 100755 +index 9fff29a..ce73a9c 100755 --- a/openGauss-server-2.1.0/src/get_PlatForm_str.sh +++ b/openGauss-server-2.1.0/src/get_PlatForm_str.sh -@@ -135,6 +135,15 @@ then +@@ -29,6 +29,9 @@ then + elif [ -f "/etc/kylin-release" ] + then + kernel=$(cat /etc/kylin-release | awk -F ' ' '{print $1}' | tr A-Z a-z) ++elif [ -f "/etc/kylinsec-release" ] ++then ++ kernel=$(cat /etc/kylinsec-release | awk -F ' ' '{print $1}' | tr A-Z a-z) + else + kernel=$(lsb_release -d | awk -F ' ' '{print $2}'| tr A-Z a-z) + fi +@@ -135,6 +138,16 @@ then plat_form_str=kylin_"$cpu_bit" fi @@ -23,10 +72,11 @@ index 9fff29a..3f222cd 100755 +then + plat_form_str=kylinsec_"$cpu_bit" +fi ++ + ################################################################################## # ubuntu platform # the result form like this: ubuntu_x86_64 -- -2.18.1 +2.27.0 diff --git a/opengauss-server.spec b/opengauss-server.spec index 35c569615293f2b8c6902d107bbb5282d6fb4083..65bc8361a1b0f9b96beb4997247aab39a89f714e 100755 --- a/opengauss-server.spec +++ b/opengauss-server.spec @@ -12,7 +12,7 @@ Name: opengauss Version: 2.1.0 -Release: 6 +Release: 7 Summary: openGauss is an open source relational database management system License: MulanPSL-2.0 and MIT and BSD and zlib and TCL and Apache-2.0 and BSL-1.0 URL: https://gitee.com/opengauss/openGauss-server @@ -303,6 +303,9 @@ fi %changelog +* Mon Apr 10 2023 panchenbo - 2.1.0-7 +- add /etc/kylinsec-release support for KylinSec + * Wed Mar 30 2022 ouyangminxiang - 2.1.0-6 - add kylinsec platform