summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorliuxueli <[email protected]>2020-07-01 09:33:35 +0800
committerliuxueli <[email protected]>2020-07-01 09:33:35 +0800
commit7543d9fbc0e9012bc8b0104ee44620e13f8df8c8 (patch)
tree52ad6e6629a70488eb2768a538fe0516ff23c1e6
parent0a9a3a98cf7b0522febc8af06d573708f2c39ad4 (diff)
将ssl的调试符号上传至Sentryv1.0.1
调整preInstall和preUninstall的位置
-rw-r--r--.gitlab-ci.yml20
-rw-r--r--CMakeLists.txt4
-rw-r--r--ci/travis.sh11
-rw-r--r--cmake/Package.cmake2
-rw-r--r--cmake/preInstall.sh11
5 files changed, 24 insertions, 24 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4164804..426e663 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -76,6 +76,7 @@ release_build_release:
BUILD_TYPE: RelWithDebInfo
PACKAGE: 1
UPLOAD: 1
+ SYMBOL_TARGET: ssl
PULP3_REPO_NAME: protocol-stable-x86_64.el7
PULP3_DIST_NAME: protocol-stable-x86_64.el7
extends: .build_by_travis
@@ -84,21 +85,4 @@ release_build_release:
paths:
- build/*.rpm
only:
- - tags
-
-release_build_release_devel:
- stage: build
- variables:
- BUILD_TYPE: RelWithDebInfo
- ENABLE_DEVEL_SWITCH: "ON"
- PACKAGE: 1
- UPLOAD: 1
- PULP3_REPO_NAME: protocol-stable-x86_64.el7
- PULP3_DIST_NAME: protocol-stable-x86_64.el7
- extends: .build_by_travis
- artifacts:
- name: "ssl-$CI_COMMIT_REF_NAME-release"
- paths:
- - build/*.rpm
- only:
- - tags
+ - tags \ No newline at end of file
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e06b24b..28f5f63 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -49,6 +49,10 @@ else()
endif()
set(CMAKE_INSTALL_PREFIX /home/mesasoft/sapp_run/)
+
+set(CPACK_RPM_LIBRARY_USER_FILELIST "%config(noreplace) ${CMAKE_INSTALL_PREFIX}/plug/protocol/ssl/ssl.inf"
+ "%config(noreplace) ${CMAKE_INSTALL_PREFIX}/conf/ssl/ssl.conf")
+
install(TARGETS ssl LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/plug/protocol/${lib_name} COMPONENT LIBRARY)
install(FILES bin/${lib_name}.inf DESTINATION ${CMAKE_INSTALL_PREFIX}/plug/protocol/${lib_name} COMPONENT PROFILE)
install(FILES bin/${lib_name}/${lib_name}.conf DESTINATION ${CMAKE_INSTALL_PREFIX}/conf/${lib_name}/ COMPONENT PROFILE)
diff --git a/ci/travis.sh b/ci/travis.sh
index 40a2780..ccfe6b2 100644
--- a/ci/travis.sh
+++ b/ci/travis.sh
@@ -55,10 +55,9 @@ fi
if [ -n "${UPLOAD}" ]; then
cp ~/rpm_upload_tools.py ./
python3 rpm_upload_tools.py ${PULP3_REPO_NAME} ${PULP3_DIST_NAME} *.rpm
-fi
-#if [ -n "${UPLOAD_SYMBOL_FILES}" ]; then
-# rpm -i tfe*debuginfo*.rpm
-# cp /usr/lib/debug/opt/tsg/tfe/bin/tfe.debug /tmp/tfe.debuginfo.${CI_COMMIT_SHORT_SHA}
-# sentry-cli upload-dif -t elf /tmp/tfe.debuginfo.${CI_COMMIT_SHORT_SHA}
-#fi
+ rpm -i $SYMBOL_TARGET*debuginfo*.rpm
+ _symbol_file=`find /usr/lib/debug/ -name "$SYMBOL_TARGET*.so*.debug"`
+ cp $_symbol_file ${_symbol_file}info.${CI_COMMIT_SHORT_SHA}
+ sentry-cli upload-dif -t elf ${_symbol_file}info.${CI_COMMIT_SHORT_SHA}
+fi
diff --git a/cmake/Package.cmake b/cmake/Package.cmake
index edb4258..2b4179e 100644
--- a/cmake/Package.cmake
+++ b/cmake/Package.cmake
@@ -49,6 +49,8 @@ set(CPACK_RPM_HEADER_PACKAGE_CONFLICTS ${CPACK_RPM_HEADER_PACKAGE_NAME})
set(CPACK_COMPONENTS_ALL LIBRARY HEADER PROFILE)
+SET(CPACK_RPM_LIBRARY_PRE_INSTALL_SCRIPT_FILE "${PROJECT_SOURCE_DIR}/cmake/preInstall.sh")
+SET(CPACK_RPM_LIBRARY_PRE_UNINSTALL_SCRIPT_FILE "${PROJECT_SOURCE_DIR}/cmake/preUninstall.sh")
set(CPACK_BUILD_SOURCE_DIRS "${CMAKE_SOURCE_DIR}")
diff --git a/cmake/preInstall.sh b/cmake/preInstall.sh
new file mode 100644
index 0000000..01bfff9
--- /dev/null
+++ b/cmake/preInstall.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+DST=${RPM_INSTALL_PREFIX}
+mkdir -p ${DST}/plug/protocol/
+touch ${DST}/plug/conflist.inf
+touch ${DST}/etc/entrylist.conf
+if [[ -z `grep -rn 'ssl.inf' ${DST}/plug/conflist.inf` ]];then
+ sed -i '/\[protocol\]/a\./plug/protocol/ssl/ssl.inf' ${DST}/plug/conflist.inf
+fi
+if [[ -z `grep -rn 'SSL' ${DST}/etc/entrylist.conf` ]];then
+ echo "SSL" >> ${DST}/etc/entrylist.conf
+fi