meta-virtualization/recipes-extended/ceph/ceph_15.2.12.bb
Bruce Ashfield d876cfc5bf global: overrides syntax conversion
OEcore/bitbake are moving to use the clearer ":" as an overrides
separator.

This is pass one of updating the meta-virt recipes to use that
syntax.

This has only been minimally build/runtime tested, more changes
will be required for missed overrides, or incorrect conversions

Note: A recent bitbake is required:

    commit 75fad23fc06c008a03414a1fc288a8614c6af9ca
    Author: Richard Purdie <richard.purdie@linuxfoundation.org>
    Date:   Sun Jul 18 12:59:15 2021 +0100

        bitbake: data_smart/parse: Allow ':' characters in variable/function names

        It is becomming increasingly clear we need to find a way to show what
        is/is not an override in our syntax. We need to do this in a way which
        is clear to users, readable and in a way we can transition to.

        The most effective way I've found to this is to use the ":" charater
        to directly replace "_" where an override is being specified. This
        includes "append", "prepend" and "remove" which are effectively special
        override directives.

        This patch simply adds the character to the parser so bitbake accepts
        the value but maps it back to "_" internally so there is no behaviour
        change.

        This change is simple enough it could potentially be backported to older
        version of bitbake meaning layers using the new syntax/markup could
        work with older releases. Even if other no other changes are accepted
        at this time and we don't backport, it does set us on a path where at
        some point in future we could
        require a more explict syntax.

        I've tested this patch by converting oe-core/meta-yocto to the new
        syntax for overrides (9000+ changes) and then seeing that builds
        continue to work with this patch.

        (Bitbake rev: 0dbbb4547cb2570d2ce607e9a53459df3c0ac284)

        Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2021-08-02 17:17:53 -04:00

146 lines
5.4 KiB
BlitzBasic

SUMMARY = "User space components of the Ceph file system"
LICENSE = "LGPLv2.1 & GPLv2 & Apache-2.0 & MIT"
LIC_FILES_CHKSUM = "file://COPYING-LGPL2.1;md5=fbc093901857fcd118f065f900982c24 \
file://COPYING-GPL2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://COPYING;md5=4eb012c221c5fd4b760029a2981a6754 \
"
inherit cmake python3native python3-dir systemd
# Disable python pybind support for ceph temporary, when corss compiling pybind,
# pybind mix cmake and python setup environment, would case a lot of errors.
SRC_URI = "http://download.ceph.com/tarballs/ceph-${PV}.tar.gz \
file://0001-ceph-fix-build-errors-for-cross-compile.patch \
file://0001-fix-host-library-paths-were-used.patch \
file://ceph.conf \
file://0001-add-missing-include-for-atomic-bool.patch \
file://0001-cmake-add-support-for-python3.9.patch \
file://0001-SnappyCompressor.h-fix-snappy-compiler-error.patch \
"
SRC_URI[sha1sum] = "9c76b298e1e659b9c5501003ac77fb28aab7823d"
SRC_URI[sha256sum] = "8710f6700de83765138df8eb4fc7a5e7c66104dd838033e0827a1850f250ac85"
SRC_URI[sha384sum] = "2a2f177e5b68f6f5d13b253a8d4daba9e956b4a79a40a4775aee288b60c612fe13b417d6baf77944c32b1181b2136f68"
SRC_URI[sha512sum] = "08266a2e9a7ca5a37e03f340873571fd012c630dd898a87241cd97c29760b2bf41fe64c8883e7b08e0f83c26245072cd26e69ecb1db02378d1ec38335ba1cd0f"
DEPENDS = "boost bzip2 curl expat gperf-native \
keyutils libaio libibverbs lz4 \
nspr nss \
oath openldap openssl \
python3 python3-cython-native rabbitmq-c rocksdb snappy udev \
valgrind xfsprogs zlib \
"
SYSTEMD_SERVICE:${PN} = " \
ceph-radosgw@.service \
ceph-radosgw.target \
ceph-mon@.service \
ceph-mon.target \
ceph-mds@.service \
ceph-mds.target \
ceph-osd@.service \
ceph-osd.target \
ceph.target \
ceph-rbd-mirror@.service \
ceph-rbd-mirror.target \
ceph-volume@.service \
ceph-mgr@.service \
ceph-mgr.target \
ceph-crash.service \
rbdmap.service \
ceph-immutable-object-cache@.service \
ceph-immutable-object-cache.target \
"
OECMAKE_GENERATOR = "Unix Makefiles"
EXTRA_OECMAKE = "-DWITH_MANPAGE=OFF \
-DWITH_FUSE=OFF \
-DWITH_SPDK=OFF \
-DWITH_LEVELDB=OFF \
-DWITH_LTTNG=OFF \
-DWITH_BABELTRACE=OFF \
-DWITH_TESTS=OFF \
-DWITH_MGR=OFF \
-DWITH_MGR_DASHBOARD_FRONTEND=OFF \
-DWITH_SYSTEM_BOOST=ON \
-DWITH_SYSTEM_ROCKSDB=ON \
-DWITH_RDMA=OFF \
-DWITH_RADOSGW_AMQP_ENDPOINT=OFF \
-DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DPYTHON_DESIRED=3 \
-DPython3_EXECUTABLE=${PYTHON} \
-DWITH_RADOSGW_KAFKA_ENDPOINT=OFF \
-DWITH_REENTRANT_STRSIGNAL=ON \
"
export STAGING_DIR_HOST
do_configure:prepend () {
echo "set( CMAKE_SYSROOT \"${RECIPE_SYSROOT}\" )" >> ${WORKDIR}/toolchain.cmake
echo "set( CMAKE_DESTDIR \"${D}\" )" >> ${WORKDIR}/toolchain.cmake
echo "set( PYTHON_SITEPACKAGES_DIR \"${PYTHON_SITEPACKAGES_DIR}\" )" >> ${WORKDIR}/toolchain.cmake
}
do_install:append () {
sed -i -e 's:^#!/usr/bin/python$:&3:' \
-e 's:${WORKDIR}.*python3:${bindir}/python3:' \
${D}${bindir}/ceph ${D}${bindir}/ceph-crash \
${D}${bindir}/ceph-volume ${D}${bindir}/ceph-volume-systemd
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}
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
# WITH_FUSE is set to OFF, remove ceph-fuse related units
rm ${D}${systemd_unitdir}/system/ceph-fuse.target ${D}${systemd_unitdir}/system/ceph-fuse@.service
}
do_install:append:class-target () {
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
install -d ${D}${sysconfdir}/tmpfiles.d
echo "d /var/lib/ceph/crash/posted 0755 root root - -" > ${D}${sysconfdir}/tmpfiles.d/ceph-placeholder.conf
fi
if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
install -d ${D}${sysconfdir}/default/volatiles
echo "d root root 0755 /var/lib/ceph/crash/posted none" > ${D}${sysconfdir}/default/volatiles/99_ceph-placeholder
fi
}
pkg_postinst:${PN}() {
if [ -z "$D" ] && [ -e ${sysconfdir}/init.d/populate-volatile.sh ] ; then
${sysconfdir}/init.d/populate-volatile.sh update
fi
}
FILES:${PN} += "\
${libdir}/rados-classes/*.so.* \
${libdir}/ceph/compressor/*.so \
${libdir}/rados-classes/*.so \
${libdir}/ceph/*.so \
"
FILES:${PN} += " \
/etc/tmpfiles.d/ceph-placeholder.conf \
/etc/default/volatiles/99_ceph-placeholder \
"
FILES:${PN}-python = "\
${PYTHON_SITEPACKAGES_DIR}/* \
"
RDEPENDS:${PN} += "\
python3-core \
python3-misc \
python3-modules \
python3-prettytable \
${PN}-python \
"
COMPATIBLE_HOST = "(x86_64).*"
PACKAGES += " \
${PN}-python \
"
INSANE_SKIP:${PN}-python += "ldflags"
INSANE_SKIP:${PN} += "dev-so"
CCACHE_DISABLE = "1"
CVE_PRODUCT = "ceph ceph_storage ceph_storage_mon ceph_storage_osd"