summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Asselstine <mark.asselstine@windriver.com>2017-09-08 17:02:31 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2017-09-10 22:36:02 -0400
commitba35378ce5e24f2bfcb85caa806774b873983d9f (patch)
treec57c52175acf67f02ffac62234a9c1b3c7927551
parent8d40af1278ead368afe14bce8713145730b453a2 (diff)
downloadmeta-virtualization-ba35378ce5e24f2bfcb85caa806774b873983d9f.tar.gz
criu: uprev to version 3.4
Our current version of criu is about a year old and has some compilation issues with the latest gcc (currently it is unbuildable). Since the version of criu and the kernel version are fairly tightly coupled it wouldn't be surprising of this old criu would also be exhibiting some runtime issues with our fairly new kernel version. With the above in mind we uprev to criu v3.4 which was recently released. This requires several of the patches to be updated (mostly context). We are able to drop the selinux related change as RSS prevents the situation this was working around from happenning. This was validated using https://criu.org/Simple_loop (and a few variants). Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
-rw-r--r--recipes-containers/criu/criu_git.bb13
-rw-r--r--recipes-containers/criu/files/0001-criu-Change-libraries-install-directory.patch25
-rw-r--r--recipes-containers/criu/files/0001-criu-Fix-toolchain-hardcode.patch57
-rw-r--r--recipes-containers/criu/files/disable-selinux.patch39
-rw-r--r--recipes-containers/criu/files/lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch16
5 files changed, 52 insertions, 98 deletions
diff --git a/recipes-containers/criu/criu_git.bb b/recipes-containers/criu/criu_git.bb
index 849a8328..3a021031 100644
--- a/recipes-containers/criu/criu_git.bb
+++ b/recipes-containers/criu/criu_git.bb
@@ -13,21 +13,19 @@ EXCLUDE_FROM_WORLD = "1"
13 13
14LIC_FILES_CHKSUM = "file://COPYING;md5=412de458544c1cb6a2b512cd399286e2" 14LIC_FILES_CHKSUM = "file://COPYING;md5=412de458544c1cb6a2b512cd399286e2"
15 15
16SRCREV = "c031417255f6a5c4409d15ff0b36af5f6e90c559" 16SRCREV = "a31c1854e10580a09621e539c3ec052b875a8e06"
17PR = "r0" 17PV = "3.4+git${SRCPV}"
18PV = "2.5+git${SRCPV}"
19 18
20SRC_URI = "git://github.com/xemul/criu.git;protocol=git \ 19SRC_URI = "git://github.com/xemul/criu.git;protocol=git \
21 file://0001-criu-Fix-toolchain-hardcode.patch \ 20 file://0001-criu-Fix-toolchain-hardcode.patch \
22 file://0002-criu-Skip-documentation-install.patch \ 21 file://0002-criu-Skip-documentation-install.patch \
23 file://0001-criu-Change-libraries-install-directory.patch \ 22 file://0001-criu-Change-libraries-install-directory.patch \
24 ${@bb.utils.contains('PACKAGECONFIG', 'selinux', '', 'file://disable-selinux.patch', d)} \
25 file://lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch \ 23 file://lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch \
26 " 24 "
27 25
28COMPATIBLE_HOST = "(x86_64|arm|aarch64).*-linux" 26COMPATIBLE_HOST = "(x86_64|arm|aarch64).*-linux"
29 27
30DEPENDS += "libnl libcap protobuf-c-native protobuf-c util-linux-native libbsd" 28DEPENDS += "libnl libcap protobuf-c-native protobuf-c util-linux-native libbsd libnet"
31RDEPENDS_${PN} = "bash" 29RDEPENDS_${PN} = "bash"
32 30
33S = "${WORKDIR}/git" 31S = "${WORKDIR}/git"
@@ -78,3 +76,8 @@ FILES_${PN} += "${systemd_unitdir}/ \
78 ${libdir}/pycriu/ \ 76 ${libdir}/pycriu/ \
79 ${libdir}/crit-0.0.1-py2.7.egg-info \ 77 ${libdir}/crit-0.0.1-py2.7.egg-info \
80 " 78 "
79
80FILES_${PN}-staticdev += " \
81 ${libexecdir}/compel/std.lib.a \
82 ${libexecdir}/compel/fds.lib.a \
83 "
diff --git a/recipes-containers/criu/files/0001-criu-Change-libraries-install-directory.patch b/recipes-containers/criu/files/0001-criu-Change-libraries-install-directory.patch
index a7214050..4908e474 100644
--- a/recipes-containers/criu/files/0001-criu-Change-libraries-install-directory.patch
+++ b/recipes-containers/criu/files/0001-criu-Change-libraries-install-directory.patch
@@ -1,26 +1,26 @@
1From 7ebde06e00b591a88397dad74a1aa47fd562eb50 Mon Sep 17 00:00:00 2001 1From 78390305829316633acee2ca5607331b0e37a104 Mon Sep 17 00:00:00 2001
2From: Jianchuan Wang <jianchuan.wang@windriver.com> 2From: Mark Asselstine <mark.asselstine@windriver.com>
3Date: Tue, 16 Aug 2016 09:48:08 +0800 3Date: Fri, 8 Sep 2017 15:11:31 -0400
4Subject: [PATCH 1/2] criu: Change libraries install directory 4Subject: [PATCH] criu: Change libraries install directory
5 5
6Install the libraries into /usr/lib(or /usr/lib64) 6Install the libraries into /usr/lib(or /usr/lib64)
7 7
8Signed-off-by: Jianchuan Wang <jianchuan.wang@windriver.com> 8Signed-off-by: Jianchuan Wang <jianchuan.wang@windriver.com>
9Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
9--- 10---
10 Makefile.install | 13 ------------- 11 Makefile.install | 13 -------------
11 1 file changed, 13 deletions(-) 12 1 file changed, 13 deletions(-)
12 13
13diff --git a/Makefile.install b/Makefile.install 14diff --git a/Makefile.install b/Makefile.install
14index dbc22e1..a30dc96 100644 15index 3987bcc..73d98a4 100644
15--- a/Makefile.install 16--- a/Makefile.install
16+++ b/Makefile.install 17+++ b/Makefile.install
17@@ -11,19 +11,6 @@ LIBDIR ?= $(PREFIX)/lib 18@@ -9,19 +9,6 @@ LIBEXECDIR ?= $(PREFIX)/libexec
18 INCLUDEDIR ?= $(PREFIX)/include/criu 19 RUNDIR ?= /run
19 LIBEXECDIR ?= $(PREFIX)/libexec
20 20
21-# 21 #
22-# For recent Debian/Ubuntu with multiarch support. 22-# For recent Debian/Ubuntu with multiarch support.
23-DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH 2>/dev/null) 23-DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH 2>/dev/null)
24-ifneq "$(DEB_HOST_MULTIARCH)" "" 24-ifneq "$(DEB_HOST_MULTIARCH)" ""
25- LIBDIR ?= $(PREFIX)/lib/$(DEB_HOST_MULTIARCH) 25- LIBDIR ?= $(PREFIX)/lib/$(DEB_HOST_MULTIARCH)
26-else 26-else
@@ -31,8 +31,9 @@ index dbc22e1..a30dc96 100644
31- endif 31- endif
32-endif 32-endif
33- 33-
34 export BINDIR SBINDIR MANDIR SYSTEMDUNITDIR LOGROTATEDIR 34-#
35 export INCLUDEDIR LIBDIR DESTDIR PREFIX LIBEXECDIR 35 # LIBDIR falls back to the standard path.
36 LIBDIR ?= $(PREFIX)/lib
36 37
37-- 38--
382.7.4 392.7.4
diff --git a/recipes-containers/criu/files/0001-criu-Fix-toolchain-hardcode.patch b/recipes-containers/criu/files/0001-criu-Fix-toolchain-hardcode.patch
index d30f2ac2..dc5b8977 100644
--- a/recipes-containers/criu/files/0001-criu-Fix-toolchain-hardcode.patch
+++ b/recipes-containers/criu/files/0001-criu-Fix-toolchain-hardcode.patch
@@ -1,6 +1,6 @@
1From 057d30f15e81dcc4162d6fbee06f126564596397 Mon Sep 17 00:00:00 2001 1From af679853a45fe63f680c99e70416c8ac620d23b8 Mon Sep 17 00:00:00 2001
2From: Jianchuan Wang <jianchuan.wang@windriver.com> 2From: Mark Asselstine <mark.asselstine@windriver.com>
3Date: Wed, 7 Sep 2016 23:55:15 -0400 3Date: Fri, 8 Sep 2017 15:02:14 -0400
4Subject: [PATCH] criu: Fix toolchain hardcode 4Subject: [PATCH] criu: Fix toolchain hardcode
5 5
6Replace ":=" to "?=" so that the toolchain used by bitbake build system will 6Replace ":=" to "?=" so that the toolchain used by bitbake build system will
@@ -8,45 +8,32 @@ be taken.
8 8
9Signed-off-by: Yang Shi <yang.shi@windriver.com> 9Signed-off-by: Yang Shi <yang.shi@windriver.com>
10Signed-off-by: Jianchuan Wang <jianchuan.wang@windriver.com> 10Signed-off-by: Jianchuan Wang <jianchuan.wang@windriver.com>
11Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
11--- 12---
12 Makefile | 2 +- 13 Makefile | 2 +-
13 criu/pie/Makefile | 2 +-
14 scripts/nmk/scripts/include.mk | 2 +- 14 scripts/nmk/scripts/include.mk | 2 +-
15 scripts/nmk/scripts/tools.mk | 40 ++++++++++++++++++++-------------------- 15 scripts/nmk/scripts/tools.mk | 40 ++++++++++++++++++++--------------------
16 4 files changed, 23 insertions(+), 23 deletions(-) 16 3 files changed, 22 insertions(+), 22 deletions(-)
17 17
18diff --git a/Makefile b/Makefile 18diff --git a/Makefile b/Makefile
19index 52cbd6a..f66279b 100644 19index f2583a2..d7f51e5 100644
20--- a/Makefile 20--- a/Makefile
21+++ b/Makefile 21+++ b/Makefile
22@@ -60,7 +60,7 @@ LDARCH ?= $(SRCARCH) 22@@ -17,7 +17,7 @@ ifeq ($(origin HOSTCFLAGS), undefined)
23 23 HOSTCFLAGS := $(CFLAGS) $(USERCFLAGS)
24 export SRCARCH LDARCH VDSO 24 endif
25 25
26-UNAME-M := $(shell uname -m) 26-UNAME-M := $(shell uname -m)
27+UNAME-M ?= $(shell uname -m) 27+UNAME-M ?= $(shell uname -m)
28 export UNAME-M
29 28
30 ifeq ($(ARCH),arm)
31diff --git a/criu/pie/Makefile b/criu/pie/Makefile
32index 125b02f..9975871 100644
33--- a/criu/pie/Makefile
34+++ b/criu/pie/Makefile
35@@ -17,7 +17,7 @@ restorer-obj-e += ./$(ARCH_DIR)/syscalls.built-in.o
36 # 29 #
37 CFLAGS := $(filter-out -pg $(CFLAGS-GCOV),$(CFLAGS)) 30 # Supported Architectures
38 CFLAGS += -iquote $(SRC_DIR)/criu/pie/piegen
39-CFLAGS += -iquote $(SRC_DIR)/criu/arch/$(ARCH)/include
40+CFLAGS += -iquote $(SRC_DIR)/criu/arch/$(SRCARCH)/include
41 CFLAGS += -iquote $(SRC_DIR)/criu/include
42 CFLAGS += -iquote $(SRC_DIR)
43
44diff --git a/scripts/nmk/scripts/include.mk b/scripts/nmk/scripts/include.mk 31diff --git a/scripts/nmk/scripts/include.mk b/scripts/nmk/scripts/include.mk
45index 4c496f7..a7250cd 100644 32index 04ccb3a..0d63bc7 100644
46--- a/scripts/nmk/scripts/include.mk 33--- a/scripts/nmk/scripts/include.mk
47+++ b/scripts/nmk/scripts/include.mk 34+++ b/scripts/nmk/scripts/include.mk
48@@ -20,7 +20,7 @@ SUBARCH := $(shell uname -m | sed \ 35@@ -20,7 +20,7 @@ SUBARCH := $(shell uname -m | sed \
49 -e s/aarch64.*/arm64/) 36 -e s/aarch64.*/aarch64/)
50 37
51 ARCH ?= $(SUBARCH) 38 ARCH ?= $(SUBARCH)
52-SRCARCH := $(ARCH) 39-SRCARCH := $(ARCH)
@@ -55,16 +42,20 @@ index 4c496f7..a7250cd 100644
55 export SUBARCH ARCH SRCARCH 42 export SUBARCH ARCH SRCARCH
56 43
57diff --git a/scripts/nmk/scripts/tools.mk b/scripts/nmk/scripts/tools.mk 44diff --git a/scripts/nmk/scripts/tools.mk b/scripts/nmk/scripts/tools.mk
58index 0538dde..e4af068 100644 45index 56dba84..1698821 100644
59--- a/scripts/nmk/scripts/tools.mk 46--- a/scripts/nmk/scripts/tools.mk
60+++ b/scripts/nmk/scripts/tools.mk 47+++ b/scripts/nmk/scripts/tools.mk
61@@ -2,28 +2,28 @@ ifndef ____nmk_defined__tools 48@@ -2,30 +2,30 @@ ifndef ____nmk_defined__tools
62 49
63 # 50 #
64 # System tools shorthands 51 # System tools shorthands
65-RM := rm -f 52-RM := rm -f
66-LD := $(CROSS_COMPILE)ld 53+RM ?= rm -f
67-CC := $(CROSS_COMPILE)gcc 54 HOSTLD ?= ld
55-LD := $(CROSS_COMPILE)$(HOSTLD)
56+LD ?= $(CROSS_COMPILE)$(HOSTLD)
57 HOSTCC ?= gcc
58-CC := $(CROSS_COMPILE)$(HOSTCC)
68-CPP := $(CC) -E 59-CPP := $(CC) -E
69-AS := $(CROSS_COMPILE)as 60-AS := $(CROSS_COMPILE)as
70-AR := $(CROSS_COMPILE)ar 61-AR := $(CROSS_COMPILE)ar
@@ -79,9 +70,7 @@ index 0538dde..e4af068 100644
79-PYTHON := python 70-PYTHON := python
80-FIND := find 71-FIND := find
81-SH := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ 72-SH := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
82+RM ?= rm -f 73+CC ?= $(CROSS_COMPILE)$(HOSTCC)
83+LD ?= $(CROSS_COMPILE)ld
84+CC ?= $(CROSS_COMPILE)gcc
85+CPP ?= $(CC) -E 74+CPP ?= $(CC) -E
86+AS ?= $(CROSS_COMPILE)as 75+AS ?= $(CROSS_COMPILE)as
87+AR ?= $(CROSS_COMPILE)ar 76+AR ?= $(CROSS_COMPILE)ar
@@ -105,8 +94,8 @@ index 0538dde..e4af068 100644
105+ETAGS ?= etags 94+ETAGS ?= etags
106+CTAGS ?= ctags 95+CTAGS ?= ctags
107 96
108 export RM LD CC CPP AS AR STRIP OBJCOPY OBJDUMP 97 export RM HOSTLD LD HOSTCC CC CPP AS AR STRIP OBJCOPY OBJDUMP
109 export NM SH MAKE MKDIR AWK PERL PYTHON SH CSCOPE 98 export NM SH MAKE MKDIR AWK PERL PYTHON SH CSCOPE
110-- 99--
1112.8.1 1002.7.4
112 101
diff --git a/recipes-containers/criu/files/disable-selinux.patch b/recipes-containers/criu/files/disable-selinux.patch
deleted file mode 100644
index 5d5d0352..00000000
--- a/recipes-containers/criu/files/disable-selinux.patch
+++ /dev/null
@@ -1,39 +0,0 @@
1From bd2eeaddfc1f12f87184d870cc9a1adde1cf0b10 Mon Sep 17 00:00:00 2001
2From: Mark Asselstine <mark.asselstine@windriver.com>
3Date: Mon, 24 Apr 2017 13:08:48 -0400
4Subject: [PATCH] criu/Makefile.config: explicitly remove selinux support
5
6Upstream-Status: Inappropriate [disable feature]
7
8It shows warning when build crius if libselinux has been built already:
9
10 WARNING: QA Issue: criu rdepends on libselinux, but it isn't a build dependency? [build-deps]
11
12Apply this patch to disable selinux support when 'selinux' is not in PACKAGECONF.
13
14Signed-off-by: Kai Kang <kai.kang@windriver.com>
15[MA: Context updated to apply against criu v2.5]
16Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
17---
18 criu/Makefile.config | 5 -----
19 1 file changed, 5 deletions(-)
20
21diff --git a/criu/Makefile.config b/criu/Makefile.config
22index f531b3b..37216f8 100644
23--- a/criu/Makefile.config
24+++ b/criu/Makefile.config
25@@ -7,11 +7,6 @@ ifeq ($(call try-cc,$(FEATURE_TEST_LIBBSD_DEV),-lbsd),true)
26 FEATURE_DEFINES += -DCONFIG_HAS_LIBBSD
27 endif
28
29-ifeq ($(call pkg-config-check,libselinux),y)
30- LIBS += -lselinux
31- FEATURE_DEFINES += -DCONFIG_HAS_SELINUX
32-endif
33-
34 export DEFINES += $(FEATURE_DEFINES)
35 export CFLAGS += $(FEATURE_DEFINES)
36
37--
382.7.4
39
diff --git a/recipes-containers/criu/files/lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch b/recipes-containers/criu/files/lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch
index 8bda8c42..c2512a0e 100644
--- a/recipes-containers/criu/files/lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch
+++ b/recipes-containers/criu/files/lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch
@@ -1,6 +1,6 @@
1From 2e0c5c66786016f6443da2c1ff15ad77f018ec9b Mon Sep 17 00:00:00 2001 1From 89f9b87904bd312b817ffaa7d83abfd5e84d723d Mon Sep 17 00:00:00 2001
2From: Mark Asselstine <mark.asselstine@windriver.com> 2From: Mark Asselstine <mark.asselstine@windriver.com>
3Date: Mon, 24 Apr 2017 16:12:05 -0400 3Date: Fri, 8 Sep 2017 15:40:49 -0400
4Subject: [PATCH] lib/Makefile: overwrite install-lib, to allow multiarch 4Subject: [PATCH] lib/Makefile: overwrite install-lib, to allow multiarch
5 5
6I am not sure why Yocto installs python modules in arch specific 6I am not sure why Yocto installs python modules in arch specific
@@ -13,15 +13,15 @@ Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
13 1 file changed, 1 insertion(+), 1 deletion(-) 13 1 file changed, 1 insertion(+), 1 deletion(-)
14 14
15diff --git a/lib/Makefile b/lib/Makefile 15diff --git a/lib/Makefile b/lib/Makefile
16index f1c0821..c714d12 100644 16index b1bb057..06f5c5d 100644
17--- a/lib/Makefile 17--- a/lib/Makefile
18+++ b/lib/Makefile 18+++ b/lib/Makefile
19@@ -56,7 +56,7 @@ install: lib-c lib-py ../crit/crit c/criu.pc.in 19@@ -56,7 +56,7 @@ install: lib-c lib-py crit/crit lib/c/criu.pc.in
20 $(Q) sed -e 's,@version@,$(CRIU_VERSION),' -e 's,@libdir@,$(LIBDIR),' -e 's,@includedir@,$(dir $(INCLUDEDIR)),' c/criu.pc.in > c/criu.pc 20 $(Q) sed -e 's,@version@,$(CRIU_VERSION),' -e 's,@libdir@,$(LIBDIR),' -e 's,@includedir@,$(dir $(INCLUDEDIR)/criu/),' lib/c/criu.pc.in > lib/c/criu.pc
21 $(Q) install -m 644 c/criu.pc $(DESTDIR)$(LIBDIR)/pkgconfig 21 $(Q) install -m 644 lib/c/criu.pc $(DESTDIR)$(LIBDIR)/pkgconfig
22 $(E) " INSTALL " crit 22 $(E) " INSTALL " crit
23- $(Q) python ../scripts/crit-setup.py install --root=$(DESTDIR) --prefix=$(PREFIX) --record $(CRIT_SETUP_FILES) 23- $(Q) $(PYTHON_BIN) scripts/crit-setup.py install --prefix=$(DESTDIR)$(PREFIX) --record $(CRIT_SETUP_FILES)
24+ $(Q) python ../scripts/crit-setup.py install --root=$(DESTDIR) --prefix=$(PREFIX) --record $(CRIT_SETUP_FILES) --install-lib=$(INSTALL_LIB) 24+ $(Q) $(PYTHON_BIN) scripts/crit-setup.py install --prefix=$(DESTDIR)$(PREFIX) --record $(CRIT_SETUP_FILES) --install-lib=$(DESTDIR)$(INSTALL_LIB)
25 .PHONY: install 25 .PHONY: install
26 26
27 uninstall: 27 uninstall: