diff options
| author | lijia <[email protected]> | 2024-08-29 11:00:28 +0800 |
|---|---|---|
| committer | lijia <[email protected]> | 2024-08-29 11:00:28 +0800 |
| commit | 2bb1e0673a69975ee1d6a4ac86f90a36c5f74fa8 (patch) | |
| tree | ae1df900590601e628940561a15b4713aeedb144 | |
| parent | 60b96b10eb985d13ef6df0f4fc525074e7128325 (diff) | |
| -rw-r--r-- | CMakeLists.txt | 8 | ||||
| -rwxr-xr-x | bin/quic.inf | 4 | ||||
| -rw-r--r-- | cmake/preInstall.sh | 4 | ||||
| -rw-r--r-- | src/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/quic_entry.cpp | 4 | ||||
| -rw-r--r-- | test/CMakeLists.txt | 8 |
6 files changed, 15 insertions, 15 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e6ee32f..057061d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,11 +39,11 @@ add_subdirectory(src) enable_testing() add_subdirectory(test) -set(CPACK_RPM_USER_FILELIST "%config(noreplace) ${CMAKE_INSTALL_PREFIX}/sapp/conf/quic_decoder/quic.conf" - "%config(noreplace) ${CMAKE_INSTALL_PREFIX}/sapp/conf/quic_decoder/main.conf") +set(CPACK_RPM_USER_FILELIST "%config(noreplace) ${CMAKE_INSTALL_PREFIX}/sapp/conf/quic/quic.conf" + "%config(noreplace) ${CMAKE_INSTALL_PREFIX}/sapp/conf/quic/main.conf") -install(FILES bin/quic.conf DESTINATION ${CMAKE_INSTALL_PREFIX}/sapp/conf/quic_decoder COMPONENT PROFILE) -install(FILES bin/main.conf DESTINATION ${CMAKE_INSTALL_PREFIX}/sapp/conf/quic_decoder COMPONENT PROFILE) +install(FILES bin/quic.conf DESTINATION ${CMAKE_INSTALL_PREFIX}/sapp/conf/quic COMPONENT PROFILE) +install(FILES bin/main.conf DESTINATION ${CMAKE_INSTALL_PREFIX}/sapp/conf/quic COMPONENT PROFILE) install(FILES include/quic_decoder.h DESTINATION ${CMAKE_INSTALL_PREFIX}/framework/include/quic_decoder COMPONENT HEADER) include(Package) diff --git a/bin/quic.inf b/bin/quic.inf index 2e73f7d..5555a41 100755 --- a/bin/quic.inf +++ b/bin/quic.inf @@ -1,9 +1,9 @@ [[plugin]] -path = "./stellar_plugin/quic_decoder/quic_decoder.so" +path = "./stellar_plugin/quic_decoder.so" init = "QUIC_ONLOAD" exit = "QUIC_UNLOAD" [[plugin]] -path = "./stellar_plugin/quic_decoder/quic_decoder_test_plug.so" +path = "./stellar_plugin/quic_decoder_test_plug.so" init = "QUIC_TEST_PLUG_INIT" exit = "QUIC_TEST_PLUG_DESTROY" diff --git a/cmake/preInstall.sh b/cmake/preInstall.sh index 1c763db..9c53f3d 100644 --- a/cmake/preInstall.sh +++ b/cmake/preInstall.sh @@ -4,10 +4,10 @@ DST=${RPM_INSTALL_PREFIX}/sapp/ mkdir -p ${DST}/stellar_plugin touch ${DST}/stellar_plugin/spec.toml -if ! grep -q '^\./plug/stellar_plugin/quic_decoder/quic_decoder.so' "${DST}/stellar_plugin/spec.toml"; then +if ! grep -q '^\./stellar_plugin/quic_decoder.so' "${DST}/stellar_plugin/spec.toml"; then echo -e "\n" >> "${DST}/stellar_plugin/spec.toml" echo -e "[[plugin]]" >> "${DST}/stellar_plugin/spec.toml" - echo -e "path = \"./stellar_plugin/quic_decoder/quic_decoder.so\"" >> "${DST}/stellar_plugin/spec.toml" + echo -e "path = \"./stellar_plugin/quic_decoder.so\"" >> "${DST}/stellar_plugin/spec.toml" echo -e "init = \"QUIC_ONLOAD\"" >> "${DST}/stellar_plugin/spec.toml" echo -e "exit = \"QUIC_UNLOAD\"" >> "${DST}/stellar_plugin/spec.toml" echo -e "\n" >> "${DST}/stellar_plugin/spec.toml" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index db4cca3..5a895a6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -12,4 +12,4 @@ set_target_properties(${lib_name} PROPERTIES PREFIX "") target_link_libraries(${lib_name} ${DNS_DEPEND_DYN_LIB} pthread -Wl,--no-whole-archive openssl-crypto-static -Wl,--no-whole-archive openssl-ssl-static) set_target_properties(${lib_name} PROPERTIES OUTPUT_NAME ${lib_name}) -install(TARGETS ${lib_name} LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/sapp/stellar_plugin/quic_decoder COMPONENT LIBRARIES) +install(TARGETS ${lib_name} LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/sapp/stellar_plugin/ COMPONENT LIBRARIES) diff --git a/src/quic_entry.cpp b/src/quic_entry.cpp index d8cae1b..d3745f0 100644 --- a/src/quic_entry.cpp +++ b/src/quic_entry.cpp @@ -9,9 +9,9 @@ #include "quic_deprotection.h" #include "quic_util.h" -static const char *g_quic_proto_conffile="./conf/quic_decoder/main.conf"; +static const char *g_quic_proto_conffile="./conf/quic/main.conf"; // static const char *g_quic_regionname_conffile="./conf/quic/quic.conf"; -static const char *g_quic_log_path = "./log/quic_decoder/quic_decoder"; +static const char *g_quic_log_path = "./log/quic/quic"; #ifdef __cplusplus extern "C" { diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 4ca4288..9e3bf04 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -9,12 +9,12 @@ add_library(${lib_name}_test_plug SHARED ${lib_name}_test_plug.cpp) target_link_libraries(${lib_name}_test_plug MESA_prof_load cjson) set_target_properties(${lib_name}_test_plug PROPERTIES PREFIX "") -add_test(NAME COPY_QUIC_SO COMMAND sh -c "mkdir -p ${PROTO_TEST_RUN_DIR}/stellar_plugin/${lib_name} && cp ${CMAKE_BINARY_DIR}/src/${lib_name}.so ${PROTO_TEST_RUN_DIR}/stellar_plugin/${lib_name}/${lib_name}.so") -add_test(NAME COPY_TEST_SO COMMAND sh -c "mkdir -p ${PROTO_TEST_RUN_DIR}/stellar_plugin/${lib_name} && cp ${CMAKE_CURRENT_BINARY_DIR}/${lib_name}_test_plug.so ${PROTO_TEST_RUN_DIR}/stellar_plugin/${lib_name}/${lib_name}_test_plug.so") +add_test(NAME COPY_QUIC_SO COMMAND sh -c "mkdir -p ${PROTO_TEST_RUN_DIR}/stellar_plugin/${lib_name} && cp ${CMAKE_BINARY_DIR}/src/${lib_name}.so ${PROTO_TEST_RUN_DIR}/stellar_plugin/${lib_name}.so") +add_test(NAME COPY_TEST_SO COMMAND sh -c "mkdir -p ${PROTO_TEST_RUN_DIR}/stellar_plugin/${lib_name} && cp ${CMAKE_CURRENT_BINARY_DIR}/${lib_name}_test_plug.so ${PROTO_TEST_RUN_DIR}/stellar_plugin/${lib_name}_test_plug.so") add_test(NAME COPY_TEST_SPEC COMMAND sh -c "cp ${CMAKE_SOURCE_DIR}/bin/quic.inf ${PROTO_TEST_RUN_DIR}/stellar_plugin/spec.toml") add_test(NAME COPY_PLUGIN_TEST_MAIN COMMAND sh -c "rpm -ql sapp | grep plugin_test_main | xargs -i cp -f {} ${PROTO_TEST_RUN_DIR}/") -add_test(NAME COPY_MAIN_CFG COMMAND sh -c "mkdir -p ${PROTO_TEST_RUN_DIR}/conf/quic_decoder && cp ${CMAKE_SOURCE_DIR}/bin/main.conf ${PROTO_TEST_RUN_DIR}/conf/quic_decoder/") -add_test(NAME COPY_QUIC_CFG COMMAND sh -c "mkdir -p ${PROTO_TEST_RUN_DIR}/conf/quic_decoder && cp ${CMAKE_SOURCE_DIR}/bin/quic.conf ${PROTO_TEST_RUN_DIR}/conf/quic_decoder/") +add_test(NAME COPY_MAIN_CFG COMMAND sh -c "mkdir -p ${PROTO_TEST_RUN_DIR}/conf/quic && cp ${CMAKE_SOURCE_DIR}/bin/main.conf ${PROTO_TEST_RUN_DIR}/conf/quic/") +add_test(NAME COPY_QUIC_CFG COMMAND sh -c "mkdir -p ${PROTO_TEST_RUN_DIR}/conf/quic && cp ${CMAKE_SOURCE_DIR}/bin/quic.conf ${PROTO_TEST_RUN_DIR}/conf/quic/") add_test(NAME UPDATE_SAPP_LOG_LEVEL COMMAND bash -c "sed -i 's/sapp_log.fatal/sapp_log.info/' ${PROTO_TEST_RUN_DIR}/etc/sapp_log.conf") set_tests_properties(COPY_QUIC_SO COPY_TEST_SO COPY_TEST_SPEC COPY_PLUGIN_TEST_MAIN COPY_MAIN_CFG COPY_QUIC_CFG UPDATE_SAPP_LOG_LEVEL |
