[01/33] seatd: add recipe

Message ID 20220202182758.919991-1-alex@linutronix.de
State Accepted, archived
Commit f0c7e8cdeea065ddfcd4187f1fabc074b2753ba1
Headers show
Series [01/33] seatd: add recipe | expand

Commit Message

Alexander Kanavin Feb. 2, 2022, 6:27 p.m. UTC
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

Comments

Claudius Heine Feb. 3, 2022, 12:55 p.m. UTC | #1
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
Alexander Kanavin Feb. 3, 2022, 1:28 p.m. UTC | #2
As far as I understand the library is not useful without the daemon, so
there is no point in packaging them separately. -dev stuff is split
automatically.

Alex

On Thu, 3 Feb 2022 at 13:55, Claudius Heine <ch@denx.de> wrote:

> 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
>
Claudius Heine Feb. 3, 2022, 1:36 p.m. UTC | #3
On 2022-02-03 14:28, Alexander Kanavin wrote:
> As far as I understand the library is not useful without the daemon, so 
> there is no point in packaging them separately. -dev stuff is split 
> automatically.

That is not the impression I got from the readme:

 > # libseat
 >
 > A seat management library allowing applications to use whatever seat 
management is available.
 >
 > Supports:
 >
 >     seatd
 >     (e)logind
 >     embedded seatd for standalone operation
 >
 > Each backend can be compile-time included and is runtime 
auto-detected or manually selected with the LIBSEAT_BACKEND environment 
variable.
 >
 > Which backend is in use is transparent to the application, providing 
a simple common interface.

https://sr.ht/~kennylevinsen/seatd/#libseat

I guess the general question is if it makes sense to split them up for OE.

regards,
Claudius

> 
> Alex
> 
> On Thu, 3 Feb 2022 at 13:55, Claudius Heine <ch@denx.de 
> <mailto:ch@denx.de>> wrote:
> 
>     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
>     <mailto: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 <http://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
>     <http://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
>     <mailto:unassigned@yoctoproject.org>>"
>      >   RECIPE_MAINTAINER:pn-sato-screenshot = "Ross Burton
>     <ross.burton@arm.com <mailto:ross.burton@arm.com>>"
>      >   RECIPE_MAINTAINER:pn-sbc = "Unassigned
>     <unassigned@yoctoproject.org <mailto:unassigned@yoctoproject.org>>"
>      >   RECIPE_MAINTAINER:pn-screen = "Anuj Mittal
>     <anuj.mittal@intel.com <mailto:anuj.mittal@intel.com>>"
>      > +RECIPE_MAINTAINER:pn-seatd = "Alexander Kanavin
>     <alex.kanavin@gmail.com <mailto:alex.kanavin@gmail.com>>"
>      >   RECIPE_MAINTAINER:pn-sed = "Chen Qi <Qi.Chen@windriver.com
>     <mailto:Qi.Chen@windriver.com>>"
>      >   RECIPE_MAINTAINER:pn-serf = "Anuj Mittal <anuj.mittal@intel.com
>     <mailto:anuj.mittal@intel.com>>"
>      >   RECIPE_MAINTAINER:pn-setserial = "Yi Zhao
>     <yi.zhao@windriver.com <mailto: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
>     <http://seatd_0.6.3.bb> b/meta/recipes-core/seatd/seatd_0.6.3.bb
>     <http://seatd_0.6.3.bb>
>      > new file mode 100644
>      > index 0000000000..0e1a79dddf
>      > --- /dev/null
>      > +++ b/meta/recipes-core/seatd/seatd_0.6.3.bb <http://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
>     <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
>     <http://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
>
Alexander Kanavin Feb. 3, 2022, 1:46 p.m. UTC | #4
The current recipe doesn't enable (or allow to enable) those alternatives,
so unless someone needs them, and tests that they work, there is still no
point in splitting.

Alex

On Thu, 3 Feb 2022 at 14:36, Claudius Heine <ch@denx.de> wrote:

> On 2022-02-03 14:28, Alexander Kanavin wrote:
> > As far as I understand the library is not useful without the daemon, so
> > there is no point in packaging them separately. -dev stuff is split
> > automatically.
>
> That is not the impression I got from the readme:
>
>  > # libseat
>  >
>  > A seat management library allowing applications to use whatever seat
> management is available.
>  >
>  > Supports:
>  >
>  >     seatd
>  >     (e)logind
>  >     embedded seatd for standalone operation
>  >
>  > Each backend can be compile-time included and is runtime
> auto-detected or manually selected with the LIBSEAT_BACKEND environment
> variable.
>  >
>  > Which backend is in use is transparent to the application, providing
> a simple common interface.
>
> https://sr.ht/~kennylevinsen/seatd/#libseat
>
> I guess the general question is if it makes sense to split them up for OE.
>
> regards,
> Claudius
>
> >
> > Alex
> >
> > On Thu, 3 Feb 2022 at 13:55, Claudius Heine <ch@denx.de
> > <mailto:ch@denx.de>> wrote:
> >
> >     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
> >     <mailto: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 <http://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
> >     <http://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
> >     <mailto:unassigned@yoctoproject.org>>"
> >      >   RECIPE_MAINTAINER:pn-sato-screenshot = "Ross Burton
> >     <ross.burton@arm.com <mailto:ross.burton@arm.com>>"
> >      >   RECIPE_MAINTAINER:pn-sbc = "Unassigned
> >     <unassigned@yoctoproject.org <mailto:unassigned@yoctoproject.org>>"
> >      >   RECIPE_MAINTAINER:pn-screen = "Anuj Mittal
> >     <anuj.mittal@intel.com <mailto:anuj.mittal@intel.com>>"
> >      > +RECIPE_MAINTAINER:pn-seatd = "Alexander Kanavin
> >     <alex.kanavin@gmail.com <mailto:alex.kanavin@gmail.com>>"
> >      >   RECIPE_MAINTAINER:pn-sed = "Chen Qi <Qi.Chen@windriver.com
> >     <mailto:Qi.Chen@windriver.com>>"
> >      >   RECIPE_MAINTAINER:pn-serf = "Anuj Mittal <anuj.mittal@intel.com
> >     <mailto:anuj.mittal@intel.com>>"
> >      >   RECIPE_MAINTAINER:pn-setserial = "Yi Zhao
> >     <yi.zhao@windriver.com <mailto: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
> >     <http://seatd_0.6.3.bb> b/meta/recipes-core/seatd/seatd_0.6.3.bb
> >     <http://seatd_0.6.3.bb>
> >      > new file mode 100644
> >      > index 0000000000..0e1a79dddf
> >      > --- /dev/null
> >      > +++ b/meta/recipes-core/seatd/seatd_0.6.3.bb <
> http://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
> >     <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
> >     <http://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
> >
>
> --
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-54 Fax: (+49)-8142-66989-80 Email: ch@denx.de
>
Claudius Heine Feb. 3, 2022, 1:52 p.m. UTC | #5
On 2022-02-03 14:46, Alexander Kanavin wrote:
> The current recipe doesn't enable (or allow to enable) those 
> alternatives, so unless someone needs them, and tests that they work, 
> there is still no point in splitting.
> 

That is reasonable. I was just a bit concerned about possible RDPENDS 
for other software packages. Depending on `libseat` seems to be more 
future-proof than `seatd` if only the library is required, whatever the 
backend is.

But I don't feel too strongly about this, so your call ;)

> Alex
> 
> On Thu, 3 Feb 2022 at 14:36, Claudius Heine <ch@denx.de 
> <mailto:ch@denx.de>> wrote:
> 
>     On 2022-02-03 14:28, Alexander Kanavin wrote:
>      > As far as I understand the library is not useful without the
>     daemon, so
>      > there is no point in packaging them separately. -dev stuff is split
>      > automatically.
> 
>     That is not the impression I got from the readme:
> 
>       > # libseat
>       >
>       > A seat management library allowing applications to use whatever
>     seat
>     management is available.
>       >
>       > Supports:
>       >
>       >     seatd
>       >     (e)logind
>       >     embedded seatd for standalone operation
>       >
>       > Each backend can be compile-time included and is runtime
>     auto-detected or manually selected with the LIBSEAT_BACKEND environment
>     variable.
>       >
>       > Which backend is in use is transparent to the application,
>     providing
>     a simple common interface.
> 
>     https://sr.ht/~kennylevinsen/seatd/#libseat
>     <https://sr.ht/~kennylevinsen/seatd/#libseat>
> 
>     I guess the general question is if it makes sense to split them up
>     for OE.
> 
>     regards,
>     Claudius
> 
>      >
>      > Alex
>      >
>      > On Thu, 3 Feb 2022 at 13:55, Claudius Heine <ch@denx.de
>     <mailto:ch@denx.de>
>      > <mailto:ch@denx.de <mailto:ch@denx.de>>> wrote:
>      >
>      >     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
>     <mailto:alex@linutronix.de>
>      >     <mailto:alex@linutronix.de <mailto: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
>     <http://seatd_0.6.3.bb> <http://seatd_0.6.3.bb <http://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 <http://seatd_0.6.3.bb>
>      >     <http://seatd_0.6.3.bb <http://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
>     <mailto:unassigned@yoctoproject.org>
>      >     <mailto:unassigned@yoctoproject.org
>     <mailto:unassigned@yoctoproject.org>>>"
>      >      >   RECIPE_MAINTAINER:pn-sato-screenshot = "Ross Burton
>      >     <ross.burton@arm.com <mailto:ross.burton@arm.com>
>     <mailto:ross.burton@arm.com <mailto:ross.burton@arm.com>>>"
>      >      >   RECIPE_MAINTAINER:pn-sbc = "Unassigned
>      >     <unassigned@yoctoproject.org
>     <mailto:unassigned@yoctoproject.org>
>     <mailto:unassigned@yoctoproject.org
>     <mailto:unassigned@yoctoproject.org>>>"
>      >      >   RECIPE_MAINTAINER:pn-screen = "Anuj Mittal
>      >     <anuj.mittal@intel.com <mailto:anuj.mittal@intel.com>
>     <mailto:anuj.mittal@intel.com <mailto:anuj.mittal@intel.com>>>"
>      >      > +RECIPE_MAINTAINER:pn-seatd = "Alexander Kanavin
>      >     <alex.kanavin@gmail.com <mailto:alex.kanavin@gmail.com>
>     <mailto:alex.kanavin@gmail.com <mailto:alex.kanavin@gmail.com>>>"
>      >      >   RECIPE_MAINTAINER:pn-sed = "Chen Qi
>     <Qi.Chen@windriver.com <mailto:Qi.Chen@windriver.com>
>      >     <mailto:Qi.Chen@windriver.com <mailto:Qi.Chen@windriver.com>>>"
>      >      >   RECIPE_MAINTAINER:pn-serf = "Anuj Mittal
>     <anuj.mittal@intel.com <mailto:anuj.mittal@intel.com>
>      >     <mailto:anuj.mittal@intel.com <mailto:anuj.mittal@intel.com>>>"
>      >      >   RECIPE_MAINTAINER:pn-setserial = "Yi Zhao
>      >     <yi.zhao@windriver.com <mailto:yi.zhao@windriver.com>
>     <mailto:yi.zhao@windriver.com <mailto: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
>     <http://seatd_0.6.3.bb>
>      >     <http://seatd_0.6.3.bb <http://seatd_0.6.3.bb>>
>     b/meta/recipes-core/seatd/seatd_0.6.3.bb <http://seatd_0.6.3.bb>
>      >     <http://seatd_0.6.3.bb <http://seatd_0.6.3.bb>>
>      >      > new file mode 100644
>      >      > index 0000000000..0e1a79dddf
>      >      > --- /dev/null
>      >      > +++ b/meta/recipes-core/seatd/seatd_0.6.3.bb
>     <http://seatd_0.6.3.bb> <http://seatd_0.6.3.bb <http://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
>     <https://git.sr.ht/~kennylevinsen/seatd>
>      >     <https://git.sr.ht/~kennylevinsen/seatd
>     <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
>     <http://git.sr.ht/~kennylevinsen/seatd;protocol=https;branch=master>
>      >   
>       <http://git.sr.ht/~kennylevinsen/seatd;protocol=https;branch=master <http://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
>      >
> 
>     -- 
>     DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
>     HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
>     Phone: (+49)-8142-66989-54 Fax: (+49)-8142-66989-80 Email:
>     ch@denx.de <mailto:ch@denx.de>
>
Alexander Kanavin Feb. 3, 2022, 2:02 p.m. UTC | #6
Shared library RDEPENDS don't need to be explicitly listed in consumer
recipes, you only need to have DEPENDS contains the seatd recipe so it's
present at build time. Bitbake magic will figure out which package provides
the library automatically.

Alex

On Thu, 3 Feb 2022 at 14:52, Claudius Heine <ch@denx.de> wrote:

> On 2022-02-03 14:46, Alexander Kanavin wrote:
> > The current recipe doesn't enable (or allow to enable) those
> > alternatives, so unless someone needs them, and tests that they work,
> > there is still no point in splitting.
> >
>
> That is reasonable. I was just a bit concerned about possible RDPENDS
> for other software packages. Depending on `libseat` seems to be more
> future-proof than `seatd` if only the library is required, whatever the
> backend is.
>
> But I don't feel too strongly about this, so your call ;)
>
> > Alex
> >
> > On Thu, 3 Feb 2022 at 14:36, Claudius Heine <ch@denx.de
> > <mailto:ch@denx.de>> wrote:
> >
> >     On 2022-02-03 14:28, Alexander Kanavin wrote:
> >      > As far as I understand the library is not useful without the
> >     daemon, so
> >      > there is no point in packaging them separately. -dev stuff is
> split
> >      > automatically.
> >
> >     That is not the impression I got from the readme:
> >
> >       > # libseat
> >       >
> >       > A seat management library allowing applications to use whatever
> >     seat
> >     management is available.
> >       >
> >       > Supports:
> >       >
> >       >     seatd
> >       >     (e)logind
> >       >     embedded seatd for standalone operation
> >       >
> >       > Each backend can be compile-time included and is runtime
> >     auto-detected or manually selected with the LIBSEAT_BACKEND
> environment
> >     variable.
> >       >
> >       > Which backend is in use is transparent to the application,
> >     providing
> >     a simple common interface.
> >
> >     https://sr.ht/~kennylevinsen/seatd/#libseat
> >     <https://sr.ht/~kennylevinsen/seatd/#libseat>
> >
> >     I guess the general question is if it makes sense to split them up
> >     for OE.
> >
> >     regards,
> >     Claudius
> >
> >      >
> >      > Alex
> >      >
> >      > On Thu, 3 Feb 2022 at 13:55, Claudius Heine <ch@denx.de
> >     <mailto:ch@denx.de>
> >      > <mailto:ch@denx.de <mailto:ch@denx.de>>> wrote:
> >      >
> >      >     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
> >     <mailto:alex@linutronix.de>
> >      >     <mailto:alex@linutronix.de <mailto: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
> >     <http://seatd_0.6.3.bb> <http://seatd_0.6.3.bb <
> http://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 <http://seatd_0.6.3.bb>
> >      >     <http://seatd_0.6.3.bb <http://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
> >     <mailto:unassigned@yoctoproject.org>
> >      >     <mailto:unassigned@yoctoproject.org
> >     <mailto:unassigned@yoctoproject.org>>>"
> >      >      >   RECIPE_MAINTAINER:pn-sato-screenshot = "Ross Burton
> >      >     <ross.burton@arm.com <mailto:ross.burton@arm.com>
> >     <mailto:ross.burton@arm.com <mailto:ross.burton@arm.com>>>"
> >      >      >   RECIPE_MAINTAINER:pn-sbc = "Unassigned
> >      >     <unassigned@yoctoproject.org
> >     <mailto:unassigned@yoctoproject.org>
> >     <mailto:unassigned@yoctoproject.org
> >     <mailto:unassigned@yoctoproject.org>>>"
> >      >      >   RECIPE_MAINTAINER:pn-screen = "Anuj Mittal
> >      >     <anuj.mittal@intel.com <mailto:anuj.mittal@intel.com>
> >     <mailto:anuj.mittal@intel.com <mailto:anuj.mittal@intel.com>>>"
> >      >      > +RECIPE_MAINTAINER:pn-seatd = "Alexander Kanavin
> >      >     <alex.kanavin@gmail.com <mailto:alex.kanavin@gmail.com>
> >     <mailto:alex.kanavin@gmail.com <mailto:alex.kanavin@gmail.com>>>"
> >      >      >   RECIPE_MAINTAINER:pn-sed = "Chen Qi
> >     <Qi.Chen@windriver.com <mailto:Qi.Chen@windriver.com>
> >      >     <mailto:Qi.Chen@windriver.com <mailto:Qi.Chen@windriver.com
> >>>"
> >      >      >   RECIPE_MAINTAINER:pn-serf = "Anuj Mittal
> >     <anuj.mittal@intel.com <mailto:anuj.mittal@intel.com>
> >      >     <mailto:anuj.mittal@intel.com <mailto:anuj.mittal@intel.com
> >>>"
> >      >      >   RECIPE_MAINTAINER:pn-setserial = "Yi Zhao
> >      >     <yi.zhao@windriver.com <mailto:yi.zhao@windriver.com>
> >     <mailto:yi.zhao@windriver.com <mailto: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
> >     <http://seatd_0.6.3.bb>
> >      >     <http://seatd_0.6.3.bb <http://seatd_0.6.3.bb>>
> >     b/meta/recipes-core/seatd/seatd_0.6.3.bb <http://seatd_0.6.3.bb>
> >      >     <http://seatd_0.6.3.bb <http://seatd_0.6.3.bb>>
> >      >      > new file mode 100644
> >      >      > index 0000000000..0e1a79dddf
> >      >      > --- /dev/null
> >      >      > +++ b/meta/recipes-core/seatd/seatd_0.6.3.bb
> >     <http://seatd_0.6.3.bb> <http://seatd_0.6.3.bb <
> http://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
> >     <https://git.sr.ht/~kennylevinsen/seatd>
> >      >     <https://git.sr.ht/~kennylevinsen/seatd
> >     <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
> >     <http://git.sr.ht/~kennylevinsen/seatd;protocol=https;branch=master>
> >      >
> >       <
> http://git.sr.ht/~kennylevinsen/seatd;protocol=https;branch=master <
> http://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
> >      >
> >
> >     --
> >     DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> >     HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> >     Phone: (+49)-8142-66989-54 Fax: (+49)-8142-66989-80 Email:
> >     ch@denx.de <mailto:ch@denx.de>
> >
>
> --
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-54 Fax: (+49)-8142-66989-80 Email: ch@denx.de
>
Khem Raj Feb. 4, 2022, 5:32 p.m. UTC | #7
fails on mips/arm64

https://errors.yoctoproject.org/Errors/Details/623915/

you might need something like
https://git.openembedded.org/meta-openembedded/tree/meta-oe/recipes-devtools/breakpad/breakpad/0001-Turn-off-sign-compare-for-musl-libc.patch

On Wed, Feb 2, 2022 at 10:28 AM Alexander Kanavin
<alex.kanavin@gmail.com> 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)}"
> +
> --
> 2.20.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#161226): https://lists.openembedded.org/g/openembedded-core/message/161226
> Mute This Topic: https://lists.openembedded.org/mt/88865275/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>

Patch

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)}"
+