From: Qi.Chen@windriver.com
To: openembedded-core@lists.openembedded.org
Cc: paul@pbarker.dev, mns@gomspace.com
Subject: [OE-core][PATCH] systemd: add osc-context PACKAGECONFIG
Date: Wed, 15 Apr 2026 16:29:49 +0800 [thread overview]
Message-ID: <20260415082949.3446677-1-Qi.Chen@windriver.com> (raw)
From: Chen Qi <Qi.Chen@windriver.com>
Add a new PACKAGECONFIG to give users the choice of whether to
have /etc/profile.d/80-systemd-osc-context.sh file or not.
This is because the /etc/profile.d/80-systemd-osc-context.sh[1] is setting
PS0 with OSC 3008 standard[2]. If a terminal (e.g., minicom) cannot
deal with this OSC 3008 standard, it will just output the whole contents.
This is quite annoying. See example output below:
3008;start=9c578e41-1a0f-4b47-9a87-ab22adebe376;machineid=cc467af9bedc4d98a437e5d744928301;...
Below are steps of how to reproduce the issue with qemu:
1. IMAGE_INSTALL:append = " bash"
2. bitbake core-image-minimal
3. runqemu snapshot kvm nographic qemuparams="-serial pty"
4. minicom -D /dev/pts/X -b 115200 (/dev/pts/X is the one printed in the step 3)
5. [In minicom] type any command or just type "Enter" key
A new PR is also created for systemd upstream:
https://github.com/systemd/systemd/pull/41647
If systemd accepts the PR, we can then use the new option. Otherwise, we'll need
to keep the way it is now.
[1] https://github.com/systemd/systemd/commit/dadbb34919abd3fefeb5b8ccc9794da9398a2503
[2] https://uapi-group.org/specifications/specs/osc_context/
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
meta/recipes-core/systemd/systemd_259.5.bb | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/meta/recipes-core/systemd/systemd_259.5.bb b/meta/recipes-core/systemd/systemd_259.5.bb
index 6987d4ad54..7a2f7832d5 100644
--- a/meta/recipes-core/systemd/systemd_259.5.bb
+++ b/meta/recipes-core/systemd/systemd_259.5.bb
@@ -67,6 +67,7 @@ PACKAGECONFIG ??= " \
nss \
nss-mymachines \
nss-resolve \
+ osc-context \
quotacheck \
randomseed \
resolved \
@@ -161,6 +162,7 @@ PACKAGECONFIG[no-ntp-fallback] = "-Dntp-servers="
PACKAGECONFIG[nss] = "-Dnss-systemd=true,-Dnss-systemd=false,,libnss-systemd"
PACKAGECONFIG[nss-mymachines] = "-Dnss-mymachines=enabled,-Dnss-mymachines=disabled"
PACKAGECONFIG[nss-resolve] = "-Dnss-resolve=enabled,-Dnss-resolve=disabled,,libnss-resolve"
+PACKAGECONFIG[osc-context] = ",,,"
PACKAGECONFIG[oomd] = "-Doomd=true,-Doomd=false"
PACKAGECONFIG[openssl] = "-Dopenssl=enabled,-Dopenssl=disabled,openssl"
PACKAGECONFIG[p11kit] = "-Dp11kit=enabled,-Dp11kit=disabled,p11-kit"
@@ -273,6 +275,13 @@ do_install() {
find ${D} -name \*getty-generator\* -delete
fi
+ if ! ${@bb.utils.contains('PACKAGECONFIG', 'osc-context', 'true', 'false', d)}; then
+ # Ensure there's no /etc/profile.d/80-systemd-osc-context.sh.
+ # Some programs such as minicom does not support this OSC 3008 standard.
+ rm -f ${D}${sysconfdir}/profile.d/80-systemd-osc-context.sh
+ rm -f ${D}${nonarch_libdir}/tmpfiles.d/20-systemd-osc-context.conf
+ fi
+
# Provide support for initramfs
[ ! -e ${D}/init ] && ln -s ${nonarch_libdir}/systemd/systemd ${D}/init
[ ! -e ${D}/${base_sbindir}/udevd ] && ln -s ${nonarch_libdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd
--
2.34.1
next reply other threads:[~2026-04-15 8:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-15 8:29 Qi.Chen [this message]
2026-04-15 9:35 ` [OE-core][PATCH] systemd: add osc-context PACKAGECONFIG Paul Barker
2026-04-16 3:41 ` Chen, Qi
2026-04-22 9:43 ` Paul Barker
2026-04-24 5:05 ` [PATCH] " Martin Siegumfeldt
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=20260415082949.3446677-1-Qi.Chen@windriver.com \
--to=qi.chen@windriver.com \
--cc=mns@gomspace.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=paul@pbarker.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox