From a92e3ff714907a96ff32cbf88b28c49cacfcda36 Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Fri, 12 Mar 2021 15:35:14 -0500 Subject: 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 --- recipes-containers/runc/runc.inc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'recipes-containers/runc') diff --git a/recipes-containers/runc/runc.inc b/recipes-containers/runc/runc.inc index 5a6aeaf6..eb8aa022 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 -- cgit v1.2.3-54-g00ecf