Skip to contentSkip to conversation

init-manager-none.inc: have no init manager

PATCH In review [email protected] 3 participants 4 messages Apr 28, 2023 – May 2, 2023 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 init-manager-none.inc: have no init manager

From: Michael Opdenacker <[email protected]>

This fixes the issue that setting INIT_MANAGER to "none" produces a system with sysvinit.

As the name suggests, this produces a system without an init manager (no systemd, no sysvinit, no BusyBox init, no /etc/inittab). There isn't any login manager either. The kernel just starts /bin/sh in the console.

---
 meta/conf/distro/include/init-manager-none.inc | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
meta/conf/distro/include/init-manager-none.inc +4 -3
index bbedf898f7..56d2b0f406 100644
@@ -1,3 +1,4 @@
-VIRTUAL-RUNTIME_init_manager ??= "sysvinit"
-VIRTUAL-RUNTIME_initscripts ??= "initscripts"
-VIRTUAL-RUNTIME_login_manager ??= "busybox"
+DISTRO_FEATURES_BACKFILL_CONSIDERED:append = " systemd sysvinit"
+VIRTUAL-RUNTIME_init_manager ??= ""
+VIRTUAL-RUNTIME_initscripts ??= ""
+VIRTUAL-RUNTIME_login_manager ??= ""
Signature · 1 line
2.34.1
#2 lore raw

Hello,

This causes the following error:

https://autobuilder.yoctoproject.org/typhoon/#/builders/47/builds/7035/steps/12/logs/stdio

This is the expected behaviour of the patch but doesn't fit with what this particular build (qemuarm-oecore) is testing as we can't run testimage without an init. I'm wondering what should be the proper course of action here.

Quoted 40 lines · Michael Opdenacker via lists.openembedded.org

From: Michael Opdenacker <[email protected]>

This fixes the issue that setting INIT_MANAGER to "none" produces a system with sysvinit.

As the name suggests, this produces a system without an init manager (no systemd, no sysvinit, no BusyBox init, no /etc/inittab). There isn't any login manager either. The kernel just starts /bin/sh in the console.

---
 meta/conf/distro/include/init-manager-none.inc | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
meta/conf/distro/include/init-manager-none.inc +4 -3
index bbedf898f7..56d2b0f406 100644
@@ -1,3 +1,4 @@
-VIRTUAL-RUNTIME_init_manager ??= "sysvinit"
-VIRTUAL-RUNTIME_initscripts ??= "initscripts"
-VIRTUAL-RUNTIME_login_manager ??= "busybox"
+DISTRO_FEATURES_BACKFILL_CONSIDERED:append = " systemd sysvinit"
+VIRTUAL-RUNTIME_init_manager ??= ""
+VIRTUAL-RUNTIME_initscripts ??= ""
+VIRTUAL-RUNTIME_login_manager ??= ""
Signature · 11 lines
2.34.1



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180524): https://lists.openembedded.org/g/openembedded-core/message/180524
Mute This Topic: https://lists.openembedded.org/mt/98554799/3617179
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw

Hi Alex,

Quoted 10 lines · Alexandre Belloni

Hello,

This causes the following error:

https://autobuilder.yoctoproject.org/typhoon/#/builders/47/builds/7035/steps/12/logs/stdio

This is the expected behaviour of the patch but doesn't fit with what this particular build (qemuarm-oecore) is testing as we can't run testimage without an init. I'm wondering what should be the proper course of action here.

Thanks for the report!
Maybe another option is to remove the "none" option, as someone also suggested, as it is currently identical to the "sysvinit" option.

Any further thoughts?
Thanks again
Michael.

Signature · 3 lines
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#4 lore raw
In reply to Alexandre Belloni
Quoted 11 lines · Alexandre Belloni via lists.yoctoproject.org

Hello,

This causes the following error:

https://autobuilder.yoctoproject.org/typhoon/#/builders/47/builds/7035/steps/12/logs/stdio

This is the expected behaviour of the patch but doesn't fit with what this particular build (qemuarm-oecore) is testing as we can't run testimage without an init. I'm wondering what should be the proper course of action here.

INIT_MANAGER didn't used to be a variable and therefore could in theory be unset. The "none" configuration was designed to cause the system to fall back to the original behaviour. OE-Core's "nodistro" uses the fallback.

We could decide just to require this variable to be set to something but this could potentially conflict with people setting up their init system "manually" within their own distro.

It is a bit tricky to know what to do in situations like these. INIT_MANAGER was added to try and help people avoid needing to repeat certain config fragments.

Cheers,

Richard