From 6cdf25b4ab4125764f98df9de00d9cf7512c6c32 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sun, 20 Dec 2020 13:16:17 +0800 Subject: [PATCH] cmake: install python scripts into /usr/sbin even if DESTDIR is empty 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 --- cmake/modules/Distutils.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/modules/Distutils.cmake b/cmake/modules/Distutils.cmake index 8092e58379c..ff01aaf818a 100644 --- a/cmake/modules/Distutils.cmake +++ b/cmake/modules/Distutils.cmake @@ -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} -- 2.39.5