diff --git a/0003-etmem-construct-etmem-debug-info-package.patch b/0003-etmem-construct-etmem-debug-info-package.patch new file mode 100644 index 0000000000000000000000000000000000000000..1c29ae87dbba78b9eb6f19450409ab0f9f2164d3 --- /dev/null +++ b/0003-etmem-construct-etmem-debug-info-package.patch @@ -0,0 +1,46 @@ +From 7611529bae14c2926db6de31d4bf94e1c75e625a Mon Sep 17 00:00:00 2001 +From: tangyuchen +Date: Mon, 8 Apr 2024 11:31:58 +0800 +Subject: [PATCH] etmem: construct etmem debug info package + +Currently, there is no debug info package for etmem, and this +can be a problem when trying to analyze a coredump + +Signed-off-by: tangyuchen +--- + CMakeLists.txt | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a4a83ca..2e60b2a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -65,9 +65,11 @@ target_compile_options(etmemd PRIVATE -fsigned-char -fno-omit-frame-pointer -Wal + + if(CONFIG_DEBUG STREQUAL "y") + target_compile_options(etmemd PRIVATE -g) ++else() ++ target_link_options(etmemd PRIVATE -s) + endif() + +-set_target_properties(etmemd PROPERTIES LINK_FLAGS "-s -fPIE -pie -fPIC -Wl,-z,relro,-z,now,-z,noexecstack -Wtrampolines") ++target_link_options(etmemd PRIVATE -fPIE -pie -fPIC -Wl,-z,relro,-z,now,-z,noexecstack -Wtrampolines) + target_link_libraries(etmemd PRIVATE pthread dl rt boundscheck) + + if( ${ARCHITECTURE} STREQUAL "aarch64" ) +@@ -80,9 +82,11 @@ target_compile_options(etmem PRIVATE -fsigned-char -fno-omit-frame-pointer -Wall + + if(CONFIG_DEBUG STREQUAL "y") + target_compile_options(etmem PRIVATE -g) ++else() ++ target_link_options(etmem PRIVATE -s) + endif() + +-set_target_properties(etmem PROPERTIES LINK_FLAGS "-s -fPIE -pie -fPIC -Wl,-z,relro,-z,now,-z,noexecstack -Wtrampolines") ++target_link_options(etmem PRIVATE -fPIE -pie -fPIC -Wl,-z,relro,-z,now,-z,noexecstack -Wtrampolines) + target_link_libraries(etmem PRIVATE pthread dl rt boundscheck) + + if( ${ARCHITECTURE} STREQUAL "aarch64" ) +-- +2.33.0 + diff --git a/etmem.spec b/etmem.spec index 8c76da7933c7caaf79a077ca96428f46dd1b45fe..5b161e480cf2218404759b9a619f23a2bf37a40c 100644 --- a/etmem.spec +++ b/etmem.spec @@ -1,14 +1,13 @@ -%global debug_package %{nil} - Name: etmem Version: 1.0 -Release: 6 +Release: 7 Summary: etmem License: Mulan PSL v2 Source0: etmem-%{version}.tar.gz Patch0: 0001-fix-64K-pagesize-scan-problem.patch Patch1: 0002-change-aarch64-march-to-armv8-a.patch +Patch2: 0003-etmem-construct-etmem-debug-info-package.patch #Dependency BuildRequires: cmake gcc gcc-c++ BuildRequires: libboundscheck @@ -24,7 +23,7 @@ etmem module %build mkdir -p build cd build -cmake .. +cmake .. -DCONFIG_DEBUG=y make %install @@ -46,7 +45,13 @@ install -m 0600 conf/example_conf.yaml $RPM_BUILD_ROOT%{_sysconfdir}/etmem/ %postun -p /sbin/ldconfig %changelog -* Mon Aug 1 2021 louhongxiang 1.0-6 +* Wed Apr 3 2024 tangyuchen 1.0-7 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:add debug info support for etmem + +* Sun Aug 1 2021 louhongxiang 1.0-6 - cancel write permission of root. * Mon May 24 2021 liubo 1.0-5