From: Vsevolod Stakhov Date: Tue, 10 Jul 2018 13:13:21 +0000 (+0100) Subject: [Minor] Redis support is now unconditional X-Git-Tag: 1.7.8~7 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=418c10101093408aa370f0febf08d36032f1eb4b;p=rspamd.git [Minor] Redis support is now unconditional --- diff --git a/.circleci/config.yml b/.circleci/config.yml index 8c4cca1aa..223ae76cf 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -43,7 +43,7 @@ jobs: - run: sudo apt-get install -qq cmake libevent-dev libglib2.0-dev libicu-dev libluajit-5.1-dev libmagic-dev libsqlite3-dev libssl-dev ragel - run: mkdir ../build ; mkdir ../install ; cd ../build - - run: cmake ../project -DDBDIR=/nana -DENABLE_COVERAGE=ON -DCMAKE_INSTALL_PREFIX=../install -DENABLE_HIREDIS=ON + - run: cmake ../project -DDBDIR=/nana -DENABLE_COVERAGE=ON -DCMAKE_INSTALL_PREFIX=../install - run: make install -j`nproc` diff --git a/CMakeLists.txt b/CMakeLists.txt index 2afc8443f..a1961a16d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1254,9 +1254,7 @@ ADD_SUBDIRECTORY(contrib/t1ha) IF (ENABLE_SNOWBALL MATCHES "ON") LIST(APPEND RSPAMD_REQUIRED_LIBRARIES stemmer) ENDIF() -IF(ENABLE_HIREDIS MATCHES "ON") - LIST(APPEND RSPAMD_REQUIRED_LIBRARIES rspamd-hiredis) -ENDIF() +LIST(APPEND RSPAMD_REQUIRED_LIBRARIES rspamd-hiredis) IF(ENABLE_HYPERSCAN MATCHES "OFF") LIST(APPEND RSPAMD_REQUIRED_LIBRARIES rspamd-actrie) ENDIF() diff --git a/debian/rules b/debian/rules index a51894f38..5cde81db5 100755 --- a/debian/rules +++ b/debian/rules @@ -27,7 +27,6 @@ override_dh_auto_configure: -DENABLE_FULL_DEBUG=OFF \ -DENABLE_GD=OFF \ -DENABLE_PCRE2=OFF \ - -DENABLE_HIREDIS=ON \ -DENABLE_LUAJIT=ON \ -DENABLE_TORCH=ON \ -DENABLE_LIBUNWIND=ON \ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f01f7a45c..0f9cbd668 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -171,9 +171,7 @@ TARGET_LINK_LIBRARIES(rspamd rspamd-server) IF (ENABLE_SNOWBALL MATCHES "ON") TARGET_LINK_LIBRARIES(rspamd stemmer) ENDIF() -IF(ENABLE_HIREDIS MATCHES "ON") - TARGET_LINK_LIBRARIES(rspamd rspamd-hiredis) -ENDIF() +TARGET_LINK_LIBRARIES(rspamd rspamd-hiredis) IF (ENABLE_FANN MATCHES "ON") TARGET_LINK_LIBRARIES(rspamd fann) diff --git a/src/libserver/CMakeLists.txt b/src/libserver/CMakeLists.txt index 03d11acb6..ac2c123dc 100644 --- a/src/libserver/CMakeLists.txt +++ b/src/libserver/CMakeLists.txt @@ -21,10 +21,8 @@ SET(LIBRSPAMDSERVERSRC ${CMAKE_CURRENT_SOURCE_DIR}/url.c ${CMAKE_CURRENT_SOURCE_DIR}/worker_util.c) -IF (ENABLE_HIREDIS MATCHES "ON") - LIST(APPEND LIBRSPAMDSERVERSRC "${CMAKE_CURRENT_SOURCE_DIR}/fuzzy_backend_redis.c") - LIST(APPEND LIBRSPAMDSERVERSRC "${CMAKE_CURRENT_SOURCE_DIR}/redis_pool.c") -ENDIF () +LIST(APPEND LIBRSPAMDSERVERSRC "${CMAKE_CURRENT_SOURCE_DIR}/fuzzy_backend_redis.c") +LIST(APPEND LIBRSPAMDSERVERSRC "${CMAKE_CURRENT_SOURCE_DIR}/redis_pool.c") # Librspamd-server SET(RSPAMD_SERVER ${LIBRSPAMDSERVERSRC} PARENT_SCOPE) diff --git a/src/libstat/CMakeLists.txt b/src/libstat/CMakeLists.txt index 0bc920616..1019a9925 100644 --- a/src/libstat/CMakeLists.txt +++ b/src/libstat/CMakeLists.txt @@ -12,12 +12,10 @@ SET(BACKENDSSRC ${CMAKE_CURRENT_SOURCE_DIR}/backends/mmaped_file.c ${CMAKE_CURRENT_SOURCE_DIR}/backends/sqlite3_backend.c) SET(CACHESSRC ${CMAKE_CURRENT_SOURCE_DIR}/learn_cache/sqlite3_cache.c) -IF(ENABLE_HIREDIS MATCHES "ON") - SET(BACKENDSSRC ${BACKENDSSRC} - ${CMAKE_CURRENT_SOURCE_DIR}/backends/redis_backend.c) - SET(CACHESSRC ${CACHESSRC} - ${CMAKE_CURRENT_SOURCE_DIR}/learn_cache/redis_cache.c) -ENDIF(ENABLE_HIREDIS MATCHES "ON") +SET(BACKENDSSRC ${BACKENDSSRC} + ${CMAKE_CURRENT_SOURCE_DIR}/backends/redis_backend.c) +SET(CACHESSRC ${CACHESSRC} + ${CMAKE_CURRENT_SOURCE_DIR}/learn_cache/redis_cache.c) SET(RSPAMD_STAT ${LIBSTATSRC} diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 71a412d84..f2d846525 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -33,9 +33,7 @@ TARGET_LINK_LIBRARIES(rspamd-test ${RSPAMD_REQUIRED_LIBRARIES}) IF (ENABLE_SNOWBALL MATCHES "ON") TARGET_LINK_LIBRARIES(rspamd-test stemmer) ENDIF() -IF(ENABLE_HIREDIS MATCHES "ON") - TARGET_LINK_LIBRARIES(rspamd-test rspamd-hiredis) -ENDIF() +TARGET_LINK_LIBRARIES(rspamd-test rspamd-hiredis) IF (ENABLE_HYPERSCAN MATCHES "ON") TARGET_LINK_LIBRARIES(rspamd-test hs) ENDIF() diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt index 0f65b06ce..036365439 100644 --- a/utils/CMakeLists.txt +++ b/utils/CMakeLists.txt @@ -16,9 +16,7 @@ MACRO(ADD_UTIL NAME) IF (ENABLE_SNOWBALL MATCHES "ON") TARGET_LINK_LIBRARIES("${NAME}" stemmer) ENDIF() - IF(ENABLE_HIREDIS MATCHES "ON") - TARGET_LINK_LIBRARIES("${NAME}" rspamd-hiredis) - ENDIF() + TARGET_LINK_LIBRARIES("${NAME}" rspamd-hiredis) TARGET_LINK_LIBRARIES(${NAME} rspamd-linenoise) TARGET_LINK_LIBRARIES("${NAME}" ${RSPAMD_REQUIRED_LIBRARIES}) ENDMACRO()