Skip to contentSkip to conversation

xscreensaver: move to template and update for emptty

PATCH New [email protected] 1 participant 1 message Mar 9

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xscreensaver: move to template and update for emptty

From: Randolph Sapp <[email protected]>

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/

---

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

 .../xscreensaver/files/xscreensaver.service        | 14 --------------
 .../xscreensaver/files/[email protected]       | 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/[email protected]
meta-oe/recipes-graphics/xscreensaver/files/xscreensaver.service deleted +0 -14
deleted file mode 100755
index 17dfe75ef1..0000000000
@@ -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
meta-oe/recipes-graphics/xscreensaver/files/[email protected] new file +11 -0
new file mode 100644
index 0000000000..d63f0f9019
@@ -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
meta-oe/recipes-graphics/xscreensaver/xscreensaver_6.04.bb +9 -5
index 073b3f0912..69c71f2e67 100644
@@ -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://[email protected] \
     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}/[email protected] ${D}${systemd_unitdir}/system/[email protected]
     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/[email protected] \
+    ${datadir}/X11/app-defaults/XScreenSaver \
+    ${datadir}/fonts \
+    "
+SYSTEMD_SERVICE:${PN} = "[email protected]"
 
 RDEPENDS:${PN}-perl = "perl"
 
Signature · 1 line
2.53.0