!41 upgrade function
From: @zhangzhihui42 Reviewed-by: @zhang_xubo Signed-off-by: @zhang_xubo
This commit is contained in:
commit
9ea5468569
133
0001-cJSON.patch
133
0001-cJSON.patch
@ -1,133 +0,0 @@
|
||||
From dec906196dc53e4aaa2937d1e57a8b3761a1b531 Mon Sep 17 00:00:00 2001
|
||||
From: panggou <jiangjiangjun@huawei.com>
|
||||
Date: Tue, 9 Mar 2021 11:11:59 +0800
|
||||
Subject: [PATCH] =?UTF-8?q?[Huawei]=E5=AE=89=E5=85=A8=E7=BC=96=E8=AF=91?=
|
||||
=?UTF-8?q?=E9=80=89=E9=A1=B9=EF=BC=8C=E9=80=82=E9=85=8D=E4=BA=A7=E5=93=81?=
|
||||
=?UTF-8?q?=E4=BD=BF=E7=94=A8=E6=8E=A5=E5=8F=A3?=
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Offering: GaussDB Kernel
|
||||
Signed-off-by: jiangjiangjun@huawei.com
|
||||
---
|
||||
Makefile | 4 ++--
|
||||
cJSON.c | 18 +++++++++---------
|
||||
cJSON.h | 1 +
|
||||
3 files changed, 12 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 4e727b7..1ee5a21 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -12,8 +12,8 @@ LIBVERSION = 1.7.13
|
||||
CJSON_SOVERSION = 1
|
||||
UTILS_SOVERSION = 1
|
||||
|
||||
-CJSON_SO_LDFLAG=-Wl,-soname=$(CJSON_LIBNAME).so.$(CJSON_SOVERSION)
|
||||
-UTILS_SO_LDFLAG=-Wl,-soname=$(UTILS_LIBNAME).so.$(UTILS_SOVERSION)
|
||||
+CJSON_SO_LDFLAG=-Wl,-z,relro,-z,now,-soname=$(CJSON_LIBNAME).so.$(CJSON_SOVERSION)
|
||||
+UTILS_SO_LDFLAG=-Wl,-z,relro,-z,now,-soname=$(UTILS_LIBNAME).so.$(UTILS_SOVERSION)
|
||||
|
||||
PREFIX ?= /usr/local
|
||||
INCLUDE_PATH ?= include/cjson
|
||||
diff --git a/cJSON.c b/cJSON.c
|
||||
index a5d3987..27c9388 100644
|
||||
--- a/cJSON.c
|
||||
+++ b/cJSON.c
|
||||
@@ -181,7 +181,7 @@ static void * CJSON_CDECL internal_realloc(void *pointer, size_t size)
|
||||
|
||||
static internal_hooks global_hooks = { internal_malloc, internal_free, internal_realloc };
|
||||
|
||||
-static unsigned char* cJSON_strdup(const unsigned char* string, const internal_hooks * const hooks)
|
||||
+CJSON_PUBLIC(unsigned char*) cJSON_strdup(const unsigned char* string)
|
||||
{
|
||||
size_t length = 0;
|
||||
unsigned char *copy = NULL;
|
||||
@@ -192,7 +192,7 @@ static unsigned char* cJSON_strdup(const unsigned char* string, const internal_h
|
||||
}
|
||||
|
||||
length = strlen((const char*)string) + sizeof("");
|
||||
- copy = (unsigned char*)hooks->allocate(length);
|
||||
+ copy = (unsigned char*)global_hooks.allocate(length);
|
||||
if (copy == NULL)
|
||||
{
|
||||
return NULL;
|
||||
@@ -406,7 +406,7 @@ CJSON_PUBLIC(char*) cJSON_SetValuestring(cJSON *object, const char *valuestring)
|
||||
strcpy(object->valuestring, valuestring);
|
||||
return object->valuestring;
|
||||
}
|
||||
- copy = (char*) cJSON_strdup((const unsigned char*)valuestring, &global_hooks);
|
||||
+ copy = (char*) cJSON_strdup((const unsigned char*)valuestring);
|
||||
if (copy == NULL)
|
||||
{
|
||||
return NULL;
|
||||
@@ -2020,7 +2020,7 @@ static cJSON_bool add_item_to_object(cJSON * const object, const char * const st
|
||||
}
|
||||
else
|
||||
{
|
||||
- new_key = (char*)cJSON_strdup((const unsigned char*)string, hooks);
|
||||
+ new_key = (char*)cJSON_strdup((const unsigned char*)string);
|
||||
if (new_key == NULL)
|
||||
{
|
||||
return false;
|
||||
@@ -2341,7 +2341,7 @@ static cJSON_bool replace_item_in_object(cJSON *object, const char *string, cJSO
|
||||
{
|
||||
cJSON_free(replacement->string);
|
||||
}
|
||||
- replacement->string = (char*)cJSON_strdup((const unsigned char*)string, &global_hooks);
|
||||
+ replacement->string = (char*)cJSON_strdup((const unsigned char*)string);
|
||||
replacement->type &= ~cJSON_StringIsConst;
|
||||
|
||||
return cJSON_ReplaceItemViaPointer(object, get_object_item(object, string, case_sensitive), replacement);
|
||||
@@ -2434,7 +2434,7 @@ CJSON_PUBLIC(cJSON *) cJSON_CreateString(const char *string)
|
||||
if(item)
|
||||
{
|
||||
item->type = cJSON_String;
|
||||
- item->valuestring = (char*)cJSON_strdup((const unsigned char*)string, &global_hooks);
|
||||
+ item->valuestring = (char*)cJSON_strdup((const unsigned char*)string);
|
||||
if(!item->valuestring)
|
||||
{
|
||||
cJSON_Delete(item);
|
||||
@@ -2484,7 +2484,7 @@ CJSON_PUBLIC(cJSON *) cJSON_CreateRaw(const char *raw)
|
||||
if(item)
|
||||
{
|
||||
item->type = cJSON_Raw;
|
||||
- item->valuestring = (char*)cJSON_strdup((const unsigned char*)raw, &global_hooks);
|
||||
+ item->valuestring = (char*)cJSON_strdup((const unsigned char*)raw);
|
||||
if(!item->valuestring)
|
||||
{
|
||||
cJSON_Delete(item);
|
||||
@@ -2686,7 +2686,7 @@ CJSON_PUBLIC(cJSON *) cJSON_Duplicate(const cJSON *item, cJSON_bool recurse)
|
||||
newitem->valuedouble = item->valuedouble;
|
||||
if (item->valuestring)
|
||||
{
|
||||
- newitem->valuestring = (char*)cJSON_strdup((unsigned char*)item->valuestring, &global_hooks);
|
||||
+ newitem->valuestring = (char*)cJSON_strdup((unsigned char*)item->valuestring);
|
||||
if (!newitem->valuestring)
|
||||
{
|
||||
goto fail;
|
||||
@@ -2694,7 +2694,7 @@ CJSON_PUBLIC(cJSON *) cJSON_Duplicate(const cJSON *item, cJSON_bool recurse)
|
||||
}
|
||||
if (item->string)
|
||||
{
|
||||
- newitem->string = (item->type&cJSON_StringIsConst) ? item->string : (char*)cJSON_strdup((unsigned char*)item->string, &global_hooks);
|
||||
+ newitem->string = (item->type&cJSON_StringIsConst) ? item->string : (char*)cJSON_strdup((unsigned char*)item->string);
|
||||
if (!newitem->string)
|
||||
{
|
||||
goto fail;
|
||||
diff --git a/cJSON.h b/cJSON.h
|
||||
index 0c6c8e0..4481dfd 100644
|
||||
--- a/cJSON.h
|
||||
+++ b/cJSON.h
|
||||
@@ -286,6 +286,7 @@ CJSON_PUBLIC(char*) cJSON_SetValuestring(cJSON *object, const char *valuestring)
|
||||
CJSON_PUBLIC(void *) cJSON_malloc(size_t size);
|
||||
CJSON_PUBLIC(void) cJSON_free(void *object);
|
||||
|
||||
+CJSON_PUBLIC(unsigned char*) cJSON_strdup(const unsigned char* string);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
--
|
||||
2.23.0
|
||||
|
||||
356895
0001-orc.patch
356895
0001-orc.patch
File diff suppressed because it is too large
Load Diff
@ -1,50 +0,0 @@
|
||||
From 32efb3e42f67bc300a26c21837e4cc5813444be4 Mon Sep 17 00:00:00 2001
|
||||
From: Mark Adler <madler@alumni.caltech.edu>
|
||||
Date: Thu, 17 Sep 2020 11:09:46 -0700
|
||||
Subject: [PATCH 1/3] [Backport] Change macro name
|
||||
|
||||
Reference: https://github.com/madler/zlib/commit/53ce2713117ef2a8ed682d77b944df991c499252
|
||||
|
||||
Change macro name in inflate.c to avoid collision in VxWorks.
|
||||
---
|
||||
inflate.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/inflate.c b/inflate.c
|
||||
index ac333e8..36a6120 100644
|
||||
--- a/inflate.c
|
||||
+++ b/inflate.c
|
||||
@@ -447,10 +447,10 @@ unsigned copy;
|
||||
|
||||
/* check function to use adler32() for zlib or crc32() for gzip */
|
||||
#ifdef GUNZIP
|
||||
-# define UPDATE(check, buf, len) \
|
||||
+# define UPDATE_CHECK(check, buf, len) \
|
||||
(state->flags ? crc32(check, buf, len) : adler32(check, buf, len))
|
||||
#else
|
||||
-# define UPDATE(check, buf, len) adler32(check, buf, len)
|
||||
+# define UPDATE_CHECK(check, buf, len) adler32(check, buf, len)
|
||||
#endif
|
||||
|
||||
/* check macros for header crc */
|
||||
@@ -1202,7 +1202,7 @@ int flush;
|
||||
state->total += out;
|
||||
if ((state->wrap & 4) && out)
|
||||
strm->adler = state->check =
|
||||
- UPDATE(state->check, put - out, out);
|
||||
+ UPDATE_CHECK(state->check, put - out, out);
|
||||
out = left;
|
||||
if ((state->wrap & 4) && (
|
||||
#ifdef GUNZIP
|
||||
@@ -1265,7 +1265,7 @@ int flush;
|
||||
state->total += out;
|
||||
if ((state->wrap & 4) && out)
|
||||
strm->adler = state->check =
|
||||
- UPDATE(state->check, strm->next_out - out, out);
|
||||
+ UPDATE_CHECK(state->check, strm->next_out - out, out);
|
||||
strm->data_type = (int)state->bits + (state->last ? 64 : 0) +
|
||||
(state->mode == TYPE ? 128 : 0) +
|
||||
(state->mode == LEN_ || state->mode == COPY_ ? 256 : 0);
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@ -1,82 +0,0 @@
|
||||
From 58207338fe6b98b5eee54757d99e40f8621e0f04 Mon Sep 17 00:00:00 2001
|
||||
From: panchenbo <panchenbo@kylinsec.com.cn>
|
||||
Date: Mon, 10 Apr 2023 10:15:12 +0800
|
||||
Subject: [PATCH] add support for KylinSec platform
|
||||
|
||||
---
|
||||
.../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..ce73a9c 100755
|
||||
--- a/openGauss-server-2.1.0/src/get_PlatForm_str.sh
|
||||
+++ b/openGauss-server-2.1.0/src/get_PlatForm_str.sh
|
||||
@@ -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
|
||||
|
||||
+##################################################################################
|
||||
+# kylinsec platform
|
||||
+# the result form like this: kylinsec_aarch64
|
||||
+##################################################################################
|
||||
+if [ "$kernel"x = "kylinsec"x ]
|
||||
+then
|
||||
+ plat_form_str=kylinsec_"$cpu_bit"
|
||||
+fi
|
||||
+
|
||||
+
|
||||
##################################################################################
|
||||
# ubuntu platform
|
||||
# the result form like this: ubuntu_x86_64
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -1,22 +0,0 @@
|
||||
From dcedd0810b00ba065de07386bc270eea57aa157a Mon Sep 17 00:00:00 2001
|
||||
From: yuangongji 00362270 <yuangongji1@huawei.com>
|
||||
Date: Tue, 20 Oct 2020 17:24:41 +0800
|
||||
Subject: [PATCH 2/3] [Huawei] add release file for h1
|
||||
|
||||
Offering: Open Source Competence Center
|
||||
---
|
||||
HUAWEI-RELEASE | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
create mode 100644 HUAWEI-RELEASE
|
||||
|
||||
diff --git a/HUAWEI-RELEASE b/HUAWEI-RELEASE
|
||||
new file mode 100644
|
||||
index 0000000..787b9cc
|
||||
--- /dev/null
|
||||
+++ b/HUAWEI-RELEASE
|
||||
@@ -0,0 +1 @@
|
||||
+RELEASE: h1
|
||||
\ No newline at end of file
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@ -1,63 +0,0 @@
|
||||
From 466c5b509e668e5d211e919ef6d1fc360e4269f4 Mon Sep 17 00:00:00 2001
|
||||
From: xukunpeng <xukunpeng2@huawei.com>
|
||||
Date: Tue, 13 Apr 2021 11:06:05 +0800
|
||||
Subject: [PATCH 3/3] [Huawei]patch to zlib
|
||||
|
||||
Offering: GaussDB Kernel
|
||||
|
||||
More detail: patch huawei_unzip_alloc_hook.patch and huawei_unzip_alloc_hook.patch2
|
||||
|
||||
Signed-off-by: xukunpeng xukunpeng2@huawei.com
|
||||
---
|
||||
contrib/minizip/unzip.c | 10 ++++++++++
|
||||
contrib/minizip/unzip.h | 13 +++++++++++++
|
||||
2 files changed, 23 insertions(+)
|
||||
|
||||
diff --git a/contrib/minizip/unzip.c b/contrib/minizip/unzip.c
|
||||
index bcfb941..a321034 100644
|
||||
--- a/contrib/minizip/unzip.c
|
||||
+++ b/contrib/minizip/unzip.c
|
||||
@@ -108,6 +108,16 @@
|
||||
#define UNZ_MAXFILENAMEINZIP (256)
|
||||
#endif
|
||||
|
||||
+static unz_memfunc g_unz_memapi = {0, 0};
|
||||
+
|
||||
+extern int ZEXPORT unz_set_memfuncs(const unz_memfunc* memfunc)
|
||||
+{
|
||||
+ g_unz_memapi = *memfunc;
|
||||
+}
|
||||
+
|
||||
+#define ALLOC(size) ((*(g_unz_memapi.m_malloc))(size))
|
||||
+#define TRYFREE(p) { if (p) { (*(g_unz_memapi.m_free))(p); p = NULL; } }
|
||||
+
|
||||
#ifndef ALLOC
|
||||
# define ALLOC(size) (malloc(size))
|
||||
#endif
|
||||
diff --git a/contrib/minizip/unzip.h b/contrib/minizip/unzip.h
|
||||
index 2104e39..06eb49c 100644
|
||||
--- a/contrib/minizip/unzip.h
|
||||
+++ b/contrib/minizip/unzip.h
|
||||
@@ -429,6 +429,19 @@ extern int ZEXPORT unzSetOffset64 (unzFile file, ZPOS64_T pos);
|
||||
extern int ZEXPORT unzSetOffset (unzFile file, uLong pos);
|
||||
|
||||
|
||||
+/* memory manager api */
|
||||
+typedef voidp (* malloc_pf) (size_t);
|
||||
+typedef void (* free_pf) (voidp);
|
||||
+
|
||||
+typedef struct unz_memfunc_s
|
||||
+{
|
||||
+ malloc_pf m_malloc;
|
||||
+ free_pf m_free;
|
||||
+} unz_memfunc;
|
||||
+
|
||||
+extern int ZEXPORT unz_set_memfuncs OF ((const unz_memfunc* memfunc));
|
||||
+
|
||||
+
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
--
|
||||
2.23.0
|
||||
|
||||
Binary file not shown.
BIN
cJSON-1.7.15.tar.gz
Normal file
BIN
cJSON-1.7.15.tar.gz
Normal file
Binary file not shown.
@ -1,6 +1,6 @@
|
||||
version=2.1.0
|
||||
version=5.0.1
|
||||
server_repo=https://gitee.com/opengauss/openGauss-server.git
|
||||
git clone $server_repo openGauss-server-$version
|
||||
git clone $server_repo -b v5.0.1 openGauss-server-$version
|
||||
cd openGauss-server-$version
|
||||
gitcommit=$(git log 2>/dev/null | grep commit | head -1 | awk '{print $2}' | cut -b 1-8)
|
||||
echo $gitcommit > ../COMMIT
|
||||
@ -11,7 +11,8 @@ rm -rf src/test/regress/sql
|
||||
rm -rf src/test/regress/data
|
||||
rm -rf src/test/regress/jdbc_test
|
||||
rm -rf src/test/regress/input
|
||||
rm -rf src/test/regress/jdbc_client_lib
|
||||
rm -rf .git
|
||||
rm -rf ./docker
|
||||
cd ..
|
||||
tar -zcf "openGauss-server-${version}.tar.gz" openGauss-server-$version
|
||||
tar -zcf "openGauss-server-${version}.tar.gz" openGauss-server-$version
|
||||
277
cmake_compile.patch
Normal file
277
cmake_compile.patch
Normal file
@ -0,0 +1,277 @@
|
||||
diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' openGauss-server-5.0.1/cmake/src/set_thirdparty_path.cmake openGauss-server-5.0.1-edit/cmake/src/set_thirdparty_path.cmake
|
||||
*** openGauss-server-5.0.1/cmake/src/set_thirdparty_path.cmake 2024-05-07 20:16:38.988794109 +0800
|
||||
--- openGauss-server-5.0.1-edit/cmake/src/set_thirdparty_path.cmake 2024-05-09 14:15:39.965184154 +0800
|
||||
***************
|
||||
*** 158,163 ****
|
||||
--- 158,165 ----
|
||||
|
||||
if(${WITH_OPENEULER_OS} STREQUAL "ON")
|
||||
set(SECURE_C_CHECK boundscheck)
|
||||
+ elseif(${ENABLE_OPENEULER_MAJOR} STREQUAL "ON")
|
||||
+ set(SECURE_C_CHECK boundscheck)
|
||||
else()
|
||||
set(SECURE_C_CHECK securec)
|
||||
endif()
|
||||
diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' openGauss-server-5.0.1/src/CMakeLists.txt openGauss-server-5.0.1-edit/src/CMakeLists.txt
|
||||
*** openGauss-server-5.0.1/src/CMakeLists.txt 2024-05-07 20:16:39.156795348 +0800
|
||||
--- openGauss-server-5.0.1-edit/src/CMakeLists.txt 2024-05-09 15:36:33.381689446 +0800
|
||||
***************
|
||||
*** 192,198 ****
|
||||
endif()
|
||||
|
||||
if("${ENABLE_MULTIPLE_NODES}" STREQUAL "OFF")
|
||||
! install(DIRECTORY ${DCF_LIB_PATH} DESTINATION .)
|
||||
endif()
|
||||
if(${ENABLE_MULTIPLE_NODES}_${ENABLE_PRIVATEGAUSS} STREQUAL OFF_OFF AND NOT ${ENABLE_LITE_MODE} STREQUAL ON)
|
||||
if(EXISTS ${DMS_LIB_PATH})
|
||||
--- 192,200 ----
|
||||
endif()
|
||||
|
||||
if("${ENABLE_MULTIPLE_NODES}" STREQUAL "OFF")
|
||||
! if(EXISTS ${DCF_LIB_PATH})
|
||||
! install(DIRECTORY ${DCF_LIB_PATH} DESTINATION .)
|
||||
! endif()
|
||||
endif()
|
||||
if(${ENABLE_MULTIPLE_NODES}_${ENABLE_PRIVATEGAUSS} STREQUAL OFF_OFF AND NOT ${ENABLE_LITE_MODE} STREQUAL ON)
|
||||
if(EXISTS ${DMS_LIB_PATH})
|
||||
***************
|
||||
*** 206,218 ****
|
||||
endif()
|
||||
endif()
|
||||
|
||||
- install(DIRECTORY ${ZSTD_LIB_PATH} DESTINATION . PATTERN "*.a" EXCLUDE)
|
||||
if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON")
|
||||
install(DIRECTORY ${LIBOBS_LIB_PATH} DESTINATION .)
|
||||
install(DIRECTORY ${LIBOBS_INCLUDE_PATH} DESTINATION include/postgresql/server/access/obs)
|
||||
endif()
|
||||
! install(DIRECTORY ${CJSON_LIB_PATH} DESTINATION .)
|
||||
! install(DIRECTORY ${CJSON_INCLUDE_PATH}/cjson DESTINATION include/postgresql/server)
|
||||
if(NOT ${ENABLE_LITE_MODE} STREQUAL ON)
|
||||
install(DIRECTORY ${ETCD_BIN_PATH} DESTINATION .)
|
||||
install(DIRECTORY ${IPERF_LIB_PATH} DESTINATION .)
|
||||
--- 208,218 ----
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON")
|
||||
install(DIRECTORY ${LIBOBS_LIB_PATH} DESTINATION .)
|
||||
install(DIRECTORY ${LIBOBS_INCLUDE_PATH} DESTINATION include/postgresql/server/access/obs)
|
||||
endif()
|
||||
!
|
||||
if(NOT ${ENABLE_LITE_MODE} STREQUAL ON)
|
||||
install(DIRECTORY ${ETCD_BIN_PATH} DESTINATION .)
|
||||
install(DIRECTORY ${IPERF_LIB_PATH} DESTINATION .)
|
||||
***************
|
||||
*** 222,242 ****
|
||||
install(DIRECTORY ${KMC_LIB_PATH} DESTINATION .)
|
||||
endif()
|
||||
endif()
|
||||
- install(DIRECTORY ${LIBCURL_LIB_PATH} DESTINATION .)
|
||||
if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON")
|
||||
install(DIRECTORY ${KERBEROS_SBIN_PATH}/ DESTINATION bin)
|
||||
install(DIRECTORY ${KERBEROS_BIN_PATH} DESTINATION .)
|
||||
install(DIRECTORY ${KERBEROS_LIB_PATH} DESTINATION .)
|
||||
endif()
|
||||
! install(DIRECTORY ${LZ4_LIB_PATH} DESTINATION .)
|
||||
! install(DIRECTORY ${LZ4_BIN_PATH} DESTINATION .)
|
||||
! install(DIRECTORY ${LIBOPENSSL_BIN_PATH} DESTINATION .)
|
||||
! install(DIRECTORY ${LIBOPENSSL_LIB_PATH} DESTINATION . PATTERN "*.a" EXCLUDE )
|
||||
install(DIRECTORY ${ZLIB_LIB_PATH} DESTINATION . FILES_MATCHING PATTERN "libz.*")
|
||||
|
||||
list(FIND MACRO_OPTIONS "-D__USE_NUMA" RET_NUMA)
|
||||
if(NOT ${RET_NUMA} EQUAL -1)
|
||||
! install(DIRECTORY ${NUMA_LIB_PATH} DESTINATION .)
|
||||
endif()
|
||||
|
||||
if("${ENABLE_MOT}" STREQUAL "ON")
|
||||
--- 222,240 ----
|
||||
install(DIRECTORY ${KMC_LIB_PATH} DESTINATION .)
|
||||
endif()
|
||||
endif()
|
||||
if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON")
|
||||
install(DIRECTORY ${KERBEROS_SBIN_PATH}/ DESTINATION bin)
|
||||
install(DIRECTORY ${KERBEROS_BIN_PATH} DESTINATION .)
|
||||
install(DIRECTORY ${KERBEROS_LIB_PATH} DESTINATION .)
|
||||
endif()
|
||||
!
|
||||
install(DIRECTORY ${ZLIB_LIB_PATH} DESTINATION . FILES_MATCHING PATTERN "libz.*")
|
||||
|
||||
list(FIND MACRO_OPTIONS "-D__USE_NUMA" RET_NUMA)
|
||||
if(NOT ${RET_NUMA} EQUAL -1)
|
||||
! if(EXISTS ${NUMA_LIB_PATH})
|
||||
! install(DIRECTORY ${NUMA_LIB_PATH} DESTINATION .)
|
||||
! endif()
|
||||
endif()
|
||||
|
||||
if("${ENABLE_MOT}" STREQUAL "ON")
|
||||
***************
|
||||
*** 251,261 ****
|
||||
install(CODE "message(\"-- Created symlink: libatomic.so.1 -> libatomic.so.1.2.0\")")
|
||||
endif()
|
||||
|
||||
- install(FILES ${SECUREDYNAMICLIB_HOME}/libsecurec.so DESTINATION lib)
|
||||
- install(FILES ${BUILDTOOLS_PATH}/gcc7.3/gcc/lib64/libgcc_s.so.1 DESTINATION lib)
|
||||
- install(FILES ${BUILDTOOLS_PATH}/gcc7.3/gcc/lib64/libgomp.so DESTINATION lib)
|
||||
- install(FILES ${BUILDTOOLS_PATH}/gcc7.3/gcc/lib64/libgomp.so.1 DESTINATION lib)
|
||||
- install(FILES ${BUILDTOOLS_PATH}/gcc7.3/gcc/lib64/libgomp.so.1.0.0 DESTINATION lib)
|
||||
install(FILES ${XGBOOST_LIB_PATH}/libxgboost.so DESTINATION lib)
|
||||
if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON")
|
||||
install(FILES ${PLJAVA_HOME}/lib/libpljava.so DESTINATION lib)
|
||||
--- 249,254 ----
|
||||
***************
|
||||
*** 273,295 ****
|
||||
install(DIRECTORY ${GCC_LIB_PATH}/lib64/ DESTINATION lib
|
||||
FILES_MATCHING PATTERN "libatomic.so*")
|
||||
endif()
|
||||
-
|
||||
- install(FILES ${GCC_LIB_PATH}/lib64/libgcc_s.so.1 DESTINATION lib)
|
||||
- install(DIRECTORY ${GCC_LIB_PATH}/lib64/ DESTINATION lib
|
||||
- FILES_MATCHING PATTERN "libgomp.so*")
|
||||
-
|
||||
- install(CODE "execute_process(
|
||||
- COMMAND cp ${GCC_LIB_PATH}/lib64/libstdc++.so.6.0.24 ${prefix_home}/lib/libstdc++.so.6
|
||||
- WORKING_DIRECTORY ${prefix_home}/lib)"
|
||||
- )
|
||||
-
|
||||
- # install(DIRECTORY ${LIBCGROUP_LIB_PATH} DESTINATION . FILES_MATCHING PATTERN "libcgroup.so*")
|
||||
- install(CODE "execute_process(
|
||||
- COMMAND cp ${LIBCGROUP_LIB_PATH}/libcgroup.so.1.0.42 ${prefix_home}/lib/libcgroup.so
|
||||
- COMMAND ln -fs libcgroup.so libcgroup.so.1
|
||||
- WORKING_DIRECTORY ${prefix_home}/lib)"
|
||||
- )
|
||||
- install(CODE "message(\"-- Created symlink: libcgroup.so.1 -> libcgroup.so\")")
|
||||
|
||||
# fastcheck part
|
||||
install(FILES ${PROJECT_SRC_DIR}/test/regress/stub/roach_api_stub/roach_api_stub.control
|
||||
--- 266,271 ----
|
||||
diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' openGauss-server-5.0.1/src/common/interfaces/libpq/CMakeLists.txt openGauss-server-5.0.1-edit/src/common/interfaces/libpq/CMakeLists.txt
|
||||
*** openGauss-server-5.0.1/src/common/interfaces/libpq/CMakeLists.txt 2024-05-07 20:16:39.540798180 +0800
|
||||
--- openGauss-server-5.0.1-edit/src/common/interfaces/libpq/CMakeLists.txt 2024-05-09 14:15:40.525188303 +0800
|
||||
***************
|
||||
*** 118,129 ****
|
||||
set(pq_LINK_OPTIONS ${LIB_LINK_OPTIONS})
|
||||
add_shared_libtarget(pq TGT_pq_SRC TGT_pq_INC "${pq_DEF_OPTIONS}" "${pq_COMPILE_OPTIONS}" "${pq_LINK_OPTIONS}")
|
||||
if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON")
|
||||
! target_link_libraries(pq PRIVATE com_err_gauss crypto gssapi_krb5_gauss gssrpc_gauss k5crypto_gauss krb5_gauss krb5support_gauss securec ssl)
|
||||
else()
|
||||
! target_link_libraries(pq PRIVATE crypto securec ssl)
|
||||
endif()
|
||||
target_link_directories(pq PUBLIC
|
||||
! ${LIBOPENSSL_LIB_PATH} ${KERBEROS_LIB_PATH} ${SECURE_LIB_PATH}
|
||||
${PROJECT_SRC_DIR}/common/port ${PROJECT_SRC_DIR}/gstrace/common
|
||||
)
|
||||
set_target_properties(pq PROPERTIES VERSION 5.5)
|
||||
--- 118,129 ----
|
||||
set(pq_LINK_OPTIONS ${LIB_LINK_OPTIONS})
|
||||
add_shared_libtarget(pq TGT_pq_SRC TGT_pq_INC "${pq_DEF_OPTIONS}" "${pq_COMPILE_OPTIONS}" "${pq_LINK_OPTIONS}")
|
||||
if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON")
|
||||
! target_link_libraries(pq PRIVATE com_err_gauss crypto gssapi_krb5_gauss gssrpc_gauss k5crypto_gauss krb5_gauss krb5support_gauss ${SECURE_C_CHECK} ssl)
|
||||
else()
|
||||
! target_link_libraries(pq PRIVATE crypto ${SECURE_C_CHECK} ssl)
|
||||
endif()
|
||||
target_link_directories(pq PUBLIC
|
||||
! ${LIBOPENSSL_LIB_PATH} ${KERBEROS_LIB_PATH}
|
||||
${PROJECT_SRC_DIR}/common/port ${PROJECT_SRC_DIR}/gstrace/common
|
||||
)
|
||||
set_target_properties(pq PROPERTIES VERSION 5.5)
|
||||
***************
|
||||
*** 302,308 ****
|
||||
endif()
|
||||
add_dependencies(pq_ce libpq_ce cmk_entity_manager_hooks encryption_hooks client_logic_common client_logic_expressions client_logic_cache client_logic_processor client_logic_fmt client_logic_hooks client_logic_data_fetcher frontend_parser)
|
||||
target_link_directories(pq_ce PUBLIC
|
||||
- ${SECURE_LIB_PATH}
|
||||
${KMC_LIB_PATH}
|
||||
${LIBOPENSSL_LIB_PATH}
|
||||
${CJSON_LIB_PATH}
|
||||
--- 302,307 ----
|
||||
diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' openGauss-server-5.0.1/src/gausskernel/cbb/communication/libcomm_utils/libcomm_thread.cpp openGauss-server-5.0.1-edit/src/gausskernel/cbb/communication/libcomm_utils/libcomm_thread.cpp
|
||||
*** openGauss-server-5.0.1/src/gausskernel/cbb/communication/libcomm_utils/libcomm_thread.cpp 2024-05-07 20:16:39.608798681 +0800
|
||||
--- openGauss-server-5.0.1-edit/src/gausskernel/cbb/communication/libcomm_utils/libcomm_thread.cpp 2024-05-07 20:17:58.873383188 +0800
|
||||
***************
|
||||
*** 2417,2423 ****
|
||||
#else
|
||||
switch ((comm_sender_flower_pid = fork_process())) {
|
||||
#endif
|
||||
! case -1:
|
||||
ereport(LOG, (errmsg("could not fork comm sender flower process: %m")));
|
||||
return 0;
|
||||
#ifndef EXEC_BACKEND
|
||||
--- 2417,2423 ----
|
||||
#else
|
||||
switch ((comm_sender_flower_pid = fork_process())) {
|
||||
#endif
|
||||
! case (ThreadId)-1:
|
||||
ereport(LOG, (errmsg("could not fork comm sender flower process: %m")));
|
||||
return 0;
|
||||
#ifndef EXEC_BACKEND
|
||||
***************
|
||||
*** 2454,2460 ****
|
||||
#else
|
||||
switch ((comm_receiver_flower_pid = fork_process())) {
|
||||
#endif
|
||||
! case -1:
|
||||
ereport(LOG, (errmsg("could not fork comm sender flower process: %m")));
|
||||
return 0;
|
||||
#ifndef EXEC_BACKEND
|
||||
--- 2454,2460 ----
|
||||
#else
|
||||
switch ((comm_receiver_flower_pid = fork_process())) {
|
||||
#endif
|
||||
! case (ThreadId)-1:
|
||||
ereport(LOG, (errmsg("could not fork comm sender flower process: %m")));
|
||||
return 0;
|
||||
#ifndef EXEC_BACKEND
|
||||
***************
|
||||
*** 2488,2494 ****
|
||||
#else
|
||||
switch ((comm_auxiliary_pid = fork_process())) {
|
||||
#endif
|
||||
! case -1:
|
||||
ereport(LOG, (errmsg("could not fork comm auxiliary flower process: %m")));
|
||||
return 0;
|
||||
#ifndef EXEC_BACKEND
|
||||
--- 2488,2494 ----
|
||||
#else
|
||||
switch ((comm_auxiliary_pid = fork_process())) {
|
||||
#endif
|
||||
! case (ThreadId)-1:
|
||||
ereport(LOG, (errmsg("could not fork comm auxiliary flower process: %m")));
|
||||
return 0;
|
||||
#ifndef EXEC_BACKEND
|
||||
***************
|
||||
*** 2522,2528 ****
|
||||
switch ((comm_receiver_pid = fork_process()))
|
||||
#endif
|
||||
{
|
||||
! case -1:
|
||||
ereport(LOG, (errmsg("could not fork comm receiver process: %m")));
|
||||
return 0;
|
||||
#ifndef EXEC_BACKEND
|
||||
--- 2522,2528 ----
|
||||
switch ((comm_receiver_pid = fork_process()))
|
||||
#endif
|
||||
{
|
||||
! case (ThreadId)-1:
|
||||
ereport(LOG, (errmsg("could not fork comm receiver process: %m")));
|
||||
return 0;
|
||||
#ifndef EXEC_BACKEND
|
||||
diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' openGauss-server-5.0.1/src/gausskernel/storage/smgr/smgr.cpp openGauss-server-5.0.1-edit/src/gausskernel/storage/smgr/smgr.cpp
|
||||
*** openGauss-server-5.0.1/src/gausskernel/storage/smgr/smgr.cpp 2024-05-07 20:16:39.940801129 +0800
|
||||
--- openGauss-server-5.0.1-edit/src/gausskernel/storage/smgr/smgr.cpp 2024-05-07 20:17:59.201385607 +0800
|
||||
***************
|
||||
*** 949,955 ****
|
||||
return convertScalarToDatumT<UNKNOWNOID>;
|
||||
}
|
||||
default: {
|
||||
! return convertScalarToDatumT<-2>;
|
||||
}
|
||||
}
|
||||
}
|
||||
--- 949,955 ----
|
||||
return convertScalarToDatumT<UNKNOWNOID>;
|
||||
}
|
||||
default: {
|
||||
! return convertScalarToDatumT<((Oid)-2)>;
|
||||
}
|
||||
}
|
||||
}
|
||||
39
compile_2309.patch
Normal file
39
compile_2309.patch
Normal file
@ -0,0 +1,39 @@
|
||||
diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' openGauss-server-5.0.1/src/bin/pg_basebackup/pg_basebackup.cpp openGauss-server-5.0.1-edit/src/bin/pg_basebackup/pg_basebackup.cpp
|
||||
*** openGauss-server-5.0.1/src/bin/pg_basebackup/pg_basebackup.cpp 2024-05-07 20:16:39.176795495 +0800
|
||||
--- openGauss-server-5.0.1-edit/src/bin/pg_basebackup/pg_basebackup.cpp 2024-05-07 20:17:58.441380003 +0800
|
||||
***************
|
||||
*** 1622,1628 ****
|
||||
struct dirent* ent;
|
||||
while (1) {
|
||||
ent = readdir(dir);
|
||||
! if (ent <= 0) {
|
||||
break;
|
||||
}
|
||||
if ((strcmp(".", ent->d_name) == 0) || (strcmp("..", ent->d_name) == 0)) {
|
||||
--- 1622,1628 ----
|
||||
struct dirent* ent;
|
||||
while (1) {
|
||||
ent = readdir(dir);
|
||||
! if (ent == NULL) {
|
||||
break;
|
||||
}
|
||||
if ((strcmp(".", ent->d_name) == 0) || (strcmp("..", ent->d_name) == 0)) {
|
||||
diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' openGauss-server-5.0.1/src/gausskernel/runtime/opfusion/opfusion_util.cpp openGauss-server-5.0.1-edit/src/gausskernel/runtime/opfusion/opfusion_util.cpp
|
||||
*** openGauss-server-5.0.1/src/gausskernel/runtime/opfusion/opfusion_util.cpp 2024-05-07 20:16:39.780799949 +0800
|
||||
--- openGauss-server-5.0.1-edit/src/gausskernel/runtime/opfusion/opfusion_util.cpp 2024-05-07 20:17:59.041384427 +0800
|
||||
***************
|
||||
*** 424,430 ****
|
||||
|
||||
/* check whether to have order by */
|
||||
if (node->aggstrategy != AGG_PLAIN ||
|
||||
! node->groupingSets > 0) {
|
||||
return NOBYPASS_NOT_PLAIN_AGG;
|
||||
}
|
||||
|
||||
--- 424,430 ----
|
||||
|
||||
/* check whether to have order by */
|
||||
if (node->aggstrategy != AGG_PLAIN ||
|
||||
! node->groupingSets != NIL) {
|
||||
return NOBYPASS_NOT_PLAIN_AGG;
|
||||
}
|
||||
BIN
dmlc-core-v0.5.tar.gz
Normal file
BIN
dmlc-core-v0.5.tar.gz
Normal file
Binary file not shown.
@ -1,35 +0,0 @@
|
||||
diff -crN zlib-1.2.11-org/contrib/minizip/Makefile.miniunz zlib-1.2.11/contrib/minizip/Makefile.miniunz
|
||||
*** zlib-1.2.11-org/contrib/minizip/Makefile.miniunz 1970-01-01 08:00:00.000000000 +0800
|
||||
--- zlib-1.2.11/contrib/minizip/Makefile.miniunz 2021-11-10 16:00:17.706436344 +0800
|
||||
***************
|
||||
*** 0 ****
|
||||
--- 1,29 ----
|
||||
+ CC=cc
|
||||
+ # CFLAGS=-g -O0 -O -I../..
|
||||
+ CFLAGS=-O3 -fPIC -I../..
|
||||
+ ARFLAGS=rc
|
||||
+ AR=ar
|
||||
+
|
||||
+ UNZ_OBJS = unzip.o ioapi.o
|
||||
+ LIB_COMMON = libminiunz.a
|
||||
+
|
||||
+ .c.o:
|
||||
+ $(CC) -c $(CFLAGS) $*.c
|
||||
+
|
||||
+ all: $(LIB_COMMON)
|
||||
+
|
||||
+ $(LIB_COMMON) : $(UNZ_OBJS)
|
||||
+ $(AR) $(ARFLAGS) $@ $(UNZ_OBJS)
|
||||
+
|
||||
+ $(UNZ_OBJS):%.o:%.c
|
||||
+ $(CC) -c $(CFLAGS) $*.c
|
||||
+ # $(CC) $(CFLAGS) -O $@ -c $<
|
||||
+
|
||||
+ install:
|
||||
+ cp ioapi.h $(DESTDIR)/include/
|
||||
+ cp unzip.h $(DESTDIR)/include/
|
||||
+ cp libminiunz.a $(DESTDIR)/lib/
|
||||
+ chmod 644 $(DESTDIR)/include/ioapi.h $(DESTDIR)/include/unzip.h $(DESTDIR)/lib/libminiunz.a
|
||||
+
|
||||
+ clean:
|
||||
+ /bin/rm -f *.o *.a
|
||||
@ -1,9 +1,9 @@
|
||||
diff -crN openGauss-server-2.1.0/src/bin/psql/startup.cpp openGauss-server-2.1.0-edit/src/bin/psql/startup.cpp
|
||||
*** openGauss-server-2.1.0/src/bin/psql/startup.cpp 2021-12-13 16:23:09.000000000 +0800
|
||||
--- openGauss-server-2.1.0-edit/src/bin/psql/startup.cpp 2022-01-22 22:08:39.420475340 +0800
|
||||
diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' openGauss-server-5.0.1/src/bin/psql/startup.cpp openGauss-server-5.0.1-edit/src/bin/psql/startup.cpp
|
||||
*** openGauss-server-5.0.1/src/bin/psql/startup.cpp 2024-05-07 20:16:39.232795908 +0800
|
||||
--- openGauss-server-5.0.1-edit/src/bin/psql/startup.cpp 2024-05-07 20:17:58.501380445 +0800
|
||||
***************
|
||||
*** 257,262 ****
|
||||
--- 257,266 ----
|
||||
*** 530,535 ****
|
||||
--- 530,539 ----
|
||||
pset.popt.topt.recordSep.separator_zero = false;
|
||||
}
|
||||
|
||||
@ -14,23 +14,11 @@ diff -crN openGauss-server-2.1.0/src/bin/psql/startup.cpp openGauss-server-2.1.0
|
||||
if (options.username == NULL)
|
||||
password_prompt = pg_strdup(_("Password: "));
|
||||
else {
|
||||
diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' openGauss-server-5.0.1/src/gausskernel/dbmind/db4ai/executor/Makefile openGauss-server-5.0.1-edit/src/gausskernel/dbmind/db4ai/executor/Makefile
|
||||
*** openGauss-server-5.0.1/src/gausskernel/dbmind/db4ai/executor/Makefile 2024-05-07 20:16:39.632798858 +0800
|
||||
--- openGauss-server-5.0.1-edit/src/gausskernel/dbmind/db4ai/executor/Makefile 2024-05-07 20:17:58.897383365 +0800
|
||||
***************
|
||||
*** 1334,1337 ****
|
||||
KEY_LEN);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
! }
|
||||
\ No newline at end of file
|
||||
--- 1338,1341 ----
|
||||
KEY_LEN);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
! }
|
||||
diff -crN openGauss-server-2.1.0/src/gausskernel/dbmind/db4ai/executor/Makefile openGauss-server-2.1.0-edit/src/gausskernel/dbmind/db4ai/executor/Makefile
|
||||
*** openGauss-server-2.1.0/src/gausskernel/dbmind/db4ai/executor/Makefile 2021-12-13 16:23:09.000000000 +0800
|
||||
--- openGauss-server-2.1.0-edit/src/gausskernel/dbmind/db4ai/executor/Makefile 2022-01-22 22:09:13.399068986 +0800
|
||||
***************
|
||||
*** 11,20 ****
|
||||
*** 11,21 ****
|
||||
|
||||
include $(top_builddir)/src/Makefile.global
|
||||
|
||||
@ -38,7 +26,8 @@ diff -crN openGauss-server-2.1.0/src/gausskernel/dbmind/db4ai/executor/Makefile
|
||||
- ifeq ($(PLATFORM_ARCH),x86_64)
|
||||
- override CPPFLAGS += -mavx
|
||||
- endif
|
||||
|
||||
-
|
||||
ifneq "$(MAKECMDGOALS)" "clean"
|
||||
ifneq "$(MAKECMDGOALS)" "distclean"
|
||||
ifneq "$(shell which g++ |grep hutaf_llt |wc -l)" "1"
|
||||
--- 11,16 ----
|
||||
|
||||
Binary file not shown.
@ -1,48 +1,40 @@
|
||||
%define cjson_name cJSON
|
||||
%define cjson_version 1.7.13
|
||||
%define zlib_name zlib
|
||||
%define zlib_version 1.2.11
|
||||
%define protobuf_name protobuf
|
||||
%define protobuf_version 3.11.3
|
||||
%define orc_name orc-rel-release
|
||||
%define orc_version 1.6.0
|
||||
%define zlib_version 1.2.12
|
||||
%define xgboost_name xgboost
|
||||
%define xgboost_version v1.4.1
|
||||
%define dmlc_name dmlc-core
|
||||
%define dmlc_version v0.5
|
||||
%define port 7654
|
||||
%define datapath /var/lib/opengauss
|
||||
%define apppath %{_prefix}/local/opengauss
|
||||
|
||||
Name: opengauss
|
||||
Version: 2.1.0
|
||||
Release: 9
|
||||
Version: 5.0.1
|
||||
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
|
||||
Source0: openGauss-server-%{version}.tar.gz
|
||||
Source1: %{cjson_name}-%{cjson_version}.tar.gz
|
||||
Source2: %{zlib_name}-%{zlib_version}.tar.gz
|
||||
Source3: %{protobuf_name}-%{protobuf_version}.tar.gz
|
||||
Source4: %{orc_name}-%{orc_version}.tar.gz
|
||||
Source3: %{dmlc_name}-%{dmlc_version}.tar.gz
|
||||
Source4: %{xgboost_name}-%{xgboost_version}.tar.gz
|
||||
Source5: opengauss-bashprofile
|
||||
Source6: opengauss.service
|
||||
Source7: autostart.sh
|
||||
|
||||
Patch0: og-edit.patch
|
||||
Patch1: 0001-cJSON.patch
|
||||
Patch20: 0001-zlib.patch
|
||||
Patch21: 0002-zlib.patch
|
||||
Patch22: 0003-zlib.patch
|
||||
Patch23: makefile-miniunz.patch
|
||||
Patch40: 0001-orc.patch
|
||||
Patch41: 0002-add-kylinsec-platform.patch
|
||||
Patch1: cmake_compile.patch
|
||||
Patch2: compile_2309.patch
|
||||
Patch3: openssl3-adptor.patch
|
||||
Patch20: zlib.patch
|
||||
Patch21: zlib-CVE-2022-37434.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
|
||||
BuildRequires: libcgroup-devel libcurl-devel unixODBC-devel jemalloc-devel
|
||||
BuildRequires: cjson lz4-devel zstd-devel boost-devel cjson-devel
|
||||
BuildRequires: libcgroup-devel libcurl-devel unixODBC-devel jemalloc-devel krb5-devel
|
||||
BuildRequires: java-1.8.0-openjdk-devel libedit-devel libaio-devel
|
||||
BuildRequires: bison flex DCF
|
||||
%ifnarch aarch64 %{arm}
|
||||
BuildRequires: numactl-devel
|
||||
%endif
|
||||
%ifarch sw_64
|
||||
BuildRequires: libatomic
|
||||
%endif
|
||||
@ -51,13 +43,11 @@ BuildRequires: libatomic
|
||||
%global __provides_exclude %{_privatelibs}
|
||||
%global __requires_exclude %{_privatelibs}
|
||||
|
||||
Requires: lz4-devel protobuf-devel snappy-devel zstd-devel boost-devel
|
||||
Requires: lz4-devel zstd-devel boost-devel cjson-devel
|
||||
Requires: libcgroup-devel libcurl-devel unixODBC-devel jemalloc-devel
|
||||
Requires: java-1.8.0-openjdk-devel libedit-devel libaio-devel
|
||||
Requires: DCF lsof
|
||||
%ifnarch aarch64 %{arm}
|
||||
Requires: numactl-devel
|
||||
%endif
|
||||
|
||||
%description
|
||||
openGauss kernel : openGauss is an open source relational database management system.
|
||||
@ -66,45 +56,28 @@ openGauss kernel : openGauss is an open source relational database management sy
|
||||
|
||||
%prep
|
||||
%setup -q -c -n %{name}-%{version}
|
||||
%setup -q -D -T -a 1
|
||||
%setup -q -D -T -a 2
|
||||
%setup -q -D -T -a 3
|
||||
%setup -q -D -T -a 4
|
||||
|
||||
pushd openGauss-server-%{version}
|
||||
%patch0 -p1
|
||||
popd
|
||||
|
||||
pushd %{cjson_name}-%{cjson_version}
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
popd
|
||||
|
||||
pushd %{zlib_name}-%{zlib_version}
|
||||
%patch20 -p1
|
||||
%patch21 -p1
|
||||
%patch22 -p1
|
||||
%patch23 -p1
|
||||
popd
|
||||
|
||||
pushd %{orc_name}-%{orc_version}
|
||||
%patch40 -p1
|
||||
popd
|
||||
|
||||
%patch41 -p1
|
||||
%ifarch sw_64
|
||||
%patch3000 -p1
|
||||
%endif
|
||||
%build
|
||||
########### build cjson ###########
|
||||
build_target=$(pwd)/deps_binarylibs
|
||||
|
||||
pushd %{cjson_name}-%{cjson_version}
|
||||
make
|
||||
make install PREFIX=${build_target}/cjson
|
||||
popd
|
||||
build_target=$(pwd)/binarylibs/kernel/dependency
|
||||
|
||||
########### build zlib ###########
|
||||
pushd %{zlib_name}-%{zlib_version}
|
||||
zlib_dir=${build_target}/zlib1.2.11/comm
|
||||
CONFIGURE_EXTRA_FLAG="--64"
|
||||
%ifarch aarch64
|
||||
CONFIGURE_EXTRA_FLAG=""
|
||||
@ -112,7 +85,7 @@ CONFIGURE_EXTRA_FLAG="--64"
|
||||
%ifarch sw_64
|
||||
CONFIGURE_EXTRA_FLAG=""
|
||||
%endif
|
||||
./configure ${CONFIGURE_EXTRA_FLAG} --prefix=${build_target}/zlib
|
||||
./configure ${CONFIGURE_EXTRA_FLAG} --prefix=${zlib_dir}
|
||||
sed -i '21a CFLAGS += -fPIC' Makefile
|
||||
MAKE_EXTRA_FLAG="-m64"
|
||||
%ifarch aarch64
|
||||
@ -124,73 +97,64 @@ MAKE_EXTRA_FLAG="-m64"
|
||||
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
|
||||
cd contrib/minizip/
|
||||
make -f Makefile.miniunz %{?_smp_mflags}
|
||||
rm -rf ${build_target}/zlib/lib/pkgconfig
|
||||
make install -f Makefile.miniunz DESTDIR=${build_target}/zlib
|
||||
make CFLAGS="-O3 -fPIC -I../.." -f Makefile %{?_smp_mflags}
|
||||
mv libminiz.a libminiunz.a
|
||||
cp ioapi.h ${zlib_dir}/include/
|
||||
cp unzip.h ${zlib_dir}/include/
|
||||
cp libminiunz.a ${zlib_dir}/lib/
|
||||
chmod 644 ${zlib_dir}/include/ioapi.h ${zlib_dir}/include/unzip.h ${zlib_dir}/lib/libminiunz.a
|
||||
cp -r ${zlib_dir} ${build_target}/zlib1.2.11/llt
|
||||
popd
|
||||
|
||||
########### build protobuf ###########
|
||||
pushd %{protobuf_name}-%{protobuf_version}/cmake
|
||||
sed -i '18a set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -fPIE -fPIC -fstack-protector-all -Wstack-protector -s -Wl,-z,relro,-z,now -D_GLIBCXX_USE_CXX11_ABI=0\")' CMakeLists.txt
|
||||
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${build_target}/protobuf/ -Dprotobuf_BUILD_TESTS=OFF;
|
||||
make CFLAGS="-fPIE -fPIC" %{?_smp_mflags}
|
||||
make install
|
||||
popd
|
||||
########### build xgboost ###########
|
||||
pushd %{xgboost_name}-1.4.1
|
||||
xgboost_dir=${build_target}/xgboost/comm
|
||||
|
||||
########### build apache-orc ###########
|
||||
pushd %{orc_name}-%{orc_version}
|
||||
cp ${build_target}/protobuf ./c++/libs/protobuf -rp
|
||||
cp ${build_target}/zlib ./c++/libs/zlib -rp
|
||||
export PATH=${build_target}/protobuf/bin:$PATH
|
||||
export LD_LIBRARY_PATH=$(pwd)/c++/libs:$LD_LIBRARY_PATH
|
||||
export ORC_LIBS=$(pwd)/c++/libs
|
||||
sed -i \
|
||||
-e "32a set (PROTOBUF_INCLUDE_DIRS \"$ORC_LIBS/protobuf/include\")" \
|
||||
-e "32a set (PROTOBUF_LIBRARIES \"$ORC_LIBS/protobuf/lib/libprotobuf.a\")" \
|
||||
-e "32a set (PROTOBUF_EXECUTABLE `which protoc`)" \
|
||||
-e "32a set (SNAPPY_INCLUDE_DIRS \"/usr/include\")" \
|
||||
-e "32a set (SNAPPY_LIBRARIES \"/usr/lib64/libsnappy.a\")" \
|
||||
-e "32a set (ZLIB_INCLUDE_DIRS \"$ORC_LIBS/zlib/include\")" \
|
||||
-e "32a set (ZLIB_LIBRARIES \"$ORC_LIBS/zlib/lib/libz.a\")" \
|
||||
-e "32a set (LZ4_INCLUDE_DIRS \"/usr/include\")" \
|
||||
-e "32a set (LZ4_LIBRARIES \"/usr/lib64/liblz4.a\")" CMakeLists.txt
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_INSTALL_PREFIX=${build_target}/liborc -DBUILD_JAVA=OFF -DBUILD_SHARED_LIBS=OFF
|
||||
sed -i '9a set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wl,-z,now -fPIE -fPIC -fstack-protector-strong")' ./CMakeLists.txt
|
||||
sed -i '10a set (CMAKE_CPP_FLAGS "${CMAKE_CPP_FLAGS} -Wl,-z,now -fPIE -fPIC -fstack-protector-strong")' ./CMakeLists.txt
|
||||
sed -i '11a set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-z,now -fPIE -fPIC -fstack-protector-strong")' ./CMakeLists.txt
|
||||
|
||||
rm -rf dmlc-core
|
||||
cp -r ../dmlc-core-0.5/ ./dmlc-core
|
||||
|
||||
rm -rf build_install
|
||||
mkdir build_install && cd build_install
|
||||
cmake .. -DCMAKE_INSTALL_PREFIX=${xgboost_dir}
|
||||
make %{?_smp_mflags}
|
||||
make install
|
||||
cp c++/src/orc_proto.pb.h ${build_target}/liborc/include
|
||||
cp c++/src/Adaptor.hh ${build_target}/liborc/include/orc/
|
||||
cp ../c++/src/Exceptions.hh ${build_target}/liborc/include/orc/
|
||||
cp -r ${xgboost_dir} ${build_target}/xgboost/llt
|
||||
popd
|
||||
|
||||
########### build opengauss ###########
|
||||
pushd openGauss-server-%{version}
|
||||
chmod +x ./configure
|
||||
./configure \
|
||||
%ifarch sw_64
|
||||
CC=g++ CFLAGS='-O0' \
|
||||
%else
|
||||
CC=g++ CFLAGS='-O2' \
|
||||
%endif
|
||||
--prefix=%{apppath} \
|
||||
--3rd=${build_target} \
|
||||
--enable-thread-safety \
|
||||
--with-readline \
|
||||
--without-zlib \
|
||||
--without-gssapi \
|
||||
--without-krb5 \
|
||||
--enable-lite-mode \
|
||||
--with-openeuler-os
|
||||
%make_build %{?_smp_mflags}
|
||||
popd
|
||||
opengauss_source_dir=$(pwd)
|
||||
export ENABLE_LITE_MODE=ON
|
||||
export DEBUG_TYPE=release
|
||||
export THIRD_BIN_PATH=${build_target}/../../../binarylibs
|
||||
export LD_LIBRARY_PATH=$THIRD_BIN_PATH/kernel/dependency/zlib1.2.11/comm/lib:$LD_LIBRARY_PATH
|
||||
export LD_LIBRARY_PATH=$THIRD_BIN_PATH/kernel/dependency/xgboost/comm/lib:$LD_LIBRARY_PATH
|
||||
export PREFIX_HOME=${opengauss_source_dir}/mppdb_temp_install
|
||||
|
||||
%install
|
||||
pushd openGauss-server-%{version}
|
||||
%make_install -s %{?_smp_mflags}
|
||||
mkdir -p %{buildroot}/var/lib/opengauss/data
|
||||
mkdir -p %{buildroot}/%{apppath}/script
|
||||
cp build/script/opengauss_config_file_mini %{buildroot}/%{apppath}/share/postgresql/
|
||||
|
||||
mkdir -p tmp_build
|
||||
cd tmp_build
|
||||
cmake .. -DENABLE_MULTIPLE_NODES=OFF -DENABLE_PRIVATEGAUSS=OFF -DENABLE_THREAD_SAFETY=ON -DENABLE_LITE_MODE=ON -DENABLE_OPENEULER_MAJOR=ON -DWITH_OPENEULER_OS=ON &&
|
||||
make %{?_smp_mflags}
|
||||
make install
|
||||
|
||||
# separate_debug_symbol.sh dir
|
||||
cd ${opengauss_source_dir}/build/script
|
||||
chmod +x ./separate_debug_information.sh
|
||||
./separate_debug_information.sh
|
||||
rm -rf ${opengauss_source_dir}/mppdb_temp_install/packages
|
||||
rm -rf ${opengauss_source_dir}/mppdb_temp_install/symbols
|
||||
|
||||
# copy binarylibs packages to /usr/local/opengauss/
|
||||
cp -r ${opengauss_source_dir}/mppdb_temp_install/* %{buildroot}/usr/local/opengauss
|
||||
sed -i "/wal_insert_status_entries/d" ${opengauss_source_dir}/build/script/opengauss_config_file_mini
|
||||
cp ${opengauss_source_dir}/build/script/opengauss_config_file_mini %{buildroot}/%{apppath}/share/postgresql/
|
||||
popd
|
||||
|
||||
# opengauss datanode dir.
|
||||
@ -203,9 +167,8 @@ install -m 644 %{SOURCE6} %{buildroot}/%{apppath}/script/opengauss.service
|
||||
install -m 700 %{SOURCE7} %{buildroot}/%{apppath}/script/autostart.sh
|
||||
|
||||
%pre
|
||||
/usr/sbin/groupadd opengauss >/dev/null 2>&1 || :
|
||||
/usr/sbin/useradd -M -N -g opengauss -d %{datapath} -s /bin/bash \
|
||||
-c "openGauss Server" opengauss >/dev/null 2>&1 || :
|
||||
/usr/sbin/groupadd -r opengauss >/dev/null 2>&1 || :
|
||||
/usr/sbin/useradd -M -N -g opengauss -r -d %{datapath} -s /bin/bash -c "openGauss Server" opengauss >/dev/null 2>&1 || :
|
||||
|
||||
# for install step
|
||||
if [ $1 = 1 ]; then
|
||||
@ -216,15 +179,18 @@ if [ $1 = 1 ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# upgrade installation
|
||||
if [ $1 = 2 ]; then
|
||||
pushd openGauss-server-%{version}/liteom
|
||||
sh upgrade_GAUSSv5.sh upgrade_pre
|
||||
popd
|
||||
fi
|
||||
|
||||
%post
|
||||
# set opengauss mini config parameters
|
||||
set_mini_configparam(){
|
||||
config_mini_file=%{apppath}/share/postgresql/opengauss_config_file_mini
|
||||
|
||||
# set guc parameters
|
||||
echo "port = %{port}" >> ${config_mini_file}
|
||||
echo "synchronous_commit = off" >> ${config_mini_file}
|
||||
echo "listen_addresses = '127.0.0.1'" >> ${config_mini_file}
|
||||
|
||||
config_sample_file=%{apppath}/share/postgresql/postgresql.conf.sample
|
||||
if [[ -f $config_mini_file ]]
|
||||
@ -258,33 +224,53 @@ start_opengauss(){
|
||||
echo "Please delete dir and reinstall opengauss."
|
||||
return 0
|
||||
fi
|
||||
|
||||
result=`su - opengauss -c "source /var/lib/opengauss/.bash_profile; gs_initdb -D /var/lib/opengauss/data -U opengauss --nodename=single_node"`
|
||||
|
||||
result=$(su - opengauss -c "source ~/.bash_profile; gs_initdb -D /var/lib/opengauss/data -U opengauss --nodename=single_node")
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Init openGauss database failed."
|
||||
echo $result
|
||||
exit $result
|
||||
else
|
||||
echo "Init openGauss database success."
|
||||
result=`su - opengauss -c "source /var/lib/opengauss/.bash_profile; gs_ctl start -D /var/lib/opengauss/data"`
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Start openGauss database failed."
|
||||
echo $result
|
||||
else
|
||||
echo "Start openGauss database success."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
add_service(){
|
||||
cp %{apppath}/script/opengauss.service /usr/lib/systemd/system/
|
||||
systemctl enable opengauss.service
|
||||
systemctl daemon-reload
|
||||
}
|
||||
|
||||
copy_bashrc(){
|
||||
copyResult=$(su - opengauss -c "echo 'export GAUSSHOME=/usr/local/opengauss/' >> ~/.bashrc &&
|
||||
echo 'export LD_LIBRARY_PATH=/usr/local/opengauss/lib:$LD_LIBRARY_PATH' >> ~/.bashrc &&
|
||||
echo 'export PATH=/usr/local/opengauss/bin:$PATH' >> ~/.bashrc &&
|
||||
echo 'export PGDATA=/var/lib/opengauss/data' >> ~/.bashrc &&
|
||||
echo 'export PORT=7654' >> ~/.bashrc && source ~/.bashrc")
|
||||
if [ $? -ne 0 ]; then
|
||||
exit $result
|
||||
fi
|
||||
}
|
||||
|
||||
# for install step
|
||||
if [ $1 = 1 ]; then
|
||||
chmod -R 755 /usr/local/opengauss
|
||||
chown -R opengauss:opengauss /usr/local/opengauss
|
||||
set_mini_configparam
|
||||
add_service
|
||||
start_opengauss
|
||||
add_service
|
||||
copy_bashrc
|
||||
fi
|
||||
|
||||
# upgrade installation
|
||||
if [ $1 = 2 ]; then
|
||||
pushd openGauss-server-%{version}/liteom
|
||||
sh upgrade_GAUSSv5.sh upgrade_bin
|
||||
servicename=/usr/lib/systemd/system/opengauss.service
|
||||
if [ -f $servicename ]; then
|
||||
systemctl restart opengauss.service
|
||||
fi
|
||||
sh upgrade_GAUSSv5.sh upgrade_post
|
||||
sh upgrade_GAUSSv5.sh upgrade_commit
|
||||
popd
|
||||
fi
|
||||
|
||||
%postun
|
||||
@ -296,13 +282,16 @@ remove_service(){
|
||||
fi
|
||||
}
|
||||
clear_database(){
|
||||
pid=$(ps -ef | grep /usr/local/opengauss/bin/gaussdb | grep -v grep | awk '{print $2}')
|
||||
pid=$(ps -ef | grep /var/lib/opengauss/data | grep -v grep | awk '{print $2}')
|
||||
if [ "$pid" != "" ]; then
|
||||
kill -9 $pid
|
||||
fi
|
||||
if [ -d /var/lib/opengauss/data ]; then
|
||||
rm -rf /var/lib/opengauss/data
|
||||
fi
|
||||
if [ -d /usr/local/opengauss ]; then
|
||||
rm -rf /usr/local/opengauss
|
||||
fi
|
||||
}
|
||||
if [ "$1" = "0" ]; then
|
||||
remove_service
|
||||
@ -320,7 +309,13 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Aug 18 2023 panchenbo <panchenbo@kylinsec.com.cn> - 2.1.0-9
|
||||
* Fri May 24 2024 zhangzhihui <zhangzhihui42@huawei.com> - 5.0.1-12
|
||||
- upgrade function
|
||||
|
||||
* Mon May 6 2024 liuheng <liuheng76@huawei.com> - 5.0.1-12
|
||||
- Update version to 5.0.1
|
||||
|
||||
* Fri Aug 18 2023 panchenbo <panchenbo@kylinsec.com.cn> - 2.1.0-11
|
||||
- add sw_64 support
|
||||
|
||||
* Tue Jun 6 2023 dillon chen<dillon.chen@gmail.com> - 2.1.0-8
|
||||
|
||||
@ -3,8 +3,12 @@ Description=Start openGauss server
|
||||
After=local-fs.target
|
||||
|
||||
[Service]
|
||||
Type=idle
|
||||
ExecStart=/usr/local/opengauss/script/autostart.sh
|
||||
Type=forking
|
||||
User=opengauss
|
||||
WorkingDirectory=/var/lib/opengauss
|
||||
ExecStart=/bin/bash -c 'source ~/.bashrc; gs_ctl start -D /var/lib/opengauss/data'
|
||||
ExecStop=/bin/bash -c 'source ~/.bashrc; gs_ctl stop -D /var/lib/opengauss/data'
|
||||
ExecReload=/bin/bash -c 'source ~/.bashrc; gs_ctl reload -D /var/lib/opengauss/data'
|
||||
Delegate=yes
|
||||
RemainAfterExit=yes
|
||||
|
||||
|
||||
89
openssl3-adptor.patch
Executable file
89
openssl3-adptor.patch
Executable file
@ -0,0 +1,89 @@
|
||||
diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' openGauss-server-5.0.1/src/common/interfaces/libpq/client_logic_hooks/encryption_hooks/sm2_enc_key.cpp openGauss-server-5.0.1-edit/src/common/interfaces/libpq/client_logic_hooks/encryption_hooks/sm2_enc_key.cpp
|
||||
*** openGauss-server-5.0.1/src/common/interfaces/libpq/client_logic_hooks/encryption_hooks/sm2_enc_key.cpp 2024-05-07 20:16:39.548798239 +0800
|
||||
--- openGauss-server-5.0.1-edit/src/common/interfaces/libpq/client_logic_hooks/encryption_hooks/sm2_enc_key.cpp 2024-05-07 20:17:58.813382746 +0800
|
||||
***************
|
||||
*** 152,165 ****
|
||||
EVP_PKEY_free(public_evp_key);
|
||||
return CMKEM_EVP_ERR;
|
||||
}
|
||||
!
|
||||
ret = EVP_PKEY_set_alias_type(public_evp_key, EVP_PKEY_SM2);
|
||||
if (ret != 1) {
|
||||
cmkem_errmsg("EVP_PKEY_set_alias_type to EVP_PKEY_SM2 failed!");
|
||||
EVP_PKEY_free(public_evp_key);
|
||||
return CMKEM_EVP_ERR;
|
||||
}
|
||||
!
|
||||
/* do cipher. */
|
||||
ctx = EVP_PKEY_CTX_new(public_evp_key, NULL);
|
||||
EVP_PKEY_free(public_evp_key);
|
||||
--- 152,165 ----
|
||||
EVP_PKEY_free(public_evp_key);
|
||||
return CMKEM_EVP_ERR;
|
||||
}
|
||||
! #ifndef WITH_OPENEULER_OS
|
||||
ret = EVP_PKEY_set_alias_type(public_evp_key, EVP_PKEY_SM2);
|
||||
if (ret != 1) {
|
||||
cmkem_errmsg("EVP_PKEY_set_alias_type to EVP_PKEY_SM2 failed!");
|
||||
EVP_PKEY_free(public_evp_key);
|
||||
return CMKEM_EVP_ERR;
|
||||
}
|
||||
! #endif
|
||||
/* do cipher. */
|
||||
ctx = EVP_PKEY_CTX_new(public_evp_key, NULL);
|
||||
EVP_PKEY_free(public_evp_key);
|
||||
***************
|
||||
*** 242,255 ****
|
||||
EVP_PKEY_free(private_evp_key);
|
||||
return CMKEM_EVP_ERR;
|
||||
}
|
||||
!
|
||||
ret = EVP_PKEY_set_alias_type(private_evp_key, EVP_PKEY_SM2);
|
||||
if (ret != 1) {
|
||||
cmkem_errmsg("EVP_PKEY_set_alias_type to EVP_PKEY_SM2 failed!");
|
||||
EVP_PKEY_free(private_evp_key);
|
||||
return CMKEM_EVP_ERR;
|
||||
}
|
||||
!
|
||||
/* do cipher. */
|
||||
ctx = EVP_PKEY_CTX_new(private_evp_key, NULL);
|
||||
EVP_PKEY_free(private_evp_key);
|
||||
--- 242,255 ----
|
||||
EVP_PKEY_free(private_evp_key);
|
||||
return CMKEM_EVP_ERR;
|
||||
}
|
||||
! #ifndef WITH_OPENEULER_OS
|
||||
ret = EVP_PKEY_set_alias_type(private_evp_key, EVP_PKEY_SM2);
|
||||
if (ret != 1) {
|
||||
cmkem_errmsg("EVP_PKEY_set_alias_type to EVP_PKEY_SM2 failed!");
|
||||
EVP_PKEY_free(private_evp_key);
|
||||
return CMKEM_EVP_ERR;
|
||||
}
|
||||
! #endif
|
||||
/* do cipher. */
|
||||
ctx = EVP_PKEY_CTX_new(private_evp_key, NULL);
|
||||
EVP_PKEY_free(private_evp_key);
|
||||
diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' openGauss-server-5.0.1/src/include/gs_policy/policy_common.h openGauss-server-5.0.1-edit/src/include/gs_policy/policy_common.h
|
||||
*** openGauss-server-5.0.1/src/include/gs_policy/policy_common.h 2024-05-07 20:16:40.004801601 +0800
|
||||
--- openGauss-server-5.0.1-edit/src/include/gs_policy/policy_common.h 2024-05-08 15:15:54.570657064 +0800
|
||||
***************
|
||||
*** 22,27 ****
|
||||
--- 22,28 ----
|
||||
*/
|
||||
#ifndef _GS_POLICY_COMMON_H
|
||||
#define _GS_POLICY_COMMON_H
|
||||
+ #include <vector>
|
||||
#include "nodes/parsenodes.h"
|
||||
#include "nodes/plannodes.h"
|
||||
|
||||
***************
|
||||
*** 31,36 ****
|
||||
--- 32,39 ----
|
||||
#include "gs_vector.h"
|
||||
#include "pgaudit.h"
|
||||
|
||||
+ using std::vector;
|
||||
+
|
||||
struct GsPolicyFQDN {
|
||||
GsPolicyFQDN():m_value_schema(0), m_value_object(0), is_function(false){}
|
||||
Oid m_value_schema; /* schema */
|
||||
Binary file not shown.
Binary file not shown.
BIN
xgboost-v1.4.1.tar.gz
Normal file
BIN
xgboost-v1.4.1.tar.gz
Normal file
Binary file not shown.
Binary file not shown.
BIN
zlib-1.2.12.tar.gz
Normal file
BIN
zlib-1.2.12.tar.gz
Normal file
Binary file not shown.
29
zlib-CVE-2022-37434.patch
Normal file
29
zlib-CVE-2022-37434.patch
Normal file
@ -0,0 +1,29 @@
|
||||
From afa90858991e87762da12c5ba8adcf00ee1bd731 Mon Sep 17 00:00:00 2001
|
||||
From: Mark Adler <fork@madler.net>
|
||||
Date: Sat, 30 Jul 2022 15:51:11 -0700
|
||||
Subject: [PATCH] [Backport]Fix a bug when getting a gzip header extra field
|
||||
CVE:CVE-2022-37434
|
||||
Reference:https://github.com/madler/zlib/commit/eff308af425b67093bab25f80f1ae950166bece1
|
||||
---
|
||||
inflate.c | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/inflate.c b/inflate.c
|
||||
index ffb1b69..c1a1dcc 100644
|
||||
--- a/inflate.c
|
||||
+++ b/inflate.c
|
||||
@@ -777,8 +777,9 @@ int flush;
|
||||
if (copy > have) copy = have;
|
||||
if (copy) {
|
||||
if (state->head != Z_NULL &&
|
||||
- state->head->extra != Z_NULL) {
|
||||
- len = state->head->extra_len - state->length;
|
||||
+ state->head->extra != Z_NULL &&
|
||||
+ (len = state->head->extra_len - state->length) <
|
||||
+ state->head->extra_max) {
|
||||
zmemcpy(state->head->extra + len, next,
|
||||
len + copy > state->head->extra_max ?
|
||||
state->head->extra_max - len : copy);
|
||||
--
|
||||
2.1.4
|
||||
|
||||
1270
zlib.patch
Normal file
1270
zlib.patch
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user