]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cmake/modules/Builduadk.cmake: fix build
authorDan Mick <dan.mick@redhat.com>
Sat, 30 Aug 2025 07:40:24 +0000 (00:40 -0700)
committerDan Mick <dan.mick@redhat.com>
Sat, 30 Aug 2025 07:43:13 +0000 (00:43 -0700)
DESTDIR should not be set when building.

Fixes: https://tracker.ceph.com/issues/72722
Signed-off-by: Dan Mick <dan.mick@redhat.com>
cmake/modules/Builduadk.cmake

index bab18e7a0902f983ec96980dc9425460ef4d6f77..0a8a85026d222538cf739411d667c8bab0eb8249 100644 (file)
@@ -8,6 +8,13 @@ function(build_uadk)
     set(configure_cmd env ./configure --prefix=${UADK_INSTALL_DIR})
     list(APPEND configure_cmd --with-pic --enable-static --disable-shared --with-static_drv)
 
+    # command prefix to unset DESTDIR; otherwise debhelper and
+    # CMake fight about installation directories, and since
+    # everything here stays in the source tree, packaging
+    # is not necessary
+
+    set(UNSET_DESTDIR /usr/bin/env --unset=DESTDIR)
+
     include(ExternalProject)
     ExternalProject_Add(uadk_ext
         UPDATE_COMMAND "" # this disables rebuild on each run
@@ -17,10 +24,10 @@ function(build_uadk)
         SOURCE_DIR "${PROJECT_SOURCE_DIR}/src/uadk"
         BUILD_IN_SOURCE 1
         CMAKE_ARGS -DCMAKE_CXX_COMPILER=which g++
-        CONFIGURE_COMMAND ./autogen.sh COMMAND ${configure_cmd}
-        BUILD_COMMAND make
+        CONFIGURE_COMMAND ${UNSET_DESTDIR} ./autogen.sh COMMAND ${configure_cmd}
+        BUILD_COMMAND ${UNSET_DESTDIR} make
         BUILD_BYPRODUCTS ${UADK_WD_LIBRARY} ${UADK_WD_COMP_LIBRARY} ${UADK_WD_ZIP_LIBRARY}
-        INSTALL_COMMAND make install
+        INSTALL_COMMAND ${UNSET_DESTDIR} make install
         LOG_CONFIGURE ON
         LOG_BUILD ON
         LOG_INSTALL ON