diff mbox series

[meta-xfce] xfce4-session: Make libpam and systemd dependencies conditional

Message ID 20260423031717.4186749-1-wenlin.kang@windriver.com
State New
Headers show
Series [meta-xfce] xfce4-session: Make libpam and systemd dependencies conditional | expand

Commit Message

Kang Wenlin April 23, 2026, 3:17 a.m. UTC
From: Wenlin Kang <wenlin.kang@windriver.com>

libpam and systemd require the settings below:
  INIT_MANAGER = "systemd"
  DISTRO_FEATURES:append = " pam systemd usrmerge"

So remove hardcoded libpam and systemd dependencies from DEPENDS.
Add conditional logic to include these dependencies only when
the corresponding DISTRO_FEATURES are enabled.

Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
---
 .../xfce4-screensaver/xfce4-screensaver_4.20.2.bb         | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Comments

Yi Zhao April 23, 2026, 3:40 a.m. UTC | #1
Hi Wenlin,

On 4/23/26 11:17, wenlin.kang@windriver.com via lists.openembedded.org 
wrote:
> From: Wenlin Kang <wenlin.kang@windriver.com>
>
> libpam and systemd require the settings below:
>    INIT_MANAGER = "systemd"
>    DISTRO_FEATURES:append = " pam systemd usrmerge"
>
> So remove hardcoded libpam and systemd dependencies from DEPENDS.
> Add conditional logic to include these dependencies only when
> the corresponding DISTRO_FEATURES are enabled.
>
> Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
> ---
>   .../xfce4-screensaver/xfce4-screensaver_4.20.2.bb         | 8 +++++++-
>   1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/meta-xfce/recipes-apps/xfce4-screensaver/xfce4-screensaver_4.20.2.bb b/meta-xfce/recipes-apps/xfce4-screensaver/xfce4-screensaver_4.20.2.bb
> index b95bfc170c..191c49b216 100644
> --- a/meta-xfce/recipes-apps/xfce4-screensaver/xfce4-screensaver_4.20.2.bb
> +++ b/meta-xfce/recipes-apps/xfce4-screensaver/xfce4-screensaver_4.20.2.bb
> @@ -10,7 +10,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
>   XFCE_COMPRESS_TYPE = "xz"
>   XFCEBASEBUILDCLASS = "meson"
>   
> -DEPENDS = "dbus-glib garcon gtk+3 libxklavier libxscrnsaver virtual/libx11 xfconf libwnck3 libpam systemd"
> +DEPENDS = "dbus-glib garcon gtk+3 libxklavier libxscrnsaver virtual/libx11 xfconf libwnck3"
> +
> +EXTRA_OEMESON += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '', '-Dauthentication-scheme=none', d)}"
> +DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
> +
> +EXTRA_OEMESON += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', '-Dsession-manager=none', d)}"
> +DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"

I think it would be better to use PACKAGECONFIG.


//Yi

>   
>   inherit xfce-app
>   
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#126567): https://lists.openembedded.org/g/openembedded-devel/message/126567
> Mute This Topic: https://lists.openembedded.org/mt/118966722/7283133
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [yi.zhao@eng.windriver.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Khem Raj April 23, 2026, 7:04 a.m. UTC | #2
On Wed, Apr 22, 2026 at 8:40 PM Yi Zhao via lists.openembedded.org <yi.zhao=
eng.windriver.com@lists.openembedded.org> wrote:

> Hi Wenlin,
>
> On 4/23/26 11:17, wenlin.kang@windriver.com via lists.openembedded.org
> wrote:
> > From: Wenlin Kang <wenlin.kang@windriver.com>
> >
> > libpam and systemd require the settings below:
> >    INIT_MANAGER = "systemd"
> >    DISTRO_FEATURES:append = " pam systemd usrmerge"
> >
> > So remove hardcoded libpam and systemd dependencies from DEPENDS.
> > Add conditional logic to include these dependencies only when
> > the corresponding DISTRO_FEATURES are enabled.
> >
> > Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
> > ---
> >   .../xfce4-screensaver/xfce4-screensaver_4.20.2.bb         | 8 +++++++-
> >   1 file changed, 7 insertions(+), 1 deletion(-)
> >
> > diff --git a/meta-xfce/recipes-apps/xfce4-screensaver/
> xfce4-screensaver_4.20.2.bb b/meta-xfce/recipes-apps/xfce4-screensaver/
> xfce4-screensaver_4.20.2.bb
> > index b95bfc170c..191c49b216 100644
> > --- a/meta-xfce/recipes-apps/xfce4-screensaver/
> xfce4-screensaver_4.20.2.bb
> > +++ b/meta-xfce/recipes-apps/xfce4-screensaver/
> xfce4-screensaver_4.20.2.bb
> > @@ -10,7 +10,13 @@ LIC_FILES_CHKSUM =
> "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
> >   XFCE_COMPRESS_TYPE = "xz"
> >   XFCEBASEBUILDCLASS = "meson"
> >
> > -DEPENDS = "dbus-glib garcon gtk+3 libxklavier libxscrnsaver
> virtual/libx11 xfconf libwnck3 libpam systemd"
> > +DEPENDS = "dbus-glib garcon gtk+3 libxklavier libxscrnsaver
> virtual/libx11 xfconf libwnck3"
> > +
> > +EXTRA_OEMESON += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '',
> '-Dauthentication-scheme=none', d)}"
> > +DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam',
> '', d)}"
> > +
> > +EXTRA_OEMESON += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd',
> '', '-Dsession-manager=none', d)}"
> > +DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd',
> 'systemd', '', d)}"
>
>
how did you test it for runtime correctness


> I think it would be better to use PACKAGECONFIG.
>
>



>
> //Yi
>
> >
> >   inherit xfce-app
> >
> >
> >
> >
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#126568):
> https://lists.openembedded.org/g/openembedded-devel/message/126568
> Mute This Topic: https://lists.openembedded.org/mt/118966722/1997914
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [
> raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
Kang Wenlin April 23, 2026, 11:09 a.m. UTC | #3
On 4/23/2026 3:04 PM, Khem Raj wrote:
> **
> *CAUTION: This email comes from a non Wind River email account!*
> Do not click links or open attachments unless you recognize the sender 
> and know the content is safe.
>
>
> On Wed, Apr 22, 2026 at 8:40 PM Yi Zhao via lists.openembedded.org 
> <https://urldefense.com/v3/__http://lists.openembedded.org__;!!AjveYdw8EvQ!drctXgVUzS6YGylZg5JzV8ihkVwXVg8wkeBf01WoY7p6njmQCK8qv-_eJLOd1eB5yRC9uosEaS0i2PxcnXcY$> 
> <yi.zhao=eng.windriver.com@lists.openembedded.org> wrote:
>
>     Hi Wenlin,
>
>     On 4/23/26 11:17, wenlin.kang@windriver.com via
>     lists.openembedded.org
>     <https://urldefense.com/v3/__http://lists.openembedded.org__;!!AjveYdw8EvQ!drctXgVUzS6YGylZg5JzV8ihkVwXVg8wkeBf01WoY7p6njmQCK8qv-_eJLOd1eB5yRC9uosEaS0i2PxcnXcY$>
>
>     wrote:
>     > From: Wenlin Kang <wenlin.kang@windriver.com>
>     >
>     > libpam and systemd require the settings below:
>     >    INIT_MANAGER = "systemd"
>     >    DISTRO_FEATURES:append = " pam systemd usrmerge"
>     >
>     > So remove hardcoded libpam and systemd dependencies from DEPENDS.
>     > Add conditional logic to include these dependencies only when
>     > the corresponding DISTRO_FEATURES are enabled.
>     >
>     > Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
>     > ---
>     >   .../xfce4-screensaver/xfce4-screensaver_4.20.2.bb
>     <https://urldefense.com/v3/__http://xfce4-screensaver_4.20.2.bb__;!!AjveYdw8EvQ!drctXgVUzS6YGylZg5JzV8ihkVwXVg8wkeBf01WoY7p6njmQCK8qv-_eJLOd1eB5yRC9uosEaS0i2BG6dSnq$>
>            | 8 +++++++-
>     >   1 file changed, 7 insertions(+), 1 deletion(-)
>     >
>     > diff --git
>     a/meta-xfce/recipes-apps/xfce4-screensaver/xfce4-screensaver_4.20.2.bb
>     <https://urldefense.com/v3/__http://xfce4-screensaver_4.20.2.bb__;!!AjveYdw8EvQ!drctXgVUzS6YGylZg5JzV8ihkVwXVg8wkeBf01WoY7p6njmQCK8qv-_eJLOd1eB5yRC9uosEaS0i2BG6dSnq$>
>     b/meta-xfce/recipes-apps/xfce4-screensaver/xfce4-screensaver_4.20.2.bb
>     <https://urldefense.com/v3/__http://xfce4-screensaver_4.20.2.bb__;!!AjveYdw8EvQ!drctXgVUzS6YGylZg5JzV8ihkVwXVg8wkeBf01WoY7p6njmQCK8qv-_eJLOd1eB5yRC9uosEaS0i2BG6dSnq$>
>     > index b95bfc170c..191c49b216 100644
>     > ---
>     a/meta-xfce/recipes-apps/xfce4-screensaver/xfce4-screensaver_4.20.2.bb
>     <https://urldefense.com/v3/__http://xfce4-screensaver_4.20.2.bb__;!!AjveYdw8EvQ!drctXgVUzS6YGylZg5JzV8ihkVwXVg8wkeBf01WoY7p6njmQCK8qv-_eJLOd1eB5yRC9uosEaS0i2BG6dSnq$>
>     > +++
>     b/meta-xfce/recipes-apps/xfce4-screensaver/xfce4-screensaver_4.20.2.bb
>     <https://urldefense.com/v3/__http://xfce4-screensaver_4.20.2.bb__;!!AjveYdw8EvQ!drctXgVUzS6YGylZg5JzV8ihkVwXVg8wkeBf01WoY7p6njmQCK8qv-_eJLOd1eB5yRC9uosEaS0i2BG6dSnq$>
>     > @@ -10,7 +10,13 @@ LIC_FILES_CHKSUM =
>     "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
>     >   XFCE_COMPRESS_TYPE = "xz"
>     >   XFCEBASEBUILDCLASS = "meson"
>     >
>     > -DEPENDS = "dbus-glib garcon gtk+3 libxklavier libxscrnsaver
>     virtual/libx11 xfconf libwnck3 libpam systemd"
>     > +DEPENDS = "dbus-glib garcon gtk+3 libxklavier libxscrnsaver
>     virtual/libx11 xfconf libwnck3"
>     > +
>     > +EXTRA_OEMESON += "${@bb.utils.contains('DISTRO_FEATURES',
>     'pam', '', '-Dauthentication-scheme=none', d)}"
>     > +DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam',
>     'libpam', '', d)}"
>     > +
>     > +EXTRA_OEMESON += "${@bb.utils.contains('DISTRO_FEATURES',
>     'systemd', '', '-Dsession-manager=none', d)}"
>     > +DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd',
>     'systemd', '', d)}"
>
>
> how did you test it for runtime correctness


I simply tested it using the following steps


1. build:
    $ echo "IMAGE_INSTALL:append = \" xfce4-screensaver\"" >> 
conf/local.conf
    $ bitbake core-image-minimal-xfce


2. runtime:
    1) boot target:
       $ runqemu slirp

    2) Start xfce4-screensaver and set screen saver theme

    3) Run command to lock screen immediately:
        $ xfce4-screensaver-command --lock

       Then the system immediately enters screen lock status

    4. Move the mouse or press any key, then the system exits screen lock


>     I think it would be better to use PACKAGECONFIG.
>
>
>
>
>     //Yi
>
>     >
>     >   inherit xfce-app
>     >
>     >
>     >
>     >
>
>     -=-=-=-=-=-=-=-=-=-=-=-
>     Links: You receive all messages sent to this group.
>     View/Reply Online (#126568):
>     https://lists.openembedded.org/g/openembedded-devel/message/126568
>     <https://urldefense.com/v3/__https://lists.openembedded.org/g/openembedded-devel/message/126568__;!!AjveYdw8EvQ!drctXgVUzS6YGylZg5JzV8ihkVwXVg8wkeBf01WoY7p6njmQCK8qv-_eJLOd1eB5yRC9uosEaS0i2OrYLgaH$>
>     Mute This Topic:
>     https://lists.openembedded.org/mt/118966722/1997914
>     <https://urldefense.com/v3/__https://lists.openembedded.org/mt/118966722/1997914__;!!AjveYdw8EvQ!drctXgVUzS6YGylZg5JzV8ihkVwXVg8wkeBf01WoY7p6njmQCK8qv-_eJLOd1eB5yRC9uosEaS0i2PssR6LX$>
>     Group Owner: openembedded-devel+owner@lists.openembedded.org
>     <mailto:openembedded-devel%2Bowner@lists.openembedded.org>
>     Unsubscribe:
>     https://lists.openembedded.org/g/openembedded-devel/unsub
>     <https://urldefense.com/v3/__https://lists.openembedded.org/g/openembedded-devel/unsub__;!!AjveYdw8EvQ!drctXgVUzS6YGylZg5JzV8ihkVwXVg8wkeBf01WoY7p6njmQCK8qv-_eJLOd1eB5yRC9uosEaS0i2GhbzOFe$>
>     [raj.khem@gmail.com]
>     -=-=-=-=-=-=-=-=-=-=-=-
>
diff mbox series

Patch

diff --git a/meta-xfce/recipes-apps/xfce4-screensaver/xfce4-screensaver_4.20.2.bb b/meta-xfce/recipes-apps/xfce4-screensaver/xfce4-screensaver_4.20.2.bb
index b95bfc170c..191c49b216 100644
--- a/meta-xfce/recipes-apps/xfce4-screensaver/xfce4-screensaver_4.20.2.bb
+++ b/meta-xfce/recipes-apps/xfce4-screensaver/xfce4-screensaver_4.20.2.bb
@@ -10,7 +10,13 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
 XFCE_COMPRESS_TYPE = "xz"
 XFCEBASEBUILDCLASS = "meson"
 
-DEPENDS = "dbus-glib garcon gtk+3 libxklavier libxscrnsaver virtual/libx11 xfconf libwnck3 libpam systemd"
+DEPENDS = "dbus-glib garcon gtk+3 libxklavier libxscrnsaver virtual/libx11 xfconf libwnck3"
+
+EXTRA_OEMESON += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '', '-Dauthentication-scheme=none', d)}"
+DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+
+EXTRA_OEMESON += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', '-Dsession-manager=none', d)}"
+DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
 
 inherit xfce-app