All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] seatd: add seatd recipe
@ 2021-04-20 23:43 Randy Li
  2021-04-21  1:26 ` [OE-core] " Joshua Watt
  0 siblings, 1 reply; 4+ messages in thread
From: Randy Li @ 2021-04-20 23:43 UTC (permalink / raw)
  To: openembedded-core; +Cc: alex.kanavin, contact, kl, Randy Li

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

weston would depend on it as well as wlroots.

Signed-off-by: Randy Li <ayaka@soulik.info>
---
 ...build-fixup-standalone-without-seatd.patch | 71 +++++++++++++++++++
 meta/recipes-core/seatd/libseat/init          | 50 +++++++++++++
 meta/recipes-core/seatd/libseat_0.5.0.bb      | 43 +++++++++++
 3 files changed, 164 insertions(+)
 create mode 100644 meta/recipes-core/seatd/libseat/0001-build-fixup-standalone-without-seatd.patch
 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/0001-build-fixup-standalone-without-seatd.patch b/meta/recipes-core/seatd/libseat/0001-build-fixup-standalone-without-seatd.patch
new file mode 100644
index 0000000000..66e1ac73ab
--- /dev/null
+++ b/meta/recipes-core/seatd/libseat/0001-build-fixup-standalone-without-seatd.patch
@@ -0,0 +1,71 @@
+From 084df8ab271ce4b09c1ef5d9c5a859b2d02d20e7 Mon Sep 17 00:00:00 2001
+From: ayaka <ayaka@soulik.info>
+Date: Mon, 19 Apr 2021 22:15:46 +0800
+Subject: [PATCH] build: fixup standalone without seatd
+
+I think that server option means the same thing as seatd, so I
+get rid of it.
+---
+ meson.build       | 10 +++++-----
+ meson_options.txt |  1 -
+ 2 files changed, 5 insertions(+), 6 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 7a70cb6..a2166c5 100644
+--- a/meson.build
++++ b/meson.build
+@@ -104,10 +104,11 @@ server_files = [
+ 
+ with_seatd = get_option('seatd') == 'enabled'
+ with_builtin = get_option('builtin') == 'enabled'
+-with_server = get_option('server') == 'enabled'
+ 
+-if with_seatd
++if with_seatd or with_builtin
+ 	private_files += 'libseat/backend/seatd.c'
++endif
++if with_seatd
+ 	add_project_arguments('-DSEATD_ENABLED=1', language: 'c')
+ endif
+ 
+@@ -189,7 +190,7 @@ libseat = declare_dependency(
+ 	variables: libseat_vars,
+ )
+ 
+-if with_server
++if with_seatd
+ 	executable(
+ 		'seatd',
+ 		[ server_files, 'seatd/seatd.c' ],
+@@ -221,7 +222,7 @@ foreach name, value : tests
+ 		include_directories: [include_directories('.', 'include')]))
+ endforeach
+ 
+-if with_server
++if with_seatd
+ 	scdoc = dependency('scdoc', required: get_option('man-pages'), version: '>= 1.9.7', native: true)
+ else
+ 	scdoc = disabler()
+@@ -252,7 +253,6 @@ endif
+ summary({
+ 	'seatd': with_seatd,
+ 	'builtin': with_builtin,
+-	'server': with_server,
+ 	'systemd': logind.found() and logind_provider == 'systemd',
+ 	'elogind': logind.found() and logind_provider == 'elogind',
+ }, bool_yn: true)
+diff --git a/meson_options.txt b/meson_options.txt
+index 144ce7a..c61d473 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -1,7 +1,6 @@
+ option('logind', type: 'combo', choices: ['auto', 'disabled', 'elogind', 'systemd'], value: 'auto', description: 'logind support')
+ option('seatd', type: 'combo', choices: ['enabled', 'disabled'], value: 'enabled', description: 'seatd support')
+ option('builtin', type: 'combo', choices: ['enabled', 'disabled'], value: 'disabled', description: 'builtin seatd server')
+-option('server', type: 'combo', choices: ['enabled', 'disabled'], value: 'enabled', description: 'seatd server')
+ option('examples', type: 'combo', choices: ['enabled', 'disabled'], value: 'disabled', description: 'libseat example programs')
+ option('man-pages', type: 'feature', value: 'auto', description: 'Generate and install man pages')
+ option('defaultpath', type: 'string', value: '', description: 'Default location for seatd socket (empty for default)')
+-- 
+2.30.2
+
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..8067d32a26
--- /dev/null
+++ b/meta/recipes-core/seatd/libseat_0.5.0.bb
@@ -0,0 +1,43 @@
+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 = "5535c2c3b19b42ebfe4c451600059e9418e401a6"
+SRCBRANCH = "master"
+SRC_URI = "git://git.sr.ht/~kennylevinsen/seatd;protocol=http;branch=${SRCBRANCH} \
+           file://0001-build-fixup-standalone-without-seatd.patch \
+           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, -Dseatd=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] 4+ messages in thread

* Re: [OE-core] [PATCH v3] seatd: add seatd recipe
  2021-04-20 23:43 [PATCH v3] seatd: add seatd recipe Randy Li
@ 2021-04-21  1:26 ` Joshua Watt
  2021-04-21  1:34   ` Randy Li
  0 siblings, 1 reply; 4+ messages in thread
From: Joshua Watt @ 2021-04-21  1:26 UTC (permalink / raw)
  To: Randy Li, openembedded-core; +Cc: alex.kanavin, contact, kl

[-- Attachment #1: Type: text/plain, Size: 7311 bytes --]


On 4/20/21 6:43 PM, Randy Li wrote:
> Seat management takes care of mediating access to shared devices
> (graphics, input), without requiring the applications needing access to
> be root.
>
> weston would depend on it as well as wlroots.
>
> Signed-off-by: Randy Li <ayaka@soulik.info>
> ---
>   ...build-fixup-standalone-without-seatd.patch | 71 +++++++++++++++++++
>   meta/recipes-core/seatd/libseat/init          | 50 +++++++++++++
>   meta/recipes-core/seatd/libseat_0.5.0.bb      | 43 +++++++++++
>   3 files changed, 164 insertions(+)
>   create mode 100644 meta/recipes-core/seatd/libseat/0001-build-fixup-standalone-without-seatd.patch
>   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/0001-build-fixup-standalone-without-seatd.patch b/meta/recipes-core/seatd/libseat/0001-build-fixup-standalone-without-seatd.patch
> new file mode 100644
> index 0000000000..66e1ac73ab
> --- /dev/null
> +++ b/meta/recipes-core/seatd/libseat/0001-build-fixup-standalone-without-seatd.patch
> @@ -0,0 +1,71 @@
> +From 084df8ab271ce4b09c1ef5d9c5a859b2d02d20e7 Mon Sep 17 00:00:00 2001
> +From: ayaka <ayaka@soulik.info>
> +Date: Mon, 19 Apr 2021 22:15:46 +0800
> +Subject: [PATCH] build: fixup standalone without seatd
> +
> +I think that server option means the same thing as seatd, so I
> +get rid of it.

I don't understand the purpose of this patch; why do we need to get rid 
of the server?

> +---
> + meson.build       | 10 +++++-----
> + meson_options.txt |  1 -
> + 2 files changed, 5 insertions(+), 6 deletions(-)
> +
> +diff --git a/meson.build b/meson.build
> +index 7a70cb6..a2166c5 100644
> +--- a/meson.build
> ++++ b/meson.build
> +@@ -104,10 +104,11 @@ server_files = [
> +
> + with_seatd = get_option('seatd') == 'enabled'
> + with_builtin = get_option('builtin') == 'enabled'
> +-with_server = get_option('server') == 'enabled'
> +
> +-if with_seatd
> ++if with_seatd or with_builtin
> + 	private_files += 'libseat/backend/seatd.c'
> ++endif
> ++if with_seatd
> + 	add_project_arguments('-DSEATD_ENABLED=1', language: 'c')
> + endif
> +
> +@@ -189,7 +190,7 @@ libseat = declare_dependency(
> + 	variables: libseat_vars,
> + )
> +
> +-if with_server
> ++if with_seatd
> + 	executable(
> + 		'seatd',
> + 		[ server_files, 'seatd/seatd.c' ],
> +@@ -221,7 +222,7 @@ foreach name, value : tests
> + 		include_directories: [include_directories('.', 'include')]))
> + endforeach
> +
> +-if with_server
> ++if with_seatd
> + 	scdoc = dependency('scdoc', required: get_option('man-pages'), version: '>= 1.9.7', native: true)
> + else
> + 	scdoc = disabler()
> +@@ -252,7 +253,6 @@ endif
> + summary({
> + 	'seatd': with_seatd,
> + 	'builtin': with_builtin,
> +-	'server': with_server,
> + 	'systemd': logind.found() and logind_provider == 'systemd',
> + 	'elogind': logind.found() and logind_provider == 'elogind',
> + }, bool_yn: true)
> +diff --git a/meson_options.txt b/meson_options.txt
> +index 144ce7a..c61d473 100644
> +--- a/meson_options.txt
> ++++ b/meson_options.txt
> +@@ -1,7 +1,6 @@
> + option('logind', type: 'combo', choices: ['auto', 'disabled', 'elogind', 'systemd'], value: 'auto', description: 'logind support')
> + option('seatd', type: 'combo', choices: ['enabled', 'disabled'], value: 'enabled', description: 'seatd support')
> + option('builtin', type: 'combo', choices: ['enabled', 'disabled'], value: 'disabled', description: 'builtin seatd server')
> +-option('server', type: 'combo', choices: ['enabled', 'disabled'], value: 'enabled', description: 'seatd server')
> + option('examples', type: 'combo', choices: ['enabled', 'disabled'], value: 'disabled', description: 'libseat example programs')
> + option('man-pages', type: 'feature', value: 'auto', description: 'Generate and install man pages')
> + option('defaultpath', type: 'string', value: '', description: 'Default location for seatd socket (empty for default)')
> +--
> +2.30.2
> +
> 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..8067d32a26
> --- /dev/null
> +++ b/meta/recipes-core/seatd/libseat_0.5.0.bb
> @@ -0,0 +1,43 @@
> +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 = "5535c2c3b19b42ebfe4c451600059e9418e401a6"
> +SRCBRANCH = "master"
> +SRC_URI = "git://git.sr.ht/~kennylevinsen/seatd;protocol=http;branch=${SRCBRANCH} \
> +           file://0001-build-fixup-standalone-without-seatd.patch \
> +           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, -Dseatd=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"
>
> 
>

[-- Attachment #2: Type: text/html, Size: 8214 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [OE-core] [PATCH v3] seatd: add seatd recipe
  2021-04-21  1:26 ` [OE-core] " Joshua Watt
@ 2021-04-21  1:34   ` Randy Li
       [not found]     ` <84U4SQ.FTF38TW31Y7K@kl.wtf>
  0 siblings, 1 reply; 4+ messages in thread
From: Randy Li @ 2021-04-21  1:34 UTC (permalink / raw)
  To: Joshua Watt, openembedded-core; +Cc: alex.kanavin, contact, kl


On 4/21/21 9:26 AM, Joshua Watt wrote:
>
>
> On 4/20/21 6:43 PM, Randy Li wrote:
>> Seat management takes care of mediating access to shared devices
>> (graphics, input), without requiring the applications needing access to
>> be root.
>>
>> weston would depend on it as well as wlroots.
>>
>> Signed-off-by: Randy Li<ayaka@soulik.info>
>> ---
>>   ...build-fixup-standalone-without-seatd.patch | 71 +++++++++++++++++++
>>   meta/recipes-core/seatd/libseat/init          | 50 +++++++++++++
>>   meta/recipes-core/seatd/libseat_0.5.0.bb      | 43 +++++++++++
>>   3 files changed, 164 insertions(+)
>>   create mode 100644 meta/recipes-core/seatd/libseat/0001-build-fixup-standalone-without-seatd.patch
>>   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/0001-build-fixup-standalone-without-seatd.patch b/meta/recipes-core/seatd/libseat/0001-build-fixup-standalone-without-seatd.patch
>> new file mode 100644
>> index 0000000000..66e1ac73ab
>> --- /dev/null
>> +++ b/meta/recipes-core/seatd/libseat/0001-build-fixup-standalone-without-seatd.patch
>> @@ -0,0 +1,71 @@
>> +From 084df8ab271ce4b09c1ef5d9c5a859b2d02d20e7 Mon Sep 17 00:00:00 2001
>> +From: ayaka<ayaka@soulik.info>
>> +Date: Mon, 19 Apr 2021 22:15:46 +0800
>> +Subject: [PATCH] build: fixup standalone without seatd
>> +
>> +I think that server option means the same thing as seatd, so I
>> +get rid of it.
>
> I don't understand the purpose of this patch; why do we need to get 
> rid of the server?
>
I also sent this patch to the upstream, seatd is the server of libseat, 
besides you could build a libseat with a embedded server without 
shipping the seatd.

Then the feature opinions "server" and "seatd" are both controlling the 
same thing.

I sent this patch because I tended to use the built-in version for 
sysvinit before, but later the maintainer make a decision that built-in 
server would be removed in the future. Anyway, those two opinions are 
still duplicated.

>> +---
>> + meson.build       | 10 +++++-----
>> + meson_options.txt |  1 -
>> + 2 files changed, 5 insertions(+), 6 deletions(-)
>> +
>> +diff --git a/meson.build b/meson.build
>> +index 7a70cb6..a2166c5 100644
>> +--- a/meson.build
>> ++++ b/meson.build
>> +@@ -104,10 +104,11 @@ server_files = [
>> +
>> + with_seatd = get_option('seatd') == 'enabled'
>> + with_builtin = get_option('builtin') == 'enabled'
>> +-with_server = get_option('server') == 'enabled'
>> +
>> +-if with_seatd
>> ++if with_seatd or with_builtin
>> + 	private_files += 'libseat/backend/seatd.c'
>> ++endif
>> ++if with_seatd
>> + 	add_project_arguments('-DSEATD_ENABLED=1', language: 'c')
>> + endif
>> +
>> +@@ -189,7 +190,7 @@ libseat = declare_dependency(
>> + 	variables: libseat_vars,
>> + )
>> +
>> +-if with_server
>> ++if with_seatd
>> + 	executable(
>> + 		'seatd',
>> + 		[ server_files, 'seatd/seatd.c' ],
>> +@@ -221,7 +222,7 @@ foreach name, value : tests
>> + 		include_directories: [include_directories('.', 'include')]))
>> + endforeach
>> +
>> +-if with_server
>> ++if with_seatd
>> + 	scdoc = dependency('scdoc', required: get_option('man-pages'), version: '>= 1.9.7', native: true)
>> + else
>> + 	scdoc = disabler()
>> +@@ -252,7 +253,6 @@ endif
>> + summary({
>> + 	'seatd': with_seatd,
>> + 	'builtin': with_builtin,
>> +-	'server': with_server,
>> + 	'systemd': logind.found() and logind_provider == 'systemd',
>> + 	'elogind': logind.found() and logind_provider == 'elogind',
>> + }, bool_yn: true)
>> +diff --git a/meson_options.txt b/meson_options.txt
>> +index 144ce7a..c61d473 100644
>> +--- a/meson_options.txt
>> ++++ b/meson_options.txt
>> +@@ -1,7 +1,6 @@
>> + option('logind', type: 'combo', choices: ['auto', 'disabled', 'elogind', 'systemd'], value: 'auto', description: 'logind support')
>> + option('seatd', type: 'combo', choices: ['enabled', 'disabled'], value: 'enabled', description: 'seatd support')
>> + option('builtin', type: 'combo', choices: ['enabled', 'disabled'], value: 'disabled', description: 'builtin seatd server')
>> +-option('server', type: 'combo', choices: ['enabled', 'disabled'], value: 'enabled', description: 'seatd server')
>> + option('examples', type: 'combo', choices: ['enabled', 'disabled'], value: 'disabled', description: 'libseat example programs')
>> + option('man-pages', type: 'feature', value: 'auto', description: 'Generate and install man pages')
>> + option('defaultpath', type: 'string', value: '', description: 'Default location for seatd socket (empty for default)')
>> +--
>> +2.30.2
>> +
>> 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..8067d32a26
>> --- /dev/null
>> +++ b/meta/recipes-core/seatd/libseat_0.5.0.bb
>> @@ -0,0 +1,43 @@
>> +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 = "5535c2c3b19b42ebfe4c451600059e9418e401a6"
>> +SRCBRANCH = "master"
>> +SRC_URI = "git://git.sr.ht/~kennylevinsen/seatd;protocol=http;branch=${SRCBRANCH} \
>> +file://0001-build-fixup-standalone-without-seatd.patch  \
>> +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, -Dseatd=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"
>>
>> 
>>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [OE-core] [PATCH v3] seatd: add seatd recipe
       [not found]     ` <84U4SQ.FTF38TW31Y7K@kl.wtf>
@ 2021-04-29  9:27       ` Randy Li
  0 siblings, 0 replies; 4+ messages in thread
From: Randy Li @ 2021-04-29  9:27 UTC (permalink / raw)
  To: Kenny Levinsen; +Cc: Joshua Watt, openembedded-core, alex.kanavin, contact

On 4/26/21 2:31 AM, Kenny Levinsen wrote:
> On Wed, Apr 21 2021 at 09:34:41 AM +0800, ayaka <ayaka@soulik.info> 
> wrote:
>> I also sent this patch to the upstream, seatd is the server of 
>> libseat, besides you could build a libseat with a embedded server 
>> without shipping the seatd.
>
> I have applied a more specific fix upsteam, so unrelated (but not 
> unwanted!) backend option rework can be dealt with separately.
>
> With that in mind, considering you were based on master anyway, you 
> should now be able to make the recipe without local patches.
>
>
I would send out a new recipe today

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-04-29  9:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-20 23:43 [PATCH v3] seatd: add seatd recipe Randy Li
2021-04-21  1:26 ` [OE-core] " Joshua Watt
2021-04-21  1:34   ` Randy Li
     [not found]     ` <84U4SQ.FTF38TW31Y7K@kl.wtf>
2021-04-29  9:27       ` 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.