Skip to contentSkip to conversation

init-manager: define dev_manager for all init managers

PATCH Superseded Peter Marko 3 participants 10 messages Nov 25, 2024 – Nov 27, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 init-manager: define dev_manager for all init managers

From: Peter Marko <[email protected]>

Currently VIRTUAL-RUNTIME_dev_manager is defined by some init managers with "??=" and in packagegroup-core-boot with "?=".
This means that this variable is different in this package group and in all other the recipes.
This was discovered when trying to use new feature INIT_MANAGER when migrating to scarthgap and using systemd distro. After deleting all VIRTUAL_RUNTIME providers define in init-manager-systemd udev was installed additionally via packagegroup-core-boot.

Hiaving a distro settings overriden in single recipe is wrong and needs to be corrected. Therefore let's define the setting in all init managers and remove it from packagegroup-core-boot.

core-image-tiny-initramfs has a dilemma - use busybox-mdev even if distro does not enable it in busybox recipe to keep the image tiny, or rather not install it even if distro enables it in busybox. This patch chooses the first option.

---
 meta/conf/distro/include/init-manager-none.inc            | 1 +
 meta/conf/distro/include/init-manager-sysvinit.inc        | 1 +
 meta/recipes-core/images/core-image-tiny-initramfs.bb     | 3 +++
 meta/recipes-core/packagegroups/packagegroup-core-boot.bb | 1 -
 4 files changed, 5 insertions(+), 1 deletion(-)
meta/conf/distro/include/init-manager-none.inc +1 -0
index bbedf898f7..6ece5c9906 100644
@@ -1,3 +1,4 @@
 VIRTUAL-RUNTIME_init_manager ??= "sysvinit"
 VIRTUAL-RUNTIME_initscripts ??= "initscripts"
 VIRTUAL-RUNTIME_login_manager ??= "busybox"
+VIRTUAL-RUNTIME_dev_manager ??= "udev"
meta/conf/distro/include/init-manager-sysvinit.inc +1 -0
index aa2393944d..e2d17b358d 100644
@@ -4,3 +4,4 @@ DISTRO_FEATURES_BACKFILL_CONSIDERED:append = " systemd"
 VIRTUAL-RUNTIME_init_manager ??= "sysvinit"
 VIRTUAL-RUNTIME_initscripts ??= "initscripts"
 VIRTUAL-RUNTIME_login_manager ??= "busybox"
+VIRTUAL-RUNTIME_dev_manager ??= "udev"
meta/recipes-core/images/core-image-tiny-initramfs.bb +3 -0
index 7a71d55b1e..c2aa68c788 100644
@@ -6,6 +6,9 @@ first 'init' program more efficiently. core-image-tiny-initramfs doesn't \
 actually generate an image but rather generates boot and rootfs artifacts \
 that can subsequently be picked up by external image generation tools such as wic."
 
+# if distro does not override VIRTUAL-RUNTIME_dev_manager and default in different, busybox is compiled without mdev support
+# however this keeps the image small by not installing heavy-weight manager and in initramfs it may not even be necessary
+# override in distro if needed
 VIRTUAL-RUNTIME_dev_manager ?= "busybox-mdev"
 
 PACKAGE_INSTALL = "initramfs-live-boot-tiny packagegroup-core-boot dropbear ${VIRTUAL-RUNTIME_base-utils} ${VIRTUAL-RUNTIME_dev_manager} base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}"
meta/recipes-core/packagegroups/packagegroup-core-boot.bb +0 -1
index fecc3334ea..fa06092e27 100644
@@ -10,7 +10,6 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
 inherit packagegroup
 
 # Distro can override the following VIRTUAL-RUNTIME providers:
-VIRTUAL-RUNTIME_dev_manager ?= "udev"
 VIRTUAL-RUNTIME_keymaps ?= "keymaps"
 
 EFI_PROVIDER ??= "grub-efi"
Signature · 1 line
2.30.2
#1 lore raw

PATCH 2/2 init-manager: define VIRTUAL-RUNTIME_keymaps for all init managers

From: Peter Marko <[email protected]>

VIRTUAL-RUNTIME_keymaps is defined in some init managers and also in some package groups. Defining distro features in recipes is wrong. Define it in all init managers instead.

---
 meta/conf/distro/include/init-manager-none.inc            | 1 +
 meta/conf/distro/include/init-manager-systemd.inc         | 1 +
 meta/conf/distro/include/init-manager-sysvinit.inc        | 1 +
 meta/recipes-core/packagegroups/packagegroup-base.bb      | 3 ---
 meta/recipes-core/packagegroups/packagegroup-core-boot.bb | 3 ---
 5 files changed, 3 insertions(+), 6 deletions(-)
meta/conf/distro/include/init-manager-none.inc +1 -0
index 6ece5c9906..3972e6d8aa 100644
@@ -2,3 +2,4 @@ VIRTUAL-RUNTIME_init_manager ??= "sysvinit"
 VIRTUAL-RUNTIME_initscripts ??= "initscripts"
 VIRTUAL-RUNTIME_login_manager ??= "busybox"
 VIRTUAL-RUNTIME_dev_manager ??= "udev"
+VIRTUAL-RUNTIME_keymaps ?= "keymaps"
meta/conf/distro/include/init-manager-systemd.inc +1 -0
index 0a76647459..8132135c25 100644
@@ -5,5 +5,6 @@ VIRTUAL-RUNTIME_init_manager ??= "systemd"
 VIRTUAL-RUNTIME_initscripts ??= "systemd-compat-units"
 VIRTUAL-RUNTIME_login_manager ??= "shadow-base"
 VIRTUAL-RUNTIME_dev_manager ??= "systemd"
+VIRTUAL-RUNTIME_keymaps ?= "keymaps"
 # systemd hardcodes /root in its source codes, other values are not offically supported
 ROOT_HOME ?= "/root"
meta/conf/distro/include/init-manager-sysvinit.inc +1 -0
index e2d17b358d..cfb3438632 100644
@@ -5,3 +5,4 @@ VIRTUAL-RUNTIME_init_manager ??= "sysvinit"
 VIRTUAL-RUNTIME_initscripts ??= "initscripts"
 VIRTUAL-RUNTIME_login_manager ??= "busybox"
 VIRTUAL-RUNTIME_dev_manager ??= "udev"
+VIRTUAL-RUNTIME_keymaps ?= "keymaps"
meta/recipes-core/packagegroups/packagegroup-base.bb +0 -3
index 70a1035003..cb9d1f07af 100644
@@ -39,9 +39,6 @@ PACKAGES = ' \
             \
             '
 
-# Override by distro if needed
-VIRTUAL-RUNTIME_keymaps ?= "keymaps"
-
 #
 # packagegroup-base contain stuff needed for base system (machine related)
 #
meta/recipes-core/packagegroups/packagegroup-core-boot.bb +0 -3
index fa06092e27..5cdd161811 100644
@@ -9,9 +9,6 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 inherit packagegroup
 
-# Distro can override the following VIRTUAL-RUNTIME providers:
-VIRTUAL-RUNTIME_keymaps ?= "keymaps"
-
 EFI_PROVIDER ??= "grub-efi"
 
 SYSVINIT_SCRIPTS = "${@bb.utils.contains('MACHINE_FEATURES', 'rtc', '${VIRTUAL-RUNTIME_base-utils-hwclock}', '', d)} \
Signature · 1 line
2.30.2
#2 lore raw

RE: [OE-core][PATCH 2/2] init-manager: define VIRTUAL-RUNTIME_keymaps for all init managers

-----Original Message-----

Quoted 7 lines

From: [email protected] <[email protected]> On Behalf Of Peter Marko via lists.openembedded.org
Sent: den 25 november 2024 19:37
To: [email protected]
Cc: Peter Marko <[email protected]>
Subject: [OE-core][PATCH 2/2] init-manager: define VIRTUAL-RUNTIME_keymaps for all init managers

Quoted 5 lines

From: Peter Marko <[email protected]>

VIRTUAL-RUNTIME_keymaps is defined in some init managers and also in some package groups. Defining distro features in recipes is wrong. Define it in all init managers instead.

How is keymaps related to whichever init manager is used? Wouldn't it be better to remove it from init-manager-mdev-busybox.inc and rely on the defaults in the packagegroups that use ${VIRTUAL-RUNTIME_keymaps}?

//Peter

Quoted 77 lines
---
 meta/conf/distro/include/init-manager-none.inc            | 1 +
 meta/conf/distro/include/init-manager-systemd.inc         | 1 +
 meta/conf/distro/include/init-manager-sysvinit.inc        | 1 +
 meta/recipes-core/packagegroups/packagegroup-base.bb      | 3 ---
 meta/recipes-core/packagegroups/packagegroup-core-boot.bb | 3 ---
 5 files changed, 3 insertions(+), 6 deletions(-)
meta/conf/distro/include/init-manager-none.inc +1 -0
index 6ece5c9906..3972e6d8aa 100644
@@ -2,3 +2,4 @@ VIRTUAL-RUNTIME_init_manager ??= "sysvinit"
 VIRTUAL-RUNTIME_initscripts ??= "initscripts"
 VIRTUAL-RUNTIME_login_manager ??= "busybox"
 VIRTUAL-RUNTIME_dev_manager ??= "udev"
+VIRTUAL-RUNTIME_keymaps ?= "keymaps"
meta/conf/distro/include/init-manager-systemd.inc +1 -0
index 0a76647459..8132135c25 100644
@@ -5,5 +5,6 @@ VIRTUAL-RUNTIME_init_manager ??= "systemd"
 VIRTUAL-RUNTIME_initscripts ??= "systemd-compat-units"
 VIRTUAL-RUNTIME_login_manager ??= "shadow-base"
 VIRTUAL-RUNTIME_dev_manager ??= "systemd"
+VIRTUAL-RUNTIME_keymaps ?= "keymaps"
 # systemd hardcodes /root in its source codes, other values are not

offically supported
ROOT_HOME ?= "/root"

meta/conf/distro/include/init-manager-sysvinit.inc +1 -0
index e2d17b358d..cfb3438632 100644
@@ -5,3 +5,4 @@ VIRTUAL-RUNTIME_init_manager ??= "sysvinit"
 VIRTUAL-RUNTIME_initscripts ??= "initscripts"
 VIRTUAL-RUNTIME_login_manager ??= "busybox"
 VIRTUAL-RUNTIME_dev_manager ??= "udev"
+VIRTUAL-RUNTIME_keymaps ?= "keymaps"
meta/recipes-core/packagegroups/packagegroup-base.bb +0 -3
index 70a1035003..cb9d1f07af 100644
@@ -39,9 +39,6 @@ PACKAGES = ' \
             \
             '
 
-# Override by distro if needed
-VIRTUAL-RUNTIME_keymaps ?= "keymaps"
-
 #
 # packagegroup-base contain stuff needed for base system (machine
 related)

#

meta/recipes-core/packagegroups/packagegroup-core-boot.bb +0 -3
index fa06092e27..5cdd161811 100644
@@ -9,9 +9,6 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 inherit packagegroup
 
-# Distro can override the following VIRTUAL-RUNTIME providers:
-VIRTUAL-RUNTIME_keymaps ?= "keymaps"
-
 EFI_PROVIDER ??= "grub-efi"
 
 SYSVINIT_SCRIPTS = "${@bb.utils.contains('MACHINE_FEATURES', 'rtc',

'${VIRTUAL-RUNTIME_base-utils-hwclock}', '', d)} \
--
2.30.2

#3 lore raw

RE: [OE-core][PATCH 2/2] init-manager: define VIRTUAL-RUNTIME_keymaps for all init managers

-----Original Message-----

Quoted 23 lines

From: Peter Kjellerstedt <[email protected]>
Sent: Tuesday, November 26, 2024 18:58
To: Marko, Peter (FT D EU SK BFS1) <[email protected]>; [email protected]
Subject: RE: [OE-core][PATCH 2/2] init-manager: define VIRTUAL- RUNTIME_keymaps for all init managers

-----Original Message-----

Quoted 1 line

From: [email protected] <openembedded-

[email protected]> On Behalf Of Peter Marko via

Quoted 5 lines

lists.openembedded.org
Sent: den 25 november 2024 19:37
To: [email protected]
Cc: Peter Marko <[email protected]>
Subject: [OE-core][PATCH 2/2] init-manager: define VIRTUAL-

RUNTIME_keymaps for all init managers

Quoted 6 lines

From: Peter Marko <[email protected]>

VIRTUAL-RUNTIME_keymaps is defined in some init managers and also in some package groups. Defining distro features in recipes is wrong. Define it in all init managers instead.

Quoted 7 lines

How is keymaps related to whichever init manager is used? Wouldn't it be better to remove it from init-manager-mdev-busybox.inc and rely on the defaults in the packagegroups that use ${VIRTUAL-RUNTIME_keymaps}?

//Peter

What I don't like there is that it's initialized only in two different recipes (although identical) and not globally anymore. Someone may already use it with busybox distro.
Maybe better would be to move it to meta/conf/distro/include/default-providers.inc? Who can decide?

Peter

Quoted 77 lines
Quoted 77 lines
---
 meta/conf/distro/include/init-manager-none.inc            | 1 +
 meta/conf/distro/include/init-manager-systemd.inc         | 1 +
 meta/conf/distro/include/init-manager-sysvinit.inc        | 1 +
 meta/recipes-core/packagegroups/packagegroup-base.bb      | 3 ---
 meta/recipes-core/packagegroups/packagegroup-core-boot.bb | 3 ---
 5 files changed, 3 insertions(+), 6 deletions(-)
meta/conf/distro/include/init-manager-none.inc +1 -0
index 6ece5c9906..3972e6d8aa 100644
@@ -2,3 +2,4 @@ VIRTUAL-RUNTIME_init_manager ??= "sysvinit"
 VIRTUAL-RUNTIME_initscripts ??= "initscripts"
 VIRTUAL-RUNTIME_login_manager ??= "busybox"
 VIRTUAL-RUNTIME_dev_manager ??= "udev"
+VIRTUAL-RUNTIME_keymaps ?= "keymaps"
meta/conf/distro/include/init-manager-systemd.inc +1 -0
index 0a76647459..8132135c25 100644
@@ -5,5 +5,6 @@ VIRTUAL-RUNTIME_init_manager ??= "systemd"
 VIRTUAL-RUNTIME_initscripts ??= "systemd-compat-units"
 VIRTUAL-RUNTIME_login_manager ??= "shadow-base"
 VIRTUAL-RUNTIME_dev_manager ??= "systemd"
+VIRTUAL-RUNTIME_keymaps ?= "keymaps"
 # systemd hardcodes /root in its source codes, other values are not

offically supported
ROOT_HOME ?= "/root"

meta/conf/distro/include/init-manager-sysvinit.inc +1 -0
index e2d17b358d..cfb3438632 100644
@@ -5,3 +5,4 @@ VIRTUAL-RUNTIME_init_manager ??= "sysvinit"
 VIRTUAL-RUNTIME_initscripts ??= "initscripts"
 VIRTUAL-RUNTIME_login_manager ??= "busybox"
 VIRTUAL-RUNTIME_dev_manager ??= "udev"
+VIRTUAL-RUNTIME_keymaps ?= "keymaps"
meta/recipes-core/packagegroups/packagegroup-base.bb +0 -3
index 70a1035003..cb9d1f07af 100644
@@ -39,9 +39,6 @@ PACKAGES = ' \
             \
             '
 
-# Override by distro if needed
-VIRTUAL-RUNTIME_keymaps ?= "keymaps"
-
 #
 # packagegroup-base contain stuff needed for base system (machine
 related)

#

meta/recipes-core/packagegroups/packagegroup-core-boot.bb +0 -3
index fa06092e27..5cdd161811 100644
@@ -9,9 +9,6 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 inherit packagegroup
 
-# Distro can override the following VIRTUAL-RUNTIME providers:
-VIRTUAL-RUNTIME_keymaps ?= "keymaps"
-
 EFI_PROVIDER ??= "grub-efi"
 
 SYSVINIT_SCRIPTS = "${@bb.utils.contains('MACHINE_FEATURES', 'rtc',

'${VIRTUAL-RUNTIME_base-utils-hwclock}', '', d)} \
--
2.30.2

#4 lore raw

RE: [OE-core][PATCH 2/2] init-manager: define VIRTUAL-RUNTIME_keymaps for all init managers

Quoted 37 lines

-----Original Message-----
From: Marko, Peter <[email protected]>
Sent: den 26 november 2024 19:11
To: Peter Kjellerstedt <[email protected]>; openembedded- [email protected]
Subject: RE: [OE-core][PATCH 2/2] init-manager: define VIRTUAL- RUNTIME_keymaps for all init managers

-----Original Message-----

Quoted 28 lines

From: Peter Kjellerstedt <[email protected]>
Sent: Tuesday, November 26, 2024 18:58
To: Marko, Peter (FT D EU SK BFS1) <[email protected]>; [email protected]
Subject: RE: [OE-core][PATCH 2/2] init-manager: define VIRTUAL- RUNTIME_keymaps for all init managers

-----Original Message-----

Quoted 1 line

From: [email protected] <openembedded-

[email protected]> On Behalf Of Peter Marko via

Quoted 5 lines

lists.openembedded.org
Sent: den 25 november 2024 19:37
To: [email protected]
Cc: Peter Marko <[email protected]>
Subject: [OE-core][PATCH 2/2] init-manager: define VIRTUAL-

RUNTIME_keymaps for all init managers

Quoted 6 lines

From: Peter Marko <[email protected]>

VIRTUAL-RUNTIME_keymaps is defined in some init managers and also in some package groups. Defining distro features in recipes is wrong. Define it in all init managers instead.

How is keymaps related to whichever init manager is used? Wouldn't it be better to remove it from init-manager-mdev-busybox.inc and rely on the defaults in the packagegroups that use ${VIRTUAL-RUNTIME_keymaps}?

Quoted 8 lines
Quoted 2 lines

//Peter

What I don't like there is that it's initialized only in two different recipes (although identical)
and not globally anymore. Someone may already use it with busybox distro. Maybe better would be to move it to meta/conf/distro/include/default- providers.inc?

I find it reasonable to move them to default-providers.inc.

Quoted 1 line

Who can decide?

Send a patch. ;)

//Peter

Quoted 79 lines

Peter

Quoted 77 lines
Quoted 77 lines
---
 meta/conf/distro/include/init-manager-none.inc            | 1 +
 meta/conf/distro/include/init-manager-systemd.inc         | 1 +
 meta/conf/distro/include/init-manager-sysvinit.inc        | 1 +
 meta/recipes-core/packagegroups/packagegroup-base.bb      | 3 ---
 meta/recipes-core/packagegroups/packagegroup-core-boot.bb | 3 ---
 5 files changed, 3 insertions(+), 6 deletions(-)
meta/conf/distro/include/init-manager-none.inc +1 -0
index 6ece5c9906..3972e6d8aa 100644
@@ -2,3 +2,4 @@ VIRTUAL-RUNTIME_init_manager ??= "sysvinit"
 VIRTUAL-RUNTIME_initscripts ??= "initscripts"
 VIRTUAL-RUNTIME_login_manager ??= "busybox"
 VIRTUAL-RUNTIME_dev_manager ??= "udev"
+VIRTUAL-RUNTIME_keymaps ?= "keymaps"
meta/conf/distro/include/init-manager-systemd.inc +1 -0
index 0a76647459..8132135c25 100644
@@ -5,5 +5,6 @@ VIRTUAL-RUNTIME_init_manager ??= "systemd"
 VIRTUAL-RUNTIME_initscripts ??= "systemd-compat-units"
 VIRTUAL-RUNTIME_login_manager ??= "shadow-base"
 VIRTUAL-RUNTIME_dev_manager ??= "systemd"
+VIRTUAL-RUNTIME_keymaps ?= "keymaps"
 # systemd hardcodes /root in its source codes, other values are not

offically supported
ROOT_HOME ?= "/root"

meta/conf/distro/include/init-manager-sysvinit.inc +1 -0
index e2d17b358d..cfb3438632 100644
@@ -5,3 +5,4 @@ VIRTUAL-RUNTIME_init_manager ??= "sysvinit"
 VIRTUAL-RUNTIME_initscripts ??= "initscripts"
 VIRTUAL-RUNTIME_login_manager ??= "busybox"
 VIRTUAL-RUNTIME_dev_manager ??= "udev"
+VIRTUAL-RUNTIME_keymaps ?= "keymaps"
meta/recipes-core/packagegroups/packagegroup-base.bb +0 -3
index 70a1035003..cb9d1f07af 100644
@@ -39,9 +39,6 @@ PACKAGES = ' \
             \
             '
 
-# Override by distro if needed
-VIRTUAL-RUNTIME_keymaps ?= "keymaps"
-
 #
 # packagegroup-base contain stuff needed for base system (machine
 related)

#

meta/recipes-core/packagegroups/packagegroup-core-boot.bb +0 -3
index fa06092e27..5cdd161811 100644
@@ -9,9 +9,6 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 inherit packagegroup
 
-# Distro can override the following VIRTUAL-RUNTIME providers:
-VIRTUAL-RUNTIME_keymaps ?= "keymaps"
-
 EFI_PROVIDER ??= "grub-efi"
 
 SYSVINIT_SCRIPTS = "${@bb.utils.contains('MACHINE_FEATURES', 'rtc',

'${VIRTUAL-RUNTIME_base-utils-hwclock}', '', d)} \
--
2.30.2

#5 lore raw

PATCH v2 1/2 init-manager: define dev_manager for all init managers

In reply to Peter Marko

From: Peter Marko <[email protected]>

Currently VIRTUAL-RUNTIME_dev_manager is defined by some init managers with "??=" and in packagegroup-core-boot with "?=".
This means that this variable is different in this package group and in all other the recipes.
This was discovered when trying to use new feature INIT_MANAGER when migrating to scarthgap and using systemd distro. After deleting all VIRTUAL_RUNTIME providers defined in init-manager-systemd udev was installed additionally via packagegroup-core-boot.

Hiaving a distro settings overriden in single recipe is wrong and needs to be corrected. Therefore let's define the setting in all init managers and remove it from packagegroup-core-boot.

core-image-tiny-initramfs has a dilemma - use busybox-mdev even if distro does not enable it in busybox recipe to keep the image tiny, or rather not install it even if distro enables it in busybox. This patch chooses the first option.

---
 meta/conf/distro/include/init-manager-none.inc            | 1 +
 meta/conf/distro/include/init-manager-sysvinit.inc        | 1 +
 meta/recipes-core/images/core-image-tiny-initramfs.bb     | 3 +++
 meta/recipes-core/packagegroups/packagegroup-core-boot.bb | 1 -
 4 files changed, 5 insertions(+), 1 deletion(-)
meta/conf/distro/include/init-manager-none.inc +1 -0
index bbedf898f7..6ece5c9906 100644
@@ -1,3 +1,4 @@
 VIRTUAL-RUNTIME_init_manager ??= "sysvinit"
 VIRTUAL-RUNTIME_initscripts ??= "initscripts"
 VIRTUAL-RUNTIME_login_manager ??= "busybox"
+VIRTUAL-RUNTIME_dev_manager ??= "udev"
meta/conf/distro/include/init-manager-sysvinit.inc +1 -0
index aa2393944d..e2d17b358d 100644
@@ -4,3 +4,4 @@ DISTRO_FEATURES_BACKFILL_CONSIDERED:append = " systemd"
 VIRTUAL-RUNTIME_init_manager ??= "sysvinit"
 VIRTUAL-RUNTIME_initscripts ??= "initscripts"
 VIRTUAL-RUNTIME_login_manager ??= "busybox"
+VIRTUAL-RUNTIME_dev_manager ??= "udev"
meta/recipes-core/images/core-image-tiny-initramfs.bb +3 -0
index 7a71d55b1e..c2aa68c788 100644
@@ -6,6 +6,9 @@ first 'init' program more efficiently. core-image-tiny-initramfs doesn't \
 actually generate an image but rather generates boot and rootfs artifacts \
 that can subsequently be picked up by external image generation tools such as wic."
 
+# if distro does not override VIRTUAL-RUNTIME_dev_manager and default in different, busybox is compiled without mdev support
+# however this keeps the image small by not installing heavy-weight manager and in initramfs it may not even be necessary
+# override in distro if needed
 VIRTUAL-RUNTIME_dev_manager ?= "busybox-mdev"
 
 PACKAGE_INSTALL = "initramfs-live-boot-tiny packagegroup-core-boot dropbear ${VIRTUAL-RUNTIME_base-utils} ${VIRTUAL-RUNTIME_dev_manager} base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}"
meta/recipes-core/packagegroups/packagegroup-core-boot.bb +0 -1
index fecc3334ea..fa06092e27 100644
@@ -10,7 +10,6 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
 inherit packagegroup
 
 # Distro can override the following VIRTUAL-RUNTIME providers:
-VIRTUAL-RUNTIME_dev_manager ?= "udev"
 VIRTUAL-RUNTIME_keymaps ?= "keymaps"
 
 EFI_PROVIDER ??= "grub-efi"
Signature · 1 line
2.30.2
#6 lore raw

PATCH v2 2/2 default-providers: define keymaps virtual runtime provider

From: Peter Marko <[email protected]>

VIRTUAL-RUNTIME_keymaps is defined in busybox init manager and also in some package groups. Defining distro features in recipes is wrong. Also this is not directly related to init manager.
So move all these definitions to default-providers.inc

---
 meta/conf/distro/include/default-providers.inc            | 1 +
 meta/conf/distro/include/init-manager-mdev-busybox.inc    | 1 -
 meta/recipes-core/packagegroups/packagegroup-base.bb      | 3 ---
 meta/recipes-core/packagegroups/packagegroup-core-boot.bb | 3 ---
 4 files changed, 1 insertion(+), 7 deletions(-)
meta/conf/distro/include/default-providers.inc +1 -0
index b32c4e0d25..506d77811f 100644
@@ -29,6 +29,7 @@ VIRTUAL-RUNTIME_getopt ?= "util-linux-getopt"
 VIRTUAL-RUNTIME_base-utils ?= "busybox"
 VIRTUAL-RUNTIME_base-utils-hwclock ?= "busybox-hwclock"
 VIRTUAL-RUNTIME_base-utils-syslog ?= "busybox-syslog"
+VIRTUAL-RUNTIME_keymaps ?= "keymaps"
 
 #
 # Default recipe providers
meta/conf/distro/include/init-manager-mdev-busybox.inc +0 -1
index 12091cba68..d9b05e1781 100644
@@ -3,5 +3,4 @@ DISTRO_FEATURES_BACKFILL_CONSIDERED:append = " systemd sysvinit"
 VIRTUAL-RUNTIME_dev_manager ??= "busybox-mdev"
 VIRTUAL-RUNTIME_init_manager ??= "busybox"
 VIRTUAL-RUNTIME_initscripts ??= "initscripts"
-VIRTUAL-RUNTIME_keymaps ??= "keymaps"
 VIRTUAL-RUNTIME_login_manager ??= "busybox"
meta/recipes-core/packagegroups/packagegroup-base.bb +0 -3
index 70a1035003..cb9d1f07af 100644
@@ -39,9 +39,6 @@ PACKAGES = ' \
             \
             '
 
-# Override by distro if needed
-VIRTUAL-RUNTIME_keymaps ?= "keymaps"
-
 #
 # packagegroup-base contain stuff needed for base system (machine related)
 #
meta/recipes-core/packagegroups/packagegroup-core-boot.bb +0 -3
index fa06092e27..5cdd161811 100644
@@ -9,9 +9,6 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 inherit packagegroup
 
-# Distro can override the following VIRTUAL-RUNTIME providers:
-VIRTUAL-RUNTIME_keymaps ?= "keymaps"
-
 EFI_PROVIDER ??= "grub-efi"
 
 SYSVINIT_SCRIPTS = "${@bb.utils.contains('MACHINE_FEATURES', 'rtc', '${VIRTUAL-RUNTIME_base-utils-hwclock}', '', d)} \
Signature · 1 line
2.30.2
#7 lore raw
In reply to Peter Marko

Peter Marko via lists.openembedded.org schrieb am Mi 27. Nov, 18:24 (+0100):

Quoted 11 lines

From: Peter Marko <[email protected]>

Currently VIRTUAL-RUNTIME_dev_manager is defined by some init managers with "??=" and in packagegroup-core-boot with "?=".
This means that this variable is different in this package group and in all other the recipes.
This was discovered when trying to use new feature INIT_MANAGER when migrating to scarthgap and using systemd distro. After deleting all VIRTUAL_RUNTIME providers defined in init-manager-systemd udev was installed additionally via packagegroup-core-boot.

Quoted 1 line

Hiaving a distro settings overriden in single recipe is wrong and needs

Here is a little spelling mistake in the first word.

Regards, Jörg

#8 lore raw

PATCH v3 1/2 init-manager: define dev_manager for all init managers

In reply to Peter Marko

From: Peter Marko <[email protected]>

Currently VIRTUAL-RUNTIME_dev_manager is defined by some init managers with "??=" and in packagegroup-core-boot with "?=".
This means that this variable is different in this package group and in all other the recipes.
This was discovered when trying to use new feature INIT_MANAGER when migrating to scarthgap and using systemd distro. After deleting all VIRTUAL_RUNTIME providers defined in init-manager-systemd udev was installed additionally via packagegroup-core-boot.

Having a distro settings overriden in single recipe is wrong and needs to be corrected. Therefore let's define the setting in all init managers and remove it from packagegroup-core-boot.

core-image-tiny-initramfs has a dilemma - use busybox-mdev even if distro does not enable it in busybox recipe to keep the image tiny, or rather not install it even if distro enables it in busybox. This patch chooses the first option.

---
v2: commit message spelling fixes
v3: commit message spelling fixes

 meta/conf/distro/include/init-manager-none.inc            | 1 +
 meta/conf/distro/include/init-manager-sysvinit.inc        | 1 +
 meta/recipes-core/images/core-image-tiny-initramfs.bb     | 3 +++
 meta/recipes-core/packagegroups/packagegroup-core-boot.bb | 1 -
 4 files changed, 5 insertions(+), 1 deletion(-)
meta/conf/distro/include/init-manager-none.inc +1 -0
index bbedf898f7..6ece5c9906 100644
@@ -1,3 +1,4 @@
 VIRTUAL-RUNTIME_init_manager ??= "sysvinit"
 VIRTUAL-RUNTIME_initscripts ??= "initscripts"
 VIRTUAL-RUNTIME_login_manager ??= "busybox"
+VIRTUAL-RUNTIME_dev_manager ??= "udev"
meta/conf/distro/include/init-manager-sysvinit.inc +1 -0
index aa2393944d..e2d17b358d 100644
@@ -4,3 +4,4 @@ DISTRO_FEATURES_BACKFILL_CONSIDERED:append = " systemd"
 VIRTUAL-RUNTIME_init_manager ??= "sysvinit"
 VIRTUAL-RUNTIME_initscripts ??= "initscripts"
 VIRTUAL-RUNTIME_login_manager ??= "busybox"
+VIRTUAL-RUNTIME_dev_manager ??= "udev"
meta/recipes-core/images/core-image-tiny-initramfs.bb +3 -0
index 7a71d55b1e..c2aa68c788 100644
@@ -6,6 +6,9 @@ first 'init' program more efficiently. core-image-tiny-initramfs doesn't \
 actually generate an image but rather generates boot and rootfs artifacts \
 that can subsequently be picked up by external image generation tools such as wic."
 
+# if distro does not override VIRTUAL-RUNTIME_dev_manager and default in different, busybox is compiled without mdev support
+# however this keeps the image small by not installing heavy-weight manager and in initramfs it may not even be necessary
+# override in distro if needed
 VIRTUAL-RUNTIME_dev_manager ?= "busybox-mdev"
 
 PACKAGE_INSTALL = "initramfs-live-boot-tiny packagegroup-core-boot dropbear ${VIRTUAL-RUNTIME_base-utils} ${VIRTUAL-RUNTIME_dev_manager} base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}"
meta/recipes-core/packagegroups/packagegroup-core-boot.bb +0 -1
index fecc3334ea..fa06092e27 100644
@@ -10,7 +10,6 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
 inherit packagegroup
 
 # Distro can override the following VIRTUAL-RUNTIME providers:
-VIRTUAL-RUNTIME_dev_manager ?= "udev"
 VIRTUAL-RUNTIME_keymaps ?= "keymaps"
 
 EFI_PROVIDER ??= "grub-efi"
Signature · 1 line
2.30.2
#9 lore raw

PATCH v3 2/2 default-providers: define keymaps virtual runtime provider

From: Peter Marko <[email protected]>

VIRTUAL-RUNTIME_keymaps is defined in busybox init manager and also in some package groups. Defining distro features in recipes is wrong. Also this is not directly related to init manager.
So move all these definitions to default-providers.inc

---
v2: moved VIRTUAL-RUNTIME_keymaps to default-providers.inc
v3: no change

 meta/conf/distro/include/default-providers.inc            | 1 +
 meta/conf/distro/include/init-manager-mdev-busybox.inc    | 1 -
 meta/recipes-core/packagegroups/packagegroup-base.bb      | 3 ---
 meta/recipes-core/packagegroups/packagegroup-core-boot.bb | 3 ---
 4 files changed, 1 insertion(+), 7 deletions(-)
meta/conf/distro/include/default-providers.inc +1 -0
index b32c4e0d25..506d77811f 100644
@@ -29,6 +29,7 @@ VIRTUAL-RUNTIME_getopt ?= "util-linux-getopt"
 VIRTUAL-RUNTIME_base-utils ?= "busybox"
 VIRTUAL-RUNTIME_base-utils-hwclock ?= "busybox-hwclock"
 VIRTUAL-RUNTIME_base-utils-syslog ?= "busybox-syslog"
+VIRTUAL-RUNTIME_keymaps ?= "keymaps"
 
 #
 # Default recipe providers
meta/conf/distro/include/init-manager-mdev-busybox.inc +0 -1
index 12091cba68..d9b05e1781 100644
@@ -3,5 +3,4 @@ DISTRO_FEATURES_BACKFILL_CONSIDERED:append = " systemd sysvinit"
 VIRTUAL-RUNTIME_dev_manager ??= "busybox-mdev"
 VIRTUAL-RUNTIME_init_manager ??= "busybox"
 VIRTUAL-RUNTIME_initscripts ??= "initscripts"
-VIRTUAL-RUNTIME_keymaps ??= "keymaps"
 VIRTUAL-RUNTIME_login_manager ??= "busybox"
meta/recipes-core/packagegroups/packagegroup-base.bb +0 -3
index 70a1035003..cb9d1f07af 100644
@@ -39,9 +39,6 @@ PACKAGES = ' \
             \
             '
 
-# Override by distro if needed
-VIRTUAL-RUNTIME_keymaps ?= "keymaps"
-
 #
 # packagegroup-base contain stuff needed for base system (machine related)
 #
meta/recipes-core/packagegroups/packagegroup-core-boot.bb +0 -3
index fa06092e27..5cdd161811 100644
@@ -9,9 +9,6 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 inherit packagegroup
 
-# Distro can override the following VIRTUAL-RUNTIME providers:
-VIRTUAL-RUNTIME_keymaps ?= "keymaps"
-
 EFI_PROVIDER ??= "grub-efi"
 
 SYSVINIT_SCRIPTS = "${@bb.utils.contains('MACHINE_FEATURES', 'rtc', '${VIRTUAL-RUNTIME_base-utils-hwclock}', '', d)} \
Signature · 1 line
2.30.2