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.

Signed-off-by: Dengke Du <dengke.du@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
This commit is contained in:
Dengke Du 2018-10-26 17:43:53 +08:00 committed by Bruce Ashfield
parent f33c8698fd
commit 2519e5b16d
2 changed files with 58 additions and 8 deletions

View File

@ -0,0 +1,36 @@
From 6aaf04036f0affbeddda123bff111990c4d5fd72 Mon Sep 17 00:00:00 2001
From: Dengke Du <dengke.du@windriver.com>
Date: Fri, 26 Oct 2018 14:31:10 +0800
Subject: [PATCH] ceph-detect-init: correct the installation for OE
Signed-off-by: Dengke Du <dengke.du@windriver.com>
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

View File

@ -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} = "ceph-radosgw@.service \
SYSTEMD_SERVICE_${PN} = " \
ceph-radosgw@.service \
ceph-radosgw.target \
ceph-mon@.service \
ceph-mon.target \
ceph-mds@.service \
ceph-mds.target \
ceph-disk@.service \
ceph-osd@.service \
ceph-osd.target \
ceph.target \
ceph-fuse@.service \
ceph-fuse.target \
ceph-rbd-mirror@.service \
ceph-rbd-mirror.target \
ceph-volume@.service \
ceph-mgr@.service \
ceph-mgr.target \
rbdmap.service \
"
OECMAKE_GENERATOR = "Unix Makefiles"
@ -54,15 +68,15 @@ 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/ceph-radosgw@.service ${D}${systemd_unitdir}/system/ceph-radosgw@.service
mv ${D}${libexecdir}/systemd/system/ceph-mon@.service ${D}${systemd_unitdir}/system/ceph-mon@.service
mv ${D}${libexecdir}/systemd/system/ceph-mds@.service ${D}${systemd_unitdir}/system/ceph-mds@.service
mv ${D}${libexecdir}/systemd/system/ceph-disk@.service ${D}${systemd_unitdir}/system/ceph-disk@.service
mv ${D}${libexecdir}/systemd/system/ceph-osd@.service ${D}${systemd_unitdir}/system/ceph-osd@.service
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}
mv ${D}${libexecdir}/ceph/ceph-osd-prestart.sh ${D}${libdir}/ceph
mv ${D}${libexecdir}/ceph/ceph_common.sh ${D}${libdir}/ceph
}
FILES_${PN} += "\