diff options
| author | liuxueli <[email protected]> | 2020-06-30 17:59:14 +0800 |
|---|---|---|
| committer | liuxueli <[email protected]> | 2020-06-30 17:59:14 +0800 |
| commit | 090de2caba5bf909c8722ceda43515c397e03354 (patch) | |
| tree | 9a45945293c24528522e50fe14c1fc8fae7e69fc | |
| parent | 003706e4f1ca4aa974c980b7c648310c3bc595f8 (diff) | |
将http的调试符号上传至Sentryv2.0.2
调整preInstall和preUninstall的位置
| -rw-r--r-- | .gitlab-ci.yml | 18 | ||||
| -rw-r--r-- | CMakeLists.txt | 4 | ||||
| -rw-r--r-- | ci/travis.sh | 11 | ||||
| -rw-r--r-- | cmake/Package.cmake | 2 | ||||
| -rw-r--r-- | cmake/preInstall.sh | 11 | ||||
| -rw-r--r-- | cmake/preUninstall.sh | 10 |
6 files changed, 33 insertions, 23 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7b78585..81270d9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -76,23 +76,7 @@ release_build_release: BUILD_TYPE: RelWithDebInfo 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: "http-$CI_COMMIT_REF_NAME-release" - paths: - - build/*.rpm - only: - - tags - -release_build_release_devel: - stage: build - variables: - BUILD_TYPE: RelWithDebInfo - ENABLE_DEVEL_SWITCH: "ON" - PACKAGE: 1 - UPLOAD: 1 + SYMBOL_TARGET: http PULP3_REPO_NAME: protocol-stable-x86_64.el7 PULP3_DIST_NAME: protocol-stable-x86_64.el7 extends: .build_by_travis diff --git a/CMakeLists.txt b/CMakeLists.txt index 4d2d2b8..617df3d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,6 +48,10 @@ else() set_target_properties(http PROPERTIES OUTPUT_NAME ${lib_name}) endif() +set(CPACK_RPM_LIBRARY_USER_FILELIST "%config(noreplace) ${CMAKE_INSTALL_PREFIX}/plug/protocol/http/http.inf" + "%config(noreplace) ${CMAKE_INSTALL_PREFIX}/conf/http/http.conf" + "%config(noreplace) ${CMAKE_INSTALL_PREFIX}/conf/http/http_main.conf") + install(TARGETS http LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/plug/protocol/${lib_name} COMPONENT LIBRARY) install(FILES src/${lib_name}.h DESTINATION /opt/MESA/include/MESA COMPONENT HEADER) diff --git a/ci/travis.sh b/ci/travis.sh index e51af17..cca0b11 100644 --- a/ci/travis.sh +++ b/ci/travis.sh @@ -56,10 +56,9 @@ if [ -n "${UPLOAD}" ]; then rm -rf http.so 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..8134025 --- /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 'http.inf' ${DST}/plug/conflist.inf` ]];then + sed -i '/\[protocol\]/a\./plug/protocol/http/http.inf' ${DST}/plug/conflist.inf +fi +if [[ -z `grep -rn 'HTTP' ${DST}etc/entrylist.conf` ]];then + echo "HTTP" >> ${DST}/etc/entrylist.conf +fi diff --git a/cmake/preUninstall.sh b/cmake/preUninstall.sh new file mode 100644 index 0000000..acb2e24 --- /dev/null +++ b/cmake/preUninstall.sh @@ -0,0 +1,10 @@ +#!/bin/sh +if [ $1 == 0 ]; then + DST=${RPM_INSTALL_PREFIX} + + mkdir -p ${DST}/plug/protocol/ + touch ${DST}/plug/conflist.inf + + sed -i '/http.inf/d' ${DST}/plug/conflist.inf + sed -i '/HTTP/d' ${DST}/etc/entrylist.conf +fi |
