Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Claudius Heine <ch@denx.de>
To: Alexander Kanavin <alex.kanavin@gmail.com>,
	openembedded-core@lists.openembedded.org
Cc: Alexander Kanavin <alex@linutronix.de>
Subject: Re: [OE-core] [PATCH 01/33] seatd: add recipe
Date: Thu, 3 Feb 2022 13:55:23 +0100	[thread overview]
Message-ID: <8f129c19-a070-e1fe-d868-960fee2b77e6@denx.de> (raw)
In-Reply-To: <20220202182758.919991-1-alex@linutronix.de>

Hi Alexander,

On 2022-02-02 19:27, Alexander Kanavin wrote:
> 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>
> ---
>   meta/conf/distro/include/maintainers.inc |  1 +
>   meta/recipes-core/seatd/seatd/init       | 45 ++++++++++++++++++++++++
>   meta/recipes-core/seatd/seatd_0.6.3.bb   | 29 +++++++++++++++
>   3 files changed, 75 insertions(+)
>   create mode 100644 meta/recipes-core/seatd/seatd/init
>   create mode 100644 meta/recipes-core/seatd/seatd_0.6.3.bb
> 
> diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc
> index ae25287c11..cb289a0eee 100644
> --- a/meta/conf/distro/include/maintainers.inc
> +++ b/meta/conf/distro/include/maintainers.inc
> @@ -684,6 +684,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)}"
> +
> 

I was looking into seatd as well, in my recipe I split it up a bit:

```
PACKAGES =+ "${PN}-launch libseat libseat-dev"

FILES:${PN} = "${bindir}/seatd"
FILES:${PN}-launch = "${bindir}/seatd-launch"
FILES:libseat = "${libdir}/lib*${SOLIBS}"
FILES:libseat-dev = " \
        ${includedir} ${FILES_SOLIBSDEV} \
        ${libdir}/pkgconfig"

RDEPENDS:${PN} = "libseat (= ${EXTENDPKGV})"
RDEPENDS:${PN}-launch = "${PN} (= ${EXTENDPKGV})"
RDEPENDS:libseat-dev = "libseat (= ${EXTENDPKGV})"
```

regards,
Claudius


  parent reply	other threads:[~2022-02-03 12:55 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-02 18:27 [PATCH 01/33] seatd: add recipe Alexander Kanavin
2022-02-02 18:27 ` [PATCH 02/33] weston: upgrade 9.0.0 -> 10.0.0 Alexander Kanavin
2022-02-02 18:27 ` [PATCH 03/33] gdb: update 11.1 -> 11.2 Alexander Kanavin
2022-02-02 23:06   ` [OE-core] " Denys Dmytriyenko
2022-02-03  9:33     ` Richard Purdie
2022-02-02 18:27 ` [PATCH 04/33] connman: update 1.40 -> 1.41 Alexander Kanavin
2022-02-02 22:59   ` [OE-core] " Denys Dmytriyenko
2022-02-02 18:27 ` [PATCH 05/33] util-linux: update 2.37.2 -> 2.37.3 Alexander Kanavin
2022-02-02 18:27 ` [PATCH 06/33] cmake: update 3.22.1 -> 3.22.2 Alexander Kanavin
2022-02-02 18:27 ` [PATCH 07/33] git: merge .inc into .bb Alexander Kanavin
2022-02-02 18:27 ` [PATCH 08/33] git: build manpages from source subject to manpages PACKAGECONFIG Alexander Kanavin
2022-02-02 18:27 ` [PATCH 09/33] git: update 2.34.1 -> 2.35.1 Alexander Kanavin
2022-02-02 18:27 ` [PATCH 10/33] python3-pycryptodome: update 3.12.0 -> 3.14.0 Alexander Kanavin
2022-02-02 18:27 ` [PATCH 11/33] at: update 3.2.2 -> 3.2.4 Alexander Kanavin
2022-02-02 18:27 ` [PATCH 12/33] sudo: update 1.9.8p2 -> 1.9.9 Alexander Kanavin
2022-02-02 18:27 ` [PATCH 13/33] xf86-input-libinput: update 1.2.0 -> 1.2.1 Alexander Kanavin
2022-02-02 18:27 ` [PATCH 14/33] libgpg-error: update 1.43 -> 1.44 Alexander Kanavin
2022-02-02 18:27 ` [PATCH 15/33] ell: upgrade 0.47 -> 0.48 Alexander Kanavin
2022-02-02 22:53   ` [OE-core] " Denys Dmytriyenko
2022-02-02 18:27 ` [PATCH 16/33] glib-2.0: upgrade 2.70.2 -> 2.70.3 Alexander Kanavin
2022-02-02 18:27 ` [PATCH 17/33] lua: upgrade 5.4.3 -> 5.4.4 Alexander Kanavin
2022-02-02 18:27 ` [PATCH 18/33] mmc-utils: upgrade to latest revision Alexander Kanavin
2022-02-02 18:27 ` [PATCH 19/33] python3-cython: upgrade 0.29.26 -> 0.29.27 Alexander Kanavin
2022-02-02 18:27 ` [PATCH 20/33] python3-hypothesis: upgrade 6.36.0 -> 6.36.1 Alexander Kanavin
2022-02-02 18:27 ` [PATCH 21/33] python3-pip: upgrade 21.3.1 -> 22.0.2 Alexander Kanavin
2022-02-02 18:27 ` [PATCH 22/33] cups: upgrade 2.4.0 -> 2.4.1 Alexander Kanavin
2022-02-02 18:27 ` [PATCH 23/33] stress-ng: upgrade 0.13.10 -> 0.13.11 Alexander Kanavin
2022-02-02 18:27 ` [PATCH 24/33] harfbuzz: upgrade 3.2.0 -> 3.3.1 Alexander Kanavin
2022-02-02 18:27 ` [PATCH 25/33] mesa: upgrade 21.3.4 -> 21.3.5 Alexander Kanavin
2022-02-02 18:27 ` [PATCH 26/33] piglit: upgrade to latest revision Alexander Kanavin
2022-02-02 18:27 ` [PATCH 27/33] wayland-protocols: upgrade 1.24 -> 1.25 Alexander Kanavin
2022-02-02 22:52   ` [OE-core] " Denys Dmytriyenko
2022-02-02 18:27 ` [PATCH 28/33] lttng-tools: upgrade 2.13.2 -> 2.13.4 Alexander Kanavin
2022-02-02 22:54   ` [OE-core] " Denys Dmytriyenko
2022-02-02 18:27 ` [PATCH 29/33] puzzles: upgrade to latest revision Alexander Kanavin
2022-02-02 18:27 ` [PATCH 30/33] diffoscope: upgrade 201 -> 202 Alexander Kanavin
2022-02-02 18:27 ` [PATCH 31/33] libcap: upgrade 2.62 -> 2.63 Alexander Kanavin
2022-02-02 18:27 ` [PATCH 32/33] libusb1: upgrade 1.0.24 -> 1.0.25 Alexander Kanavin
2022-02-02 18:27 ` [PATCH 33/33] re2c: upgrade 2.2 -> 3.0 Alexander Kanavin
2022-02-03 12:55 ` Claudius Heine [this message]
2022-02-03 13:28   ` [OE-core] [PATCH 01/33] seatd: add recipe Alexander Kanavin
2022-02-03 13:36     ` Claudius Heine
2022-02-03 13:46       ` Alexander Kanavin
2022-02-03 13:52         ` Claudius Heine
2022-02-03 14:02           ` Alexander Kanavin
2022-02-04 17:32 ` Khem Raj

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=8f129c19-a070-e1fe-d868-960fee2b77e6@denx.de \
    --to=ch@denx.de \
    --cc=alex.kanavin@gmail.com \
    --cc=alex@linutronix.de \
    --cc=openembedded-core@lists.openembedded.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox