[Pkg-sssd-devel] Bug#1060179: resolv-wrapper: cmocka does not set CMOCKA_LIBRARY anymore.

Hefee hefee at debian.org
Sat Jan 6 23:16:42 GMT 2024


Package: resolv-wrapper
Version: 1.1.8-2
Severity: normal
Tags: patch
X-Debbugs-Cc: hefee at debian.org

Hey,

cmocka does not set CMOCKA_LIBRARY anymore with 1.1.6+. You can easly
use cmoka as library name. I tested the attached patch locally and it
makes the autopkgtests pass again.

Additionally enables VERBOSE=1 for make, so it is easier to spot what
command is actually executed.

Regards,

hefee
-------------- next part --------------
diff --git a/debian/tests/tests b/debian/tests/tests
index b4a4900..1a31031 100755
--- a/debian/tests/tests
+++ b/debian/tests/tests
@@ -6,7 +6,7 @@ rm -rf obj debian
 mkdir obj
 cd obj
 cmake -DUNIT_TESTING=1 ..
-make -C tests/
+make VERBOSE=1 -C tests/
 cd tests
 sed -e 's#\(LD_PRELOAD=\)[^;]*/\(libresolv_wrapper.so\)#\1\2#' -i CTestTestfile.cmake
 make test ARGS="--output-on-failure"
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 1262bed..2614d78 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -11,7 +11,7 @@ target_link_libraries(dns_srv ${RWRAP_REQUIRED_LIBRARIES})
 add_executable(test_real_res_query test_real_res_query.c)
 target_compile_options(test_real_res_query PRIVATE ${DEFAULT_C_COMPILE_FLAGS})
 target_include_directories(test_real_res_query PRIVATE ${CMAKE_BINARY_DIR} ${CMOCKA_INCLUDE_DIR})
-target_link_libraries(test_real_res_query ${RWRAP_REQUIRED_LIBRARIES} ${CMOCKA_LIBRARY})
+target_link_libraries(test_real_res_query ${RWRAP_REQUIRED_LIBRARIES} cmocka)
 
 configure_file(fake_hosts.in ${CMAKE_CURRENT_BINARY_DIR}/fake_hosts @ONLY)
 
@@ -19,11 +19,11 @@ add_library(${TORTURE_LIBRARY} STATIC torture.c)
 target_compile_options(${TORTURE_LIBRARY} PRIVATE ${DEFAULT_C_COMPILE_FLAGS})
 target_include_directories(${TORTURE_LIBRARY} PRIVATE ${CMAKE_BINARY_DIR} ${CMOCKA_INCLUDE_DIR})
 target_link_libraries(${TORTURE_LIBRARY}
-    ${CMOCKA_LIBRARY}
+    cmocka
     ${SWRAP_REQUIRED_LIBRARIES})
 
 
-set(TESTSUITE_LIBRARIES ${RWRAP_REQUIRED_LIBRARIES} ${CMOCKA_LIBRARY})
+set(TESTSUITE_LIBRARIES ${RWRAP_REQUIRED_LIBRARIES} cmocka)
 
 # Some tests require socket_wrapper as well.
 find_package(socket_wrapper REQUIRED)


More information about the Pkg-sssd-devel mailing list