fix changelog version error and add sw_64 support

(cherry picked from commit 8f5d326c86b373c08fc03aae9d002b8b31f256d3)
This commit is contained in:
panchenbo 2023-08-18 11:49:21 +08:00 committed by openeuler-sync-bot
parent 252edd127f
commit de9e715ea0
2 changed files with 1811 additions and 2 deletions

1789
3000-add-sw_64-support.patch Normal file

File diff suppressed because it is too large Load Diff

24
opengauss-server.spec Executable file → Normal file
View File

@ -12,7 +12,7 @@
Name: opengauss Name: opengauss
Version: 2.1.0 Version: 2.1.0
Release: 8 Release: 9
Summary: openGauss is an open source relational database management system 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 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 URL: https://gitee.com/opengauss/openGauss-server
@ -34,6 +34,7 @@ Patch23: makefile-miniunz.patch
Patch40: 0001-orc.patch Patch40: 0001-orc.patch
Patch41: 0002-add-kylinsec-platform.patch Patch41: 0002-add-kylinsec-platform.patch
Patch3000: 3000-add-sw_64-support.patch
BuildRequires: cmake gcc gcc-c++ openssl-devel python BuildRequires: cmake gcc gcc-c++ openssl-devel python
BuildRequires: cjson lz4-devel protobuf-devel snappy-devel zstd-devel boost-devel BuildRequires: cjson lz4-devel protobuf-devel snappy-devel zstd-devel boost-devel
BuildRequires: libcgroup-devel libcurl-devel unixODBC-devel jemalloc-devel BuildRequires: libcgroup-devel libcurl-devel unixODBC-devel jemalloc-devel
@ -42,6 +43,9 @@ BuildRequires: bison flex DCF
%ifnarch aarch64 %{arm} %ifnarch aarch64 %{arm}
BuildRequires: numactl-devel BuildRequires: numactl-devel
%endif %endif
%ifarch sw_64
BuildRequires: libatomic
%endif
%global _privatelibs lib(cjson|ecpg|z|pg|pq)\\.so* %global _privatelibs lib(cjson|ecpg|z|pg|pq)\\.so*
%global __provides_exclude %{_privatelibs} %global __provides_exclude %{_privatelibs}
@ -87,6 +91,9 @@ pushd %{orc_name}-%{orc_version}
popd popd
%patch41 -p1 %patch41 -p1
%ifarch sw_64
%patch3000 -p1
%endif
%build %build
########### build cjson ########### ########### build cjson ###########
build_target=$(pwd)/deps_binarylibs build_target=$(pwd)/deps_binarylibs
@ -102,12 +109,18 @@ CONFIGURE_EXTRA_FLAG="--64"
%ifarch aarch64 %ifarch aarch64
CONFIGURE_EXTRA_FLAG="" CONFIGURE_EXTRA_FLAG=""
%endif %endif
%ifarch sw_64
CONFIGURE_EXTRA_FLAG=""
%endif
./configure ${CONFIGURE_EXTRA_FLAG} --prefix=${build_target}/zlib ./configure ${CONFIGURE_EXTRA_FLAG} --prefix=${build_target}/zlib
sed -i '21a CFLAGS += -fPIC' Makefile sed -i '21a CFLAGS += -fPIC' Makefile
MAKE_EXTRA_FLAG="-m64" MAKE_EXTRA_FLAG="-m64"
%ifarch aarch64 %ifarch aarch64
MAKE_EXTRA_FLAG="" MAKE_EXTRA_FLAG=""
%endif %endif
%ifarch sw_64
MAKE_EXTRA_FLAG=""
%endif
make CFLAGS="-fPIE -fPIC" SFLAGS="-O2 -fPIC -fstack-protector-strong -Wl,-z,noexecstack -Wl,-z,relro,-z,now ${MAKE_EXTRA_FLAG} -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN" %{?_smp_mflags} make CFLAGS="-fPIE -fPIC" SFLAGS="-O2 -fPIC -fstack-protector-strong -Wl,-z,noexecstack -Wl,-z,relro,-z,now ${MAKE_EXTRA_FLAG} -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN" %{?_smp_mflags}
make install make install
cd contrib/minizip/ cd contrib/minizip/
@ -155,7 +168,11 @@ popd
pushd openGauss-server-%{version} pushd openGauss-server-%{version}
chmod +x ./configure chmod +x ./configure
./configure \ ./configure \
%ifarch sw_64
CC=g++ CFLAGS='-O0' \
%else
CC=g++ CFLAGS='-O2' \ CC=g++ CFLAGS='-O2' \
%endif
--prefix=%{apppath} \ --prefix=%{apppath} \
--3rd=${build_target} \ --3rd=${build_target} \
--enable-thread-safety \ --enable-thread-safety \
@ -303,7 +320,10 @@ fi
%changelog %changelog
* Tue Jun 6 2023 dillon chen<dillon.chen@gmail.com> -2.1.0-8 * Fri Aug 18 2023 panchenbo <panchenbo@kylinsec.com.cn> - 2.1.0-9
- add sw_64 support
* Tue Jun 6 2023 dillon chen<dillon.chen@gmail.com> - 2.1.0-8
- Fix bugs: #I677QX add lsof - Fix bugs: #I677QX add lsof
* Mon Apr 10 2023 panchenbo <panchenbo@kylinsec.com.cn> - 2.1.0-7 * Mon Apr 10 2023 panchenbo <panchenbo@kylinsec.com.cn> - 2.1.0-7