summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Sieron <michalwsieron@gmail.com>2024-09-23 17:53:17 +0200
committerBruce Ashfield <bruce.ashfield@gmail.com>2024-10-03 01:28:52 +0000
commit75b6a5cf6196e745b7446e0c54a435b3bc82700c (patch)
tree1bfb7496648275327f1ad6f595dd7e1bf07d7925
parent4d79636aacd8045ed5401f84e15424eddb6d6021 (diff)
downloadmeta-virtualization-75b6a5cf6196e745b7446e0c54a435b3bc82700c.tar.gz
crun: Add PACKAGECONFIG options
Neither systemd nor seccomp is hard required by crun. They can actually be disabled during configuration with --disable-systemd or --disable-seccomp. Introduce PACKAGECONFIG options for them and default them to presence of corresponding entries in DISTRO_FEATURES. Now REQUIRED_DISTRO_FEATURES and features_check can also be removed. Similarly dependency on libcap can be made optional. crun actually contains pregenerated manpages in the repository so dependency on go-md2man-native can be made optional as well. As there is a configuration option for embedding yajl I added an option for that as well. However, as PACKAGECONFIG can only specify dependencies when config is enabled I had to invert the options so the config is for external-yajl. I set default PACKAGECONFIG value to match previous state (except detecting if systemd and seccomp are in DISTRO_FEATURES). Signed-off-by: Michal Sieron <michalwsieron@gmail.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r--recipes-containers/crun/crun_git.bb26
1 files changed, 16 insertions, 10 deletions
diff --git a/recipes-containers/crun/crun_git.bb b/recipes-containers/crun/crun_git.bb
index 2b74264a..4d03017c 100644
--- a/recipes-containers/crun/crun_git.bb
+++ b/recipes-containers/crun/crun_git.bb
@@ -20,16 +20,22 @@ SRC_URI = "git://github.com/containers/crun.git;branch=main;name=crun;protocol=h
20PV = "v1.15+git${SRCREV_crun}" 20PV = "v1.15+git${SRCREV_crun}"
21S = "${WORKDIR}/git" 21S = "${WORKDIR}/git"
22 22
23REQUIRED_DISTRO_FEATURES ?= "systemd seccomp" 23inherit autotools-brokensep pkgconfig
24 24
25inherit autotools-brokensep pkgconfig features_check 25PACKAGECONFIG ??= " \
26 26 caps external-yajl man \
27PACKAGECONFIG ??= "" 27 ${@bb.utils.contains('DISTRO_FEATURES', 'seccomp', 'seccomp', '', d)} \
28 28 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
29DEPENDS = "yajl libcap go-md2man-native m4-native" 29"
30# TODO: is there a packageconfig to turn this off ? 30
31DEPENDS += "libseccomp" 31PACKAGECONFIG[caps] = "--enable-caps,--disable-caps,libcap"
32DEPENDS += "systemd" 32PACKAGECONFIG[external-yajl] = "--disable-embedded-yajl,--enable-embedded-yajl,yajl"
33# whether to regenerate manpages that are already present in the repo
34PACKAGECONFIG[man] = ",,go-md2man-native"
35PACKAGECONFIG[seccomp] = "--enable-seccomp,--disable-seccomp,libseccomp"
36PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd"
37
38DEPENDS = "m4-native"
33DEPENDS:append:libc-musl = " argp-standalone" 39DEPENDS:append:libc-musl = " argp-standalone"
34 40
35do_configure:prepend () { 41do_configure:prepend () {