diff options
author | Michal Sieron <michalwsieron@gmail.com> | 2024-09-23 17:53:17 +0200 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2024-10-03 01:28:52 +0000 |
commit | 75b6a5cf6196e745b7446e0c54a435b3bc82700c (patch) | |
tree | 1bfb7496648275327f1ad6f595dd7e1bf07d7925 | |
parent | 4d79636aacd8045ed5401f84e15424eddb6d6021 (diff) | |
download | meta-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.bb | 26 |
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 | |||
20 | PV = "v1.15+git${SRCREV_crun}" | 20 | PV = "v1.15+git${SRCREV_crun}" |
21 | S = "${WORKDIR}/git" | 21 | S = "${WORKDIR}/git" |
22 | 22 | ||
23 | REQUIRED_DISTRO_FEATURES ?= "systemd seccomp" | 23 | inherit autotools-brokensep pkgconfig |
24 | 24 | ||
25 | inherit autotools-brokensep pkgconfig features_check | 25 | PACKAGECONFIG ??= " \ |
26 | 26 | caps external-yajl man \ | |
27 | PACKAGECONFIG ??= "" | 27 | ${@bb.utils.contains('DISTRO_FEATURES', 'seccomp', 'seccomp', '', d)} \ |
28 | 28 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \ | |
29 | DEPENDS = "yajl libcap go-md2man-native m4-native" | 29 | " |
30 | # TODO: is there a packageconfig to turn this off ? | 30 | |
31 | DEPENDS += "libseccomp" | 31 | PACKAGECONFIG[caps] = "--enable-caps,--disable-caps,libcap" |
32 | DEPENDS += "systemd" | 32 | PACKAGECONFIG[external-yajl] = "--disable-embedded-yajl,--enable-embedded-yajl,yajl" |
33 | # whether to regenerate manpages that are already present in the repo | ||
34 | PACKAGECONFIG[man] = ",,go-md2man-native" | ||
35 | PACKAGECONFIG[seccomp] = "--enable-seccomp,--disable-seccomp,libseccomp" | ||
36 | PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd" | ||
37 | |||
38 | DEPENDS = "m4-native" | ||
33 | DEPENDS:append:libc-musl = " argp-standalone" | 39 | DEPENDS:append:libc-musl = " argp-standalone" |
34 | 40 | ||
35 | do_configure:prepend () { | 41 | do_configure:prepend () { |