This is mainly a bug fix release for the backend used by OpenBSD.
Other changes in 0.9.0 only affect the logind backend that is not
enabled.

I've included the patch proposed by landry@ to default to the noop
backend.

ok ?

Index: Makefile
===================================================================
RCS file: /cvs/OpenBSD/ports/sysutils/seatd/Makefile,v
diff -u -r1.8 Makefile
--- Makefile    3 Aug 2024 07:13:49 -0000       1.8
+++ Makefile    18 Oct 2025 17:44:32 -0000
@@ -1,9 +1,8 @@
 COMMENT        =       minimal seat management daemon and universal library
 
-V =            0.8.0
+V =            0.9.1
 DISTNAME =     seatd-$V
 CATEGORIES =   sysutils
-REVISION =     0
 
 SITES =                https://git.sr.ht/~kennylevinsen/seatd/archive/
 DISTFILES =     seatd-{}${V}${EXTRACT_SUFX}
Index: distinfo
===================================================================
RCS file: /cvs/OpenBSD/ports/sysutils/seatd/distinfo,v
diff -u -r1.3 distinfo
--- distinfo    15 Nov 2023 17:42:18 -0000      1.3
+++ distinfo    18 Oct 2025 17:44:32 -0000
@@ -1,2 +1,2 @@
-SHA256 (seatd-0.8.0.tar.gz) = pWKkTuM8yyCVShweyakOyy23oHrWsY0KyQQyjvvPZaA=
-SIZE (seatd-0.8.0.tar.gz) = 39349
+SHA256 (seatd-0.9.1.tar.gz) = gZl5ySKgviWK7RM9k5ILzmo9NWWmBYjW03LOnbJxLNM=
+SIZE (seatd-0.9.1.tar.gz) = 41968
Index: patches/patch-common_evdev_c
===================================================================
RCS file: patches/patch-common_evdev_c
diff -N patches/patch-common_evdev_c
--- patches/patch-common_evdev_c        15 Nov 2023 17:42:18 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-OpenBSD support 
-
-Index: common/evdev.c
---- common/evdev.c.orig
-+++ common/evdev.c
-@@ -25,7 +25,7 @@ int path_is_evdev(const char *path) {
- int evdev_revoke(int fd) {
-       return ioctl(fd, EVIOCREVOKE, NULL);
- }
--#elif defined(__NetBSD__)
-+#elif defined(__NetBSD__) || defined(__OpenBSD__)
- int path_is_evdev(const char *path) {
-       (void)path;
-       return 0;
Index: patches/patch-common_terminal_c
===================================================================
RCS file: /cvs/OpenBSD/ports/sysutils/seatd/patches/patch-common_terminal_c,v
diff -u -r1.2 patch-common_terminal_c
--- patches/patch-common_terminal_c     3 Aug 2024 07:13:50 -0000       1.2
+++ patches/patch-common_terminal_c     18 Oct 2025 17:44:32 -0000
@@ -42,7 +42,7 @@
        if (get_tty_path(vt, path) == -1) {
                log_errorf("Could not generate tty path: %s", strerror(errno));
                return -1;
-@@ -166,10 +185,9 @@ int terminal_open(int vt) {
+@@ -166,7 +185,7 @@ int terminal_open(int vt) {
  }
  
  int terminal_current_vt(int fd) {
@@ -50,27 +50,8 @@
 +#if defined(__linux__) || defined(__NetBSD__) || defined(__OpenBSD__)
        struct vt_stat st;
        int res = ioctl(fd, VT_GETSTATE, &st);
--      close(fd);
        if (res == -1) {
-               log_errorf("Could not retrieve VT state: %s", strerror(errno));
-               return -1;
-@@ -178,7 +196,6 @@ int terminal_current_vt(int fd) {
- #elif defined(__FreeBSD__)
-       int vt;
-       int res = ioctl(fd, VT_GETACTIVE, &vt);
--      close(fd);
-       if (res == -1) {
-               log_errorf("Could not retrieve VT state: %s", strerror(errno));
-               return -1;
-@@ -195,7 +212,6 @@ int terminal_current_vt(int fd) {
- }
- 
- int terminal_set_process_switching(int fd, bool enable) {
--      log_debugf("Setting process switching to %d", enable);
-       struct vt_mode mode = {
-               .mode = enable ? VT_PROCESS : VT_AUTO,
-               .waitv = 0,
-@@ -203,7 +219,19 @@ int terminal_set_process_switching(int fd, bool enable
+@@ -201,7 +220,19 @@ int terminal_set_process_switching(int fd, bool enable
                .acqsig = enable ? SIGUSR2 : 0,
                .frsig = FRSIG,
        };
@@ -91,36 +72,12 @@
        if (ioctl(fd, VT_SETMODE, &mode) == -1) {
                log_errorf("Could not set VT mode to %s process switching: %s",
                           enable ? "enable" : "disable", strerror(errno));
-@@ -213,7 +241,6 @@ int terminal_set_process_switching(int fd, bool enable
- }
- 
- int terminal_switch_vt(int fd, int vt) {
--      log_debugf("Switching to VT %d", vt);
-       if (ioctl(fd, VT_ACTIVATE, vt) == -1) {
-               log_errorf("Could not activate VT %d: %s", vt, strerror(errno));
-               return -1;
-@@ -223,7 +250,6 @@ int terminal_switch_vt(int fd, int vt) {
- }
- 
- int terminal_ack_release(int fd) {
--      log_debug("Acking VT release");
-       if (ioctl(fd, VT_RELDISP, 1) == -1) {
-               log_errorf("Could not ack VT release: %s", strerror(errno));
-               return -1;
-@@ -233,7 +259,6 @@ int terminal_ack_release(int fd) {
- }
- 
- int terminal_ack_acquire(int fd) {
--      log_debug("Acking VT acquire");
-       if (ioctl(fd, VT_RELDISP, VT_ACKACQ) == -1) {
-               log_errorf("Could not ack VT acquire: %s", strerror(errno));
-               return -1;
-@@ -243,12 +268,20 @@ int terminal_ack_acquire(int fd) {
+@@ -241,12 +272,23 @@ int terminal_ack_acquire(int fd) {
  }
  
  int terminal_set_keyboard(int fd, bool enable) {
--      log_debugf("Setting KD keyboard state to %d", enable);
 +#ifndef __OpenBSD__
+       log_debugf("Setting KD keyboard state to %d", enable);
        if (ioctl(fd, KDSKBMODE, enable ? K_ENABLE : K_DISABLE) == -1) {
                log_errorf("Could not set KD keyboard mode to %s: %s",
                           enable ? "enabled" : "disabled", strerror(errno));
@@ -128,6 +85,8 @@
        }
 +#else
 +      int mode = enable ? WSKBD_RAW : WSKBD_TRANSLATED;
++
++      log_debugf("Setting KD keyboard state to %d", enable);
 +      if (ioctl(fd, WSKBDIO_SETMODE, &mode) == -1) {
 +              log_errorf("Could not set keyboard mode to %s: %s",
 +                  enable ? "translated" : "raw", strerror(errno));
@@ -137,12 +96,12 @@
  #if defined(__FreeBSD__)
        struct termios tios;
        if (tcgetattr(fd, &tios) == -1) {
-@@ -270,11 +303,19 @@ int terminal_set_keyboard(int fd, bool enable) {
+@@ -268,11 +310,22 @@ int terminal_set_keyboard(int fd, bool enable) {
  }
  
  int terminal_set_graphics(int fd, bool enable) {
--      log_debugf("Setting KD graphics state to %d", enable);
 +#ifndef __OpenBSD__
+       log_debugf("Setting KD graphics state to %d", enable);
        if (ioctl(fd, KDSETMODE, enable ? KD_GRAPHICS : KD_TEXT) == -1) {
                log_errorf("Could not set KD graphics mode to %s: %s", enable ? 
"graphics" : "text",
                           strerror(errno));
@@ -150,6 +109,8 @@
        }
 +#else
 +      int mode = enable ? WSDISPLAYIO_MODE_MAPPED : WSDISPLAYIO_MODE_EMUL;
++
++      log_debugf("Setting KD graphics state to %d", enable);
 +      if (ioctl(fd, WSDISPLAYIO_SMODE, &mode) == -1) {
 +              log_errorf("Could not set graphics mode to %s: %s",
 +                  enable ? "mapped" : "emul", strerror(errno));
Index: patches/patch-libseat_libseat_c
===================================================================
RCS file: patches/patch-libseat_libseat_c
diff -N patches/patch-libseat_libseat_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-libseat_libseat_c     18 Oct 2025 17:44:33 -0000
@@ -0,0 +1,14 @@
+skip the builtin backend, so that we default to the noop backend
+(the only one working on OpenBSD for now)
+Index: libseat/libseat.c
+--- libseat/libseat.c.orig
++++ libseat/libseat.c
+@@ -65,7 +65,7 @@ struct libseat *libseat_open_seat(const struct libseat
+ 
+       struct libseat *backend = NULL;
+       for (const struct named_backend *iter = impls; iter->backend != NULL; 
iter++) {
+-              if (iter->backend == &noop_impl) {
++              if (iter->backend == &builtin_impl) {
+                       continue;
+               }
+               backend = iter->backend->open_seat(listener, data);
Index: patches/patch-meson_build
===================================================================
RCS file: /cvs/OpenBSD/ports/sysutils/seatd/patches/patch-meson_build,v
diff -u -r1.1 patch-meson_build
--- patches/patch-meson_build   15 Nov 2023 17:42:18 -0000      1.1
+++ patches/patch-meson_build   18 Oct 2025 17:44:33 -0000
@@ -11,7 +11,7 @@
                '-D_NETBSD_SOURCE',
                '-DSEATD_VERSION="@0@"'.format(meson.project_version()),
                '-DSEATD_DEFAULTPATH="@0@"'.format(defaultpath),
-@@ -158,8 +158,8 @@ if get_option('libseat-logind') != 'disabled'
+@@ -159,8 +159,8 @@ if get_option('libseat-logind') != 'disabled'
  endif
  
  # needed for cross-compilation
@@ -22,7 +22,7 @@
  
  if with_builtin
        libseat_c_args += '-DBUILTIN_ENABLED=1'
-@@ -220,14 +220,14 @@ if with_server
+@@ -221,14 +221,14 @@ if with_server
                [ server_files, 'seatd/seatd.c' ],
                include_directories: [include_directories('.', 'include')],
                install: true,
-- 
Matthieu Herrb

Reply via email to