| Message ID | 20260708143704.2643050-1-leon.anavi@konsulko.com |
|---|---|
| State | Under Review |
| Headers | show |
| Series | [[PATCHv3] meta: Add pam to the defaults if using systemd | expand |
On Mi, 2026-07-08 at 17:37 +0300, Leon Anavi wrote: > Add pam to DISTRO_FEATURES_DEFAULTS 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. I think these requirements are partially incorrect, btw. Weston itself only requires PAM for the VNC password, so if PACKAGECONFIG[vnc] is disabled, there is no PAM dependency from weston_15.0.1.bb at all, and if vnc is enabled, the PAM dependency has nothing to do with systemd being enabled or used as init system. The PAM dependency in weston-init.bb comes from the PAMName=weston- autologin option in weston.service and the corresponding weston- autologin PAM configuration. Those files are always installed if DISTRO_FEATURES has systemd, even if VIRTUAL-RUNTIME_init_manager is set to something else. Shouldn't either the pam distro feature depend on the systemd distro feature, or should the weston.service/weston-autologin files be installed at all if the systemd distro feature is enabled but init_manager is set to something else? I think it wouldn't be even better to remove the PAM requirement from weston-init if VNC is disabled, as Weston doesn't need the PAM login in that case. regards Philipp
diff --git a/meta/conf/distro/include/init-manager-systemd.inc b/meta/conf/distro/include/init-manager-systemd.inc index 63fd225ca5..9460be51af 100644 --- a/meta/conf/distro/include/init-manager-systemd.inc +++ b/meta/conf/distro/include/init-manager-systemd.inc @@ -1,5 +1,6 @@ # Use systemd for system initialization DISTRO_FEATURES:append = " systemd usrmerge" +DISTRO_FEATURES_DEFAULTS:append = " pam" VIRTUAL-RUNTIME_init_manager ??= "systemd" VIRTUAL-RUNTIME_initscripts ??= "" VIRTUAL-RUNTIME_login_manager ??= "shadow-base"
Add pam to DISTRO_FEATURES_DEFAULTS 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 affect "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_DEFAULTS in init-manager-systemd.inc. Signed-off-by: Leon Anavi <leon.anavi@konsulko.com> --- meta/conf/distro/include/init-manager-systemd.inc | 1 + 1 file changed, 1 insertion(+)