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:46:05 +0000 |
commit | 35666a87ae0ce873bd1dc35742a3f78322beee01 (patch) | |
tree | b917186b7521707fdf9d766277143c9132b447d0 /meta | |
parent | e5f2f39e11e42b36439280e4dc32672f52c524bc (diff) | |
download | poky-35666a87ae0ce873bd1dc35742a3f78322beee01.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.
(From OE-Core rev: f0c7e8cdeea065ddfcd4187f1fabc074b2753ba1)
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>" | |||
683 | RECIPE_MAINTAINER:pn-sato-screenshot = "Ross Burton <ross.burton@arm.com>" | 683 | RECIPE_MAINTAINER:pn-sato-screenshot = "Ross Burton <ross.burton@arm.com>" |
684 | RECIPE_MAINTAINER:pn-sbc = "Unassigned <unassigned@yoctoproject.org>" | 684 | RECIPE_MAINTAINER:pn-sbc = "Unassigned <unassigned@yoctoproject.org>" |
685 | RECIPE_MAINTAINER:pn-screen = "Anuj Mittal <anuj.mittal@intel.com>" | 685 | RECIPE_MAINTAINER:pn-screen = "Anuj Mittal <anuj.mittal@intel.com>" |
686 | RECIPE_MAINTAINER:pn-seatd = "Alexander Kanavin <alex.kanavin@gmail.com>" | ||
686 | RECIPE_MAINTAINER:pn-sed = "Chen Qi <Qi.Chen@windriver.com>" | 687 | RECIPE_MAINTAINER:pn-sed = "Chen Qi <Qi.Chen@windriver.com>" |
687 | RECIPE_MAINTAINER:pn-serf = "Anuj Mittal <anuj.mittal@intel.com>" | 688 | RECIPE_MAINTAINER:pn-serf = "Anuj Mittal <anuj.mittal@intel.com>" |
688 | RECIPE_MAINTAINER:pn-setserial = "Yi Zhao <yi.zhao@windriver.com>" | 689 | 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 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | ### BEGIN INIT INFO | ||
4 | # Provides: seatd | ||
5 | # Required-Start: $local_fs $remote_fs | ||
6 | # Required-Stop: $local_fs $remote_fs | ||
7 | # Default-Start: 2 3 4 5 | ||
8 | # Default-Stop: 0 1 6 | ||
9 | ### END INIT INFO | ||
10 | |||
11 | killproc() { | ||
12 | pid=`/bin/pidof $1` | ||
13 | [ "$pid" != "" ] && kill $pid | ||
14 | } | ||
15 | |||
16 | case "$1" in | ||
17 | start) | ||
18 | seatd -g video -n 1 > /tmp/seatd-start-notify & | ||
19 | [ -s /tmp/seatd-start-notify ] && exit 0 | ||
20 | sleep 0.1 | ||
21 | [ -s /tmp/seatd-start-notify ] && exit 0 | ||
22 | sleep 0.5 | ||
23 | [ -s /tmp/seatd-start-notify ] && exit 0 | ||
24 | sleep 5 | ||
25 | [ -s /tmp/seatd-start-notify ] && exit 0 | ||
26 | exit 1 | ||
27 | ;; | ||
28 | |||
29 | stop) | ||
30 | echo "Stopping seatd" | ||
31 | killproc seatd | ||
32 | ;; | ||
33 | |||
34 | restart) | ||
35 | $0 stop | ||
36 | sleep 1 | ||
37 | $0 start | ||
38 | ;; | ||
39 | |||
40 | *) | ||
41 | echo "usage: $0 { start | stop | restart }" | ||
42 | ;; | ||
43 | esac | ||
44 | |||
45 | 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 @@ | |||
1 | SUMMARY = "A minimal seat management daemon, and a universal seat management library." | ||
2 | DESCRIPTION = "Seat management takes care of mediating access to shared devices (graphics, input), without requiring the applications needing access to be root." | ||
3 | HOMEPAGE = "https://git.sr.ht/~kennylevinsen/seatd" | ||
4 | |||
5 | LICENSE = "MIT" | ||
6 | |||
7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=715a99d2dd552e6188e74d4ed2914d5a" | ||
8 | |||
9 | SRC_URI = "git://git.sr.ht/~kennylevinsen/seatd;protocol=https;branch=master \ | ||
10 | file://init" | ||
11 | SRCREV = "88db55f6068c1c01d85b61aa6adff0a6b2a8dce8" | ||
12 | S = "${WORKDIR}/git" | ||
13 | |||
14 | inherit meson pkgconfig update-rc.d | ||
15 | |||
16 | PACKAGECONFIG ?= "libseat-builtin" | ||
17 | |||
18 | PACKAGECONFIG[libseat-builtin] = "-Dlibseat-builtin=enabled,-Dlibseat-builtin=disabled" | ||
19 | |||
20 | do_install:append() { | ||
21 | if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then | ||
22 | install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/seatd | ||
23 | fi | ||
24 | } | ||
25 | |||
26 | INITSCRIPT_NAME = "seatd" | ||
27 | INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ." | ||
28 | INHIBIT_UPDATERCD_BBCLASS = "${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', '1', '', d)}" | ||
29 | |||