diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2022-02-02 19:27:26 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-02-05 17:22:13 +0000 |
commit | f0c7e8cdeea065ddfcd4187f1fabc074b2753ba1 (patch) | |
tree | d5b7fdddbe3cf40e1a1b637a1d496b8e61f331fa /meta | |
parent | 9b00cf049032a9ed7ba3c63d3c37c7414f94edbf (diff) | |
download | openembedded-core-contrib-f0c7e8cdeea065ddfcd4187f1fabc074b2753ba1.tar.gz |
seatd: add recipe
This is needed to run weston properly as non-root in the absence
of systemd-logind, and other compositors will likely require seatd
as well.
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/conf/distro/include/maintainers.inc | 1 | ||||
-rw-r--r-- | meta/recipes-core/seatd/seatd/init | 45 | ||||
-rw-r--r-- | meta/recipes-core/seatd/seatd_0.6.3.bb | 29 |
3 files changed, 75 insertions, 0 deletions
diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc index 6146d01f3f..32ec391eb9 100644 --- a/meta/conf/distro/include/maintainers.inc +++ b/meta/conf/distro/include/maintainers.inc @@ -683,6 +683,7 @@ RECIPE_MAINTAINER:pn-rxvt-unicode = "Unassigned <unassigned@yoctoproject.org>" RECIPE_MAINTAINER:pn-sato-screenshot = "Ross Burton <ross.burton@arm.com>" RECIPE_MAINTAINER:pn-sbc = "Unassigned <unassigned@yoctoproject.org>" RECIPE_MAINTAINER:pn-screen = "Anuj Mittal <anuj.mittal@intel.com>" +RECIPE_MAINTAINER:pn-seatd = "Alexander Kanavin <alex.kanavin@gmail.com>" RECIPE_MAINTAINER:pn-sed = "Chen Qi <Qi.Chen@windriver.com>" RECIPE_MAINTAINER:pn-serf = "Anuj Mittal <anuj.mittal@intel.com>" RECIPE_MAINTAINER:pn-setserial = "Yi Zhao <yi.zhao@windriver.com>" diff --git a/meta/recipes-core/seatd/seatd/init b/meta/recipes-core/seatd/seatd/init new file mode 100644 index 0000000000..0589c765ac --- /dev/null +++ b/meta/recipes-core/seatd/seatd/init @@ -0,0 +1,45 @@ +#!/bin/sh +# +### BEGIN INIT INFO +# Provides: seatd +# 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 + +killproc() { + pid=`/bin/pidof $1` + [ "$pid" != "" ] && kill $pid +} + +case "$1" in + start) + seatd -g video -n 1 > /tmp/seatd-start-notify & + [ -s /tmp/seatd-start-notify ] && exit 0 + sleep 0.1 + [ -s /tmp/seatd-start-notify ] && exit 0 + sleep 0.5 + [ -s /tmp/seatd-start-notify ] && exit 0 + sleep 5 + [ -s /tmp/seatd-start-notify ] && exit 0 + exit 1 + ;; + + stop) + echo "Stopping seatd" + killproc seatd + ;; + + restart) + $0 stop + sleep 1 + $0 start + ;; + + *) + echo "usage: $0 { start | stop | restart }" + ;; +esac + +exit 0 diff --git a/meta/recipes-core/seatd/seatd_0.6.3.bb b/meta/recipes-core/seatd/seatd_0.6.3.bb new file mode 100644 index 0000000000..0e1a79dddf --- /dev/null +++ b/meta/recipes-core/seatd/seatd_0.6.3.bb @@ -0,0 +1,29 @@ +SUMMARY = "A minimal seat management daemon, and a universal seat management library." +DESCRIPTION = "Seat management takes care of mediating access to shared devices (graphics, input), without requiring the applications needing access to be root." +HOMEPAGE = "https://git.sr.ht/~kennylevinsen/seatd" + +LICENSE = "MIT" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=715a99d2dd552e6188e74d4ed2914d5a" + +SRC_URI = "git://git.sr.ht/~kennylevinsen/seatd;protocol=https;branch=master \ + file://init" +SRCREV = "88db55f6068c1c01d85b61aa6adff0a6b2a8dce8" +S = "${WORKDIR}/git" + +inherit meson pkgconfig update-rc.d + +PACKAGECONFIG ?= "libseat-builtin" + +PACKAGECONFIG[libseat-builtin] = "-Dlibseat-builtin=enabled,-Dlibseat-builtin=disabled" + +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 9 5 2 . stop 20 0 1 6 ." +INHIBIT_UPDATERCD_BBCLASS = "${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', '1', '', d)}" + |