diff options
Diffstat (limited to 'recipes-containers/criu/criu_git.bb')
-rw-r--r-- | recipes-containers/criu/criu_git.bb | 73 |
1 files changed, 44 insertions, 29 deletions
diff --git a/recipes-containers/criu/criu_git.bb b/recipes-containers/criu/criu_git.bb index 24aa3012..09503624 100644 --- a/recipes-containers/criu/criu_git.bb +++ b/recipes-containers/criu/criu_git.bb @@ -7,27 +7,27 @@ 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" +LICENSE = "GPL-2.0-only" EXCLUDE_FROM_WORLD = "1" LIC_FILES_CHKSUM = "file://COPYING;md5=412de458544c1cb6a2b512cd399286e2" -SRCREV = "c703e3fd8404e506cc6156719b953ea0580d59a4" -PV = "3.13+git${SRCPV}" +SRCREV = "f8b14286b092853a4485813e1efd564109df9123" +PV = "3.19.0+git" -SRC_URI = "git://github.com/checkpoint-restore/criu.git \ - file://0001-criu-Fix-toolchain-hardcode.patch \ - 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 \ - file://0001-criu-fix-build-failure-against-gcc-10.patch \ - " +SRC_URI = "git://github.com/checkpoint-restore/criu.git;branch=master;protocol=https \ + file://0001-criu-Skip-documentation-install.patch \ + file://0002-criu-Change-libraries-install-directory.patch \ + file://0003-crit-pycriu-build-and-install-wheels.patch \ + file://0004-pycriu-attr-pycriu.version.__version__.patch \ + file://0005-pycriu-skip-dependency-check-during-build.patch \ + " COMPATIBLE_HOST = "(x86_64|arm|aarch64).*-linux" -DEPENDS += "libnl libcap protobuf-c-native protobuf-c util-linux-native libbsd libnet" -RDEPENDS_${PN} = "bash" +DEPENDS += "libnl libcap protobuf-c-native protobuf-c util-linux-native libbsd libnet python3-protobuf-native" +RDEPENDS:${PN} = "bash cgroup-lite python3-ctypes python3-fcntl python3-protobuf" S = "${WORKDIR}/git" @@ -36,17 +36,17 @@ S = "${WORKDIR}/git" # 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: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}" +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 += "-D__USE_GNU -D_GNU_SOURCE " CFLAGS += " -I${STAGING_INCDIR} -I${STAGING_INCDIR}/libnl3" -CFLAGS_arm += "-D__WORDSIZE" +CFLAGS:arm += "-D__WORDSIZE" # overide LDFLAGS to allow criu to build without: "x86_64-poky-linux-ld: unrecognized option '-Wl,-O1'" export LDFLAGS="" @@ -56,7 +56,8 @@ export BUILD_SYS export HOST_SYS export HOSTCFLAGS = "${BUILD_CFLAGS}" -inherit setuptools3 +inherit python_setuptools_build_meta +inherit pkgconfig B = "${S}" @@ -65,33 +66,47 @@ PACKAGECONFIG[selinux] = ",,libselinux" CLEANBROKEN = "1" -do_compile_prepend() { +# WARNING: criu-3.17.1 do_package_qa: QA Issue: criu: ELF binary /usr/sbin/criu has relocations in .text [textrel] +INSANE_SKIP:${PN} += "textrel" + +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 + oe_runmake FULL_PYTHON=${PYTHON} PYTHON=nativepython3 } 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 + export PEP517_WHEEL_PATH="${PEP517_WHEEL_PATH}" + export USRBINPATH="${USRBINPATH}" + export PEP517_INSTALL_PYTHON="${PEP517_INSTALL_PYTHON}" + oe_runmake PREFIX=${exec_prefix} LIBDIR=${libdir} DESTDIR="${D}" PLUGINDIR="${localstatedir}/lib" FULL_PYTHON=${PYTHON} PYTHON=nativepython3 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 + # + # we're building wheels now, so EGG-INFO need not apply + #sed -i 's%^\#\!.*%\#\!/usr/bin/env python3%' ${D}/usr/bin/crit ${D}${libdir}/python3*/site-packages/crit-*-py3*.egg/EGG-INFO/scripts/crit + + # all the __pycache__ contains references to TMPDIR and these will be built the first time + # it runs on the target anyway + for pycachedir in $(find ${D} -name __pycache__); do + rm -rf $pycachedir + done } -FILES_${PN} += "${systemd_unitdir}/ \ - ${libdir}/python3*/site-packages/ \ - ${libdir}/pycriu/ \ - ${libdir}/crit-0.0.1-py3*.egg-info \ +FILES:${PN} += "${systemd_unitdir}/ \ + #${libdir}/python3*/site-packages/ \ + #${libdir}/pycriu/ \ + #${libdir}/crit-0.0.1-py3*.egg-info \ " -FILES_${PN}-staticdev += " \ +FILES:${PN}-staticdev += " \ ${libexecdir}/compel/std.lib.a \ ${libexecdir}/compel/fds.lib.a \ " |