Skip to contentSkip to conversation

ceph: fix Distutils.cmake installation for cross compile

PATCH Superseded Dengke Du 1 participant 1 message Oct 26, 2018

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Dengke Du

author
#0 lore raw

PATCH 1/1 ceph: fix Distutils.cmake installation for cross compile

1. Remove the detection for build host and correct the install destination for cross compile.
2. Delete the build host information in the results files.

---
 ...tect-init-correct-the-installation-for-OE.patch | 36 ++++++++++++++++++++++
 recipes-extended/ceph/ceph_13.2.2.bb               | 28 ++++++++++++-----
 2 files changed, 56 insertions(+), 8 deletions(-)
 create mode 100644 recipes-extended/ceph/ceph/0001-ceph-detect-init-correct-the-installation-for-OE.patch
recipes-extended/ceph/ceph/0001-ceph-detect-init-correct-the-installation-for-OE.patch new file +36 -0
new file mode 100644
index 0000000..875501b
@@ -0,0 +1,36 @@
+From 6aaf04036f0affbeddda123bff111990c4d5fd72 Mon Sep 17 00:00:00 2001
+From: Dengke Du <[email protected]>
+Date: Fri, 26 Oct 2018 14:31:10 +0800
+Subject: [PATCH] ceph-detect-init: correct the installation for OE
+
+Signed-off-by: Dengke Du <[email protected]>
+Upstream-Status: Inappropriate [oe specific]
+---
+ cmake/modules/Distutils.cmake | 11 ++---------
+ 1 file changed, 2 insertions(+), 9 deletions(-)
+
+diff --git a/cmake/modules/Distutils.cmake b/cmake/modules/Distutils.cmake
+index 3091d97..c50fe77 100644
+--- a/cmake/modules/Distutils.cmake
++++ b/cmake/modules/Distutils.cmake
+@@ -16,15 +16,8 @@ function(distutils_install_module name)
+   cmake_parse_arguments(DU "" INSTALL_SCRIPT "" ${ARGN})
+   install(CODE "
+     set(options --prefix=${CMAKE_INSTALL_PREFIX})
+-    if(DEFINED ENV{DESTDIR})
+-      if(EXISTS /etc/debian_version)
+-        list(APPEND options --install-layout=deb)
+-      endif()
+-      list(APPEND options --root=\$ENV{DESTDIR})
+-      if(NOT \"${DU_INSTALL_SCRIPT}\" STREQUAL \"\")
+-        list(APPEND options --install-script=${DU_INSTALL_SCRIPT})
+-      endif()
+-    endif()
++    list(APPEND options --root=${CMAKE_DESTDIR})
++    list(APPEND options --install-lib=${PYTHON_SITEPACKAGES_DIR})
+     execute_process(
+     COMMAND ${PYTHON${PYTHON_VERSION}_EXECUTABLE}
+         setup.py install \${options}
+-- 
+2.7.4
+
recipes-extended/ceph/ceph_13.2.2.bb +20 -8
index 6c6da41..2d13df7 100644
@@ -12,6 +12,7 @@ SRC_URI = "http://download.ceph.com/tarballs/ceph-${PV}.tar.gz \
            file://0001-Correct-the-path-to-find-version.h-in-rocksdb.patch \
            file://0001-zstd-fix-error-for-cross-compile.patch \
            file://0001-ceph-add-pybind-support-in-OE.patch \
+           file://0001-ceph-detect-init-correct-the-installation-for-OE.patch \
            file://ceph.conf \
 "
 SRC_URI[md5sum] = "ce118be451dcb6b89e9e0a45057827dd"
@@ -24,12 +25,25 @@ DEPENDS = "boost bzip2 curl expat gperf-native \
            python python-cython-native rocksdb snappy udev \
            valgrind xfsprogs zlib \
 "
-SYSTEMD_SERVICE_${PN} = "[email protected] \
+SYSTEMD_SERVICE_${PN} = " \
+	[email protected] \
+	ceph-radosgw.target \
         [email protected] \
+	ceph-mon.target \
         [email protected] \
+	ceph-mds.target \
         [email protected] \
         [email protected] \
+	ceph-osd.target \
         ceph.target \
+	[email protected] \
+	ceph-fuse.target \
+	[email protected] \
+	ceph-rbd-mirror.target \
+	[email protected] \
+	[email protected] \
+	ceph-mgr.target \
+	rbdmap.service \
 "
 OECMAKE_GENERATOR = "Unix Makefiles"
 
@@ -54,15 +68,13 @@ do_configure_prepend () {
 
 do_install_append () {
 	sed -i -e 's:${WORKDIR}.*python2:${bindir}/python:' ${D}${bindir}/ceph
+	sed -i -e 's:${WORKDIR}.*python2:${bindir}/python:' ${D}${bindir}/ceph-disk
+	sed -i -e 's:${WORKDIR}.*python2:${bindir}/python:' ${D}${bindir}/ceph-detect-init
+	find ${D} -name SOURCES.txt | xargs sed -i -e 's:${WORKDIR}::'
 	install -d ${D}${sysconfdir}/ceph
 	install -m 644 ${WORKDIR}/ceph.conf ${D}${sysconfdir}/ceph/
-	install -d ${D}${systemd_unitdir}/system
-	mv ${D}${libexecdir}/systemd/system/[email protected] ${D}${systemd_unitdir}/system/[email protected]
-	mv ${D}${libexecdir}/systemd/system/[email protected] ${D}${systemd_unitdir}/system/[email protected]
-	mv ${D}${libexecdir}/systemd/system/[email protected] ${D}${systemd_unitdir}/system/[email protected]
-	mv ${D}${libexecdir}/systemd/system/[email protected] ${D}${systemd_unitdir}/system/[email protected]
-	mv ${D}${libexecdir}/systemd/system/[email protected] ${D}${systemd_unitdir}/system/[email protected]
-	mv ${D}${libexecdir}/systemd/system/ceph.target ${D}${systemd_unitdir}/system/ceph.target
+	install -d ${D}${systemd_unitdir}
+	mv ${D}${libexecdir}/systemd/system ${D}${systemd_unitdir}
 }
 
 FILES_${PN} += "\
Signature · 1 line
2.7.4