From: Royyan Zahir <royzah@gmail.com>
To: meta-virtualization@lists.yoctoproject.org
Cc: Bruce Ashfield <bruce.ashfield@gmail.com>
Subject: [meta-virtualization][PATCH v2] crun: honour CRUN_AS_RUNC
Date: Sat, 19 Sep 2026 22:39:56 +0400 [thread overview]
Message-ID: <20260919183956.1795771-1-royzah@gmail.com> (raw)
In-Reply-To: <20260919173559.1598000-1-royzah@gmail.com>
CRUN_AS_RUNC = "false" installs the /usr/bin/runc symlink anyway. Both
guards read the string as true: the shell one because -n tests for a
non-empty string, the python one because a non-empty str is truthy. The
only way to disable the symlink today is to set the variable empty.
Normalize once with bb.utils.to_boolean() and use that in both places.
to_boolean() rejects values outside y/yes/1/true and n/no/0/false, so a
config setting CRUN_AS_RUNC to anything else now fails to parse instead
of silently enabling the symlink.
Signed-off-by: Royyan Zahir <royzah@gmail.com>
---
v2: drop the RPROVIDES virtual-runc hunk and the RCONFLICTS comment
rewording, per Bruce.
recipes-containers/crun/crun_git.bb | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/recipes-containers/crun/crun_git.bb b/recipes-containers/crun/crun_git.bb
index 288c953..97c6603 100644
--- a/recipes-containers/crun/crun_git.bb
+++ b/recipes-containers/crun/crun_git.bb
@@ -31,6 +31,10 @@ CLEANBROKEN = "1"
# with container stacks
CRUN_AS_RUNC ?= "true"
+# Normalized once: a bare "false" is a non-empty string and would otherwise
+# read as true in both the shell test and the python expansion below.
+CRUN_AS_RUNC_ENABLED = "${@'1' if bb.utils.to_boolean(d.getVar('CRUN_AS_RUNC')) else ''}"
+
PACKAGECONFIG ??= " \
caps external-yajl man \
${@bb.utils.contains('DISTRO_FEATURES', 'seccomp', 'seccomp', '', d)} \
@@ -56,13 +60,13 @@ do_configure:prepend () {
do_install() {
oe_runmake 'DESTDIR=${D}' install
- if [ -n "${CRUN_AS_RUNC}" ]; then
+ if [ -n "${CRUN_AS_RUNC_ENABLED}" ]; then
ln -sr "${D}/${bindir}/crun" "${D}${bindir}/runc"
fi
}
# When crun provides /usr/bin/runc symlink, it conflicts with the runc package
-RCONFLICTS:${PN} = "${@'runc' if d.getVar('CRUN_AS_RUNC') else ''}"
+RCONFLICTS:${PN} = "${@'runc' if d.getVar('CRUN_AS_RUNC_ENABLED') else ''}"
REQUIRED_DISTRO_FEATURES:class-native ?= ""
DEPENDS:class-native += "yajl libcap go-md2man m4 libseccomp"
--
2.55.0
next parent reply other threads:[~2026-09-19 18:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260919173559.1598000-1-royzah@gmail.com>
2026-09-19 18:39 ` Royyan Zahir [this message]
2026-09-23 16:10 ` [meta-virtualization][PATCH v2] crun: honour CRUN_AS_RUNC Bruce Ashfield
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260919183956.1795771-1-royzah@gmail.com \
--to=royzah@gmail.com \
--cc=bruce.ashfield@gmail.com \
--cc=meta-virtualization@lists.yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.