svn commit: r544555 - in head: sysutils sysutils/seatd sysutils/seatd/files x11-toolkits/wlroots
Jan Beich
jbeich at FreeBSD.org
Sun Aug 9 09:35:22 UTC 2020
Author: jbeich
Date: Sun Aug 9 09:35:20 2020
New Revision: 544555
URL: https://svnweb.freebsd.org/changeset/ports/544555
Log:
sysutils/seatd: add new port
seatd is a seat management deamon, that does everything it needs to
do. Nothing more, nothing less. Depends only on libc.
libseat is 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.
WWW: https://git.sr.ht/~kennylevinsen/seatd
Added:
head/sysutils/seatd/
head/sysutils/seatd/Makefile (contents, props changed)
head/sysutils/seatd/distinfo (contents, props changed)
head/sysutils/seatd/files/
head/sysutils/seatd/files/patch-pid (contents, props changed)
head/sysutils/seatd/files/seatd.in (contents, props changed)
head/sysutils/seatd/pkg-descr (contents, props changed)
Modified:
head/sysutils/Makefile (contents, props changed)
head/x11-toolkits/wlroots/Makefile (contents, props changed)
head/x11-toolkits/wlroots/distinfo (contents, props changed)
Modified: head/sysutils/Makefile
==============================================================================
--- head/sysutils/Makefile Sun Aug 9 09:31:24 2020 (r544554)
+++ head/sysutils/Makefile Sun Aug 9 09:35:20 2020 (r544555)
@@ -1205,6 +1205,7 @@
SUBDIR += scterc
SUBDIR += sd-agent
SUBDIR += sdparm
+ SUBDIR += seatd
SUBDIR += seatools
SUBDIR += sec
SUBDIR += sensu-go
Added: head/sysutils/seatd/Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/seatd/Makefile Sun Aug 9 09:35:20 2020 (r544555)
@@ -0,0 +1,42 @@
+# $FreeBSD$
+
+PORTNAME= seatd
+PORTVERSION= s20200808
+DISTVERSIONSUFFIX= -0-gf5bc8ab
+CATEGORIES= sysutils
+MASTER_SITES= https://git.sr.ht/~kennylevinsen/${PORTNAME}/archive/${DISTVERSIONFULL}${EXTRACT_SUFX}?dummy=/
+
+MAINTAINER= jbeich at FreeBSD.org
+COMMENT= Minimal seat management daemon and universal library
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+USES= compiler:c11 meson pkgconfig
+USE_LDCONFIG= yes
+USE_RC_SUBR= ${PORTNAME}
+PLIST_FILES= bin/${PORTNAME} \
+ include/libseat.h \
+ lib/libseat.so \
+ libdata/pkgconfig/libseat.pc
+MESON_ARGS= -Dbuiltin=enabled # SUID fallback
+
+OPTIONS_DEFINE= MANPAGES
+OPTIONS_DEFAULT=MANPAGES
+
+MANPAGES_BUILD_DEPENDS= scdoc:textproc/scdoc
+MANPAGES_MESON_ENABLED= man-pages
+MANPAGES_PLIST_FILES= man/man1/${PORTNAME}.1.gz
+
+post-patch:
+# hier(7) doesn't define /run, so use /var/run
+ @${REINPLACE_CMD} -e 's,/run,/var&,' \
+ ${WRKSRC}/libseat/backend/seatd.c \
+ ${WRKSRC}/man/seatd.1.scd \
+ ${WRKSRC}/seatd/seatd.c
+# realpath(3) expands /dev/dri/ to /dev/drm/
+ @${REINPLACE_CMD} -e 's,/dev/dri,/dev/drm,' \
+ -e '/prefix/ { s/card//; s/renderD//; }' \
+ ${WRKSRC}/common/drm.c
+
+.include <bsd.port.mk>
Added: head/sysutils/seatd/distinfo
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/seatd/distinfo Sun Aug 9 09:35:20 2020 (r544555)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1596893263
+SHA256 (seatd-s20200808-0-gf5bc8ab.tar.gz) = a43eb7b91c5926463753ccddfe42a277dc40c279c63d5970c87153a462ab9816
+SIZE (seatd-s20200808-0-gf5bc8ab.tar.gz) = 30863
Added: head/sysutils/seatd/files/patch-pid
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/seatd/files/patch-pid Sun Aug 9 09:35:20 2020 (r544555)
@@ -0,0 +1,20 @@
+Similar to https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=246189
+
+--- seatd/client.c.orig 2020-08-08 13:27:43 UTC
++++ seatd/client.c
+@@ -37,10 +37,14 @@ static int get_peer(int fd, pid_t *pid, uid_t *uid, gi
+ #elif defined(__FreeBSD__)
+ struct xucred cred;
+ socklen_t len = sizeof cred;
+- if (getsockopt(fd, SOL_SOCKET, LOCAL_PEERCRED, &cred, &len) == -1) {
++ if (getsockopt(fd, 0, LOCAL_PEERCRED, &cred, &len) == -1) {
+ return -1;
+ }
++#if __FreeBSD__ < 13
+ *pid = -1;
++#else
++ *pid = cred.cr_pid;
++#endif
+ *uid = cred.cr_uid;
+ *gid = cred.cr_ngroups > 0 ? cred.cr_groups[0] : -1;
+ return 0;
Added: head/sysutils/seatd/files/seatd.in
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/seatd/files/seatd.in Sun Aug 9 09:35:20 2020 (r544555)
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: seatd
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf to enable this service:
+#
+# seatd_enable (bool): Set it to YES to run seatd on startup.
+# Default: NO
+# seatd_args (string): Options to pass to seatd.
+# Default: -g video
+
+. /etc/rc.subr
+
+name="seatd"
+rcvar="${name}_enable"
+
+load_rc_config "$name"
+
+: ${seatd_enable="NO"}
+: ${seatd_args="-g video"}
+
+command="/usr/sbin/daemon"
+procname="%%PREFIX%%/bin/${name}"
+pidfile="/var/run/${name}.pid"
+command_args="-s err -T ${name} -p ${pidfile} ${procname} ${seatd_args}"
+
+run_rc_command "$1"
Added: head/sysutils/seatd/pkg-descr
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/seatd/pkg-descr Sun Aug 9 09:35:20 2020 (r544555)
@@ -0,0 +1,18 @@
+seatd is a seat management deamon, that does everything it needs to
+do. Nothing more, nothing less. Depends only on libc.
+
+libseat is 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.
+
+WWW: https://git.sr.ht/~kennylevinsen/seatd
Modified: head/x11-toolkits/wlroots/Makefile
==============================================================================
--- head/x11-toolkits/wlroots/Makefile Sun Aug 9 09:31:24 2020 (r544554)
+++ head/x11-toolkits/wlroots/Makefile Sun Aug 9 09:35:20 2020 (r544555)
@@ -39,7 +39,7 @@ MESON_ARGS= -Dexamples=false
LLD_UNSAFE= yes
.endif
-OPTIONS_DEFINE= CONSOLEKIT X11
+OPTIONS_DEFINE= CONSOLEKIT LIBSEAT X11
OPTIONS_DEFAULT=X11
OPTIONS_SUB= yes
@@ -51,6 +51,16 @@ CONSOLEKIT_LIB_DEPENDS= libdbus-1.so:devel/dbus \
CONSOLEKIT_MESON_ENABLED= consolekit2
.if make(makesum)
.MAKEFLAGS: WITH+=CONSOLEKIT
+.endif
+
+LIBSEAT_DESC= DRM sessions with/without root via libseat (experimental)
+LIBSEAT_PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/:libseat
+LIBSEAT_PATCHFILES= be3753a4774f.patch:-p1:libseat # https://github.com/swaywm/wlroots/pull/2364
+LIBSEAT_PATCHFILES+= c1955ad1ab05.patch:-p1:libseat # FreeBSD build fix
+LIBSEAT_LIB_DEPENDS= libseat.so:sysutils/seatd
+#LIBSEAT_MESON_ENABLED= libseat
+.if make(makesum)
+.MAKEFLAGS: WITH+=LIBSEAT
.endif
X11_LIB_DEPENDS=libxcb-errors.so:x11/xcb-util-errors \
Modified: head/x11-toolkits/wlroots/distinfo
==============================================================================
--- head/x11-toolkits/wlroots/distinfo Sun Aug 9 09:31:24 2020 (r544554)
+++ head/x11-toolkits/wlroots/distinfo Sun Aug 9 09:35:20 2020 (r544555)
@@ -7,3 +7,7 @@ SHA256 (90cb6d26877b.patch) = 4c3a87dca481a637457d7409
SIZE (90cb6d26877b.patch) = 3965
SHA256 (b59460944208.patch) = 8b15ed54dcec76adf231db454ece78427eeabd5466ffd180b57ec785eeb4c507
SIZE (b59460944208.patch) = 27381
+SHA256 (be3753a4774f.patch) = 7097190a74ce45db51c6651c7780f1eb8c3fec1fcc8a2252999a28cad15a092d
+SIZE (be3753a4774f.patch) = 12350
+SHA256 (c1955ad1ab05.patch) = f32e1dfddac74b08cfbc806aac4ce9b9eecbfe3d75b4ebbb5f714fa587e85f05
+SIZE (c1955ad1ab05.patch) = 2699
More information about the svn-ports-all
mailing list