svn commit: r553548 - in head: sysutils/seatd x11-toolkits/wlroots
Jan Beich
jbeich at FreeBSD.org
Wed Oct 28 14:42:02 UTC 2020
Author: jbeich
Date: Wed Oct 28 14:41:59 2020
New Revision: 553548
URL: https://svnweb.freebsd.org/changeset/ports/553548
Log:
x11-toolkits/wlroots: enable LIBSEAT by default
When seatd is running don't use setuid bit. Otherwise, use wlroots
direct session like before to keep POLA. For example,
$ sway
[ERROR] [libseat] [libseat/libseat.c:73] libseat_open_seat: No backend was able to open a seat
[ERROR] [backend/session/libseat.c:102] Unable to create seat: Function not implemented
<direct session started>
$ ps -lp $(pgrep -x sway)
UID PID PPID C PRI NI VSZ RSS MWCHAN STAT TT TIME COMMAND
1234 63621 63611 0 20 0 279152 107156 select S v0 0:01.11 sway
0 63623 63621 6 52 0 32124 18396 sbwait I v0 0:00.00 sway
vs.
$ service seatd onestart
$ sway
<libseat session started>
$ ps -lp $(pgrep -x sway)
UID PID PPID C PRI NI VSZ RSS MWCHAN STAT TT TIME COMMAND
1234 46290 46280 4 20 0 332924 105248 select S v0 0:05.47 sway
Modified:
head/sysutils/seatd/Makefile (contents, props changed)
head/x11-toolkits/wlroots/Makefile (contents, props changed)
head/x11-toolkits/wlroots/pkg-message (contents, props changed)
Modified: head/sysutils/seatd/Makefile
==============================================================================
--- head/sysutils/seatd/Makefile Wed Oct 28 14:41:54 2020 (r553547)
+++ head/sysutils/seatd/Makefile Wed Oct 28 14:41:59 2020 (r553548)
@@ -2,6 +2,7 @@
PORTNAME= seatd
DISTVERSION= 0.4.0
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= https://git.sr.ht/~kennylevinsen/${PORTNAME}/archive/${DISTVERSIONFULL}${EXTRACT_SUFX}?dummy=/
@@ -14,15 +15,18 @@ LICENSE_FILE= ${WRKSRC}/LICENSE
USES= compiler:c11 meson pkgconfig
USE_LDCONFIG= yes
USE_RC_SUBR= ${PORTNAME}
-MESON_ARGS= -Dbuiltin=enabled # SUID fallback
PLIST_FILES= bin/${PORTNAME} \
include/libseat.h \
lib/libseat.so \
lib/libseat.so.1 \
libdata/pkgconfig/libseat.pc
-OPTIONS_DEFINE= MANPAGES
+OPTIONS_DEFINE= MANPAGES SUID
+# XXX enable SUID after wlroots removes direct session
OPTIONS_DEFAULT=MANPAGES
+
+SUID_DESC= Fall back to builtin server when running as root
+SUID_MESON_ENABLED= builtin
MANPAGES_BUILD_DEPENDS= scdoc:textproc/scdoc
MANPAGES_MESON_ENABLED= man-pages
Modified: head/x11-toolkits/wlroots/Makefile
==============================================================================
--- head/x11-toolkits/wlroots/Makefile Wed Oct 28 14:41:54 2020 (r553547)
+++ head/x11-toolkits/wlroots/Makefile Wed Oct 28 14:41:59 2020 (r553548)
@@ -2,7 +2,7 @@
PORTNAME= wlroots
DISTVERSION= 0.11.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= x11-toolkits
PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
@@ -35,7 +35,7 @@ GH_ACCOUNT= swaywm
MESON_ARGS= -Dexamples=false
OPTIONS_DEFINE= CONSOLEKIT LIBSEAT X11
-OPTIONS_DEFAULT=X11
+OPTIONS_DEFAULT=LIBSEAT X11
OPTIONS_SUB= yes
CONSOLEKIT_DESC= DRM sessions without root using ConsoleKit2
Modified: head/x11-toolkits/wlroots/pkg-message
==============================================================================
--- head/x11-toolkits/wlroots/pkg-message Wed Oct 28 14:41:54 2020 (r553547)
+++ head/x11-toolkits/wlroots/pkg-message Wed Oct 28 14:41:59 2020 (r553548)
@@ -4,6 +4,17 @@
Known issues:
- On FreeBSD 11.* kernel needs to be rebuilt with EVDEV_SUPPORT
- On FreeBSD 11.* drm-kmod needs https://github.com/FreeBSDDesktop/kms-drm/pull/213
+
+When built with LIBSEAT enabled you may see the following:
+
+ [ERROR] [libseat] [libseat/libseat.c:73] libseat_open_seat: No backend was able to open a seat
+ [ERROR] [backend/session/libseat.c:102] Unable to create seat: Function not implemented
+
+Possible solutions (select one):
+- Ignore libseat errors to let wlroots use direct session
+- Start seatd (e.g., `service seatd onestart`) and optionally
+ prevent compositor from using SUID (e.g., `chmod u-s $(which sway)`)
+- Rebuild sysutils/seatd with SUID enabled
EOM
}
]
More information about the svn-ports-all
mailing list