!59 fix build error when custom vendor
From: @xiaochn Reviewed-by: @dillon_chen Signed-off-by: @dillon_chen
This commit is contained in:
commit
b7631721b6
38
0004-add-custom-platform.patch
Normal file
38
0004-add-custom-platform.patch
Normal file
@ -0,0 +1,38 @@
|
||||
diff -Naur a/openGauss-server-2.1.0/build/script/package_opengauss.sh b/openGauss-server-2.1.0/build/script/package_opengauss.sh
|
||||
--- a/openGauss-server-2.1.0/build/script/package_opengauss.sh 2024-11-06 09:45:40.281917930 +0800
|
||||
+++ b/openGauss-server-2.1.0/build/script/package_opengauss.sh 2024-11-06 15:13:03.650408634 +0800
|
||||
@@ -66,6 +66,9 @@
|
||||
dist_version="KylinSec"
|
||||
elif [ X"$kernel" = X"ubuntu" ]; then
|
||||
dist_version="Ubuntu"
|
||||
+# as the last judgement condition, the CUSTOM_VENDOR_PLACEHOLDER will be replace by vendor macro in spec file
|
||||
+elif [ X"$kernel" = X"CUSTOM_VENDOR_PLACEHOLDER_LOWERCASE" ]; then
|
||||
+ dist_version="CUSTOM_VENDOR_PLACEHOLDER"
|
||||
else
|
||||
echo "We only support openEuler(aarch64), EulerOS(aarch64), CentOS, Kylin(aarch64), KylinSec(aarch64) and Ubuntu(x86) platform."
|
||||
echo "Kernel is $kernel"
|
||||
@@ -124,7 +127,7 @@
|
||||
##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" ] && [ "$dist_version" != "KylinSec" ] ; then
|
||||
+ if [ "$dist_version" != "openEuler" ] && [ "$dist_version" != "EulerOS" ] && [ "$dist_version" != "Kylin" ] && [ "$dist_version" != "KylinSec" ] && [ "$dist_version" != "CUSTOM_VENDOR_PLACEHOLDER" ]; then
|
||||
echo "We only support NUMA on openEuler(aarch64), EulerOS(aarch64), Kylin(aarch64), KylinSec(aarch64) platform."
|
||||
exit 1
|
||||
fi
|
||||
diff -Naur a/openGauss-server-2.1.0/src/get_PlatForm_str.sh b/openGauss-server-2.1.0/src/get_PlatForm_str.sh
|
||||
--- a/openGauss-server-2.1.0/src/get_PlatForm_str.sh 2024-11-06 09:45:40.281917930 +0800
|
||||
+++ b/openGauss-server-2.1.0/src/get_PlatForm_str.sh 2024-11-06 14:40:31.071558697 +0800
|
||||
@@ -163,6 +163,12 @@
|
||||
# other platform
|
||||
#
|
||||
##################################################################################
|
||||
+# as the last judgement condition, the CUSTOM_VENDOR_PLACEHOLDER will be replace by vendor macro in spec file
|
||||
+if [ -z "$plat_form_str" ] && [ "$kernel"x = "CUSTOM_VENDOR_PLACEHOLDER_LOWERCASE"x ]
|
||||
+then
|
||||
+ plat_form_str=CUSTOM_VENDOR_PLACEHOLDER_"$cpu_bit"
|
||||
+fi
|
||||
+
|
||||
if [ -z "$plat_form_str" ]
|
||||
then
|
||||
echo "Failed"
|
||||
@ -9,10 +9,11 @@
|
||||
%define port 7654
|
||||
%define datapath /var/lib/opengauss
|
||||
%define apppath %{_prefix}/local/opengauss
|
||||
%define vendor_lowercase %{?_vendor:%(echo %{_vendor} | tr '[:upper:]' '[:lower:]')}%{!?_vendor:openeuler}
|
||||
|
||||
Name: opengauss
|
||||
Version: 2.1.0
|
||||
Release: 11
|
||||
Release: 12
|
||||
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
|
||||
@ -33,10 +34,10 @@ Patch22: 0003-zlib.patch
|
||||
Patch23: makefile-miniunz.patch
|
||||
Patch40: 0001-orc.patch
|
||||
Patch41: 0002-add-kylinsec-platform.patch
|
||||
Patch42: 0004-add-custom-platform.patch
|
||||
Patch50: openssl3-adptor.patch
|
||||
Patch51: compile_2309.patch
|
||||
|
||||
|
||||
Patch3000: 3000-add-sw_64-support.patch
|
||||
BuildRequires: cmake gcc gcc-c++ openssl-devel python
|
||||
BuildRequires: cjson lz4-devel protobuf-devel snappy-devel zstd-devel boost-devel
|
||||
@ -96,6 +97,13 @@ pushd %{orc_name}-%{orc_version}
|
||||
popd
|
||||
|
||||
%patch41 -p1
|
||||
# custom vendor
|
||||
%if "%{_vendor}" != "openEuler"
|
||||
sed -i 's/CUSTOM_VENDOR_PLACEHOLDER_LOWERCASE/%{vendor_lowercase}/g' %{PATCH42}
|
||||
sed -i 's/CUSTOM_VENDOR_PLACEHOLDER/%{_vendor}/g' %{PATCH42}
|
||||
%endif
|
||||
%patch42 -p1
|
||||
|
||||
%ifarch sw_64
|
||||
%patch3000 -p1
|
||||
%endif
|
||||
@ -327,6 +335,9 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Nov 11 2024 xiaochn <xiaochuannan@inspur.com> - 2.1.0-12
|
||||
- fix build error when custom vendor
|
||||
|
||||
* Fri Aug 18 2023 panchenbo <panchenbo@kylinsec.com.cn> - 2.1.0-11
|
||||
- add sw_64 support
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user