crui: update selinux patch to apply to v2.5
PATCH 1/3 crui: update selinux patch to apply to v2.5
I am not sure how the uprev to v2.5 was completed without seeing this patch failure but regardless the file being patched was moved to the 'criu' directory as part of the v2.5 release. Update the path found in the patch and update the context in the patch such that it applies.
--- .../criu/files/disable-selinux.patch | 35 +++++++++++++++------- 1 file changed, 24 insertions(+), 11 deletions(-)
recipes-containers/criu/files/disable-selinux.patch +24 -11
@@ -1,3 +1,8 @@ +From bd2eeaddfc1f12f87184d870cc9a1adde1cf0b10 Mon Sep 17 00:00:00 2001 +From: Mark Asselstine <[email protected]> +Date: Mon, 24 Apr 2017 13:08:48 -0400 +Subject: [PATCH] criu/Makefile.config: explicitly remove selinux support + Upstream-Status: Inappropriate [disable feature] It shows warning when build crius if libselinux has been built already:
@@ -7,20 +12,28 @@ It shows warning when build crius if libselinux has been built already: Apply this patch to disable selinux support when 'selinux' is not in PACKAGECONF. Signed-off-by: Kai Kang <[email protected]> +[MA: Context updated to apply against criu v2.5] +Signed-off-by: Mark Asselstine <[email protected]> +--- + criu/Makefile.config | 5 ----- + 1 file changed, 5 deletions(-) -diff --git a/Makefile.config b/Makefile.config -index ce4b8d8..3ac2780 100644 ---- a/Makefile.config -+++ b/Makefile.config -@@ -8,11 +8,6 @@ ifeq ($(call try-cc,$(LIBBSD_DEV_TEST),-lbsd),y) - DEFINES += -DCONFIG_HAS_LIBBSD +diff --git a/criu/Makefile.config b/criu/Makefile.config +index f531b3b..37216f8 100644 +--- a/criu/Makefile.config ++++ b/criu/Makefile.config +@@ -7,11 +7,6 @@ ifeq ($(call try-cc,$(FEATURE_TEST_LIBBSD_DEV),-lbsd),true) + FEATURE_DEFINES += -DCONFIG_HAS_LIBBSD endif -ifeq ($(call pkg-config-check,libselinux),y) -- LIBS := -lselinux $(LIBS) -- DEFINES += -DCONFIG_HAS_SELINUX +- LIBS += -lselinux +- FEATURE_DEFINES += -DCONFIG_HAS_SELINUX -endif - - $(CONFIG): scripts/utilities.mak scripts/feature-tests.mak include/config-base.h - $(E) " GEN " $@ - $(Q) @echo '#ifndef __CR_CONFIG_H__' > $@ + export DEFINES += $(FEATURE_DEFINES) + export CFLAGS += $(FEATURE_DEFINES) + +-- +2.7.4 +
Signature · 1 line
2.7.4
PATCH 2/3 criu: depend on util-linux-native
To provide hexdump which is used as part of the build process. Resolves
| criu/pie/../../scripts/gen-offsets.sh: line 37: hexdump: command not found | criu/pie/Makefile:96: recipe for target 'criu/pie/parasite-blob.h' failed
--- recipes-containers/criu/criu_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-containers/criu/criu_git.bb +1 -1
@@ -26,7 +26,7 @@ SRC_URI = "git://github.com/xemul/criu.git;protocol=git \ COMPATIBLE_HOST = "(x86_64|arm|aarch64).*-linux" -DEPENDS += "libnl libcap protobuf-c-native protobuf-c" +DEPENDS += "libnl libcap protobuf-c-native protobuf-c util-linux-native" S = "${WORKDIR}/git"
Signature · 1 line
2.7.4
PATCH 3/3 criu: force python to install in ${libdir}
In reply to Mark AsselstineHistorically Yocto installs python modules in ${libdir} and not the no-arch variant. The criu install was following every other distros use of the non-arch variant, /usr/lib, which was being picked up by the QA check. Modify the criu Makefile to enable us to overwrite this location by using setup.py's install-lib directive.
--- recipes-containers/criu/criu_git.bb | 2 ++ ...e-overwrite-install-lib-to-allow-multiarc.patch | 30 ++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 recipes-containers/criu/files/lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch
recipes-containers/criu/criu_git.bb +2 -0
@@ -22,6 +22,7 @@ SRC_URI = "git://github.com/xemul/criu.git;protocol=git \ file://0002-criu-Skip-documentation-install.patch \ file://0001-criu-Change-libraries-install-directory.patch \ ${@bb.utils.contains('PACKAGECONFIG', 'selinux', '', 'file://disable-selinux.patch', d)} \ + file://lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch \ " COMPATIBLE_HOST = "(x86_64|arm|aarch64).*-linux"
@@ -67,6 +68,7 @@ do_compile () { } do_install () { + export INSTALL_LIB="${libdir}/${PYTHON_DIR}/site-packages" oe_runmake PREFIX=${exec_prefix} LIBDIR=${libdir} DESTDIR="${D}" install }
recipes-containers/criu/files/lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch new file +30 -0
@@ -0,0 +1,30 @@ +From 2e0c5c66786016f6443da2c1ff15ad77f018ec9b Mon Sep 17 00:00:00 2001 +From: Mark Asselstine <[email protected]> +Date: Mon, 24 Apr 2017 16:12:05 -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 <[email protected]> +--- + lib/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/Makefile b/lib/Makefile +index f1c0821..c714d12 100644 +--- a/lib/Makefile ++++ b/lib/Makefile +@@ -56,7 +56,7 @@ install: lib-c lib-py ../crit/crit c/criu.pc.in + $(Q) sed -e 's,@version@,$(CRIU_VERSION),' -e 's,@libdir@,$(LIBDIR),' -e 's,@includedir@,$(dir $(INCLUDEDIR)),' c/criu.pc.in > c/criu.pc + $(Q) install -m 644 c/criu.pc $(DESTDIR)$(LIBDIR)/pkgconfig + $(E) " INSTALL " crit +- $(Q) python ../scripts/crit-setup.py install --root=$(DESTDIR) --prefix=$(PREFIX) --record $(CRIT_SETUP_FILES) ++ $(Q) python ../scripts/crit-setup.py install --root=$(DESTDIR) --prefix=$(PREFIX) --record $(CRIT_SETUP_FILES) --install-lib=$(INSTALL_LIB) + .PHONY: install + + uninstall: +-- +2.7.4 +
Signature · 1 line
2.7.4
I normally let things sit longer .. but since this is already horribly broken, I went ahead
and merged the series.
Bruce
Quoted 78 lines · Mark Asselstine
I am not sure how the uprev to v2.5 was completed without seeing this patch failure but regardless the file being patched was moved to the 'criu' directory as part of the v2.5 release. Update the path found in the patch and update the context in the patch such that it applies.
Signed-off-by Mark Asselstine <[email protected]>--- .../criu/files/disable-selinux.patch | 35 +++++++++++++++------- 1 file changed, 24 insertions(+), 11 deletions(-)recipes-containers/criu/files/disable-selinux.patch +5
-0@@ -1,3 +1,8 @@ +From bd2eeaddfc1f12f87184d870cc9a1adde1cf0b10 Mon Sep 17 00:00:00 2001 +From: Mark Asselstine <[email protected]> +Date: Mon, 24 Apr 2017 13:08:48 -0400 +Subject: [PATCH] criu/Makefile.config: explicitly remove selinux support + Upstream-Status: Inappropriate [disable feature] It shows warning when build crius if libselinux has been built already:@@ -7,20 +12,28 @@ It shows warning when build crius if libselinux hasbeen built already:
Apply this patch to disable selinux support when 'selinux' is not in
PACKAGECONF.Signed-off-by Kai Kang <[email protected]>+[MA: Context updated to apply against criu v2.5]
recipes-containers/criu/files/disable-selinux.patch +9
-6+Signed-off-by: Mark Asselstine <[email protected]> +--- + criu/Makefile.config | 5 ----- + 1 file changed, 5 deletions(-) -diff --git a/Makefile.config b/Makefile.config -index ce4b8d8..3ac2780 100644 ---- a/Makefile.config -+++ b/Makefile.config -@@ -8,11 +8,6 @@ ifeq ($(call try-cc,$(LIBBSD_DEV_TEST),-lbsd),y) - DEFINES += -DCONFIG_HAS_LIBBSD +diff --git a/criu/Makefile.config b/criu/Makefile.config +index f531b3b..37216f8 100644 +--- a/criu/Makefile.config ++++ b/criu/Makefile.config +@@ -7,11 +7,6 @@ ifeq ($(call try-cc,$(FEATURE_TEST_LIBBSD_DEV),-lbsd),true)
+FEATURE_DEFINES+= -DCONFIG_HAS_LIBBSD
endif-ifeq ($(call pkg-config-check,libselinux),y)
-- LIBS := -lselinux $(LIBS)
-- DEFINES += -DCONFIG_HAS_SELINUX+- LIBS += -lselinux +- FEATURE_DEFINES += -DCONFIG_HAS_SELINUX-endif
-
- $(CONFIG):scripts/utilities.makscripts/feature-tests.makinclude/config-base.hrecipes-containers/criu/files/disable-selinux.patch +6
-3- $(E) " GEN " $@ - $(Q) @echo '#ifndef __CR_CONFIG_H__' > $@ + export DEFINES += $(FEATURE_DEFINES) + export CFLAGS += $(FEATURE_DEFINES) + +-- +2.7.4 + --2.7.4
--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization
Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"