Skip to contentSkip to conversation

Fix some configuration options for systemd

PATCH Superseded [email protected] 2 participants 4 messages Jun 8, 2023

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

cover Fix some configuration options for systemd

From: Randolph Sapp <[email protected]>

Fixing up some systemd stuff. Using the auto getty generator built into systemd instead of the external oe-core getty service.

Also drop the incorrect useradd entries in the systemd append.

This should be all that's required to squelch the endless serial getty start/stop logs for systemd. There's probably some work required for sysvinit as well. Should just be setting SERIAL_CONSOLES_CHECK = $SERIAL_CONSOLES or something along those lines.

Still not sure how I feel about having "incorrect" serial console definitions in a bsp layer but if we don't define it at all then oe-core will just blindly assume we wanted a console on ttyS0. That's especially problematic for the init systems unable to generate getty scripts automatically. SERIAL_CONSOLES_CHECK at least fixes the sysvinit behavior.

Randolph Sapp (2):
systemd: drop the useradd params arago.conf: add serial-getty-generator to systemd

 meta-arago-distro/conf/distro/arago.conf                  | 1 +
 meta-arago-distro/recipes-core/systemd/systemd_%.bbappend | 2 --
 2 files changed, 1 insertion(+), 2 deletions(-)
Signature · 1 line
2.41.0
#1 lore raw

PATCH 1/2 systemd: drop the useradd params

From: Randolph Sapp <[email protected]>

These were incorrect and OE-Core has been carrying the equivalent patch since 42344347be2.

---
 meta-arago-distro/recipes-core/systemd/systemd_%.bbappend | 2 --
 1 file changed, 2 deletions(-)
meta-arago-distro/recipes-core/systemd/systemd_%.bbappend +0 -2
index 9e49ac69..a38ca124 100644
@@ -3,8 +3,6 @@ PR:append = ".arago6"
 FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
 
 PACKAGECONFIG:append = " networkd resolved"
-USERADD_PARAM:${PN} += "--system -d / -M --shell /bin/nologin systemd-network;"
-USERADD_PARAM:${PN} += "--system -d / -M --shell /bin/nologin systemd-resolve;"
 
 SRC_URI:append = " \
     file://local.rules \
Signature · 1 line
2.41.0
#2 lore raw

Re: [meta-arago][master/kirkstone][PATCH 1/2] systemd: drop the useradd params

Quoted 4 lines · Randolph Sapp via lists.yoctoproject.org

From: Randolph Sapp <[email protected]>

These were incorrect and OE-Core has been carrying the equivalent patch since 42344347be2.

Well, I agree with the code change - these are now redundant.

But the message is not right - these were perfectly correct at the time (later those were changed from /bin/nologin to /sbin/nologin upstream) and the commit referred dealt with override syntax change, the actual addition of useradd lines per PACKAGECONFIG happened a bit earlier...

Also, since you are removing networkd and resolved specific changes, can you move appending these PACKAGECONFIGs to arago.conf, like you do in patch #2?

Quoted 20 lines
---
 meta-arago-distro/recipes-core/systemd/systemd_%.bbappend | 2 --
 1 file changed, 2 deletions(-)
meta-arago-distro/recipes-core/systemd/systemd_%.bbappend +0 -2
index 9e49ac69..a38ca124 100644
@@ -3,8 +3,6 @@ PR:append = ".arago6"
 FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
 
 PACKAGECONFIG:append = " networkd resolved"
-USERADD_PARAM:${PN} += "--system -d / -M --shell /bin/nologin systemd-network;"
-USERADD_PARAM:${PN} += "--system -d / -M --shell /bin/nologin systemd-resolve;"
 
 SRC_URI:append = " \
     file://local.rules \
Signature · 1 line
2.41.0
#3 lore raw

PATCH 2/2 arago.conf: add serial-getty-generator to systemd

In reply to [email protected]

From: Randolph Sapp <[email protected]>

Use systemd's built-in getty generator instead of the OE-Core variant.

---
 meta-arago-distro/conf/distro/arago.conf | 1 +
 1 file changed, 1 insertion(+)
meta-arago-distro/conf/distro/arago.conf +1 -0
index 03272511..63a2281e 100644
@@ -70,6 +70,7 @@ DISTRO_FEATURES:remove = "${@ '' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT'))
 
 # Distro-specific package configuration
 PACKAGECONFIG:append:pn-systemd = " coredump"
+PACKAGECONFIG:append:pn-systemd = " serial-getty-generator"
 
 # Configure Qt5 flags (GLES is still required for qtdeclarative and qtwebkit)
 PACKAGECONFIG_GL:pn-qtbase = "gles2 linuxfb"
Signature · 1 line
2.41.0