summaryrefslogtreecommitdiffstats
path: root/external/meta-virtualization/recipes-containers/criu/files
diff options
context:
space:
mode:
Diffstat (limited to 'external/meta-virtualization/recipes-containers/criu/files')
-rw-r--r--external/meta-virtualization/recipes-containers/criu/files/0001-criu-Change-libraries-install-directory.patch38
-rw-r--r--external/meta-virtualization/recipes-containers/criu/files/0001-criu-Fix-toolchain-hardcode.patch100
-rw-r--r--external/meta-virtualization/recipes-containers/criu/files/0002-criu-Skip-documentation-install.patch26
-rw-r--r--external/meta-virtualization/recipes-containers/criu/files/fix-building-on-newest-glibc-and-kernel.patch45
-rw-r--r--external/meta-virtualization/recipes-containers/criu/files/lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch28
5 files changed, 237 insertions, 0 deletions
diff --git a/external/meta-virtualization/recipes-containers/criu/files/0001-criu-Change-libraries-install-directory.patch b/external/meta-virtualization/recipes-containers/criu/files/0001-criu-Change-libraries-install-directory.patch
new file mode 100644
index 00000000..afb1332d
--- /dev/null
+++ b/external/meta-virtualization/recipes-containers/criu/files/0001-criu-Change-libraries-install-directory.patch
@@ -0,0 +1,38 @@
+From f64fbca70e6049dad3c404d871f2383d97725d2d Mon Sep 17 00:00:00 2001
+From: Mark Asselstine <mark.asselstine@windriver.com>
+Date: Fri, 8 Sep 2017 15:11:31 -0400
+Subject: [PATCH] criu: Change libraries install directory
+
+Install the libraries into /usr/lib(or /usr/lib64)
+
+Signed-off-by: Jianchuan Wang <jianchuan.wang@windriver.com>
+Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
+
+---
+ Makefile.install | 13 -------------
+ 1 file changed, 13 deletions(-)
+
+diff --git a/Makefile.install b/Makefile.install
+index 1def3cf..d020eef 100644
+--- a/Makefile.install
++++ b/Makefile.install
+@@ -9,19 +9,6 @@ LIBEXECDIR ?= $(PREFIX)/libexec
+ RUNDIR ?= /run
+
+ #
+-# For recent Debian/Ubuntu with multiarch support.
+-DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH 2>/dev/null)
+-ifneq "$(DEB_HOST_MULTIARCH)" ""
+- LIBDIR ?= $(PREFIX)/lib/$(DEB_HOST_MULTIARCH)
+-else
+- #
+- # For most other systems
+- ifeq "$(shell uname -m)" "x86_64"
+- LIBDIR ?= $(PREFIX)/lib64
+- endif
+-endif
+-
+-#
+ # LIBDIR falls back to the standard path.
+ LIBDIR ?= $(PREFIX)/lib
+
diff --git a/external/meta-virtualization/recipes-containers/criu/files/0001-criu-Fix-toolchain-hardcode.patch b/external/meta-virtualization/recipes-containers/criu/files/0001-criu-Fix-toolchain-hardcode.patch
new file mode 100644
index 00000000..838cbdc9
--- /dev/null
+++ b/external/meta-virtualization/recipes-containers/criu/files/0001-criu-Fix-toolchain-hardcode.patch
@@ -0,0 +1,100 @@
+From c005b7a4874f55df687ff22bc425551775581421 Mon Sep 17 00:00:00 2001
+From: Mark Asselstine <mark.asselstine@windriver.com>
+Date: Fri, 8 Sep 2017 15:02:14 -0400
+Subject: [PATCH] criu: Fix toolchain hardcode
+
+Replace ":=" to "?=" so that the toolchain used by bitbake build system will
+be taken.
+
+Signed-off-by: Yang Shi <yang.shi@windriver.com>
+Signed-off-by: Jianchuan Wang <jianchuan.wang@windriver.com>
+Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
+
+---
+ Makefile | 2 +-
+ scripts/nmk/scripts/include.mk | 2 +-
+ scripts/nmk/scripts/tools.mk | 40 ++++++++++++++++++++--------------------
+ 3 files changed, 22 insertions(+), 22 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index f2583a2..d7f51e5 100644
+--- a/Makefile
++++ b/Makefile
+@@ -17,7 +17,7 @@ ifeq ($(origin HOSTCFLAGS), undefined)
+ HOSTCFLAGS := $(CFLAGS) $(USERCFLAGS)
+ endif
+
+-UNAME-M := $(shell uname -m)
++UNAME-M ?= $(shell uname -m)
+
+ #
+ # Supported Architectures
+diff --git a/scripts/nmk/scripts/include.mk b/scripts/nmk/scripts/include.mk
+index 04ccb3a..0d63bc7 100644
+--- a/scripts/nmk/scripts/include.mk
++++ b/scripts/nmk/scripts/include.mk
+@@ -22,7 +22,7 @@ SUBARCH := $(shell uname -m | sed \
+ -e s/aarch64.*/aarch64/)
+
+ ARCH ?= $(SUBARCH)
+-SRCARCH := $(ARCH)
++SRCARCH ?= $(ARCH)
+
+ export SUBARCH ARCH SRCARCH
+
+diff --git a/scripts/nmk/scripts/tools.mk b/scripts/nmk/scripts/tools.mk
+index 56dba84..1698821 100644
+--- a/scripts/nmk/scripts/tools.mk
++++ b/scripts/nmk/scripts/tools.mk
+@@ -2,31 +2,31 @@ ifndef ____nmk_defined__tools
+
+ #
+ # System tools shorthands
+-RM := rm -f
++RM ?= rm -f
+ HOSTLD ?= ld
+-LD := $(CROSS_COMPILE)$(HOSTLD)
++LD ?= $(CROSS_COMPILE)$(HOSTLD)
+ HOSTCC ?= gcc
+-CC := $(CROSS_COMPILE)$(HOSTCC)
+-CPP := $(CC) -E
+-AS := $(CROSS_COMPILE)as
+-AR := $(CROSS_COMPILE)ar
+-STRIP := $(CROSS_COMPILE)strip
+-OBJCOPY := $(CROSS_COMPILE)objcopy
+-OBJDUMP := $(CROSS_COMPILE)objdump
+-NM := $(CROSS_COMPILE)nm
+-MAKE := make
+-MKDIR := mkdir -p
+-AWK := awk
+-PERL := perl
+-FULL_PYTHON := $(shell which python2 2>/dev/null || which python3 2>/dev/null)
++CC ?= $(CROSS_COMPILE)$(HOSTCC)
++CPP ?= $(CC) -E
++AS ?= $(CROSS_COMPILE)as
++AR ?= $(CROSS_COMPILE)ar
++STRIP ?= $(CROSS_COMPILE)strip
++OBJCOPY ?= $(CROSS_COMPILE)objcopy
++OBJDUMP ?= $(CROSS_COMPILE)objdump
++NM ?= $(CROSS_COMPILE)nm
++MAKE ?= make
++MKDIR ?= mkdir -p
++AWK ?= awk
++PERL ?= perl
++FULL_PYTHON ?= $(shell which python2 2>/dev/null || which python3 2>/dev/null)
+ PYTHON ?= $(shell basename $(FULL_PYTHON))
+-FIND := find
+-SH := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
++FIND ?= find
++SH ?= $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
+ else if [ -x /bin/bash ]; then echo /bin/bash; \
+ else echo sh; fi ; fi)
+-CSCOPE := cscope
+-ETAGS := etags
+-CTAGS := ctags
++CSCOPE ?= cscope
++ETAGS ?= etags
++CTAGS ?= ctags
+
+ export RM HOSTLD LD HOSTCC CC CPP AS AR STRIP OBJCOPY OBJDUMP
+ export NM SH MAKE MKDIR AWK PERL PYTHON SH CSCOPE
diff --git a/external/meta-virtualization/recipes-containers/criu/files/0002-criu-Skip-documentation-install.patch b/external/meta-virtualization/recipes-containers/criu/files/0002-criu-Skip-documentation-install.patch
new file mode 100644
index 00000000..af45db73
--- /dev/null
+++ b/external/meta-virtualization/recipes-containers/criu/files/0002-criu-Skip-documentation-install.patch
@@ -0,0 +1,26 @@
+From 45d74ae8a314c481398ba91a3697ffbd074cd98b Mon Sep 17 00:00:00 2001
+From: Jianchuan Wang <jianchuan.wang@windriver.com>
+Date: Tue, 16 Aug 2016 09:42:24 +0800
+Subject: [PATCH] criu: Skip documentation install
+
+asciidoc is needed to generate CRIU documentation, so skip it in install.
+
+Signed-off-by: Jianchuan Wang <jianchuan.wang@windriver.com>
+
+---
+ Makefile.install | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.install b/Makefile.install
+index 3987bcc..1def3cf 100644
+--- a/Makefile.install
++++ b/Makefile.install
+@@ -29,7 +29,7 @@ export PREFIX BINDIR SBINDIR MANDIR RUNDIR
+ export LIBDIR INCLUDEDIR LIBEXECDIR
+
+ install-man:
+- $(Q) $(MAKE) -C Documentation install
++# $(Q) $(MAKE) -C Documentation install
+ .PHONY: install-man
+
+ install-lib: lib
diff --git a/external/meta-virtualization/recipes-containers/criu/files/fix-building-on-newest-glibc-and-kernel.patch b/external/meta-virtualization/recipes-containers/criu/files/fix-building-on-newest-glibc-and-kernel.patch
new file mode 100644
index 00000000..9361adc2
--- /dev/null
+++ b/external/meta-virtualization/recipes-containers/criu/files/fix-building-on-newest-glibc-and-kernel.patch
@@ -0,0 +1,45 @@
+From b59947007362b53e9f41f1e5a33071dedf1c59ac Mon Sep 17 00:00:00 2001
+From: Adrian Reber <areber@redhat.com>
+Date: Thu, 28 Sep 2017 09:13:33 +0000
+Subject: [PATCH] fix building on newest glibc and kernel
+
+On Fedora rawhide with kernel-headers-4.14.0-0.rc2.git0.1.fc28.x86_64
+glibc-devel-2.26.90-15.fc28.x86_64 criu does not build any more:
+
+In file included from /usr/include/linux/aio_abi.h:31:0,
+ from criu/cr-check.c:24:
+/usr/include/sys/mount.h:35:3: error: expected identifier before numeric constant
+ MS_RDONLY = 1, /* Mount read-only. */
+ ^
+make[2]: *** [/builddir/build/BUILD/criu-3.5/scripts/nmk/scripts/build.mk:111: criu/cr-check.o] Error 1
+make[1]: *** [criu/Makefile:73: criu/built-in.o] Error 2
+make: *** [Makefile:233: criu] Error 2
+
+This simple re-ordering of includes fixes it for me.
+
+Signed-off-by: Adrian Reber <areber@redhat.com>
+Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
+
+Upstream-Status: Backport
+[https://github.com/checkpoint-restore/criu/commit/f41e386d4d40e3e26b0cfdc85a812b7edb337f1d#diff-cc847b1cc975358c6582595be92d48db]
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+
+---
+ criu/cr-check.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/criu/cr-check.c b/criu/cr-check.c
+index 1dd887a..93df2ab 100644
+--- a/criu/cr-check.c
++++ b/criu/cr-check.c
+@@ -21,8 +21,8 @@
+ #include <netinet/in.h>
+ #include <sys/prctl.h>
+ #include <sched.h>
+-#include <linux/aio_abi.h>
+ #include <sys/mount.h>
++#include <linux/aio_abi.h>
+
+ #include "../soccr/soccr.h"
+
diff --git a/external/meta-virtualization/recipes-containers/criu/files/lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch b/external/meta-virtualization/recipes-containers/criu/files/lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch
new file mode 100644
index 00000000..70ccb287
--- /dev/null
+++ b/external/meta-virtualization/recipes-containers/criu/files/lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch
@@ -0,0 +1,28 @@
+From 6caf90592d61c8c45b32cb7ff76709f9326030e2 Mon Sep 17 00:00:00 2001
+From: Mark Asselstine <mark.asselstine@windriver.com>
+Date: Fri, 8 Sep 2017 15:40:49 -0400
+Subject: [PATCH] lib/Makefile: overwrite install-lib, to allow multiarch
+
+I am not sure why Yocto installs python modules in arch specific
+/usr/libXX directories but it does. Allow the recipe to pass this via
+INSTALL_LIB.
+
+Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
+
+---
+ lib/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/Makefile b/lib/Makefile
+index b1bb057..06f5c5d 100644
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -53,7 +53,7 @@ install: lib-c lib-py crit/crit lib/c/criu.pc.in
+ $(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
+ $(Q) install -m 644 lib/c/criu.pc $(DESTDIR)$(LIBDIR)/pkgconfig
+ $(E) " INSTALL " crit
+- $(Q) $(PYTHON) scripts/crit-setup.py install --prefix=$(DESTDIR)$(PREFIX) --record $(CRIT_SETUP_FILES)
++ $(Q) $(PYTHON) scripts/crit-setup.py install --prefix=$(DESTDIR)$(PREFIX) --record $(CRIT_SETUP_FILES) --install-lib=$(DESTDIR)$(INSTALL_LIB)
+ .PHONY: install
+
+ uninstall: