mirror of
git://git.yoctoproject.org/meta-virtualization.git
synced 2025-07-19 20:59:41 +02:00
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>
This commit is contained in:
parent
0a35ee512c
commit
a92e3ff714
|
@ -15,11 +15,13 @@ inherit goarch
|
||||||
inherit pkgconfig
|
inherit pkgconfig
|
||||||
|
|
||||||
PACKAGECONFIG[seccomp] = "seccomp,,libseccomp"
|
PACKAGECONFIG[seccomp] = "seccomp,,libseccomp"
|
||||||
|
PACKAGECONFIG[selinux] = "selinux,,libselinux"
|
||||||
# This PACKAGECONFIG serves the purpose of whether building runc as static or not
|
# This PACKAGECONFIG serves the purpose of whether building runc as static or not
|
||||||
PACKAGECONFIG[static] = ""
|
PACKAGECONFIG[static] = ""
|
||||||
|
|
||||||
PACKAGECONFIG ??= "static \
|
PACKAGECONFIG ??= "static \
|
||||||
${@bb.utils.contains('DISTRO_FEATURES', 'seccomp', 'seccomp', '', d)} \
|
${@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"
|
LIBCONTAINER_PACKAGE="github.com/opencontainers/runc/libcontainer"
|
||||||
|
|
||||||
do_configure[noexec] = "1"
|
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() {
|
do_compile() {
|
||||||
# Set GOPATH. See 'PACKAGERS.md'. Don't rely on
|
# Set GOPATH. See 'PACKAGERS.md'. Don't rely on
|
||||||
|
|
Loading…
Reference in New Issue
Block a user