systemd: do not let do_fetch depend on PACKAGECONFIG
PATCH 1/2 systemd: do not let do_fetch depend on PACKAGECONFIG
From: Chen Qi <[email protected]>
It's unnecessary to make SRC_URI contains something like:
${@bb.utils.contains('PACKAGECONFIG', 'xxx', 'file://xxx', '', d)} This does not give us any benefit and it makes do_fetch depend on PACKAGECONFIG, which means changing of PACKAGECONFIG will result in rerunn of do_fetch.
Besides, the related codes in do_install already does the necessary checks.
--- meta/recipes-core/systemd/systemd_258.1.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-core/systemd/systemd_258.1.bb +2 -2
@@ -21,8 +21,8 @@ REQUIRED_DISTRO_FEATURES += "systemd" SRC_URI += " \ file://touchscreen.rules \ file://00-create-volatile.conf \ - ${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', 'file://org.freedesktop.hostname1_no_polkit.conf', '', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', 'file://00-hostnamed-network-user.conf', '', d)} \ + file://org.freedesktop.hostname1_no_polkit.conf \ + file://00-hostnamed-network-user.conf \ file://init \ file://99-default.preset \ file://systemd-pager.sh \
Signature · 1 line
2.34.1
PATCH 2/2 systemd: add shell-profile-dropins PACKAGECONFIG
From: Chen Qi <[email protected]>
New version of systemd introduces dropins in /etc/profile.d. This is usually OK for most cases. But in case of using minicom to connect to the machine, there will be unnecessary output every time you type a command.
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.
So add a new PACKAGECONFIG, shell-profile-dropins, to allow users a choice to disable such behavior.
[1] https://github.com/systemd/systemd/commit/dadbb34919abd3fefeb5b8ccc9794da9398a2503
[2] https://uapi-group.org/specifications/specs/osc_context/
--- meta/recipes-core/systemd/systemd_258.1.bb | 2 ++ 1 file changed, 2 insertions(+)
meta/recipes-core/systemd/systemd_258.1.bb +2 -0
@@ -84,6 +84,7 @@ PACKAGECONFIG ??= " \ resolved \ serial-getty-generator \ set-time-epoch \ + shell-profile-dropins \ sysusers \ timedated \ timesyncd \
@@ -197,6 +198,7 @@ PACKAGECONFIG[resolved] = "-Dresolve=true,-Dresolve=false" PACKAGECONFIG[rfkill] = "-Drfkill=true,-Drfkill=false" PACKAGECONFIG[seccomp] = "-Dseccomp=enabled,-Dseccomp=disabled,libseccomp" PACKAGECONFIG[selinux] = "-Dselinux=enabled,-Dselinux=disabled,libselinux,initscripts-sushell" +PACKAGECONFIG[shell-profile-dropins] = ",-Dshellprofiledir=no" PACKAGECONFIG[smack] = "-Dsmack=true,-Dsmack=false" PACKAGECONFIG[sysext] = "-Dsysext=true, -Dsysext=false" PACKAGECONFIG[sysusers] = "-Dsysusers=true,-Dsysusers=false"
Signature · 1 line
2.34.1
Re: [OE-core][PATCH 2/2] systemd: add shell-profile-dropins PACKAGECONFIG
Quoted 12 lines · Chen Qi via lists.openembedded.org
From: Chen Qi <[email protected]>
New version of systemd introduces dropins in
/etc/profile.d. This is usually OK for most cases. But in case of using minicom to connect to the machine, there will be unnecessary output every time you type a command.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.
Quoted 7 lines
So add a new PACKAGECONFIG, shell-profile-dropins, to allow users a choice to disable such behavior.
[1] https://github.com/systemd/systemd/commit/dadbb34919abd3fefeb5b8ccc9794da9398a2503
[2] https://uapi-group.org/specifications/specs/osc_context/Signed-off-by Chen Qi <[email protected]>
Qi,
There may be other files in profile.d as well as 80-systemd-osc-context.sh. In systemd 258.x, I also see 70-systemd-shell-extra.sh. I don't think we should offer the option of disabling install of all systemd profile.d files in order to fix incompatibility with just one of them.
There have been changes to 80-systemd-osc-context.sh in systemd 259. We could try backporting 705e2ef19418 ("profile/osc-context: move and extend check for TERM=dumb") if we're not ready to update to 259 yet and see if that resolves the issue. We may also need dd20ba74e3b4 ("profile/systemd-osc-context: fix overriding of PROMPT_COMMAND") and 97ad10c9aab1 ("profile: skip setting PS0 when PROMPT_COMMAND= is cleared"), I'm not sure.
Best regards,
Signature · 1 line
Paul Barker
Re: [OE-core][PATCH 2/2] systemd: add shell-profile-dropins PACKAGECONFIG
Quoted 37 lines · Paul Barker
Quoted 12 lines · Chen Qi via lists.openembedded.org
From: Chen Qi <[email protected]>
New version of systemd introduces dropins in
/etc/profile.d. This is usually OK for most cases. But in case of using minicom to connect to the machine, there will be unnecessary output every time you type a command.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.
Quoted 7 lines
So add a new PACKAGECONFIG, shell-profile-dropins, to allow users a choice to disable such behavior.
[1] https://github.com/systemd/systemd/commit/dadbb34919abd3fefeb5b8ccc9794da9398a2503
[2] https://uapi-group.org/specifications/specs/osc_context/Signed-off-by Chen Qi <[email protected]>Qi,
There may be other files in profile.d as well as
80-systemd-osc-context.sh. In systemd 258.x, I also see70-systemd-shell-extra.sh. I don't think we should offer the option of disabling install of all systemd profile.d files in order to fix incompatibility with just one of them.There have been changes to
80-systemd-osc-context.shin systemd 259. We could try backporting705e2ef19418("profile/osc-context: move and extend check for TERM=dumb") if we're not ready to update to 259 yet and see if that resolves the issue. We may also needdd20ba74e3b4("profile/systemd-osc-context: fix overriding ofPROMPT_COMMAND") and97ad10c9aab1("profile: skip setting PS0 when PROMPT_COMMAND= is cleared"), I'm not sure.
Quoted 2 lines
Best regards, i
Hi Paul,
Thanks for checking upstream status.
I think you're right. The commits you mentioned above are likely to fix the issue.
I'll double check when upgrading systemd to 259.x.
Regards,
Qi
Re: [PATCH 2/2] systemd: add shell-profile-dropins PACKAGECONFIG
I just tested current master which is on systemd 259.5. It includes the mentioned commits, however OSC injections still occur. Was there any particular config in mind that would disable them?
Thanks,
Martin
Re: [OE-core][PATCH 2/2] systemd: add shell-profile-dropins PACKAGECONFIG
In reply to [email protected]Quoted 2 lines · Chen Qi via lists.openembedded.org
+PACKAGECONFIG[shell-profile-dropins] = ",-Dshellprofiledir=no”
On top of what Paul said, we always want to be specific and not make assumptions when enabling/disabling PACKAGECONFIGS, so the “enabled” case should have been -Dshellprofiledir=${sysconfigdir}/profile.d.
Ross
RE: [OE-core][PATCH 2/2] systemd: add shell-profile-dropins PACKAGECONFIG
Hi Ross,
Thanks for the review. I'll fix this and send out V2.
By the way, I didn't receive Paul's reply. If there's some other concern, please let me know.
Regards,
Qi
-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Ross Burton via lists.openembedded.org
Sent: Monday, January 26, 2026 8:54 PM
To: Chen, Qi <[email protected]>
Cc: [email protected]
Subject: Re: [OE-core][PATCH 2/2] systemd: add shell-profile-dropins PACKAGECONFIG
Quoted 2 lines · Chen Qi via lists.openembedded.org
+PACKAGECONFIG[shell-profile-dropins] = ",-Dshellprofiledir=no”
On top of what Paul said, we always want to be specific and not make assumptions when enabling/disabling PACKAGECONFIGS, so the “enabled” case should have been -Dshellprofiledir=${sysconfigdir}/profile.d.
Ross