All of lore.kernel.org
 help / color / mirror / Atom feed
From: <rs@ti.com>
To: <raj.khem@gmail.com>, <yoann.congal@smile.fr>,
	<alexandre.truong@smile.fr>
Cc: <Openembedded-devel@lists.openembedded.org>
Subject: [oe][meta-oe][PATCH] xscreensaver: move to template and update for emptty
Date: Mon, 9 Mar 2026 18:34:52 -0500	[thread overview]
Message-ID: <20260309233451.1995625-2-rs@ti.com> (raw)

From: Randolph Sapp <rs@ti.com>

Emptty is a new display manager that couples the user accounts with the
configuration profiles as a requirement moving forward. As such,
dependencies need to be updated in this recipe to ensure the xuser
account and session are present.

Previously the systemd service would wait for the session despite the
recipe only explicitly requiring the xuser-account. This fixes that
issue and also makes the service a template, allowing multiple instances
to be started for specific users.

Long term this should be migrated to use graphical-session.target [1],
but that requires a little more setup on the core side of things.

[1] https://systemd.io/DESKTOP_ENVIRONMENTS/

Signed-off-by: Randolph Sapp <rs@ti.com>
---

Sending this now that emptty has been picked up on oe-core's master-next branch.

 .../xscreensaver/files/xscreensaver.service        | 14 --------------
 .../xscreensaver/files/xscreensaver@.service       | 11 +++++++++++
 .../xscreensaver/xscreensaver_6.04.bb              | 14 +++++++++-----
 3 files changed, 20 insertions(+), 19 deletions(-)
 delete mode 100755 meta-oe/recipes-graphics/xscreensaver/files/xscreensaver.service
 create mode 100644 meta-oe/recipes-graphics/xscreensaver/files/xscreensaver@.service

diff --git a/meta-oe/recipes-graphics/xscreensaver/files/xscreensaver.service b/meta-oe/recipes-graphics/xscreensaver/files/xscreensaver.service
deleted file mode 100755
index 17dfe75ef1..0000000000
--- a/meta-oe/recipes-graphics/xscreensaver/files/xscreensaver.service
+++ /dev/null
@@ -1,14 +0,0 @@
-[Unit]
-Description=Xscreensaver service
-PartOf=xserver-nodm.service
-After=xserver-nodm.service
-
-[Service]
-ExecStart=/usr/bin/xscreensaver
-Environment="DISPLAY=:0"
-User=xuser
-Restart=always
-RestartSec=1
-
-[Install]
-WantedBy=multi-user.target
diff --git a/meta-oe/recipes-graphics/xscreensaver/files/xscreensaver@.service b/meta-oe/recipes-graphics/xscreensaver/files/xscreensaver@.service
new file mode 100644
index 0000000000..d63f0f9019
--- /dev/null
+++ b/meta-oe/recipes-graphics/xscreensaver/files/xscreensaver@.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Xscreensaver service for %I
+
+[Service]
+ExecStart=/usr/bin/xscreensaver
+User=%I
+Restart=always
+RestartSec=1
+
+[Install]
+WantedBy=default.target
diff --git a/meta-oe/recipes-graphics/xscreensaver/xscreensaver_6.04.bb b/meta-oe/recipes-graphics/xscreensaver/xscreensaver_6.04.bb
index 073b3f0912..69c71f2e67 100644
--- a/meta-oe/recipes-graphics/xscreensaver/xscreensaver_6.04.bb
+++ b/meta-oe/recipes-graphics/xscreensaver/xscreensaver_6.04.bb
@@ -4,7 +4,7 @@ LICENSE = "0BSD"
 LIC_FILES_CHKSUM = "file://driver/xscreensaver.h;endline=10;md5=c3ce41cdff745eb1dc9d4fcfbffb4d51"
 
 SRC_URI = "https://www.jwz.org/${BPN}/${BP}.tar.gz \
-    file://xscreensaver.service \
+    file://xscreensaver@.service \
     file://0001-Tweak-app-defaults.patch \
     file://0002-build-Do-not-build-po-files.patch \
     file://0001-configure-Ignore-CONF_STATUS-for-gtk-and-openGL-need.patch \
@@ -19,7 +19,7 @@ DEPENDS = "intltool-native libx11 libxext libxt libxft libxi glib-2.0-native bc-
 # These are only needed as part of the stopgap screensaver implementation:
 RDEPENDS:${PN} = " \
     liberation-fonts \
-    xuser-account \
+    xserver-nodm-init \
 "
 
 inherit systemd perlnative pkgconfig gettext autotools-brokensep features_check
@@ -40,7 +40,7 @@ CONFIGUREOPTS:remove = "--disable-silent-rules --disable-dependency-tracking"
 EXTRA_OECONF:remove = "--disable-static"
 
 do_install:append() {
-    install -D ${UNPACKDIR}/xscreensaver.service ${D}${systemd_unitdir}/system/xscreensaver.service
+    install -D ${UNPACKDIR}/xscreensaver@.service ${D}${systemd_unitdir}/system/xscreensaver@.service
     for f in xscreensaver-getimage-file xscreensaver-getimage-video webcollage xscreensaver-text vidwhacker
     do
         sed -i -e "s|${STAGING_BINDIR_NATIVE}/perl-native/perl|/usr/bin/perl|g" ${D}/${libexecdir}/${PN}/$f
@@ -56,8 +56,12 @@ FILES:${PN}-perl = "\
     ${libexecdir}/${PN}/xscreensaver-text \
     ${libexecdir}/${PN}/vidwhacker \
     "
-FILES:${PN} += "${datadir}/X11/app-defaults/XScreenSaver ${datadir}/fonts"
-SYSTEMD_SERVICE:${PN} = "xscreensaver.service"
+FILES:${PN} += "\
+    ${systemd_unitdir}/system/xscreensaver@.service \
+    ${datadir}/X11/app-defaults/XScreenSaver \
+    ${datadir}/fonts \
+    "
+SYSTEMD_SERVICE:${PN} = "xscreensaver@xuser.service"
 
 RDEPENDS:${PN}-perl = "perl"
 
-- 
2.53.0



                 reply	other threads:[~2026-03-09 23:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260309233451.1995625-2-rs@ti.com \
    --to=rs@ti.com \
    --cc=Openembedded-devel@lists.openembedded.org \
    --cc=alexandre.truong@smile.fr \
    --cc=raj.khem@gmail.com \
    --cc=yoann.congal@smile.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.