Compare commits
1 Commits
v1.0.4
...
v3.0.0.20.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0a5d574a5c |
@@ -76,23 +76,7 @@ release_build_release:
|
|||||||
BUILD_TYPE: RelWithDebInfo
|
BUILD_TYPE: RelWithDebInfo
|
||||||
PACKAGE: 1
|
PACKAGE: 1
|
||||||
UPLOAD: 1
|
UPLOAD: 1
|
||||||
PULP3_REPO_NAME: tsg-stable-x86_64.el7
|
SYMBOL_TARGET: fw_dns_plug
|
||||||
PULP3_DIST_NAME: tsg-stable-x86_64.el7
|
|
||||||
extends: .build_by_travis
|
|
||||||
artifacts:
|
|
||||||
name: "fw_dns_plug-$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
|
|
||||||
PULP3_REPO_NAME: tsg-stable-x86_64.el7
|
PULP3_REPO_NAME: tsg-stable-x86_64.el7
|
||||||
PULP3_DIST_NAME: tsg-stable-x86_64.el7
|
PULP3_DIST_NAME: tsg-stable-x86_64.el7
|
||||||
extends: .build_by_travis
|
extends: .build_by_travis
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
cmake_minimum_required (VERSION 2.8)
|
cmake_minimum_required (VERSION 2.8)
|
||||||
|
|
||||||
set(lib_name fw_dns_plug)
|
set(lib_name fw_dns_plug)
|
||||||
project(fw_dns_plug)
|
project(${lib_name})
|
||||||
|
|
||||||
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
|
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
|
||||||
include(Version)
|
include(Version)
|
||||||
@@ -34,41 +34,4 @@ set(CMAKE_INSTALL_PREFIX /home/mesasoft/sapp_run)
|
|||||||
|
|
||||||
add_subdirectory (src)
|
add_subdirectory (src)
|
||||||
|
|
||||||
set(CONFLIST /plug/conflist.inf)
|
|
||||||
set(MASTER_INF "./plug/business/fw_dns_plug/fw_dns_plug.inf")
|
|
||||||
set(MAIN_CONF /tsgconf/main.conf)
|
|
||||||
|
|
||||||
file(WRITE ${PROJECT_SOURCE_DIR}/install.sh "#!/bin/sh\r\n")
|
|
||||||
file(WRITE ${PROJECT_SOURCE_DIR}/uninstall.sh "#!/bin/sh\r\n")
|
|
||||||
|
|
||||||
file(APPEND ${PROJECT_SOURCE_DIR}/install.sh "DST=\${RPM_INSTALL_PREFIX}\r\n")
|
|
||||||
file(APPEND ${PROJECT_SOURCE_DIR}/uninstall.sh "DST=\${RPM_INSTALL_PREFIX}\r\n")
|
|
||||||
|
|
||||||
file(APPEND ${PROJECT_SOURCE_DIR}/install.sh "mkdir -p \${DST}/plug/business/\r\n")
|
|
||||||
file(APPEND ${PROJECT_SOURCE_DIR}/uninstall.sh "mkdir -p \${DST}/plug/business/\r\n")
|
|
||||||
|
|
||||||
file(APPEND ${PROJECT_SOURCE_DIR}/install.sh "touch \${DST}${CONFLIST}\r\n")
|
|
||||||
file(APPEND ${PROJECT_SOURCE_DIR}/uninstall.sh "touch \${DST}${CONFLIST}\r\n")
|
|
||||||
|
|
||||||
file(APPEND ${PROJECT_SOURCE_DIR}/install.sh "mkdir -p \${DST}/tsgconf/\r\n")
|
|
||||||
file(APPEND ${PROJECT_SOURCE_DIR}/uninstall.sh "mkdir -p \${DST}/tsgconf/\r\n")
|
|
||||||
|
|
||||||
file(APPEND ${PROJECT_SOURCE_DIR}/install.sh "touch \${DST}${MAIN_CONF}\r\n")
|
|
||||||
file(APPEND ${PROJECT_SOURCE_DIR}/uninstall.sh "touch \${DST}${MAIN_CONF}\r\n")
|
|
||||||
|
|
||||||
file(APPEND ${PROJECT_SOURCE_DIR}/install.sh "if [[ -z `grep -rn 'fw_dns_plug.inf' \${DST}${CONFLIST}` ]];then\r\n")
|
|
||||||
file(APPEND ${PROJECT_SOURCE_DIR}/install.sh "\tsed -i '/\\[business\\]/a\\${MASTER_INF}' \${DST}${CONFLIST}\r\n")
|
|
||||||
file(APPEND ${PROJECT_SOURCE_DIR}/install.sh "fi\r\n")
|
|
||||||
file(APPEND ${PROJECT_SOURCE_DIR}/uninstall.sh "sed -i '/fw_dns_plug.inf/d' \${DST}${CONFLIST}\r\n")
|
|
||||||
|
|
||||||
file(APPEND ${PROJECT_SOURCE_DIR}/install.sh "if [[ -z `grep -rn '\\[DNS_PLUG\\]' \${DST}${MAIN_CONF}` ]];then\r\n")
|
|
||||||
file(APPEND ${PROJECT_SOURCE_DIR}/install.sh "\tsed -i '1i\\\\[DNS_PLUG\\]' \${DST}${MAIN_CONF}\r\n")
|
|
||||||
file(APPEND ${PROJECT_SOURCE_DIR}/install.sh "\tsed -i '/\\[DNS_PLUG\\]/a\\LOG_LEVEL=30' \${DST}${MAIN_CONF}\r\n")
|
|
||||||
file(APPEND ${PROJECT_SOURCE_DIR}/install.sh "\tsed -i '/\\[DNS_PLUG\\]/a\\LOG_PATH=./tsglog/fw_dns_plug/fw_dns_plug' \${DST}${MAIN_CONF}\r\n")
|
|
||||||
file(APPEND ${PROJECT_SOURCE_DIR}/install.sh "fi\r\n")
|
|
||||||
file(APPEND ${PROJECT_SOURCE_DIR}/uninstall.sh "sed -i '/\\[DNS_PLUG\\]/,+2d' \${DST}${MAIN_CONF}\r\n")
|
|
||||||
|
|
||||||
SET(CPACK_RPM_PRE_INSTALL_SCRIPT_FILE "${PROJECT_SOURCE_DIR}/install.sh")
|
|
||||||
SET(CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE "${PROJECT_SOURCE_DIR}/uninstall.sh")
|
|
||||||
|
|
||||||
include(Package)
|
include(Package)
|
||||||
|
|||||||
11
ci/travis.sh
11
ci/travis.sh
@@ -55,10 +55,9 @@ fi
|
|||||||
if [ -n "${UPLOAD}" ]; then
|
if [ -n "${UPLOAD}" ]; then
|
||||||
cp ~/rpm_upload_tools.py ./
|
cp ~/rpm_upload_tools.py ./
|
||||||
python3 rpm_upload_tools.py ${PULP3_REPO_NAME} ${PULP3_DIST_NAME} *.rpm
|
python3 rpm_upload_tools.py ${PULP3_REPO_NAME} ${PULP3_DIST_NAME} *.rpm
|
||||||
fi
|
|
||||||
|
|
||||||
#if [ -n "${UPLOAD_SYMBOL_FILES}" ]; then
|
rpm -i $SYMBOL_TARGET*debuginfo*.rpm
|
||||||
# rpm -i tfe*debuginfo*.rpm
|
_symbol_file=`find /usr/lib/debug/ -name "$SYMBOL_TARGET*.so*.debug"`
|
||||||
# cp /usr/lib/debug/opt/tsg/tfe/bin/tfe.debug /tmp/tfe.debuginfo.${CI_COMMIT_SHORT_SHA}
|
cp $_symbol_file ${_symbol_file}info.${CI_COMMIT_SHORT_SHA}
|
||||||
# sentry-cli upload-dif -t elf /tmp/tfe.debuginfo.${CI_COMMIT_SHORT_SHA}
|
sentry-cli upload-dif -t elf ${_symbol_file}info.${CI_COMMIT_SHORT_SHA}
|
||||||
#fi
|
fi
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ set(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
|
|||||||
set(CPACK_PACKAGE_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.${VERSION_BUILD}")
|
set(CPACK_PACKAGE_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.${VERSION_BUILD}")
|
||||||
execute_process(COMMAND bash -c "echo -ne \"`uname -r | awk -F'.' '{print $5\".\"$6\".\"$7}'`\"" OUTPUT_VARIABLE SYSTEM_VERSION)
|
execute_process(COMMAND bash -c "echo -ne \"`uname -r | awk -F'.' '{print $5\".\"$6\".\"$7}'`\"" OUTPUT_VARIABLE SYSTEM_VERSION)
|
||||||
|
|
||||||
#execute_process(COMMAND sh changelog.sh WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/cmake)
|
execute_process(COMMAND sh changelog.sh WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/cmake)
|
||||||
#SET(CPACK_RPM_CHANGELOG_FILE ${PROJECT_SOURCE_DIR}/cmake/changelog.txt)
|
SET(CPACK_RPM_CHANGELOG_FILE ${PROJECT_SOURCE_DIR}/cmake/changelog.txt)
|
||||||
|
|
||||||
# RPM Build
|
# RPM Build
|
||||||
set(CPACK_GENERATOR "RPM")
|
set(CPACK_GENERATOR "RPM")
|
||||||
@@ -42,6 +42,8 @@ set(CPACK_RPM_HEADER_PACKAGE_CONFLICTS ${CPACK_RPM_HEADER_PACKAGE_NAME})
|
|||||||
|
|
||||||
set(CPACK_COMPONENTS_ALL LIBRARY PROFILE)
|
set(CPACK_COMPONENTS_ALL LIBRARY 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}")
|
set(CPACK_BUILD_SOURCE_DIRS "${CMAKE_SOURCE_DIR}")
|
||||||
|
|
||||||
|
|||||||
14
cmake/PreInstall.sh
Normal file
14
cmake/PreInstall.sh
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
DST=${RPM_INSTALL_PREFIX}
|
||||||
|
mkdir -p ${DST}/plug/business/
|
||||||
|
touch ${DST}/plug/conflist.inf
|
||||||
|
mkdir -p ${DST}/tsgconf/
|
||||||
|
touch ${DST}/tsgconf/main.conf
|
||||||
|
if [[ -z `grep -rn 'fw_dns_plug.inf' ${DST}/plug/conflist.inf` ]];then
|
||||||
|
sed -i '/\[business\]/a\./plug/business/fw_dns_plug/fw_dns_plug.inf' ${DST}/plug/conflist.inf
|
||||||
|
fi
|
||||||
|
if [[ -z `grep -rn '\[DNS_PLUG\]' ${DST}/tsgconf/main.conf` ]];then
|
||||||
|
sed -i '1i\\[DNS_PLUG\]' ${DST}/tsgconf/main.conf
|
||||||
|
sed -i '/\[DNS_PLUG\]/a\LOG_LEVEL=30' ${DST}/tsgconf/main.conf
|
||||||
|
sed -i '/\[DNS_PLUG\]/a\LOG_PATH=./tsglog/fw_dns_plug/fw_dns_plug' ${DST}/tsgconf/main.conf
|
||||||
|
fi
|
||||||
12
cmake/PreUninstall.sh
Normal file
12
cmake/PreUninstall.sh
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
if [ $1 == 0 ]; then
|
||||||
|
DST=${RPM_INSTALL_PREFIX}
|
||||||
|
|
||||||
|
mkdir -p ${DST}/plug/business/
|
||||||
|
touch ${DST}/plug/conflist.inf
|
||||||
|
mkdir -p ${DST}/tsgconf/
|
||||||
|
touch ${DST}/tsgconf/main.conf
|
||||||
|
|
||||||
|
sed -i '/fw_dns_plug.inf/d' ${DST}/plug/conflist.inf
|
||||||
|
sed -i '/\[DNS_PLUG\]/,+2d' ${DST}/tsgconf/main.conf
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user