| Message ID | 20260115021918.1926514-2-Qi.Chen@windriver.com |
|---|---|
| State | New |
| Headers | show |
| Series | [1/2] systemd: do not let do_fetch depend on PACKAGECONFIG | expand |
On Thu, 2026-01-15 at 10:19 +0800, Chen Qi via lists.openembedded.org wrote: > From: Chen Qi <Qi.Chen@windriver.com> > > 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/ > > Signed-off-by: Chen Qi <Qi.Chen@windriver.com> 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,
On 15 Jan 2026, at 02:19, Chen Qi via lists.openembedded.org <Qi.Chen=windriver.com@lists.openembedded.org> wrote: > > +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
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: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> On Behalf Of Ross Burton via lists.openembedded.org Sent: Monday, January 26, 2026 8:54 PM To: Chen, Qi <Qi.Chen@windriver.com> Cc: openembedded-core@lists.openembedded.org Subject: Re: [OE-core][PATCH 2/2] systemd: add shell-profile-dropins PACKAGECONFIG On 15 Jan 2026, at 02:19, Chen Qi via lists.openembedded.org <Qi.Chen=windriver.com@lists.openembedded.org> wrote: > > +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
On 1/23/26 21:06, Paul Barker wrote: > On Thu, 2026-01-15 at 10:19 +0800, Chen Qi via lists.openembedded.org > wrote: >> From: Chen Qi <Qi.Chen@windriver.com> >> >> 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/ >> >> Signed-off-by: Chen Qi <Qi.Chen@windriver.com> > 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, 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
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
diff --git a/meta/recipes-core/systemd/systemd_258.1.bb b/meta/recipes-core/systemd/systemd_258.1.bb index 41f1e756cb..7c6f6c65dd 100644 --- a/meta/recipes-core/systemd/systemd_258.1.bb +++ b/meta/recipes-core/systemd/systemd_258.1.bb @@ -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"