]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: install python scripts into /usr/sbin even if DESTDIR is empty 38665/head
authorKefu Chai <kchai@redhat.com>
Sun, 20 Dec 2020 05:16:17 +0000 (13:16 +0800)
committerKefu Chai <kchai@redhat.com>
Sun, 20 Dec 2020 17:26:46 +0000 (01:26 +0800)
it's reported that on Alphine, "make install" installs
`ceph-volume-systemd` into `/usr/bin` instead of `/usr/sbin`, and this
breaks `systemd/ceph-volume@.service`. so in this change, we always
install this script into `/usr/sbin`, even if `DESTDIR` is not defined.

Signed-off-by: Kefu Chai <kchai@redhat.com>
cmake/modules/Distutils.cmake

index 8092e58379c58e77a3fb77fdc029726377ce914d..ff01aaf818a71d161c8d2c2ae65d827f1e0b772e 100644 (file)
@@ -25,9 +25,9 @@ function(distutils_install_module name)
       list(APPEND options
         --root=\$ENV{DESTDIR}
         --single-version-externally-managed)
-      if(NOT \"${DU_INSTALL_SCRIPT}\" STREQUAL \"\")
-        list(APPEND options --install-script=${DU_INSTALL_SCRIPT})
-      endif()
+    endif()
+    if(NOT \"${DU_INSTALL_SCRIPT}\" STREQUAL \"\")
+      list(APPEND options --install-script=${DU_INSTALL_SCRIPT})
     endif()
     execute_process(
     COMMAND ${Python3_EXECUTABLE}