meta: Add pam to DISTRO_FEATURES if using systemd
PATCH v2 1/1 meta: Add pam to DISTRO_FEATURES if using systemd
Add pam to the list of DISTRO_FEATURES in init-manager-systemd.inc. This way pam will available if variable VIRTUAL-RUNTIME_init_manager has been set to systemd. Otherwise having systemd in conjunction with wayland but without pam leads to a conflict with the REQUIRED_DISTRO_FEATURES for weston related recipes.
This adjustment is required following these recent changes that switched VIRTUAL-RUNTIME_init_manager to systemd by default and added wayland to DISTRO_FEATURES_DEFAULTS which affects "nodistro":
- 159148f4de2595556fef6e8678578df83383857b
meta: Support opting out of any distro features
(Please note that this commit also extended DISTRO_FEATURES_DEFAULTS with wayland and vulkan.)
- 0b4061c5d50261f826d0edb4b478d2d305274b7c
conf: Switch to systemd by default and simplify init manager selection
This fixes issues with test_machine_world when running the yocto-check-layer script for BSP layers that include weston in the dependency chain, for example meta-tegra:
ERROR: Required build target 'meta-world-pkgdata' has no buildable providers. Missing or unbuildable dependency chain was: ['meta-world-pkgdata', 'l4t-graphics-demos', 'weston']
The weston recipe has pam in REQUIRED_DISTRO_FEATURES if systemd is enabled. Therefore, it makes sense to also add pam to the defaults through DISTRO_FEATURES in init-manager-systemd.inc.
--- meta/conf/distro/include/init-manager-systemd.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/conf/distro/include/init-manager-systemd.inc +1 -1
@@ -1,5 +1,5 @@ # Use systemd for system initialization -DISTRO_FEATURES:append = " systemd usrmerge" +DISTRO_FEATURES:append = " systemd usrmerge pam" VIRTUAL-RUNTIME_init_manager ??= "systemd" VIRTUAL-RUNTIME_initscripts ??= "" VIRTUAL-RUNTIME_login_manager ??= "shadow-base"
Signature · 1 line
2.47.3
Leon Anavi via lists.openembedded.org schrieb am Di 07. Jul, 12:02 (+0300):
Quoted 39 lines
Add pam to the list of
DISTRO_FEATURESin init-manager-systemd.inc. This way pam will available if variable VIRTUAL-RUNTIME_init_manager has been set to systemd. Otherwise having systemd in conjunction with wayland but without pam leads to a conflict with theREQUIRED_DISTRO_FEATURESfor weston related recipes.This adjustment is required following these recent changes that switched VIRTUAL-RUNTIME_init_manager to systemd by default and added wayland to
DISTRO_FEATURES_DEFAULTSwhich affects "nodistro":-
159148f4de2595556fef6e8678578df83383857b
meta: Support opting out of any distro features
(Please note that this commit also extendedDISTRO_FEATURES_DEFAULTSwith wayland and vulkan.)-
0b4061c5d50261f826d0edb4b478d2d305274b7c
conf: Switch to systemd by default and simplify init manager selectionThis fixes issues with
test_machine_worldwhen running the yocto-check-layer script for BSP layers that include weston in the dependency chain, for example meta-tegra:ERROR: Required build target 'meta-world-pkgdata' has no buildable providers. Missing or unbuildable dependency chain was: ['meta-world-pkgdata', 'l4t-graphics-demos', 'weston']
The weston recipe has pam in
REQUIRED_DISTRO_FEATURESif systemd is enabled. Therefore, it makes sense to also add pam to the defaults throughDISTRO_FEATURESin init-manager-systemd.inc.Signed-off-by Leon Anavi <[email protected]>--- meta/conf/distro/include/init-manager-systemd.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/conf/distro/include/init-manager-systemd.inc +0
-0
meta/conf/distro/include/init-manager-systemd.inc line 2
Quoted 3 lines
meta/conf/distro/include/init-manager-systemd.inc +1
-1@@ -1,5 +1,5 @@ # Use systemd for system initialization -DISTRO_FEATURES:append = " systemd usrmerge" +DISTRO_FEATURES:append = " systemd usrmerge pam"
systemd and usrmerge are required features for systemd. But pam is optional and should be in DISTRO_FEATURES_DEFAULTS to allow for easy opt-out.
On the other side: Is pam so much common that it should be enabled by default? Why not leave this decision to the distro or the local.conf when the user selects the content of the image?
Kind regards, Jörg
Quoted 6 lines
meta/conf/distro/include/init-manager-systemd.inc +0
-0VIRTUAL-RUNTIME_init_manager ??= "systemd" VIRTUAL-RUNTIME_initscripts ??= "" VIRTUAL-RUNTIME_login_manager ??= "shadow-base"Signature · 1 line
2.47.3
Signature · 6 lines
Navimatix GmbH T: 03641 - 327 99 0 Tatzendpromenade 2 F: 03641 - 526 306 07745 Jena www.navimatix.de Geschäftsführer: Steffen Späthe, Jan Rommeley Registergericht: Amtsgericht Jena, HRB 501480
Hi Jörg,
Quoted 40 lines · Jörg Sommer
Leon Anavi via lists.openembedded.org schrieb am Di 07. Jul, 12:02 (+0300):
Quoted 15 lines
Add pam to the list of
DISTRO_FEATURESin init-manager-systemd.inc. This way pam will available if variable VIRTUAL-RUNTIME_init_manager has been set to systemd. Otherwise having systemd in conjunction with wayland but without pam leads to a conflict with theREQUIRED_DISTRO_FEATURESfor weston related recipes.This adjustment is required following these recent changes that switched VIRTUAL-RUNTIME_init_manager to systemd by default and added wayland to
DISTRO_FEATURES_DEFAULTSwhich affects "nodistro":-
159148f4de2595556fef6e8678578df83383857b
meta: Support opting out of any distro features
(Please note that this commit also extendedDISTRO_FEATURES_DEFAULTSwith wayland and vulkan.)Quoted 8 lines
-
0b4061c5d50261f826d0edb4b478d2d305274b7c
conf: Switch to systemd by default and simplify init manager selectionThis fixes issues with
test_machine_worldwhen running the yocto-check-layer script for BSP layers that include weston in the dependency chain, for example meta-tegra:ERROR: Required build target 'meta-world-pkgdata' has no buildable
providers.
Quoted 1 line
Missing or unbuildable dependency chain was: ['meta-world-pkgdata',
'l4t-graphics-demos', 'weston']
Review
Quoted 11 lines
The weston recipe has pam in
REQUIRED_DISTRO_FEATURESif systemd is enabled. Therefore, it makes sense to also add pam to the defaults throughDISTRO_FEATURESin init-manager-systemd.inc.Signed-off-by Leon Anavi <[email protected]>--- meta/conf/distro/include/init-manager-systemd.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0b/meta/conf/distro/include/init-manager-systemd.inc
Quoted 12 lines
meta/conf/distro/include/init-manager-systemd.inc line 2
Quoted 7 lines
index
63fd225ca5..2e9eef24b5100644meta/conf/distro/include/init-manager-systemd.inc +1
-1@@ -1,5 +1,5 @@ # Use systemd for system initialization -DISTRO_FEATURES:append = " systemd usrmerge" +DISTRO_FEATURES:append = " systemd usrmerge pam"systemd and usrmerge are required features for systemd. But pam is optional and should be in
DISTRO_FEATURES_DEFAULTSto allow for easy opt-out.
Thank you for your feedback but please note that version 1 of my patch was adding pam to DISTRO_FEATURES_DEFAULTS if systemd was enabled. Here is a link to v1 of my patch:
https://lists.openembedded.org/g/openembedded-core/message/240113
Following the code review and feedback provided by Paul Barker I modified the patch and submitted version 2. For your convenience, here is a link to Paul's email with his recommendation that init-manager-systemd.inc is the better place for this:
https://lists.openembedded.org/g/openembedded-core/message/240233
Quoted 2 lines
On the other side: Is pam so much common that it should be enabled by default?
The purpose of my proposed patch is to fix the behavior of the yocto-check-layer script when running it with DISTRO="nodistro" for layers that depend on recipes requiring pam, such as weston. Since the Wrynose release and the previously mentioned git commits by Richard and Paul, openembedded-core has switched to systemd by default and extended DISTRO_FEATURES_DEFAULTS with wayland and vulkan. Because wayland is now enabled by default, in certain recipes the PACKAGECONFIG option for wayland is enabled and drags weston, causing the test_machine_world test from the yocto-check-layer script to fail for meta-world-pkgdata if pam is not also enabled. For example, this occurs with the l4t-graphics-demos recipe from meta-tegra:
https://github.com/OE4T/meta-tegra/blob/master/recipes-graphics/l4t-graphics-demos/l4t-graphics-demos_39.2.0.bb#L23
Quoted 3 lines
Why not leave this decision to the distro or the local.conf when the user selects the content of the image?
Based on my experience with meta-tegra, these changes introduce kind of a breaking change when running yocto-check-layer with the default DISTRO="nodistro" on layers that have recipes depending on weston. My understanding of yocto-check-layer is that it assesses how compatible a layer is with the Yocto Project without modifications to local.conf therefore I don't want to add pam to DISTRO_FEATURES locally in it. Probably there are other layers out there that are affected in the same way by new defaults in DISTRO_FEATURES_DEFAULTS and systemd. For my particular use case, I run yocto-check-layer for meta-tegra as follows:
source openembedded-core/oe-init-build-env build yocto-check-layer --no-auto-dependency ../meta-tegra --machines jetson-orin-nano-devkit-nvme
Best regards, Leon
Quoted 19 lines
Kind regards, Jörg
Quoted 6 lines
meta/conf/distro/include/init-manager-systemd.inc +0
-1VIRTUAL-RUNTIME_init_manager ??= "systemd" VIRTUAL-RUNTIME_initscripts ??= "" VIRTUAL-RUNTIME_login_manager ??= "shadow-base" --2.47.3
--
Navimatix GmbH T: 03641 - 327 99 0
Tatzendpromenade 2 F: 03641 - 526 306
07745 Jena www.navimatix.deGeschäftsführer: Steffen Späthe, Jan Rommeley
Registergericht: Amtsgericht Jena, HRB 501480
Leon Anavi schrieb am Mi 08. Jul, 09:37 (+0300):
Quoted 55 lines
Quoted 40 lines · Jörg Sommer
Leon Anavi via lists.openembedded.org schrieb am Di 07. Jul, 12:02 (+0300):
Quoted 15 lines
Add pam to the list of
DISTRO_FEATURESin init-manager-systemd.inc. This way pam will available if variable VIRTUAL-RUNTIME_init_manager has been set to systemd. Otherwise having systemd in conjunction with wayland but without pam leads to a conflict with theREQUIRED_DISTRO_FEATURESfor weston related recipes.This adjustment is required following these recent changes that switched VIRTUAL-RUNTIME_init_manager to systemd by default and added wayland to
DISTRO_FEATURES_DEFAULTSwhich affects "nodistro":-
159148f4de2595556fef6e8678578df83383857b
meta: Support opting out of any distro features
(Please note that this commit also extendedDISTRO_FEATURES_DEFAULTSwith wayland and vulkan.)Quoted 8 lines
-
0b4061c5d50261f826d0edb4b478d2d305274b7c
conf: Switch to systemd by default and simplify init manager selectionThis fixes issues with
test_machine_worldwhen running the yocto-check-layer script for BSP layers that include weston in the dependency chain, for example meta-tegra:ERROR: Required build target 'meta-world-pkgdata' has no buildable
providers.
Quoted 1 line
Missing or unbuildable dependency chain was: ['meta-world-pkgdata',
'l4t-graphics-demos', 'weston']
Review
Quoted 11 lines
The weston recipe has pam in
REQUIRED_DISTRO_FEATURESif systemd is enabled. Therefore, it makes sense to also add pam to the defaults throughDISTRO_FEATURESin init-manager-systemd.inc.Signed-off-by Leon Anavi <[email protected]>--- meta/conf/distro/include/init-manager-systemd.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0b/meta/conf/distro/include/init-manager-systemd.inc
Quoted 12 lines
meta/conf/distro/include/init-manager-systemd.inc line 2
Quoted 7 lines
index
63fd225ca5..2e9eef24b5100644meta/conf/distro/include/init-manager-systemd.inc +1
-1@@ -1,5 +1,5 @@ # Use systemd for system initialization -DISTRO_FEATURES:append = " systemd usrmerge" +DISTRO_FEATURES:append = " systemd usrmerge pam"systemd and usrmerge are required features for systemd. But pam is optional and should be in
DISTRO_FEATURES_DEFAULTSto allow for easy opt-out.
Quoted 4 lines
Thank you for your feedback but please note that version 1 of my patch was adding pam to
DISTRO_FEATURES_DEFAULTSif systemd was enabled. Here is a link to v1 of my patch:
https://lists.openembedded.org/g/openembedded-core/message/240113
Thanks for the link. For an unknown reason I do not get all mails from the list. I suspect it's an outlook feature.
Quoted 5 lines
Following the code review and feedback provided by Paul Barker I modified the patch and submitted version 2. For your convenience, here is a link to Paul's email with his recommendation that init-manager-systemd.inc is the better place for this:
https://lists.openembedded.org/g/openembedded-core/message/240233
Yes, I think so too. But as Paul said: “I'm not sure we want to enable pam for everyone using systemd, there may be many systemd users who don't use weston.” And I am one of these users who do not want pam.
My idea was to add to init-manager-systemd.inc this line:
DISTRO_FEATURES_DEFAULTS += "pam"
Quoted 11 lines
Quoted 2 lines
On the other side: Is pam so much common that it should be enabled by default?
The purpose of my proposed patch is to fix the behavior of the yocto-check-layer script when running it with DISTRO="nodistro" for layers that depend on recipes requiring pam, such as weston. Since the Wrynose release and the previously mentioned git commits by Richard and Paul, openembedded-core has switched to systemd by default and extended
DISTRO_FEATURES_DEFAULTSwith wayland and vulkan. Because wayland is now enabled by default,
As far as I can see, wayland was enabled by default before Paul's “meta:
Support opting out of any distro features” 159148f4de2595556fef6e8678578df83383857b. The real breaking change was the default init-manager of systemd.
Hence, the setup must have been broken before, if someone choose systemd.
I would add “pam” to DISTRO_FEATURES_DEFAULTS in init-manager-systemd.inc, because this sets the required features to build all recipes, but users can opt-out.
Maybe it's worth to mention this in the release notes that more people become aware of they have to set DISTRO_FEATURES_OPTED_OUT += "pam".
Signature · 6 lines
Navimatix GmbH T: 03641 - 327 99 0 Tatzendpromenade 2 F: 03641 - 526 306 07745 Jena www.navimatix.de Geschäftsführer: Steffen Späthe, Jan Rommeley Registergericht: Amtsgericht Jena, HRB 501480
Hi Jörg,
Quoted 66 lines · Jörg Sommer
Leon Anavi schrieb am Mi 08. Jul, 09:37 (+0300):
Quoted 53 lines
Quoted 39 lines · Jörg Sommer
Leon Anavi via lists.openembedded.org schrieb am Di 07. Jul, 12:02 (+0300):
Quoted 15 lines
Add pam to the list of
DISTRO_FEATURESin init-manager-systemd.inc. This way pam will available if variable VIRTUAL-RUNTIME_init_manager has been set to systemd. Otherwise having systemd in conjunction with wayland but without pam leads to a conflict with theREQUIRED_DISTRO_FEATURESfor weston related recipes.This adjustment is required following these recent changes that switched VIRTUAL-RUNTIME_init_manager to systemd by default and added wayland to
DISTRO_FEATURES_DEFAULTSwhich affects "nodistro":-
159148f4de2595556fef6e8678578df83383857b
meta: Support opting out of any distro features
(Please note that this commit also extendedDISTRO_FEATURES_DEFAULTSwith wayland and vulkan.)Quoted 8 lines
-
0b4061c5d50261f826d0edb4b478d2d305274b7c
conf: Switch to systemd by default and simplify init manager selectionThis fixes issues with
test_machine_worldwhen running the yocto-check-layer script for BSP layers that include weston in the dependency chain, for example meta-tegra:ERROR: Required build target 'meta-world-pkgdata' has no buildable
providers.
Quoted 1 line
Missing or unbuildable dependency chain was: ['meta-world-pkgdata',
'l4t-graphics-demos', 'weston']
Review
Quoted 10 lines
The weston recipe has pam in
REQUIRED_DISTRO_FEATURESif systemd is enabled. Therefore, it makes sense to also add pam to the defaults throughDISTRO_FEATURESin init-manager-systemd.inc.Signed-off-by Leon Anavi<[email protected]>--- meta/conf/distro/include/init-manager-systemd.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0b/meta/conf/distro/include/init-manager-systemd.inc
Quoted 11 lines
meta/conf/distro/include/init-manager-systemd.inc line 2
Quoted 7 lines
index
63fd225ca5..2e9eef24b5100644meta/conf/distro/include/init-manager-systemd.inc +1
-1@@ -1,5 +1,5 @@ # Use systemd for system initialization -DISTRO_FEATURES:append = " systemd usrmerge" +DISTRO_FEATURES:append = " systemd usrmerge pam"systemd and usrmerge are required features for systemd. But pam is optional and should be in
DISTRO_FEATURES_DEFAULTSto allow for easy opt-out.Quoted 4 lines
Thank you for your feedback but please note that version 1 of my patch was adding pam to
DISTRO_FEATURES_DEFAULTSif systemd was enabled. Here is a link to v1 of my patch:
https://lists.openembedded.org/g/openembedded-core/message/240113Thanks for the link. For an unknown reason I do not get all mails from the list. I suspect it's an outlook feature.
Quoted 5 lines
Following the code review and feedback provided by Paul Barker I modified the patch and submitted version 2. For your convenience, here is a link to Paul's email with his recommendation that init-manager-systemd.inc is the better place for this:
https://lists.openembedded.org/g/openembedded-core/message/240233
Quoted 7 lines
Yes, I think so too. But as Paul said: “I'm not sure we want to enable pam for everyone using systemd, there may be many systemd users who don't use weston.” And I am one of these users who do not want pam.
My idea was to add to init-manager-systemd.inc this line:
DISTRO_FEATURES_DEFAULTS+= "pam"
OK, thank you for clarifying it. Sorry, I didn't understand what you had in mind in your initial email. Following your suggestion I did it but with DISTRO_FEATURES_DEFAULTS:append for consistency how init-manager-systemd.inc handles DISTRO_FEATURES. It works fine for my use case with yocto-check-layer script. I have just sent v3 of the patch.
Quoted 11 lines
Quoted 11 lines
Quoted 3 lines
On the other side: Is pam so much common that it should be enabled by default?
The purpose of my proposed patch is to fix the behavior of the yocto-check-layer script when running it with DISTRO="nodistro" for layers that depend on recipes requiring pam, such as weston. Since the Wrynose release and the previously mentioned git commits by Richard and Paul, openembedded-core has switched to systemd by default and extended
DISTRO_FEATURES_DEFAULTSwith wayland and vulkan. Because wayland is now enabled by default,
Quoted 4 lines
As far as I can see, wayland was enabled by default before Paul's “meta:
Support opting out of any distro features”159148f4de2595556fef6e8678578df83383857b. The real breaking change was the default init-manager of systemd.
Yes, as mentioned in the git commit message of my patch, it is a conjunction between git commits 159148f4de2595556fef6e8678578df83383857b and 0b4061c5d50261f826d0edb4b478d2d305274b7c with the primary impact from latter because of the switching to systemd by default. Best regards, Leon
Quoted 11 lines
Hence, the setup must have been broken before, if someone choose systemd.
I would add “pam” to
DISTRO_FEATURES_DEFAULTSin init-manager-systemd.inc, because this sets the required features to build all recipes, but users can opt-out.Maybe it's worth to mention this in the release notes that more people become aware of they have to set
DISTRO_FEATURES_OPTED_OUT += "pam".