aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2021-03-12 15:35:14 -0500
committerBruce Ashfield <bruce.ashfield@gmail.com>2021-03-16 09:25:36 -0400
commita92e3ff714907a96ff32cbf88b28c49cacfcda36 (patch)
treeaf1b80023378575c6a99bfc72334af0aaf000f83
parent0a35ee512c98c3d242543e5b8b71acb38be003f6 (diff)
downloadmeta-virtualization-a92e3ff714907a96ff32cbf88b28c49cacfcda36.tar.gz
meta-virtualization-a92e3ff714907a96ff32cbf88b28c49cacfcda36.tar.bz2
meta-virtualization-a92e3ff714907a96ff32cbf88b28c49cacfcda36.zip
runc: add selinux and seccomp package configs
runc can be built with both selinux and seccomp tags. These tags are a requirement for proper operation with some frameworks (like k3s). So we add checks for the appropriate distro features and then automatically add them to the build tags, allowing us a coordinated enabling of the functionality. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r--recipes-containers/runc/runc.inc9
1 files changed, 8 insertions, 1 deletions
diff --git a/recipes-containers/runc/runc.inc b/recipes-containers/runc/runc.inc
index 5a6aeaf..eb8aa02 100644
--- a/recipes-containers/runc/runc.inc
+++ b/recipes-containers/runc/runc.inc
@@ -15,11 +15,13 @@ inherit goarch
inherit pkgconfig
PACKAGECONFIG[seccomp] = "seccomp,,libseccomp"
+PACKAGECONFIG[selinux] = "selinux,,libselinux"
# This PACKAGECONFIG serves the purpose of whether building runc as static or not
PACKAGECONFIG[static] = ""
PACKAGECONFIG ??= "static \
${@bb.utils.contains('DISTRO_FEATURES', 'seccomp', 'seccomp', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \
"
@@ -31,7 +33,12 @@ GO_IMPORT = "import"
LIBCONTAINER_PACKAGE="github.com/opencontainers/runc/libcontainer"
do_configure[noexec] = "1"
-EXTRA_OEMAKE="BUILDTAGS='${PACKAGECONFIG_CONFARGS}' GO=${GO}"
+
+
+DISTRO_BUILDTAGS ?= "${@bb.utils.contains('DISTRO_FEATURES', 'seccomp', 'seccomp', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}"
+
+EXTRA_OEMAKE="BUILDTAGS='${PACKAGECONFIG_CONFARGS} ${DISTRO_BUILDTAGS}' GO=${GO}"
do_compile() {
# Set GOPATH. See 'PACKAGERS.md'. Don't rely on