From b02fa3702c5aa2d7e5ca37fc8242929985b7fb3a Mon Sep 17 00:00:00 2001 From: zhang_xubo <2578876417@qq.com> Date: Thu, 12 Oct 2023 17:02:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0pagehack=E5=92=8Cxlogdump?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=89=93=E5=8C=85=E8=BF=9B=E6=9D=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/script/aarch64_opengauss_list | 2 ++ build/script/utils/make_compile.sh | 15 +++++++++++++++ build/script/x86_64_opengauss_list | 2 ++ contrib/pagehack/Makefile | 4 ++-- contrib/pg_xlogdump/Makefile | 4 +++- 5 files changed, 24 insertions(+), 3 deletions(-) diff --git a/build/script/aarch64_opengauss_list b/build/script/aarch64_opengauss_list index 93abb91ec5..e459fc75c4 100644 --- a/build/script/aarch64_opengauss_list +++ b/build/script/aarch64_opengauss_list @@ -45,6 +45,8 @@ ./bin/server.key.cipher ./bin/server.key.rand ./bin/gs_plan_simulator.sh +./bin/pg_xlogdump +./bin/pagehack ./etc/kerberos/kadm5.acl ./etc/kerberos/kdc.conf ./etc/kerberos/krb5.conf diff --git a/build/script/utils/make_compile.sh b/build/script/utils/make_compile.sh index ad39690df1..8263828526 100644 --- a/build/script/utils/make_compile.sh +++ b/build/script/utils/make_compile.sh @@ -28,6 +28,9 @@ function read_gaussdb_version() PG_REG_TEST_ROOT="${ROOT_DIR}" ROACH_DIR="${ROOT_DIR}/distribute/bin/roach" MPPDB_DECODING_DIR="${ROOT_DIR}/contrib/mppdb_decoding" +XLOG_DUMP_DIR="${ROOT_DIR}/contrib/pg_xlogdump" +PAGE_HACK_DIR="${ROOT_DIR}/contrib/pagehack" + ################################### # get version number from globals.cpp @@ -259,6 +262,18 @@ function install_gaussdb() fi fi + cd "$XLOG_DUMP_DIR" + make clean >> "$LOG_FILE" 2>&1 + make -sj >> "$LOG_FILE" 2>&1 + make install -sj >> "$LOG_FILE" 2>&1 + echo "End make install xlog_dump" >> "$LOG_FILE" 2>&1 + + cd "$PAGE_HACK_DIR" + make clean >> "$LOG_FILE" 2>&1 + make -sj >> "$LOG_FILE" 2>&1 + make install -sj >> "$LOG_FILE" 2>&1 + echo "End make install pagehack" >> "$LOG_FILE" 2>&1 + chmod 444 ${BUILD_DIR}/bin/cluster_guc.conf dos2unix ${BUILD_DIR}/bin/cluster_guc.conf > /dev/null 2>&1 get_kernel_commitid diff --git a/build/script/x86_64_opengauss_list b/build/script/x86_64_opengauss_list index 17ad1c6bc9..e4c1fb5376 100644 --- a/build/script/x86_64_opengauss_list +++ b/build/script/x86_64_opengauss_list @@ -45,6 +45,8 @@ ./bin/server.key.cipher ./bin/server.key.rand ./bin/gs_plan_simulator.sh +./bin/pg_xlogdump +./bin/pagehack ./etc/kerberos/kadm5.acl ./etc/kerberos/kdc.conf ./etc/kerberos/krb5.conf diff --git a/contrib/pagehack/Makefile b/contrib/pagehack/Makefile index 4c944b7671..4cc02891ed 100644 --- a/contrib/pagehack/Makefile +++ b/contrib/pagehack/Makefile @@ -19,8 +19,8 @@ subdir = contrib/pagehack top_builddir = ../.. include $(top_builddir)/src/Makefile.global override CPPFLAGS += -I${top_builddir}/src/lib/page_compression -override LDFLAGS += -L${top_builddir}/src/lib/page_compression -override CFLAGS += -lpagecompression -lzstd -llz4 +override LDFLAGS += -L${top_builddir}/src/lib/page_compression -Wl,-z,relro,-z,now +override CFLAGS += -lpagecompression -lzstd -llz4 -fstack-protector-all ifeq ($(enable_debug), yes) PG_CPPFLAGS += -DDEBUG endif diff --git a/contrib/pg_xlogdump/Makefile b/contrib/pg_xlogdump/Makefile index 61a89991dc..67c7b52785 100644 --- a/contrib/pg_xlogdump/Makefile +++ b/contrib/pg_xlogdump/Makefile @@ -21,7 +21,9 @@ include $(top_builddir)/src/Makefile.global include $(top_srcdir)/contrib/contrib-global.mk -override CPPFLAGS := -DFRONTEND $(CPPFLAGS) +override CPPFLAGS := -DFRONTEND $(CPPFLAGS) -fstack-protector-all -Wl,-z,relro,-z,now +override LDFLAGS += -Wl,-z,relro,-z,now +override CFLAGS += -fstack-protector-all xlogreader.cpp: % : $(top_srcdir)/src/gausskernel/storage/access/transam/% rm -f $@ && $(LN_S) $< . -- Gitee