All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4] seatd: add seatd recipe
@ 2021-04-29 17:40 Randy Li
  0 siblings, 0 replies; only message in thread
From: Randy Li @ 2021-04-29 17:40 UTC (permalink / raw)
  To: openembedded-core; +Cc: alex.kanavin, jpewhacker, ayaka

Seat management takes care of mediating access to shared
devices (graphics, input), without requiring the applications
needing access to be root.

Signed-off-by: ayaka <ayaka@soulik.info>
---
 meta/recipes-core/seatd/libseat/init     | 50 ++++++++++++++++++++++++
 meta/recipes-core/seatd/libseat_0.5.0.bb | 42 ++++++++++++++++++++
 2 files changed, 92 insertions(+)
 create mode 100644 meta/recipes-core/seatd/libseat/init
 create mode 100644 meta/recipes-core/seatd/libseat_0.5.0.bb

diff --git a/meta/recipes-core/seatd/libseat/init b/meta/recipes-core/seatd/libseat/init
new file mode 100644
index 0000000000..8c9d77255d
--- /dev/null
+++ b/meta/recipes-core/seatd/libseat/init
@@ -0,0 +1,50 @@
+#!/bin/sh
+#
+### BEGIN INIT INFO
+# Provides:          seatd
+# Short-Description: Start seat management daemon
+# Required-Start:    $local_fs $remote_fs
+# Required-Stop:     $local_fs $remote_fs
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+### END INIT INFO
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+test -x /usr/bin/seatd || exit 0
+
+# For configuration of the init script use the file
+# /etc/default/seatd, do not edit this init script.
+
+seatd_group="seatd"
+
+[ -e /etc/default/seatd ] && . /etc/default/seatd
+
+NAME=seatd
+DAEMON=/usr/bin/seatd
+STOP_RETRY_SCHEDULE='TERM/10/forever/KILL/1'
+
+. /etc/init.d/functions
+
+case "$1" in
+  start)
+    start-stop-daemon --start --backgroud --quiet --pidfile /var/run/$NAME.pid \
+	    --exec $DAEMON -- -g $seatd_group
+    ;;
+
+  stop)
+    killproc $NAME
+    ;;
+
+  restart)
+    $0 stop
+    sleep 1
+    $0 start
+    ;;
+  *)
+    echo "Usage: $0 {start|stop|restart}"
+    exit 1
+
+esac
+
+exit 0
diff --git a/meta/recipes-core/seatd/libseat_0.5.0.bb b/meta/recipes-core/seatd/libseat_0.5.0.bb
new file mode 100644
index 0000000000..fb637d5ca7
--- /dev/null
+++ b/meta/recipes-core/seatd/libseat_0.5.0.bb
@@ -0,0 +1,42 @@
+SUMMARY = "Seat management daemon and library"
+HOMEPAGE = "https://git.sr.ht/~kennylevinsen/seatd"
+SECTION = "base"
+
+DESCRIPTION = "A minimal seat management daemon, and a universal seat management \
+library. Seat management takes care of mediating access to shared devices \
+(graphics, input), without requiring the applications needing access to be root."
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;beginline=3;md5=6a01e8ccc65bea4e8bfa79b09ea1444c"
+
+SRCREV = "355cc9c944a29d29736de84e782a2e91168f1a59"
+SRCBRANCH = "master"
+SRC_URI = "git://git.sr.ht/~kennylevinsen/seatd;protocol=http;branch=${SRCBRANCH} \
+           file://init"
+
+S = "${WORKDIR}/git"
+
+inherit pkgconfig meson useradd update-rc.d
+
+PACKAGECONFIG ??= "${@bb.utils.contains('VIRTUAL-RUNTIME_init_manager', 'systemd', 'systemd', 'seatd', d)}"
+
+PACKAGECONFIG[seatd] = "-Dseatd=enabled -Dserver=enabled, -Dseatd=disabled -Dserver=disabled"
+PACKAGECONFIG[systemd] = "-Dlogind=systemd, -Dlogind=disabled, systemd dbus"
+
+PACKAGES += "seatd"
+
+FILES_${PN} = "${libdir}/lib*${SOLIBS}"
+FILES_seatd = "${bindir}/seatd ${sysconfdir}"
+
+do_install_append() {
+	if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then
+		install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/seatd
+	fi
+}
+
+INITSCRIPT_NAME = "seatd"
+INITSCRIPT_PARAMS = "start 8 5 2 . stop 21 0 1 6 ."
+
+USERADD_PACKAGES = "seatd"
+
+GROUPADD_PARAM_seatd = "-r seatd"
-- 
2.30.2


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-29 17:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-29 17:40 [PATCH v4] seatd: add seatd recipe Randy Li

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.