Simon Ser
753c5276cf
build: don't allow "auto" for seatd, builtin, server and examples
...
These features don't have any dependencies, so "auto" doesn't make
sense.
2021-04-08 23:07:35 +02:00
Simon Ser
ee40913810
build: don't explicitly search for sh
...
This removes the "Program sh found" line in the build logs, and
should not change anything else.
2021-04-08 23:07:35 +02:00
Simon Ser
392da918e6
build: fix logind feature summary when auto-detected
...
If -Dlogind=auto but systemd/elogind isn't available,
logind_provider would get set to the last item of the foreach loop.
This would incorrectly report "systemd: YES".
2021-04-08 23:07:35 +02:00
Simon Ser
385cc0039d
build: add explicit logind provider option, auto-detect by default
...
Allow package maintainers to explicitly select a logind provider
by passing -Dlogind=systemd or -Dlogind=elogind. In case both are
available (e.g. for distributions which support both), this makes
it possible to gte deterministic behavior.
By default, auto-detect the logind provider. That way, users which
have systemd or elogind installed get the backend built by default.
2021-04-08 23:07:35 +02:00
Kenny Levinsen
3ce4c57814
meson: make 'logind' var always available
2021-04-08 23:07:35 +02:00
Kenny Levinsen
50da164ddc
ci: Use 'auto' for arch linux logind
2021-04-08 23:07:35 +02:00
Kenny Levinsen
f9ba8b57bc
Avoid a clang-format quirk
...
clang-format wants to put the terminating NULLs on the same line as the
noop backend when it doens't have any immediate non-NULL neighbors.
Add a newline to stop it.
2021-03-26 11:34:13 +01:00
Simon Ser
fa2700126f
meson: declare libseat dependency
...
This can be used by parent projects when seatd is a subproject:
libseat = dependency('libseat', fallback: ['seatd', 'libseat'])
2021-03-26 11:21:05 +01:00
Simon Ser
9a7824b7c3
Add no-op session
...
This is useful for headless testing, for instance with VKMS:
modprobe vkms
export WLR_DRM_DEVICES=/dev/dri/card1
export WLR_BACKENDS=drm
export LIBSEAT_BACKEND=noop
sway
We don't need any of the VT handling in this case.
2021-03-26 11:11:26 +01:00
Jan Beich
5ad91ae9da
client: enable cr_pid on FreeBSD >= 12.3
...
https://cgit.freebsd.org/src/commit/?id=925f44f33862908f9a2e72520a17af148c7d0db5
https://cgit.freebsd.org/src/commit/?id=2b61bda2c75f30f6eadd18fb891fd885e4c8d19d
2021-03-21 16:27:21 +01:00
Kenny Levinsen
0d855a28f2
readme: Remove alpha label
2021-03-18 15:45:40 +01:00
Kenny Levinsen
34f55a3e24
contrib: Add Documentation to systemd unit
2021-03-16 14:27:45 +01:00
Kenny Levinsen
a9865adb5f
ci: Remove unnecessary env vars
2021-03-16 13:36:26 +01:00
Kenny Levinsen
745d662920
ci: Reduce test runs from 5 to 2
2021-03-16 13:36:26 +01:00
Kenny Levinsen
1f457b1df8
meson: Disable examples by default
2021-03-16 13:36:26 +01:00
Kenny Levinsen
4e65e1bf47
Correct minor misspellings
2021-03-16 13:03:57 +01:00
Kenny Levinsen
75cb20e891
meson: Minor cleanup
2021-03-16 13:03:57 +01:00
Kenny Levinsen
e802d381a1
meson: Fix logind backend auto mode
2021-03-16 13:03:57 +01:00
Kenny Levinsen
e303e11334
Bump version to 0.5.0
2021-03-15 20:32:27 +01:00
Kenny Levinsen
9492054920
ci: Add clang-extra-tools to alpine
...
Needed for the clang-format target.
2021-03-15 20:31:51 +01:00
Kenny Levinsen
c53c94985e
meson: Fix indentation
2021-03-15 20:26:06 +01:00
Kenny Levinsen
a9b2079319
meson: Make summary prettier
2021-03-15 20:23:09 +01:00
Kenny Levinsen
951c1790fa
meson: Clean up test declarations a bit
2021-03-15 20:22:55 +01:00
Kenny Levinsen
d8ddf590fa
log: Include debug logs in release builds
2021-03-02 00:27:38 +01:00
Kenny Levinsen
e4c28227ec
Normalize log texts a bit
2021-03-02 00:27:38 +01:00
Kenny Levinsen
79b90788bd
log: Remove function name from log
2021-03-01 01:11:37 +01:00
Kenny Levinsen
3a6a7e6b4c
clang-format
2021-02-27 21:48:03 +01:00
Kenny Levinsen
e173691cfd
seatd: Close cur_ttyfd in seat_destroy
...
This fd would only still be set after closing clients if no clients were
active on the current VT.
2021-02-27 21:46:38 +01:00
Kenny Levinsen
cedd64c283
client: Remove link if seat_add_client succeeds
...
Removing the link before before means that we can return without a link,
resulting in a double-remove.
2021-02-27 21:46:38 +01:00
Kenny Levinsen
ffd6f039f8
seatd: Clean up debug logs a bit
2021-02-27 21:46:38 +01:00
Kenny Levinsen
456d08dc83
Convert a few debug logs to error logs
2021-02-27 19:57:20 +01:00
Kenny Levinsen
ff38ea595a
seatd: Set errno in seat_add_client
2021-02-27 19:35:15 +01:00
Kenny Levinsen
6cf751af2b
logind: Fix return values from close_device/get_fd
2021-02-27 19:35:01 +01:00
Kenny Levinsen
da3cbcc943
libseat: Fix typo in doc string
2021-02-27 19:28:32 +01:00
Aleksei Bavshin
152ee5102a
meson: ignore 'man-pages' if 'server' is disabled
...
`seatd.1` is the only man page, so it's not necessary to install it or
require scdoc when the server is not built.
2021-02-27 17:45:07 +01:00
Kenny Levinsen
65d91351ab
seatd: Tear down VT when disabled client closes
...
If a client closed while it was disabled, the VT would not be torn down.
If the user navigated back to the VT it belonged to, they would be
stuck.
When a client is disabled, open the fd for the VT it belonged to and
perform regular teardown on it.
2021-02-27 16:58:44 +01:00
Kenny Levinsen
45bab8b258
client: Replace pending_disable with state enum
...
This simplifies logic in seat handling.
2021-02-27 15:51:13 +01:00
Kenny Levinsen
b1f7ec1c4d
seat: Remove unused arg from seat_deactive_device
2021-02-02 21:03:42 +01:00
Kenny Levinsen
61b086511f
logind: Send ReleaseControl when closing seat
...
This is not strictly speaking necessary as detaching from the bus should
trigger this automatically, but elogind apparently has issues with this.
Doing this explicitly does no harm, so let's just do that.
2020-12-23 00:34:02 +01:00
Kenny Levinsen
1ececbbf36
simpletest: Close fd after closing device
2020-12-14 23:41:17 +01:00
Kenny Levinsen
3755eea668
client: Fix typo in cr_pid usage
2020-12-10 10:07:43 +01:00
Kenny Levinsen
9b3bdcb12d
client: Use cr_pid if available
...
This is only available on FreeBSD 13, so test for that version.
2020-12-08 16:42:13 +01:00
Kenny Levinsen
e99e7d71f7
client: Do not use SOL_SOCKET for LOCAL_PEERCRED
...
This is wrong, and leads to LOCAL_PEERCRED being interpreted as
SO_DEBUG. 0 should be used instead.
See: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=246189 .
2020-12-08 16:38:17 +01:00
Simon Ser
e3a357bade
libseat/backend/logind: stop waiting for CanGraphical
...
Upstream says compositors should wait for DRM nodes using udev instead.
2020-12-04 23:39:39 +01:00
Kenny Levinsen
1dbf100205
logind: switch_session should return 0 on success
...
It currently returned -1 on failure and 1 on success. The API is
intended to return -1 on failure and 0 on success, so fix that.
2020-11-24 13:12:31 +01:00
Kenny Levinsen
0d5f48f433
terminal: Improve logging
2020-11-23 17:56:55 +01:00
Kenny Levinsen
e0782a825e
client: More robust handling of client links
2020-11-23 17:56:55 +01:00
Kenny Levinsen
df8494af61
poller: Retry poll immediately on EINTR
...
There is nothing for us to dispatch unless we wake on an fd, so just
retry poll if it fails with EINTR instead of doing a full dispatch loop.
2020-11-23 16:48:18 +01:00
Isaac Freund
3c80a9db96
libseat: log error when failing to open socket
...
The most common pain point I've seen with people trying out seat is
forgetting to add themselves to whatever group the distro has chosen
to own the socket.
Logging this error and path of the socket should make it easier to tell
why things aren't working.
2020-11-21 21:03:55 +01:00
Kenny Levinsen
2185e8f180
ci: Clean up build manifests
2020-11-03 15:42:09 +01:00