Merge pull request #173619 from KoviRobi/clamav-fix-config-file-location
clamav: Fix CLI clamav programs not finding configuration files
This commit is contained in:
commit
bee7341dcb
@ -13,8 +13,11 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "sha256-JwIDpUxFgEnbVPzZNoP/Wy2xkVHzY8SOgs7O/d4rNdQ=";
|
sha256 = "sha256-JwIDpUxFgEnbVPzZNoP/Wy2xkVHzY8SOgs7O/d4rNdQ=";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Flaky test, remove this when https://github.com/Cisco-Talos/clamav/issues/343 is fixed
|
patches = [
|
||||||
patches = [ ./remove-freshclam-test.patch ];
|
# Flaky test, remove this when https://github.com/Cisco-Talos/clamav/issues/343 is fixed
|
||||||
|
./remove-freshclam-test.patch
|
||||||
|
./sample-cofiguration-file-install-location.patch
|
||||||
|
];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
nativeBuildInputs = [ cmake pkg-config rustc rust-bindgen rustfmt cargo python3 ];
|
nativeBuildInputs = [ cmake pkg-config rustc rust-bindgen rustfmt cargo python3 ];
|
||||||
@ -25,6 +28,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
"-DSYSTEMD_UNIT_DIR=${placeholder "out"}/lib/systemd"
|
"-DSYSTEMD_UNIT_DIR=${placeholder "out"}/lib/systemd"
|
||||||
|
"-DAPP_CONFIG_DIRECTORY=/etc/clamav"
|
||||||
];
|
];
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
@ -0,0 +1,29 @@
|
|||||||
|
diff --git a/etc/CMakeLists.txt b/etc/CMakeLists.txt
|
||||||
|
index 826fff1..3cefc34 100644
|
||||||
|
--- a/etc/CMakeLists.txt
|
||||||
|
+++ b/etc/CMakeLists.txt
|
||||||
|
@@ -6,14 +6,14 @@ install(
|
||||||
|
FILES
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/clamd.conf.sample
|
||||||
|
DESTINATION
|
||||||
|
- ${APP_CONFIG_DIRECTORY}
|
||||||
|
+ ${CMAKE_INSTALL_PREFIX}/${APP_CONFIG_DIRECTORY}
|
||||||
|
COMPONENT programs)
|
||||||
|
|
||||||
|
install(
|
||||||
|
FILES
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/freshclam.conf.sample
|
||||||
|
DESTINATION
|
||||||
|
- ${APP_CONFIG_DIRECTORY}
|
||||||
|
+ ${CMAKE_INSTALL_PREFIX}/${APP_CONFIG_DIRECTORY}
|
||||||
|
COMPONENT programs)
|
||||||
|
|
||||||
|
if(ENABLE_MILTER)
|
||||||
|
@@ -21,6 +21,6 @@ if(ENABLE_MILTER)
|
||||||
|
FILES
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/clamav-milter.conf.sample
|
||||||
|
DESTINATION
|
||||||
|
- ${APP_CONFIG_DIRECTORY}
|
||||||
|
+ ${CMAKE_INSTALL_PREFIX}/${APP_CONFIG_DIRECTORY}
|
||||||
|
COMPONENT programs)
|
||||||
|
endif()
|
Loading…
Reference in New Issue
Block a user