summaryrefslogtreecommitdiffstats
path: root/recipes-containers
diff options
context:
space:
mode:
authorKai Kang <kai.kang@windriver.com>2016-06-01 16:35:43 +0800
committerBruce Ashfield <bruce.ashfield@windriver.com>2016-06-06 02:44:44 -0400
commit06dccfa933d7ef60d2f6739f78e1197c7f8df5cd (patch)
tree7960a2f60fba27ecd767564fbc02b189af637137 /recipes-containers
parent01aa8f18196d76d4554649c47348fb68277574c5 (diff)
downloadmeta-virtualization-06dccfa933d7ef60d2f6739f78e1197c7f8df5cd.tar.gz
criu: fix build-deps qa warning
It shows warning when build crius if libselinux has been built already: WARNING: QA Issue: criu rdepends on libselinux, but it isn't a build dependency? [build-deps] Add a patch to disable selinux support when 'selinux' is not in PACKAGECONF. And update indentation at same time. Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-containers')
-rw-r--r--recipes-containers/criu/criu_git.bb12
-rw-r--r--recipes-containers/criu/files/disable-selinux.patch26
2 files changed, 34 insertions, 4 deletions
diff --git a/recipes-containers/criu/criu_git.bb b/recipes-containers/criu/criu_git.bb
index 816c8067..c8be78fb 100644
--- a/recipes-containers/criu/criu_git.bb
+++ b/recipes-containers/criu/criu_git.bb
@@ -18,10 +18,11 @@ PR = "r0"
18PV = "1.6+git${SRCPV}" 18PV = "1.6+git${SRCPV}"
19 19
20SRC_URI = "git://github.com/xemul/criu.git;protocol=git \ 20SRC_URI = "git://github.com/xemul/criu.git;protocol=git \
21 file://0001-criu-Fix-toolchain-hardcode.patch \ 21 file://0001-criu-Fix-toolchain-hardcode.patch \
22 file://0002-criu-Skip-documentation-install.patch \ 22 file://0002-criu-Skip-documentation-install.patch \
23 file://0001-criu-Change-libraries-install-directory.patch \ 23 file://0001-criu-Change-libraries-install-directory.patch \
24 " 24 ${@bb.utils.contains('PACKAGECONFIG', 'selinux', '', 'file://disable-selinux.patch', d)} \
25 "
25 26
26COMPATIBLE_HOST = "(x86_64|arm|aarch64).*-linux" 27COMPATIBLE_HOST = "(x86_64|arm|aarch64).*-linux"
27 28
@@ -51,6 +52,9 @@ export HOST_SYS
51 52
52inherit setuptools 53inherit setuptools
53 54
55PACKAGECONFIG ??= ""
56PACKAGECONFIG[selinux] = ",,libselinux"
57
54do_compile_prepend() { 58do_compile_prepend() {
55 rm -rf ${S}/protobuf/google/protobuf/descriptor.proto 59 rm -rf ${S}/protobuf/google/protobuf/descriptor.proto
56 ln -s ${PKG_CONFIG_SYSROOT_DIR}/usr/include/google/protobuf/descriptor.proto ${S}/protobuf/google/protobuf/descriptor.proto 60 ln -s ${PKG_CONFIG_SYSROOT_DIR}/usr/include/google/protobuf/descriptor.proto ${S}/protobuf/google/protobuf/descriptor.proto
diff --git a/recipes-containers/criu/files/disable-selinux.patch b/recipes-containers/criu/files/disable-selinux.patch
new file mode 100644
index 00000000..da881dd3
--- /dev/null
+++ b/recipes-containers/criu/files/disable-selinux.patch
@@ -0,0 +1,26 @@
1Upstream-Status: Inappropriate [disable feature]
2
3It shows warning when build crius if libselinux has been built already:
4
5 WARNING: QA Issue: criu rdepends on libselinux, but it isn't a build dependency? [build-deps]
6
7Apply this patch to disable selinux support when 'selinux' is not in PACKAGECONF.
8
9Signed-off-by: Kai Kang <kai.kang@windriver.com>
10
11diff --git a/Makefile.config b/Makefile.config
12index ce4b8d8..3ac2780 100644
13--- a/Makefile.config
14+++ b/Makefile.config
15@@ -8,11 +8,6 @@ ifeq ($(call try-cc,$(LIBBSD_DEV_TEST),-lbsd),y)
16 DEFINES += -DCONFIG_HAS_LIBBSD
17 endif
18
19-ifeq ($(call pkg-config-check,libselinux),y)
20- LIBS := -lselinux $(LIBS)
21- DEFINES += -DCONFIG_HAS_SELINUX
22-endif
23-
24 $(CONFIG): scripts/utilities.mak scripts/feature-tests.mak include/config-base.h
25 $(E) " GEN " $@
26 $(Q) @echo '#ifndef __CR_CONFIG_H__' > $@