mirror of
git://git.yoctoproject.org/meta-virtualization.git
synced 2025-07-04 21:05:25 +02:00

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>
96 lines
3.3 KiB
BlitzBasic
96 lines
3.3 KiB
BlitzBasic
SUMMARY = "CRIU"
|
|
DESCRIPTION = "Checkpoint/Restore In Userspace, or CRIU, is a software tool for \
|
|
Linux operating system. Using this tool, you can freeze a running application \
|
|
(or part of it) and checkpoint it to a hard drive as a collection of files. \
|
|
You can then use the files to restore and run the application from the point \
|
|
it was frozen at. The distinctive feature of the CRIU project is that it is \
|
|
mainly implemented in user space"
|
|
HOMEPAGE = "http://criu.org"
|
|
SECTION = "console/tools"
|
|
LICENSE = "GPLv2"
|
|
|
|
EXCLUDE_FROM_WORLD = "1"
|
|
|
|
LIC_FILES_CHKSUM = "file://COPYING;md5=412de458544c1cb6a2b512cd399286e2"
|
|
|
|
SRCREV = "e49ce513c8df43e8d3b30b7acfbe7bd496d89862"
|
|
PV = "3.14+git${SRCPV}"
|
|
|
|
SRC_URI = "git://github.com/checkpoint-restore/criu.git;branch=criu-dev \
|
|
file://0002-criu-Skip-documentation-install.patch \
|
|
file://0001-criu-Change-libraries-install-directory.patch \
|
|
file://lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch \
|
|
"
|
|
|
|
COMPATIBLE_HOST = "(x86_64|arm|aarch64).*-linux"
|
|
|
|
DEPENDS += "libnl libcap protobuf-c-native protobuf-c util-linux-native libbsd libnet"
|
|
RDEPENDS:${PN} = "bash"
|
|
|
|
S = "${WORKDIR}/git"
|
|
|
|
#
|
|
# CRIU just can be built on ARMv7 and ARMv6, so the Makefile check
|
|
# if the ARCH is ARMv7 or ARMv6.
|
|
# ARM BSPs need set CRIU_BUILD_ARCH variable for building CRIU.
|
|
#
|
|
EXTRA_OEMAKE:arm += "ARCH=arm UNAME-M=${CRIU_BUILD_ARCH} WERROR=0"
|
|
EXTRA_OEMAKE:x86-64 += "ARCH=x86 WERROR=0"
|
|
EXTRA_OEMAKE:aarch64 += "ARCH=aarch64 WERROR=0"
|
|
|
|
EXTRA_OEMAKE:append += "SBINDIR=${sbindir} LIBDIR=${libdir} INCLUDEDIR=${includedir} PIEGEN=no"
|
|
EXTRA_OEMAKE:append += "LOGROTATEDIR=${sysconfdir} SYSTEMDUNITDIR=${systemd_unitdir}"
|
|
|
|
CFLAGS += "-D__USE_GNU -D_GNU_SOURCE "
|
|
|
|
CFLAGS += " -I${STAGING_INCDIR} -I${STAGING_INCDIR}/libnl3"
|
|
CFLAGS:arm += "-D__WORDSIZE"
|
|
|
|
# overide LDFLAGS to allow criu to build without: "x86_64-poky-linux-ld: unrecognized option '-Wl,-O1'"
|
|
export LDFLAGS=""
|
|
export C_INCLUDE_PATH="${STAGING_INCDIR}/libnl3"
|
|
|
|
export BUILD_SYS
|
|
export HOST_SYS
|
|
export HOSTCFLAGS = "${BUILD_CFLAGS}"
|
|
|
|
inherit setuptools3
|
|
|
|
B = "${S}"
|
|
|
|
PACKAGECONFIG ??= ""
|
|
PACKAGECONFIG[selinux] = ",,libselinux"
|
|
|
|
CLEANBROKEN = "1"
|
|
|
|
do_compile:prepend() {
|
|
rm -rf ${S}/images/google/protobuf/descriptor.proto
|
|
ln -s ${PKG_CONFIG_SYSROOT_DIR}/usr/include/google/protobuf/descriptor.proto ${S}/images/google/protobuf/descriptor.proto
|
|
}
|
|
|
|
do_compile () {
|
|
oe_runmake FULL_PYTHON=${PYTHON} PYTHON=python3
|
|
}
|
|
|
|
do_install () {
|
|
export INSTALL_LIB="${libdir}/${PYTHON_DIR}/site-packages"
|
|
oe_runmake PREFIX=${exec_prefix} LIBDIR=${libdir} DESTDIR="${D}" FULL_PYTHON=${PYTHON} PYTHON=python3 install
|
|
|
|
# python3's distutils has a feature of rewriting the interpeter on setup installed
|
|
# scripts. 'crit' is one of those scripts. The "executable" or "e" option to the
|
|
# setup call should fix it, but it is being ignored. So to avoid getting our native
|
|
# intepreter replaced in the script, we'll do an explicit update ourselves.
|
|
sed -i 's%^\#\!.*%\#\!/usr/bin/env python3%g' ${D}/usr/bin/crit
|
|
}
|
|
|
|
FILES:${PN} += "${systemd_unitdir}/ \
|
|
${libdir}/python3*/site-packages/ \
|
|
${libdir}/pycriu/ \
|
|
${libdir}/crit-0.0.1-py3*.egg-info \
|
|
"
|
|
|
|
FILES:${PN}-staticdev += " \
|
|
${libexecdir}/compel/std.lib.a \
|
|
${libexecdir}/compel/fds.lib.a \
|
|
"
|