All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Perez de Castro <aperez@igalia.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 2/5] package/seatd: new package
Date: Tue, 18 May 2021 16:54:20 +0300	[thread overview]
Message-ID: <20210518135423.194507-3-aperez@igalia.com> (raw)
In-Reply-To: <20210518135423.194507-1-aperez@igalia.com>

Introduce a seatd package, which can be used by wlroots 0.12.0 and
newer. The package includes both a library (always built) and an
optional seat management daemon.

The library can use systemd-logind, the seatd daemon, or a simple
builtin in-process mode. Build options are introduced for the daemon
and the built-in mode, as to allow selecting the built-in mode as
default when both the daemon and systemd-logind are not being built.

Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
---
Changes v1 -> v2:
  - Remove unneeded BR2_PACKAGE_SEATD_LIBSEAT config option (suggested
    by Yann).
  - Simplify to only have config options BR2_PACKAGE_SEATD_BUILTIN and
    BR2_PACKAGE_SEATD_DAEMON, with the support for systemd-logind
    checked directly from BR2_PACKAGE_SYSTEMD_LOGIND (suggested by Yann)
  - Add missing "systemd" dependency if systemd-logind support is
    enabled (suggested by Yann)

Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
---
 package/Config.in                             |  1 +
 ...pport-building-builtin-without-seatd.patch | 37 +++++++++++++++++++
 package/seatd/Config.in                       | 22 +++++++++++
 package/seatd/seatd.hash                      |  5 +++
 package/seatd/seatd.mk                        | 37 +++++++++++++++++++
 5 files changed, 102 insertions(+)
 create mode 100644 package/seatd/0001-meson-Support-building-builtin-without-seatd.patch
 create mode 100644 package/seatd/Config.in
 create mode 100644 package/seatd/seatd.hash
 create mode 100644 package/seatd/seatd.mk

diff --git a/package/Config.in b/package/Config.in
index 45d75c71d0..1616b2f283 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2490,6 +2490,7 @@ menu "System tools"
 	source "package/scrub/Config.in"
 	source "package/scrypt/Config.in"
 	source "package/sdbusplus/Config.in"
+	source "package/seatd/Config.in"
 	source "package/smack/Config.in"
 	source "package/start-stop-daemon/Config.in"
 	source "package/supervisor/Config.in"
diff --git a/package/seatd/0001-meson-Support-building-builtin-without-seatd.patch b/package/seatd/0001-meson-Support-building-builtin-without-seatd.patch
new file mode 100644
index 0000000000..fcaa355dc4
--- /dev/null
+++ b/package/seatd/0001-meson-Support-building-builtin-without-seatd.patch
@@ -0,0 +1,37 @@
+From 11bf7d5d11424749d549239540e5db06b8754bb5 Mon Sep 17 00:00:00 2001
+From: Kenny Levinsen <kl@kl.wtf>
+Date: Sun, 25 Apr 2021 20:16:19 +0200
+Subject: [PATCH] meson: Support building builtin without seatd
+
+The builtin backend relies on the seatd backend implementation. When
+builtin was enabled without seatd, compilation would fail due to the
+implementation not being included.
+
+Include the implementation if either seatd or builtin is enabled.
+
+Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
+Upstream-Status: backport [with adaptations]
+---
+ meson.build | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index ff56845..8cb4fc6 100644
+--- a/meson.build
++++ b/meson.build
+@@ -105,8 +105,11 @@ server_files = [
+ 	'seatd/server.c',
+ ]
+ 
+-if get_option('seatd').enabled()
++if get_option('seatd').enabled() or get_option('builtin').enabled()
+ 	private_files += 'libseat/backend/seatd.c'
++endif
++
++if get_option('seatd').enabled()
+ 	add_project_arguments('-DSEATD_ENABLED=1', language: 'c')
+ endif
+ 
+-- 
+2.31.1
+
diff --git a/package/seatd/Config.in b/package/seatd/Config.in
new file mode 100644
index 0000000000..2c2efcb04e
--- /dev/null
+++ b/package/seatd/Config.in
@@ -0,0 +1,22 @@
+menuconfig BR2_PACKAGE_SEATD
+	bool "seatd"
+	select BR2_PACKAGE_SEATD_BUILTIN \
+		if !BR2_PACKAGE_SYSTEMD_LOGIND && !BR2_PACKAGE_SEATD_DAEMON
+	help
+	  Seat management daemon and support library.
+
+	  https://git.sr.ht/~kennylevinsen/seatd
+
+if BR2_PACKAGE_SEATD
+
+config BR2_PACKAGE_SEATD_BUILTIN
+	bool "builtin backend"
+	help
+	  Builtin in-process seatd implementation inside libseat.
+
+config BR2_PACKAGE_SEATD_DAEMON
+	bool "seatd daemon"
+	help
+	  Build the seatd daemon and support for it inside libseat.
+
+endif
diff --git a/package/seatd/seatd.hash b/package/seatd/seatd.hash
new file mode 100644
index 0000000000..342079e958
--- /dev/null
+++ b/package/seatd/seatd.hash
@@ -0,0 +1,5 @@
+# Calculated locally
+sha256  274b56324fc81ca6002bc1cdd387668dee34a6e1063e5f3896805c3770948988  0.5.0.tar.gz
+
+# License files
+sha256  282a494803d666616bd726e0279636b5f6a31387ae19a707459074050f2600d3  LICENSE
diff --git a/package/seatd/seatd.mk b/package/seatd/seatd.mk
new file mode 100644
index 0000000000..2e90270555
--- /dev/null
+++ b/package/seatd/seatd.mk
@@ -0,0 +1,37 @@
+################################################################################
+#
+# seatd
+#
+################################################################################
+
+SEATD_VERSION = 0.5.0
+SEATD_SOURCE = $(SEATD_VERSION).tar.gz
+SEATD_SITE = https://git.sr.ht/~kennylevinsen/seatd/archive
+SEATD_LICENSE = MIT
+SEATD_LICENSE_FILES = LICENSE
+SEATD_INSTALL_STAGING = YES
+
+SEATD_CONF_OPTS += \
+	-Dman-pages=disabled \
+	-Dexamples=disabled
+
+ifeq ($(BR2_PACKAGE_SYSTEMD_LOGIND),y)
+SEATD_CONF_OPTS += -Dlogind=enabled
+SEATD_DEPENDENCIES += systemd
+else
+SEATD_CONF_OPTS += -Dlogind=disabled
+endif
+
+ifeq ($(BR2_PACKAGE_SEATD_BUILTIN),y)
+SEATD_CONF_OPTS += -Dbuiltin=enabled
+else
+SEATD_CONF_OPTS += -Dbuiltin=disabled
+endif
+
+ifeq ($(BR2_PACKAGE_SEATD_DAEMON),y)
+SEATD_CONF_OPTS += -Dseatd=enabled -Dserver=enabled
+else
+SEATD_CONF_OPTS += -Dseatd=disabled -Dserver=disabled
+endif
+
+$(eval $(meson-package))
-- 
2.31.1

  parent reply	other threads:[~2021-05-18 13:54 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-13 16:33 [Buildroot] [PATCH 0/6] Update Cage, wlroots, and wayland Adrian Perez de Castro
2021-05-13 16:33 ` [Buildroot] [PATCH 1/6] package/wayland: bump to version 1.19.0 Adrian Perez de Castro
2021-05-16 14:04   ` Yann E. MORIN
2021-05-18 12:13     ` Adrian Perez de Castro
2021-05-13 16:33 ` [Buildroot] [PATCH 2/6] package/wlroots: bump to version 0.13.0 Adrian Perez de Castro
2021-05-16 13:41   ` Yann E. MORIN
2021-05-18 12:22     ` Adrian Perez de Castro
2021-05-13 16:33 ` [Buildroot] [PATCH 3/6] package/seatd: new package Adrian Perez de Castro
2021-05-16 13:54   ` Yann E. MORIN
2021-05-18 13:17     ` Adrian Perez de Castro
2021-05-13 16:33 ` [Buildroot] [PATCH 4/6] package/seatd: install init scripts Adrian Perez de Castro
2021-05-16 14:00   ` Yann E. MORIN
2021-05-18 13:33     ` Adrian Perez de Castro
2021-05-13 16:33 ` [Buildroot] [PATCH 5/6] package/wlroots: use libseat when available Adrian Perez de Castro
2021-05-13 16:33 ` [Buildroot] [PATCH 6/6] package/cage: bump to version 0.1.3 Adrian Perez de Castro
2021-05-16 14:07 ` [Buildroot] [PATCH 0/6] Update Cage, wlroots, and wayland Yann E. MORIN
2021-05-18 13:54 ` [Buildroot] [PATCH v2 0/5] " Adrian Perez de Castro
2021-05-18 13:54   ` [Buildroot] [PATCH v2 1/5] package/wlroots: bump to version 0.13.0 Adrian Perez de Castro
2021-05-18 13:54   ` Adrian Perez de Castro [this message]
2021-05-18 13:54   ` [Buildroot] [PATCH v2 3/5] package/seatd: install init scripts Adrian Perez de Castro
2021-05-18 13:54   ` [Buildroot] [PATCH v2 4/5] package/wlroots: use libseat when available Adrian Perez de Castro
2021-05-18 13:54   ` [Buildroot] [PATCH v2 5/5] package/cage: bump to version 0.1.3 Adrian Perez de Castro
2021-05-18 14:00   ` [Buildroot] [PATCH v2 0/5] Update Cage, wlroots, and wayland Adrian Perez de Castro
2021-05-18 17:11   ` Yann E. MORIN
2021-05-27 13:41     ` Adrian Perez de Castro

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=20210518135423.194507-3-aperez@igalia.com \
    --to=aperez@igalia.com \
    --cc=buildroot@busybox.net \
    /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 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.