Patrick Williams | d849ec7 | 2016-08-17 14:59:38 -0500 | [diff] [blame] | 1 | SUMMARY = "CRIU" |
| 2 | DESCRIPTION = "Checkpoint/Restore In Userspace, or CRIU, is a software tool for \ |
| 3 | Linux operating system. Using this tool, you can freeze a running application \ |
| 4 | (or part of it) and checkpoint it to a hard drive as a collection of files. \ |
| 5 | You can then use the files to restore and run the application from the point \ |
| 6 | it was frozen at. The distinctive feature of the CRIU project is that it is \ |
| 7 | mainly implemented in user space" |
| 8 | HOMEPAGE = "http://criu.org" |
| 9 | SECTION = "console/tools" |
| 10 | LICENSE = "GPLv2" |
| 11 | |
| 12 | EXCLUDE_FROM_WORLD = "1" |
| 13 | |
Patrick Williams | e69d235 | 2017-02-23 20:56:04 -0600 | [diff] [blame] | 14 | LIC_FILES_CHKSUM = "file://COPYING;md5=412de458544c1cb6a2b512cd399286e2" |
Patrick Williams | d849ec7 | 2016-08-17 14:59:38 -0500 | [diff] [blame] | 15 | |
Patrick Williams | e69d235 | 2017-02-23 20:56:04 -0600 | [diff] [blame] | 16 | SRCREV = "c031417255f6a5c4409d15ff0b36af5f6e90c559" |
Patrick Williams | d849ec7 | 2016-08-17 14:59:38 -0500 | [diff] [blame] | 17 | PR = "r0" |
Patrick Williams | e69d235 | 2017-02-23 20:56:04 -0600 | [diff] [blame] | 18 | PV = "2.5+git${SRCPV}" |
Patrick Williams | d849ec7 | 2016-08-17 14:59:38 -0500 | [diff] [blame] | 19 | |
| 20 | SRC_URI = "git://github.com/xemul/criu.git;protocol=git \ |
Patrick Williams | e69d235 | 2017-02-23 20:56:04 -0600 | [diff] [blame] | 21 | file://0001-criu-Fix-toolchain-hardcode.patch \ |
| 22 | file://0002-criu-Skip-documentation-install.patch \ |
| 23 | file://0001-criu-Change-libraries-install-directory.patch \ |
| 24 | ${@bb.utils.contains('PACKAGECONFIG', 'selinux', '', 'file://disable-selinux.patch', d)} \ |
| 25 | " |
Patrick Williams | d849ec7 | 2016-08-17 14:59:38 -0500 | [diff] [blame] | 26 | |
| 27 | COMPATIBLE_HOST = "(x86_64|arm|aarch64).*-linux" |
| 28 | |
Patrick Williams | e69d235 | 2017-02-23 20:56:04 -0600 | [diff] [blame] | 29 | DEPENDS += "libnl libcap protobuf-c-native protobuf-c" |
Patrick Williams | d849ec7 | 2016-08-17 14:59:38 -0500 | [diff] [blame] | 30 | |
| 31 | S = "${WORKDIR}/git" |
| 32 | |
| 33 | # |
| 34 | # CRIU just can be built on ARMv7 and ARMv6, so the Makefile check |
| 35 | # if the ARCH is ARMv7 or ARMv6. |
| 36 | # ARM BSPs need set CRIU_BUILD_ARCH variable for building CRIU. |
| 37 | # |
Patrick Williams | e69d235 | 2017-02-23 20:56:04 -0600 | [diff] [blame] | 38 | EXTRA_OEMAKE_arm += "ARCH=arm UNAME-M=${CRIU_BUILD_ARCH} WERROR=0" |
| 39 | EXTRA_OEMAKE_x86-64 += "ARCH=x86 WERROR=0" |
| 40 | EXTRA_OEMAKE_aarch64 += "ARCH=arm64 WERROR=0" |
Patrick Williams | d849ec7 | 2016-08-17 14:59:38 -0500 | [diff] [blame] | 41 | |
| 42 | EXTRA_OEMAKE_append += "SBINDIR=${sbindir} LIBDIR=${libdir} INCLUDEDIR=${includedir} PIEGEN=no" |
| 43 | EXTRA_OEMAKE_append += "LOGROTATEDIR=${sysconfdir} SYSTEMDUNITDIR=${systemd_unitdir}" |
| 44 | |
Patrick Williams | e69d235 | 2017-02-23 20:56:04 -0600 | [diff] [blame] | 45 | CFLAGS += "-D__USE_GNU -D_GNU_SOURCE " |
| 46 | |
| 47 | CFLAGS += " -I${STAGING_INCDIR} -I${STAGING_INCDIR}/libnl3" |
Patrick Williams | d849ec7 | 2016-08-17 14:59:38 -0500 | [diff] [blame] | 48 | |
| 49 | # overide LDFLAGS to allow criu to build without: "x86_64-poky-linux-ld: unrecognized option '-Wl,-O1'" |
| 50 | export LDFLAGS="" |
| 51 | |
| 52 | export BUILD_SYS |
| 53 | export HOST_SYS |
| 54 | |
| 55 | inherit setuptools |
| 56 | |
Patrick Williams | e69d235 | 2017-02-23 20:56:04 -0600 | [diff] [blame] | 57 | PACKAGECONFIG ??= "" |
| 58 | PACKAGECONFIG[selinux] = ",,libselinux" |
| 59 | |
Patrick Williams | d849ec7 | 2016-08-17 14:59:38 -0500 | [diff] [blame] | 60 | do_compile_prepend() { |
Patrick Williams | e69d235 | 2017-02-23 20:56:04 -0600 | [diff] [blame] | 61 | rm -rf ${S}/images/google/protobuf/descriptor.proto |
| 62 | ln -s ${PKG_CONFIG_SYSROOT_DIR}/usr/include/google/protobuf/descriptor.proto ${S}/images/google/protobuf/descriptor.proto |
Patrick Williams | d849ec7 | 2016-08-17 14:59:38 -0500 | [diff] [blame] | 63 | } |
| 64 | |
| 65 | do_compile () { |
| 66 | oe_runmake |
| 67 | } |
| 68 | |
| 69 | do_install () { |
| 70 | oe_runmake PREFIX=${exec_prefix} LIBDIR=${libdir} DESTDIR="${D}" install |
| 71 | } |
| 72 | |
| 73 | FILES_${PN} += "${systemd_unitdir}/ \ |
| 74 | ${libdir}/python2.7/site-packages/ \ |
| 75 | ${libdir}/pycriu/ \ |
| 76 | ${libdir}/crit-0.0.1-py2.7.egg-info \ |
| 77 | " |