Skip to contentSkip to conversation

systemd: remove 'serial-getty-generator' PACKAGECONFIG

PATCH In review [email protected] 2 participants 3 messages Jul 16, 2025 – Jul 22, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 systemd: remove 'serial-getty-generator' PACKAGECONFIG

From: Chen Qi <[email protected]>

This PACKAGECONFIG's net effect is to delete systemd-getty-generator when not enabled. But deleting systemd-getty-generator really does not have any benefit. Here are the reasons:
1) The units installed by systemd-serialgetty.bb have higher priority than the generated one. Because .../generator/ directory has lower priority than the system admin directory /etc. See [2] for more details.
2) The generator could be disabled via kernel command line "systemd.getty_auto=". See [1] for more details.

[1] https://www.freedesktop.org/software/systemd/man/latest/systemd-getty-generator.html
[2] https://www.freedesktop.org/software/systemd/man/latest/systemd.generator.html#

---
 meta/recipes-core/systemd/systemd_257.6.bb | 12 ------------
 1 file changed, 12 deletions(-)
meta/recipes-core/systemd/systemd_257.6.bb +0 -12
index 9092d02c51..f1064f07c5 100644
@@ -92,7 +92,6 @@ PACKAGECONFIG ??= " \
     quotacheck \
     randomseed \
     resolved \
-    serial-getty-generator \
     set-time-epoch \
     sysusers \
     timedated \
@@ -125,11 +124,6 @@ TARGET_CC_ARCH:append:libc-musl = " -D__UAPI_DEF_ETHHDR=0 -D_LARGEFILE64_SOURCE"
 # Some of the dependencies are weak-style recommends - if not available at runtime,
 # systemd won't fail but the library-related feature will be skipped with a warning.
 
-# Use the upstream systemd [email protected] and rely on
-# systemd-getty-generator instead of using the OE-core specific
-# systemd-serialgetty.bb - not enabled by default.
-PACKAGECONFIG[serial-getty-generator] = ""
-
 PACKAGECONFIG[acl] = "-Dacl=enabled,-Dacl=disabled,acl"
 PACKAGECONFIG[audit] = "-Daudit=enabled,-Daudit=disabled,audit"
 PACKAGECONFIG[apparmor] = "-Dapparmor=enabled,-Dapparmor=disabled,apparmor"
@@ -290,12 +284,6 @@ do_install() {
 	fi
 	install -d ${D}/${base_sbindir}
 
-	if ! ${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', 'true', 'false', d)}; then
-		# Remove the serial-getty generator and instead use explicit services
-		# created by the systemd-serialgetty recipe
-		find ${D} -name \*getty-generator\* -delete
-	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
Signature · 1 line
2.49.0
#1 lore raw

Hi Chen,

Quoted 8 lines · Chen Qi via lists.openembedded.org

This PACKAGECONFIG's net effect is to delete systemd-getty-generator when not enabled. But deleting systemd-getty-generator really does not have any benefit. Here are the reasons:
1) The units installed by systemd-serialgetty.bb have higher priority than the generated one. Because .../generator/ directory has lower priority than the system admin directory /etc. See [2] for more details.
2) The generator could be disabled via kernel command line "systemd.getty_auto=". See [1] for more details.

You left out the “why”, and after all of the drama around getty units last release I’m very cautious about changes here.

I think I prefer having an explicit “the getty generator is not installed” over the user having to configure kernel command line arguments to not disable the generator.

Ross

author
#2 lore raw

I just don't think anyone will ever disable this PACKAGECONFIG. Because disabling it does not have any benefit. So I sent out patch to clean things up.

But if you think disabling it has some benefit, let's keep it. I'm OK with it.

Regards,
Qi

-----Original Message-----
From: Ross Burton <[email protected]>
Sent: Monday, July 21, 2025 9:32 PM
To: Chen, Qi <[email protected]>
Cc: [email protected]
Subject: Re: [OE-core][PATCH] systemd: remove 'serial-getty-generator' PACKAGECONFIG

Hi Chen,

Quoted 8 lines · Chen Qi via lists.openembedded.org

This PACKAGECONFIG's net effect is to delete systemd-getty-generator when not enabled. But deleting systemd-getty-generator really does not have any benefit. Here are the reasons:
1) The units installed by systemd-serialgetty.bb have higher priority than the generated one. Because .../generator/ directory has lower priority than the system admin directory /etc. See [2] for more details.
2) The generator could be disabled via kernel command line "systemd.getty_auto=". See [1] for more details.

You left out the “why”, and after all of the drama around getty units last release I’m very cautious about changes here.

I think I prefer having an explicit “the getty generator is not installed” over the user having to configure kernel command line arguments to not disable the generator.

Ross