From 15604811cb75547549ea556b58790e92a71b0ae5 Mon Sep 17 00:00:00 2001 From: Benjamin Bannier Date: Thu, 21 Aug 2025 10:56:28 +0200 Subject: [PATCH] Fix installation of symlink with `DESTDIR` We install test data which we also make available under an alternative path for backwards compatibility. The installation of this symlink did not take `DESTDIR` installs like used by Zeek's packaging into account which caused installations from packages to behave different from installs from source. This patch fixes the symlink to respect a possible `DESTDIR`. Closes #3266. --- testing/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/CMakeLists.txt b/testing/CMakeLists.txt index f3c12302e4..9d2e26883c 100644 --- a/testing/CMakeLists.txt +++ b/testing/CMakeLists.txt @@ -14,7 +14,7 @@ install( CODE "execute_process( \ COMMAND ${CMAKE_COMMAND} -E create_symlink \ ${ZEEK_CONFIG_BTEST_TOOLS_DIR}/data \ - ${CMAKE_INSTALL_PREFIX}/share/zeek/tests \ + \$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/share/zeek/tests \ )") install(DIRECTORY scripts/spicy/ DESTINATION ${ZEEK_CONFIG_BTEST_TOOLS_DIR}/data/Scripts