Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: turnstile-0.1.4
@ 2023-06-28  9:12 classabbyamp
  2023-06-28 20:45 ` dkwo
                   ` (53 more replies)
  0 siblings, 54 replies; 55+ messages in thread
From: classabbyamp @ 2023-06-28  9:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 637 bytes --]

There is a new pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages new/turnstile
https://github.com/void-linux/void-packages/pull/44676

New package: turnstile-0.1.4
WIP while i create the runit backend upstream (mostly done)

#### Testing the changes
- I tested the changes in this PR: **NO**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**



A patch file from https://github.com/void-linux/void-packages/pull/44676.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-new/turnstile-44676.patch --]
[-- Type: text/x-diff, Size: 1576 bytes --]

From 434dd0ae78c7195e6ac4e882a0b528141206d8f3 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Wed, 28 Jun 2023 05:10:55 -0400
Subject: [PATCH] New package: turnstile-0.1.4

---
 srcpkgs/turnstile/files/turnstiled/run |  4 ++++
 srcpkgs/turnstile/template             | 20 ++++++++++++++++++++
 2 files changed, 24 insertions(+)
 create mode 100644 srcpkgs/turnstile/files/turnstiled/run
 create mode 100644 srcpkgs/turnstile/template

diff --git a/srcpkgs/turnstile/files/turnstiled/run b/srcpkgs/turnstile/files/turnstiled/run
new file mode 100644
index 000000000000..aa5d624fda19
--- /dev/null
+++ b/srcpkgs/turnstile/files/turnstiled/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+exec 2>&1
+exec turnstiled
diff --git a/srcpkgs/turnstile/template b/srcpkgs/turnstile/template
new file mode 100644
index 000000000000..8f2610005ee7
--- /dev/null
+++ b/srcpkgs/turnstile/template
@@ -0,0 +1,20 @@
+# Template file for 'turnstile'
+pkgname=turnstile
+version=0.1.4
+revision=1
+build_style=meson
+configure_args="-Ddinit=disabled -Drunit=enabled"
+hostmakedepends="pkg-config scdoc"
+makedepends="pam-devel"
+short_desc="Independent session/login tracker"
+maintainer="classabbyamp <void@placeviolette.net>"
+license="BSD-2-Clause"
+homepage="https://github.com/chimera-linux/turnstile"
+distfiles="https://github.com/chimera-linux/turnstile/archive/refs/tags/v${version}.tar.gz"
+checksum=48b7c785a362bec7b29a61e63a0b06748cc7ffceb56f1bdfc025cadd9e9240d0
+conf_files="/etc/turnstile/turnstiled.conf"
+
+post_install() {
+	vsv turnstiled
+	vlicense COPYING.md
+}

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: New package: turnstile-0.1.4
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
@ 2023-06-28 20:45 ` dkwo
  2023-06-28 21:36 ` classabbyamp
                   ` (52 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: dkwo @ 2023-06-28 20:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 314 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/44676#issuecomment-1612082631

Comment:
This is interesting. Besides creating /run/user/nnn, can the runit backend be used to supervise user services, like pipewire or running mbsync? I'd be happy to help with test.

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: New package: turnstile-0.1.4
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
  2023-06-28 20:45 ` dkwo
@ 2023-06-28 21:36 ` classabbyamp
  2023-07-04  8:36 ` [PR PATCH] [Updated] " classabbyamp
                   ` (51 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: classabbyamp @ 2023-06-28 21:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 401 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/44676#issuecomment-1612139934

Comment:
yes. i have it mostly working but i haven't pushed the changes yet. note that the commit i linked does not work, I needed to do a fair amount of refactoring to get it to work. need to do other things for the moment, will probably get back to it next week

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PR PATCH] [Updated] New package: turnstile-0.1.4
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
  2023-06-28 20:45 ` dkwo
  2023-06-28 21:36 ` classabbyamp
@ 2023-07-04  8:36 ` classabbyamp
  2023-07-04  8:40 ` classabbyamp
                   ` (50 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: classabbyamp @ 2023-07-04  8:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 740 bytes --]

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages new/turnstile
https://github.com/void-linux/void-packages/pull/44676

New package: turnstile-0.1.4
WIP while i create the runit backend upstream ([mostly done](https://github.com/chimera-linux/turnstile/compare/master...classabbyamp:runit-backend))

#### Testing the changes
- I tested the changes in this PR: **NO**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**



A patch file from https://github.com/void-linux/void-packages/pull/44676.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-new/turnstile-44676.patch --]
[-- Type: text/x-diff, Size: 20603 bytes --]

From 904de399f3ac5fcaa9ea7f5256b22a102b028a52 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sun, 2 Jul 2023 22:04:40 -0400
Subject: [PATCH 1/2] pam-base: add turnstile pam

---
 srcpkgs/pam-base/files/system-login | 1 +
 srcpkgs/pam-base/template           | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/pam-base/files/system-login b/srcpkgs/pam-base/files/system-login
index 2275deba480d..72c4638f07d3 100644
--- a/srcpkgs/pam-base/files/system-login
+++ b/srcpkgs/pam-base/files/system-login
@@ -14,6 +14,7 @@ session    optional   pam_loginuid.so
 session    include    system-auth
 session    optional   pam_motd.so          motd=/etc/motd
 session    optional   pam_mail.so          dir=/var/mail standard quiet
+-session   optional   pam_turnstile.so
 -session   optional   pam_elogind.so
 -session   optional   pam_dumb_runtime_dir.so
 session    required   pam_env.so
diff --git a/srcpkgs/pam-base/template b/srcpkgs/pam-base/template
index 70dfab9fa996..38bfa74cd885 100644
--- a/srcpkgs/pam-base/template
+++ b/srcpkgs/pam-base/template
@@ -1,7 +1,7 @@
 # Template file for 'pam-base'
 pkgname=pam-base
 version=0.4
-revision=2
+revision=3
 short_desc="PAM base configuration files"
 maintainer="Érico Nogueira <ericonr@disroot.org>"
 license="Public Domain"

From 4ad4f22baef9b1e8016f708d259465a9afc069b1 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Wed, 28 Jun 2023 05:10:55 -0400
Subject: [PATCH 2/2] New package: turnstile-0.1.5

---
 srcpkgs/turnstile/files/README.voidlinux |  32 +++
 srcpkgs/turnstile/files/dbus.run         |   5 +
 srcpkgs/turnstile/files/turnstiled/run   |   4 +
 srcpkgs/turnstile/patches/pipe.patch     | 256 +++++++++++++++++++++++
 srcpkgs/turnstile/patches/runit.patch    | 184 ++++++++++++++++
 srcpkgs/turnstile/template               |  24 +++
 6 files changed, 505 insertions(+)
 create mode 100644 srcpkgs/turnstile/files/README.voidlinux
 create mode 100755 srcpkgs/turnstile/files/dbus.run
 create mode 100644 srcpkgs/turnstile/files/turnstiled/run
 create mode 100644 srcpkgs/turnstile/patches/pipe.patch
 create mode 100644 srcpkgs/turnstile/patches/runit.patch
 create mode 100644 srcpkgs/turnstile/template

diff --git a/srcpkgs/turnstile/files/README.voidlinux b/srcpkgs/turnstile/files/README.voidlinux
new file mode 100644
index 000000000000..46214113067e
--- /dev/null
+++ b/srcpkgs/turnstile/files/README.voidlinux
@@ -0,0 +1,32 @@
+# User Services
+
+User services can be placed in ~/.config/service/.
+
+To ensure that a subset of services are started before login can proceed,
+these services can be listed in ~/.config/service/turnstile-ready/conf, for
+example:
+
+	core_services="dbus foo"
+
+The turnstile-ready service is created by turnstile on first login.
+
+# D-Bus Session Bus
+
+If you want to manage dbus using a turnstile-managed runit user service:
+
+	mkdir ~/.config/service/dbus
+	cp /usr/share/examples/turnstile/dbus.run ~/.config/service/dbus/run
+
+# Elogind Replacement
+
+Turnstile is not (nor ever will be, according to the developer) a complete
+replacement for elogind, but it can replace several parts, including
+XDG_RUNTIME_DIR management.
+
+If using turnstile with elogind:
+- disable rundir management in /etc/turnstile/turnstiled.conf
+  (manage_rundir = no)
+
+If using turnstile without elogind:
+- install and enable seatd for seat management
+- install and enable acpid for lid switch/button handling
diff --git a/srcpkgs/turnstile/files/dbus.run b/srcpkgs/turnstile/files/dbus.run
new file mode 100755
index 000000000000..08d45d41be45
--- /dev/null
+++ b/srcpkgs/turnstile/files/dbus.run
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+[ -r ./conf ] && . ./conf
+
+exec dbus-daemon --session --nofork --nopidfile --address="$DBUS_SESSION_BUS_ADDRESS" $OPTS
diff --git a/srcpkgs/turnstile/files/turnstiled/run b/srcpkgs/turnstile/files/turnstiled/run
new file mode 100644
index 000000000000..aa5d624fda19
--- /dev/null
+++ b/srcpkgs/turnstile/files/turnstiled/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+exec 2>&1
+exec turnstiled
diff --git a/srcpkgs/turnstile/patches/pipe.patch b/srcpkgs/turnstile/patches/pipe.patch
new file mode 100644
index 000000000000..7ef856ad24bb
--- /dev/null
+++ b/srcpkgs/turnstile/patches/pipe.patch
@@ -0,0 +1,256 @@
+From 795cb7359d542aa470e119e79ea7f74339d294ab Mon Sep 17 00:00:00 2001
+From: q66 <q66@chimera-linux.org>
+Date: Tue, 4 Jul 2023 01:15:26 +0200
+Subject: [PATCH] use named pipes for signaling readiness instead of fds
+
+This is more versatile as it allows any process to open the
+readiness pipe, which is important for service managers that
+cannot directly report their readiness with a file descriptor
+(as those would then have the pipe fd opened forever which would
+result in readiness not being reported).
+---
+ backend/dinit     | 10 ++++-----
+ src/exec_utils.cc | 26 +++++++----------------
+ src/turnstiled.cc | 53 ++++++++++++++++++++++++++++++-----------------
+ src/turnstiled.hh |  2 +-
+ 4 files changed, 47 insertions(+), 44 deletions(-)
+
+diff --git a/backend/dinit b/backend/dinit
+index 792c2dc..8eeeeaf 100644
+--- a/backend/dinit
++++ b/backend/dinit
+@@ -15,8 +15,8 @@
+ #
+ # Arguments for "run":
+ #
+-# ready_fd: file descriptor that should be poked with a string; this will
+-#           be passed to the "ready" script of the sequence as its sole
++# ready_p:  path to named pipe (fifo) that should be poked with a string; this
++#           will be passed to the "ready" script of the sequence as its sole
+ #           argument (here this is a control socket path)
+ # srvdir:   an internal directory that can be used by the service manager
+ #           for any purpose (usually to keep track of its state)
+@@ -47,11 +47,11 @@ case "$1" in
+         ;;
+ esac
+ 
+-DINIT_READY_FD="$2"
++DINIT_READY_PIPE="$2"
+ DINIT_DIR="$3"
+ DINIT_CONF="$4/dinit.conf"
+ 
+-if [ -z "$DINIT_READY_FD" -o -z "$DINIT_DIR" -o ! -d "$DINIT_DIR" ]; then
++if [ ! -p "$DINIT_READY_PIPE" -o ! -d "$DINIT_DIR" ]; then
+     echo "dinit: invalid input argument(s)" >&2
+     exit 69
+ fi
+@@ -106,4 +106,4 @@ type = internal
+ waits-for.d = ${system_boot_dir}
+ EOF
+ 
+-exec dinit --user --ready-fd "$DINIT_READY_FD" --services-dir "$DINIT_DIR" "$@"
++exec dinit --user --ready-fd 3 --services-dir "$DINIT_DIR" "$@" 3>"$DINIT_READY_PIPE"
+diff --git a/src/exec_utils.cc b/src/exec_utils.cc
+index 06da738..c923d65 100644
+--- a/src/exec_utils.cc
++++ b/src/exec_utils.cc
+@@ -150,7 +150,7 @@ static void sig_handler(int sign) {
+     write(sigpipe[1], &sign, sizeof(sign));
+ }
+ 
+-static void fork_and_wait(pam_handle_t *pamh, int dpipe) {
++static void fork_and_wait(pam_handle_t *pamh) {
+     int pst, status;
+     struct pollfd pfd;
+     struct sigaction sa{};
+@@ -186,8 +186,6 @@ static void fork_and_wait(pam_handle_t *pamh, int dpipe) {
+     sigemptyset(&sa.sa_mask);
+     sigaction(SIGCHLD, &sa, nullptr);
+     sigaction(SIGTERM, &sa, nullptr);
+-    /* make sure we don't block this pipe */
+-    close(dpipe);
+     /* our own little event loop */
+     for (;;) {
+         auto pret = poll(&pfd, 1, -1);
+@@ -240,13 +238,7 @@ fail:
+ }
+ 
+ /* dummy "service manager" child process with none backend */
+-static void srv_dummy(int pipew) {
+-    /* we're always ready, the dummy process just sleeps forever */
+-    if (write(pipew, "poke", 5) != 5) {
+-        perror("dummy: failed to poke the pipe");
+-        return;
+-    }
+-    close(pipew);
++static void srv_dummy() {
+     /* block all signals except the ones we need to terminate */
+     sigset_t mask;
+     sigfillset(&mask);
+@@ -259,7 +251,7 @@ static void srv_dummy(int pipew) {
+     exit(0);
+ }
+ 
+-void srv_child(session &sess, char const *backend, int dpipe, bool dummy) {
++void srv_child(session &sess, char const *backend, bool dummy) {
+     pam_handle_t *pamh = nullptr;
+     bool is_root = (getuid() == 0);
+     /* create a new session */
+@@ -276,10 +268,10 @@ void srv_child(session &sess, char const *backend, int dpipe, bool dummy) {
+     /* handle the parent/child logic here
+      * if we're forking, only child makes it past this func
+      */
+-    fork_and_wait(pamh, dpipe);
++    fork_and_wait(pamh);
+     /* dummy service manager if requested */
+     if (dummy) {
+-        srv_dummy(dpipe);
++        srv_dummy();
+         return;
+     }
+     /* drop privs */
+@@ -329,12 +321,8 @@ void srv_child(session &sess, char const *backend, int dpipe, bool dummy) {
+     add_str(LIBEXEC_PATH, "/", backend);
+     /* arg1: action */
+     add_str("run");
+-    /* arg1: ready_fd */
+-    {
+-        char pipestr[32];
+-        std::snprintf(pipestr, sizeof(pipestr), "%d", dpipe);
+-        add_str(pipestr);
+-    }
++    /* arg1: ready pipe */
++    add_str(RUN_PATH, "/", SOCK_DIR, "/", sess.uids, "/ready");
+     /* arg2: srvdir */
+     add_str(RUN_PATH, "/", SOCK_DIR, "/", sess.uids, "/", tdirn);
+     /* arg3: confdir */
+diff --git a/src/turnstiled.cc b/src/turnstiled.cc
+index d2ad545..3feb5ad 100644
+--- a/src/turnstiled.cc
++++ b/src/turnstiled.cc
+@@ -116,7 +116,6 @@ static int sigpipe[2] = {-1, -1};
+ 
+ /* start the service manager instance for a session */
+ static bool srv_start(session &sess) {
+-    int dpipe[2];
+     /* mark as waiting */
+     sess.srv_wait = true;
+     /* make rundir if needed, we don't want to create that and session dir
+@@ -152,11 +151,25 @@ static bool srv_start(session &sess) {
+             sess.remove_sdir();
+             return false;
+         }
+-    }
+-    /* here we'll receive the initial readiness string from the backend */
+-    if (pipe2(dpipe, O_NONBLOCK) < 0) {
+-        print_err("srv: pipe2 failed (%s)", strerror(errno));
+-        return false;
++        print_dbg("srv: create readiness pipe");
++        unlinkat(sess.dirfd, "ready", 0);
++        if (mkfifoat(sess.dirfd, "ready", 0700) < 0) {
++            print_err("srv: failed to make ready pipe (%s)", strerror(errno));
++            return false;
++        }
++        /* ensure it's owned by user too, and open in nonblocking mode */
++        if (fchownat(
++            sess.dirfd, "ready", sess.uid, sess.gid, AT_SYMLINK_NOFOLLOW
++        ) || ((sess.userpipe = openat(
++            sess.dirfd, "ready", O_NONBLOCK | O_RDONLY
++        )) < 0)) {
++            print_err(
++                "srv: failed to set up ready pipe (%s)", strerror(errno)
++            );
++            unlinkat(sess.dirfd, "ready", 0);
++            sess.remove_sdir();
++            return false;
++        }
+     }
+     /* set up the timer, issue SIGLARM when it fires */
+     print_dbg("srv: timer set");
+@@ -181,22 +194,25 @@ static bool srv_start(session &sess) {
+         sigaction(SIGTERM, &sa, nullptr);
+         sigaction(SIGINT, &sa, nullptr);
+         /* close some descriptors, these can be reused */
++        close(sess.userpipe);
+         close(userv_dirfd);
+-        close(dpipe[0]);
+         close(sigpipe[0]);
+         close(sigpipe[1]);
+         /* and run the session */
+-        srv_child(sess, cdata->backend.data(), dpipe[1], cdata->disable);
++        srv_child(sess, cdata->backend.data(), cdata->disable);
+         exit(1);
+     } else if (pid < 0) {
+         print_err("srv: fork failed (%s)", strerror(errno));
+         return false;
+     }
+     /* close the write end on our side */
+-    close(dpipe[1]);
+     sess.srv_pending = false;
+     sess.srv_pid = pid;
+-    sess.userpipe = dpipe[0];
++    if (sess.userpipe < 0) {
++        /* disabled */
++        return srv_boot(sess, nullptr);
++    }
++    /* otherwise queue the pipe */
+     sess.pipe_queued = true;
+     return true;
+ }
+@@ -728,6 +744,7 @@ static bool fd_handle_pipe(std::size_t i) {
+         /* this should never happen */
+         return false;
+     }
++    bool done = false;
+     if (fds[i].revents & POLLIN) {
+         /* read the string from the pipe */
+         for (;;) {
+@@ -735,10 +752,15 @@ static bool fd_handle_pipe(std::size_t i) {
+             if (read(fds[i].fd, &c, 1) != 1) {
+                 break;
+             }
++            if (c == '\0') {
++                /* done receiving */
++                done = true;
++                break;
++            }
+             sess->srvstr.push_back(c);
+         }
+     }
+-    if (fds[i].revents & POLLHUP) {
++    if (done || (fds[i].revents & POLLHUP)) {
+         /* kill the pipe, we don't need it anymore */
+         close(sess->userpipe);
+         sess->userpipe = -1;
+@@ -747,15 +769,8 @@ static bool fd_handle_pipe(std::size_t i) {
+         fds[i].fd = -1;
+         fds[i].revents = 0;
+         --npipes;
+-        /* but error early if needed */
+-        if (sess->srvstr.empty()) {
+-            print_err("read failed (%s)", strerror(errno));
+-            return true;
+-        }
+         /* wait for the boot service to come up */
+-        if (!srv_boot(
+-            *sess, cdata->disable ? nullptr : cdata->backend.data()
+-        )) {
++        if (!srv_boot(*sess, cdata->backend.data())) {
+             /* this is an unrecoverable condition */
+             return false;
+         }
+diff --git a/src/turnstiled.hh b/src/turnstiled.hh
+index f2739c4..58e4edb 100644
+--- a/src/turnstiled.hh
++++ b/src/turnstiled.hh
+@@ -86,7 +86,7 @@ bool cfg_expand_rundir(
+ );
+ 
+ /* service manager utilities */
+-void srv_child(session &sess, char const *backend, int p, bool d);
++void srv_child(session &sess, char const *backend, bool d);
+ bool srv_boot(session &sess, char const *backend);
+ 
+ struct cfg_data {
+-- 
+2.41.0
diff --git a/srcpkgs/turnstile/patches/runit.patch b/srcpkgs/turnstile/patches/runit.patch
new file mode 100644
index 000000000000..8c120f382206
--- /dev/null
+++ b/srcpkgs/turnstile/patches/runit.patch
@@ -0,0 +1,184 @@
+From 22933f404cee49974f51c0873c897d0b565c5620 Mon Sep 17 00:00:00 2001
+From: classabbyamp <dev@placeviolette.net>
+Date: Wed, 28 Jun 2023 05:05:25 -0400
+Subject: [PATCH] add runit backend
+
+---
+ backend/meson.build | 16 +++++++++
+ backend/runit       | 80 +++++++++++++++++++++++++++++++++++++++++++++
+ backend/runit.conf  | 13 ++++++++
+ meson.build         |  3 ++
+ meson_options.txt   |  5 +++
+ 5 files changed, 117 insertions(+)
+ create mode 100644 backend/runit
+ create mode 100644 backend/runit.conf
+
+diff --git a/backend/meson.build b/backend/meson.build
+index 681e6a0..e4c63f1 100644
+--- a/backend/meson.build
++++ b/backend/meson.build
+@@ -13,3 +13,19 @@ if have_dinit
+         install_mode: 'rw-r--r--'
+     )
+ endif
++
++# runit backend
++
++if have_runit
++    install_data(
++        'runit',
++        install_dir: join_paths(get_option('libexecdir'), 'turnstile'),
++        install_mode: 'rwxr-xr-x'
++    )
++
++    install_data(
++        'runit.conf',
++        install_dir: join_paths(get_option('sysconfdir'), 'turnstile/backend'),
++        install_mode: 'rw-r--r--'
++    )
++endif
+diff --git a/backend/runit b/backend/runit
+new file mode 100644
+index 0000000..e8370d6
+--- /dev/null
++++ b/backend/runit
+@@ -0,0 +1,80 @@
++#!/bin/sh
++#
++# This is the turnstile runit backend. It accepts the action as its first
++# argument, which is either "ready" or "run". In case of "run", it's invoked
++# directly through /bin/sh as if it was a login shell, and therefore it has
++# acccess to shell profile, and the shebang is functionally useless but
++# should be preserved as a convention. For "ready", it's a regular shell.
++#
++# Arguments for "ready":
++#
++# ready_sv: path to the readiness service
++#
++# Arguments for "run":
++#
++# ready_p:  readiness pipe (fifo). has the path to the ready service written to it.
++# srvdir:   unused
++# confdir:  the path where turnstile's configuration data resides, used
++#           to source the configuration file
++#
++# Copyright 2023 classabbyamp <dev@placeviolette.net>
++# License: BSD-2-Clause
++
++case "$1" in
++    run) ;;
++    ready)
++        set -x
++        echo "runit: ready_sv: $2" >&2
++        if [ -z "$2" ] || [ ! -d "$2" ]; then
++            echo "runit: invalid readiness service '$2'" >&2
++            exit 69
++        fi
++        sv start "$2" >&2
++        set +x
++        exit 0
++        ;;
++    *)
++        exit 32
++        ;;
++esac
++
++RUNIT_READY_PIPE="$2"
++RUNIT_CONF="$4/runit.conf"
++
++if [ ! -p "$RUNIT_READY_PIPE" ]; then
++    echo "runit: invalid input argument(s)" >&2
++    exit 69
++fi
++
++if [ -z "$HOME" ] || [ ! -d "$HOME" ]; then
++    echo "runit: invalid home directory" >&2
++    exit 70
++fi
++
++shift $#
++
++# be strict
++set -e
++
++# source the conf
++[ -r "$RUNIT_CONF" ] && . "$RUNIT_CONF"
++
++# set some defaults in case the conf cannot be read or is mangled
++: "${ready_sv:="turnstile-ready"}"
++: "${services_dir:="${HOME}/.config/service"}"
++
++mkdir -p "${services_dir}/${ready_sv}" > /dev/null 2>&1
++
++# this must succeed
++cat << EOF > "${services_dir}/${ready_sv}/run"
++#!/bin/sh
++[ -r ./conf ] && . ./conf
++[ -n "\$core_services" ] && SVDIR=".." sv start \$core_services
++[ -p "$RUNIT_READY_PIPE" ] && printf "${services_dir}/${ready_sv}" > "$RUNIT_READY_PIPE"
++exec pause
++EOF
++chmod +x "${services_dir}/${ready_sv}/run"
++
++exec env DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$(id -u)/bus" \
++    runsvdir -P "$services_dir" \
++    'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+diff --git a/backend/runit.conf b/backend/runit.conf
+new file mode 100644
+index 0000000..7b258c9
+--- /dev/null
++++ b/backend/runit.conf
+@@ -0,0 +1,13 @@
++# This is the configuration file for turnstile's runit backend.
++#
++# It follows the POSIX shell syntax (being sourced into a script).
++# The complete launch environment available to dinit can be used.
++#
++# It is a low-level configuration file. In most cases, it should
++# not be modified by the user.
++
++# the name of the service that turnstile will check for login readiness
++ready_sv="turnstile-ready"
++
++# the directory user service files are read from.
++services_dir="${HOME}/.config/service"
+diff --git a/meson.build b/meson.build
+index 823ff2a..de82e21 100644
+--- a/meson.build
++++ b/meson.build
+@@ -23,6 +23,7 @@ scdoc_dep = dependency(
+ )
+ 
+ have_dinit = get_option('dinit').enabled()
++have_runit = get_option('runit').enabled()
+ 
+ conf_data = configuration_data()
+ conf_data.set_quoted('RUN_PATH', get_option('rundir'))
+@@ -103,6 +104,8 @@ install_data(
+ # decide the default backend
+ if have_dinit
+     default_backend = 'dinit'
++elif have_runit
++    default_backend = 'runit'
+ else
+     default_backend = 'none'
+ endif
+diff --git a/meson_options.txt b/meson_options.txt
+index 9b03995..85ea1ce 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -3,6 +3,11 @@ option('dinit',
+     description: 'Whether to install Dinit-related backend and data'
+ )
+ 
++option('runit',
++    type: 'feature', value: 'disabled',
++    description: 'Whether to install runit-related backend and data'
++)
++
+ option('rundir',
+     type: 'string', value: '/run',
+     description: 'Where the base directory will be located'
+-- 
+2.41.0
+
diff --git a/srcpkgs/turnstile/template b/srcpkgs/turnstile/template
new file mode 100644
index 000000000000..ab0d216bea67
--- /dev/null
+++ b/srcpkgs/turnstile/template
@@ -0,0 +1,24 @@
+# Template file for 'turnstile'
+pkgname=turnstile
+version=0.1.5+1
+revision=1
+build_style=meson
+configure_args="-Ddinit=disabled -Drunit=enabled -Dmanage_rundir=true"
+hostmakedepends="pkg-config scdoc"
+makedepends="pam-devel"
+short_desc="Independent session/login tracker and user service manager"
+maintainer="classabbyamp <void@placeviolette.net>"
+license="BSD-2-Clause"
+homepage="https://github.com/chimera-linux/turnstile"
+# distfiles="https://github.com/chimera-linux/turnstile/archive/refs/tags/v${version}.tar.gz"
+_commit="b5f3b18419efa088697310fb67584ccc6b5f8142"
+distfiles="https://github.com/chimera-linux/turnstile/archive/${_commit}.tar.gz"
+checksum=6805bb6a561cab7d59b75feec695bf01da3a517d360b82527f462035df854c9a
+conf_files="/etc/turnstile/turnstiled.conf"
+
+post_install() {
+	vsv turnstiled
+	vsconf "${FILESDIR}/dbus.run"
+	vdoc "${FILESDIR}/README.voidlinux"
+	vlicense COPYING.md
+}

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PR PATCH] [Updated] New package: turnstile-0.1.4
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (2 preceding siblings ...)
  2023-07-04  8:36 ` [PR PATCH] [Updated] " classabbyamp
@ 2023-07-04  8:40 ` classabbyamp
  2023-07-04  8:43 ` classabbyamp
                   ` (49 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: classabbyamp @ 2023-07-04  8:40 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 740 bytes --]

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages new/turnstile
https://github.com/void-linux/void-packages/pull/44676

New package: turnstile-0.1.4
WIP while i create the runit backend upstream ([mostly done](https://github.com/chimera-linux/turnstile/compare/master...classabbyamp:runit-backend))

#### Testing the changes
- I tested the changes in this PR: **NO**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**



A patch file from https://github.com/void-linux/void-packages/pull/44676.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-new/turnstile-44676.patch --]
[-- Type: text/x-diff, Size: 20603 bytes --]

From 904de399f3ac5fcaa9ea7f5256b22a102b028a52 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sun, 2 Jul 2023 22:04:40 -0400
Subject: [PATCH 1/2] pam-base: add turnstile pam

---
 srcpkgs/pam-base/files/system-login | 1 +
 srcpkgs/pam-base/template           | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/pam-base/files/system-login b/srcpkgs/pam-base/files/system-login
index 2275deba480d..72c4638f07d3 100644
--- a/srcpkgs/pam-base/files/system-login
+++ b/srcpkgs/pam-base/files/system-login
@@ -14,6 +14,7 @@ session    optional   pam_loginuid.so
 session    include    system-auth
 session    optional   pam_motd.so          motd=/etc/motd
 session    optional   pam_mail.so          dir=/var/mail standard quiet
+-session   optional   pam_turnstile.so
 -session   optional   pam_elogind.so
 -session   optional   pam_dumb_runtime_dir.so
 session    required   pam_env.so
diff --git a/srcpkgs/pam-base/template b/srcpkgs/pam-base/template
index 70dfab9fa996..38bfa74cd885 100644
--- a/srcpkgs/pam-base/template
+++ b/srcpkgs/pam-base/template
@@ -1,7 +1,7 @@
 # Template file for 'pam-base'
 pkgname=pam-base
 version=0.4
-revision=2
+revision=3
 short_desc="PAM base configuration files"
 maintainer="Érico Nogueira <ericonr@disroot.org>"
 license="Public Domain"

From 572da3b6a2a95f83d13eedd477037620e6f7bc99 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Wed, 28 Jun 2023 05:10:55 -0400
Subject: [PATCH 2/2] New package: turnstile-0.1.5

---
 srcpkgs/turnstile/files/README.voidlinux |  32 +++
 srcpkgs/turnstile/files/dbus.run         |   5 +
 srcpkgs/turnstile/files/turnstiled/run   |   4 +
 srcpkgs/turnstile/patches/pipe.patch     | 256 +++++++++++++++++++++++
 srcpkgs/turnstile/patches/runit.patch    | 184 ++++++++++++++++
 srcpkgs/turnstile/template               |  24 +++
 6 files changed, 505 insertions(+)
 create mode 100644 srcpkgs/turnstile/files/README.voidlinux
 create mode 100755 srcpkgs/turnstile/files/dbus.run
 create mode 100644 srcpkgs/turnstile/files/turnstiled/run
 create mode 100644 srcpkgs/turnstile/patches/pipe.patch
 create mode 100644 srcpkgs/turnstile/patches/runit.patch
 create mode 100644 srcpkgs/turnstile/template

diff --git a/srcpkgs/turnstile/files/README.voidlinux b/srcpkgs/turnstile/files/README.voidlinux
new file mode 100644
index 000000000000..46214113067e
--- /dev/null
+++ b/srcpkgs/turnstile/files/README.voidlinux
@@ -0,0 +1,32 @@
+# User Services
+
+User services can be placed in ~/.config/service/.
+
+To ensure that a subset of services are started before login can proceed,
+these services can be listed in ~/.config/service/turnstile-ready/conf, for
+example:
+
+	core_services="dbus foo"
+
+The turnstile-ready service is created by turnstile on first login.
+
+# D-Bus Session Bus
+
+If you want to manage dbus using a turnstile-managed runit user service:
+
+	mkdir ~/.config/service/dbus
+	cp /usr/share/examples/turnstile/dbus.run ~/.config/service/dbus/run
+
+# Elogind Replacement
+
+Turnstile is not (nor ever will be, according to the developer) a complete
+replacement for elogind, but it can replace several parts, including
+XDG_RUNTIME_DIR management.
+
+If using turnstile with elogind:
+- disable rundir management in /etc/turnstile/turnstiled.conf
+  (manage_rundir = no)
+
+If using turnstile without elogind:
+- install and enable seatd for seat management
+- install and enable acpid for lid switch/button handling
diff --git a/srcpkgs/turnstile/files/dbus.run b/srcpkgs/turnstile/files/dbus.run
new file mode 100755
index 000000000000..08d45d41be45
--- /dev/null
+++ b/srcpkgs/turnstile/files/dbus.run
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+[ -r ./conf ] && . ./conf
+
+exec dbus-daemon --session --nofork --nopidfile --address="$DBUS_SESSION_BUS_ADDRESS" $OPTS
diff --git a/srcpkgs/turnstile/files/turnstiled/run b/srcpkgs/turnstile/files/turnstiled/run
new file mode 100644
index 000000000000..aa5d624fda19
--- /dev/null
+++ b/srcpkgs/turnstile/files/turnstiled/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+exec 2>&1
+exec turnstiled
diff --git a/srcpkgs/turnstile/patches/pipe.patch b/srcpkgs/turnstile/patches/pipe.patch
new file mode 100644
index 000000000000..7ef856ad24bb
--- /dev/null
+++ b/srcpkgs/turnstile/patches/pipe.patch
@@ -0,0 +1,256 @@
+From 795cb7359d542aa470e119e79ea7f74339d294ab Mon Sep 17 00:00:00 2001
+From: q66 <q66@chimera-linux.org>
+Date: Tue, 4 Jul 2023 01:15:26 +0200
+Subject: [PATCH] use named pipes for signaling readiness instead of fds
+
+This is more versatile as it allows any process to open the
+readiness pipe, which is important for service managers that
+cannot directly report their readiness with a file descriptor
+(as those would then have the pipe fd opened forever which would
+result in readiness not being reported).
+---
+ backend/dinit     | 10 ++++-----
+ src/exec_utils.cc | 26 +++++++----------------
+ src/turnstiled.cc | 53 ++++++++++++++++++++++++++++++-----------------
+ src/turnstiled.hh |  2 +-
+ 4 files changed, 47 insertions(+), 44 deletions(-)
+
+diff --git a/backend/dinit b/backend/dinit
+index 792c2dc..8eeeeaf 100644
+--- a/backend/dinit
++++ b/backend/dinit
+@@ -15,8 +15,8 @@
+ #
+ # Arguments for "run":
+ #
+-# ready_fd: file descriptor that should be poked with a string; this will
+-#           be passed to the "ready" script of the sequence as its sole
++# ready_p:  path to named pipe (fifo) that should be poked with a string; this
++#           will be passed to the "ready" script of the sequence as its sole
+ #           argument (here this is a control socket path)
+ # srvdir:   an internal directory that can be used by the service manager
+ #           for any purpose (usually to keep track of its state)
+@@ -47,11 +47,11 @@ case "$1" in
+         ;;
+ esac
+ 
+-DINIT_READY_FD="$2"
++DINIT_READY_PIPE="$2"
+ DINIT_DIR="$3"
+ DINIT_CONF="$4/dinit.conf"
+ 
+-if [ -z "$DINIT_READY_FD" -o -z "$DINIT_DIR" -o ! -d "$DINIT_DIR" ]; then
++if [ ! -p "$DINIT_READY_PIPE" -o ! -d "$DINIT_DIR" ]; then
+     echo "dinit: invalid input argument(s)" >&2
+     exit 69
+ fi
+@@ -106,4 +106,4 @@ type = internal
+ waits-for.d = ${system_boot_dir}
+ EOF
+ 
+-exec dinit --user --ready-fd "$DINIT_READY_FD" --services-dir "$DINIT_DIR" "$@"
++exec dinit --user --ready-fd 3 --services-dir "$DINIT_DIR" "$@" 3>"$DINIT_READY_PIPE"
+diff --git a/src/exec_utils.cc b/src/exec_utils.cc
+index 06da738..c923d65 100644
+--- a/src/exec_utils.cc
++++ b/src/exec_utils.cc
+@@ -150,7 +150,7 @@ static void sig_handler(int sign) {
+     write(sigpipe[1], &sign, sizeof(sign));
+ }
+ 
+-static void fork_and_wait(pam_handle_t *pamh, int dpipe) {
++static void fork_and_wait(pam_handle_t *pamh) {
+     int pst, status;
+     struct pollfd pfd;
+     struct sigaction sa{};
+@@ -186,8 +186,6 @@ static void fork_and_wait(pam_handle_t *pamh, int dpipe) {
+     sigemptyset(&sa.sa_mask);
+     sigaction(SIGCHLD, &sa, nullptr);
+     sigaction(SIGTERM, &sa, nullptr);
+-    /* make sure we don't block this pipe */
+-    close(dpipe);
+     /* our own little event loop */
+     for (;;) {
+         auto pret = poll(&pfd, 1, -1);
+@@ -240,13 +238,7 @@ fail:
+ }
+ 
+ /* dummy "service manager" child process with none backend */
+-static void srv_dummy(int pipew) {
+-    /* we're always ready, the dummy process just sleeps forever */
+-    if (write(pipew, "poke", 5) != 5) {
+-        perror("dummy: failed to poke the pipe");
+-        return;
+-    }
+-    close(pipew);
++static void srv_dummy() {
+     /* block all signals except the ones we need to terminate */
+     sigset_t mask;
+     sigfillset(&mask);
+@@ -259,7 +251,7 @@ static void srv_dummy(int pipew) {
+     exit(0);
+ }
+ 
+-void srv_child(session &sess, char const *backend, int dpipe, bool dummy) {
++void srv_child(session &sess, char const *backend, bool dummy) {
+     pam_handle_t *pamh = nullptr;
+     bool is_root = (getuid() == 0);
+     /* create a new session */
+@@ -276,10 +268,10 @@ void srv_child(session &sess, char const *backend, int dpipe, bool dummy) {
+     /* handle the parent/child logic here
+      * if we're forking, only child makes it past this func
+      */
+-    fork_and_wait(pamh, dpipe);
++    fork_and_wait(pamh);
+     /* dummy service manager if requested */
+     if (dummy) {
+-        srv_dummy(dpipe);
++        srv_dummy();
+         return;
+     }
+     /* drop privs */
+@@ -329,12 +321,8 @@ void srv_child(session &sess, char const *backend, int dpipe, bool dummy) {
+     add_str(LIBEXEC_PATH, "/", backend);
+     /* arg1: action */
+     add_str("run");
+-    /* arg1: ready_fd */
+-    {
+-        char pipestr[32];
+-        std::snprintf(pipestr, sizeof(pipestr), "%d", dpipe);
+-        add_str(pipestr);
+-    }
++    /* arg1: ready pipe */
++    add_str(RUN_PATH, "/", SOCK_DIR, "/", sess.uids, "/ready");
+     /* arg2: srvdir */
+     add_str(RUN_PATH, "/", SOCK_DIR, "/", sess.uids, "/", tdirn);
+     /* arg3: confdir */
+diff --git a/src/turnstiled.cc b/src/turnstiled.cc
+index d2ad545..3feb5ad 100644
+--- a/src/turnstiled.cc
++++ b/src/turnstiled.cc
+@@ -116,7 +116,6 @@ static int sigpipe[2] = {-1, -1};
+ 
+ /* start the service manager instance for a session */
+ static bool srv_start(session &sess) {
+-    int dpipe[2];
+     /* mark as waiting */
+     sess.srv_wait = true;
+     /* make rundir if needed, we don't want to create that and session dir
+@@ -152,11 +151,25 @@ static bool srv_start(session &sess) {
+             sess.remove_sdir();
+             return false;
+         }
+-    }
+-    /* here we'll receive the initial readiness string from the backend */
+-    if (pipe2(dpipe, O_NONBLOCK) < 0) {
+-        print_err("srv: pipe2 failed (%s)", strerror(errno));
+-        return false;
++        print_dbg("srv: create readiness pipe");
++        unlinkat(sess.dirfd, "ready", 0);
++        if (mkfifoat(sess.dirfd, "ready", 0700) < 0) {
++            print_err("srv: failed to make ready pipe (%s)", strerror(errno));
++            return false;
++        }
++        /* ensure it's owned by user too, and open in nonblocking mode */
++        if (fchownat(
++            sess.dirfd, "ready", sess.uid, sess.gid, AT_SYMLINK_NOFOLLOW
++        ) || ((sess.userpipe = openat(
++            sess.dirfd, "ready", O_NONBLOCK | O_RDONLY
++        )) < 0)) {
++            print_err(
++                "srv: failed to set up ready pipe (%s)", strerror(errno)
++            );
++            unlinkat(sess.dirfd, "ready", 0);
++            sess.remove_sdir();
++            return false;
++        }
+     }
+     /* set up the timer, issue SIGLARM when it fires */
+     print_dbg("srv: timer set");
+@@ -181,22 +194,25 @@ static bool srv_start(session &sess) {
+         sigaction(SIGTERM, &sa, nullptr);
+         sigaction(SIGINT, &sa, nullptr);
+         /* close some descriptors, these can be reused */
++        close(sess.userpipe);
+         close(userv_dirfd);
+-        close(dpipe[0]);
+         close(sigpipe[0]);
+         close(sigpipe[1]);
+         /* and run the session */
+-        srv_child(sess, cdata->backend.data(), dpipe[1], cdata->disable);
++        srv_child(sess, cdata->backend.data(), cdata->disable);
+         exit(1);
+     } else if (pid < 0) {
+         print_err("srv: fork failed (%s)", strerror(errno));
+         return false;
+     }
+     /* close the write end on our side */
+-    close(dpipe[1]);
+     sess.srv_pending = false;
+     sess.srv_pid = pid;
+-    sess.userpipe = dpipe[0];
++    if (sess.userpipe < 0) {
++        /* disabled */
++        return srv_boot(sess, nullptr);
++    }
++    /* otherwise queue the pipe */
+     sess.pipe_queued = true;
+     return true;
+ }
+@@ -728,6 +744,7 @@ static bool fd_handle_pipe(std::size_t i) {
+         /* this should never happen */
+         return false;
+     }
++    bool done = false;
+     if (fds[i].revents & POLLIN) {
+         /* read the string from the pipe */
+         for (;;) {
+@@ -735,10 +752,15 @@ static bool fd_handle_pipe(std::size_t i) {
+             if (read(fds[i].fd, &c, 1) != 1) {
+                 break;
+             }
++            if (c == '\0') {
++                /* done receiving */
++                done = true;
++                break;
++            }
+             sess->srvstr.push_back(c);
+         }
+     }
+-    if (fds[i].revents & POLLHUP) {
++    if (done || (fds[i].revents & POLLHUP)) {
+         /* kill the pipe, we don't need it anymore */
+         close(sess->userpipe);
+         sess->userpipe = -1;
+@@ -747,15 +769,8 @@ static bool fd_handle_pipe(std::size_t i) {
+         fds[i].fd = -1;
+         fds[i].revents = 0;
+         --npipes;
+-        /* but error early if needed */
+-        if (sess->srvstr.empty()) {
+-            print_err("read failed (%s)", strerror(errno));
+-            return true;
+-        }
+         /* wait for the boot service to come up */
+-        if (!srv_boot(
+-            *sess, cdata->disable ? nullptr : cdata->backend.data()
+-        )) {
++        if (!srv_boot(*sess, cdata->backend.data())) {
+             /* this is an unrecoverable condition */
+             return false;
+         }
+diff --git a/src/turnstiled.hh b/src/turnstiled.hh
+index f2739c4..58e4edb 100644
+--- a/src/turnstiled.hh
++++ b/src/turnstiled.hh
+@@ -86,7 +86,7 @@ bool cfg_expand_rundir(
+ );
+ 
+ /* service manager utilities */
+-void srv_child(session &sess, char const *backend, int p, bool d);
++void srv_child(session &sess, char const *backend, bool d);
+ bool srv_boot(session &sess, char const *backend);
+ 
+ struct cfg_data {
+-- 
+2.41.0
diff --git a/srcpkgs/turnstile/patches/runit.patch b/srcpkgs/turnstile/patches/runit.patch
new file mode 100644
index 000000000000..8c120f382206
--- /dev/null
+++ b/srcpkgs/turnstile/patches/runit.patch
@@ -0,0 +1,184 @@
+From 22933f404cee49974f51c0873c897d0b565c5620 Mon Sep 17 00:00:00 2001
+From: classabbyamp <dev@placeviolette.net>
+Date: Wed, 28 Jun 2023 05:05:25 -0400
+Subject: [PATCH] add runit backend
+
+---
+ backend/meson.build | 16 +++++++++
+ backend/runit       | 80 +++++++++++++++++++++++++++++++++++++++++++++
+ backend/runit.conf  | 13 ++++++++
+ meson.build         |  3 ++
+ meson_options.txt   |  5 +++
+ 5 files changed, 117 insertions(+)
+ create mode 100644 backend/runit
+ create mode 100644 backend/runit.conf
+
+diff --git a/backend/meson.build b/backend/meson.build
+index 681e6a0..e4c63f1 100644
+--- a/backend/meson.build
++++ b/backend/meson.build
+@@ -13,3 +13,19 @@ if have_dinit
+         install_mode: 'rw-r--r--'
+     )
+ endif
++
++# runit backend
++
++if have_runit
++    install_data(
++        'runit',
++        install_dir: join_paths(get_option('libexecdir'), 'turnstile'),
++        install_mode: 'rwxr-xr-x'
++    )
++
++    install_data(
++        'runit.conf',
++        install_dir: join_paths(get_option('sysconfdir'), 'turnstile/backend'),
++        install_mode: 'rw-r--r--'
++    )
++endif
+diff --git a/backend/runit b/backend/runit
+new file mode 100644
+index 0000000..e8370d6
+--- /dev/null
++++ b/backend/runit
+@@ -0,0 +1,80 @@
++#!/bin/sh
++#
++# This is the turnstile runit backend. It accepts the action as its first
++# argument, which is either "ready" or "run". In case of "run", it's invoked
++# directly through /bin/sh as if it was a login shell, and therefore it has
++# acccess to shell profile, and the shebang is functionally useless but
++# should be preserved as a convention. For "ready", it's a regular shell.
++#
++# Arguments for "ready":
++#
++# ready_sv: path to the readiness service
++#
++# Arguments for "run":
++#
++# ready_p:  readiness pipe (fifo). has the path to the ready service written to it.
++# srvdir:   unused
++# confdir:  the path where turnstile's configuration data resides, used
++#           to source the configuration file
++#
++# Copyright 2023 classabbyamp <dev@placeviolette.net>
++# License: BSD-2-Clause
++
++case "$1" in
++    run) ;;
++    ready)
++        set -x
++        echo "runit: ready_sv: $2" >&2
++        if [ -z "$2" ] || [ ! -d "$2" ]; then
++            echo "runit: invalid readiness service '$2'" >&2
++            exit 69
++        fi
++        sv start "$2" >&2
++        set +x
++        exit 0
++        ;;
++    *)
++        exit 32
++        ;;
++esac
++
++RUNIT_READY_PIPE="$2"
++RUNIT_CONF="$4/runit.conf"
++
++if [ ! -p "$RUNIT_READY_PIPE" ]; then
++    echo "runit: invalid input argument(s)" >&2
++    exit 69
++fi
++
++if [ -z "$HOME" ] || [ ! -d "$HOME" ]; then
++    echo "runit: invalid home directory" >&2
++    exit 70
++fi
++
++shift $#
++
++# be strict
++set -e
++
++# source the conf
++[ -r "$RUNIT_CONF" ] && . "$RUNIT_CONF"
++
++# set some defaults in case the conf cannot be read or is mangled
++: "${ready_sv:="turnstile-ready"}"
++: "${services_dir:="${HOME}/.config/service"}"
++
++mkdir -p "${services_dir}/${ready_sv}" > /dev/null 2>&1
++
++# this must succeed
++cat << EOF > "${services_dir}/${ready_sv}/run"
++#!/bin/sh
++[ -r ./conf ] && . ./conf
++[ -n "\$core_services" ] && SVDIR=".." sv start \$core_services
++[ -p "$RUNIT_READY_PIPE" ] && printf "${services_dir}/${ready_sv}" > "$RUNIT_READY_PIPE"
++exec pause
++EOF
++chmod +x "${services_dir}/${ready_sv}/run"
++
++exec env DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$(id -u)/bus" \
++    runsvdir -P "$services_dir" \
++    'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+diff --git a/backend/runit.conf b/backend/runit.conf
+new file mode 100644
+index 0000000..7b258c9
+--- /dev/null
++++ b/backend/runit.conf
+@@ -0,0 +1,13 @@
++# This is the configuration file for turnstile's runit backend.
++#
++# It follows the POSIX shell syntax (being sourced into a script).
++# The complete launch environment available to dinit can be used.
++#
++# It is a low-level configuration file. In most cases, it should
++# not be modified by the user.
++
++# the name of the service that turnstile will check for login readiness
++ready_sv="turnstile-ready"
++
++# the directory user service files are read from.
++services_dir="${HOME}/.config/service"
+diff --git a/meson.build b/meson.build
+index 823ff2a..de82e21 100644
+--- a/meson.build
++++ b/meson.build
+@@ -23,6 +23,7 @@ scdoc_dep = dependency(
+ )
+ 
+ have_dinit = get_option('dinit').enabled()
++have_runit = get_option('runit').enabled()
+ 
+ conf_data = configuration_data()
+ conf_data.set_quoted('RUN_PATH', get_option('rundir'))
+@@ -103,6 +104,8 @@ install_data(
+ # decide the default backend
+ if have_dinit
+     default_backend = 'dinit'
++elif have_runit
++    default_backend = 'runit'
+ else
+     default_backend = 'none'
+ endif
+diff --git a/meson_options.txt b/meson_options.txt
+index 9b03995..85ea1ce 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -3,6 +3,11 @@ option('dinit',
+     description: 'Whether to install Dinit-related backend and data'
+ )
+ 
++option('runit',
++    type: 'feature', value: 'disabled',
++    description: 'Whether to install runit-related backend and data'
++)
++
+ option('rundir',
+     type: 'string', value: '/run',
+     description: 'Where the base directory will be located'
+-- 
+2.41.0
+
diff --git a/srcpkgs/turnstile/template b/srcpkgs/turnstile/template
new file mode 100644
index 000000000000..470b56b7c206
--- /dev/null
+++ b/srcpkgs/turnstile/template
@@ -0,0 +1,24 @@
+# Template file for 'turnstile'
+pkgname=turnstile
+version=0.1.5+1
+revision=1
+build_style=meson
+configure_args="-Ddinit=disabled -Drunit=enabled -Dmanage_rundir=true"
+hostmakedepends="pkg-config scdoc"
+makedepends="pam-devel"
+short_desc="Independent session/login tracker and user service manager"
+maintainer="classabbyamp <void@placeviolette.net>"
+license="BSD-2-Clause"
+homepage="https://github.com/chimera-linux/turnstile"
+# distfiles="https://github.com/chimera-linux/turnstile/archive/refs/tags/v${version}.tar.gz"
+_commit="b5f3b18419efa088697310fb67584ccc6b5f8142"
+distfiles="https://github.com/chimera-linux/turnstile/archive/${_commit}.tar.gz"
+checksum=1a9d9a1391015a11f31c1b1865fb452c4f05a1d476f22f93547b6c46b846bc1f
+conf_files="/etc/turnstile/turnstiled.conf"
+
+post_install() {
+	vsv turnstiled
+	vsconf "${FILESDIR}/dbus.run"
+	vdoc "${FILESDIR}/README.voidlinux"
+	vlicense COPYING.md
+}

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: New package: turnstile-0.1.4
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (3 preceding siblings ...)
  2023-07-04  8:40 ` classabbyamp
@ 2023-07-04  8:43 ` classabbyamp
  2023-07-04  8:45 ` classabbyamp
                   ` (48 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: classabbyamp @ 2023-07-04  8:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 439 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/44676#issuecomment-1619809832

Comment:
current state:

what works:
- user services
- rundir management
- pam stuff

what doesn't work:
- user services don't exit with the login session, but runsvdir does (runsvdir needs a HUP not a TERM)

what's blocking:
- want to upstream the runit backend instead of carrying a patch

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: New package: turnstile-0.1.4
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (4 preceding siblings ...)
  2023-07-04  8:43 ` classabbyamp
@ 2023-07-04  8:45 ` classabbyamp
  2023-07-04  8:59 ` classabbyamp
                   ` (47 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: classabbyamp @ 2023-07-04  8:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 516 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/44676#issuecomment-1619809832

Comment:
current state:

what works:
- user services
- rundir management
- pam stuff

what doesn't work:
- user services don't exit with the login session, but runsvdir does (runsvdir needs a HUP not a TERM)

what's untested:
- disabling rundir management and using it with elogind

what's blocking:
- want to upstream the runit backend instead of carrying a patch

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: New package: turnstile-0.1.4
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (5 preceding siblings ...)
  2023-07-04  8:45 ` classabbyamp
@ 2023-07-04  8:59 ` classabbyamp
  2023-07-04  9:00 ` classabbyamp
                   ` (46 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: classabbyamp @ 2023-07-04  8:59 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 614 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/44676#issuecomment-1619809832

Comment:
current state:

what works:
- user services
- rundir management
- pam stuff

what doesn't work:
- user services don't exit with the login session, but runsvdir does (runsvdir needs a HUP not a TERM)

what's untested:
- disabling rundir management and using it with elogind

what's blocking:
- want to upstream the runit backend instead of carrying a patch

some example services: https://github.com/classabbyamp/dotfiles/tree/master/dot_config/service

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: New package: turnstile-0.1.4
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (6 preceding siblings ...)
  2023-07-04  8:59 ` classabbyamp
@ 2023-07-04  9:00 ` classabbyamp
  2023-07-04  9:44 ` New package: turnstile-0.1.5 classabbyamp
                   ` (45 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: classabbyamp @ 2023-07-04  9:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 640 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/44676#issuecomment-1619809832

Comment:
current state:

what works:
- user services
- rundir management
- pam stuff

what doesn't work:
- user services don't exit with the login session, but runsvdir does (runsvdir needs a HUP not a TERM)

what's untested:
- disabling rundir management and using it with elogind

what's blocking:
- want to upstream the runit backend instead of carrying a patch

some example services (pipewire, syncthing atm): https://github.com/classabbyamp/dotfiles/tree/master/dot_config/service

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: New package: turnstile-0.1.5
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (7 preceding siblings ...)
  2023-07-04  9:00 ` classabbyamp
@ 2023-07-04  9:44 ` classabbyamp
  2023-07-04  9:58 ` classabbyamp
                   ` (44 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: classabbyamp @ 2023-07-04  9:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 706 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/44676#issuecomment-1619809832

Comment:
current state:

what works:
- user services
- rundir management
- pam stuff

what doesn't work:
- user services don't exit with the login session, but runsvdir does (runsvdir needs a HUP not a TERM)

what's untested:
- disabling rundir management and using it with elogind

what's blocking:
- want to upstream the runit backend instead of carrying a patch
- currently needs to build off of master so `pipe.patch` applies

some example services (pipewire, syncthing atm): https://github.com/classabbyamp/dotfiles/tree/master/dot_config/service

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: New package: turnstile-0.1.5
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (8 preceding siblings ...)
  2023-07-04  9:44 ` New package: turnstile-0.1.5 classabbyamp
@ 2023-07-04  9:58 ` classabbyamp
  2023-07-09 22:52 ` [PR PATCH] [Updated] " classabbyamp
                   ` (43 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: classabbyamp @ 2023-07-04  9:58 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 734 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/44676#issuecomment-1619809832

Comment:
current state:

what works:
- user services
- rundir management
- pam stuff

what doesn't work:
- user services don't exit with the login session, but runsvdir does (runsvdir needs a HUP not a TERM)

what's untested:
- disabling rundir management and using it with elogind

what's blocking:
- want to upstream the runit backend instead of carrying a patch (chimera-linux/turnstile#8)
- currently needs to build off of master so `pipe.patch` applies

some example services (pipewire, syncthing atm): https://github.com/classabbyamp/dotfiles/tree/master/dot_config/service

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PR PATCH] [Updated] New package: turnstile-0.1.5
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (9 preceding siblings ...)
  2023-07-04  9:58 ` classabbyamp
@ 2023-07-09 22:52 ` classabbyamp
  2023-07-10 14:03 ` junkminerman
                   ` (42 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: classabbyamp @ 2023-07-09 22:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 741 bytes --]

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages new/turnstile
https://github.com/void-linux/void-packages/pull/44676

New package: turnstile-0.1.5
WIP while i create the runit backend upstream ([mostly done](https://github.com/chimera-linux/turnstile/compare/master...classabbyamp:runit-backend))

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**



A patch file from https://github.com/void-linux/void-packages/pull/44676.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-new/turnstile-44676.patch --]
[-- Type: text/x-diff, Size: 11259 bytes --]

From 7d423356e0f46ca898599ab6dd259da565e7fdcd Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sun, 2 Jul 2023 22:04:40 -0400
Subject: [PATCH 1/2] pam-base: add turnstile pam

---
 srcpkgs/pam-base/files/system-login | 1 +
 srcpkgs/pam-base/template           | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/pam-base/files/system-login b/srcpkgs/pam-base/files/system-login
index 2275deba480d..72c4638f07d3 100644
--- a/srcpkgs/pam-base/files/system-login
+++ b/srcpkgs/pam-base/files/system-login
@@ -14,6 +14,7 @@ session    optional   pam_loginuid.so
 session    include    system-auth
 session    optional   pam_motd.so          motd=/etc/motd
 session    optional   pam_mail.so          dir=/var/mail standard quiet
+-session   optional   pam_turnstile.so
 -session   optional   pam_elogind.so
 -session   optional   pam_dumb_runtime_dir.so
 session    required   pam_env.so
diff --git a/srcpkgs/pam-base/template b/srcpkgs/pam-base/template
index 70dfab9fa996..38bfa74cd885 100644
--- a/srcpkgs/pam-base/template
+++ b/srcpkgs/pam-base/template
@@ -1,7 +1,7 @@
 # Template file for 'pam-base'
 pkgname=pam-base
 version=0.4
-revision=2
+revision=3
 short_desc="PAM base configuration files"
 maintainer="Érico Nogueira <ericonr@disroot.org>"
 license="Public Domain"

From 80ad9ac9a5ff56af5297615db054f698305c4131 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Wed, 28 Jun 2023 05:10:55 -0400
Subject: [PATCH 2/2] New package: turnstile-0.1.5

---
 srcpkgs/turnstile/files/README.voidlinux |  32 ++++
 srcpkgs/turnstile/files/dbus.run         |   5 +
 srcpkgs/turnstile/files/turnstiled/run   |   4 +
 srcpkgs/turnstile/patches/runit.patch    | 187 +++++++++++++++++++++++
 srcpkgs/turnstile/template               |  24 +++
 5 files changed, 252 insertions(+)
 create mode 100644 srcpkgs/turnstile/files/README.voidlinux
 create mode 100755 srcpkgs/turnstile/files/dbus.run
 create mode 100644 srcpkgs/turnstile/files/turnstiled/run
 create mode 100644 srcpkgs/turnstile/patches/runit.patch
 create mode 100644 srcpkgs/turnstile/template

diff --git a/srcpkgs/turnstile/files/README.voidlinux b/srcpkgs/turnstile/files/README.voidlinux
new file mode 100644
index 000000000000..46214113067e
--- /dev/null
+++ b/srcpkgs/turnstile/files/README.voidlinux
@@ -0,0 +1,32 @@
+# User Services
+
+User services can be placed in ~/.config/service/.
+
+To ensure that a subset of services are started before login can proceed,
+these services can be listed in ~/.config/service/turnstile-ready/conf, for
+example:
+
+	core_services="dbus foo"
+
+The turnstile-ready service is created by turnstile on first login.
+
+# D-Bus Session Bus
+
+If you want to manage dbus using a turnstile-managed runit user service:
+
+	mkdir ~/.config/service/dbus
+	cp /usr/share/examples/turnstile/dbus.run ~/.config/service/dbus/run
+
+# Elogind Replacement
+
+Turnstile is not (nor ever will be, according to the developer) a complete
+replacement for elogind, but it can replace several parts, including
+XDG_RUNTIME_DIR management.
+
+If using turnstile with elogind:
+- disable rundir management in /etc/turnstile/turnstiled.conf
+  (manage_rundir = no)
+
+If using turnstile without elogind:
+- install and enable seatd for seat management
+- install and enable acpid for lid switch/button handling
diff --git a/srcpkgs/turnstile/files/dbus.run b/srcpkgs/turnstile/files/dbus.run
new file mode 100755
index 000000000000..08d45d41be45
--- /dev/null
+++ b/srcpkgs/turnstile/files/dbus.run
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+[ -r ./conf ] && . ./conf
+
+exec dbus-daemon --session --nofork --nopidfile --address="$DBUS_SESSION_BUS_ADDRESS" $OPTS
diff --git a/srcpkgs/turnstile/files/turnstiled/run b/srcpkgs/turnstile/files/turnstiled/run
new file mode 100644
index 000000000000..aa5d624fda19
--- /dev/null
+++ b/srcpkgs/turnstile/files/turnstiled/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+exec 2>&1
+exec turnstiled
diff --git a/srcpkgs/turnstile/patches/runit.patch b/srcpkgs/turnstile/patches/runit.patch
new file mode 100644
index 000000000000..c17e1a4671d0
--- /dev/null
+++ b/srcpkgs/turnstile/patches/runit.patch
@@ -0,0 +1,187 @@
+From 35a725309df351789426cfeab0750ca9e7624542 Mon Sep 17 00:00:00 2001
+From: classabbyamp <dev@placeviolette.net>
+Date: Wed, 28 Jun 2023 05:05:25 -0400
+Subject: [PATCH] add runit backend
+
+---
+ backend/meson.build | 16 +++++++++
+ backend/runit       | 86 +++++++++++++++++++++++++++++++++++++++++++++
+ backend/runit.conf  | 13 +++++++
+ meson.build         |  3 ++
+ meson_options.txt   |  5 +++
+ 5 files changed, 123 insertions(+)
+ create mode 100644 backend/runit
+ create mode 100644 backend/runit.conf
+
+diff --git a/backend/meson.build b/backend/meson.build
+index 681e6a0..e4c63f1 100644
+--- a/backend/meson.build
++++ b/backend/meson.build
+@@ -13,3 +13,19 @@ if have_dinit
+         install_mode: 'rw-r--r--'
+     )
+ endif
++
++# runit backend
++
++if have_runit
++    install_data(
++        'runit',
++        install_dir: join_paths(get_option('libexecdir'), 'turnstile'),
++        install_mode: 'rwxr-xr-x'
++    )
++
++    install_data(
++        'runit.conf',
++        install_dir: join_paths(get_option('sysconfdir'), 'turnstile/backend'),
++        install_mode: 'rw-r--r--'
++    )
++endif
+diff --git a/backend/runit b/backend/runit
+new file mode 100644
+index 0000000..b293b43
+--- /dev/null
++++ b/backend/runit
+@@ -0,0 +1,86 @@
++#!/bin/sh
++#
++# This is the turnstile runit backend. It accepts the action as its first
++# argument, which is either "ready", "run", or "stop". In case of "run", it's
++# invoked directly through /bin/sh as if it was a login shell, and therefore
++# it has acccess to shell profile, and the shebang is functionally useless but
++# should be preserved as a convention. For "ready", it's a regular shell.
++#
++# Arguments for "ready":
++#
++# ready_sv: path to the readiness service
++#
++# Arguments for "run":
++#
++# ready_p:  readiness pipe (fifo). has the path to the ready service written to it.
++# srvdir:   unused
++# confdir:  the path where turnstile's configuration data resides, used
++#           to source the configuration file
++#
++# Arguments for "stop":
++#
++# pid:      the PID of the service manager to stop (gracefully); it should
++#           terminate the services it's running and then stop itself
++#
++# Copyright 2023 classabbyamp <dev@placeviolette.net>
++# License: BSD-2-Clause
++
++case "$1" in
++    run) ;;
++    ready)
++        if [ -z "$2" ] || [ ! -d "$2" ]; then
++            echo "runit: invalid readiness service '$2'" >&2
++            exit 69
++        fi
++        exec sv start "$2" >&2
++        ;;
++    stop)
++        # If runsvdir receives a HUP signal, it sends a TERM signal to each
++        # runsv(8) process it is monitoring and then exits with 111.
++        exec kill -s HUP "$2"
++        ;;
++    *)
++        exit 32
++        ;;
++esac
++
++RUNIT_READY_PIPE="$2"
++RUNIT_CONF="$4/runit.conf"
++
++if [ ! -p "$RUNIT_READY_PIPE" ]; then
++    echo "runit: invalid input argument(s)" >&2
++    exit 69
++fi
++
++if [ -z "$HOME" ] || [ ! -d "$HOME" ]; then
++    echo "runit: invalid home directory" >&2
++    exit 70
++fi
++
++shift $#
++
++# be strict
++set -e
++
++# source the conf
++[ -r "$RUNIT_CONF" ] && . "$RUNIT_CONF"
++
++# set some defaults in case the conf cannot be read or is mangled
++: "${ready_sv:="turnstile-ready"}"
++: "${services_dir:="${HOME}/.config/service"}"
++
++mkdir -p "${services_dir}/${ready_sv}" > /dev/null 2>&1
++
++# this must succeed
++cat << EOF > "${services_dir}/${ready_sv}/run"
++#!/bin/sh
++[ -r ./conf ] && . ./conf
++[ -n "\$core_services" ] && SVDIR=".." sv start \$core_services
++[ -p "$RUNIT_READY_PIPE" ] && printf "${services_dir}/${ready_sv}" > "$RUNIT_READY_PIPE"
++exec pause
++EOF
++chmod +x "${services_dir}/${ready_sv}/run"
++
++exec env DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$(id -u)/bus" \
++    runsvdir -P "$services_dir" \
++    'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+diff --git a/backend/runit.conf b/backend/runit.conf
+new file mode 100644
+index 0000000..7b258c9
+--- /dev/null
++++ b/backend/runit.conf
+@@ -0,0 +1,13 @@
++# This is the configuration file for turnstile's runit backend.
++#
++# It follows the POSIX shell syntax (being sourced into a script).
++# The complete launch environment available to dinit can be used.
++#
++# It is a low-level configuration file. In most cases, it should
++# not be modified by the user.
++
++# the name of the service that turnstile will check for login readiness
++ready_sv="turnstile-ready"
++
++# the directory user service files are read from.
++services_dir="${HOME}/.config/service"
+diff --git a/meson.build b/meson.build
+index 823ff2a..de82e21 100644
+--- a/meson.build
++++ b/meson.build
+@@ -23,6 +23,7 @@ scdoc_dep = dependency(
+ )
+ 
+ have_dinit = get_option('dinit').enabled()
++have_runit = get_option('runit').enabled()
+ 
+ conf_data = configuration_data()
+ conf_data.set_quoted('RUN_PATH', get_option('rundir'))
+@@ -103,6 +104,8 @@ install_data(
+ # decide the default backend
+ if have_dinit
+     default_backend = 'dinit'
++elif have_runit
++    default_backend = 'runit'
+ else
+     default_backend = 'none'
+ endif
+diff --git a/meson_options.txt b/meson_options.txt
+index 9b03995..85ea1ce 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -3,6 +3,11 @@ option('dinit',
+     description: 'Whether to install Dinit-related backend and data'
+ )
+ 
++option('runit',
++    type: 'feature', value: 'disabled',
++    description: 'Whether to install runit-related backend and data'
++)
++
+ option('rundir',
+     type: 'string', value: '/run',
+     description: 'Where the base directory will be located'
diff --git a/srcpkgs/turnstile/template b/srcpkgs/turnstile/template
new file mode 100644
index 000000000000..532cbb707726
--- /dev/null
+++ b/srcpkgs/turnstile/template
@@ -0,0 +1,24 @@
+# Template file for 'turnstile'
+pkgname=turnstile
+version=0.1.5+2
+revision=1
+build_style=meson
+configure_args="-Ddinit=disabled -Drunit=enabled -Dmanage_rundir=true"
+hostmakedepends="pkg-config scdoc"
+makedepends="pam-devel"
+short_desc="Independent session/login tracker and user service manager"
+maintainer="classabbyamp <void@placeviolette.net>"
+license="BSD-2-Clause"
+homepage="https://github.com/chimera-linux/turnstile"
+# distfiles="https://github.com/chimera-linux/turnstile/archive/refs/tags/v${version}.tar.gz"
+_commit="a0b40dc430e365a96de65afd6ce237b58c7c3a07"
+distfiles="https://github.com/chimera-linux/turnstile/archive/${_commit}.tar.gz"
+checksum=df7f9301b91121c807f1ed35bd5b4a37673af6385c76040d28d7338acd1d3894
+conf_files="/etc/turnstile/turnstiled.conf"
+
+post_install() {
+	vsv turnstiled
+	vsconf "${FILESDIR}/dbus.run"
+	vdoc "${FILESDIR}/README.voidlinux"
+	vlicense COPYING.md
+}

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: New package: turnstile-0.1.5
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (10 preceding siblings ...)
  2023-07-09 22:52 ` [PR PATCH] [Updated] " classabbyamp
@ 2023-07-10 14:03 ` junkminerman
  2023-07-10 16:37 ` classabbyamp
                   ` (41 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: junkminerman @ 2023-07-10 14:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 474 bytes --]

New comment by junkminerman on void-packages repository

https://github.com/void-linux/void-packages/pull/44676#issuecomment-1629035973

Comment:
Is there anything that needs to be manually done to test this new package? Whenever I try to use this package, I cannot log in, I am simply presented with a blinking cursor rather than a shell or a window manager, this is the case both from getty, and greetd. I have applied the changes to pam manually rather than recompiling.

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: New package: turnstile-0.1.5
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (11 preceding siblings ...)
  2023-07-10 14:03 ` junkminerman
@ 2023-07-10 16:37 ` classabbyamp
  2023-07-10 16:55 ` classabbyamp
                   ` (40 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: classabbyamp @ 2023-07-10 16:37 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 208 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/44676#issuecomment-1629327278

Comment:
at this point I would just wait, it's not fully working yet. 

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: New package: turnstile-0.1.5
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (12 preceding siblings ...)
  2023-07-10 16:37 ` classabbyamp
@ 2023-07-10 16:55 ` classabbyamp
  2023-07-10 17:59 ` junkminerman
                   ` (39 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: classabbyamp @ 2023-07-10 16:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 303 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/44676#issuecomment-1629327278

Comment:
at this point I would just wait, it's not fully working yet. it could be because elogind is running and conflicting with it, or seatd is not running perhaps

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: New package: turnstile-0.1.5
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (13 preceding siblings ...)
  2023-07-10 16:55 ` classabbyamp
@ 2023-07-10 17:59 ` junkminerman
  2023-07-10 18:04 ` classabbyamp
                   ` (38 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: junkminerman @ 2023-07-10 17:59 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 318 bytes --]

New comment by junkminerman on void-packages repository

https://github.com/void-linux/void-packages/pull/44676#issuecomment-1629447419

Comment:
I see, I'll wait a bit till this stabilizes more. I have both seatd running and elogind is not installed on my system. FWIW, setting the backend to none solves this issue.

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: New package: turnstile-0.1.5
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (14 preceding siblings ...)
  2023-07-10 17:59 ` junkminerman
@ 2023-07-10 18:04 ` classabbyamp
  2023-07-10 21:36 ` junkminerman
                   ` (37 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: classabbyamp @ 2023-07-10 18:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 332 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/44676#issuecomment-1629454456

Comment:
if you'd like, the debug logs would be helpful. set `debug` and `debug_stderr` to `yes` and use `svlogtail` to look at the logs. my guess is something within the runit backend is broken

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: New package: turnstile-0.1.5
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (15 preceding siblings ...)
  2023-07-10 18:04 ` classabbyamp
@ 2023-07-10 21:36 ` junkminerman
  2023-07-10 21:44 ` classabbyamp
                   ` (36 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: junkminerman @ 2023-07-10 21:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 540 bytes --]

New comment by junkminerman on void-packages repository

https://github.com/void-linux/void-packages/pull/44676#issuecomment-1629764374

Comment:
Hmm, I am not seeing any useful information in the output of svlogtail. However, it seems the issue might be related to greetd. I can only not log in if I attempt to log in through greetd first and then switch to a different tty. If I log in through a tty first, none of these issues are present.

What's more, it seems the greetd daemon fails if turnstile is running with the runit backend.

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: New package: turnstile-0.1.5
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (16 preceding siblings ...)
  2023-07-10 21:36 ` junkminerman
@ 2023-07-10 21:44 ` classabbyamp
  2023-07-11  9:01 ` junkminerman
                   ` (35 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: classabbyamp @ 2023-07-10 21:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 436 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/44676#issuecomment-1629772454

Comment:
if i had to guess it's that greetd is missing a line about turnstile in its pam config. logging in via a tty successfully would trigger the system-login pam entry and would start the runit backend. then, when the logging in via greetd after that, runit is already running so it works fine.

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: New package: turnstile-0.1.5
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (17 preceding siblings ...)
  2023-07-10 21:44 ` classabbyamp
@ 2023-07-11  9:01 ` junkminerman
  2023-07-12  3:06 ` [PR PATCH] [Updated] " classabbyamp
                   ` (34 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: junkminerman @ 2023-07-11  9:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 296 bytes --]

New comment by junkminerman on void-packages repository

https://github.com/void-linux/void-packages/pull/44676#issuecomment-1630437815

Comment:
Unfortunately, I am unfamiliar with pam configuration, however, it seems greetd sources system-local-login, which in turn should source system-login.

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PR PATCH] [Updated] New package: turnstile-0.1.5
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (18 preceding siblings ...)
  2023-07-11  9:01 ` junkminerman
@ 2023-07-12  3:06 ` classabbyamp
  2023-07-13 23:29 ` New package: turnstile-0.1.6 junkminerman
                   ` (33 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: classabbyamp @ 2023-07-12  3:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 741 bytes --]

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages new/turnstile
https://github.com/void-linux/void-packages/pull/44676

New package: turnstile-0.1.5
WIP while i create the runit backend upstream ([mostly done](https://github.com/chimera-linux/turnstile/compare/master...classabbyamp:runit-backend))

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**



A patch file from https://github.com/void-linux/void-packages/pull/44676.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-new/turnstile-44676.patch --]
[-- Type: text/x-diff, Size: 15874 bytes --]

From b96c4bceb93a727b65a8845eb468b370e0f5ace9 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 11 Jul 2023 22:02:49 -0400
Subject: [PATCH 1/3] polkit: patch to support turnstile

---
 srcpkgs/polkit/patches/turnstile.patch | 57 ++++++++++++++++++++++++++
 srcpkgs/polkit/template                |  2 +-
 2 files changed, 58 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/polkit/patches/turnstile.patch

diff --git a/srcpkgs/polkit/patches/turnstile.patch b/srcpkgs/polkit/patches/turnstile.patch
new file mode 100644
index 000000000000..4f56ed130eef
--- /dev/null
+++ b/srcpkgs/polkit/patches/turnstile.patch
@@ -0,0 +1,57 @@
+commit 8d98aa421b92765695af13c033cf7e80375c03fe
+Author: q66 <q66@chimera-linux.org>
+Date:   Sun Jul 2 15:44:51 2023 +0200
+
+    ensure turnstile-session processes fall back to display check
+    
+    As turnstile session is shared between sessions, let us fall back
+    to the check for whether a graphical session is in place. We need
+    this as our dbus session bus is managed through turnstile. In
+    systemd-using systems there is no problem because user units are
+    not a part of any explicit session (we don't get this luxury
+    because using a session is the only way to make sure our pid is
+    tracked in systemd at all; we need that to be able to resolve
+    PID to UID).
+
+diff --git a/src/polkitbackend/polkitbackendsessionmonitor-systemd.c b/src/polkitbackend/polkitbackendsessionmonitor-systemd.c
+index b00cdbd..9a3f3c3 100644
+--- a/src/polkitbackend/polkitbackendsessionmonitor-systemd.c
++++ b/src/polkitbackend/polkitbackendsessionmonitor-systemd.c
+@@ -346,7 +346,7 @@ polkit_backend_session_monitor_get_session_for_subject (PolkitBackendSessionMoni
+   PolkitUnixProcess *tmp_process = NULL;
+   PolkitUnixProcess *process = NULL;
+   PolkitSubject *session = NULL;
+-  char *session_id = NULL;
++  char *session_id = NULL, *service_id = NULL;
+   pid_t pid;
+ #if HAVE_SD_UID_GET_DISPLAY
+   uid_t uid;
+@@ -377,8 +377,26 @@ polkit_backend_session_monitor_get_session_for_subject (PolkitBackendSessionMoni
+ 
+   if (sd_pid_get_session (pid, &session_id) >= 0)
+     {
+-      session = polkit_unix_session_new (session_id);
+-      goto out;
++      /* if belonging to turnstile, ignore */
++      if (sd_session_get_service (session_id, &service_id) >= 0)
++        {
++          if (strcmp (service_id, "turnstiled"))
++            {
++              free (service_id);
++              session = polkit_unix_session_new (session_id);
++              goto out;
++            }
++          else
++            {
++              /* turnstile-managed processes are shared */
++              free(service_id);
++            }
++        }
++      else
++        {
++          session = polkit_unix_session_new (session_id);
++          goto out;
++        }
+     }
+ 
+ #if HAVE_SD_UID_GET_DISPLAY
diff --git a/srcpkgs/polkit/template b/srcpkgs/polkit/template
index 84ab7453bb9b..0435e1ce5976 100644
--- a/srcpkgs/polkit/template
+++ b/srcpkgs/polkit/template
@@ -1,7 +1,7 @@
 # Template file for 'polkit'
 pkgname=polkit
 version=121
-revision=1
+revision=2
 build_style=meson
 build_helper=gir
 configure_args="$(vopt_bool gir introspection) -Dman=true

From 6334fdf57339deb3ab3743b2d9a9f0f315efbd15 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sun, 2 Jul 2023 22:04:40 -0400
Subject: [PATCH 2/3] pam-base: add turnstile pam

---
 srcpkgs/pam-base/files/system-login | 1 +
 srcpkgs/pam-base/template           | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/pam-base/files/system-login b/srcpkgs/pam-base/files/system-login
index 2275deba480d..72c4638f07d3 100644
--- a/srcpkgs/pam-base/files/system-login
+++ b/srcpkgs/pam-base/files/system-login
@@ -14,6 +14,7 @@ session    optional   pam_loginuid.so
 session    include    system-auth
 session    optional   pam_motd.so          motd=/etc/motd
 session    optional   pam_mail.so          dir=/var/mail standard quiet
+-session   optional   pam_turnstile.so
 -session   optional   pam_elogind.so
 -session   optional   pam_dumb_runtime_dir.so
 session    required   pam_env.so
diff --git a/srcpkgs/pam-base/template b/srcpkgs/pam-base/template
index 70dfab9fa996..38bfa74cd885 100644
--- a/srcpkgs/pam-base/template
+++ b/srcpkgs/pam-base/template
@@ -1,7 +1,7 @@
 # Template file for 'pam-base'
 pkgname=pam-base
 version=0.4
-revision=2
+revision=3
 short_desc="PAM base configuration files"
 maintainer="Érico Nogueira <ericonr@disroot.org>"
 license="Public Domain"

From cb26b06310f4c20640a7dd4924388413bb787b2d Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Wed, 28 Jun 2023 05:10:55 -0400
Subject: [PATCH 3/3] New package: turnstile-0.1.6

---
 srcpkgs/turnstile/files/README.voidlinux      |  32 +++
 srcpkgs/turnstile/files/dbus.run              |   5 +
 srcpkgs/turnstile/files/turnstiled/run        |   4 +
 .../turnstile/patches/missing-include.patch   |  21 ++
 srcpkgs/turnstile/patches/runit.patch         | 203 ++++++++++++++++++
 srcpkgs/turnstile/template                    |  25 +++
 6 files changed, 290 insertions(+)
 create mode 100644 srcpkgs/turnstile/files/README.voidlinux
 create mode 100755 srcpkgs/turnstile/files/dbus.run
 create mode 100644 srcpkgs/turnstile/files/turnstiled/run
 create mode 100644 srcpkgs/turnstile/patches/missing-include.patch
 create mode 100644 srcpkgs/turnstile/patches/runit.patch
 create mode 100644 srcpkgs/turnstile/template

diff --git a/srcpkgs/turnstile/files/README.voidlinux b/srcpkgs/turnstile/files/README.voidlinux
new file mode 100644
index 000000000000..46214113067e
--- /dev/null
+++ b/srcpkgs/turnstile/files/README.voidlinux
@@ -0,0 +1,32 @@
+# User Services
+
+User services can be placed in ~/.config/service/.
+
+To ensure that a subset of services are started before login can proceed,
+these services can be listed in ~/.config/service/turnstile-ready/conf, for
+example:
+
+	core_services="dbus foo"
+
+The turnstile-ready service is created by turnstile on first login.
+
+# D-Bus Session Bus
+
+If you want to manage dbus using a turnstile-managed runit user service:
+
+	mkdir ~/.config/service/dbus
+	cp /usr/share/examples/turnstile/dbus.run ~/.config/service/dbus/run
+
+# Elogind Replacement
+
+Turnstile is not (nor ever will be, according to the developer) a complete
+replacement for elogind, but it can replace several parts, including
+XDG_RUNTIME_DIR management.
+
+If using turnstile with elogind:
+- disable rundir management in /etc/turnstile/turnstiled.conf
+  (manage_rundir = no)
+
+If using turnstile without elogind:
+- install and enable seatd for seat management
+- install and enable acpid for lid switch/button handling
diff --git a/srcpkgs/turnstile/files/dbus.run b/srcpkgs/turnstile/files/dbus.run
new file mode 100755
index 000000000000..08d45d41be45
--- /dev/null
+++ b/srcpkgs/turnstile/files/dbus.run
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+[ -r ./conf ] && . ./conf
+
+exec dbus-daemon --session --nofork --nopidfile --address="$DBUS_SESSION_BUS_ADDRESS" $OPTS
diff --git a/srcpkgs/turnstile/files/turnstiled/run b/srcpkgs/turnstile/files/turnstiled/run
new file mode 100644
index 000000000000..aa5d624fda19
--- /dev/null
+++ b/srcpkgs/turnstile/files/turnstiled/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+exec 2>&1
+exec turnstiled
diff --git a/srcpkgs/turnstile/patches/missing-include.patch b/srcpkgs/turnstile/patches/missing-include.patch
new file mode 100644
index 000000000000..289c7c32c4d2
--- /dev/null
+++ b/srcpkgs/turnstile/patches/missing-include.patch
@@ -0,0 +1,21 @@
+From 88d5778946f5dd6738d706667e76ec2f937c3ff5 Mon Sep 17 00:00:00 2001
+From: q66 <q66@chimera-linux.org>
+Date: Wed, 12 Jul 2023 04:21:41 +0200
+Subject: [PATCH] add missing include
+
+---
+ src/pam_turnstile.cc | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/pam_turnstile.cc b/src/pam_turnstile.cc
+index d0d3ae2..27ee53f 100644
+--- a/src/pam_turnstile.cc
++++ b/src/pam_turnstile.cc
+@@ -14,6 +14,7 @@
+ #include <cstdio>
+ #include <cstdlib>
+ #include <cstring>
++#include <cerrno>
+ #include <algorithm>
+ 
+ #include <pwd.h>
diff --git a/srcpkgs/turnstile/patches/runit.patch b/srcpkgs/turnstile/patches/runit.patch
new file mode 100644
index 000000000000..6356f65c5c07
--- /dev/null
+++ b/srcpkgs/turnstile/patches/runit.patch
@@ -0,0 +1,203 @@
+From 370209395d420d54a48a884e81625f9c2c88729d Mon Sep 17 00:00:00 2001
+From: classabbyamp <dev@placeviolette.net>
+Date: Wed, 28 Jun 2023 05:05:25 -0400
+Subject: [PATCH] add runit backend
+
+---
+ backend/meson.build | 16 +++++++++
+ backend/runit       | 86 +++++++++++++++++++++++++++++++++++++++++++++
+ backend/runit.conf  | 13 +++++++
+ meson.build         | 14 +++++---
+ meson_options.txt   | 10 ++++++
+ 5 files changed, 135 insertions(+), 4 deletions(-)
+ create mode 100644 backend/runit
+ create mode 100644 backend/runit.conf
+
+diff --git a/backend/meson.build b/backend/meson.build
+index 681e6a0..e4c63f1 100644
+--- a/backend/meson.build
++++ b/backend/meson.build
+@@ -13,3 +13,19 @@ if have_dinit
+         install_mode: 'rw-r--r--'
+     )
+ endif
++
++# runit backend
++
++if have_runit
++    install_data(
++        'runit',
++        install_dir: join_paths(get_option('libexecdir'), 'turnstile'),
++        install_mode: 'rwxr-xr-x'
++    )
++
++    install_data(
++        'runit.conf',
++        install_dir: join_paths(get_option('sysconfdir'), 'turnstile/backend'),
++        install_mode: 'rw-r--r--'
++    )
++endif
+diff --git a/backend/runit b/backend/runit
+new file mode 100644
+index 0000000..b293b43
+--- /dev/null
++++ b/backend/runit
+@@ -0,0 +1,86 @@
++#!/bin/sh
++#
++# This is the turnstile runit backend. It accepts the action as its first
++# argument, which is either "ready", "run", or "stop". In case of "run", it's
++# invoked directly through /bin/sh as if it was a login shell, and therefore
++# it has acccess to shell profile, and the shebang is functionally useless but
++# should be preserved as a convention. For "ready", it's a regular shell.
++#
++# Arguments for "ready":
++#
++# ready_sv: path to the readiness service
++#
++# Arguments for "run":
++#
++# ready_p:  readiness pipe (fifo). has the path to the ready service written to it.
++# srvdir:   unused
++# confdir:  the path where turnstile's configuration data resides, used
++#           to source the configuration file
++#
++# Arguments for "stop":
++#
++# pid:      the PID of the service manager to stop (gracefully); it should
++#           terminate the services it's running and then stop itself
++#
++# Copyright 2023 classabbyamp <dev@placeviolette.net>
++# License: BSD-2-Clause
++
++case "$1" in
++    run) ;;
++    ready)
++        if [ -z "$2" ] || [ ! -d "$2" ]; then
++            echo "runit: invalid readiness service '$2'" >&2
++            exit 69
++        fi
++        exec sv start "$2" >&2
++        ;;
++    stop)
++        # If runsvdir receives a HUP signal, it sends a TERM signal to each
++        # runsv(8) process it is monitoring and then exits with 111.
++        exec kill -s HUP "$2"
++        ;;
++    *)
++        exit 32
++        ;;
++esac
++
++RUNIT_READY_PIPE="$2"
++RUNIT_CONF="$4/runit.conf"
++
++if [ ! -p "$RUNIT_READY_PIPE" ]; then
++    echo "runit: invalid input argument(s)" >&2
++    exit 69
++fi
++
++if [ -z "$HOME" ] || [ ! -d "$HOME" ]; then
++    echo "runit: invalid home directory" >&2
++    exit 70
++fi
++
++shift $#
++
++# be strict
++set -e
++
++# source the conf
++[ -r "$RUNIT_CONF" ] && . "$RUNIT_CONF"
++
++# set some defaults in case the conf cannot be read or is mangled
++: "${ready_sv:="turnstile-ready"}"
++: "${services_dir:="${HOME}/.config/service"}"
++
++mkdir -p "${services_dir}/${ready_sv}" > /dev/null 2>&1
++
++# this must succeed
++cat << EOF > "${services_dir}/${ready_sv}/run"
++#!/bin/sh
++[ -r ./conf ] && . ./conf
++[ -n "\$core_services" ] && SVDIR=".." sv start \$core_services
++[ -p "$RUNIT_READY_PIPE" ] && printf "${services_dir}/${ready_sv}" > "$RUNIT_READY_PIPE"
++exec pause
++EOF
++chmod +x "${services_dir}/${ready_sv}/run"
++
++exec env DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$(id -u)/bus" \
++    runsvdir -P "$services_dir" \
++    'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+diff --git a/backend/runit.conf b/backend/runit.conf
+new file mode 100644
+index 0000000..7b258c9
+--- /dev/null
++++ b/backend/runit.conf
+@@ -0,0 +1,13 @@
++# This is the configuration file for turnstile's runit backend.
++#
++# It follows the POSIX shell syntax (being sourced into a script).
++# The complete launch environment available to dinit can be used.
++#
++# It is a low-level configuration file. In most cases, it should
++# not be modified by the user.
++
++# the name of the service that turnstile will check for login readiness
++ready_sv="turnstile-ready"
++
++# the directory user service files are read from.
++services_dir="${HOME}/.config/service"
+diff --git a/meson.build b/meson.build
+index e25ba83..dec58f8 100644
+--- a/meson.build
++++ b/meson.build
+@@ -23,6 +23,7 @@ scdoc_dep = dependency(
+ )
+ 
+ have_dinit = get_option('dinit').enabled()
++have_runit = get_option('runit').enabled()
+ 
+ conf_data = configuration_data()
+ conf_data.set_quoted('RUN_PATH', get_option('rundir'))
+@@ -101,10 +102,15 @@ install_data(
+ )
+ 
+ # decide the default backend
+-if have_dinit
+-    default_backend = 'dinit'
+-else
+-    default_backend = 'none'
++default_backend = get_option('default_backend')
++if default_backend == ''
++    if have_dinit
++        default_backend = 'dinit'
++    elif have_runit
++        default_backend = 'runit'
++    else
++        default_backend = 'none'
++    endif
+ endif
+ 
+ uconf_data = configuration_data()
+diff --git a/meson_options.txt b/meson_options.txt
+index 9b03995..4325042 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -3,6 +3,16 @@ option('dinit',
+     description: 'Whether to install Dinit-related backend and data'
+ )
+ 
++option('runit',
++    type: 'feature', value: 'disabled',
++    description: 'Whether to install runit-related backend and data'
++)
++
++option('default_backend',
++    type: 'string', value: '',
++    description: 'Override the default backend'
++)
++
+ option('rundir',
+     type: 'string', value: '/run',
+     description: 'Where the base directory will be located'
diff --git a/srcpkgs/turnstile/template b/srcpkgs/turnstile/template
new file mode 100644
index 000000000000..8552684015b4
--- /dev/null
+++ b/srcpkgs/turnstile/template
@@ -0,0 +1,25 @@
+# Template file for 'turnstile'
+pkgname=turnstile
+version=0.1.6
+revision=1
+build_style=meson
+configure_args="-Ddinit=disabled -Drunit=enabled -Ddefault_backend=runit
+ -Dmanage_rundir=true"
+hostmakedepends="pkg-config scdoc"
+makedepends="pam-devel"
+short_desc="Independent session/login tracker and user service manager"
+maintainer="classabbyamp <void@placeviolette.net>"
+license="BSD-2-Clause"
+homepage="https://github.com/chimera-linux/turnstile"
+distfiles="https://github.com/chimera-linux/turnstile/archive/refs/tags/v${version}.tar.gz"
+# _commit="a0b40dc430e365a96de65afd6ce237b58c7c3a07"
+# distfiles="https://github.com/chimera-linux/turnstile/archive/${_commit}.tar.gz"
+checksum=ea1b87ad153e97ecda698526eec1cbc9fee1cd2b134c43b449f35d9cec0a61bc
+conf_files="/etc/turnstile/turnstiled.conf"
+
+post_install() {
+	vsv turnstiled
+	vsconf "${FILESDIR}/dbus.run"
+	vdoc "${FILESDIR}/README.voidlinux"
+	vlicense COPYING.md
+}

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: New package: turnstile-0.1.6
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (19 preceding siblings ...)
  2023-07-12  3:06 ` [PR PATCH] [Updated] " classabbyamp
@ 2023-07-13 23:29 ` junkminerman
  2023-07-25 17:27 ` [PR PATCH] [Updated] " classabbyamp
                   ` (32 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: junkminerman @ 2023-07-13 23:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 207 bytes --]

New comment by junkminerman on void-packages repository

https://github.com/void-linux/void-packages/pull/44676#issuecomment-1635053224

Comment:
Sorry for all the added noise. 0.1.6 fixed the issue for me.

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PR PATCH] [Updated] New package: turnstile-0.1.6
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (20 preceding siblings ...)
  2023-07-13 23:29 ` New package: turnstile-0.1.6 junkminerman
@ 2023-07-25 17:27 ` classabbyamp
  2023-09-08 10:47 ` classabbyamp
                   ` (31 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: classabbyamp @ 2023-07-25 17:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 741 bytes --]

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages new/turnstile
https://github.com/void-linux/void-packages/pull/44676

New package: turnstile-0.1.6
WIP while i create the runit backend upstream ([mostly done](https://github.com/chimera-linux/turnstile/compare/master...classabbyamp:runit-backend))

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**



A patch file from https://github.com/void-linux/void-packages/pull/44676.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-new/turnstile-44676.patch --]
[-- Type: text/x-diff, Size: 16199 bytes --]

From 7da8adf4da322a456bd9ca2cbc1631c46a3063c5 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 11 Jul 2023 22:02:49 -0400
Subject: [PATCH 1/3] polkit: patch to support turnstile

---
 srcpkgs/polkit/patches/turnstile.patch | 57 ++++++++++++++++++++++++++
 srcpkgs/polkit/template                |  2 +-
 2 files changed, 58 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/polkit/patches/turnstile.patch

diff --git a/srcpkgs/polkit/patches/turnstile.patch b/srcpkgs/polkit/patches/turnstile.patch
new file mode 100644
index 0000000000000..4f56ed130eefd
--- /dev/null
+++ b/srcpkgs/polkit/patches/turnstile.patch
@@ -0,0 +1,57 @@
+commit 8d98aa421b92765695af13c033cf7e80375c03fe
+Author: q66 <q66@chimera-linux.org>
+Date:   Sun Jul 2 15:44:51 2023 +0200
+
+    ensure turnstile-session processes fall back to display check
+    
+    As turnstile session is shared between sessions, let us fall back
+    to the check for whether a graphical session is in place. We need
+    this as our dbus session bus is managed through turnstile. In
+    systemd-using systems there is no problem because user units are
+    not a part of any explicit session (we don't get this luxury
+    because using a session is the only way to make sure our pid is
+    tracked in systemd at all; we need that to be able to resolve
+    PID to UID).
+
+diff --git a/src/polkitbackend/polkitbackendsessionmonitor-systemd.c b/src/polkitbackend/polkitbackendsessionmonitor-systemd.c
+index b00cdbd..9a3f3c3 100644
+--- a/src/polkitbackend/polkitbackendsessionmonitor-systemd.c
++++ b/src/polkitbackend/polkitbackendsessionmonitor-systemd.c
+@@ -346,7 +346,7 @@ polkit_backend_session_monitor_get_session_for_subject (PolkitBackendSessionMoni
+   PolkitUnixProcess *tmp_process = NULL;
+   PolkitUnixProcess *process = NULL;
+   PolkitSubject *session = NULL;
+-  char *session_id = NULL;
++  char *session_id = NULL, *service_id = NULL;
+   pid_t pid;
+ #if HAVE_SD_UID_GET_DISPLAY
+   uid_t uid;
+@@ -377,8 +377,26 @@ polkit_backend_session_monitor_get_session_for_subject (PolkitBackendSessionMoni
+ 
+   if (sd_pid_get_session (pid, &session_id) >= 0)
+     {
+-      session = polkit_unix_session_new (session_id);
+-      goto out;
++      /* if belonging to turnstile, ignore */
++      if (sd_session_get_service (session_id, &service_id) >= 0)
++        {
++          if (strcmp (service_id, "turnstiled"))
++            {
++              free (service_id);
++              session = polkit_unix_session_new (session_id);
++              goto out;
++            }
++          else
++            {
++              /* turnstile-managed processes are shared */
++              free(service_id);
++            }
++        }
++      else
++        {
++          session = polkit_unix_session_new (session_id);
++          goto out;
++        }
+     }
+ 
+ #if HAVE_SD_UID_GET_DISPLAY
diff --git a/srcpkgs/polkit/template b/srcpkgs/polkit/template
index 84ab7453bb9b6..0435e1ce5976b 100644
--- a/srcpkgs/polkit/template
+++ b/srcpkgs/polkit/template
@@ -1,7 +1,7 @@
 # Template file for 'polkit'
 pkgname=polkit
 version=121
-revision=1
+revision=2
 build_style=meson
 build_helper=gir
 configure_args="$(vopt_bool gir introspection) -Dman=true

From ae9dc69e3eae96195747483e4f486f6b34e5825a Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sun, 2 Jul 2023 22:04:40 -0400
Subject: [PATCH 2/3] pam-base: add turnstile pam

---
 srcpkgs/pam-base/files/system-login | 1 +
 srcpkgs/pam-base/template           | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/pam-base/files/system-login b/srcpkgs/pam-base/files/system-login
index 2275deba480d3..72c4638f07d3f 100644
--- a/srcpkgs/pam-base/files/system-login
+++ b/srcpkgs/pam-base/files/system-login
@@ -14,6 +14,7 @@ session    optional   pam_loginuid.so
 session    include    system-auth
 session    optional   pam_motd.so          motd=/etc/motd
 session    optional   pam_mail.so          dir=/var/mail standard quiet
+-session   optional   pam_turnstile.so
 -session   optional   pam_elogind.so
 -session   optional   pam_dumb_runtime_dir.so
 session    required   pam_env.so
diff --git a/srcpkgs/pam-base/template b/srcpkgs/pam-base/template
index 70dfab9fa9965..38bfa74cd8856 100644
--- a/srcpkgs/pam-base/template
+++ b/srcpkgs/pam-base/template
@@ -1,7 +1,7 @@
 # Template file for 'pam-base'
 pkgname=pam-base
 version=0.4
-revision=2
+revision=3
 short_desc="PAM base configuration files"
 maintainer="Érico Nogueira <ericonr@disroot.org>"
 license="Public Domain"

From 55f22813eefc3dfe4cf0e2d7418d0ba737fec3ef Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Wed, 28 Jun 2023 05:10:55 -0400
Subject: [PATCH 3/3] New package: turnstile-0.1.6

---
 srcpkgs/turnstile/files/README.voidlinux      |  41 ++++
 srcpkgs/turnstile/files/dbus.run              |   6 +
 srcpkgs/turnstile/files/turnstiled/run        |   4 +
 .../turnstile/patches/missing-include.patch   |  21 ++
 srcpkgs/turnstile/patches/runit.patch         | 203 ++++++++++++++++++
 srcpkgs/turnstile/template                    |  25 +++
 6 files changed, 300 insertions(+)
 create mode 100644 srcpkgs/turnstile/files/README.voidlinux
 create mode 100755 srcpkgs/turnstile/files/dbus.run
 create mode 100644 srcpkgs/turnstile/files/turnstiled/run
 create mode 100644 srcpkgs/turnstile/patches/missing-include.patch
 create mode 100644 srcpkgs/turnstile/patches/runit.patch
 create mode 100644 srcpkgs/turnstile/template

diff --git a/srcpkgs/turnstile/files/README.voidlinux b/srcpkgs/turnstile/files/README.voidlinux
new file mode 100644
index 0000000000000..dc178c6e2c554
--- /dev/null
+++ b/srcpkgs/turnstile/files/README.voidlinux
@@ -0,0 +1,41 @@
+# User Services
+
+User services can be placed in ~/.config/service/.
+
+To ensure that a subset of services are started before login can proceed,
+these services can be listed in ~/.config/service/turnstile-ready/conf,
+for example:
+
+	core_services="dbus foo"
+
+The turnstile-ready service is created by turnstile on first login.
+
+# D-Bus User Session Bus
+
+If you want to manage the D-Bus user session bus using a turnstile-managed
+runit user service:
+
+	mkdir ~/.config/service/dbus
+	cp /usr/share/examples/turnstile/dbus.run ~/.config/service/dbus/run
+
+For some D-Bus-launched applications (like XDG portals), D-Bus needs to know
+about some environment variables:
+
+	# for Xorg
+	dbus-update-activation-environment DISPLAY XAUTHORITY
+	# for wayland
+	dbus-update-activation-environment WAYLAND_DISPLAY
+
+# Elogind Replacement
+
+Turnstile is not (nor ever will be, according to the developer) a complete
+replacement for elogind, but it can replace several parts, including
+XDG_RUNTIME_DIR management.
+
+If using turnstile with elogind:
+- disable rundir management in /etc/turnstile/turnstiled.conf
+  (manage_rundir = no)
+
+If using turnstile without elogind:
+- install and enable seatd for seat management
+- install and enable acpid for lid switch/button handling
diff --git a/srcpkgs/turnstile/files/dbus.run b/srcpkgs/turnstile/files/dbus.run
new file mode 100755
index 0000000000000..5f3e21cb4656d
--- /dev/null
+++ b/srcpkgs/turnstile/files/dbus.run
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+[ -r ./conf ] && . ./conf
+
+exec chpst -C "$HOME" dbus-daemon --session --nofork --nopidfile \
+	--address="$DBUS_SESSION_BUS_ADDRESS" $OPTS
diff --git a/srcpkgs/turnstile/files/turnstiled/run b/srcpkgs/turnstile/files/turnstiled/run
new file mode 100644
index 0000000000000..aa5d624fda19a
--- /dev/null
+++ b/srcpkgs/turnstile/files/turnstiled/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+exec 2>&1
+exec turnstiled
diff --git a/srcpkgs/turnstile/patches/missing-include.patch b/srcpkgs/turnstile/patches/missing-include.patch
new file mode 100644
index 0000000000000..289c7c32c4d2b
--- /dev/null
+++ b/srcpkgs/turnstile/patches/missing-include.patch
@@ -0,0 +1,21 @@
+From 88d5778946f5dd6738d706667e76ec2f937c3ff5 Mon Sep 17 00:00:00 2001
+From: q66 <q66@chimera-linux.org>
+Date: Wed, 12 Jul 2023 04:21:41 +0200
+Subject: [PATCH] add missing include
+
+---
+ src/pam_turnstile.cc | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/pam_turnstile.cc b/src/pam_turnstile.cc
+index d0d3ae2..27ee53f 100644
+--- a/src/pam_turnstile.cc
++++ b/src/pam_turnstile.cc
+@@ -14,6 +14,7 @@
+ #include <cstdio>
+ #include <cstdlib>
+ #include <cstring>
++#include <cerrno>
+ #include <algorithm>
+ 
+ #include <pwd.h>
diff --git a/srcpkgs/turnstile/patches/runit.patch b/srcpkgs/turnstile/patches/runit.patch
new file mode 100644
index 0000000000000..6356f65c5c070
--- /dev/null
+++ b/srcpkgs/turnstile/patches/runit.patch
@@ -0,0 +1,203 @@
+From 370209395d420d54a48a884e81625f9c2c88729d Mon Sep 17 00:00:00 2001
+From: classabbyamp <dev@placeviolette.net>
+Date: Wed, 28 Jun 2023 05:05:25 -0400
+Subject: [PATCH] add runit backend
+
+---
+ backend/meson.build | 16 +++++++++
+ backend/runit       | 86 +++++++++++++++++++++++++++++++++++++++++++++
+ backend/runit.conf  | 13 +++++++
+ meson.build         | 14 +++++---
+ meson_options.txt   | 10 ++++++
+ 5 files changed, 135 insertions(+), 4 deletions(-)
+ create mode 100644 backend/runit
+ create mode 100644 backend/runit.conf
+
+diff --git a/backend/meson.build b/backend/meson.build
+index 681e6a0..e4c63f1 100644
+--- a/backend/meson.build
++++ b/backend/meson.build
+@@ -13,3 +13,19 @@ if have_dinit
+         install_mode: 'rw-r--r--'
+     )
+ endif
++
++# runit backend
++
++if have_runit
++    install_data(
++        'runit',
++        install_dir: join_paths(get_option('libexecdir'), 'turnstile'),
++        install_mode: 'rwxr-xr-x'
++    )
++
++    install_data(
++        'runit.conf',
++        install_dir: join_paths(get_option('sysconfdir'), 'turnstile/backend'),
++        install_mode: 'rw-r--r--'
++    )
++endif
+diff --git a/backend/runit b/backend/runit
+new file mode 100644
+index 0000000..b293b43
+--- /dev/null
++++ b/backend/runit
+@@ -0,0 +1,86 @@
++#!/bin/sh
++#
++# This is the turnstile runit backend. It accepts the action as its first
++# argument, which is either "ready", "run", or "stop". In case of "run", it's
++# invoked directly through /bin/sh as if it was a login shell, and therefore
++# it has acccess to shell profile, and the shebang is functionally useless but
++# should be preserved as a convention. For "ready", it's a regular shell.
++#
++# Arguments for "ready":
++#
++# ready_sv: path to the readiness service
++#
++# Arguments for "run":
++#
++# ready_p:  readiness pipe (fifo). has the path to the ready service written to it.
++# srvdir:   unused
++# confdir:  the path where turnstile's configuration data resides, used
++#           to source the configuration file
++#
++# Arguments for "stop":
++#
++# pid:      the PID of the service manager to stop (gracefully); it should
++#           terminate the services it's running and then stop itself
++#
++# Copyright 2023 classabbyamp <dev@placeviolette.net>
++# License: BSD-2-Clause
++
++case "$1" in
++    run) ;;
++    ready)
++        if [ -z "$2" ] || [ ! -d "$2" ]; then
++            echo "runit: invalid readiness service '$2'" >&2
++            exit 69
++        fi
++        exec sv start "$2" >&2
++        ;;
++    stop)
++        # If runsvdir receives a HUP signal, it sends a TERM signal to each
++        # runsv(8) process it is monitoring and then exits with 111.
++        exec kill -s HUP "$2"
++        ;;
++    *)
++        exit 32
++        ;;
++esac
++
++RUNIT_READY_PIPE="$2"
++RUNIT_CONF="$4/runit.conf"
++
++if [ ! -p "$RUNIT_READY_PIPE" ]; then
++    echo "runit: invalid input argument(s)" >&2
++    exit 69
++fi
++
++if [ -z "$HOME" ] || [ ! -d "$HOME" ]; then
++    echo "runit: invalid home directory" >&2
++    exit 70
++fi
++
++shift $#
++
++# be strict
++set -e
++
++# source the conf
++[ -r "$RUNIT_CONF" ] && . "$RUNIT_CONF"
++
++# set some defaults in case the conf cannot be read or is mangled
++: "${ready_sv:="turnstile-ready"}"
++: "${services_dir:="${HOME}/.config/service"}"
++
++mkdir -p "${services_dir}/${ready_sv}" > /dev/null 2>&1
++
++# this must succeed
++cat << EOF > "${services_dir}/${ready_sv}/run"
++#!/bin/sh
++[ -r ./conf ] && . ./conf
++[ -n "\$core_services" ] && SVDIR=".." sv start \$core_services
++[ -p "$RUNIT_READY_PIPE" ] && printf "${services_dir}/${ready_sv}" > "$RUNIT_READY_PIPE"
++exec pause
++EOF
++chmod +x "${services_dir}/${ready_sv}/run"
++
++exec env DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$(id -u)/bus" \
++    runsvdir -P "$services_dir" \
++    'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+diff --git a/backend/runit.conf b/backend/runit.conf
+new file mode 100644
+index 0000000..7b258c9
+--- /dev/null
++++ b/backend/runit.conf
+@@ -0,0 +1,13 @@
++# This is the configuration file for turnstile's runit backend.
++#
++# It follows the POSIX shell syntax (being sourced into a script).
++# The complete launch environment available to dinit can be used.
++#
++# It is a low-level configuration file. In most cases, it should
++# not be modified by the user.
++
++# the name of the service that turnstile will check for login readiness
++ready_sv="turnstile-ready"
++
++# the directory user service files are read from.
++services_dir="${HOME}/.config/service"
+diff --git a/meson.build b/meson.build
+index e25ba83..dec58f8 100644
+--- a/meson.build
++++ b/meson.build
+@@ -23,6 +23,7 @@ scdoc_dep = dependency(
+ )
+ 
+ have_dinit = get_option('dinit').enabled()
++have_runit = get_option('runit').enabled()
+ 
+ conf_data = configuration_data()
+ conf_data.set_quoted('RUN_PATH', get_option('rundir'))
+@@ -101,10 +102,15 @@ install_data(
+ )
+ 
+ # decide the default backend
+-if have_dinit
+-    default_backend = 'dinit'
+-else
+-    default_backend = 'none'
++default_backend = get_option('default_backend')
++if default_backend == ''
++    if have_dinit
++        default_backend = 'dinit'
++    elif have_runit
++        default_backend = 'runit'
++    else
++        default_backend = 'none'
++    endif
+ endif
+ 
+ uconf_data = configuration_data()
+diff --git a/meson_options.txt b/meson_options.txt
+index 9b03995..4325042 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -3,6 +3,16 @@ option('dinit',
+     description: 'Whether to install Dinit-related backend and data'
+ )
+ 
++option('runit',
++    type: 'feature', value: 'disabled',
++    description: 'Whether to install runit-related backend and data'
++)
++
++option('default_backend',
++    type: 'string', value: '',
++    description: 'Override the default backend'
++)
++
+ option('rundir',
+     type: 'string', value: '/run',
+     description: 'Where the base directory will be located'
diff --git a/srcpkgs/turnstile/template b/srcpkgs/turnstile/template
new file mode 100644
index 0000000000000..8552684015b48
--- /dev/null
+++ b/srcpkgs/turnstile/template
@@ -0,0 +1,25 @@
+# Template file for 'turnstile'
+pkgname=turnstile
+version=0.1.6
+revision=1
+build_style=meson
+configure_args="-Ddinit=disabled -Drunit=enabled -Ddefault_backend=runit
+ -Dmanage_rundir=true"
+hostmakedepends="pkg-config scdoc"
+makedepends="pam-devel"
+short_desc="Independent session/login tracker and user service manager"
+maintainer="classabbyamp <void@placeviolette.net>"
+license="BSD-2-Clause"
+homepage="https://github.com/chimera-linux/turnstile"
+distfiles="https://github.com/chimera-linux/turnstile/archive/refs/tags/v${version}.tar.gz"
+# _commit="a0b40dc430e365a96de65afd6ce237b58c7c3a07"
+# distfiles="https://github.com/chimera-linux/turnstile/archive/${_commit}.tar.gz"
+checksum=ea1b87ad153e97ecda698526eec1cbc9fee1cd2b134c43b449f35d9cec0a61bc
+conf_files="/etc/turnstile/turnstiled.conf"
+
+post_install() {
+	vsv turnstiled
+	vsconf "${FILESDIR}/dbus.run"
+	vdoc "${FILESDIR}/README.voidlinux"
+	vlicense COPYING.md
+}

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PR PATCH] [Updated] New package: turnstile-0.1.6
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (21 preceding siblings ...)
  2023-07-25 17:27 ` [PR PATCH] [Updated] " classabbyamp
@ 2023-09-08 10:47 ` classabbyamp
  2023-09-08 10:56 ` classabbyamp
                   ` (30 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: classabbyamp @ 2023-09-08 10:47 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 741 bytes --]

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages new/turnstile
https://github.com/void-linux/void-packages/pull/44676

New package: turnstile-0.1.6
WIP while i create the runit backend upstream ([mostly done](https://github.com/chimera-linux/turnstile/compare/master...classabbyamp:runit-backend))

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**



A patch file from https://github.com/void-linux/void-packages/pull/44676.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-new/turnstile-44676.patch --]
[-- Type: text/x-diff, Size: 15726 bytes --]

From 708d49b2db88379d5137da3b1c73c1b767923f05 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 11 Jul 2023 22:02:49 -0400
Subject: [PATCH 1/3] polkit: patch to support turnstile

---
 srcpkgs/polkit/patches/turnstile.patch | 57 ++++++++++++++++++++++++++
 srcpkgs/polkit/template                |  2 +-
 2 files changed, 58 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/polkit/patches/turnstile.patch

diff --git a/srcpkgs/polkit/patches/turnstile.patch b/srcpkgs/polkit/patches/turnstile.patch
new file mode 100644
index 0000000000000..4f56ed130eefd
--- /dev/null
+++ b/srcpkgs/polkit/patches/turnstile.patch
@@ -0,0 +1,57 @@
+commit 8d98aa421b92765695af13c033cf7e80375c03fe
+Author: q66 <q66@chimera-linux.org>
+Date:   Sun Jul 2 15:44:51 2023 +0200
+
+    ensure turnstile-session processes fall back to display check
+    
+    As turnstile session is shared between sessions, let us fall back
+    to the check for whether a graphical session is in place. We need
+    this as our dbus session bus is managed through turnstile. In
+    systemd-using systems there is no problem because user units are
+    not a part of any explicit session (we don't get this luxury
+    because using a session is the only way to make sure our pid is
+    tracked in systemd at all; we need that to be able to resolve
+    PID to UID).
+
+diff --git a/src/polkitbackend/polkitbackendsessionmonitor-systemd.c b/src/polkitbackend/polkitbackendsessionmonitor-systemd.c
+index b00cdbd..9a3f3c3 100644
+--- a/src/polkitbackend/polkitbackendsessionmonitor-systemd.c
++++ b/src/polkitbackend/polkitbackendsessionmonitor-systemd.c
+@@ -346,7 +346,7 @@ polkit_backend_session_monitor_get_session_for_subject (PolkitBackendSessionMoni
+   PolkitUnixProcess *tmp_process = NULL;
+   PolkitUnixProcess *process = NULL;
+   PolkitSubject *session = NULL;
+-  char *session_id = NULL;
++  char *session_id = NULL, *service_id = NULL;
+   pid_t pid;
+ #if HAVE_SD_UID_GET_DISPLAY
+   uid_t uid;
+@@ -377,8 +377,26 @@ polkit_backend_session_monitor_get_session_for_subject (PolkitBackendSessionMoni
+ 
+   if (sd_pid_get_session (pid, &session_id) >= 0)
+     {
+-      session = polkit_unix_session_new (session_id);
+-      goto out;
++      /* if belonging to turnstile, ignore */
++      if (sd_session_get_service (session_id, &service_id) >= 0)
++        {
++          if (strcmp (service_id, "turnstiled"))
++            {
++              free (service_id);
++              session = polkit_unix_session_new (session_id);
++              goto out;
++            }
++          else
++            {
++              /* turnstile-managed processes are shared */
++              free(service_id);
++            }
++        }
++      else
++        {
++          session = polkit_unix_session_new (session_id);
++          goto out;
++        }
+     }
+ 
+ #if HAVE_SD_UID_GET_DISPLAY
diff --git a/srcpkgs/polkit/template b/srcpkgs/polkit/template
index 84ab7453bb9b6..0435e1ce5976b 100644
--- a/srcpkgs/polkit/template
+++ b/srcpkgs/polkit/template
@@ -1,7 +1,7 @@
 # Template file for 'polkit'
 pkgname=polkit
 version=121
-revision=1
+revision=2
 build_style=meson
 build_helper=gir
 configure_args="$(vopt_bool gir introspection) -Dman=true

From a12003a66347a36923ae7cd68aba7bc0cd15acf9 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sun, 2 Jul 2023 22:04:40 -0400
Subject: [PATCH 2/3] pam-base: add turnstile pam

---
 srcpkgs/pam-base/files/system-login | 1 +
 srcpkgs/pam-base/template           | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/pam-base/files/system-login b/srcpkgs/pam-base/files/system-login
index 2275deba480d3..72c4638f07d3f 100644
--- a/srcpkgs/pam-base/files/system-login
+++ b/srcpkgs/pam-base/files/system-login
@@ -14,6 +14,7 @@ session    optional   pam_loginuid.so
 session    include    system-auth
 session    optional   pam_motd.so          motd=/etc/motd
 session    optional   pam_mail.so          dir=/var/mail standard quiet
+-session   optional   pam_turnstile.so
 -session   optional   pam_elogind.so
 -session   optional   pam_dumb_runtime_dir.so
 session    required   pam_env.so
diff --git a/srcpkgs/pam-base/template b/srcpkgs/pam-base/template
index 70dfab9fa9965..38bfa74cd8856 100644
--- a/srcpkgs/pam-base/template
+++ b/srcpkgs/pam-base/template
@@ -1,7 +1,7 @@
 # Template file for 'pam-base'
 pkgname=pam-base
 version=0.4
-revision=2
+revision=3
 short_desc="PAM base configuration files"
 maintainer="Érico Nogueira <ericonr@disroot.org>"
 license="Public Domain"

From 4a28baf58306c23d11e2bb7ed06c33e21f972f20 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Wed, 28 Jun 2023 05:10:55 -0400
Subject: [PATCH 3/3] New package: turnstile-0.1.6

---
 srcpkgs/turnstile/files/README.voidlinux |  45 +++++
 srcpkgs/turnstile/files/dbus.run         |  11 ++
 srcpkgs/turnstile/files/turnstiled/run   |   4 +
 srcpkgs/turnstile/patches/runit.patch    | 208 +++++++++++++++++++++++
 srcpkgs/turnstile/template               |  24 +++
 5 files changed, 292 insertions(+)
 create mode 100644 srcpkgs/turnstile/files/README.voidlinux
 create mode 100755 srcpkgs/turnstile/files/dbus.run
 create mode 100644 srcpkgs/turnstile/files/turnstiled/run
 create mode 100644 srcpkgs/turnstile/patches/runit.patch
 create mode 100644 srcpkgs/turnstile/template

diff --git a/srcpkgs/turnstile/files/README.voidlinux b/srcpkgs/turnstile/files/README.voidlinux
new file mode 100644
index 0000000000000..22c30e5e5aca6
--- /dev/null
+++ b/srcpkgs/turnstile/files/README.voidlinux
@@ -0,0 +1,45 @@
+# User Services
+
+User services can be placed in ~/.config/service/.
+
+To ensure that a subset of services are started before login can proceed,
+these services can be listed in ~/.config/service/turnstile-ready/conf, for
+example:
+
+	core_services="dbus foo"
+
+The turnstile-ready service is created by turnstile on first login.
+
+## Shared Environment for User Services
+
+To give user services access to important environment variables, chpst's
+envdir functionality can be used. See chpst(8) (-e flag) for more info.
+
+To make a service aware of these variables:
+
+	- exec foo
+	+ exec chpst -e "$TURNSTILE_ENV_DIR" foo
+
+Inside user services, the convenience variable "$TURNSTILE_ENV_DIR" can be used
+to refer to this directory.
+
+# D-Bus Session Bus
+
+If you want to manage dbus using a turnstile-managed runit user service:
+
+	mkdir ~/.config/service/dbus
+	ln -s /usr/share/examples/turnstile/dbus.run ~/.config/service/dbus/run
+
+# Elogind Replacement
+
+Turnstile is not (nor ever will be, according to the developer) a complete
+replacement for elogind, but it can replace several parts, including
+XDG_RUNTIME_DIR management.
+
+If using turnstile with elogind:
+- disable rundir management in /etc/turnstile/turnstiled.conf
+  (manage_rundir = no)
+
+If using turnstile without elogind:
+- install and enable seatd for seat management
+- install and enable acpid for lid switch/button handling
diff --git a/srcpkgs/turnstile/files/dbus.run b/srcpkgs/turnstile/files/dbus.run
new file mode 100755
index 0000000000000..dc7473e45fc52
--- /dev/null
+++ b/srcpkgs/turnstile/files/dbus.run
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+[ -r ./conf ] && . ./conf
+
+: "${DBUS_SESSION_BUS_ADDRESS:=unix:path=/run/user/$(id -u)/bus}"
+
+if [ -d "$TURNSTILE_ENV_DIR" ]; then
+	echo "$DBUS_SESSION_BUS_ADDRESS" > "$TURNSTILE_ENV_DIR"/DBUS_SESSION_BUS_ADDRESS
+fi
+
+exec chpst -e "$TURNSTILE_ENV_DIR" dbus-daemon --session --nofork --nopidfile --address="$DBUS_SESSION_BUS_ADDRESS" $OPTS
diff --git a/srcpkgs/turnstile/files/turnstiled/run b/srcpkgs/turnstile/files/turnstiled/run
new file mode 100644
index 0000000000000..aa5d624fda19a
--- /dev/null
+++ b/srcpkgs/turnstile/files/turnstiled/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+exec 2>&1
+exec turnstiled
diff --git a/srcpkgs/turnstile/patches/runit.patch b/srcpkgs/turnstile/patches/runit.patch
new file mode 100644
index 0000000000000..1114a500bda39
--- /dev/null
+++ b/srcpkgs/turnstile/patches/runit.patch
@@ -0,0 +1,208 @@
+From 4d1b7fbf9cde23c89eb6ce5a08f8afa2edeef0e9 Mon Sep 17 00:00:00 2001
+From: classabbyamp <dev@placeviolette.net>
+Date: Wed, 28 Jun 2023 05:05:25 -0400
+Subject: [PATCH] add runit backend
+
+---
+ backend/meson.build | 16 +++++++++
+ backend/runit       | 88 +++++++++++++++++++++++++++++++++++++++++++++
+ backend/runit.conf  | 16 +++++++++
+ meson.build         | 14 +++++---
+ meson_options.txt   | 10 ++++++
+ 5 files changed, 140 insertions(+), 4 deletions(-)
+ create mode 100644 backend/runit
+ create mode 100644 backend/runit.conf
+
+diff --git a/backend/meson.build b/backend/meson.build
+index 681e6a0..e4c63f1 100644
+--- a/backend/meson.build
++++ b/backend/meson.build
+@@ -13,3 +13,19 @@ if have_dinit
+         install_mode: 'rw-r--r--'
+     )
+ endif
++
++# runit backend
++
++if have_runit
++    install_data(
++        'runit',
++        install_dir: join_paths(get_option('libexecdir'), 'turnstile'),
++        install_mode: 'rwxr-xr-x'
++    )
++
++    install_data(
++        'runit.conf',
++        install_dir: join_paths(get_option('sysconfdir'), 'turnstile/backend'),
++        install_mode: 'rw-r--r--'
++    )
++endif
+diff --git a/backend/runit b/backend/runit
+new file mode 100644
+index 0000000..a9d7454
+--- /dev/null
++++ b/backend/runit
+@@ -0,0 +1,88 @@
++#!/bin/sh
++#
++# This is the turnstile runit backend. It accepts the action as its first
++# argument, which is either "ready", "run", or "stop". In case of "run", it's
++# invoked directly through /bin/sh as if it was a login shell, and therefore
++# it has acccess to shell profile, and the shebang is functionally useless but
++# should be preserved as a convention. For "ready", it's a regular shell.
++#
++# Arguments for "ready":
++#
++# ready_sv: path to the readiness service
++#
++# Arguments for "run":
++#
++# ready_p:  readiness pipe (fifo). has the path to the ready service written to it.
++# srvdir:   unused
++# confdir:  the path where turnstile's configuration data resides, used
++#           to source the configuration file
++#
++# Arguments for "stop":
++#
++# pid:      the PID of the service manager to stop (gracefully); it should
++#           terminate the services it's running and then stop itself
++#
++# Copyright 2023 classabbyamp <dev@placeviolette.net>
++# License: BSD-2-Clause
++
++case "$1" in
++    run) ;;
++    ready)
++        if [ -z "$2" ] || [ ! -d "$2" ]; then
++            echo "runit: invalid readiness service '$2'" >&2
++            exit 69
++        fi
++        exec sv start "$2" >&2
++        ;;
++    stop)
++        # If runsvdir receives a HUP signal, it sends a TERM signal to each
++        # runsv(8) process it is monitoring and then exits with 111.
++        exec kill -s HUP "$2"
++        ;;
++    *)
++        exit 32
++        ;;
++esac
++
++RUNIT_READY_PIPE="$2"
++RUNIT_CONF="$4/runit.conf"
++
++if [ ! -p "$RUNIT_READY_PIPE" ]; then
++    echo "runit: invalid input argument(s)" >&2
++    exit 69
++fi
++
++if [ -z "$HOME" ] || [ ! -d "$HOME" ]; then
++    echo "runit: invalid home directory" >&2
++    exit 70
++fi
++
++shift $#
++
++# be strict
++set -e
++
++# source the conf
++[ -r "$RUNIT_CONF" ] && . "$RUNIT_CONF"
++
++# set some defaults in case the conf cannot be read or is mangled
++: "${ready_sv:="turnstile-ready"}"
++: "${services_dir:="${HOME}/.config/service"}"
++: "${service_env_dir:="${HOME}/.config/service-env"}"
++
++mkdir -p "${services_dir}/${ready_sv}" > /dev/null 2>&1
++mkdir -p "${service_env_dir}" > /dev/null 2>&1
++
++# this must succeed
++cat << EOF > "${services_dir}/${ready_sv}/run"
++#!/bin/sh
++[ -r ./conf ] && . ./conf
++[ -n "\$core_services" ] && SVDIR=".." sv start \$core_services
++[ -p "$RUNIT_READY_PIPE" ] && printf "${services_dir}/${ready_sv}" > "$RUNIT_READY_PIPE"
++exec pause
++EOF
++chmod +x "${services_dir}/${ready_sv}/run"
++
++exec env TURNSTILE_ENV_DIR="$service_env_dir" \
++    runsvdir -P "$services_dir" \
++    'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+diff --git a/backend/runit.conf b/backend/runit.conf
+new file mode 100644
+index 0000000..88a2d04
+--- /dev/null
++++ b/backend/runit.conf
+@@ -0,0 +1,16 @@
++# This is the configuration file for turnstile's runit backend.
++#
++# It follows the POSIX shell syntax (being sourced into a script).
++# The complete launch environment available to dinit can be used.
++#
++# It is a low-level configuration file. In most cases, it should
++# not be modified by the user.
++
++# the name of the service that turnstile will check for login readiness
++ready_sv="turnstile-ready"
++
++# the directory user service files are read from.
++services_dir="${HOME}/.config/service"
++
++# the environment variable directory user service files can read from.
++service_env_dir="${HOME}/.config/service-env"
+diff --git a/meson.build b/meson.build
+index 5f2e6f8..87f9d3b 100644
+--- a/meson.build
++++ b/meson.build
+@@ -22,6 +22,7 @@ scdoc_dep = dependency(
+ )
+ 
+ have_dinit = get_option('dinit').enabled()
++have_runit = get_option('runit').enabled()
+ 
+ conf_data = configuration_data()
+ conf_data.set_quoted('RUN_PATH', get_option('rundir'))
+@@ -101,10 +102,15 @@ install_data(
+ )
+ 
+ # decide the default backend
+-if have_dinit
+-    default_backend = 'dinit'
+-else
+-    default_backend = 'none'
++default_backend = get_option('default_backend')
++if default_backend == ''
++    if have_dinit
++        default_backend = 'dinit'
++    elif have_runit
++        default_backend = 'runit'
++    else
++        default_backend = 'none'
++    endif
+ endif
+ 
+ uconf_data = configuration_data()
+diff --git a/meson_options.txt b/meson_options.txt
+index 9b03995..4325042 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -3,6 +3,16 @@ option('dinit',
+     description: 'Whether to install Dinit-related backend and data'
+ )
+ 
++option('runit',
++    type: 'feature', value: 'disabled',
++    description: 'Whether to install runit-related backend and data'
++)
++
++option('default_backend',
++    type: 'string', value: '',
++    description: 'Override the default backend'
++)
++
+ option('rundir',
+     type: 'string', value: '/run',
+     description: 'Where the base directory will be located'
diff --git a/srcpkgs/turnstile/template b/srcpkgs/turnstile/template
new file mode 100644
index 0000000000000..9916832364699
--- /dev/null
+++ b/srcpkgs/turnstile/template
@@ -0,0 +1,24 @@
+# Template file for 'turnstile'
+pkgname=turnstile
+version=0.1.8
+revision=1
+build_style=meson
+configure_args="-Ddinit=disabled -Drunit=enabled -Ddefault_backend=runit
+ -Dmanage_rundir=true"
+hostmakedepends="pkg-config scdoc"
+makedepends="pam-devel"
+short_desc="Independent session/login tracker and user service manager"
+maintainer="classabbyamp <void@placeviolette.net>"
+license="BSD-2-Clause"
+homepage="https://github.com/chimera-linux/turnstile"
+distfiles="https://github.com/chimera-linux/turnstile/archive/refs/tags/v${version}.tar.gz"
+checksum=7eaab8c80c76ae9a9a711d7dc57ec346b9af09be99b526a5a3129a7fc9bd7a76
+conf_files="/etc/turnstile/turnstiled.conf"
+
+post_install() {
+	vsv turnstiled
+	vsconf "${FILESDIR}/dbus.run"
+	chmod +x "${DESTDIR}/usr/share/examples/turnstile/dbus.run"
+	vdoc "${FILESDIR}/README.voidlinux"
+	vlicense COPYING.md
+}

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PR PATCH] [Updated] New package: turnstile-0.1.6
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (22 preceding siblings ...)
  2023-09-08 10:47 ` classabbyamp
@ 2023-09-08 10:56 ` classabbyamp
  2023-09-08 11:04 ` [PR PATCH] [Closed]: New package: turnstile-0.1.8 classabbyamp
                   ` (29 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: classabbyamp @ 2023-09-08 10:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 741 bytes --]

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages new/turnstile
https://github.com/void-linux/void-packages/pull/44676

New package: turnstile-0.1.6
WIP while i create the runit backend upstream ([mostly done](https://github.com/chimera-linux/turnstile/compare/master...classabbyamp:runit-backend))

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**



A patch file from https://github.com/void-linux/void-packages/pull/44676.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-new/turnstile-44676.patch --]
[-- Type: text/x-diff, Size: 15726 bytes --]

From 708d49b2db88379d5137da3b1c73c1b767923f05 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 11 Jul 2023 22:02:49 -0400
Subject: [PATCH 1/3] polkit: patch to support turnstile

---
 srcpkgs/polkit/patches/turnstile.patch | 57 ++++++++++++++++++++++++++
 srcpkgs/polkit/template                |  2 +-
 2 files changed, 58 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/polkit/patches/turnstile.patch

diff --git a/srcpkgs/polkit/patches/turnstile.patch b/srcpkgs/polkit/patches/turnstile.patch
new file mode 100644
index 0000000000000..4f56ed130eefd
--- /dev/null
+++ b/srcpkgs/polkit/patches/turnstile.patch
@@ -0,0 +1,57 @@
+commit 8d98aa421b92765695af13c033cf7e80375c03fe
+Author: q66 <q66@chimera-linux.org>
+Date:   Sun Jul 2 15:44:51 2023 +0200
+
+    ensure turnstile-session processes fall back to display check
+    
+    As turnstile session is shared between sessions, let us fall back
+    to the check for whether a graphical session is in place. We need
+    this as our dbus session bus is managed through turnstile. In
+    systemd-using systems there is no problem because user units are
+    not a part of any explicit session (we don't get this luxury
+    because using a session is the only way to make sure our pid is
+    tracked in systemd at all; we need that to be able to resolve
+    PID to UID).
+
+diff --git a/src/polkitbackend/polkitbackendsessionmonitor-systemd.c b/src/polkitbackend/polkitbackendsessionmonitor-systemd.c
+index b00cdbd..9a3f3c3 100644
+--- a/src/polkitbackend/polkitbackendsessionmonitor-systemd.c
++++ b/src/polkitbackend/polkitbackendsessionmonitor-systemd.c
+@@ -346,7 +346,7 @@ polkit_backend_session_monitor_get_session_for_subject (PolkitBackendSessionMoni
+   PolkitUnixProcess *tmp_process = NULL;
+   PolkitUnixProcess *process = NULL;
+   PolkitSubject *session = NULL;
+-  char *session_id = NULL;
++  char *session_id = NULL, *service_id = NULL;
+   pid_t pid;
+ #if HAVE_SD_UID_GET_DISPLAY
+   uid_t uid;
+@@ -377,8 +377,26 @@ polkit_backend_session_monitor_get_session_for_subject (PolkitBackendSessionMoni
+ 
+   if (sd_pid_get_session (pid, &session_id) >= 0)
+     {
+-      session = polkit_unix_session_new (session_id);
+-      goto out;
++      /* if belonging to turnstile, ignore */
++      if (sd_session_get_service (session_id, &service_id) >= 0)
++        {
++          if (strcmp (service_id, "turnstiled"))
++            {
++              free (service_id);
++              session = polkit_unix_session_new (session_id);
++              goto out;
++            }
++          else
++            {
++              /* turnstile-managed processes are shared */
++              free(service_id);
++            }
++        }
++      else
++        {
++          session = polkit_unix_session_new (session_id);
++          goto out;
++        }
+     }
+ 
+ #if HAVE_SD_UID_GET_DISPLAY
diff --git a/srcpkgs/polkit/template b/srcpkgs/polkit/template
index 84ab7453bb9b6..0435e1ce5976b 100644
--- a/srcpkgs/polkit/template
+++ b/srcpkgs/polkit/template
@@ -1,7 +1,7 @@
 # Template file for 'polkit'
 pkgname=polkit
 version=121
-revision=1
+revision=2
 build_style=meson
 build_helper=gir
 configure_args="$(vopt_bool gir introspection) -Dman=true

From a12003a66347a36923ae7cd68aba7bc0cd15acf9 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sun, 2 Jul 2023 22:04:40 -0400
Subject: [PATCH 2/3] pam-base: add turnstile pam

---
 srcpkgs/pam-base/files/system-login | 1 +
 srcpkgs/pam-base/template           | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/pam-base/files/system-login b/srcpkgs/pam-base/files/system-login
index 2275deba480d3..72c4638f07d3f 100644
--- a/srcpkgs/pam-base/files/system-login
+++ b/srcpkgs/pam-base/files/system-login
@@ -14,6 +14,7 @@ session    optional   pam_loginuid.so
 session    include    system-auth
 session    optional   pam_motd.so          motd=/etc/motd
 session    optional   pam_mail.so          dir=/var/mail standard quiet
+-session   optional   pam_turnstile.so
 -session   optional   pam_elogind.so
 -session   optional   pam_dumb_runtime_dir.so
 session    required   pam_env.so
diff --git a/srcpkgs/pam-base/template b/srcpkgs/pam-base/template
index 70dfab9fa9965..38bfa74cd8856 100644
--- a/srcpkgs/pam-base/template
+++ b/srcpkgs/pam-base/template
@@ -1,7 +1,7 @@
 # Template file for 'pam-base'
 pkgname=pam-base
 version=0.4
-revision=2
+revision=3
 short_desc="PAM base configuration files"
 maintainer="Érico Nogueira <ericonr@disroot.org>"
 license="Public Domain"

From 34a9c61d805f0d2297193d8b14d96f4925e557c4 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Wed, 28 Jun 2023 05:10:55 -0400
Subject: [PATCH 3/3] New package: turnstile-0.1.8

---
 srcpkgs/turnstile/files/README.voidlinux |  45 +++++
 srcpkgs/turnstile/files/dbus.run         |  11 ++
 srcpkgs/turnstile/files/turnstiled/run   |   4 +
 srcpkgs/turnstile/patches/runit.patch    | 208 +++++++++++++++++++++++
 srcpkgs/turnstile/template               |  24 +++
 5 files changed, 292 insertions(+)
 create mode 100644 srcpkgs/turnstile/files/README.voidlinux
 create mode 100755 srcpkgs/turnstile/files/dbus.run
 create mode 100644 srcpkgs/turnstile/files/turnstiled/run
 create mode 100644 srcpkgs/turnstile/patches/runit.patch
 create mode 100644 srcpkgs/turnstile/template

diff --git a/srcpkgs/turnstile/files/README.voidlinux b/srcpkgs/turnstile/files/README.voidlinux
new file mode 100644
index 0000000000000..22c30e5e5aca6
--- /dev/null
+++ b/srcpkgs/turnstile/files/README.voidlinux
@@ -0,0 +1,45 @@
+# User Services
+
+User services can be placed in ~/.config/service/.
+
+To ensure that a subset of services are started before login can proceed,
+these services can be listed in ~/.config/service/turnstile-ready/conf, for
+example:
+
+	core_services="dbus foo"
+
+The turnstile-ready service is created by turnstile on first login.
+
+## Shared Environment for User Services
+
+To give user services access to important environment variables, chpst's
+envdir functionality can be used. See chpst(8) (-e flag) for more info.
+
+To make a service aware of these variables:
+
+	- exec foo
+	+ exec chpst -e "$TURNSTILE_ENV_DIR" foo
+
+Inside user services, the convenience variable "$TURNSTILE_ENV_DIR" can be used
+to refer to this directory.
+
+# D-Bus Session Bus
+
+If you want to manage dbus using a turnstile-managed runit user service:
+
+	mkdir ~/.config/service/dbus
+	ln -s /usr/share/examples/turnstile/dbus.run ~/.config/service/dbus/run
+
+# Elogind Replacement
+
+Turnstile is not (nor ever will be, according to the developer) a complete
+replacement for elogind, but it can replace several parts, including
+XDG_RUNTIME_DIR management.
+
+If using turnstile with elogind:
+- disable rundir management in /etc/turnstile/turnstiled.conf
+  (manage_rundir = no)
+
+If using turnstile without elogind:
+- install and enable seatd for seat management
+- install and enable acpid for lid switch/button handling
diff --git a/srcpkgs/turnstile/files/dbus.run b/srcpkgs/turnstile/files/dbus.run
new file mode 100755
index 0000000000000..dc7473e45fc52
--- /dev/null
+++ b/srcpkgs/turnstile/files/dbus.run
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+[ -r ./conf ] && . ./conf
+
+: "${DBUS_SESSION_BUS_ADDRESS:=unix:path=/run/user/$(id -u)/bus}"
+
+if [ -d "$TURNSTILE_ENV_DIR" ]; then
+	echo "$DBUS_SESSION_BUS_ADDRESS" > "$TURNSTILE_ENV_DIR"/DBUS_SESSION_BUS_ADDRESS
+fi
+
+exec chpst -e "$TURNSTILE_ENV_DIR" dbus-daemon --session --nofork --nopidfile --address="$DBUS_SESSION_BUS_ADDRESS" $OPTS
diff --git a/srcpkgs/turnstile/files/turnstiled/run b/srcpkgs/turnstile/files/turnstiled/run
new file mode 100644
index 0000000000000..aa5d624fda19a
--- /dev/null
+++ b/srcpkgs/turnstile/files/turnstiled/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+exec 2>&1
+exec turnstiled
diff --git a/srcpkgs/turnstile/patches/runit.patch b/srcpkgs/turnstile/patches/runit.patch
new file mode 100644
index 0000000000000..1114a500bda39
--- /dev/null
+++ b/srcpkgs/turnstile/patches/runit.patch
@@ -0,0 +1,208 @@
+From 4d1b7fbf9cde23c89eb6ce5a08f8afa2edeef0e9 Mon Sep 17 00:00:00 2001
+From: classabbyamp <dev@placeviolette.net>
+Date: Wed, 28 Jun 2023 05:05:25 -0400
+Subject: [PATCH] add runit backend
+
+---
+ backend/meson.build | 16 +++++++++
+ backend/runit       | 88 +++++++++++++++++++++++++++++++++++++++++++++
+ backend/runit.conf  | 16 +++++++++
+ meson.build         | 14 +++++---
+ meson_options.txt   | 10 ++++++
+ 5 files changed, 140 insertions(+), 4 deletions(-)
+ create mode 100644 backend/runit
+ create mode 100644 backend/runit.conf
+
+diff --git a/backend/meson.build b/backend/meson.build
+index 681e6a0..e4c63f1 100644
+--- a/backend/meson.build
++++ b/backend/meson.build
+@@ -13,3 +13,19 @@ if have_dinit
+         install_mode: 'rw-r--r--'
+     )
+ endif
++
++# runit backend
++
++if have_runit
++    install_data(
++        'runit',
++        install_dir: join_paths(get_option('libexecdir'), 'turnstile'),
++        install_mode: 'rwxr-xr-x'
++    )
++
++    install_data(
++        'runit.conf',
++        install_dir: join_paths(get_option('sysconfdir'), 'turnstile/backend'),
++        install_mode: 'rw-r--r--'
++    )
++endif
+diff --git a/backend/runit b/backend/runit
+new file mode 100644
+index 0000000..a9d7454
+--- /dev/null
++++ b/backend/runit
+@@ -0,0 +1,88 @@
++#!/bin/sh
++#
++# This is the turnstile runit backend. It accepts the action as its first
++# argument, which is either "ready", "run", or "stop". In case of "run", it's
++# invoked directly through /bin/sh as if it was a login shell, and therefore
++# it has acccess to shell profile, and the shebang is functionally useless but
++# should be preserved as a convention. For "ready", it's a regular shell.
++#
++# Arguments for "ready":
++#
++# ready_sv: path to the readiness service
++#
++# Arguments for "run":
++#
++# ready_p:  readiness pipe (fifo). has the path to the ready service written to it.
++# srvdir:   unused
++# confdir:  the path where turnstile's configuration data resides, used
++#           to source the configuration file
++#
++# Arguments for "stop":
++#
++# pid:      the PID of the service manager to stop (gracefully); it should
++#           terminate the services it's running and then stop itself
++#
++# Copyright 2023 classabbyamp <dev@placeviolette.net>
++# License: BSD-2-Clause
++
++case "$1" in
++    run) ;;
++    ready)
++        if [ -z "$2" ] || [ ! -d "$2" ]; then
++            echo "runit: invalid readiness service '$2'" >&2
++            exit 69
++        fi
++        exec sv start "$2" >&2
++        ;;
++    stop)
++        # If runsvdir receives a HUP signal, it sends a TERM signal to each
++        # runsv(8) process it is monitoring and then exits with 111.
++        exec kill -s HUP "$2"
++        ;;
++    *)
++        exit 32
++        ;;
++esac
++
++RUNIT_READY_PIPE="$2"
++RUNIT_CONF="$4/runit.conf"
++
++if [ ! -p "$RUNIT_READY_PIPE" ]; then
++    echo "runit: invalid input argument(s)" >&2
++    exit 69
++fi
++
++if [ -z "$HOME" ] || [ ! -d "$HOME" ]; then
++    echo "runit: invalid home directory" >&2
++    exit 70
++fi
++
++shift $#
++
++# be strict
++set -e
++
++# source the conf
++[ -r "$RUNIT_CONF" ] && . "$RUNIT_CONF"
++
++# set some defaults in case the conf cannot be read or is mangled
++: "${ready_sv:="turnstile-ready"}"
++: "${services_dir:="${HOME}/.config/service"}"
++: "${service_env_dir:="${HOME}/.config/service-env"}"
++
++mkdir -p "${services_dir}/${ready_sv}" > /dev/null 2>&1
++mkdir -p "${service_env_dir}" > /dev/null 2>&1
++
++# this must succeed
++cat << EOF > "${services_dir}/${ready_sv}/run"
++#!/bin/sh
++[ -r ./conf ] && . ./conf
++[ -n "\$core_services" ] && SVDIR=".." sv start \$core_services
++[ -p "$RUNIT_READY_PIPE" ] && printf "${services_dir}/${ready_sv}" > "$RUNIT_READY_PIPE"
++exec pause
++EOF
++chmod +x "${services_dir}/${ready_sv}/run"
++
++exec env TURNSTILE_ENV_DIR="$service_env_dir" \
++    runsvdir -P "$services_dir" \
++    'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+diff --git a/backend/runit.conf b/backend/runit.conf
+new file mode 100644
+index 0000000..88a2d04
+--- /dev/null
++++ b/backend/runit.conf
+@@ -0,0 +1,16 @@
++# This is the configuration file for turnstile's runit backend.
++#
++# It follows the POSIX shell syntax (being sourced into a script).
++# The complete launch environment available to dinit can be used.
++#
++# It is a low-level configuration file. In most cases, it should
++# not be modified by the user.
++
++# the name of the service that turnstile will check for login readiness
++ready_sv="turnstile-ready"
++
++# the directory user service files are read from.
++services_dir="${HOME}/.config/service"
++
++# the environment variable directory user service files can read from.
++service_env_dir="${HOME}/.config/service-env"
+diff --git a/meson.build b/meson.build
+index 5f2e6f8..87f9d3b 100644
+--- a/meson.build
++++ b/meson.build
+@@ -22,6 +22,7 @@ scdoc_dep = dependency(
+ )
+ 
+ have_dinit = get_option('dinit').enabled()
++have_runit = get_option('runit').enabled()
+ 
+ conf_data = configuration_data()
+ conf_data.set_quoted('RUN_PATH', get_option('rundir'))
+@@ -101,10 +102,15 @@ install_data(
+ )
+ 
+ # decide the default backend
+-if have_dinit
+-    default_backend = 'dinit'
+-else
+-    default_backend = 'none'
++default_backend = get_option('default_backend')
++if default_backend == ''
++    if have_dinit
++        default_backend = 'dinit'
++    elif have_runit
++        default_backend = 'runit'
++    else
++        default_backend = 'none'
++    endif
+ endif
+ 
+ uconf_data = configuration_data()
+diff --git a/meson_options.txt b/meson_options.txt
+index 9b03995..4325042 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -3,6 +3,16 @@ option('dinit',
+     description: 'Whether to install Dinit-related backend and data'
+ )
+ 
++option('runit',
++    type: 'feature', value: 'disabled',
++    description: 'Whether to install runit-related backend and data'
++)
++
++option('default_backend',
++    type: 'string', value: '',
++    description: 'Override the default backend'
++)
++
+ option('rundir',
+     type: 'string', value: '/run',
+     description: 'Where the base directory will be located'
diff --git a/srcpkgs/turnstile/template b/srcpkgs/turnstile/template
new file mode 100644
index 0000000000000..9916832364699
--- /dev/null
+++ b/srcpkgs/turnstile/template
@@ -0,0 +1,24 @@
+# Template file for 'turnstile'
+pkgname=turnstile
+version=0.1.8
+revision=1
+build_style=meson
+configure_args="-Ddinit=disabled -Drunit=enabled -Ddefault_backend=runit
+ -Dmanage_rundir=true"
+hostmakedepends="pkg-config scdoc"
+makedepends="pam-devel"
+short_desc="Independent session/login tracker and user service manager"
+maintainer="classabbyamp <void@placeviolette.net>"
+license="BSD-2-Clause"
+homepage="https://github.com/chimera-linux/turnstile"
+distfiles="https://github.com/chimera-linux/turnstile/archive/refs/tags/v${version}.tar.gz"
+checksum=7eaab8c80c76ae9a9a711d7dc57ec346b9af09be99b526a5a3129a7fc9bd7a76
+conf_files="/etc/turnstile/turnstiled.conf"
+
+post_install() {
+	vsv turnstiled
+	vsconf "${FILESDIR}/dbus.run"
+	chmod +x "${DESTDIR}/usr/share/examples/turnstile/dbus.run"
+	vdoc "${FILESDIR}/README.voidlinux"
+	vlicense COPYING.md
+}

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PR PATCH] [Closed]: New package: turnstile-0.1.8
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (23 preceding siblings ...)
  2023-09-08 10:56 ` classabbyamp
@ 2023-09-08 11:04 ` classabbyamp
  2023-09-08 11:05 ` classabbyamp
                   ` (28 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: classabbyamp @ 2023-09-08 11:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 569 bytes --]

There's a closed pull request on the void-packages repository

New package: turnstile-0.1.8
https://github.com/void-linux/void-packages/pull/44676

Description:
WIP while i create the runit backend upstream ([mostly done](https://github.com/chimera-linux/turnstile/compare/master...classabbyamp:runit-backend))

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**



^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: New package: turnstile-0.1.8
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (24 preceding siblings ...)
  2023-09-08 11:04 ` [PR PATCH] [Closed]: New package: turnstile-0.1.8 classabbyamp
@ 2023-09-08 11:05 ` classabbyamp
  2023-09-08 12:58 ` dkwo
                   ` (27 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: classabbyamp @ 2023-09-08 11:05 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 219 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/44676#issuecomment-1711490115

Comment:
still todo:

- patch display managers (if necessary)
- upstream merge

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: New package: turnstile-0.1.8
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (25 preceding siblings ...)
  2023-09-08 11:05 ` classabbyamp
@ 2023-09-08 12:58 ` dkwo
  2023-09-08 14:13 ` classabbyamp
                   ` (26 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: dkwo @ 2023-09-08 12:58 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 216 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/44676#issuecomment-1711632584

Comment:
does it mean now we don't need to build off master and user services do exit?

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: New package: turnstile-0.1.8
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (26 preceding siblings ...)
  2023-09-08 12:58 ` dkwo
@ 2023-09-08 14:13 ` classabbyamp
  2023-09-09 22:21 ` [PR PATCH] [Updated] " classabbyamp
                   ` (25 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: classabbyamp @ 2023-09-08 14:13 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 152 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/44676#issuecomment-1711740491

Comment:
maybe

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PR PATCH] [Updated] New package: turnstile-0.1.8
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (27 preceding siblings ...)
  2023-09-08 14:13 ` classabbyamp
@ 2023-09-09 22:21 ` classabbyamp
  2023-09-09 22:23 ` classabbyamp
                   ` (24 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: classabbyamp @ 2023-09-09 22:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 741 bytes --]

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages new/turnstile
https://github.com/void-linux/void-packages/pull/44676

New package: turnstile-0.1.8
WIP while i create the runit backend upstream ([mostly done](https://github.com/chimera-linux/turnstile/compare/master...classabbyamp:runit-backend))

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**



A patch file from https://github.com/void-linux/void-packages/pull/44676.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-new/turnstile-44676.patch --]
[-- Type: text/x-diff, Size: 17021 bytes --]

From 708d49b2db88379d5137da3b1c73c1b767923f05 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 11 Jul 2023 22:02:49 -0400
Subject: [PATCH 1/3] polkit: patch to support turnstile

---
 srcpkgs/polkit/patches/turnstile.patch | 57 ++++++++++++++++++++++++++
 srcpkgs/polkit/template                |  2 +-
 2 files changed, 58 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/polkit/patches/turnstile.patch

diff --git a/srcpkgs/polkit/patches/turnstile.patch b/srcpkgs/polkit/patches/turnstile.patch
new file mode 100644
index 0000000000000..4f56ed130eefd
--- /dev/null
+++ b/srcpkgs/polkit/patches/turnstile.patch
@@ -0,0 +1,57 @@
+commit 8d98aa421b92765695af13c033cf7e80375c03fe
+Author: q66 <q66@chimera-linux.org>
+Date:   Sun Jul 2 15:44:51 2023 +0200
+
+    ensure turnstile-session processes fall back to display check
+    
+    As turnstile session is shared between sessions, let us fall back
+    to the check for whether a graphical session is in place. We need
+    this as our dbus session bus is managed through turnstile. In
+    systemd-using systems there is no problem because user units are
+    not a part of any explicit session (we don't get this luxury
+    because using a session is the only way to make sure our pid is
+    tracked in systemd at all; we need that to be able to resolve
+    PID to UID).
+
+diff --git a/src/polkitbackend/polkitbackendsessionmonitor-systemd.c b/src/polkitbackend/polkitbackendsessionmonitor-systemd.c
+index b00cdbd..9a3f3c3 100644
+--- a/src/polkitbackend/polkitbackendsessionmonitor-systemd.c
++++ b/src/polkitbackend/polkitbackendsessionmonitor-systemd.c
+@@ -346,7 +346,7 @@ polkit_backend_session_monitor_get_session_for_subject (PolkitBackendSessionMoni
+   PolkitUnixProcess *tmp_process = NULL;
+   PolkitUnixProcess *process = NULL;
+   PolkitSubject *session = NULL;
+-  char *session_id = NULL;
++  char *session_id = NULL, *service_id = NULL;
+   pid_t pid;
+ #if HAVE_SD_UID_GET_DISPLAY
+   uid_t uid;
+@@ -377,8 +377,26 @@ polkit_backend_session_monitor_get_session_for_subject (PolkitBackendSessionMoni
+ 
+   if (sd_pid_get_session (pid, &session_id) >= 0)
+     {
+-      session = polkit_unix_session_new (session_id);
+-      goto out;
++      /* if belonging to turnstile, ignore */
++      if (sd_session_get_service (session_id, &service_id) >= 0)
++        {
++          if (strcmp (service_id, "turnstiled"))
++            {
++              free (service_id);
++              session = polkit_unix_session_new (session_id);
++              goto out;
++            }
++          else
++            {
++              /* turnstile-managed processes are shared */
++              free(service_id);
++            }
++        }
++      else
++        {
++          session = polkit_unix_session_new (session_id);
++          goto out;
++        }
+     }
+ 
+ #if HAVE_SD_UID_GET_DISPLAY
diff --git a/srcpkgs/polkit/template b/srcpkgs/polkit/template
index 84ab7453bb9b6..0435e1ce5976b 100644
--- a/srcpkgs/polkit/template
+++ b/srcpkgs/polkit/template
@@ -1,7 +1,7 @@
 # Template file for 'polkit'
 pkgname=polkit
 version=121
-revision=1
+revision=2
 build_style=meson
 build_helper=gir
 configure_args="$(vopt_bool gir introspection) -Dman=true

From a12003a66347a36923ae7cd68aba7bc0cd15acf9 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sun, 2 Jul 2023 22:04:40 -0400
Subject: [PATCH 2/3] pam-base: add turnstile pam

---
 srcpkgs/pam-base/files/system-login | 1 +
 srcpkgs/pam-base/template           | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/pam-base/files/system-login b/srcpkgs/pam-base/files/system-login
index 2275deba480d3..72c4638f07d3f 100644
--- a/srcpkgs/pam-base/files/system-login
+++ b/srcpkgs/pam-base/files/system-login
@@ -14,6 +14,7 @@ session    optional   pam_loginuid.so
 session    include    system-auth
 session    optional   pam_motd.so          motd=/etc/motd
 session    optional   pam_mail.so          dir=/var/mail standard quiet
+-session   optional   pam_turnstile.so
 -session   optional   pam_elogind.so
 -session   optional   pam_dumb_runtime_dir.so
 session    required   pam_env.so
diff --git a/srcpkgs/pam-base/template b/srcpkgs/pam-base/template
index 70dfab9fa9965..38bfa74cd8856 100644
--- a/srcpkgs/pam-base/template
+++ b/srcpkgs/pam-base/template
@@ -1,7 +1,7 @@
 # Template file for 'pam-base'
 pkgname=pam-base
 version=0.4
-revision=2
+revision=3
 short_desc="PAM base configuration files"
 maintainer="Érico Nogueira <ericonr@disroot.org>"
 license="Public Domain"

From 273e0eb1344eb27df0fa9c411a5b944b04354452 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Wed, 28 Jun 2023 05:10:55 -0400
Subject: [PATCH 3/3] New package: turnstile-0.1.8

---
 srcpkgs/turnstile/files/README.voidlinux |  45 ++++
 srcpkgs/turnstile/files/dbus.run         |  11 +
 srcpkgs/turnstile/files/turnstiled/run   |   4 +
 srcpkgs/turnstile/patches/runit.patch    | 256 +++++++++++++++++++++++
 srcpkgs/turnstile/template               |  24 +++
 5 files changed, 340 insertions(+)
 create mode 100644 srcpkgs/turnstile/files/README.voidlinux
 create mode 100755 srcpkgs/turnstile/files/dbus.run
 create mode 100644 srcpkgs/turnstile/files/turnstiled/run
 create mode 100644 srcpkgs/turnstile/patches/runit.patch
 create mode 100644 srcpkgs/turnstile/template

diff --git a/srcpkgs/turnstile/files/README.voidlinux b/srcpkgs/turnstile/files/README.voidlinux
new file mode 100644
index 0000000000000..22c30e5e5aca6
--- /dev/null
+++ b/srcpkgs/turnstile/files/README.voidlinux
@@ -0,0 +1,45 @@
+# User Services
+
+User services can be placed in ~/.config/service/.
+
+To ensure that a subset of services are started before login can proceed,
+these services can be listed in ~/.config/service/turnstile-ready/conf, for
+example:
+
+	core_services="dbus foo"
+
+The turnstile-ready service is created by turnstile on first login.
+
+## Shared Environment for User Services
+
+To give user services access to important environment variables, chpst's
+envdir functionality can be used. See chpst(8) (-e flag) for more info.
+
+To make a service aware of these variables:
+
+	- exec foo
+	+ exec chpst -e "$TURNSTILE_ENV_DIR" foo
+
+Inside user services, the convenience variable "$TURNSTILE_ENV_DIR" can be used
+to refer to this directory.
+
+# D-Bus Session Bus
+
+If you want to manage dbus using a turnstile-managed runit user service:
+
+	mkdir ~/.config/service/dbus
+	ln -s /usr/share/examples/turnstile/dbus.run ~/.config/service/dbus/run
+
+# Elogind Replacement
+
+Turnstile is not (nor ever will be, according to the developer) a complete
+replacement for elogind, but it can replace several parts, including
+XDG_RUNTIME_DIR management.
+
+If using turnstile with elogind:
+- disable rundir management in /etc/turnstile/turnstiled.conf
+  (manage_rundir = no)
+
+If using turnstile without elogind:
+- install and enable seatd for seat management
+- install and enable acpid for lid switch/button handling
diff --git a/srcpkgs/turnstile/files/dbus.run b/srcpkgs/turnstile/files/dbus.run
new file mode 100755
index 0000000000000..dc7473e45fc52
--- /dev/null
+++ b/srcpkgs/turnstile/files/dbus.run
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+[ -r ./conf ] && . ./conf
+
+: "${DBUS_SESSION_BUS_ADDRESS:=unix:path=/run/user/$(id -u)/bus}"
+
+if [ -d "$TURNSTILE_ENV_DIR" ]; then
+	echo "$DBUS_SESSION_BUS_ADDRESS" > "$TURNSTILE_ENV_DIR"/DBUS_SESSION_BUS_ADDRESS
+fi
+
+exec chpst -e "$TURNSTILE_ENV_DIR" dbus-daemon --session --nofork --nopidfile --address="$DBUS_SESSION_BUS_ADDRESS" $OPTS
diff --git a/srcpkgs/turnstile/files/turnstiled/run b/srcpkgs/turnstile/files/turnstiled/run
new file mode 100644
index 0000000000000..aa5d624fda19a
--- /dev/null
+++ b/srcpkgs/turnstile/files/turnstiled/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+exec 2>&1
+exec turnstiled
diff --git a/srcpkgs/turnstile/patches/runit.patch b/srcpkgs/turnstile/patches/runit.patch
new file mode 100644
index 0000000000000..a8b5428c7b162
--- /dev/null
+++ b/srcpkgs/turnstile/patches/runit.patch
@@ -0,0 +1,256 @@
+From 5d13e06c4bcfd3e20ffe2d24b8ae589fa29bfe05 Mon Sep 17 00:00:00 2001
+From: classabbyamp <dev@placeviolette.net>
+Date: Wed, 28 Jun 2023 05:05:25 -0400
+Subject: [PATCH] add runit backend
+
+---
+ backend/meson.build                   | 25 ++++++++
+ backend/runit                         | 88 +++++++++++++++++++++++++++
+ backend/runit.conf                    | 16 +++++
+ backend/turnstile-update-runit-env.in | 31 ++++++++++
+ meson.build                           | 14 +++--
+ meson_options.txt                     | 10 +++
+ 6 files changed, 180 insertions(+), 4 deletions(-)
+ create mode 100644 backend/runit
+ create mode 100644 backend/runit.conf
+ create mode 100644 backend/turnstile-update-runit-env.in
+
+diff --git a/backend/meson.build b/backend/meson.build
+index 681e6a0..5a5b200 100644
+--- a/backend/meson.build
++++ b/backend/meson.build
+@@ -13,3 +13,28 @@ if have_dinit
+         install_mode: 'rw-r--r--'
+     )
+ endif
++
++# runit backend
++
++if have_runit
++    install_data(
++        'runit',
++        install_dir: join_paths(get_option('libexecdir'), 'turnstile'),
++        install_mode: 'rwxr-xr-x'
++    )
++
++    install_data(
++        'runit.conf',
++        install_dir: join_paths(get_option('sysconfdir'), 'turnstile/backend'),
++        install_mode: 'rw-r--r--'
++    )
++
++    configure_file(
++        input: 'turnstile-update-runit-env.in',
++        output: 'turnstile-update-runit-env',
++        configuration: conf_data,
++        install: true,
++        install_dir: get_option('bindir'),
++        install_mode: 'rwxr-xr-x'
++    )
++endif
+diff --git a/backend/runit b/backend/runit
+new file mode 100644
+index 0000000..a9d7454
+--- /dev/null
++++ b/backend/runit
+@@ -0,0 +1,88 @@
++#!/bin/sh
++#
++# This is the turnstile runit backend. It accepts the action as its first
++# argument, which is either "ready", "run", or "stop". In case of "run", it's
++# invoked directly through /bin/sh as if it was a login shell, and therefore
++# it has acccess to shell profile, and the shebang is functionally useless but
++# should be preserved as a convention. For "ready", it's a regular shell.
++#
++# Arguments for "ready":
++#
++# ready_sv: path to the readiness service
++#
++# Arguments for "run":
++#
++# ready_p:  readiness pipe (fifo). has the path to the ready service written to it.
++# srvdir:   unused
++# confdir:  the path where turnstile's configuration data resides, used
++#           to source the configuration file
++#
++# Arguments for "stop":
++#
++# pid:      the PID of the service manager to stop (gracefully); it should
++#           terminate the services it's running and then stop itself
++#
++# Copyright 2023 classabbyamp <dev@placeviolette.net>
++# License: BSD-2-Clause
++
++case "$1" in
++    run) ;;
++    ready)
++        if [ -z "$2" ] || [ ! -d "$2" ]; then
++            echo "runit: invalid readiness service '$2'" >&2
++            exit 69
++        fi
++        exec sv start "$2" >&2
++        ;;
++    stop)
++        # If runsvdir receives a HUP signal, it sends a TERM signal to each
++        # runsv(8) process it is monitoring and then exits with 111.
++        exec kill -s HUP "$2"
++        ;;
++    *)
++        exit 32
++        ;;
++esac
++
++RUNIT_READY_PIPE="$2"
++RUNIT_CONF="$4/runit.conf"
++
++if [ ! -p "$RUNIT_READY_PIPE" ]; then
++    echo "runit: invalid input argument(s)" >&2
++    exit 69
++fi
++
++if [ -z "$HOME" ] || [ ! -d "$HOME" ]; then
++    echo "runit: invalid home directory" >&2
++    exit 70
++fi
++
++shift $#
++
++# be strict
++set -e
++
++# source the conf
++[ -r "$RUNIT_CONF" ] && . "$RUNIT_CONF"
++
++# set some defaults in case the conf cannot be read or is mangled
++: "${ready_sv:="turnstile-ready"}"
++: "${services_dir:="${HOME}/.config/service"}"
++: "${service_env_dir:="${HOME}/.config/service-env"}"
++
++mkdir -p "${services_dir}/${ready_sv}" > /dev/null 2>&1
++mkdir -p "${service_env_dir}" > /dev/null 2>&1
++
++# this must succeed
++cat << EOF > "${services_dir}/${ready_sv}/run"
++#!/bin/sh
++[ -r ./conf ] && . ./conf
++[ -n "\$core_services" ] && SVDIR=".." sv start \$core_services
++[ -p "$RUNIT_READY_PIPE" ] && printf "${services_dir}/${ready_sv}" > "$RUNIT_READY_PIPE"
++exec pause
++EOF
++chmod +x "${services_dir}/${ready_sv}/run"
++
++exec env TURNSTILE_ENV_DIR="$service_env_dir" \
++    runsvdir -P "$services_dir" \
++    'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+diff --git a/backend/runit.conf b/backend/runit.conf
+new file mode 100644
+index 0000000..88a2d04
+--- /dev/null
++++ b/backend/runit.conf
+@@ -0,0 +1,16 @@
++# This is the configuration file for turnstile's runit backend.
++#
++# It follows the POSIX shell syntax (being sourced into a script).
++# The complete launch environment available to dinit can be used.
++#
++# It is a low-level configuration file. In most cases, it should
++# not be modified by the user.
++
++# the name of the service that turnstile will check for login readiness
++ready_sv="turnstile-ready"
++
++# the directory user service files are read from.
++services_dir="${HOME}/.config/service"
++
++# the environment variable directory user service files can read from.
++service_env_dir="${HOME}/.config/service-env"
+diff --git a/backend/turnstile-update-runit-env.in b/backend/turnstile-update-runit-env.in
+new file mode 100644
+index 0000000..9999459
+--- /dev/null
++++ b/backend/turnstile-update-runit-env.in
+@@ -0,0 +1,31 @@
++#!/bin/sh
++# Copyright 2023 classabbyamp <dev@placeviolette.net>
++# License: BSD-2-Clause
++
++usage() {
++	cat <<-EOF
++	turnstile-update-runit-env [VAR] ...
++	Updates values in the shared chpst(8) env dir.
++	
++	If VAR is a variable name, the value is taken from the environment.
++	If VAR is VAR=VAL, sets VAR to VAL.
++	EOF
++}
++
++. @CONF_PATH@/backend/runit.conf
++
++if [ $# -eq 0 ] || [ "$1" = "-h" ]; then
++	usage
++	exit 0
++fi
++
++for var; do
++	case "$var" in
++	*=*)
++		eval echo "${var#*=}" > "$service_env_dir/${var%%=*}"
++		;;
++	*)
++		eval echo '$'"$var" > "$service_env_dir/$var"
++		;;
++	esac
++done
+diff --git a/meson.build b/meson.build
+index 5f2e6f8..87f9d3b 100644
+--- a/meson.build
++++ b/meson.build
+@@ -22,6 +22,7 @@ scdoc_dep = dependency(
+ )
+ 
+ have_dinit = get_option('dinit').enabled()
++have_runit = get_option('runit').enabled()
+ 
+ conf_data = configuration_data()
+ conf_data.set_quoted('RUN_PATH', get_option('rundir'))
+@@ -101,10 +102,15 @@ install_data(
+ )
+ 
+ # decide the default backend
+-if have_dinit
+-    default_backend = 'dinit'
+-else
+-    default_backend = 'none'
++default_backend = get_option('default_backend')
++if default_backend == ''
++    if have_dinit
++        default_backend = 'dinit'
++    elif have_runit
++        default_backend = 'runit'
++    else
++        default_backend = 'none'
++    endif
+ endif
+ 
+ uconf_data = configuration_data()
+diff --git a/meson_options.txt b/meson_options.txt
+index 9b03995..4325042 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -3,6 +3,16 @@ option('dinit',
+     description: 'Whether to install Dinit-related backend and data'
+ )
+ 
++option('runit',
++    type: 'feature', value: 'disabled',
++    description: 'Whether to install runit-related backend and data'
++)
++
++option('default_backend',
++    type: 'string', value: '',
++    description: 'Override the default backend'
++)
++
+ option('rundir',
+     type: 'string', value: '/run',
+     description: 'Where the base directory will be located'
diff --git a/srcpkgs/turnstile/template b/srcpkgs/turnstile/template
new file mode 100644
index 0000000000000..9916832364699
--- /dev/null
+++ b/srcpkgs/turnstile/template
@@ -0,0 +1,24 @@
+# Template file for 'turnstile'
+pkgname=turnstile
+version=0.1.8
+revision=1
+build_style=meson
+configure_args="-Ddinit=disabled -Drunit=enabled -Ddefault_backend=runit
+ -Dmanage_rundir=true"
+hostmakedepends="pkg-config scdoc"
+makedepends="pam-devel"
+short_desc="Independent session/login tracker and user service manager"
+maintainer="classabbyamp <void@placeviolette.net>"
+license="BSD-2-Clause"
+homepage="https://github.com/chimera-linux/turnstile"
+distfiles="https://github.com/chimera-linux/turnstile/archive/refs/tags/v${version}.tar.gz"
+checksum=7eaab8c80c76ae9a9a711d7dc57ec346b9af09be99b526a5a3129a7fc9bd7a76
+conf_files="/etc/turnstile/turnstiled.conf"
+
+post_install() {
+	vsv turnstiled
+	vsconf "${FILESDIR}/dbus.run"
+	chmod +x "${DESTDIR}/usr/share/examples/turnstile/dbus.run"
+	vdoc "${FILESDIR}/README.voidlinux"
+	vlicense COPYING.md
+}

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PR PATCH] [Updated] New package: turnstile-0.1.8
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (28 preceding siblings ...)
  2023-09-09 22:21 ` [PR PATCH] [Updated] " classabbyamp
@ 2023-09-09 22:23 ` classabbyamp
  2023-09-10  0:02 ` classabbyamp
                   ` (23 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: classabbyamp @ 2023-09-09 22:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 741 bytes --]

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages new/turnstile
https://github.com/void-linux/void-packages/pull/44676

New package: turnstile-0.1.8
WIP while i create the runit backend upstream ([mostly done](https://github.com/chimera-linux/turnstile/compare/master...classabbyamp:runit-backend))

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**



A patch file from https://github.com/void-linux/void-packages/pull/44676.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-new/turnstile-44676.patch --]
[-- Type: text/x-diff, Size: 17198 bytes --]

From 708d49b2db88379d5137da3b1c73c1b767923f05 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 11 Jul 2023 22:02:49 -0400
Subject: [PATCH 1/3] polkit: patch to support turnstile

---
 srcpkgs/polkit/patches/turnstile.patch | 57 ++++++++++++++++++++++++++
 srcpkgs/polkit/template                |  2 +-
 2 files changed, 58 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/polkit/patches/turnstile.patch

diff --git a/srcpkgs/polkit/patches/turnstile.patch b/srcpkgs/polkit/patches/turnstile.patch
new file mode 100644
index 0000000000000..4f56ed130eefd
--- /dev/null
+++ b/srcpkgs/polkit/patches/turnstile.patch
@@ -0,0 +1,57 @@
+commit 8d98aa421b92765695af13c033cf7e80375c03fe
+Author: q66 <q66@chimera-linux.org>
+Date:   Sun Jul 2 15:44:51 2023 +0200
+
+    ensure turnstile-session processes fall back to display check
+    
+    As turnstile session is shared between sessions, let us fall back
+    to the check for whether a graphical session is in place. We need
+    this as our dbus session bus is managed through turnstile. In
+    systemd-using systems there is no problem because user units are
+    not a part of any explicit session (we don't get this luxury
+    because using a session is the only way to make sure our pid is
+    tracked in systemd at all; we need that to be able to resolve
+    PID to UID).
+
+diff --git a/src/polkitbackend/polkitbackendsessionmonitor-systemd.c b/src/polkitbackend/polkitbackendsessionmonitor-systemd.c
+index b00cdbd..9a3f3c3 100644
+--- a/src/polkitbackend/polkitbackendsessionmonitor-systemd.c
++++ b/src/polkitbackend/polkitbackendsessionmonitor-systemd.c
+@@ -346,7 +346,7 @@ polkit_backend_session_monitor_get_session_for_subject (PolkitBackendSessionMoni
+   PolkitUnixProcess *tmp_process = NULL;
+   PolkitUnixProcess *process = NULL;
+   PolkitSubject *session = NULL;
+-  char *session_id = NULL;
++  char *session_id = NULL, *service_id = NULL;
+   pid_t pid;
+ #if HAVE_SD_UID_GET_DISPLAY
+   uid_t uid;
+@@ -377,8 +377,26 @@ polkit_backend_session_monitor_get_session_for_subject (PolkitBackendSessionMoni
+ 
+   if (sd_pid_get_session (pid, &session_id) >= 0)
+     {
+-      session = polkit_unix_session_new (session_id);
+-      goto out;
++      /* if belonging to turnstile, ignore */
++      if (sd_session_get_service (session_id, &service_id) >= 0)
++        {
++          if (strcmp (service_id, "turnstiled"))
++            {
++              free (service_id);
++              session = polkit_unix_session_new (session_id);
++              goto out;
++            }
++          else
++            {
++              /* turnstile-managed processes are shared */
++              free(service_id);
++            }
++        }
++      else
++        {
++          session = polkit_unix_session_new (session_id);
++          goto out;
++        }
+     }
+ 
+ #if HAVE_SD_UID_GET_DISPLAY
diff --git a/srcpkgs/polkit/template b/srcpkgs/polkit/template
index 84ab7453bb9b6..0435e1ce5976b 100644
--- a/srcpkgs/polkit/template
+++ b/srcpkgs/polkit/template
@@ -1,7 +1,7 @@
 # Template file for 'polkit'
 pkgname=polkit
 version=121
-revision=1
+revision=2
 build_style=meson
 build_helper=gir
 configure_args="$(vopt_bool gir introspection) -Dman=true

From a12003a66347a36923ae7cd68aba7bc0cd15acf9 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sun, 2 Jul 2023 22:04:40 -0400
Subject: [PATCH 2/3] pam-base: add turnstile pam

---
 srcpkgs/pam-base/files/system-login | 1 +
 srcpkgs/pam-base/template           | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/pam-base/files/system-login b/srcpkgs/pam-base/files/system-login
index 2275deba480d3..72c4638f07d3f 100644
--- a/srcpkgs/pam-base/files/system-login
+++ b/srcpkgs/pam-base/files/system-login
@@ -14,6 +14,7 @@ session    optional   pam_loginuid.so
 session    include    system-auth
 session    optional   pam_motd.so          motd=/etc/motd
 session    optional   pam_mail.so          dir=/var/mail standard quiet
+-session   optional   pam_turnstile.so
 -session   optional   pam_elogind.so
 -session   optional   pam_dumb_runtime_dir.so
 session    required   pam_env.so
diff --git a/srcpkgs/pam-base/template b/srcpkgs/pam-base/template
index 70dfab9fa9965..38bfa74cd8856 100644
--- a/srcpkgs/pam-base/template
+++ b/srcpkgs/pam-base/template
@@ -1,7 +1,7 @@
 # Template file for 'pam-base'
 pkgname=pam-base
 version=0.4
-revision=2
+revision=3
 short_desc="PAM base configuration files"
 maintainer="Érico Nogueira <ericonr@disroot.org>"
 license="Public Domain"

From 76b81503b4dbdcdb09864d029c7bfe6a354f6f84 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Wed, 28 Jun 2023 05:10:55 -0400
Subject: [PATCH 3/3] New package: turnstile-0.1.8

---
 srcpkgs/turnstile/files/README.voidlinux |  50 +++++
 srcpkgs/turnstile/files/dbus.run         |  11 +
 srcpkgs/turnstile/files/turnstiled/run   |   4 +
 srcpkgs/turnstile/patches/runit.patch    | 256 +++++++++++++++++++++++
 srcpkgs/turnstile/template               |  24 +++
 5 files changed, 345 insertions(+)
 create mode 100644 srcpkgs/turnstile/files/README.voidlinux
 create mode 100755 srcpkgs/turnstile/files/dbus.run
 create mode 100644 srcpkgs/turnstile/files/turnstiled/run
 create mode 100644 srcpkgs/turnstile/patches/runit.patch
 create mode 100644 srcpkgs/turnstile/template

diff --git a/srcpkgs/turnstile/files/README.voidlinux b/srcpkgs/turnstile/files/README.voidlinux
new file mode 100644
index 0000000000000..32025131de7d6
--- /dev/null
+++ b/srcpkgs/turnstile/files/README.voidlinux
@@ -0,0 +1,50 @@
+# User Services
+
+User services can be placed in ~/.config/service/.
+
+To ensure that a subset of services are started before login can proceed,
+these services can be listed in ~/.config/service/turnstile-ready/conf, for
+example:
+
+	core_services="dbus foo"
+
+The turnstile-ready service is created by turnstile on first login.
+
+## Shared Environment for User Services
+
+To give user services access to important environment variables, chpst's
+envdir functionality can be used. See chpst(8) (-e flag) for more info.
+
+To make a service aware of these variables:
+
+	- exec foo
+	+ exec chpst -e "$TURNSTILE_ENV_DIR" foo
+
+Inside user services, the convenience variable "$TURNSTILE_ENV_DIR" can be used
+to refer to this directory.
+
+The helper script 'turnstile-update-runit-env' can be used to easily update
+variables in this shared envdir:
+
+	turnstile-update-runit-env DISPLAY XAUTHORITY FOO=bar BAZ=
+
+# D-Bus Session Bus
+
+If you want to manage dbus using a turnstile-managed runit user service:
+
+	mkdir ~/.config/service/dbus
+	ln -s /usr/share/examples/turnstile/dbus.run ~/.config/service/dbus/run
+
+# Elogind Replacement
+
+Turnstile is not (nor ever will be, according to the developer) a complete
+replacement for elogind, but it can replace several parts, including
+XDG_RUNTIME_DIR management.
+
+If using turnstile with elogind:
+- disable rundir management in /etc/turnstile/turnstiled.conf
+  (manage_rundir = no)
+
+If using turnstile without elogind:
+- install and enable seatd for seat management
+- install and enable acpid for lid switch/button handling
diff --git a/srcpkgs/turnstile/files/dbus.run b/srcpkgs/turnstile/files/dbus.run
new file mode 100755
index 0000000000000..dc7473e45fc52
--- /dev/null
+++ b/srcpkgs/turnstile/files/dbus.run
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+[ -r ./conf ] && . ./conf
+
+: "${DBUS_SESSION_BUS_ADDRESS:=unix:path=/run/user/$(id -u)/bus}"
+
+if [ -d "$TURNSTILE_ENV_DIR" ]; then
+	echo "$DBUS_SESSION_BUS_ADDRESS" > "$TURNSTILE_ENV_DIR"/DBUS_SESSION_BUS_ADDRESS
+fi
+
+exec chpst -e "$TURNSTILE_ENV_DIR" dbus-daemon --session --nofork --nopidfile --address="$DBUS_SESSION_BUS_ADDRESS" $OPTS
diff --git a/srcpkgs/turnstile/files/turnstiled/run b/srcpkgs/turnstile/files/turnstiled/run
new file mode 100644
index 0000000000000..aa5d624fda19a
--- /dev/null
+++ b/srcpkgs/turnstile/files/turnstiled/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+exec 2>&1
+exec turnstiled
diff --git a/srcpkgs/turnstile/patches/runit.patch b/srcpkgs/turnstile/patches/runit.patch
new file mode 100644
index 0000000000000..a8b5428c7b162
--- /dev/null
+++ b/srcpkgs/turnstile/patches/runit.patch
@@ -0,0 +1,256 @@
+From 5d13e06c4bcfd3e20ffe2d24b8ae589fa29bfe05 Mon Sep 17 00:00:00 2001
+From: classabbyamp <dev@placeviolette.net>
+Date: Wed, 28 Jun 2023 05:05:25 -0400
+Subject: [PATCH] add runit backend
+
+---
+ backend/meson.build                   | 25 ++++++++
+ backend/runit                         | 88 +++++++++++++++++++++++++++
+ backend/runit.conf                    | 16 +++++
+ backend/turnstile-update-runit-env.in | 31 ++++++++++
+ meson.build                           | 14 +++--
+ meson_options.txt                     | 10 +++
+ 6 files changed, 180 insertions(+), 4 deletions(-)
+ create mode 100644 backend/runit
+ create mode 100644 backend/runit.conf
+ create mode 100644 backend/turnstile-update-runit-env.in
+
+diff --git a/backend/meson.build b/backend/meson.build
+index 681e6a0..5a5b200 100644
+--- a/backend/meson.build
++++ b/backend/meson.build
+@@ -13,3 +13,28 @@ if have_dinit
+         install_mode: 'rw-r--r--'
+     )
+ endif
++
++# runit backend
++
++if have_runit
++    install_data(
++        'runit',
++        install_dir: join_paths(get_option('libexecdir'), 'turnstile'),
++        install_mode: 'rwxr-xr-x'
++    )
++
++    install_data(
++        'runit.conf',
++        install_dir: join_paths(get_option('sysconfdir'), 'turnstile/backend'),
++        install_mode: 'rw-r--r--'
++    )
++
++    configure_file(
++        input: 'turnstile-update-runit-env.in',
++        output: 'turnstile-update-runit-env',
++        configuration: conf_data,
++        install: true,
++        install_dir: get_option('bindir'),
++        install_mode: 'rwxr-xr-x'
++    )
++endif
+diff --git a/backend/runit b/backend/runit
+new file mode 100644
+index 0000000..a9d7454
+--- /dev/null
++++ b/backend/runit
+@@ -0,0 +1,88 @@
++#!/bin/sh
++#
++# This is the turnstile runit backend. It accepts the action as its first
++# argument, which is either "ready", "run", or "stop". In case of "run", it's
++# invoked directly through /bin/sh as if it was a login shell, and therefore
++# it has acccess to shell profile, and the shebang is functionally useless but
++# should be preserved as a convention. For "ready", it's a regular shell.
++#
++# Arguments for "ready":
++#
++# ready_sv: path to the readiness service
++#
++# Arguments for "run":
++#
++# ready_p:  readiness pipe (fifo). has the path to the ready service written to it.
++# srvdir:   unused
++# confdir:  the path where turnstile's configuration data resides, used
++#           to source the configuration file
++#
++# Arguments for "stop":
++#
++# pid:      the PID of the service manager to stop (gracefully); it should
++#           terminate the services it's running and then stop itself
++#
++# Copyright 2023 classabbyamp <dev@placeviolette.net>
++# License: BSD-2-Clause
++
++case "$1" in
++    run) ;;
++    ready)
++        if [ -z "$2" ] || [ ! -d "$2" ]; then
++            echo "runit: invalid readiness service '$2'" >&2
++            exit 69
++        fi
++        exec sv start "$2" >&2
++        ;;
++    stop)
++        # If runsvdir receives a HUP signal, it sends a TERM signal to each
++        # runsv(8) process it is monitoring and then exits with 111.
++        exec kill -s HUP "$2"
++        ;;
++    *)
++        exit 32
++        ;;
++esac
++
++RUNIT_READY_PIPE="$2"
++RUNIT_CONF="$4/runit.conf"
++
++if [ ! -p "$RUNIT_READY_PIPE" ]; then
++    echo "runit: invalid input argument(s)" >&2
++    exit 69
++fi
++
++if [ -z "$HOME" ] || [ ! -d "$HOME" ]; then
++    echo "runit: invalid home directory" >&2
++    exit 70
++fi
++
++shift $#
++
++# be strict
++set -e
++
++# source the conf
++[ -r "$RUNIT_CONF" ] && . "$RUNIT_CONF"
++
++# set some defaults in case the conf cannot be read or is mangled
++: "${ready_sv:="turnstile-ready"}"
++: "${services_dir:="${HOME}/.config/service"}"
++: "${service_env_dir:="${HOME}/.config/service-env"}"
++
++mkdir -p "${services_dir}/${ready_sv}" > /dev/null 2>&1
++mkdir -p "${service_env_dir}" > /dev/null 2>&1
++
++# this must succeed
++cat << EOF > "${services_dir}/${ready_sv}/run"
++#!/bin/sh
++[ -r ./conf ] && . ./conf
++[ -n "\$core_services" ] && SVDIR=".." sv start \$core_services
++[ -p "$RUNIT_READY_PIPE" ] && printf "${services_dir}/${ready_sv}" > "$RUNIT_READY_PIPE"
++exec pause
++EOF
++chmod +x "${services_dir}/${ready_sv}/run"
++
++exec env TURNSTILE_ENV_DIR="$service_env_dir" \
++    runsvdir -P "$services_dir" \
++    'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+diff --git a/backend/runit.conf b/backend/runit.conf
+new file mode 100644
+index 0000000..88a2d04
+--- /dev/null
++++ b/backend/runit.conf
+@@ -0,0 +1,16 @@
++# This is the configuration file for turnstile's runit backend.
++#
++# It follows the POSIX shell syntax (being sourced into a script).
++# The complete launch environment available to dinit can be used.
++#
++# It is a low-level configuration file. In most cases, it should
++# not be modified by the user.
++
++# the name of the service that turnstile will check for login readiness
++ready_sv="turnstile-ready"
++
++# the directory user service files are read from.
++services_dir="${HOME}/.config/service"
++
++# the environment variable directory user service files can read from.
++service_env_dir="${HOME}/.config/service-env"
+diff --git a/backend/turnstile-update-runit-env.in b/backend/turnstile-update-runit-env.in
+new file mode 100644
+index 0000000..9999459
+--- /dev/null
++++ b/backend/turnstile-update-runit-env.in
+@@ -0,0 +1,31 @@
++#!/bin/sh
++# Copyright 2023 classabbyamp <dev@placeviolette.net>
++# License: BSD-2-Clause
++
++usage() {
++	cat <<-EOF
++	turnstile-update-runit-env [VAR] ...
++	Updates values in the shared chpst(8) env dir.
++	
++	If VAR is a variable name, the value is taken from the environment.
++	If VAR is VAR=VAL, sets VAR to VAL.
++	EOF
++}
++
++. @CONF_PATH@/backend/runit.conf
++
++if [ $# -eq 0 ] || [ "$1" = "-h" ]; then
++	usage
++	exit 0
++fi
++
++for var; do
++	case "$var" in
++	*=*)
++		eval echo "${var#*=}" > "$service_env_dir/${var%%=*}"
++		;;
++	*)
++		eval echo '$'"$var" > "$service_env_dir/$var"
++		;;
++	esac
++done
+diff --git a/meson.build b/meson.build
+index 5f2e6f8..87f9d3b 100644
+--- a/meson.build
++++ b/meson.build
+@@ -22,6 +22,7 @@ scdoc_dep = dependency(
+ )
+ 
+ have_dinit = get_option('dinit').enabled()
++have_runit = get_option('runit').enabled()
+ 
+ conf_data = configuration_data()
+ conf_data.set_quoted('RUN_PATH', get_option('rundir'))
+@@ -101,10 +102,15 @@ install_data(
+ )
+ 
+ # decide the default backend
+-if have_dinit
+-    default_backend = 'dinit'
+-else
+-    default_backend = 'none'
++default_backend = get_option('default_backend')
++if default_backend == ''
++    if have_dinit
++        default_backend = 'dinit'
++    elif have_runit
++        default_backend = 'runit'
++    else
++        default_backend = 'none'
++    endif
+ endif
+ 
+ uconf_data = configuration_data()
+diff --git a/meson_options.txt b/meson_options.txt
+index 9b03995..4325042 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -3,6 +3,16 @@ option('dinit',
+     description: 'Whether to install Dinit-related backend and data'
+ )
+ 
++option('runit',
++    type: 'feature', value: 'disabled',
++    description: 'Whether to install runit-related backend and data'
++)
++
++option('default_backend',
++    type: 'string', value: '',
++    description: 'Override the default backend'
++)
++
+ option('rundir',
+     type: 'string', value: '/run',
+     description: 'Where the base directory will be located'
diff --git a/srcpkgs/turnstile/template b/srcpkgs/turnstile/template
new file mode 100644
index 0000000000000..9916832364699
--- /dev/null
+++ b/srcpkgs/turnstile/template
@@ -0,0 +1,24 @@
+# Template file for 'turnstile'
+pkgname=turnstile
+version=0.1.8
+revision=1
+build_style=meson
+configure_args="-Ddinit=disabled -Drunit=enabled -Ddefault_backend=runit
+ -Dmanage_rundir=true"
+hostmakedepends="pkg-config scdoc"
+makedepends="pam-devel"
+short_desc="Independent session/login tracker and user service manager"
+maintainer="classabbyamp <void@placeviolette.net>"
+license="BSD-2-Clause"
+homepage="https://github.com/chimera-linux/turnstile"
+distfiles="https://github.com/chimera-linux/turnstile/archive/refs/tags/v${version}.tar.gz"
+checksum=7eaab8c80c76ae9a9a711d7dc57ec346b9af09be99b526a5a3129a7fc9bd7a76
+conf_files="/etc/turnstile/turnstiled.conf"
+
+post_install() {
+	vsv turnstiled
+	vsconf "${FILESDIR}/dbus.run"
+	chmod +x "${DESTDIR}/usr/share/examples/turnstile/dbus.run"
+	vdoc "${FILESDIR}/README.voidlinux"
+	vlicense COPYING.md
+}

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PR PATCH] [Updated] New package: turnstile-0.1.8
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (29 preceding siblings ...)
  2023-09-09 22:23 ` classabbyamp
@ 2023-09-10  0:02 ` classabbyamp
  2023-09-11  8:19 ` dkwo
                   ` (22 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: classabbyamp @ 2023-09-10  0:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 741 bytes --]

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages new/turnstile
https://github.com/void-linux/void-packages/pull/44676

New package: turnstile-0.1.8
WIP while i create the runit backend upstream ([mostly done](https://github.com/chimera-linux/turnstile/compare/master...classabbyamp:runit-backend))

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**



A patch file from https://github.com/void-linux/void-packages/pull/44676.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-new/turnstile-44676.patch --]
[-- Type: text/x-diff, Size: 17198 bytes --]

From 47d8e852fb238b31b5dd8fa9a5a5d0f0cd40b1f8 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 11 Jul 2023 22:02:49 -0400
Subject: [PATCH 1/3] polkit: patch to support turnstile

---
 srcpkgs/polkit/patches/turnstile.patch | 57 ++++++++++++++++++++++++++
 srcpkgs/polkit/template                |  2 +-
 2 files changed, 58 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/polkit/patches/turnstile.patch

diff --git a/srcpkgs/polkit/patches/turnstile.patch b/srcpkgs/polkit/patches/turnstile.patch
new file mode 100644
index 0000000000000..4f56ed130eefd
--- /dev/null
+++ b/srcpkgs/polkit/patches/turnstile.patch
@@ -0,0 +1,57 @@
+commit 8d98aa421b92765695af13c033cf7e80375c03fe
+Author: q66 <q66@chimera-linux.org>
+Date:   Sun Jul 2 15:44:51 2023 +0200
+
+    ensure turnstile-session processes fall back to display check
+    
+    As turnstile session is shared between sessions, let us fall back
+    to the check for whether a graphical session is in place. We need
+    this as our dbus session bus is managed through turnstile. In
+    systemd-using systems there is no problem because user units are
+    not a part of any explicit session (we don't get this luxury
+    because using a session is the only way to make sure our pid is
+    tracked in systemd at all; we need that to be able to resolve
+    PID to UID).
+
+diff --git a/src/polkitbackend/polkitbackendsessionmonitor-systemd.c b/src/polkitbackend/polkitbackendsessionmonitor-systemd.c
+index b00cdbd..9a3f3c3 100644
+--- a/src/polkitbackend/polkitbackendsessionmonitor-systemd.c
++++ b/src/polkitbackend/polkitbackendsessionmonitor-systemd.c
+@@ -346,7 +346,7 @@ polkit_backend_session_monitor_get_session_for_subject (PolkitBackendSessionMoni
+   PolkitUnixProcess *tmp_process = NULL;
+   PolkitUnixProcess *process = NULL;
+   PolkitSubject *session = NULL;
+-  char *session_id = NULL;
++  char *session_id = NULL, *service_id = NULL;
+   pid_t pid;
+ #if HAVE_SD_UID_GET_DISPLAY
+   uid_t uid;
+@@ -377,8 +377,26 @@ polkit_backend_session_monitor_get_session_for_subject (PolkitBackendSessionMoni
+ 
+   if (sd_pid_get_session (pid, &session_id) >= 0)
+     {
+-      session = polkit_unix_session_new (session_id);
+-      goto out;
++      /* if belonging to turnstile, ignore */
++      if (sd_session_get_service (session_id, &service_id) >= 0)
++        {
++          if (strcmp (service_id, "turnstiled"))
++            {
++              free (service_id);
++              session = polkit_unix_session_new (session_id);
++              goto out;
++            }
++          else
++            {
++              /* turnstile-managed processes are shared */
++              free(service_id);
++            }
++        }
++      else
++        {
++          session = polkit_unix_session_new (session_id);
++          goto out;
++        }
+     }
+ 
+ #if HAVE_SD_UID_GET_DISPLAY
diff --git a/srcpkgs/polkit/template b/srcpkgs/polkit/template
index 84ab7453bb9b6..0435e1ce5976b 100644
--- a/srcpkgs/polkit/template
+++ b/srcpkgs/polkit/template
@@ -1,7 +1,7 @@
 # Template file for 'polkit'
 pkgname=polkit
 version=121
-revision=1
+revision=2
 build_style=meson
 build_helper=gir
 configure_args="$(vopt_bool gir introspection) -Dman=true

From d74cc420f3db2a6df18210fc968653b41ba728be Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sun, 2 Jul 2023 22:04:40 -0400
Subject: [PATCH 2/3] pam-base: add turnstile pam

---
 srcpkgs/pam-base/files/system-login | 1 +
 srcpkgs/pam-base/template           | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/pam-base/files/system-login b/srcpkgs/pam-base/files/system-login
index 2275deba480d3..72c4638f07d3f 100644
--- a/srcpkgs/pam-base/files/system-login
+++ b/srcpkgs/pam-base/files/system-login
@@ -14,6 +14,7 @@ session    optional   pam_loginuid.so
 session    include    system-auth
 session    optional   pam_motd.so          motd=/etc/motd
 session    optional   pam_mail.so          dir=/var/mail standard quiet
+-session   optional   pam_turnstile.so
 -session   optional   pam_elogind.so
 -session   optional   pam_dumb_runtime_dir.so
 session    required   pam_env.so
diff --git a/srcpkgs/pam-base/template b/srcpkgs/pam-base/template
index 70dfab9fa9965..38bfa74cd8856 100644
--- a/srcpkgs/pam-base/template
+++ b/srcpkgs/pam-base/template
@@ -1,7 +1,7 @@
 # Template file for 'pam-base'
 pkgname=pam-base
 version=0.4
-revision=2
+revision=3
 short_desc="PAM base configuration files"
 maintainer="Érico Nogueira <ericonr@disroot.org>"
 license="Public Domain"

From bf6e09f6dc982c4eb1c01917b32447e15b337798 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Wed, 28 Jun 2023 05:10:55 -0400
Subject: [PATCH 3/3] New package: turnstile-0.1.8

---
 srcpkgs/turnstile/files/README.voidlinux |  50 +++++
 srcpkgs/turnstile/files/dbus.run         |  11 +
 srcpkgs/turnstile/files/turnstiled/run   |   4 +
 srcpkgs/turnstile/patches/runit.patch    | 256 +++++++++++++++++++++++
 srcpkgs/turnstile/template               |  24 +++
 5 files changed, 345 insertions(+)
 create mode 100644 srcpkgs/turnstile/files/README.voidlinux
 create mode 100755 srcpkgs/turnstile/files/dbus.run
 create mode 100644 srcpkgs/turnstile/files/turnstiled/run
 create mode 100644 srcpkgs/turnstile/patches/runit.patch
 create mode 100644 srcpkgs/turnstile/template

diff --git a/srcpkgs/turnstile/files/README.voidlinux b/srcpkgs/turnstile/files/README.voidlinux
new file mode 100644
index 0000000000000..32025131de7d6
--- /dev/null
+++ b/srcpkgs/turnstile/files/README.voidlinux
@@ -0,0 +1,50 @@
+# User Services
+
+User services can be placed in ~/.config/service/.
+
+To ensure that a subset of services are started before login can proceed,
+these services can be listed in ~/.config/service/turnstile-ready/conf, for
+example:
+
+	core_services="dbus foo"
+
+The turnstile-ready service is created by turnstile on first login.
+
+## Shared Environment for User Services
+
+To give user services access to important environment variables, chpst's
+envdir functionality can be used. See chpst(8) (-e flag) for more info.
+
+To make a service aware of these variables:
+
+	- exec foo
+	+ exec chpst -e "$TURNSTILE_ENV_DIR" foo
+
+Inside user services, the convenience variable "$TURNSTILE_ENV_DIR" can be used
+to refer to this directory.
+
+The helper script 'turnstile-update-runit-env' can be used to easily update
+variables in this shared envdir:
+
+	turnstile-update-runit-env DISPLAY XAUTHORITY FOO=bar BAZ=
+
+# D-Bus Session Bus
+
+If you want to manage dbus using a turnstile-managed runit user service:
+
+	mkdir ~/.config/service/dbus
+	ln -s /usr/share/examples/turnstile/dbus.run ~/.config/service/dbus/run
+
+# Elogind Replacement
+
+Turnstile is not (nor ever will be, according to the developer) a complete
+replacement for elogind, but it can replace several parts, including
+XDG_RUNTIME_DIR management.
+
+If using turnstile with elogind:
+- disable rundir management in /etc/turnstile/turnstiled.conf
+  (manage_rundir = no)
+
+If using turnstile without elogind:
+- install and enable seatd for seat management
+- install and enable acpid for lid switch/button handling
diff --git a/srcpkgs/turnstile/files/dbus.run b/srcpkgs/turnstile/files/dbus.run
new file mode 100755
index 0000000000000..dc7473e45fc52
--- /dev/null
+++ b/srcpkgs/turnstile/files/dbus.run
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+[ -r ./conf ] && . ./conf
+
+: "${DBUS_SESSION_BUS_ADDRESS:=unix:path=/run/user/$(id -u)/bus}"
+
+if [ -d "$TURNSTILE_ENV_DIR" ]; then
+	echo "$DBUS_SESSION_BUS_ADDRESS" > "$TURNSTILE_ENV_DIR"/DBUS_SESSION_BUS_ADDRESS
+fi
+
+exec chpst -e "$TURNSTILE_ENV_DIR" dbus-daemon --session --nofork --nopidfile --address="$DBUS_SESSION_BUS_ADDRESS" $OPTS
diff --git a/srcpkgs/turnstile/files/turnstiled/run b/srcpkgs/turnstile/files/turnstiled/run
new file mode 100644
index 0000000000000..aa5d624fda19a
--- /dev/null
+++ b/srcpkgs/turnstile/files/turnstiled/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+exec 2>&1
+exec turnstiled
diff --git a/srcpkgs/turnstile/patches/runit.patch b/srcpkgs/turnstile/patches/runit.patch
new file mode 100644
index 0000000000000..a8b5428c7b162
--- /dev/null
+++ b/srcpkgs/turnstile/patches/runit.patch
@@ -0,0 +1,256 @@
+From 5d13e06c4bcfd3e20ffe2d24b8ae589fa29bfe05 Mon Sep 17 00:00:00 2001
+From: classabbyamp <dev@placeviolette.net>
+Date: Wed, 28 Jun 2023 05:05:25 -0400
+Subject: [PATCH] add runit backend
+
+---
+ backend/meson.build                   | 25 ++++++++
+ backend/runit                         | 88 +++++++++++++++++++++++++++
+ backend/runit.conf                    | 16 +++++
+ backend/turnstile-update-runit-env.in | 31 ++++++++++
+ meson.build                           | 14 +++--
+ meson_options.txt                     | 10 +++
+ 6 files changed, 180 insertions(+), 4 deletions(-)
+ create mode 100644 backend/runit
+ create mode 100644 backend/runit.conf
+ create mode 100644 backend/turnstile-update-runit-env.in
+
+diff --git a/backend/meson.build b/backend/meson.build
+index 681e6a0..5a5b200 100644
+--- a/backend/meson.build
++++ b/backend/meson.build
+@@ -13,3 +13,28 @@ if have_dinit
+         install_mode: 'rw-r--r--'
+     )
+ endif
++
++# runit backend
++
++if have_runit
++    install_data(
++        'runit',
++        install_dir: join_paths(get_option('libexecdir'), 'turnstile'),
++        install_mode: 'rwxr-xr-x'
++    )
++
++    install_data(
++        'runit.conf',
++        install_dir: join_paths(get_option('sysconfdir'), 'turnstile/backend'),
++        install_mode: 'rw-r--r--'
++    )
++
++    configure_file(
++        input: 'turnstile-update-runit-env.in',
++        output: 'turnstile-update-runit-env',
++        configuration: conf_data,
++        install: true,
++        install_dir: get_option('bindir'),
++        install_mode: 'rwxr-xr-x'
++    )
++endif
+diff --git a/backend/runit b/backend/runit
+new file mode 100644
+index 0000000..a9d7454
+--- /dev/null
++++ b/backend/runit
+@@ -0,0 +1,88 @@
++#!/bin/sh
++#
++# This is the turnstile runit backend. It accepts the action as its first
++# argument, which is either "ready", "run", or "stop". In case of "run", it's
++# invoked directly through /bin/sh as if it was a login shell, and therefore
++# it has acccess to shell profile, and the shebang is functionally useless but
++# should be preserved as a convention. For "ready", it's a regular shell.
++#
++# Arguments for "ready":
++#
++# ready_sv: path to the readiness service
++#
++# Arguments for "run":
++#
++# ready_p:  readiness pipe (fifo). has the path to the ready service written to it.
++# srvdir:   unused
++# confdir:  the path where turnstile's configuration data resides, used
++#           to source the configuration file
++#
++# Arguments for "stop":
++#
++# pid:      the PID of the service manager to stop (gracefully); it should
++#           terminate the services it's running and then stop itself
++#
++# Copyright 2023 classabbyamp <dev@placeviolette.net>
++# License: BSD-2-Clause
++
++case "$1" in
++    run) ;;
++    ready)
++        if [ -z "$2" ] || [ ! -d "$2" ]; then
++            echo "runit: invalid readiness service '$2'" >&2
++            exit 69
++        fi
++        exec sv start "$2" >&2
++        ;;
++    stop)
++        # If runsvdir receives a HUP signal, it sends a TERM signal to each
++        # runsv(8) process it is monitoring and then exits with 111.
++        exec kill -s HUP "$2"
++        ;;
++    *)
++        exit 32
++        ;;
++esac
++
++RUNIT_READY_PIPE="$2"
++RUNIT_CONF="$4/runit.conf"
++
++if [ ! -p "$RUNIT_READY_PIPE" ]; then
++    echo "runit: invalid input argument(s)" >&2
++    exit 69
++fi
++
++if [ -z "$HOME" ] || [ ! -d "$HOME" ]; then
++    echo "runit: invalid home directory" >&2
++    exit 70
++fi
++
++shift $#
++
++# be strict
++set -e
++
++# source the conf
++[ -r "$RUNIT_CONF" ] && . "$RUNIT_CONF"
++
++# set some defaults in case the conf cannot be read or is mangled
++: "${ready_sv:="turnstile-ready"}"
++: "${services_dir:="${HOME}/.config/service"}"
++: "${service_env_dir:="${HOME}/.config/service-env"}"
++
++mkdir -p "${services_dir}/${ready_sv}" > /dev/null 2>&1
++mkdir -p "${service_env_dir}" > /dev/null 2>&1
++
++# this must succeed
++cat << EOF > "${services_dir}/${ready_sv}/run"
++#!/bin/sh
++[ -r ./conf ] && . ./conf
++[ -n "\$core_services" ] && SVDIR=".." sv start \$core_services
++[ -p "$RUNIT_READY_PIPE" ] && printf "${services_dir}/${ready_sv}" > "$RUNIT_READY_PIPE"
++exec pause
++EOF
++chmod +x "${services_dir}/${ready_sv}/run"
++
++exec env TURNSTILE_ENV_DIR="$service_env_dir" \
++    runsvdir -P "$services_dir" \
++    'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+diff --git a/backend/runit.conf b/backend/runit.conf
+new file mode 100644
+index 0000000..88a2d04
+--- /dev/null
++++ b/backend/runit.conf
+@@ -0,0 +1,16 @@
++# This is the configuration file for turnstile's runit backend.
++#
++# It follows the POSIX shell syntax (being sourced into a script).
++# The complete launch environment available to dinit can be used.
++#
++# It is a low-level configuration file. In most cases, it should
++# not be modified by the user.
++
++# the name of the service that turnstile will check for login readiness
++ready_sv="turnstile-ready"
++
++# the directory user service files are read from.
++services_dir="${HOME}/.config/service"
++
++# the environment variable directory user service files can read from.
++service_env_dir="${HOME}/.config/service-env"
+diff --git a/backend/turnstile-update-runit-env.in b/backend/turnstile-update-runit-env.in
+new file mode 100644
+index 0000000..9999459
+--- /dev/null
++++ b/backend/turnstile-update-runit-env.in
+@@ -0,0 +1,31 @@
++#!/bin/sh
++# Copyright 2023 classabbyamp <dev@placeviolette.net>
++# License: BSD-2-Clause
++
++usage() {
++	cat <<-EOF
++	turnstile-update-runit-env [VAR] ...
++	Updates values in the shared chpst(8) env dir.
++	
++	If VAR is a variable name, the value is taken from the environment.
++	If VAR is VAR=VAL, sets VAR to VAL.
++	EOF
++}
++
++. @CONF_PATH@/backend/runit.conf
++
++if [ $# -eq 0 ] || [ "$1" = "-h" ]; then
++	usage
++	exit 0
++fi
++
++for var; do
++	case "$var" in
++	*=*)
++		eval echo "${var#*=}" > "$service_env_dir/${var%%=*}"
++		;;
++	*)
++		eval echo '$'"$var" > "$service_env_dir/$var"
++		;;
++	esac
++done
+diff --git a/meson.build b/meson.build
+index 5f2e6f8..87f9d3b 100644
+--- a/meson.build
++++ b/meson.build
+@@ -22,6 +22,7 @@ scdoc_dep = dependency(
+ )
+ 
+ have_dinit = get_option('dinit').enabled()
++have_runit = get_option('runit').enabled()
+ 
+ conf_data = configuration_data()
+ conf_data.set_quoted('RUN_PATH', get_option('rundir'))
+@@ -101,10 +102,15 @@ install_data(
+ )
+ 
+ # decide the default backend
+-if have_dinit
+-    default_backend = 'dinit'
+-else
+-    default_backend = 'none'
++default_backend = get_option('default_backend')
++if default_backend == ''
++    if have_dinit
++        default_backend = 'dinit'
++    elif have_runit
++        default_backend = 'runit'
++    else
++        default_backend = 'none'
++    endif
+ endif
+ 
+ uconf_data = configuration_data()
+diff --git a/meson_options.txt b/meson_options.txt
+index 9b03995..4325042 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -3,6 +3,16 @@ option('dinit',
+     description: 'Whether to install Dinit-related backend and data'
+ )
+ 
++option('runit',
++    type: 'feature', value: 'disabled',
++    description: 'Whether to install runit-related backend and data'
++)
++
++option('default_backend',
++    type: 'string', value: '',
++    description: 'Override the default backend'
++)
++
+ option('rundir',
+     type: 'string', value: '/run',
+     description: 'Where the base directory will be located'
diff --git a/srcpkgs/turnstile/template b/srcpkgs/turnstile/template
new file mode 100644
index 0000000000000..9916832364699
--- /dev/null
+++ b/srcpkgs/turnstile/template
@@ -0,0 +1,24 @@
+# Template file for 'turnstile'
+pkgname=turnstile
+version=0.1.8
+revision=1
+build_style=meson
+configure_args="-Ddinit=disabled -Drunit=enabled -Ddefault_backend=runit
+ -Dmanage_rundir=true"
+hostmakedepends="pkg-config scdoc"
+makedepends="pam-devel"
+short_desc="Independent session/login tracker and user service manager"
+maintainer="classabbyamp <void@placeviolette.net>"
+license="BSD-2-Clause"
+homepage="https://github.com/chimera-linux/turnstile"
+distfiles="https://github.com/chimera-linux/turnstile/archive/refs/tags/v${version}.tar.gz"
+checksum=7eaab8c80c76ae9a9a711d7dc57ec346b9af09be99b526a5a3129a7fc9bd7a76
+conf_files="/etc/turnstile/turnstiled.conf"
+
+post_install() {
+	vsv turnstiled
+	vsconf "${FILESDIR}/dbus.run"
+	chmod +x "${DESTDIR}/usr/share/examples/turnstile/dbus.run"
+	vdoc "${FILESDIR}/README.voidlinux"
+	vlicense COPYING.md
+}

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: New package: turnstile-0.1.8
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (30 preceding siblings ...)
  2023-09-10  0:02 ` classabbyamp
@ 2023-09-11  8:19 ` dkwo
  2023-09-12 22:55 ` [PR PATCH] [Updated] " classabbyamp
                   ` (21 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: dkwo @ 2023-09-11  8:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 160 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/44676#issuecomment-1713397171

Comment:
works for me, thanks.

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PR PATCH] [Updated] New package: turnstile-0.1.8
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (31 preceding siblings ...)
  2023-09-11  8:19 ` dkwo
@ 2023-09-12 22:55 ` classabbyamp
  2023-09-12 23:09 ` classabbyamp
                   ` (20 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: classabbyamp @ 2023-09-12 22:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 741 bytes --]

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages new/turnstile
https://github.com/void-linux/void-packages/pull/44676

New package: turnstile-0.1.8
WIP while i create the runit backend upstream ([mostly done](https://github.com/chimera-linux/turnstile/compare/master...classabbyamp:runit-backend))

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**



A patch file from https://github.com/void-linux/void-packages/pull/44676.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-new/turnstile-44676.patch --]
[-- Type: text/x-diff, Size: 21200 bytes --]

From 4de5e26065636d8c314951bb400e7903f4dca756 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 11 Jul 2023 22:02:49 -0400
Subject: [PATCH 1/5] polkit: patch to support turnstile

---
 srcpkgs/polkit/patches/turnstile.patch | 57 ++++++++++++++++++++++++++
 srcpkgs/polkit/template                |  2 +-
 2 files changed, 58 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/polkit/patches/turnstile.patch

diff --git a/srcpkgs/polkit/patches/turnstile.patch b/srcpkgs/polkit/patches/turnstile.patch
new file mode 100644
index 0000000000000..4f56ed130eefd
--- /dev/null
+++ b/srcpkgs/polkit/patches/turnstile.patch
@@ -0,0 +1,57 @@
+commit 8d98aa421b92765695af13c033cf7e80375c03fe
+Author: q66 <q66@chimera-linux.org>
+Date:   Sun Jul 2 15:44:51 2023 +0200
+
+    ensure turnstile-session processes fall back to display check
+    
+    As turnstile session is shared between sessions, let us fall back
+    to the check for whether a graphical session is in place. We need
+    this as our dbus session bus is managed through turnstile. In
+    systemd-using systems there is no problem because user units are
+    not a part of any explicit session (we don't get this luxury
+    because using a session is the only way to make sure our pid is
+    tracked in systemd at all; we need that to be able to resolve
+    PID to UID).
+
+diff --git a/src/polkitbackend/polkitbackendsessionmonitor-systemd.c b/src/polkitbackend/polkitbackendsessionmonitor-systemd.c
+index b00cdbd..9a3f3c3 100644
+--- a/src/polkitbackend/polkitbackendsessionmonitor-systemd.c
++++ b/src/polkitbackend/polkitbackendsessionmonitor-systemd.c
+@@ -346,7 +346,7 @@ polkit_backend_session_monitor_get_session_for_subject (PolkitBackendSessionMoni
+   PolkitUnixProcess *tmp_process = NULL;
+   PolkitUnixProcess *process = NULL;
+   PolkitSubject *session = NULL;
+-  char *session_id = NULL;
++  char *session_id = NULL, *service_id = NULL;
+   pid_t pid;
+ #if HAVE_SD_UID_GET_DISPLAY
+   uid_t uid;
+@@ -377,8 +377,26 @@ polkit_backend_session_monitor_get_session_for_subject (PolkitBackendSessionMoni
+ 
+   if (sd_pid_get_session (pid, &session_id) >= 0)
+     {
+-      session = polkit_unix_session_new (session_id);
+-      goto out;
++      /* if belonging to turnstile, ignore */
++      if (sd_session_get_service (session_id, &service_id) >= 0)
++        {
++          if (strcmp (service_id, "turnstiled"))
++            {
++              free (service_id);
++              session = polkit_unix_session_new (session_id);
++              goto out;
++            }
++          else
++            {
++              /* turnstile-managed processes are shared */
++              free(service_id);
++            }
++        }
++      else
++        {
++          session = polkit_unix_session_new (session_id);
++          goto out;
++        }
+     }
+ 
+ #if HAVE_SD_UID_GET_DISPLAY
diff --git a/srcpkgs/polkit/template b/srcpkgs/polkit/template
index 84ab7453bb9b6..0435e1ce5976b 100644
--- a/srcpkgs/polkit/template
+++ b/srcpkgs/polkit/template
@@ -1,7 +1,7 @@
 # Template file for 'polkit'
 pkgname=polkit
 version=121
-revision=1
+revision=2
 build_style=meson
 build_helper=gir
 configure_args="$(vopt_bool gir introspection) -Dman=true

From f7adb6d232648b4502271e12acebba66c65599c7 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sun, 2 Jul 2023 22:04:40 -0400
Subject: [PATCH 2/5] pam-base: add turnstile pam

---
 srcpkgs/pam-base/files/system-login | 1 +
 srcpkgs/pam-base/template           | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/pam-base/files/system-login b/srcpkgs/pam-base/files/system-login
index 2275deba480d3..72c4638f07d3f 100644
--- a/srcpkgs/pam-base/files/system-login
+++ b/srcpkgs/pam-base/files/system-login
@@ -14,6 +14,7 @@ session    optional   pam_loginuid.so
 session    include    system-auth
 session    optional   pam_motd.so          motd=/etc/motd
 session    optional   pam_mail.so          dir=/var/mail standard quiet
+-session   optional   pam_turnstile.so
 -session   optional   pam_elogind.so
 -session   optional   pam_dumb_runtime_dir.so
 session    required   pam_env.so
diff --git a/srcpkgs/pam-base/template b/srcpkgs/pam-base/template
index 70dfab9fa9965..38bfa74cd8856 100644
--- a/srcpkgs/pam-base/template
+++ b/srcpkgs/pam-base/template
@@ -1,7 +1,7 @@
 # Template file for 'pam-base'
 pkgname=pam-base
 version=0.4
-revision=2
+revision=3
 short_desc="PAM base configuration files"
 maintainer="Érico Nogueira <ericonr@disroot.org>"
 license="Public Domain"

From 442c1c54b2ede246e55950b3abdb4d2d675d32ff Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 12 Sep 2023 18:54:27 -0400
Subject: [PATCH 3/5] gdm: patch pam files for turnstile

---
 srcpkgs/gdm/patches/pam-turnstile-elogind.patch | 17 +++++++++++++++++
 srcpkgs/gdm/template                            |  2 +-
 2 files changed, 18 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/gdm/patches/pam-turnstile-elogind.patch

diff --git a/srcpkgs/gdm/patches/pam-turnstile-elogind.patch b/srcpkgs/gdm/patches/pam-turnstile-elogind.patch
new file mode 100644
index 0000000000000..21df9c826eacb
--- /dev/null
+++ b/srcpkgs/gdm/patches/pam-turnstile-elogind.patch
@@ -0,0 +1,17 @@
+1. pam_systemd doesn't exist on void, use pam_elogind instead
+   (this may have been the cause of some issues with elogind
+   not starting for GNOME users?)
+2. pam_turnstile allows turnstile to integrate with gdm
+
+See also: https://github.com/chimera-linux/cports/blob/master/main/gdm/patches/pam.patch
+
+--- a/data/pam-arch/gdm-launch-environment.pam
++++ b/data/pam-arch/gdm-launch-environment.pam
+@@ -13,5 +13,6 @@
+ session    optional                    pam_keyinit.so       force revoke
+ session    required                    pam_succeed_if.so    audit quiet_success user in gdm:gnome-initial-setup
+ session    optional                    pam_permit.so
+--session   optional                    pam_systemd.so
++-session   optional                    pam_turnstile.so
++-session   optional                    pam_elogind.so
+ session    required                    pam_env.so
diff --git a/srcpkgs/gdm/template b/srcpkgs/gdm/template
index f8990839198a2..8de7e48792c11 100644
--- a/srcpkgs/gdm/template
+++ b/srcpkgs/gdm/template
@@ -1,7 +1,7 @@
 # Template file for 'gdm'
 pkgname=gdm
 version=44.1
-revision=2
+revision=3
 build_helper="gir"
 build_style=meson
 configure_args="

From 6de3bca5bc82827088e2e6d7a5fb6c68c2ec12e5 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 12 Sep 2023 18:54:33 -0400
Subject: [PATCH 4/5] lightdm: patch pam files for turnstile

---
 .../patches/pam-turnstile-elogind.patch       | 32 +++++++++++++++++++
 srcpkgs/lightdm/template                      |  2 +-
 2 files changed, 33 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/lightdm/patches/pam-turnstile-elogind.patch

diff --git a/srcpkgs/lightdm/patches/pam-turnstile-elogind.patch b/srcpkgs/lightdm/patches/pam-turnstile-elogind.patch
new file mode 100644
index 0000000000000..529531e294f94
--- /dev/null
+++ b/srcpkgs/lightdm/patches/pam-turnstile-elogind.patch
@@ -0,0 +1,32 @@
+1. pam_systemd doesn't exist on void, use pam_elogind instead
+2. pam_turnstile allows turnstile to integrate with lightdm
+
+See also: https://github.com/chimera-linux/cports/blob/master/main/gdm/patches/pam.patch
+
+--- a/data/pam/lightdm
++++ b/data/pam/lightdm
+@@ -17,4 +17,5 @@
+ 
+ # Setup session
+ session   required pam_unix.so
+-session   optional pam_systemd.so
++- session   optional pam_turnstile.so
++- session   optional pam_elogind.so
+--- a/data/pam/lightdm-autologin
++++ b/data/pam/lightdm-autologin
+@@ -19,4 +19,5 @@
+ 
+ # Setup session
+ session   required pam_unix.so
+-session   optional pam_systemd.so
++- session   optional pam_turnstile.so
++- session   optional pam_elogind.so
+--- a/data/pam/lightdm-greeter
++++ b/data/pam/lightdm-greeter
+@@ -14,4 +14,5 @@
+ 
+ # Setup session
+ session   required pam_unix.so
+-session   optional pam_systemd.so
++- session   optional pam_turnstile.so
++- session   optional pam_elogind.so
diff --git a/srcpkgs/lightdm/template b/srcpkgs/lightdm/template
index c1b6414ef63d9..9494fa4774407 100644
--- a/srcpkgs/lightdm/template
+++ b/srcpkgs/lightdm/template
@@ -1,7 +1,7 @@
 # Template file for 'lightdm'
 pkgname=lightdm
 version=1.32.0
-revision=4
+revision=5
 build_style=gnu-configure
 build_helper="gir"
 configure_args="--sbindir=/usr/bin --with-greeter-session=lightdm-gtk-greeter

From 40820c30f0d8a24235e6e9e9f6e5d05d94322f57 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Wed, 28 Jun 2023 05:10:55 -0400
Subject: [PATCH 5/5] New package: turnstile-0.1.8

---
 srcpkgs/turnstile/files/README.voidlinux |  50 +++++
 srcpkgs/turnstile/files/dbus.run         |  11 +
 srcpkgs/turnstile/files/turnstiled/run   |   4 +
 srcpkgs/turnstile/patches/runit.patch    | 256 +++++++++++++++++++++++
 srcpkgs/turnstile/template               |  24 +++
 5 files changed, 345 insertions(+)
 create mode 100644 srcpkgs/turnstile/files/README.voidlinux
 create mode 100755 srcpkgs/turnstile/files/dbus.run
 create mode 100644 srcpkgs/turnstile/files/turnstiled/run
 create mode 100644 srcpkgs/turnstile/patches/runit.patch
 create mode 100644 srcpkgs/turnstile/template

diff --git a/srcpkgs/turnstile/files/README.voidlinux b/srcpkgs/turnstile/files/README.voidlinux
new file mode 100644
index 0000000000000..32025131de7d6
--- /dev/null
+++ b/srcpkgs/turnstile/files/README.voidlinux
@@ -0,0 +1,50 @@
+# User Services
+
+User services can be placed in ~/.config/service/.
+
+To ensure that a subset of services are started before login can proceed,
+these services can be listed in ~/.config/service/turnstile-ready/conf, for
+example:
+
+	core_services="dbus foo"
+
+The turnstile-ready service is created by turnstile on first login.
+
+## Shared Environment for User Services
+
+To give user services access to important environment variables, chpst's
+envdir functionality can be used. See chpst(8) (-e flag) for more info.
+
+To make a service aware of these variables:
+
+	- exec foo
+	+ exec chpst -e "$TURNSTILE_ENV_DIR" foo
+
+Inside user services, the convenience variable "$TURNSTILE_ENV_DIR" can be used
+to refer to this directory.
+
+The helper script 'turnstile-update-runit-env' can be used to easily update
+variables in this shared envdir:
+
+	turnstile-update-runit-env DISPLAY XAUTHORITY FOO=bar BAZ=
+
+# D-Bus Session Bus
+
+If you want to manage dbus using a turnstile-managed runit user service:
+
+	mkdir ~/.config/service/dbus
+	ln -s /usr/share/examples/turnstile/dbus.run ~/.config/service/dbus/run
+
+# Elogind Replacement
+
+Turnstile is not (nor ever will be, according to the developer) a complete
+replacement for elogind, but it can replace several parts, including
+XDG_RUNTIME_DIR management.
+
+If using turnstile with elogind:
+- disable rundir management in /etc/turnstile/turnstiled.conf
+  (manage_rundir = no)
+
+If using turnstile without elogind:
+- install and enable seatd for seat management
+- install and enable acpid for lid switch/button handling
diff --git a/srcpkgs/turnstile/files/dbus.run b/srcpkgs/turnstile/files/dbus.run
new file mode 100755
index 0000000000000..dc7473e45fc52
--- /dev/null
+++ b/srcpkgs/turnstile/files/dbus.run
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+[ -r ./conf ] && . ./conf
+
+: "${DBUS_SESSION_BUS_ADDRESS:=unix:path=/run/user/$(id -u)/bus}"
+
+if [ -d "$TURNSTILE_ENV_DIR" ]; then
+	echo "$DBUS_SESSION_BUS_ADDRESS" > "$TURNSTILE_ENV_DIR"/DBUS_SESSION_BUS_ADDRESS
+fi
+
+exec chpst -e "$TURNSTILE_ENV_DIR" dbus-daemon --session --nofork --nopidfile --address="$DBUS_SESSION_BUS_ADDRESS" $OPTS
diff --git a/srcpkgs/turnstile/files/turnstiled/run b/srcpkgs/turnstile/files/turnstiled/run
new file mode 100644
index 0000000000000..aa5d624fda19a
--- /dev/null
+++ b/srcpkgs/turnstile/files/turnstiled/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+exec 2>&1
+exec turnstiled
diff --git a/srcpkgs/turnstile/patches/runit.patch b/srcpkgs/turnstile/patches/runit.patch
new file mode 100644
index 0000000000000..a8b5428c7b162
--- /dev/null
+++ b/srcpkgs/turnstile/patches/runit.patch
@@ -0,0 +1,256 @@
+From 5d13e06c4bcfd3e20ffe2d24b8ae589fa29bfe05 Mon Sep 17 00:00:00 2001
+From: classabbyamp <dev@placeviolette.net>
+Date: Wed, 28 Jun 2023 05:05:25 -0400
+Subject: [PATCH] add runit backend
+
+---
+ backend/meson.build                   | 25 ++++++++
+ backend/runit                         | 88 +++++++++++++++++++++++++++
+ backend/runit.conf                    | 16 +++++
+ backend/turnstile-update-runit-env.in | 31 ++++++++++
+ meson.build                           | 14 +++--
+ meson_options.txt                     | 10 +++
+ 6 files changed, 180 insertions(+), 4 deletions(-)
+ create mode 100644 backend/runit
+ create mode 100644 backend/runit.conf
+ create mode 100644 backend/turnstile-update-runit-env.in
+
+diff --git a/backend/meson.build b/backend/meson.build
+index 681e6a0..5a5b200 100644
+--- a/backend/meson.build
++++ b/backend/meson.build
+@@ -13,3 +13,28 @@ if have_dinit
+         install_mode: 'rw-r--r--'
+     )
+ endif
++
++# runit backend
++
++if have_runit
++    install_data(
++        'runit',
++        install_dir: join_paths(get_option('libexecdir'), 'turnstile'),
++        install_mode: 'rwxr-xr-x'
++    )
++
++    install_data(
++        'runit.conf',
++        install_dir: join_paths(get_option('sysconfdir'), 'turnstile/backend'),
++        install_mode: 'rw-r--r--'
++    )
++
++    configure_file(
++        input: 'turnstile-update-runit-env.in',
++        output: 'turnstile-update-runit-env',
++        configuration: conf_data,
++        install: true,
++        install_dir: get_option('bindir'),
++        install_mode: 'rwxr-xr-x'
++    )
++endif
+diff --git a/backend/runit b/backend/runit
+new file mode 100644
+index 0000000..a9d7454
+--- /dev/null
++++ b/backend/runit
+@@ -0,0 +1,88 @@
++#!/bin/sh
++#
++# This is the turnstile runit backend. It accepts the action as its first
++# argument, which is either "ready", "run", or "stop". In case of "run", it's
++# invoked directly through /bin/sh as if it was a login shell, and therefore
++# it has acccess to shell profile, and the shebang is functionally useless but
++# should be preserved as a convention. For "ready", it's a regular shell.
++#
++# Arguments for "ready":
++#
++# ready_sv: path to the readiness service
++#
++# Arguments for "run":
++#
++# ready_p:  readiness pipe (fifo). has the path to the ready service written to it.
++# srvdir:   unused
++# confdir:  the path where turnstile's configuration data resides, used
++#           to source the configuration file
++#
++# Arguments for "stop":
++#
++# pid:      the PID of the service manager to stop (gracefully); it should
++#           terminate the services it's running and then stop itself
++#
++# Copyright 2023 classabbyamp <dev@placeviolette.net>
++# License: BSD-2-Clause
++
++case "$1" in
++    run) ;;
++    ready)
++        if [ -z "$2" ] || [ ! -d "$2" ]; then
++            echo "runit: invalid readiness service '$2'" >&2
++            exit 69
++        fi
++        exec sv start "$2" >&2
++        ;;
++    stop)
++        # If runsvdir receives a HUP signal, it sends a TERM signal to each
++        # runsv(8) process it is monitoring and then exits with 111.
++        exec kill -s HUP "$2"
++        ;;
++    *)
++        exit 32
++        ;;
++esac
++
++RUNIT_READY_PIPE="$2"
++RUNIT_CONF="$4/runit.conf"
++
++if [ ! -p "$RUNIT_READY_PIPE" ]; then
++    echo "runit: invalid input argument(s)" >&2
++    exit 69
++fi
++
++if [ -z "$HOME" ] || [ ! -d "$HOME" ]; then
++    echo "runit: invalid home directory" >&2
++    exit 70
++fi
++
++shift $#
++
++# be strict
++set -e
++
++# source the conf
++[ -r "$RUNIT_CONF" ] && . "$RUNIT_CONF"
++
++# set some defaults in case the conf cannot be read or is mangled
++: "${ready_sv:="turnstile-ready"}"
++: "${services_dir:="${HOME}/.config/service"}"
++: "${service_env_dir:="${HOME}/.config/service-env"}"
++
++mkdir -p "${services_dir}/${ready_sv}" > /dev/null 2>&1
++mkdir -p "${service_env_dir}" > /dev/null 2>&1
++
++# this must succeed
++cat << EOF > "${services_dir}/${ready_sv}/run"
++#!/bin/sh
++[ -r ./conf ] && . ./conf
++[ -n "\$core_services" ] && SVDIR=".." sv start \$core_services
++[ -p "$RUNIT_READY_PIPE" ] && printf "${services_dir}/${ready_sv}" > "$RUNIT_READY_PIPE"
++exec pause
++EOF
++chmod +x "${services_dir}/${ready_sv}/run"
++
++exec env TURNSTILE_ENV_DIR="$service_env_dir" \
++    runsvdir -P "$services_dir" \
++    'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+diff --git a/backend/runit.conf b/backend/runit.conf
+new file mode 100644
+index 0000000..88a2d04
+--- /dev/null
++++ b/backend/runit.conf
+@@ -0,0 +1,16 @@
++# This is the configuration file for turnstile's runit backend.
++#
++# It follows the POSIX shell syntax (being sourced into a script).
++# The complete launch environment available to dinit can be used.
++#
++# It is a low-level configuration file. In most cases, it should
++# not be modified by the user.
++
++# the name of the service that turnstile will check for login readiness
++ready_sv="turnstile-ready"
++
++# the directory user service files are read from.
++services_dir="${HOME}/.config/service"
++
++# the environment variable directory user service files can read from.
++service_env_dir="${HOME}/.config/service-env"
+diff --git a/backend/turnstile-update-runit-env.in b/backend/turnstile-update-runit-env.in
+new file mode 100644
+index 0000000..9999459
+--- /dev/null
++++ b/backend/turnstile-update-runit-env.in
+@@ -0,0 +1,31 @@
++#!/bin/sh
++# Copyright 2023 classabbyamp <dev@placeviolette.net>
++# License: BSD-2-Clause
++
++usage() {
++	cat <<-EOF
++	turnstile-update-runit-env [VAR] ...
++	Updates values in the shared chpst(8) env dir.
++	
++	If VAR is a variable name, the value is taken from the environment.
++	If VAR is VAR=VAL, sets VAR to VAL.
++	EOF
++}
++
++. @CONF_PATH@/backend/runit.conf
++
++if [ $# -eq 0 ] || [ "$1" = "-h" ]; then
++	usage
++	exit 0
++fi
++
++for var; do
++	case "$var" in
++	*=*)
++		eval echo "${var#*=}" > "$service_env_dir/${var%%=*}"
++		;;
++	*)
++		eval echo '$'"$var" > "$service_env_dir/$var"
++		;;
++	esac
++done
+diff --git a/meson.build b/meson.build
+index 5f2e6f8..87f9d3b 100644
+--- a/meson.build
++++ b/meson.build
+@@ -22,6 +22,7 @@ scdoc_dep = dependency(
+ )
+ 
+ have_dinit = get_option('dinit').enabled()
++have_runit = get_option('runit').enabled()
+ 
+ conf_data = configuration_data()
+ conf_data.set_quoted('RUN_PATH', get_option('rundir'))
+@@ -101,10 +102,15 @@ install_data(
+ )
+ 
+ # decide the default backend
+-if have_dinit
+-    default_backend = 'dinit'
+-else
+-    default_backend = 'none'
++default_backend = get_option('default_backend')
++if default_backend == ''
++    if have_dinit
++        default_backend = 'dinit'
++    elif have_runit
++        default_backend = 'runit'
++    else
++        default_backend = 'none'
++    endif
+ endif
+ 
+ uconf_data = configuration_data()
+diff --git a/meson_options.txt b/meson_options.txt
+index 9b03995..4325042 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -3,6 +3,16 @@ option('dinit',
+     description: 'Whether to install Dinit-related backend and data'
+ )
+ 
++option('runit',
++    type: 'feature', value: 'disabled',
++    description: 'Whether to install runit-related backend and data'
++)
++
++option('default_backend',
++    type: 'string', value: '',
++    description: 'Override the default backend'
++)
++
+ option('rundir',
+     type: 'string', value: '/run',
+     description: 'Where the base directory will be located'
diff --git a/srcpkgs/turnstile/template b/srcpkgs/turnstile/template
new file mode 100644
index 0000000000000..9916832364699
--- /dev/null
+++ b/srcpkgs/turnstile/template
@@ -0,0 +1,24 @@
+# Template file for 'turnstile'
+pkgname=turnstile
+version=0.1.8
+revision=1
+build_style=meson
+configure_args="-Ddinit=disabled -Drunit=enabled -Ddefault_backend=runit
+ -Dmanage_rundir=true"
+hostmakedepends="pkg-config scdoc"
+makedepends="pam-devel"
+short_desc="Independent session/login tracker and user service manager"
+maintainer="classabbyamp <void@placeviolette.net>"
+license="BSD-2-Clause"
+homepage="https://github.com/chimera-linux/turnstile"
+distfiles="https://github.com/chimera-linux/turnstile/archive/refs/tags/v${version}.tar.gz"
+checksum=7eaab8c80c76ae9a9a711d7dc57ec346b9af09be99b526a5a3129a7fc9bd7a76
+conf_files="/etc/turnstile/turnstiled.conf"
+
+post_install() {
+	vsv turnstiled
+	vsconf "${FILESDIR}/dbus.run"
+	chmod +x "${DESTDIR}/usr/share/examples/turnstile/dbus.run"
+	vdoc "${FILESDIR}/README.voidlinux"
+	vlicense COPYING.md
+}

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: New package: turnstile-0.1.8
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (32 preceding siblings ...)
  2023-09-12 22:55 ` [PR PATCH] [Updated] " classabbyamp
@ 2023-09-12 23:09 ` classabbyamp
  2023-09-26 17:44 ` dkwo
                   ` (19 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: classabbyamp @ 2023-09-12 23:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 227 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/44676#issuecomment-1711490115

Comment:
still todo:

- [x] patch display managers (if necessary)
- [ ] upstream merge

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: New package: turnstile-0.1.8
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (33 preceding siblings ...)
  2023-09-12 23:09 ` classabbyamp
@ 2023-09-26 17:44 ` dkwo
  2023-09-26 18:04 ` dkwo
                   ` (18 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: dkwo @ 2023-09-26 17:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 559 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/44676#issuecomment-1736004426

Comment:
Within my setup, and using greetd, turnstile for user still persists, instead of killing the user's services upon logout:
```
$ cat /etc/turnstile/turnstiled.conf 
debug = no
backend = runit
debug_stderr = no
linger = no
rundir_path = /run/user/%u
manage_rundir = yes
export_dbus_address = no
login_timeout = 60
root_session = no
```
Upon logging out and in as another user, I still see my services in htop.

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: New package: turnstile-0.1.8
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (34 preceding siblings ...)
  2023-09-26 17:44 ` dkwo
@ 2023-09-26 18:04 ` dkwo
  2023-09-26 18:06 ` classabbyamp
                   ` (17 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: dkwo @ 2023-09-26 18:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 216 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/44676#issuecomment-1736030532

Comment:
indeed (i missed the msg above) greetd also needs a modification to pam file.

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: New package: turnstile-0.1.8
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (35 preceding siblings ...)
  2023-09-26 18:04 ` dkwo
@ 2023-09-26 18:06 ` classabbyamp
  2023-09-26 18:09 ` classabbyamp
                   ` (16 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: classabbyamp @ 2023-09-26 18:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1443 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/44676#issuecomment-1736033878

Comment:
what modification? it includes system-local-login:
```
xcat greetd /etc/pam.d/greetd
#%PAM-1.0

auth       required     pam_securetty.so
auth       requisite    pam_nologin.so
auth       include      system-local-login
account    include      system-local-login
session    include      system-local-login
```
which includes system-login
```
cat /etc/pam.d/system-local-login 
#%PAM-1.0

auth      include   system-login
account   include   system-login
password  include   system-login
session   include   system-login
```
which already supports turnstile, if you built pam-base from this branch:
```
cat /etc/pam.d/system-login 
#%PAM-1.0

auth       required   pam_shells.so
auth       requisite  pam_nologin.so
auth       include    system-auth

account    required   pam_access.so
account    required   pam_nologin.so
account    include    system-auth

password   include    system-auth

session    optional   pam_loginuid.so
session    include    system-auth
session    optional   pam_motd.so          motd=/etc/motd
session    optional   pam_mail.so          dir=/var/mail standard quiet
-session   optional   pam_turnstile.so
-session   optional   pam_elogind.so
-session   optional   pam_dumb_runtime_dir.so
session    required   pam_env.so
```

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: New package: turnstile-0.1.8
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (36 preceding siblings ...)
  2023-09-26 18:06 ` classabbyamp
@ 2023-09-26 18:09 ` classabbyamp
  2023-09-26 20:15 ` dkwo
                   ` (15 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: classabbyamp @ 2023-09-26 18:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 365 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/44676#issuecomment-1736038189

Comment:
> Within my setup, and using greetd, turnstile for user still persists, instead of killing the user's services upon logout:

can you set `debug = yes` and `debug_stderr = yes` and capture the output when you log out?

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: New package: turnstile-0.1.8
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (37 preceding siblings ...)
  2023-09-26 18:09 ` classabbyamp
@ 2023-09-26 20:15 ` dkwo
  2023-09-26 21:15 ` dkwo
                   ` (14 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: dkwo @ 2023-09-26 20:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 81585 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/44676#issuecomment-1736227580

Comment:
I did build pam from this branch, and notice this does not happen with login/agetty.
With greetd, svlogtail daemon gives
```
2023-09-26T20:07:42.18982 daemon.notice: Sep 26 16:07:42 seatd: 00:05:44.628 [INFO] [seatd/server.c:145] New client connected (pid: 3468, uid: 1000, gid: 1000)
2023-09-26T20:07:42.18987 daemon.notice: Sep 26 16:07:42 seatd: 00:05:44.628 [INFO] [seatd/seat.c:170] Added client 1 to seat0
2023-09-26T20:07:42.18989 daemon.notice: Sep 26 16:07:42 seatd: 00:05:44.628 [INFO] [seatd/seat.c:480] Opened client 1 on seat0
2023-09-26T20:08:09.42831 daemon.notice: Sep 26 16:08:09 seatd: 00:06:11.866 [INFO] [seatd/seat.c:418] No clients on seat0 to activate
2023-09-26T20:08:09.49072 daemon.notice: Sep 26 16:08:09 seatd: 00:06:11.929 [INFO] [seatd/seat.c:524] Closed client 1 on seat0
2023-09-26T20:08:09.49087 daemon.notice: Sep 26 16:08:09 seatd: 00:06:11.929 [INFO] [seatd/seat.c:192] Removed client 1 from seat0
2023-09-26T20:08:09.49098 daemon.notice: Sep 26 16:08:09 seatd: 00:06:11.929 [INFO] [seatd/client.c:471] Client disconnected
2023-09-26T20:08:09.52550 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.52556 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.52559 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.52563 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.52569 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.52572 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.52577 daemon.debug: Sep 26 16:08:09 turnstiled: conn: accepted 13 for 8
2023-09-26T20:08:09.52580 daemon.notice: Sep 26 16:08:09 turnstiled: conn: accepted 13 for 8
2023-09-26T20:08:09.52583 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.52585 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.52587 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.52589 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.52591 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.52595 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.52598 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.52601 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.52604 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.52606 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.52609 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.52612 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.52618 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.52621 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.52623 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.52626 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.52629 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.52631 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.52634 daemon.debug: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.52637 daemon.notice: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.52639 daemon.debug: Sep 26 16:08:09 turnstiled: msg: no session for 13
2023-09-26T20:08:09.52642 daemon.notice: Sep 26 16:08:09 turnstiled: msg: no session for 13
2023-09-26T20:08:09.52645 daemon.debug: Sep 26 16:08:09 turnstiled: msg: welcome 991
2023-09-26T20:08:09.52649 daemon.notice: Sep 26 16:08:09 turnstiled: msg: welcome 991
2023-09-26T20:08:09.52651 daemon.debug: Sep 26 16:08:09 turnstiled: msg: repopulate login 991
2023-09-26T20:08:09.52654 daemon.notice: Sep 26 16:08:09 turnstiled: msg: repopulate login 991
2023-09-26T20:08:09.52657 daemon.notice: Sep 26 16:08:09 turnstiled: msg: new session for 991/13
2023-09-26T20:08:09.52660 daemon.debug: Sep 26 16:08:09 turnstiled: msg: new session for 991/13
2023-09-26T20:08:09.52666 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.52668 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.52671 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.52674 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.52677 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.52681 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.52683 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.52686 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.52689 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.52691 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.52694 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.52697 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.52701 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.52703 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.52706 daemon.debug: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.52709 daemon.notice: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.52715 daemon.debug: Sep 26 16:08:09 turnstiled: msg: get session vtnr
2023-09-26T20:08:09.52717 daemon.notice: Sep 26 16:08:09 turnstiled: msg: get session vtnr
2023-09-26T20:08:09.52720 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.52723 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.52726 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.52728 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.52730 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.52734 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.52737 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.52740 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.52742 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.52745 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.52748 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.52750 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.52753 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.52759 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.52762 daemon.debug: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.52764 daemon.notice: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.52767 daemon.debug: Sep 26 16:08:09 turnstiled: msg: get remote
2023-09-26T20:08:09.52770 daemon.notice: Sep 26 16:08:09 turnstiled: msg: get remote
2023-09-26T20:08:09.52772 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.52775 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.52779 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.52781 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.52784 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.52787 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.52790 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.52792 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.52795 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.52798 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.52801 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.52804 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.52810 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.52812 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.52814 daemon.debug: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.52817 daemon.notice: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.52820 daemon.debug: Sep 26 16:08:09 turnstiled: msg: get service
2023-09-26T20:08:09.52822 daemon.notice: Sep 26 16:08:09 turnstiled: msg: get service
2023-09-26T20:08:09.52825 daemon.debug: Sep 26 16:08:09 turnstiled: msg: str start
2023-09-26T20:08:09.52828 daemon.notice: Sep 26 16:08:09 turnstiled: msg: str start
2023-09-26T20:08:09.52831 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.52835 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.52837 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.52840 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.52844 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.52847 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.52849 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.52852 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.52858 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.52861 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.52864 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.52866 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.52870 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.52873 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.52875 daemon.debug: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.52880 daemon.notice: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.52883 daemon.debug: Sep 26 16:08:09 turnstiled: msg: get service
2023-09-26T20:08:09.52885 daemon.notice: Sep 26 16:08:09 turnstiled: msg: get service
2023-09-26T20:08:09.52888 daemon.debug: Sep 26 16:08:09 turnstiled: msg: got "greetd"
2023-09-26T20:08:09.52891 daemon.notice: Sep 26 16:08:09 turnstiled: msg: got "greetd"
2023-09-26T20:08:09.52893 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.52896 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.52898 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.52901 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.52907 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.52910 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.52913 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.52915 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.52918 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.52921 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.52923 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.52925 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.52927 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.52929 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.52931 daemon.notice: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.52933 daemon.debug: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.52935 daemon.debug: Sep 26 16:08:09 turnstiled: msg: get type
2023-09-26T20:08:09.52937 daemon.notice: Sep 26 16:08:09 turnstiled: msg: get type
2023-09-26T20:08:09.52939 daemon.debug: Sep 26 16:08:09 turnstiled: msg: str start
2023-09-26T20:08:09.52942 daemon.notice: Sep 26 16:08:09 turnstiled: msg: str start
2023-09-26T20:08:09.52945 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.52949 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.52951 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.52952 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.52954 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.52956 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.52958 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.52960 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.52962 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.52963 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.52965 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.52967 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.52969 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.52970 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.52972 daemon.notice: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.52974 daemon.debug: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.52977 daemon.debug: Sep 26 16:08:09 turnstiled: msg: get type
2023-09-26T20:08:09.52982 daemon.notice: Sep 26 16:08:09 turnstiled: msg: get type
2023-09-26T20:08:09.52986 daemon.debug: Sep 26 16:08:09 turnstiled: msg: got "tty"
2023-09-26T20:08:09.52988 daemon.notice: Sep 26 16:08:09 turnstiled: msg: got "tty"
2023-09-26T20:08:09.52991 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.52993 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.52995 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.52998 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.53000 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.53002 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.53004 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.53006 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.53008 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.53010 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.53011 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.53013 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.53015 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.53019 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.53021 daemon.debug: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.53023 daemon.notice: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.53024 daemon.debug: Sep 26 16:08:09 turnstiled: msg: get class
2023-09-26T20:08:09.53026 daemon.notice: Sep 26 16:08:09 turnstiled: msg: get class
2023-09-26T20:08:09.53028 daemon.debug: Sep 26 16:08:09 turnstiled: msg: str start
2023-09-26T20:08:09.53029 daemon.notice: Sep 26 16:08:09 turnstiled: msg: str start
2023-09-26T20:08:09.53031 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.53033 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.53035 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.53036 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.53038 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.53040 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.53042 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.53043 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.53045 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.53049 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.53051 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.53053 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.53055 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.53057 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.53059 daemon.notice: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.53061 daemon.debug: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.53063 daemon.debug: Sep 26 16:08:09 turnstiled: msg: get class
2023-09-26T20:08:09.53065 daemon.notice: Sep 26 16:08:09 turnstiled: msg: get class
2023-09-26T20:08:09.53067 daemon.debug: Sep 26 16:08:09 turnstiled: msg: got "greeter"
2023-09-26T20:08:09.53068 daemon.notice: Sep 26 16:08:09 turnstiled: msg: got "greeter"
2023-09-26T20:08:09.53070 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.53072 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.53074 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.53075 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.53080 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.53082 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.53086 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.53088 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.53089 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.53091 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.53093 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.53095 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.53096 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.53098 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.53100 daemon.debug: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.53102 daemon.notice: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.53103 daemon.debug: Sep 26 16:08:09 turnstiled: msg: get desktop
2023-09-26T20:08:09.53105 daemon.notice: Sep 26 16:08:09 turnstiled: msg: get desktop
2023-09-26T20:08:09.53107 daemon.notice: Sep 26 16:08:09 turnstiled: msg: str start
2023-09-26T20:08:09.53109 daemon.debug: Sep 26 16:08:09 turnstiled: msg: str start
2023-09-26T20:08:09.53110 daemon.debug: Sep 26 16:08:09 turnstiled: msg: got ""
2023-09-26T20:08:09.53112 daemon.notice: Sep 26 16:08:09 turnstiled: msg: got ""
2023-09-26T20:08:09.53116 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.53119 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.53120 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.53122 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.53124 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.53125 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.53127 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.53129 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.53131 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.53133 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.53134 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.53136 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.53138 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.53140 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.53141 daemon.debug: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.53143 daemon.notice: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.53147 daemon.debug: Sep 26 16:08:09 turnstiled: msg: get seat
2023-09-26T20:08:09.53150 daemon.notice: Sep 26 16:08:09 turnstiled: msg: get seat
2023-09-26T20:08:09.53151 daemon.debug: Sep 26 16:08:09 turnstiled: msg: str start
2023-09-26T20:08:09.53153 daemon.notice: Sep 26 16:08:09 turnstiled: msg: str start
2023-09-26T20:08:09.53155 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.53157 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.53158 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.53160 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.53162 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.53163 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.53165 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.53167 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.53169 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.53171 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.53173 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.53175 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.53182 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.53184 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.53186 daemon.debug: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.53187 daemon.notice: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.53189 daemon.debug: Sep 26 16:08:09 turnstiled: msg: get seat
2023-09-26T20:08:09.53191 daemon.notice: Sep 26 16:08:09 turnstiled: msg: get seat
2023-09-26T20:08:09.53192 daemon.debug: Sep 26 16:08:09 turnstiled: msg: got "seat0"
2023-09-26T20:08:09.53194 daemon.notice: Sep 26 16:08:09 turnstiled: msg: got "seat0"
2023-09-26T20:08:09.53196 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.53197 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.53199 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.53201 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.53202 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.53204 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.53206 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.53207 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.53209 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.53213 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.53214 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.53216 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.53218 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.53219 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.53221 daemon.debug: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.53223 daemon.notice: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.53224 daemon.debug: Sep 26 16:08:09 turnstiled: msg: get tty
2023-09-26T20:08:09.53226 daemon.notice: Sep 26 16:08:09 turnstiled: msg: get tty
2023-09-26T20:08:09.53227 daemon.debug: Sep 26 16:08:09 turnstiled: msg: str start
2023-09-26T20:08:09.53229 daemon.notice: Sep 26 16:08:09 turnstiled: msg: str start
2023-09-26T20:08:09.53231 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.53232 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.53234 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.53236 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.53238 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.53242 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.53245 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.53246 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.53248 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.53249 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.53251 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.53253 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.53254 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.53256 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.53258 daemon.debug: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.53260 daemon.notice: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.53262 daemon.debug: Sep 26 16:08:09 turnstiled: msg: get tty
2023-09-26T20:08:09.53263 daemon.notice: Sep 26 16:08:09 turnstiled: msg: get tty
2023-09-26T20:08:09.53265 daemon.debug: Sep 26 16:08:09 turnstiled: msg: got "tty1"
2023-09-26T20:08:09.53266 daemon.notice: Sep 26 16:08:09 turnstiled: msg: got "tty1"
2023-09-26T20:08:09.53268 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.53270 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.53274 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.53275 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.53279 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.53281 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.53283 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.53284 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.53286 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.53288 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.53289 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.53291 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.53293 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.53295 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.53297 daemon.notice: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.53298 daemon.debug: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.53300 daemon.debug: Sep 26 16:08:09 turnstiled: msg: get display
2023-09-26T20:08:09.53302 daemon.notice: Sep 26 16:08:09 turnstiled: msg: get display
2023-09-26T20:08:09.53306 daemon.debug: Sep 26 16:08:09 turnstiled: msg: str start
2023-09-26T20:08:09.53307 daemon.notice: Sep 26 16:08:09 turnstiled: msg: str start
2023-09-26T20:08:09.53309 daemon.debug: Sep 26 16:08:09 turnstiled: msg: got ""
2023-09-26T20:08:09.53311 daemon.notice: Sep 26 16:08:09 turnstiled: msg: got ""
2023-09-26T20:08:09.53312 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.53314 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.53316 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.53317 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.53319 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.53321 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.53322 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.53324 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.53326 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.53328 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.53329 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.53331 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.53335 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.53337 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.53338 daemon.debug: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.53340 daemon.notice: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.53342 daemon.debug: Sep 26 16:08:09 turnstiled: msg: get ruser
2023-09-26T20:08:09.53343 daemon.notice: Sep 26 16:08:09 turnstiled: msg: get ruser
2023-09-26T20:08:09.53345 daemon.debug: Sep 26 16:08:09 turnstiled: msg: str start
2023-09-26T20:08:09.53347 daemon.notice: Sep 26 16:08:09 turnstiled: msg: str start
2023-09-26T20:08:09.53349 daemon.debug: Sep 26 16:08:09 turnstiled: msg: got ""
2023-09-26T20:08:09.53350 daemon.notice: Sep 26 16:08:09 turnstiled: msg: got ""
2023-09-26T20:08:09.53352 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.53354 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.53355 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.53357 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.53358 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.53360 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.53362 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.53366 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.53367 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.53369 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.53371 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.53372 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.53374 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.53376 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.53379 daemon.debug: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.53381 daemon.notice: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.53383 daemon.debug: Sep 26 16:08:09 turnstiled: msg: get rhost
2023-09-26T20:08:09.53384 daemon.notice: Sep 26 16:08:09 turnstiled: msg: get rhost
2023-09-26T20:08:09.53386 daemon.debug: Sep 26 16:08:09 turnstiled: msg: str start
2023-09-26T20:08:09.53388 daemon.notice: Sep 26 16:08:09 turnstiled: msg: str start
2023-09-26T20:08:09.53389 daemon.debug: Sep 26 16:08:09 turnstiled: msg: got ""
2023-09-26T20:08:09.53391 daemon.notice: Sep 26 16:08:09 turnstiled: msg: got ""
2023-09-26T20:08:09.53392 daemon.debug: Sep 26 16:08:09 turnstiled: msg: start service manager
2023-09-26T20:08:09.53396 daemon.notice: Sep 26 16:08:09 turnstiled: msg: start service manager
2023-09-26T20:08:09.53398 daemon.debug: Sep 26 16:08:09 turnstiled: srv: setup rundir for 991
2023-09-26T20:08:09.53400 daemon.notice: Sep 26 16:08:09 turnstiled: srv: setup rundir for 991
2023-09-26T20:08:09.53401 daemon.debug: Sep 26 16:08:09 turnstiled: rundir: make directory /run/user/991
2023-09-26T20:08:09.53403 daemon.notice: Sep 26 16:08:09 turnstiled: rundir: make directory /run/user/991
2023-09-26T20:08:09.53405 daemon.debug: Sep 26 16:08:09 turnstiled: rundir: try make parent /run
2023-09-26T20:08:09.53406 daemon.notice: Sep 26 16:08:09 turnstiled: rundir: try make parent /run
2023-09-26T20:08:09.53408 daemon.debug: Sep 26 16:08:09 turnstiled: rundir: try make parent /run/user
2023-09-26T20:08:09.53410 daemon.notice: Sep 26 16:08:09 turnstiled: rundir: try make parent /run/user
2023-09-26T20:08:09.53413 daemon.debug: Sep 26 16:08:09 turnstiled: srv: create login dir for 991
2023-09-26T20:08:09.53414 daemon.notice: Sep 26 16:08:09 turnstiled: srv: create login dir for 991
2023-09-26T20:08:09.53416 daemon.debug: Sep 26 16:08:09 turnstiled: srv: create readiness pipe
2023-09-26T20:08:09.53418 daemon.notice: Sep 26 16:08:09 turnstiled: srv: create readiness pipe
2023-09-26T20:08:09.53419 daemon.debug: Sep 26 16:08:09 turnstiled: srv: timer set
2023-09-26T20:08:09.53421 daemon.notice: Sep 26 16:08:09 turnstiled: srv: timer set
2023-09-26T20:08:09.53425 daemon.debug: Sep 26 16:08:09 turnstiled: srv: launch
2023-09-26T20:08:09.53427 daemon.notice: Sep 26 16:08:09 turnstiled: srv: launch
2023-09-26T20:08:09.53428 daemon.notice: Sep 26 16:08:09 turnstiled: msg: wait
2023-09-26T20:08:09.53430 daemon.debug: Sep 26 16:08:09 turnstiled: msg: wait
2023-09-26T20:08:09.53432 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.53434 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.53435 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.53437 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.54350 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.54355 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.54358 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.54361 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.54363 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.54365 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.54368 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.54370 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.54378 daemon.debug: Sep 26 16:08:09 turnstiled: pipe: close
2023-09-26T20:08:09.54381 daemon.notice: Sep 26 16:08:09 turnstiled: pipe: close
2023-09-26T20:08:09.54384 daemon.debug: Sep 26 16:08:09 turnstiled: pipe: gone
2023-09-26T20:08:09.54386 daemon.notice: Sep 26 16:08:09 turnstiled: pipe: gone
2023-09-26T20:08:09.54389 daemon.debug: Sep 26 16:08:09 turnstiled: srv: startup (ready)
2023-09-26T20:08:09.54391 daemon.notice: Sep 26 16:08:09 turnstiled: srv: startup (ready)
2023-09-26T20:08:09.54425 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.54429 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.54433 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.54436 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.54438 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.54443 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.96718 daemon.notice: Sep 26 16:08:09 turnstiled: ok: run: /var/lib/_greeter/.config/service/turnstile-ready: (pid 3798) 0s
2023-09-26T20:08:09.96751 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.96759 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.96766 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.96772 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.96791 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.96800 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.96806 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: sigchld
2023-09-26T20:08:09.96812 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: sigchld
2023-09-26T20:08:09.96819 daemon.debug: Sep 26 16:08:09 turnstiled: srv: reap 3799
2023-09-26T20:08:09.96825 daemon.notice: Sep 26 16:08:09 turnstiled: srv: reap 3799
2023-09-26T20:08:09.96836 daemon.debug: Sep 26 16:08:09 turnstiled: srv: ready notification
2023-09-26T20:08:09.96842 daemon.notice: Sep 26 16:08:09 turnstiled: srv: ready notification
2023-09-26T20:08:09.96848 daemon.debug: Sep 26 16:08:09 turnstiled: srv: disarm timer
2023-09-26T20:08:09.96854 daemon.notice: Sep 26 16:08:09 turnstiled: srv: disarm timer
2023-09-26T20:08:09.96860 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.96866 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.96882 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.96891 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.96897 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.96902 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.96908 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.96917 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.96923 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.96928 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.96934 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.96940 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.96946 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.96951 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.96957 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.96963 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.96969 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.96975 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.96992 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.96998 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.97004 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.97010 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.97016 daemon.debug: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.97022 daemon.notice: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.97026 daemon.debug: Sep 26 16:08:09 turnstiled: msg: session environment request
2023-09-26T20:08:09.97030 daemon.debug: Sep 26 16:08:09 turnstiled: msg: send len: 30
2023-09-26T20:08:09.97034 daemon.debug: Sep 26 16:08:09 turnstiled: msg: sent env, done
2023-09-26T20:08:09.97038 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.97042 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.97052 daemon.notice: Sep 26 16:08:09 turnstiled: msg: session environment request
2023-09-26T20:08:09.97057 daemon.notice: Sep 26 16:08:09 turnstiled: msg: send len: 30
2023-09-26T20:08:09.97061 daemon.notice: Sep 26 16:08:09 turnstiled: msg: sent env, done
2023-09-26T20:08:09.97065 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.97069 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:16.71801 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.71804 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.71805 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.71807 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.71810 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.71812 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.71814 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.71817 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.71818 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.71819 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.71821 daemon.notice: Sep 26 16:08:16 turnstiled: conn: hup 13
2023-09-26T20:08:16.71822 daemon.debug: Sep 26 16:08:16 turnstiled: conn: hup 13
2023-09-26T20:08:16.71823 daemon.notice: Sep 26 16:08:16 turnstiled: conn: close 13 for login 991
2023-09-26T20:08:16.71824 daemon.debug: Sep 26 16:08:16 turnstiled: conn: close 13 for login 991
2023-09-26T20:08:16.71827 daemon.debug: Sep 26 16:08:16 turnstiled: srv: stop
2023-09-26T20:08:16.71829 daemon.notice: Sep 26 16:08:16 turnstiled: srv: stop
2023-09-26T20:08:16.71830 daemon.debug: Sep 26 16:08:16 turnstiled: srv: term
2023-09-26T20:08:16.71831 daemon.notice: Sep 26 16:08:16 turnstiled: srv: term
2023-09-26T20:08:16.71833 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.71835 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.71836 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.71837 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72056 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72058 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72060 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72061 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72063 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72064 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72065 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: sigchld
2023-09-26T20:08:16.72066 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: sigchld
2023-09-26T20:08:16.72079 daemon.debug: Sep 26 16:08:16 turnstiled: srv: reap 3791
2023-09-26T20:08:16.72081 daemon.notice: Sep 26 16:08:16 turnstiled: srv: reap 3791
2023-09-26T20:08:16.72083 daemon.debug: Sep 26 16:08:16 turnstiled: dir_clear: clear srv.3792 at 14
2023-09-26T20:08:16.72084 daemon.notice: Sep 26 16:08:16 turnstiled: dir_clear: clear srv.3792 at 14
2023-09-26T20:08:16.72085 daemon.debug: Sep 26 16:08:16 turnstiled: rundir: clear directory /run/user/991
2023-09-26T20:08:16.72086 daemon.notice: Sep 26 16:08:16 turnstiled: rundir: clear directory /run/user/991
2023-09-26T20:08:16.72088 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72089 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72090 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72092 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72093 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72095 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72096 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72097 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72098 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72100 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72103 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72105 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72345 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72348 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72350 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72351 daemon.debug: Sep 26 16:08:16 turnstiled: conn: accepted 13 for 8
2023-09-26T20:08:16.72355 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72357 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72359 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72361 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72362 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72363 daemon.notice: Sep 26 16:08:16 turnstiled: conn: accepted 13 for 8
2023-09-26T20:08:16.72365 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72366 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72368 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72369 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72371 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72373 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72375 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72377 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72379 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72380 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72384 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72385 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72387 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72388 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72390 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72391 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72392 daemon.debug: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72394 daemon.notice: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72396 daemon.debug: Sep 26 16:08:16 turnstiled: msg: no session for 13
2023-09-26T20:08:16.72397 daemon.notice: Sep 26 16:08:16 turnstiled: msg: no session for 13
2023-09-26T20:08:16.72398 daemon.debug: Sep 26 16:08:16 turnstiled: msg: welcome 1000
2023-09-26T20:08:16.72400 daemon.debug: Sep 26 16:08:16 turnstiled: msg: using existing login 1000
2023-09-26T20:08:16.72401 daemon.debug: Sep 26 16:08:16 turnstiled: msg: new session for 1000/13
2023-09-26T20:08:16.72403 daemon.notice: Sep 26 16:08:16 turnstiled: msg: welcome 1000
2023-09-26T20:08:16.72404 daemon.notice: Sep 26 16:08:16 turnstiled: msg: using existing login 1000
2023-09-26T20:08:16.72406 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72409 daemon.notice: Sep 26 16:08:16 turnstiled: msg: new session for 1000/13
2023-09-26T20:08:16.72411 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72412 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72413 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72415 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72416 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72418 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72419 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72421 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72422 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72424 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72425 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72427 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72430 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72431 daemon.debug: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72434 daemon.notice: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72436 daemon.debug: Sep 26 16:08:16 turnstiled: msg: get session vtnr
2023-09-26T20:08:16.72437 daemon.notice: Sep 26 16:08:16 turnstiled: msg: get session vtnr
2023-09-26T20:08:16.72439 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72440 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72442 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72443 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72445 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72446 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72448 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72450 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72451 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72453 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72454 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72455 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72457 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72460 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72462 daemon.debug: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72463 daemon.notice: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72465 daemon.debug: Sep 26 16:08:16 turnstiled: msg: get remote
2023-09-26T20:08:16.72466 daemon.notice: Sep 26 16:08:16 turnstiled: msg: get remote
2023-09-26T20:08:16.72467 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72469 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72470 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72472 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72473 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72475 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72477 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72478 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72480 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72482 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72484 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72487 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72488 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72490 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72491 daemon.debug: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72493 daemon.notice: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72494 daemon.debug: Sep 26 16:08:16 turnstiled: msg: get service
2023-09-26T20:08:16.72496 daemon.notice: Sep 26 16:08:16 turnstiled: msg: get service
2023-09-26T20:08:16.72497 daemon.debug: Sep 26 16:08:16 turnstiled: msg: str start
2023-09-26T20:08:16.72498 daemon.notice: Sep 26 16:08:16 turnstiled: msg: str start
2023-09-26T20:08:16.72500 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72501 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72503 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72505 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72506 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72508 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72509 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72511 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72514 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72515 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72517 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72518 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72520 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72521 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72523 daemon.debug: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72525 daemon.notice: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72526 daemon.debug: Sep 26 16:08:16 turnstiled: msg: get service
2023-09-26T20:08:16.72528 daemon.notice: Sep 26 16:08:16 turnstiled: msg: get service
2023-09-26T20:08:16.72529 daemon.debug: Sep 26 16:08:16 turnstiled: msg: got "greetd"
2023-09-26T20:08:16.72531 daemon.notice: Sep 26 16:08:16 turnstiled: msg: got "greetd"
2023-09-26T20:08:16.72532 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72533 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72535 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72536 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72540 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72541 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72543 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72544 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72545 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72547 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72548 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72550 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72551 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72553 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72554 daemon.debug: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72555 daemon.notice: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72557 daemon.debug: Sep 26 16:08:16 turnstiled: msg: get type
2023-09-26T20:08:16.72558 daemon.notice: Sep 26 16:08:16 turnstiled: msg: get type
2023-09-26T20:08:16.72559 daemon.debug: Sep 26 16:08:16 turnstiled: msg: str start
2023-09-26T20:08:16.72560 daemon.notice: Sep 26 16:08:16 turnstiled: msg: str start
2023-09-26T20:08:16.72563 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72564 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72565 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72566 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72567 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72568 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72569 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72570 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72571 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72573 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72574 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72575 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72578 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72580 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72581 daemon.debug: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72582 daemon.notice: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72585 daemon.debug: Sep 26 16:08:16 turnstiled: msg: get type
2023-09-26T20:08:16.72587 daemon.notice: Sep 26 16:08:16 turnstiled: msg: get type
2023-09-26T20:08:16.72588 daemon.debug: Sep 26 16:08:16 turnstiled: msg: got "tty"
2023-09-26T20:08:16.72589 daemon.notice: Sep 26 16:08:16 turnstiled: msg: got "tty"
2023-09-26T20:08:16.72590 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72591 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72592 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72593 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72594 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72595 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72596 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72597 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72597 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72598 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72599 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72600 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72601 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72603 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72604 daemon.debug: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72605 daemon.notice: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72606 daemon.debug: Sep 26 16:08:16 turnstiled: msg: get class
2023-09-26T20:08:16.72607 daemon.notice: Sep 26 16:08:16 turnstiled: msg: get class
2023-09-26T20:08:16.72608 daemon.debug: Sep 26 16:08:16 turnstiled: msg: str start
2023-09-26T20:08:16.72609 daemon.notice: Sep 26 16:08:16 turnstiled: msg: str start
2023-09-26T20:08:16.72610 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72611 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72612 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72613 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72614 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72615 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72616 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72617 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72618 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72620 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72621 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72622 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72623 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72624 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72625 daemon.debug: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72626 daemon.notice: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72627 daemon.debug: Sep 26 16:08:16 turnstiled: msg: get class
2023-09-26T20:08:16.72628 daemon.notice: Sep 26 16:08:16 turnstiled: msg: get class
2023-09-26T20:08:16.72629 daemon.debug: Sep 26 16:08:16 turnstiled: msg: got "user"
2023-09-26T20:08:16.72630 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72630 daemon.notice: Sep 26 16:08:16 turnstiled: msg: got "user"
2023-09-26T20:08:16.72631 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72632 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72633 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72634 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72635 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72638 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72638 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72639 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72640 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72641 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72642 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72643 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72644 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72645 daemon.notice: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72646 daemon.debug: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72647 daemon.debug: Sep 26 16:08:16 turnstiled: msg: get desktop
2023-09-26T20:08:16.72648 daemon.notice: Sep 26 16:08:16 turnstiled: msg: get desktop
2023-09-26T20:08:16.72649 daemon.debug: Sep 26 16:08:16 turnstiled: msg: str start
2023-09-26T20:08:16.72649 daemon.notice: Sep 26 16:08:16 turnstiled: msg: str start
2023-09-26T20:08:16.72650 daemon.debug: Sep 26 16:08:16 turnstiled: msg: got ""
2023-09-26T20:08:16.72651 daemon.notice: Sep 26 16:08:16 turnstiled: msg: got ""
2023-09-26T20:08:16.72653 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72654 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72655 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72656 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72657 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72658 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72659 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72660 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72661 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72662 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72663 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72664 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72664 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72665 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72666 daemon.debug: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72667 daemon.notice: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72670 daemon.debug: Sep 26 16:08:16 turnstiled: msg: get seat
2023-09-26T20:08:16.72671 daemon.notice: Sep 26 16:08:16 turnstiled: msg: get seat
2023-09-26T20:08:16.72672 daemon.debug: Sep 26 16:08:16 turnstiled: msg: str start
2023-09-26T20:08:16.72673 daemon.notice: Sep 26 16:08:16 turnstiled: msg: str start
2023-09-26T20:08:16.72674 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72675 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72686 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72687 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72688 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72689 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72690 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72691 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72692 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72692 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72694 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72695 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72697 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72698 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72699 daemon.debug: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72700 daemon.notice: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72701 daemon.debug: Sep 26 16:08:16 turnstiled: msg: get seat
2023-09-26T20:08:16.72702 daemon.notice: Sep 26 16:08:16 turnstiled: msg: get seat
2023-09-26T20:08:16.72703 daemon.debug: Sep 26 16:08:16 turnstiled: msg: got "seat0"
2023-09-26T20:08:16.72703 daemon.notice: Sep 26 16:08:16 turnstiled: msg: got "seat0"
2023-09-26T20:08:16.72704 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72705 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72706 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72707 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72708 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72709 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72710 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72711 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72712 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72714 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72715 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72716 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72717 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72718 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72719 daemon.debug: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72720 daemon.notice: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72721 daemon.debug: Sep 26 16:08:16 turnstiled: msg: get tty
2023-09-26T20:08:16.72722 daemon.notice: Sep 26 16:08:16 turnstiled: msg: get tty
2023-09-26T20:08:16.72723 daemon.debug: Sep 26 16:08:16 turnstiled: msg: str start
2023-09-26T20:08:16.72723 daemon.notice: Sep 26 16:08:16 turnstiled: msg: str start
2023-09-26T20:08:16.72724 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72725 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72726 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72727 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72728 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72730 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72731 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72732 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72733 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72734 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72735 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72736 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72737 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72738 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72739 daemon.debug: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72740 daemon.notice: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72741 daemon.debug: Sep 26 16:08:16 turnstiled: msg: get tty
2023-09-26T20:08:16.72742 daemon.notice: Sep 26 16:08:16 turnstiled: msg: get tty
2023-09-26T20:08:16.72743 daemon.debug: Sep 26 16:08:16 turnstiled: msg: got "tty1"
2023-09-26T20:08:16.72744 daemon.notice: Sep 26 16:08:16 turnstiled: msg: got "tty1"
2023-09-26T20:08:16.72745 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72746 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72748 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72749 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72750 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72750 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72751 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72752 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72753 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72754 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72755 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72756 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72757 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72758 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72759 daemon.debug: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72760 daemon.notice: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72761 daemon.debug: Sep 26 16:08:16 turnstiled: msg: get display
2023-09-26T20:08:16.72761 daemon.notice: Sep 26 16:08:16 turnstiled: msg: get display
2023-09-26T20:08:16.72764 daemon.debug: Sep 26 16:08:16 turnstiled: msg: str start
2023-09-26T20:08:16.72765 daemon.debug: Sep 26 16:08:16 turnstiled: msg: got ""
2023-09-26T20:08:16.72765 daemon.notice: Sep 26 16:08:16 turnstiled: msg: str start
2023-09-26T20:08:16.72766 daemon.notice: Sep 26 16:08:16 turnstiled: msg: got ""
2023-09-26T20:08:16.72767 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72768 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72769 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72770 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72771 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72772 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72773 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72774 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72775 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72777 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72779 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72781 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72783 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72784 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72785 daemon.debug: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72786 daemon.notice: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72787 daemon.debug: Sep 26 16:08:16 turnstiled: msg: get ruser
2023-09-26T20:08:16.72788 daemon.notice: Sep 26 16:08:16 turnstiled: msg: get ruser
2023-09-26T20:08:16.72789 daemon.debug: Sep 26 16:08:16 turnstiled: msg: str start
2023-09-26T20:08:16.72790 daemon.debug: Sep 26 16:08:16 turnstiled: msg: got ""
2023-09-26T20:08:16.72790 daemon.notice: Sep 26 16:08:16 turnstiled: msg: str start
2023-09-26T20:08:16.72792 daemon.notice: Sep 26 16:08:16 turnstiled: msg: got ""
2023-09-26T20:08:16.72793 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72794 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72795 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72795 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72796 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72797 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72798 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72800 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72801 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72802 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72803 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72804 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72805 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72806 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72807 daemon.debug: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72808 daemon.notice: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72809 daemon.debug: Sep 26 16:08:16 turnstiled: msg: get rhost
2023-09-26T20:08:16.72810 daemon.notice: Sep 26 16:08:16 turnstiled: msg: get rhost
2023-09-26T20:08:16.72811 daemon.debug: Sep 26 16:08:16 turnstiled: msg: str start
2023-09-26T20:08:16.72811 daemon.notice: Sep 26 16:08:16 turnstiled: msg: str start
2023-09-26T20:08:16.72812 daemon.debug: Sep 26 16:08:16 turnstiled: msg: got ""
2023-09-26T20:08:16.72813 daemon.notice: Sep 26 16:08:16 turnstiled: msg: got ""
2023-09-26T20:08:16.72814 daemon.debug: Sep 26 16:08:16 turnstiled: msg: done
2023-09-26T20:08:16.72815 daemon.notice: Sep 26 16:08:16 turnstiled: msg: done
2023-09-26T20:08:16.72818 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72819 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72819 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72820 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72821 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72822 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72823 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72824 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72825 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72826 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72828 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72829 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72830 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72830 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72831 daemon.debug: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72832 daemon.notice: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72835 daemon.debug: Sep 26 16:08:16 turnstiled: msg: send len: 31
2023-09-26T20:08:16.72835 daemon.debug: Sep 26 16:08:16 turnstiled: msg: session environment request
2023-09-26T20:08:16.72836 daemon.debug: Sep 26 16:08:16 turnstiled: msg: sent env, done
2023-09-26T20:08:16.72837 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72838 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72839 daemon.notice: Sep 26 16:08:16 turnstiled: msg: session environment request
2023-09-26T20:08:16.72840 daemon.notice: Sep 26 16:08:16 turnstiled: msg: send len: 31
2023-09-26T20:08:16.72841 daemon.notice: Sep 26 16:08:16 turnstiled: msg: sent env, done
2023-09-26T20:08:16.72842 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72843 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
```

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: New package: turnstile-0.1.8
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (38 preceding siblings ...)
  2023-09-26 20:15 ` dkwo
@ 2023-09-26 21:15 ` dkwo
  2023-09-26 21:16 ` dkwo
                   ` (13 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: dkwo @ 2023-09-26 21:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 525 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/44676#issuecomment-1736312818

Comment:
btw, turnstile also tracks a session for the _greetd user, not sure if this is related.
i can confirm that the issue only appears with greetd, not with login/agetty.
```
$ cat /etc/greetd/config.toml 
[terminal]
vt = 1
[default_session]
command = 'agreety -c /usr/local/bin/river-run'
user = "_greeter"
```
the river run being a script that sets some variables and runs river.

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: New package: turnstile-0.1.8
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (39 preceding siblings ...)
  2023-09-26 21:15 ` dkwo
@ 2023-09-26 21:16 ` dkwo
  2023-09-26 21:25 ` classabbyamp
                   ` (12 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: dkwo @ 2023-09-26 21:16 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 526 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/44676#issuecomment-1736312818

Comment:
btw, turnstile also tracks a session for the _greeter user, not sure if this is related.
i can confirm that the issue only appears with greetd, not with login/agetty.
```
$ cat /etc/greetd/config.toml 
[terminal]
vt = 1
[default_session]
command = 'agreety -c /usr/local/bin/river-run'
user = "_greeter"
```
the river run being a script that sets some variables and runs river.

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: New package: turnstile-0.1.8
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (40 preceding siblings ...)
  2023-09-26 21:16 ` dkwo
@ 2023-09-26 21:25 ` classabbyamp
  2023-09-26 21:40 ` dkwo
                   ` (11 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: classabbyamp @ 2023-09-26 21:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 266 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/44676#issuecomment-1736324900

Comment:
> turnstile also tracks a session for the _greeter user, not sure if this is related

not related, and intended i think

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: New package: turnstile-0.1.8
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (41 preceding siblings ...)
  2023-09-26 21:25 ` classabbyamp
@ 2023-09-26 21:40 ` dkwo
  2023-09-26 21:41 ` dkwo
                   ` (10 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: dkwo @ 2023-09-26 21:40 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 412 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/44676#issuecomment-1736340303

Comment:
> not related, and intended i think

sounds reasonable. (this only happens if I do not login into the tty using greetd, in which case the _greeter user lingers forever with agreety cmd. if instead a user logs into that tty, the greeter_ user is not tracked by turnstile.)

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: New package: turnstile-0.1.8
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (42 preceding siblings ...)
  2023-09-26 21:40 ` dkwo
@ 2023-09-26 21:41 ` dkwo
  2023-12-26  1:45 ` github-actions
                   ` (9 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: dkwo @ 2023-09-26 21:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 416 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/44676#issuecomment-1736340303

Comment:
> not related, and intended i think

sounds reasonable. (this only happens if I do not login into the tty using greetd, in which case the `_greeter` user lingers forever with agreety cmd. if instead a user logs into that tty, the `_greeter` user is not tracked by turnstile.)

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: New package: turnstile-0.1.8
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (43 preceding siblings ...)
  2023-09-26 21:41 ` dkwo
@ 2023-12-26  1:45 ` github-actions
  2023-12-26 17:52 ` [PR PATCH] [Updated] " classabbyamp
                   ` (8 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: github-actions @ 2023-12-26  1:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

New comment by github-actions[bot] on void-packages repository

https://github.com/void-linux/void-packages/pull/44676#issuecomment-1869188254

Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that.  If this pull request is still relevant bump it or assign it.

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PR PATCH] [Updated] New package: turnstile-0.1.8
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (44 preceding siblings ...)
  2023-12-26  1:45 ` github-actions
@ 2023-12-26 17:52 ` classabbyamp
  2023-12-26 17:54 ` classabbyamp
                   ` (7 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: classabbyamp @ 2023-12-26 17:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 741 bytes --]

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages new/turnstile
https://github.com/void-linux/void-packages/pull/44676

New package: turnstile-0.1.8
WIP while i create the runit backend upstream ([mostly done](https://github.com/chimera-linux/turnstile/compare/master...classabbyamp:runit-backend))

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**



A patch file from https://github.com/void-linux/void-packages/pull/44676.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-new/turnstile-44676.patch --]
[-- Type: text/x-diff, Size: 20730 bytes --]

From a307e25a6f471d7fef0b5849b1252220d1efced7 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 11 Jul 2023 22:02:49 -0400
Subject: [PATCH 1/5] polkit: patch to support turnstile

---
 srcpkgs/polkit/patches/turnstile.patch | 57 ++++++++++++++++++++++++++
 srcpkgs/polkit/template                |  2 +-
 2 files changed, 58 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/polkit/patches/turnstile.patch

diff --git a/srcpkgs/polkit/patches/turnstile.patch b/srcpkgs/polkit/patches/turnstile.patch
new file mode 100644
index 0000000000000..4f56ed130eefd
--- /dev/null
+++ b/srcpkgs/polkit/patches/turnstile.patch
@@ -0,0 +1,57 @@
+commit 8d98aa421b92765695af13c033cf7e80375c03fe
+Author: q66 <q66@chimera-linux.org>
+Date:   Sun Jul 2 15:44:51 2023 +0200
+
+    ensure turnstile-session processes fall back to display check
+    
+    As turnstile session is shared between sessions, let us fall back
+    to the check for whether a graphical session is in place. We need
+    this as our dbus session bus is managed through turnstile. In
+    systemd-using systems there is no problem because user units are
+    not a part of any explicit session (we don't get this luxury
+    because using a session is the only way to make sure our pid is
+    tracked in systemd at all; we need that to be able to resolve
+    PID to UID).
+
+diff --git a/src/polkitbackend/polkitbackendsessionmonitor-systemd.c b/src/polkitbackend/polkitbackendsessionmonitor-systemd.c
+index b00cdbd..9a3f3c3 100644
+--- a/src/polkitbackend/polkitbackendsessionmonitor-systemd.c
++++ b/src/polkitbackend/polkitbackendsessionmonitor-systemd.c
+@@ -346,7 +346,7 @@ polkit_backend_session_monitor_get_session_for_subject (PolkitBackendSessionMoni
+   PolkitUnixProcess *tmp_process = NULL;
+   PolkitUnixProcess *process = NULL;
+   PolkitSubject *session = NULL;
+-  char *session_id = NULL;
++  char *session_id = NULL, *service_id = NULL;
+   pid_t pid;
+ #if HAVE_SD_UID_GET_DISPLAY
+   uid_t uid;
+@@ -377,8 +377,26 @@ polkit_backend_session_monitor_get_session_for_subject (PolkitBackendSessionMoni
+ 
+   if (sd_pid_get_session (pid, &session_id) >= 0)
+     {
+-      session = polkit_unix_session_new (session_id);
+-      goto out;
++      /* if belonging to turnstile, ignore */
++      if (sd_session_get_service (session_id, &service_id) >= 0)
++        {
++          if (strcmp (service_id, "turnstiled"))
++            {
++              free (service_id);
++              session = polkit_unix_session_new (session_id);
++              goto out;
++            }
++          else
++            {
++              /* turnstile-managed processes are shared */
++              free(service_id);
++            }
++        }
++      else
++        {
++          session = polkit_unix_session_new (session_id);
++          goto out;
++        }
+     }
+ 
+ #if HAVE_SD_UID_GET_DISPLAY
diff --git a/srcpkgs/polkit/template b/srcpkgs/polkit/template
index 84ab7453bb9b6..0435e1ce5976b 100644
--- a/srcpkgs/polkit/template
+++ b/srcpkgs/polkit/template
@@ -1,7 +1,7 @@
 # Template file for 'polkit'
 pkgname=polkit
 version=121
-revision=1
+revision=2
 build_style=meson
 build_helper=gir
 configure_args="$(vopt_bool gir introspection) -Dman=true

From c94dcf09cf114577d511649e208cf5ede4b55b15 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sun, 2 Jul 2023 22:04:40 -0400
Subject: [PATCH 2/5] pam-base: add turnstile pam

---
 srcpkgs/pam-base/files/system-login | 1 +
 srcpkgs/pam-base/template           | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/pam-base/files/system-login b/srcpkgs/pam-base/files/system-login
index 2275deba480d3..72c4638f07d3f 100644
--- a/srcpkgs/pam-base/files/system-login
+++ b/srcpkgs/pam-base/files/system-login
@@ -14,6 +14,7 @@ session    optional   pam_loginuid.so
 session    include    system-auth
 session    optional   pam_motd.so          motd=/etc/motd
 session    optional   pam_mail.so          dir=/var/mail standard quiet
+-session   optional   pam_turnstile.so
 -session   optional   pam_elogind.so
 -session   optional   pam_dumb_runtime_dir.so
 session    required   pam_env.so
diff --git a/srcpkgs/pam-base/template b/srcpkgs/pam-base/template
index 70dfab9fa9965..38bfa74cd8856 100644
--- a/srcpkgs/pam-base/template
+++ b/srcpkgs/pam-base/template
@@ -1,7 +1,7 @@
 # Template file for 'pam-base'
 pkgname=pam-base
 version=0.4
-revision=2
+revision=3
 short_desc="PAM base configuration files"
 maintainer="Érico Nogueira <ericonr@disroot.org>"
 license="Public Domain"

From 7ccc6a876a26cb8212ea7b25798b9b23abf72018 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 12 Sep 2023 18:54:27 -0400
Subject: [PATCH 3/5] gdm: patch pam files for turnstile

---
 srcpkgs/gdm/patches/pam-turnstile-elogind.patch | 17 +++++++++++++++++
 srcpkgs/gdm/template                            |  2 +-
 2 files changed, 18 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/gdm/patches/pam-turnstile-elogind.patch

diff --git a/srcpkgs/gdm/patches/pam-turnstile-elogind.patch b/srcpkgs/gdm/patches/pam-turnstile-elogind.patch
new file mode 100644
index 0000000000000..21df9c826eacb
--- /dev/null
+++ b/srcpkgs/gdm/patches/pam-turnstile-elogind.patch
@@ -0,0 +1,17 @@
+1. pam_systemd doesn't exist on void, use pam_elogind instead
+   (this may have been the cause of some issues with elogind
+   not starting for GNOME users?)
+2. pam_turnstile allows turnstile to integrate with gdm
+
+See also: https://github.com/chimera-linux/cports/blob/master/main/gdm/patches/pam.patch
+
+--- a/data/pam-arch/gdm-launch-environment.pam
++++ b/data/pam-arch/gdm-launch-environment.pam
+@@ -13,5 +13,6 @@
+ session    optional                    pam_keyinit.so       force revoke
+ session    required                    pam_succeed_if.so    audit quiet_success user in gdm:gnome-initial-setup
+ session    optional                    pam_permit.so
+--session   optional                    pam_systemd.so
++-session   optional                    pam_turnstile.so
++-session   optional                    pam_elogind.so
+ session    required                    pam_env.so
diff --git a/srcpkgs/gdm/template b/srcpkgs/gdm/template
index f8990839198a2..8de7e48792c11 100644
--- a/srcpkgs/gdm/template
+++ b/srcpkgs/gdm/template
@@ -1,7 +1,7 @@
 # Template file for 'gdm'
 pkgname=gdm
 version=44.1
-revision=2
+revision=3
 build_helper="gir"
 build_style=meson
 configure_args="

From 42263ea75165ab7d32c1abf67c09cb506c5216c1 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 12 Sep 2023 18:54:33 -0400
Subject: [PATCH 4/5] lightdm: patch pam files for turnstile

---
 .../patches/pam-turnstile-elogind.patch       | 32 +++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 srcpkgs/lightdm/patches/pam-turnstile-elogind.patch

diff --git a/srcpkgs/lightdm/patches/pam-turnstile-elogind.patch b/srcpkgs/lightdm/patches/pam-turnstile-elogind.patch
new file mode 100644
index 0000000000000..529531e294f94
--- /dev/null
+++ b/srcpkgs/lightdm/patches/pam-turnstile-elogind.patch
@@ -0,0 +1,32 @@
+1. pam_systemd doesn't exist on void, use pam_elogind instead
+2. pam_turnstile allows turnstile to integrate with lightdm
+
+See also: https://github.com/chimera-linux/cports/blob/master/main/gdm/patches/pam.patch
+
+--- a/data/pam/lightdm
++++ b/data/pam/lightdm
+@@ -17,4 +17,5 @@
+ 
+ # Setup session
+ session   required pam_unix.so
+-session   optional pam_systemd.so
++- session   optional pam_turnstile.so
++- session   optional pam_elogind.so
+--- a/data/pam/lightdm-autologin
++++ b/data/pam/lightdm-autologin
+@@ -19,4 +19,5 @@
+ 
+ # Setup session
+ session   required pam_unix.so
+-session   optional pam_systemd.so
++- session   optional pam_turnstile.so
++- session   optional pam_elogind.so
+--- a/data/pam/lightdm-greeter
++++ b/data/pam/lightdm-greeter
+@@ -14,4 +14,5 @@
+ 
+ # Setup session
+ session   required pam_unix.so
+-session   optional pam_systemd.so
++- session   optional pam_turnstile.so
++- session   optional pam_elogind.so

From 4c5143c71b57297f526c56cff8129a2a14cc31da Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Wed, 28 Jun 2023 05:10:55 -0400
Subject: [PATCH 5/5] New package: turnstile-0.1.8

---
 srcpkgs/turnstile/files/README.voidlinux |  50 +++++
 srcpkgs/turnstile/files/dbus.run         |  11 +
 srcpkgs/turnstile/files/turnstiled/run   |   4 +
 srcpkgs/turnstile/patches/runit.patch    | 256 +++++++++++++++++++++++
 srcpkgs/turnstile/template               |  24 +++
 5 files changed, 345 insertions(+)
 create mode 100644 srcpkgs/turnstile/files/README.voidlinux
 create mode 100755 srcpkgs/turnstile/files/dbus.run
 create mode 100644 srcpkgs/turnstile/files/turnstiled/run
 create mode 100644 srcpkgs/turnstile/patches/runit.patch
 create mode 100644 srcpkgs/turnstile/template

diff --git a/srcpkgs/turnstile/files/README.voidlinux b/srcpkgs/turnstile/files/README.voidlinux
new file mode 100644
index 0000000000000..32025131de7d6
--- /dev/null
+++ b/srcpkgs/turnstile/files/README.voidlinux
@@ -0,0 +1,50 @@
+# User Services
+
+User services can be placed in ~/.config/service/.
+
+To ensure that a subset of services are started before login can proceed,
+these services can be listed in ~/.config/service/turnstile-ready/conf, for
+example:
+
+	core_services="dbus foo"
+
+The turnstile-ready service is created by turnstile on first login.
+
+## Shared Environment for User Services
+
+To give user services access to important environment variables, chpst's
+envdir functionality can be used. See chpst(8) (-e flag) for more info.
+
+To make a service aware of these variables:
+
+	- exec foo
+	+ exec chpst -e "$TURNSTILE_ENV_DIR" foo
+
+Inside user services, the convenience variable "$TURNSTILE_ENV_DIR" can be used
+to refer to this directory.
+
+The helper script 'turnstile-update-runit-env' can be used to easily update
+variables in this shared envdir:
+
+	turnstile-update-runit-env DISPLAY XAUTHORITY FOO=bar BAZ=
+
+# D-Bus Session Bus
+
+If you want to manage dbus using a turnstile-managed runit user service:
+
+	mkdir ~/.config/service/dbus
+	ln -s /usr/share/examples/turnstile/dbus.run ~/.config/service/dbus/run
+
+# Elogind Replacement
+
+Turnstile is not (nor ever will be, according to the developer) a complete
+replacement for elogind, but it can replace several parts, including
+XDG_RUNTIME_DIR management.
+
+If using turnstile with elogind:
+- disable rundir management in /etc/turnstile/turnstiled.conf
+  (manage_rundir = no)
+
+If using turnstile without elogind:
+- install and enable seatd for seat management
+- install and enable acpid for lid switch/button handling
diff --git a/srcpkgs/turnstile/files/dbus.run b/srcpkgs/turnstile/files/dbus.run
new file mode 100755
index 0000000000000..dc7473e45fc52
--- /dev/null
+++ b/srcpkgs/turnstile/files/dbus.run
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+[ -r ./conf ] && . ./conf
+
+: "${DBUS_SESSION_BUS_ADDRESS:=unix:path=/run/user/$(id -u)/bus}"
+
+if [ -d "$TURNSTILE_ENV_DIR" ]; then
+	echo "$DBUS_SESSION_BUS_ADDRESS" > "$TURNSTILE_ENV_DIR"/DBUS_SESSION_BUS_ADDRESS
+fi
+
+exec chpst -e "$TURNSTILE_ENV_DIR" dbus-daemon --session --nofork --nopidfile --address="$DBUS_SESSION_BUS_ADDRESS" $OPTS
diff --git a/srcpkgs/turnstile/files/turnstiled/run b/srcpkgs/turnstile/files/turnstiled/run
new file mode 100644
index 0000000000000..aa5d624fda19a
--- /dev/null
+++ b/srcpkgs/turnstile/files/turnstiled/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+exec 2>&1
+exec turnstiled
diff --git a/srcpkgs/turnstile/patches/runit.patch b/srcpkgs/turnstile/patches/runit.patch
new file mode 100644
index 0000000000000..a8b5428c7b162
--- /dev/null
+++ b/srcpkgs/turnstile/patches/runit.patch
@@ -0,0 +1,256 @@
+From 5d13e06c4bcfd3e20ffe2d24b8ae589fa29bfe05 Mon Sep 17 00:00:00 2001
+From: classabbyamp <dev@placeviolette.net>
+Date: Wed, 28 Jun 2023 05:05:25 -0400
+Subject: [PATCH] add runit backend
+
+---
+ backend/meson.build                   | 25 ++++++++
+ backend/runit                         | 88 +++++++++++++++++++++++++++
+ backend/runit.conf                    | 16 +++++
+ backend/turnstile-update-runit-env.in | 31 ++++++++++
+ meson.build                           | 14 +++--
+ meson_options.txt                     | 10 +++
+ 6 files changed, 180 insertions(+), 4 deletions(-)
+ create mode 100644 backend/runit
+ create mode 100644 backend/runit.conf
+ create mode 100644 backend/turnstile-update-runit-env.in
+
+diff --git a/backend/meson.build b/backend/meson.build
+index 681e6a0..5a5b200 100644
+--- a/backend/meson.build
++++ b/backend/meson.build
+@@ -13,3 +13,28 @@ if have_dinit
+         install_mode: 'rw-r--r--'
+     )
+ endif
++
++# runit backend
++
++if have_runit
++    install_data(
++        'runit',
++        install_dir: join_paths(get_option('libexecdir'), 'turnstile'),
++        install_mode: 'rwxr-xr-x'
++    )
++
++    install_data(
++        'runit.conf',
++        install_dir: join_paths(get_option('sysconfdir'), 'turnstile/backend'),
++        install_mode: 'rw-r--r--'
++    )
++
++    configure_file(
++        input: 'turnstile-update-runit-env.in',
++        output: 'turnstile-update-runit-env',
++        configuration: conf_data,
++        install: true,
++        install_dir: get_option('bindir'),
++        install_mode: 'rwxr-xr-x'
++    )
++endif
+diff --git a/backend/runit b/backend/runit
+new file mode 100644
+index 0000000..a9d7454
+--- /dev/null
++++ b/backend/runit
+@@ -0,0 +1,88 @@
++#!/bin/sh
++#
++# This is the turnstile runit backend. It accepts the action as its first
++# argument, which is either "ready", "run", or "stop". In case of "run", it's
++# invoked directly through /bin/sh as if it was a login shell, and therefore
++# it has acccess to shell profile, and the shebang is functionally useless but
++# should be preserved as a convention. For "ready", it's a regular shell.
++#
++# Arguments for "ready":
++#
++# ready_sv: path to the readiness service
++#
++# Arguments for "run":
++#
++# ready_p:  readiness pipe (fifo). has the path to the ready service written to it.
++# srvdir:   unused
++# confdir:  the path where turnstile's configuration data resides, used
++#           to source the configuration file
++#
++# Arguments for "stop":
++#
++# pid:      the PID of the service manager to stop (gracefully); it should
++#           terminate the services it's running and then stop itself
++#
++# Copyright 2023 classabbyamp <dev@placeviolette.net>
++# License: BSD-2-Clause
++
++case "$1" in
++    run) ;;
++    ready)
++        if [ -z "$2" ] || [ ! -d "$2" ]; then
++            echo "runit: invalid readiness service '$2'" >&2
++            exit 69
++        fi
++        exec sv start "$2" >&2
++        ;;
++    stop)
++        # If runsvdir receives a HUP signal, it sends a TERM signal to each
++        # runsv(8) process it is monitoring and then exits with 111.
++        exec kill -s HUP "$2"
++        ;;
++    *)
++        exit 32
++        ;;
++esac
++
++RUNIT_READY_PIPE="$2"
++RUNIT_CONF="$4/runit.conf"
++
++if [ ! -p "$RUNIT_READY_PIPE" ]; then
++    echo "runit: invalid input argument(s)" >&2
++    exit 69
++fi
++
++if [ -z "$HOME" ] || [ ! -d "$HOME" ]; then
++    echo "runit: invalid home directory" >&2
++    exit 70
++fi
++
++shift $#
++
++# be strict
++set -e
++
++# source the conf
++[ -r "$RUNIT_CONF" ] && . "$RUNIT_CONF"
++
++# set some defaults in case the conf cannot be read or is mangled
++: "${ready_sv:="turnstile-ready"}"
++: "${services_dir:="${HOME}/.config/service"}"
++: "${service_env_dir:="${HOME}/.config/service-env"}"
++
++mkdir -p "${services_dir}/${ready_sv}" > /dev/null 2>&1
++mkdir -p "${service_env_dir}" > /dev/null 2>&1
++
++# this must succeed
++cat << EOF > "${services_dir}/${ready_sv}/run"
++#!/bin/sh
++[ -r ./conf ] && . ./conf
++[ -n "\$core_services" ] && SVDIR=".." sv start \$core_services
++[ -p "$RUNIT_READY_PIPE" ] && printf "${services_dir}/${ready_sv}" > "$RUNIT_READY_PIPE"
++exec pause
++EOF
++chmod +x "${services_dir}/${ready_sv}/run"
++
++exec env TURNSTILE_ENV_DIR="$service_env_dir" \
++    runsvdir -P "$services_dir" \
++    'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+diff --git a/backend/runit.conf b/backend/runit.conf
+new file mode 100644
+index 0000000..88a2d04
+--- /dev/null
++++ b/backend/runit.conf
+@@ -0,0 +1,16 @@
++# This is the configuration file for turnstile's runit backend.
++#
++# It follows the POSIX shell syntax (being sourced into a script).
++# The complete launch environment available to dinit can be used.
++#
++# It is a low-level configuration file. In most cases, it should
++# not be modified by the user.
++
++# the name of the service that turnstile will check for login readiness
++ready_sv="turnstile-ready"
++
++# the directory user service files are read from.
++services_dir="${HOME}/.config/service"
++
++# the environment variable directory user service files can read from.
++service_env_dir="${HOME}/.config/service-env"
+diff --git a/backend/turnstile-update-runit-env.in b/backend/turnstile-update-runit-env.in
+new file mode 100644
+index 0000000..9999459
+--- /dev/null
++++ b/backend/turnstile-update-runit-env.in
+@@ -0,0 +1,31 @@
++#!/bin/sh
++# Copyright 2023 classabbyamp <dev@placeviolette.net>
++# License: BSD-2-Clause
++
++usage() {
++	cat <<-EOF
++	turnstile-update-runit-env [VAR] ...
++	Updates values in the shared chpst(8) env dir.
++	
++	If VAR is a variable name, the value is taken from the environment.
++	If VAR is VAR=VAL, sets VAR to VAL.
++	EOF
++}
++
++. @CONF_PATH@/backend/runit.conf
++
++if [ $# -eq 0 ] || [ "$1" = "-h" ]; then
++	usage
++	exit 0
++fi
++
++for var; do
++	case "$var" in
++	*=*)
++		eval echo "${var#*=}" > "$service_env_dir/${var%%=*}"
++		;;
++	*)
++		eval echo '$'"$var" > "$service_env_dir/$var"
++		;;
++	esac
++done
+diff --git a/meson.build b/meson.build
+index 5f2e6f8..87f9d3b 100644
+--- a/meson.build
++++ b/meson.build
+@@ -22,6 +22,7 @@ scdoc_dep = dependency(
+ )
+ 
+ have_dinit = get_option('dinit').enabled()
++have_runit = get_option('runit').enabled()
+ 
+ conf_data = configuration_data()
+ conf_data.set_quoted('RUN_PATH', get_option('rundir'))
+@@ -101,10 +102,15 @@ install_data(
+ )
+ 
+ # decide the default backend
+-if have_dinit
+-    default_backend = 'dinit'
+-else
+-    default_backend = 'none'
++default_backend = get_option('default_backend')
++if default_backend == ''
++    if have_dinit
++        default_backend = 'dinit'
++    elif have_runit
++        default_backend = 'runit'
++    else
++        default_backend = 'none'
++    endif
+ endif
+ 
+ uconf_data = configuration_data()
+diff --git a/meson_options.txt b/meson_options.txt
+index 9b03995..4325042 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -3,6 +3,16 @@ option('dinit',
+     description: 'Whether to install Dinit-related backend and data'
+ )
+ 
++option('runit',
++    type: 'feature', value: 'disabled',
++    description: 'Whether to install runit-related backend and data'
++)
++
++option('default_backend',
++    type: 'string', value: '',
++    description: 'Override the default backend'
++)
++
+ option('rundir',
+     type: 'string', value: '/run',
+     description: 'Where the base directory will be located'
diff --git a/srcpkgs/turnstile/template b/srcpkgs/turnstile/template
new file mode 100644
index 0000000000000..9916832364699
--- /dev/null
+++ b/srcpkgs/turnstile/template
@@ -0,0 +1,24 @@
+# Template file for 'turnstile'
+pkgname=turnstile
+version=0.1.8
+revision=1
+build_style=meson
+configure_args="-Ddinit=disabled -Drunit=enabled -Ddefault_backend=runit
+ -Dmanage_rundir=true"
+hostmakedepends="pkg-config scdoc"
+makedepends="pam-devel"
+short_desc="Independent session/login tracker and user service manager"
+maintainer="classabbyamp <void@placeviolette.net>"
+license="BSD-2-Clause"
+homepage="https://github.com/chimera-linux/turnstile"
+distfiles="https://github.com/chimera-linux/turnstile/archive/refs/tags/v${version}.tar.gz"
+checksum=7eaab8c80c76ae9a9a711d7dc57ec346b9af09be99b526a5a3129a7fc9bd7a76
+conf_files="/etc/turnstile/turnstiled.conf"
+
+post_install() {
+	vsv turnstiled
+	vsconf "${FILESDIR}/dbus.run"
+	chmod +x "${DESTDIR}/usr/share/examples/turnstile/dbus.run"
+	vdoc "${FILESDIR}/README.voidlinux"
+	vlicense COPYING.md
+}

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PR PATCH] [Updated] New package: turnstile-0.1.8
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (45 preceding siblings ...)
  2023-12-26 17:52 ` [PR PATCH] [Updated] " classabbyamp
@ 2023-12-26 17:54 ` classabbyamp
  2023-12-26 19:05 ` dkwo
                   ` (6 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: classabbyamp @ 2023-12-26 17:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 741 bytes --]

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages new/turnstile
https://github.com/void-linux/void-packages/pull/44676

New package: turnstile-0.1.8
WIP while i create the runit backend upstream ([mostly done](https://github.com/chimera-linux/turnstile/compare/master...classabbyamp:runit-backend))

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**



A patch file from https://github.com/void-linux/void-packages/pull/44676.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-new/turnstile-44676.patch --]
[-- Type: text/x-diff, Size: 21200 bytes --]

From a307e25a6f471d7fef0b5849b1252220d1efced7 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 11 Jul 2023 22:02:49 -0400
Subject: [PATCH 1/5] polkit: patch to support turnstile

---
 srcpkgs/polkit/patches/turnstile.patch | 57 ++++++++++++++++++++++++++
 srcpkgs/polkit/template                |  2 +-
 2 files changed, 58 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/polkit/patches/turnstile.patch

diff --git a/srcpkgs/polkit/patches/turnstile.patch b/srcpkgs/polkit/patches/turnstile.patch
new file mode 100644
index 0000000000000..4f56ed130eefd
--- /dev/null
+++ b/srcpkgs/polkit/patches/turnstile.patch
@@ -0,0 +1,57 @@
+commit 8d98aa421b92765695af13c033cf7e80375c03fe
+Author: q66 <q66@chimera-linux.org>
+Date:   Sun Jul 2 15:44:51 2023 +0200
+
+    ensure turnstile-session processes fall back to display check
+    
+    As turnstile session is shared between sessions, let us fall back
+    to the check for whether a graphical session is in place. We need
+    this as our dbus session bus is managed through turnstile. In
+    systemd-using systems there is no problem because user units are
+    not a part of any explicit session (we don't get this luxury
+    because using a session is the only way to make sure our pid is
+    tracked in systemd at all; we need that to be able to resolve
+    PID to UID).
+
+diff --git a/src/polkitbackend/polkitbackendsessionmonitor-systemd.c b/src/polkitbackend/polkitbackendsessionmonitor-systemd.c
+index b00cdbd..9a3f3c3 100644
+--- a/src/polkitbackend/polkitbackendsessionmonitor-systemd.c
++++ b/src/polkitbackend/polkitbackendsessionmonitor-systemd.c
+@@ -346,7 +346,7 @@ polkit_backend_session_monitor_get_session_for_subject (PolkitBackendSessionMoni
+   PolkitUnixProcess *tmp_process = NULL;
+   PolkitUnixProcess *process = NULL;
+   PolkitSubject *session = NULL;
+-  char *session_id = NULL;
++  char *session_id = NULL, *service_id = NULL;
+   pid_t pid;
+ #if HAVE_SD_UID_GET_DISPLAY
+   uid_t uid;
+@@ -377,8 +377,26 @@ polkit_backend_session_monitor_get_session_for_subject (PolkitBackendSessionMoni
+ 
+   if (sd_pid_get_session (pid, &session_id) >= 0)
+     {
+-      session = polkit_unix_session_new (session_id);
+-      goto out;
++      /* if belonging to turnstile, ignore */
++      if (sd_session_get_service (session_id, &service_id) >= 0)
++        {
++          if (strcmp (service_id, "turnstiled"))
++            {
++              free (service_id);
++              session = polkit_unix_session_new (session_id);
++              goto out;
++            }
++          else
++            {
++              /* turnstile-managed processes are shared */
++              free(service_id);
++            }
++        }
++      else
++        {
++          session = polkit_unix_session_new (session_id);
++          goto out;
++        }
+     }
+ 
+ #if HAVE_SD_UID_GET_DISPLAY
diff --git a/srcpkgs/polkit/template b/srcpkgs/polkit/template
index 84ab7453bb9b6..0435e1ce5976b 100644
--- a/srcpkgs/polkit/template
+++ b/srcpkgs/polkit/template
@@ -1,7 +1,7 @@
 # Template file for 'polkit'
 pkgname=polkit
 version=121
-revision=1
+revision=2
 build_style=meson
 build_helper=gir
 configure_args="$(vopt_bool gir introspection) -Dman=true

From c94dcf09cf114577d511649e208cf5ede4b55b15 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sun, 2 Jul 2023 22:04:40 -0400
Subject: [PATCH 2/5] pam-base: add turnstile pam

---
 srcpkgs/pam-base/files/system-login | 1 +
 srcpkgs/pam-base/template           | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/pam-base/files/system-login b/srcpkgs/pam-base/files/system-login
index 2275deba480d3..72c4638f07d3f 100644
--- a/srcpkgs/pam-base/files/system-login
+++ b/srcpkgs/pam-base/files/system-login
@@ -14,6 +14,7 @@ session    optional   pam_loginuid.so
 session    include    system-auth
 session    optional   pam_motd.so          motd=/etc/motd
 session    optional   pam_mail.so          dir=/var/mail standard quiet
+-session   optional   pam_turnstile.so
 -session   optional   pam_elogind.so
 -session   optional   pam_dumb_runtime_dir.so
 session    required   pam_env.so
diff --git a/srcpkgs/pam-base/template b/srcpkgs/pam-base/template
index 70dfab9fa9965..38bfa74cd8856 100644
--- a/srcpkgs/pam-base/template
+++ b/srcpkgs/pam-base/template
@@ -1,7 +1,7 @@
 # Template file for 'pam-base'
 pkgname=pam-base
 version=0.4
-revision=2
+revision=3
 short_desc="PAM base configuration files"
 maintainer="Érico Nogueira <ericonr@disroot.org>"
 license="Public Domain"

From 7ccc6a876a26cb8212ea7b25798b9b23abf72018 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 12 Sep 2023 18:54:27 -0400
Subject: [PATCH 3/5] gdm: patch pam files for turnstile

---
 srcpkgs/gdm/patches/pam-turnstile-elogind.patch | 17 +++++++++++++++++
 srcpkgs/gdm/template                            |  2 +-
 2 files changed, 18 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/gdm/patches/pam-turnstile-elogind.patch

diff --git a/srcpkgs/gdm/patches/pam-turnstile-elogind.patch b/srcpkgs/gdm/patches/pam-turnstile-elogind.patch
new file mode 100644
index 0000000000000..21df9c826eacb
--- /dev/null
+++ b/srcpkgs/gdm/patches/pam-turnstile-elogind.patch
@@ -0,0 +1,17 @@
+1. pam_systemd doesn't exist on void, use pam_elogind instead
+   (this may have been the cause of some issues with elogind
+   not starting for GNOME users?)
+2. pam_turnstile allows turnstile to integrate with gdm
+
+See also: https://github.com/chimera-linux/cports/blob/master/main/gdm/patches/pam.patch
+
+--- a/data/pam-arch/gdm-launch-environment.pam
++++ b/data/pam-arch/gdm-launch-environment.pam
+@@ -13,5 +13,6 @@
+ session    optional                    pam_keyinit.so       force revoke
+ session    required                    pam_succeed_if.so    audit quiet_success user in gdm:gnome-initial-setup
+ session    optional                    pam_permit.so
+--session   optional                    pam_systemd.so
++-session   optional                    pam_turnstile.so
++-session   optional                    pam_elogind.so
+ session    required                    pam_env.so
diff --git a/srcpkgs/gdm/template b/srcpkgs/gdm/template
index f8990839198a2..8de7e48792c11 100644
--- a/srcpkgs/gdm/template
+++ b/srcpkgs/gdm/template
@@ -1,7 +1,7 @@
 # Template file for 'gdm'
 pkgname=gdm
 version=44.1
-revision=2
+revision=3
 build_helper="gir"
 build_style=meson
 configure_args="

From 0be6a60498ac59a24079b100fa2f645403c6efab Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 12 Sep 2023 18:54:33 -0400
Subject: [PATCH 4/5] lightdm: patch pam files for turnstile

---
 .../patches/pam-turnstile-elogind.patch       | 32 +++++++++++++++++++
 srcpkgs/lightdm/template                      |  2 +-
 2 files changed, 33 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/lightdm/patches/pam-turnstile-elogind.patch

diff --git a/srcpkgs/lightdm/patches/pam-turnstile-elogind.patch b/srcpkgs/lightdm/patches/pam-turnstile-elogind.patch
new file mode 100644
index 0000000000000..529531e294f94
--- /dev/null
+++ b/srcpkgs/lightdm/patches/pam-turnstile-elogind.patch
@@ -0,0 +1,32 @@
+1. pam_systemd doesn't exist on void, use pam_elogind instead
+2. pam_turnstile allows turnstile to integrate with lightdm
+
+See also: https://github.com/chimera-linux/cports/blob/master/main/gdm/patches/pam.patch
+
+--- a/data/pam/lightdm
++++ b/data/pam/lightdm
+@@ -17,4 +17,5 @@
+ 
+ # Setup session
+ session   required pam_unix.so
+-session   optional pam_systemd.so
++- session   optional pam_turnstile.so
++- session   optional pam_elogind.so
+--- a/data/pam/lightdm-autologin
++++ b/data/pam/lightdm-autologin
+@@ -19,4 +19,5 @@
+ 
+ # Setup session
+ session   required pam_unix.so
+-session   optional pam_systemd.so
++- session   optional pam_turnstile.so
++- session   optional pam_elogind.so
+--- a/data/pam/lightdm-greeter
++++ b/data/pam/lightdm-greeter
+@@ -14,4 +14,5 @@
+ 
+ # Setup session
+ session   required pam_unix.so
+-session   optional pam_systemd.so
++- session   optional pam_turnstile.so
++- session   optional pam_elogind.so
diff --git a/srcpkgs/lightdm/template b/srcpkgs/lightdm/template
index 05efc5855c423..5db0395f02a26 100644
--- a/srcpkgs/lightdm/template
+++ b/srcpkgs/lightdm/template
@@ -1,7 +1,7 @@
 # Template file for 'lightdm'
 pkgname=lightdm
 version=1.32.0
-revision=5
+revision=6
 build_style=gnu-configure
 build_helper="gir"
 configure_args="--sbindir=/usr/bin --with-greeter-session=lightdm-gtk-greeter

From c33cd894d8c3cadc17565f545c49d197870fffdf Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Wed, 28 Jun 2023 05:10:55 -0400
Subject: [PATCH 5/5] New package: turnstile-0.1.8

---
 srcpkgs/turnstile/files/README.voidlinux |  50 +++++
 srcpkgs/turnstile/files/dbus.run         |  11 +
 srcpkgs/turnstile/files/turnstiled/run   |   4 +
 srcpkgs/turnstile/patches/runit.patch    | 256 +++++++++++++++++++++++
 srcpkgs/turnstile/template               |  24 +++
 5 files changed, 345 insertions(+)
 create mode 100644 srcpkgs/turnstile/files/README.voidlinux
 create mode 100755 srcpkgs/turnstile/files/dbus.run
 create mode 100644 srcpkgs/turnstile/files/turnstiled/run
 create mode 100644 srcpkgs/turnstile/patches/runit.patch
 create mode 100644 srcpkgs/turnstile/template

diff --git a/srcpkgs/turnstile/files/README.voidlinux b/srcpkgs/turnstile/files/README.voidlinux
new file mode 100644
index 0000000000000..32025131de7d6
--- /dev/null
+++ b/srcpkgs/turnstile/files/README.voidlinux
@@ -0,0 +1,50 @@
+# User Services
+
+User services can be placed in ~/.config/service/.
+
+To ensure that a subset of services are started before login can proceed,
+these services can be listed in ~/.config/service/turnstile-ready/conf, for
+example:
+
+	core_services="dbus foo"
+
+The turnstile-ready service is created by turnstile on first login.
+
+## Shared Environment for User Services
+
+To give user services access to important environment variables, chpst's
+envdir functionality can be used. See chpst(8) (-e flag) for more info.
+
+To make a service aware of these variables:
+
+	- exec foo
+	+ exec chpst -e "$TURNSTILE_ENV_DIR" foo
+
+Inside user services, the convenience variable "$TURNSTILE_ENV_DIR" can be used
+to refer to this directory.
+
+The helper script 'turnstile-update-runit-env' can be used to easily update
+variables in this shared envdir:
+
+	turnstile-update-runit-env DISPLAY XAUTHORITY FOO=bar BAZ=
+
+# D-Bus Session Bus
+
+If you want to manage dbus using a turnstile-managed runit user service:
+
+	mkdir ~/.config/service/dbus
+	ln -s /usr/share/examples/turnstile/dbus.run ~/.config/service/dbus/run
+
+# Elogind Replacement
+
+Turnstile is not (nor ever will be, according to the developer) a complete
+replacement for elogind, but it can replace several parts, including
+XDG_RUNTIME_DIR management.
+
+If using turnstile with elogind:
+- disable rundir management in /etc/turnstile/turnstiled.conf
+  (manage_rundir = no)
+
+If using turnstile without elogind:
+- install and enable seatd for seat management
+- install and enable acpid for lid switch/button handling
diff --git a/srcpkgs/turnstile/files/dbus.run b/srcpkgs/turnstile/files/dbus.run
new file mode 100755
index 0000000000000..dc7473e45fc52
--- /dev/null
+++ b/srcpkgs/turnstile/files/dbus.run
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+[ -r ./conf ] && . ./conf
+
+: "${DBUS_SESSION_BUS_ADDRESS:=unix:path=/run/user/$(id -u)/bus}"
+
+if [ -d "$TURNSTILE_ENV_DIR" ]; then
+	echo "$DBUS_SESSION_BUS_ADDRESS" > "$TURNSTILE_ENV_DIR"/DBUS_SESSION_BUS_ADDRESS
+fi
+
+exec chpst -e "$TURNSTILE_ENV_DIR" dbus-daemon --session --nofork --nopidfile --address="$DBUS_SESSION_BUS_ADDRESS" $OPTS
diff --git a/srcpkgs/turnstile/files/turnstiled/run b/srcpkgs/turnstile/files/turnstiled/run
new file mode 100644
index 0000000000000..aa5d624fda19a
--- /dev/null
+++ b/srcpkgs/turnstile/files/turnstiled/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+exec 2>&1
+exec turnstiled
diff --git a/srcpkgs/turnstile/patches/runit.patch b/srcpkgs/turnstile/patches/runit.patch
new file mode 100644
index 0000000000000..a8b5428c7b162
--- /dev/null
+++ b/srcpkgs/turnstile/patches/runit.patch
@@ -0,0 +1,256 @@
+From 5d13e06c4bcfd3e20ffe2d24b8ae589fa29bfe05 Mon Sep 17 00:00:00 2001
+From: classabbyamp <dev@placeviolette.net>
+Date: Wed, 28 Jun 2023 05:05:25 -0400
+Subject: [PATCH] add runit backend
+
+---
+ backend/meson.build                   | 25 ++++++++
+ backend/runit                         | 88 +++++++++++++++++++++++++++
+ backend/runit.conf                    | 16 +++++
+ backend/turnstile-update-runit-env.in | 31 ++++++++++
+ meson.build                           | 14 +++--
+ meson_options.txt                     | 10 +++
+ 6 files changed, 180 insertions(+), 4 deletions(-)
+ create mode 100644 backend/runit
+ create mode 100644 backend/runit.conf
+ create mode 100644 backend/turnstile-update-runit-env.in
+
+diff --git a/backend/meson.build b/backend/meson.build
+index 681e6a0..5a5b200 100644
+--- a/backend/meson.build
++++ b/backend/meson.build
+@@ -13,3 +13,28 @@ if have_dinit
+         install_mode: 'rw-r--r--'
+     )
+ endif
++
++# runit backend
++
++if have_runit
++    install_data(
++        'runit',
++        install_dir: join_paths(get_option('libexecdir'), 'turnstile'),
++        install_mode: 'rwxr-xr-x'
++    )
++
++    install_data(
++        'runit.conf',
++        install_dir: join_paths(get_option('sysconfdir'), 'turnstile/backend'),
++        install_mode: 'rw-r--r--'
++    )
++
++    configure_file(
++        input: 'turnstile-update-runit-env.in',
++        output: 'turnstile-update-runit-env',
++        configuration: conf_data,
++        install: true,
++        install_dir: get_option('bindir'),
++        install_mode: 'rwxr-xr-x'
++    )
++endif
+diff --git a/backend/runit b/backend/runit
+new file mode 100644
+index 0000000..a9d7454
+--- /dev/null
++++ b/backend/runit
+@@ -0,0 +1,88 @@
++#!/bin/sh
++#
++# This is the turnstile runit backend. It accepts the action as its first
++# argument, which is either "ready", "run", or "stop". In case of "run", it's
++# invoked directly through /bin/sh as if it was a login shell, and therefore
++# it has acccess to shell profile, and the shebang is functionally useless but
++# should be preserved as a convention. For "ready", it's a regular shell.
++#
++# Arguments for "ready":
++#
++# ready_sv: path to the readiness service
++#
++# Arguments for "run":
++#
++# ready_p:  readiness pipe (fifo). has the path to the ready service written to it.
++# srvdir:   unused
++# confdir:  the path where turnstile's configuration data resides, used
++#           to source the configuration file
++#
++# Arguments for "stop":
++#
++# pid:      the PID of the service manager to stop (gracefully); it should
++#           terminate the services it's running and then stop itself
++#
++# Copyright 2023 classabbyamp <dev@placeviolette.net>
++# License: BSD-2-Clause
++
++case "$1" in
++    run) ;;
++    ready)
++        if [ -z "$2" ] || [ ! -d "$2" ]; then
++            echo "runit: invalid readiness service '$2'" >&2
++            exit 69
++        fi
++        exec sv start "$2" >&2
++        ;;
++    stop)
++        # If runsvdir receives a HUP signal, it sends a TERM signal to each
++        # runsv(8) process it is monitoring and then exits with 111.
++        exec kill -s HUP "$2"
++        ;;
++    *)
++        exit 32
++        ;;
++esac
++
++RUNIT_READY_PIPE="$2"
++RUNIT_CONF="$4/runit.conf"
++
++if [ ! -p "$RUNIT_READY_PIPE" ]; then
++    echo "runit: invalid input argument(s)" >&2
++    exit 69
++fi
++
++if [ -z "$HOME" ] || [ ! -d "$HOME" ]; then
++    echo "runit: invalid home directory" >&2
++    exit 70
++fi
++
++shift $#
++
++# be strict
++set -e
++
++# source the conf
++[ -r "$RUNIT_CONF" ] && . "$RUNIT_CONF"
++
++# set some defaults in case the conf cannot be read or is mangled
++: "${ready_sv:="turnstile-ready"}"
++: "${services_dir:="${HOME}/.config/service"}"
++: "${service_env_dir:="${HOME}/.config/service-env"}"
++
++mkdir -p "${services_dir}/${ready_sv}" > /dev/null 2>&1
++mkdir -p "${service_env_dir}" > /dev/null 2>&1
++
++# this must succeed
++cat << EOF > "${services_dir}/${ready_sv}/run"
++#!/bin/sh
++[ -r ./conf ] && . ./conf
++[ -n "\$core_services" ] && SVDIR=".." sv start \$core_services
++[ -p "$RUNIT_READY_PIPE" ] && printf "${services_dir}/${ready_sv}" > "$RUNIT_READY_PIPE"
++exec pause
++EOF
++chmod +x "${services_dir}/${ready_sv}/run"
++
++exec env TURNSTILE_ENV_DIR="$service_env_dir" \
++    runsvdir -P "$services_dir" \
++    'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+diff --git a/backend/runit.conf b/backend/runit.conf
+new file mode 100644
+index 0000000..88a2d04
+--- /dev/null
++++ b/backend/runit.conf
+@@ -0,0 +1,16 @@
++# This is the configuration file for turnstile's runit backend.
++#
++# It follows the POSIX shell syntax (being sourced into a script).
++# The complete launch environment available to dinit can be used.
++#
++# It is a low-level configuration file. In most cases, it should
++# not be modified by the user.
++
++# the name of the service that turnstile will check for login readiness
++ready_sv="turnstile-ready"
++
++# the directory user service files are read from.
++services_dir="${HOME}/.config/service"
++
++# the environment variable directory user service files can read from.
++service_env_dir="${HOME}/.config/service-env"
+diff --git a/backend/turnstile-update-runit-env.in b/backend/turnstile-update-runit-env.in
+new file mode 100644
+index 0000000..9999459
+--- /dev/null
++++ b/backend/turnstile-update-runit-env.in
+@@ -0,0 +1,31 @@
++#!/bin/sh
++# Copyright 2023 classabbyamp <dev@placeviolette.net>
++# License: BSD-2-Clause
++
++usage() {
++	cat <<-EOF
++	turnstile-update-runit-env [VAR] ...
++	Updates values in the shared chpst(8) env dir.
++	
++	If VAR is a variable name, the value is taken from the environment.
++	If VAR is VAR=VAL, sets VAR to VAL.
++	EOF
++}
++
++. @CONF_PATH@/backend/runit.conf
++
++if [ $# -eq 0 ] || [ "$1" = "-h" ]; then
++	usage
++	exit 0
++fi
++
++for var; do
++	case "$var" in
++	*=*)
++		eval echo "${var#*=}" > "$service_env_dir/${var%%=*}"
++		;;
++	*)
++		eval echo '$'"$var" > "$service_env_dir/$var"
++		;;
++	esac
++done
+diff --git a/meson.build b/meson.build
+index 5f2e6f8..87f9d3b 100644
+--- a/meson.build
++++ b/meson.build
+@@ -22,6 +22,7 @@ scdoc_dep = dependency(
+ )
+ 
+ have_dinit = get_option('dinit').enabled()
++have_runit = get_option('runit').enabled()
+ 
+ conf_data = configuration_data()
+ conf_data.set_quoted('RUN_PATH', get_option('rundir'))
+@@ -101,10 +102,15 @@ install_data(
+ )
+ 
+ # decide the default backend
+-if have_dinit
+-    default_backend = 'dinit'
+-else
+-    default_backend = 'none'
++default_backend = get_option('default_backend')
++if default_backend == ''
++    if have_dinit
++        default_backend = 'dinit'
++    elif have_runit
++        default_backend = 'runit'
++    else
++        default_backend = 'none'
++    endif
+ endif
+ 
+ uconf_data = configuration_data()
+diff --git a/meson_options.txt b/meson_options.txt
+index 9b03995..4325042 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -3,6 +3,16 @@ option('dinit',
+     description: 'Whether to install Dinit-related backend and data'
+ )
+ 
++option('runit',
++    type: 'feature', value: 'disabled',
++    description: 'Whether to install runit-related backend and data'
++)
++
++option('default_backend',
++    type: 'string', value: '',
++    description: 'Override the default backend'
++)
++
+ option('rundir',
+     type: 'string', value: '/run',
+     description: 'Where the base directory will be located'
diff --git a/srcpkgs/turnstile/template b/srcpkgs/turnstile/template
new file mode 100644
index 0000000000000..9916832364699
--- /dev/null
+++ b/srcpkgs/turnstile/template
@@ -0,0 +1,24 @@
+# Template file for 'turnstile'
+pkgname=turnstile
+version=0.1.8
+revision=1
+build_style=meson
+configure_args="-Ddinit=disabled -Drunit=enabled -Ddefault_backend=runit
+ -Dmanage_rundir=true"
+hostmakedepends="pkg-config scdoc"
+makedepends="pam-devel"
+short_desc="Independent session/login tracker and user service manager"
+maintainer="classabbyamp <void@placeviolette.net>"
+license="BSD-2-Clause"
+homepage="https://github.com/chimera-linux/turnstile"
+distfiles="https://github.com/chimera-linux/turnstile/archive/refs/tags/v${version}.tar.gz"
+checksum=7eaab8c80c76ae9a9a711d7dc57ec346b9af09be99b526a5a3129a7fc9bd7a76
+conf_files="/etc/turnstile/turnstiled.conf"
+
+post_install() {
+	vsv turnstiled
+	vsconf "${FILESDIR}/dbus.run"
+	chmod +x "${DESTDIR}/usr/share/examples/turnstile/dbus.run"
+	vdoc "${FILESDIR}/README.voidlinux"
+	vlicense COPYING.md
+}

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: New package: turnstile-0.1.8
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (46 preceding siblings ...)
  2023-12-26 17:54 ` classabbyamp
@ 2023-12-26 19:05 ` dkwo
  2023-12-26 19:24 ` classabbyamp
                   ` (5 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: dkwo @ 2023-12-26 19:05 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 205 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/44676#issuecomment-1869722959

Comment:
any chance this can be merged, or at least the change to pam-base?

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: New package: turnstile-0.1.8
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (47 preceding siblings ...)
  2023-12-26 19:05 ` dkwo
@ 2023-12-26 19:24 ` classabbyamp
  2024-01-16 19:42 ` dkwo
                   ` (4 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: classabbyamp @ 2023-12-26 19:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 283 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/44676#issuecomment-1869731339

Comment:
waiting on q66 to merge the runit backend, I don't want to deal with some kind of bad update later if he wants changes with it in the PR

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: New package: turnstile-0.1.8
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (48 preceding siblings ...)
  2023-12-26 19:24 ` classabbyamp
@ 2024-01-16 19:42 ` dkwo
  2024-01-16 20:08 ` classabbyamp
                   ` (3 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: dkwo @ 2024-01-16 19:42 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 415 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/44676#issuecomment-1894399522

Comment:
i understand you'd want to wait for turnstile itself, but why not merge at least the pam-base change?
or even gdm, lightdm, polkit, if the absence of turnstile does not create any issue for them.
this would allow to not rebase this pr at every change of pam, libcrypto, etc.

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: New package: turnstile-0.1.8
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (49 preceding siblings ...)
  2024-01-16 19:42 ` dkwo
@ 2024-01-16 20:08 ` classabbyamp
  2024-03-22 20:31 ` [PR PATCH] [Updated] " classabbyamp
                   ` (2 subsequent siblings)
  53 siblings, 0 replies; 55+ messages in thread
From: classabbyamp @ 2024-01-16 20:08 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 81637 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/44676#issuecomment-1736227580

Comment:
I did build pam from this branch, and notice this does not happen with login/agetty.
With greetd, svlogtail daemon gives

<details><summary>log</summary>

```
2023-09-26T20:07:42.18982 daemon.notice: Sep 26 16:07:42 seatd: 00:05:44.628 [INFO] [seatd/server.c:145] New client connected (pid: 3468, uid: 1000, gid: 1000)
2023-09-26T20:07:42.18987 daemon.notice: Sep 26 16:07:42 seatd: 00:05:44.628 [INFO] [seatd/seat.c:170] Added client 1 to seat0
2023-09-26T20:07:42.18989 daemon.notice: Sep 26 16:07:42 seatd: 00:05:44.628 [INFO] [seatd/seat.c:480] Opened client 1 on seat0
2023-09-26T20:08:09.42831 daemon.notice: Sep 26 16:08:09 seatd: 00:06:11.866 [INFO] [seatd/seat.c:418] No clients on seat0 to activate
2023-09-26T20:08:09.49072 daemon.notice: Sep 26 16:08:09 seatd: 00:06:11.929 [INFO] [seatd/seat.c:524] Closed client 1 on seat0
2023-09-26T20:08:09.49087 daemon.notice: Sep 26 16:08:09 seatd: 00:06:11.929 [INFO] [seatd/seat.c:192] Removed client 1 from seat0
2023-09-26T20:08:09.49098 daemon.notice: Sep 26 16:08:09 seatd: 00:06:11.929 [INFO] [seatd/client.c:471] Client disconnected
2023-09-26T20:08:09.52550 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.52556 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.52559 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.52563 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.52569 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.52572 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.52577 daemon.debug: Sep 26 16:08:09 turnstiled: conn: accepted 13 for 8
2023-09-26T20:08:09.52580 daemon.notice: Sep 26 16:08:09 turnstiled: conn: accepted 13 for 8
2023-09-26T20:08:09.52583 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.52585 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.52587 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.52589 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.52591 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.52595 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.52598 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.52601 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.52604 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.52606 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.52609 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.52612 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.52618 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.52621 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.52623 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.52626 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.52629 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.52631 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.52634 daemon.debug: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.52637 daemon.notice: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.52639 daemon.debug: Sep 26 16:08:09 turnstiled: msg: no session for 13
2023-09-26T20:08:09.52642 daemon.notice: Sep 26 16:08:09 turnstiled: msg: no session for 13
2023-09-26T20:08:09.52645 daemon.debug: Sep 26 16:08:09 turnstiled: msg: welcome 991
2023-09-26T20:08:09.52649 daemon.notice: Sep 26 16:08:09 turnstiled: msg: welcome 991
2023-09-26T20:08:09.52651 daemon.debug: Sep 26 16:08:09 turnstiled: msg: repopulate login 991
2023-09-26T20:08:09.52654 daemon.notice: Sep 26 16:08:09 turnstiled: msg: repopulate login 991
2023-09-26T20:08:09.52657 daemon.notice: Sep 26 16:08:09 turnstiled: msg: new session for 991/13
2023-09-26T20:08:09.52660 daemon.debug: Sep 26 16:08:09 turnstiled: msg: new session for 991/13
2023-09-26T20:08:09.52666 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.52668 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.52671 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.52674 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.52677 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.52681 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.52683 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.52686 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.52689 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.52691 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.52694 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.52697 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.52701 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.52703 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.52706 daemon.debug: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.52709 daemon.notice: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.52715 daemon.debug: Sep 26 16:08:09 turnstiled: msg: get session vtnr
2023-09-26T20:08:09.52717 daemon.notice: Sep 26 16:08:09 turnstiled: msg: get session vtnr
2023-09-26T20:08:09.52720 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.52723 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.52726 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.52728 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.52730 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.52734 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.52737 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.52740 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.52742 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.52745 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.52748 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.52750 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.52753 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.52759 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.52762 daemon.debug: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.52764 daemon.notice: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.52767 daemon.debug: Sep 26 16:08:09 turnstiled: msg: get remote
2023-09-26T20:08:09.52770 daemon.notice: Sep 26 16:08:09 turnstiled: msg: get remote
2023-09-26T20:08:09.52772 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.52775 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.52779 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.52781 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.52784 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.52787 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.52790 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.52792 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.52795 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.52798 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.52801 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.52804 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.52810 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.52812 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.52814 daemon.debug: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.52817 daemon.notice: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.52820 daemon.debug: Sep 26 16:08:09 turnstiled: msg: get service
2023-09-26T20:08:09.52822 daemon.notice: Sep 26 16:08:09 turnstiled: msg: get service
2023-09-26T20:08:09.52825 daemon.debug: Sep 26 16:08:09 turnstiled: msg: str start
2023-09-26T20:08:09.52828 daemon.notice: Sep 26 16:08:09 turnstiled: msg: str start
2023-09-26T20:08:09.52831 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.52835 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.52837 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.52840 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.52844 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.52847 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.52849 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.52852 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.52858 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.52861 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.52864 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.52866 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.52870 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.52873 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.52875 daemon.debug: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.52880 daemon.notice: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.52883 daemon.debug: Sep 26 16:08:09 turnstiled: msg: get service
2023-09-26T20:08:09.52885 daemon.notice: Sep 26 16:08:09 turnstiled: msg: get service
2023-09-26T20:08:09.52888 daemon.debug: Sep 26 16:08:09 turnstiled: msg: got "greetd"
2023-09-26T20:08:09.52891 daemon.notice: Sep 26 16:08:09 turnstiled: msg: got "greetd"
2023-09-26T20:08:09.52893 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.52896 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.52898 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.52901 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.52907 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.52910 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.52913 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.52915 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.52918 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.52921 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.52923 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.52925 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.52927 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.52929 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.52931 daemon.notice: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.52933 daemon.debug: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.52935 daemon.debug: Sep 26 16:08:09 turnstiled: msg: get type
2023-09-26T20:08:09.52937 daemon.notice: Sep 26 16:08:09 turnstiled: msg: get type
2023-09-26T20:08:09.52939 daemon.debug: Sep 26 16:08:09 turnstiled: msg: str start
2023-09-26T20:08:09.52942 daemon.notice: Sep 26 16:08:09 turnstiled: msg: str start
2023-09-26T20:08:09.52945 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.52949 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.52951 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.52952 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.52954 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.52956 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.52958 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.52960 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.52962 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.52963 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.52965 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.52967 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.52969 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.52970 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.52972 daemon.notice: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.52974 daemon.debug: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.52977 daemon.debug: Sep 26 16:08:09 turnstiled: msg: get type
2023-09-26T20:08:09.52982 daemon.notice: Sep 26 16:08:09 turnstiled: msg: get type
2023-09-26T20:08:09.52986 daemon.debug: Sep 26 16:08:09 turnstiled: msg: got "tty"
2023-09-26T20:08:09.52988 daemon.notice: Sep 26 16:08:09 turnstiled: msg: got "tty"
2023-09-26T20:08:09.52991 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.52993 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.52995 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.52998 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.53000 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.53002 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.53004 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.53006 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.53008 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.53010 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.53011 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.53013 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.53015 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.53019 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.53021 daemon.debug: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.53023 daemon.notice: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.53024 daemon.debug: Sep 26 16:08:09 turnstiled: msg: get class
2023-09-26T20:08:09.53026 daemon.notice: Sep 26 16:08:09 turnstiled: msg: get class
2023-09-26T20:08:09.53028 daemon.debug: Sep 26 16:08:09 turnstiled: msg: str start
2023-09-26T20:08:09.53029 daemon.notice: Sep 26 16:08:09 turnstiled: msg: str start
2023-09-26T20:08:09.53031 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.53033 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.53035 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.53036 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.53038 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.53040 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.53042 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.53043 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.53045 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.53049 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.53051 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.53053 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.53055 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.53057 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.53059 daemon.notice: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.53061 daemon.debug: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.53063 daemon.debug: Sep 26 16:08:09 turnstiled: msg: get class
2023-09-26T20:08:09.53065 daemon.notice: Sep 26 16:08:09 turnstiled: msg: get class
2023-09-26T20:08:09.53067 daemon.debug: Sep 26 16:08:09 turnstiled: msg: got "greeter"
2023-09-26T20:08:09.53068 daemon.notice: Sep 26 16:08:09 turnstiled: msg: got "greeter"
2023-09-26T20:08:09.53070 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.53072 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.53074 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.53075 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.53080 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.53082 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.53086 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.53088 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.53089 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.53091 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.53093 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.53095 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.53096 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.53098 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.53100 daemon.debug: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.53102 daemon.notice: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.53103 daemon.debug: Sep 26 16:08:09 turnstiled: msg: get desktop
2023-09-26T20:08:09.53105 daemon.notice: Sep 26 16:08:09 turnstiled: msg: get desktop
2023-09-26T20:08:09.53107 daemon.notice: Sep 26 16:08:09 turnstiled: msg: str start
2023-09-26T20:08:09.53109 daemon.debug: Sep 26 16:08:09 turnstiled: msg: str start
2023-09-26T20:08:09.53110 daemon.debug: Sep 26 16:08:09 turnstiled: msg: got ""
2023-09-26T20:08:09.53112 daemon.notice: Sep 26 16:08:09 turnstiled: msg: got ""
2023-09-26T20:08:09.53116 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.53119 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.53120 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.53122 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.53124 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.53125 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.53127 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.53129 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.53131 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.53133 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.53134 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.53136 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.53138 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.53140 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.53141 daemon.debug: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.53143 daemon.notice: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.53147 daemon.debug: Sep 26 16:08:09 turnstiled: msg: get seat
2023-09-26T20:08:09.53150 daemon.notice: Sep 26 16:08:09 turnstiled: msg: get seat
2023-09-26T20:08:09.53151 daemon.debug: Sep 26 16:08:09 turnstiled: msg: str start
2023-09-26T20:08:09.53153 daemon.notice: Sep 26 16:08:09 turnstiled: msg: str start
2023-09-26T20:08:09.53155 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.53157 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.53158 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.53160 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.53162 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.53163 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.53165 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.53167 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.53169 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.53171 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.53173 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.53175 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.53182 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.53184 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.53186 daemon.debug: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.53187 daemon.notice: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.53189 daemon.debug: Sep 26 16:08:09 turnstiled: msg: get seat
2023-09-26T20:08:09.53191 daemon.notice: Sep 26 16:08:09 turnstiled: msg: get seat
2023-09-26T20:08:09.53192 daemon.debug: Sep 26 16:08:09 turnstiled: msg: got "seat0"
2023-09-26T20:08:09.53194 daemon.notice: Sep 26 16:08:09 turnstiled: msg: got "seat0"
2023-09-26T20:08:09.53196 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.53197 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.53199 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.53201 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.53202 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.53204 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.53206 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.53207 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.53209 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.53213 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.53214 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.53216 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.53218 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.53219 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.53221 daemon.debug: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.53223 daemon.notice: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.53224 daemon.debug: Sep 26 16:08:09 turnstiled: msg: get tty
2023-09-26T20:08:09.53226 daemon.notice: Sep 26 16:08:09 turnstiled: msg: get tty
2023-09-26T20:08:09.53227 daemon.debug: Sep 26 16:08:09 turnstiled: msg: str start
2023-09-26T20:08:09.53229 daemon.notice: Sep 26 16:08:09 turnstiled: msg: str start
2023-09-26T20:08:09.53231 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.53232 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.53234 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.53236 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.53238 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.53242 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.53245 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.53246 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.53248 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.53249 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.53251 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.53253 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.53254 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.53256 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.53258 daemon.debug: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.53260 daemon.notice: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.53262 daemon.debug: Sep 26 16:08:09 turnstiled: msg: get tty
2023-09-26T20:08:09.53263 daemon.notice: Sep 26 16:08:09 turnstiled: msg: get tty
2023-09-26T20:08:09.53265 daemon.debug: Sep 26 16:08:09 turnstiled: msg: got "tty1"
2023-09-26T20:08:09.53266 daemon.notice: Sep 26 16:08:09 turnstiled: msg: got "tty1"
2023-09-26T20:08:09.53268 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.53270 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.53274 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.53275 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.53279 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.53281 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.53283 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.53284 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.53286 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.53288 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.53289 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.53291 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.53293 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.53295 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.53297 daemon.notice: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.53298 daemon.debug: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.53300 daemon.debug: Sep 26 16:08:09 turnstiled: msg: get display
2023-09-26T20:08:09.53302 daemon.notice: Sep 26 16:08:09 turnstiled: msg: get display
2023-09-26T20:08:09.53306 daemon.debug: Sep 26 16:08:09 turnstiled: msg: str start
2023-09-26T20:08:09.53307 daemon.notice: Sep 26 16:08:09 turnstiled: msg: str start
2023-09-26T20:08:09.53309 daemon.debug: Sep 26 16:08:09 turnstiled: msg: got ""
2023-09-26T20:08:09.53311 daemon.notice: Sep 26 16:08:09 turnstiled: msg: got ""
2023-09-26T20:08:09.53312 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.53314 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.53316 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.53317 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.53319 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.53321 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.53322 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.53324 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.53326 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.53328 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.53329 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.53331 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.53335 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.53337 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.53338 daemon.debug: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.53340 daemon.notice: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.53342 daemon.debug: Sep 26 16:08:09 turnstiled: msg: get ruser
2023-09-26T20:08:09.53343 daemon.notice: Sep 26 16:08:09 turnstiled: msg: get ruser
2023-09-26T20:08:09.53345 daemon.debug: Sep 26 16:08:09 turnstiled: msg: str start
2023-09-26T20:08:09.53347 daemon.notice: Sep 26 16:08:09 turnstiled: msg: str start
2023-09-26T20:08:09.53349 daemon.debug: Sep 26 16:08:09 turnstiled: msg: got ""
2023-09-26T20:08:09.53350 daemon.notice: Sep 26 16:08:09 turnstiled: msg: got ""
2023-09-26T20:08:09.53352 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.53354 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.53355 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.53357 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.53358 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.53360 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.53362 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.53366 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.53367 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.53369 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.53371 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.53372 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.53374 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.53376 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.53379 daemon.debug: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.53381 daemon.notice: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.53383 daemon.debug: Sep 26 16:08:09 turnstiled: msg: get rhost
2023-09-26T20:08:09.53384 daemon.notice: Sep 26 16:08:09 turnstiled: msg: get rhost
2023-09-26T20:08:09.53386 daemon.debug: Sep 26 16:08:09 turnstiled: msg: str start
2023-09-26T20:08:09.53388 daemon.notice: Sep 26 16:08:09 turnstiled: msg: str start
2023-09-26T20:08:09.53389 daemon.debug: Sep 26 16:08:09 turnstiled: msg: got ""
2023-09-26T20:08:09.53391 daemon.notice: Sep 26 16:08:09 turnstiled: msg: got ""
2023-09-26T20:08:09.53392 daemon.debug: Sep 26 16:08:09 turnstiled: msg: start service manager
2023-09-26T20:08:09.53396 daemon.notice: Sep 26 16:08:09 turnstiled: msg: start service manager
2023-09-26T20:08:09.53398 daemon.debug: Sep 26 16:08:09 turnstiled: srv: setup rundir for 991
2023-09-26T20:08:09.53400 daemon.notice: Sep 26 16:08:09 turnstiled: srv: setup rundir for 991
2023-09-26T20:08:09.53401 daemon.debug: Sep 26 16:08:09 turnstiled: rundir: make directory /run/user/991
2023-09-26T20:08:09.53403 daemon.notice: Sep 26 16:08:09 turnstiled: rundir: make directory /run/user/991
2023-09-26T20:08:09.53405 daemon.debug: Sep 26 16:08:09 turnstiled: rundir: try make parent /run
2023-09-26T20:08:09.53406 daemon.notice: Sep 26 16:08:09 turnstiled: rundir: try make parent /run
2023-09-26T20:08:09.53408 daemon.debug: Sep 26 16:08:09 turnstiled: rundir: try make parent /run/user
2023-09-26T20:08:09.53410 daemon.notice: Sep 26 16:08:09 turnstiled: rundir: try make parent /run/user
2023-09-26T20:08:09.53413 daemon.debug: Sep 26 16:08:09 turnstiled: srv: create login dir for 991
2023-09-26T20:08:09.53414 daemon.notice: Sep 26 16:08:09 turnstiled: srv: create login dir for 991
2023-09-26T20:08:09.53416 daemon.debug: Sep 26 16:08:09 turnstiled: srv: create readiness pipe
2023-09-26T20:08:09.53418 daemon.notice: Sep 26 16:08:09 turnstiled: srv: create readiness pipe
2023-09-26T20:08:09.53419 daemon.debug: Sep 26 16:08:09 turnstiled: srv: timer set
2023-09-26T20:08:09.53421 daemon.notice: Sep 26 16:08:09 turnstiled: srv: timer set
2023-09-26T20:08:09.53425 daemon.debug: Sep 26 16:08:09 turnstiled: srv: launch
2023-09-26T20:08:09.53427 daemon.notice: Sep 26 16:08:09 turnstiled: srv: launch
2023-09-26T20:08:09.53428 daemon.notice: Sep 26 16:08:09 turnstiled: msg: wait
2023-09-26T20:08:09.53430 daemon.debug: Sep 26 16:08:09 turnstiled: msg: wait
2023-09-26T20:08:09.53432 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.53434 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.53435 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.53437 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.54350 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.54355 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.54358 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.54361 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.54363 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.54365 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.54368 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.54370 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.54378 daemon.debug: Sep 26 16:08:09 turnstiled: pipe: close
2023-09-26T20:08:09.54381 daemon.notice: Sep 26 16:08:09 turnstiled: pipe: close
2023-09-26T20:08:09.54384 daemon.debug: Sep 26 16:08:09 turnstiled: pipe: gone
2023-09-26T20:08:09.54386 daemon.notice: Sep 26 16:08:09 turnstiled: pipe: gone
2023-09-26T20:08:09.54389 daemon.debug: Sep 26 16:08:09 turnstiled: srv: startup (ready)
2023-09-26T20:08:09.54391 daemon.notice: Sep 26 16:08:09 turnstiled: srv: startup (ready)
2023-09-26T20:08:09.54425 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.54429 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.54433 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.54436 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.54438 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.54443 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.96718 daemon.notice: Sep 26 16:08:09 turnstiled: ok: run: /var/lib/_greeter/.config/service/turnstile-ready: (pid 3798) 0s
2023-09-26T20:08:09.96751 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.96759 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.96766 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.96772 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.96791 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.96800 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.96806 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: sigchld
2023-09-26T20:08:09.96812 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: sigchld
2023-09-26T20:08:09.96819 daemon.debug: Sep 26 16:08:09 turnstiled: srv: reap 3799
2023-09-26T20:08:09.96825 daemon.notice: Sep 26 16:08:09 turnstiled: srv: reap 3799
2023-09-26T20:08:09.96836 daemon.debug: Sep 26 16:08:09 turnstiled: srv: ready notification
2023-09-26T20:08:09.96842 daemon.notice: Sep 26 16:08:09 turnstiled: srv: ready notification
2023-09-26T20:08:09.96848 daemon.debug: Sep 26 16:08:09 turnstiled: srv: disarm timer
2023-09-26T20:08:09.96854 daemon.notice: Sep 26 16:08:09 turnstiled: srv: disarm timer
2023-09-26T20:08:09.96860 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.96866 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.96882 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.96891 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.96897 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.96902 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.96908 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.96917 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.96923 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.96928 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.96934 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.96940 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.96946 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.96951 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check signal
2023-09-26T20:08:09.96957 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.96963 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check term
2023-09-26T20:08:09.96969 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.96975 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check incoming
2023-09-26T20:08:09.96992 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.96998 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check pipes
2023-09-26T20:08:09.97004 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.97010 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: check conns
2023-09-26T20:08:09.97016 daemon.debug: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.97022 daemon.notice: Sep 26 16:08:09 turnstiled: conn: read 13
2023-09-26T20:08:09.97026 daemon.debug: Sep 26 16:08:09 turnstiled: msg: session environment request
2023-09-26T20:08:09.97030 daemon.debug: Sep 26 16:08:09 turnstiled: msg: send len: 30
2023-09-26T20:08:09.97034 daemon.debug: Sep 26 16:08:09 turnstiled: msg: sent env, done
2023-09-26T20:08:09.97038 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.97042 daemon.debug: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:09.97052 daemon.notice: Sep 26 16:08:09 turnstiled: msg: session environment request
2023-09-26T20:08:09.97057 daemon.notice: Sep 26 16:08:09 turnstiled: msg: send len: 30
2023-09-26T20:08:09.97061 daemon.notice: Sep 26 16:08:09 turnstiled: msg: sent env, done
2023-09-26T20:08:09.97065 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: compact
2023-09-26T20:08:09.97069 daemon.notice: Sep 26 16:08:09 turnstiled: turnstiled: poll
2023-09-26T20:08:16.71801 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.71804 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.71805 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.71807 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.71810 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.71812 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.71814 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.71817 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.71818 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.71819 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.71821 daemon.notice: Sep 26 16:08:16 turnstiled: conn: hup 13
2023-09-26T20:08:16.71822 daemon.debug: Sep 26 16:08:16 turnstiled: conn: hup 13
2023-09-26T20:08:16.71823 daemon.notice: Sep 26 16:08:16 turnstiled: conn: close 13 for login 991
2023-09-26T20:08:16.71824 daemon.debug: Sep 26 16:08:16 turnstiled: conn: close 13 for login 991
2023-09-26T20:08:16.71827 daemon.debug: Sep 26 16:08:16 turnstiled: srv: stop
2023-09-26T20:08:16.71829 daemon.notice: Sep 26 16:08:16 turnstiled: srv: stop
2023-09-26T20:08:16.71830 daemon.debug: Sep 26 16:08:16 turnstiled: srv: term
2023-09-26T20:08:16.71831 daemon.notice: Sep 26 16:08:16 turnstiled: srv: term
2023-09-26T20:08:16.71833 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.71835 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.71836 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.71837 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72056 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72058 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72060 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72061 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72063 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72064 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72065 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: sigchld
2023-09-26T20:08:16.72066 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: sigchld
2023-09-26T20:08:16.72079 daemon.debug: Sep 26 16:08:16 turnstiled: srv: reap 3791
2023-09-26T20:08:16.72081 daemon.notice: Sep 26 16:08:16 turnstiled: srv: reap 3791
2023-09-26T20:08:16.72083 daemon.debug: Sep 26 16:08:16 turnstiled: dir_clear: clear srv.3792 at 14
2023-09-26T20:08:16.72084 daemon.notice: Sep 26 16:08:16 turnstiled: dir_clear: clear srv.3792 at 14
2023-09-26T20:08:16.72085 daemon.debug: Sep 26 16:08:16 turnstiled: rundir: clear directory /run/user/991
2023-09-26T20:08:16.72086 daemon.notice: Sep 26 16:08:16 turnstiled: rundir: clear directory /run/user/991
2023-09-26T20:08:16.72088 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72089 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72090 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72092 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72093 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72095 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72096 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72097 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72098 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72100 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72103 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72105 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72345 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72348 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72350 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72351 daemon.debug: Sep 26 16:08:16 turnstiled: conn: accepted 13 for 8
2023-09-26T20:08:16.72355 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72357 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72359 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72361 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72362 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72363 daemon.notice: Sep 26 16:08:16 turnstiled: conn: accepted 13 for 8
2023-09-26T20:08:16.72365 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72366 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72368 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72369 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72371 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72373 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72375 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72377 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72379 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72380 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72384 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72385 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72387 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72388 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72390 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72391 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72392 daemon.debug: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72394 daemon.notice: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72396 daemon.debug: Sep 26 16:08:16 turnstiled: msg: no session for 13
2023-09-26T20:08:16.72397 daemon.notice: Sep 26 16:08:16 turnstiled: msg: no session for 13
2023-09-26T20:08:16.72398 daemon.debug: Sep 26 16:08:16 turnstiled: msg: welcome 1000
2023-09-26T20:08:16.72400 daemon.debug: Sep 26 16:08:16 turnstiled: msg: using existing login 1000
2023-09-26T20:08:16.72401 daemon.debug: Sep 26 16:08:16 turnstiled: msg: new session for 1000/13
2023-09-26T20:08:16.72403 daemon.notice: Sep 26 16:08:16 turnstiled: msg: welcome 1000
2023-09-26T20:08:16.72404 daemon.notice: Sep 26 16:08:16 turnstiled: msg: using existing login 1000
2023-09-26T20:08:16.72406 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72409 daemon.notice: Sep 26 16:08:16 turnstiled: msg: new session for 1000/13
2023-09-26T20:08:16.72411 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72412 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72413 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72415 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72416 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72418 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72419 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72421 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72422 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72424 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72425 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72427 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72430 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72431 daemon.debug: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72434 daemon.notice: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72436 daemon.debug: Sep 26 16:08:16 turnstiled: msg: get session vtnr
2023-09-26T20:08:16.72437 daemon.notice: Sep 26 16:08:16 turnstiled: msg: get session vtnr
2023-09-26T20:08:16.72439 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72440 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72442 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72443 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72445 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72446 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72448 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72450 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72451 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72453 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72454 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72455 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72457 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72460 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72462 daemon.debug: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72463 daemon.notice: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72465 daemon.debug: Sep 26 16:08:16 turnstiled: msg: get remote
2023-09-26T20:08:16.72466 daemon.notice: Sep 26 16:08:16 turnstiled: msg: get remote
2023-09-26T20:08:16.72467 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72469 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72470 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72472 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72473 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72475 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72477 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72478 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72480 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72482 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72484 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72487 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72488 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72490 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72491 daemon.debug: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72493 daemon.notice: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72494 daemon.debug: Sep 26 16:08:16 turnstiled: msg: get service
2023-09-26T20:08:16.72496 daemon.notice: Sep 26 16:08:16 turnstiled: msg: get service
2023-09-26T20:08:16.72497 daemon.debug: Sep 26 16:08:16 turnstiled: msg: str start
2023-09-26T20:08:16.72498 daemon.notice: Sep 26 16:08:16 turnstiled: msg: str start
2023-09-26T20:08:16.72500 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72501 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72503 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72505 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72506 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72508 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72509 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72511 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72514 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72515 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72517 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72518 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72520 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72521 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72523 daemon.debug: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72525 daemon.notice: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72526 daemon.debug: Sep 26 16:08:16 turnstiled: msg: get service
2023-09-26T20:08:16.72528 daemon.notice: Sep 26 16:08:16 turnstiled: msg: get service
2023-09-26T20:08:16.72529 daemon.debug: Sep 26 16:08:16 turnstiled: msg: got "greetd"
2023-09-26T20:08:16.72531 daemon.notice: Sep 26 16:08:16 turnstiled: msg: got "greetd"
2023-09-26T20:08:16.72532 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72533 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72535 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72536 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72540 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72541 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72543 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72544 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72545 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72547 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72548 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72550 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72551 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72553 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72554 daemon.debug: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72555 daemon.notice: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72557 daemon.debug: Sep 26 16:08:16 turnstiled: msg: get type
2023-09-26T20:08:16.72558 daemon.notice: Sep 26 16:08:16 turnstiled: msg: get type
2023-09-26T20:08:16.72559 daemon.debug: Sep 26 16:08:16 turnstiled: msg: str start
2023-09-26T20:08:16.72560 daemon.notice: Sep 26 16:08:16 turnstiled: msg: str start
2023-09-26T20:08:16.72563 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72564 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72565 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72566 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72567 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72568 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72569 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72570 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72571 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72573 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72574 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72575 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72578 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72580 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72581 daemon.debug: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72582 daemon.notice: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72585 daemon.debug: Sep 26 16:08:16 turnstiled: msg: get type
2023-09-26T20:08:16.72587 daemon.notice: Sep 26 16:08:16 turnstiled: msg: get type
2023-09-26T20:08:16.72588 daemon.debug: Sep 26 16:08:16 turnstiled: msg: got "tty"
2023-09-26T20:08:16.72589 daemon.notice: Sep 26 16:08:16 turnstiled: msg: got "tty"
2023-09-26T20:08:16.72590 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72591 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72592 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72593 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72594 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72595 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72596 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72597 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72597 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72598 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72599 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72600 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72601 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72603 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72604 daemon.debug: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72605 daemon.notice: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72606 daemon.debug: Sep 26 16:08:16 turnstiled: msg: get class
2023-09-26T20:08:16.72607 daemon.notice: Sep 26 16:08:16 turnstiled: msg: get class
2023-09-26T20:08:16.72608 daemon.debug: Sep 26 16:08:16 turnstiled: msg: str start
2023-09-26T20:08:16.72609 daemon.notice: Sep 26 16:08:16 turnstiled: msg: str start
2023-09-26T20:08:16.72610 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72611 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72612 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72613 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72614 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72615 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72616 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72617 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72618 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72620 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72621 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72622 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72623 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72624 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72625 daemon.debug: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72626 daemon.notice: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72627 daemon.debug: Sep 26 16:08:16 turnstiled: msg: get class
2023-09-26T20:08:16.72628 daemon.notice: Sep 26 16:08:16 turnstiled: msg: get class
2023-09-26T20:08:16.72629 daemon.debug: Sep 26 16:08:16 turnstiled: msg: got "user"
2023-09-26T20:08:16.72630 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72630 daemon.notice: Sep 26 16:08:16 turnstiled: msg: got "user"
2023-09-26T20:08:16.72631 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72632 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72633 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72634 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72635 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72638 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72638 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72639 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72640 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72641 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72642 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72643 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72644 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72645 daemon.notice: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72646 daemon.debug: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72647 daemon.debug: Sep 26 16:08:16 turnstiled: msg: get desktop
2023-09-26T20:08:16.72648 daemon.notice: Sep 26 16:08:16 turnstiled: msg: get desktop
2023-09-26T20:08:16.72649 daemon.debug: Sep 26 16:08:16 turnstiled: msg: str start
2023-09-26T20:08:16.72649 daemon.notice: Sep 26 16:08:16 turnstiled: msg: str start
2023-09-26T20:08:16.72650 daemon.debug: Sep 26 16:08:16 turnstiled: msg: got ""
2023-09-26T20:08:16.72651 daemon.notice: Sep 26 16:08:16 turnstiled: msg: got ""
2023-09-26T20:08:16.72653 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72654 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72655 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72656 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72657 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72658 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72659 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72660 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72661 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72662 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72663 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72664 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72664 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72665 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72666 daemon.debug: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72667 daemon.notice: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72670 daemon.debug: Sep 26 16:08:16 turnstiled: msg: get seat
2023-09-26T20:08:16.72671 daemon.notice: Sep 26 16:08:16 turnstiled: msg: get seat
2023-09-26T20:08:16.72672 daemon.debug: Sep 26 16:08:16 turnstiled: msg: str start
2023-09-26T20:08:16.72673 daemon.notice: Sep 26 16:08:16 turnstiled: msg: str start
2023-09-26T20:08:16.72674 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72675 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72686 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72687 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72688 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72689 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72690 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72691 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72692 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72692 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72694 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72695 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72697 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72698 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72699 daemon.debug: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72700 daemon.notice: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72701 daemon.debug: Sep 26 16:08:16 turnstiled: msg: get seat
2023-09-26T20:08:16.72702 daemon.notice: Sep 26 16:08:16 turnstiled: msg: get seat
2023-09-26T20:08:16.72703 daemon.debug: Sep 26 16:08:16 turnstiled: msg: got "seat0"
2023-09-26T20:08:16.72703 daemon.notice: Sep 26 16:08:16 turnstiled: msg: got "seat0"
2023-09-26T20:08:16.72704 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72705 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72706 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72707 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72708 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72709 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72710 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72711 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72712 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72714 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72715 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72716 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72717 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72718 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72719 daemon.debug: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72720 daemon.notice: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72721 daemon.debug: Sep 26 16:08:16 turnstiled: msg: get tty
2023-09-26T20:08:16.72722 daemon.notice: Sep 26 16:08:16 turnstiled: msg: get tty
2023-09-26T20:08:16.72723 daemon.debug: Sep 26 16:08:16 turnstiled: msg: str start
2023-09-26T20:08:16.72723 daemon.notice: Sep 26 16:08:16 turnstiled: msg: str start
2023-09-26T20:08:16.72724 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72725 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72726 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72727 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72728 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72730 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72731 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72732 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72733 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72734 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72735 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72736 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72737 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72738 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72739 daemon.debug: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72740 daemon.notice: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72741 daemon.debug: Sep 26 16:08:16 turnstiled: msg: get tty
2023-09-26T20:08:16.72742 daemon.notice: Sep 26 16:08:16 turnstiled: msg: get tty
2023-09-26T20:08:16.72743 daemon.debug: Sep 26 16:08:16 turnstiled: msg: got "tty1"
2023-09-26T20:08:16.72744 daemon.notice: Sep 26 16:08:16 turnstiled: msg: got "tty1"
2023-09-26T20:08:16.72745 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72746 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72748 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72749 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72750 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72750 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72751 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72752 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72753 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72754 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72755 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72756 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72757 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72758 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72759 daemon.debug: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72760 daemon.notice: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72761 daemon.debug: Sep 26 16:08:16 turnstiled: msg: get display
2023-09-26T20:08:16.72761 daemon.notice: Sep 26 16:08:16 turnstiled: msg: get display
2023-09-26T20:08:16.72764 daemon.debug: Sep 26 16:08:16 turnstiled: msg: str start
2023-09-26T20:08:16.72765 daemon.debug: Sep 26 16:08:16 turnstiled: msg: got ""
2023-09-26T20:08:16.72765 daemon.notice: Sep 26 16:08:16 turnstiled: msg: str start
2023-09-26T20:08:16.72766 daemon.notice: Sep 26 16:08:16 turnstiled: msg: got ""
2023-09-26T20:08:16.72767 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72768 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72769 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72770 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72771 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72772 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72773 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72774 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72775 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72777 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72779 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72781 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72783 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72784 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72785 daemon.debug: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72786 daemon.notice: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72787 daemon.debug: Sep 26 16:08:16 turnstiled: msg: get ruser
2023-09-26T20:08:16.72788 daemon.notice: Sep 26 16:08:16 turnstiled: msg: get ruser
2023-09-26T20:08:16.72789 daemon.debug: Sep 26 16:08:16 turnstiled: msg: str start
2023-09-26T20:08:16.72790 daemon.debug: Sep 26 16:08:16 turnstiled: msg: got ""
2023-09-26T20:08:16.72790 daemon.notice: Sep 26 16:08:16 turnstiled: msg: str start
2023-09-26T20:08:16.72792 daemon.notice: Sep 26 16:08:16 turnstiled: msg: got ""
2023-09-26T20:08:16.72793 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72794 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72795 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72795 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72796 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72797 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72798 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72800 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72801 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72802 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72803 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72804 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72805 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72806 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72807 daemon.debug: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72808 daemon.notice: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72809 daemon.debug: Sep 26 16:08:16 turnstiled: msg: get rhost
2023-09-26T20:08:16.72810 daemon.notice: Sep 26 16:08:16 turnstiled: msg: get rhost
2023-09-26T20:08:16.72811 daemon.debug: Sep 26 16:08:16 turnstiled: msg: str start
2023-09-26T20:08:16.72811 daemon.notice: Sep 26 16:08:16 turnstiled: msg: str start
2023-09-26T20:08:16.72812 daemon.debug: Sep 26 16:08:16 turnstiled: msg: got ""
2023-09-26T20:08:16.72813 daemon.notice: Sep 26 16:08:16 turnstiled: msg: got ""
2023-09-26T20:08:16.72814 daemon.debug: Sep 26 16:08:16 turnstiled: msg: done
2023-09-26T20:08:16.72815 daemon.notice: Sep 26 16:08:16 turnstiled: msg: done
2023-09-26T20:08:16.72818 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72819 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72819 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72820 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72821 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72822 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check signal
2023-09-26T20:08:16.72823 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72824 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check term
2023-09-26T20:08:16.72825 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72826 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check incoming
2023-09-26T20:08:16.72828 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72829 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check pipes
2023-09-26T20:08:16.72830 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72830 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: check conns
2023-09-26T20:08:16.72831 daemon.debug: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72832 daemon.notice: Sep 26 16:08:16 turnstiled: conn: read 13
2023-09-26T20:08:16.72835 daemon.debug: Sep 26 16:08:16 turnstiled: msg: send len: 31
2023-09-26T20:08:16.72835 daemon.debug: Sep 26 16:08:16 turnstiled: msg: session environment request
2023-09-26T20:08:16.72836 daemon.debug: Sep 26 16:08:16 turnstiled: msg: sent env, done
2023-09-26T20:08:16.72837 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72838 daemon.debug: Sep 26 16:08:16 turnstiled: turnstiled: poll
2023-09-26T20:08:16.72839 daemon.notice: Sep 26 16:08:16 turnstiled: msg: session environment request
2023-09-26T20:08:16.72840 daemon.notice: Sep 26 16:08:16 turnstiled: msg: send len: 31
2023-09-26T20:08:16.72841 daemon.notice: Sep 26 16:08:16 turnstiled: msg: sent env, done
2023-09-26T20:08:16.72842 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: compact
2023-09-26T20:08:16.72843 daemon.notice: Sep 26 16:08:16 turnstiled: turnstiled: poll
```

</details> 

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PR PATCH] [Updated] New package: turnstile-0.1.8
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (50 preceding siblings ...)
  2024-01-16 20:08 ` classabbyamp
@ 2024-03-22 20:31 ` classabbyamp
  2024-03-22 21:02 ` classabbyamp
  2024-03-22 21:11 ` [PR PATCH] [Merged]: " classabbyamp
  53 siblings, 0 replies; 55+ messages in thread
From: classabbyamp @ 2024-03-22 20:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 741 bytes --]

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages new/turnstile
https://github.com/void-linux/void-packages/pull/44676

New package: turnstile-0.1.8
WIP while i create the runit backend upstream ([mostly done](https://github.com/chimera-linux/turnstile/compare/master...classabbyamp:runit-backend))

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**



A patch file from https://github.com/void-linux/void-packages/pull/44676.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-new/turnstile-44676.patch --]
[-- Type: text/x-diff, Size: 38766 bytes --]

From f221363fbeaa3b8311eb5d59e60e34c95c2f455a Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 11 Jul 2023 22:02:49 -0400
Subject: [PATCH 1/5] polkit: patch to support turnstile

---
 srcpkgs/polkit/patches/turnstile.patch | 57 ++++++++++++++++++++++++++
 srcpkgs/polkit/template                |  2 +-
 2 files changed, 58 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/polkit/patches/turnstile.patch

diff --git a/srcpkgs/polkit/patches/turnstile.patch b/srcpkgs/polkit/patches/turnstile.patch
new file mode 100644
index 00000000000000..4f56ed130eefd4
--- /dev/null
+++ b/srcpkgs/polkit/patches/turnstile.patch
@@ -0,0 +1,57 @@
+commit 8d98aa421b92765695af13c033cf7e80375c03fe
+Author: q66 <q66@chimera-linux.org>
+Date:   Sun Jul 2 15:44:51 2023 +0200
+
+    ensure turnstile-session processes fall back to display check
+    
+    As turnstile session is shared between sessions, let us fall back
+    to the check for whether a graphical session is in place. We need
+    this as our dbus session bus is managed through turnstile. In
+    systemd-using systems there is no problem because user units are
+    not a part of any explicit session (we don't get this luxury
+    because using a session is the only way to make sure our pid is
+    tracked in systemd at all; we need that to be able to resolve
+    PID to UID).
+
+diff --git a/src/polkitbackend/polkitbackendsessionmonitor-systemd.c b/src/polkitbackend/polkitbackendsessionmonitor-systemd.c
+index b00cdbd..9a3f3c3 100644
+--- a/src/polkitbackend/polkitbackendsessionmonitor-systemd.c
++++ b/src/polkitbackend/polkitbackendsessionmonitor-systemd.c
+@@ -346,7 +346,7 @@ polkit_backend_session_monitor_get_session_for_subject (PolkitBackendSessionMoni
+   PolkitUnixProcess *tmp_process = NULL;
+   PolkitUnixProcess *process = NULL;
+   PolkitSubject *session = NULL;
+-  char *session_id = NULL;
++  char *session_id = NULL, *service_id = NULL;
+   pid_t pid;
+ #if HAVE_SD_UID_GET_DISPLAY
+   uid_t uid;
+@@ -377,8 +377,26 @@ polkit_backend_session_monitor_get_session_for_subject (PolkitBackendSessionMoni
+ 
+   if (sd_pid_get_session (pid, &session_id) >= 0)
+     {
+-      session = polkit_unix_session_new (session_id);
+-      goto out;
++      /* if belonging to turnstile, ignore */
++      if (sd_session_get_service (session_id, &service_id) >= 0)
++        {
++          if (strcmp (service_id, "turnstiled"))
++            {
++              free (service_id);
++              session = polkit_unix_session_new (session_id);
++              goto out;
++            }
++          else
++            {
++              /* turnstile-managed processes are shared */
++              free(service_id);
++            }
++        }
++      else
++        {
++          session = polkit_unix_session_new (session_id);
++          goto out;
++        }
+     }
+ 
+ #if HAVE_SD_UID_GET_DISPLAY
diff --git a/srcpkgs/polkit/template b/srcpkgs/polkit/template
index 84ab7453bb9b66..0435e1ce5976b8 100644
--- a/srcpkgs/polkit/template
+++ b/srcpkgs/polkit/template
@@ -1,7 +1,7 @@
 # Template file for 'polkit'
 pkgname=polkit
 version=121
-revision=1
+revision=2
 build_style=meson
 build_helper=gir
 configure_args="$(vopt_bool gir introspection) -Dman=true

From ebec18d806f62133a3a8985b36f1cbf6aeb98e0d Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sun, 2 Jul 2023 22:04:40 -0400
Subject: [PATCH 2/5] pam-base: add turnstile pam

---
 srcpkgs/pam-base/files/system-login | 1 +
 srcpkgs/pam-base/template           | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/pam-base/files/system-login b/srcpkgs/pam-base/files/system-login
index 2275deba480d3e..72c4638f07d3fe 100644
--- a/srcpkgs/pam-base/files/system-login
+++ b/srcpkgs/pam-base/files/system-login
@@ -14,6 +14,7 @@ session    optional   pam_loginuid.so
 session    include    system-auth
 session    optional   pam_motd.so          motd=/etc/motd
 session    optional   pam_mail.so          dir=/var/mail standard quiet
+-session   optional   pam_turnstile.so
 -session   optional   pam_elogind.so
 -session   optional   pam_dumb_runtime_dir.so
 session    required   pam_env.so
diff --git a/srcpkgs/pam-base/template b/srcpkgs/pam-base/template
index 70dfab9fa9965a..38bfa74cd88560 100644
--- a/srcpkgs/pam-base/template
+++ b/srcpkgs/pam-base/template
@@ -1,7 +1,7 @@
 # Template file for 'pam-base'
 pkgname=pam-base
 version=0.4
-revision=2
+revision=3
 short_desc="PAM base configuration files"
 maintainer="Érico Nogueira <ericonr@disroot.org>"
 license="Public Domain"

From 3e2470cc0394e6d9f53b7d349a561d8e0805ddcc Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 12 Sep 2023 18:54:27 -0400
Subject: [PATCH 3/5] gdm: patch pam files for turnstile

---
 srcpkgs/gdm/patches/pam-turnstile-elogind.patch | 17 +++++++++++++++++
 srcpkgs/gdm/template                            |  2 +-
 2 files changed, 18 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/gdm/patches/pam-turnstile-elogind.patch

diff --git a/srcpkgs/gdm/patches/pam-turnstile-elogind.patch b/srcpkgs/gdm/patches/pam-turnstile-elogind.patch
new file mode 100644
index 00000000000000..21df9c826eacb2
--- /dev/null
+++ b/srcpkgs/gdm/patches/pam-turnstile-elogind.patch
@@ -0,0 +1,17 @@
+1. pam_systemd doesn't exist on void, use pam_elogind instead
+   (this may have been the cause of some issues with elogind
+   not starting for GNOME users?)
+2. pam_turnstile allows turnstile to integrate with gdm
+
+See also: https://github.com/chimera-linux/cports/blob/master/main/gdm/patches/pam.patch
+
+--- a/data/pam-arch/gdm-launch-environment.pam
++++ b/data/pam-arch/gdm-launch-environment.pam
+@@ -13,5 +13,6 @@
+ session    optional                    pam_keyinit.so       force revoke
+ session    required                    pam_succeed_if.so    audit quiet_success user in gdm:gnome-initial-setup
+ session    optional                    pam_permit.so
+--session   optional                    pam_systemd.so
++-session   optional                    pam_turnstile.so
++-session   optional                    pam_elogind.so
+ session    required                    pam_env.so
diff --git a/srcpkgs/gdm/template b/srcpkgs/gdm/template
index c171f236442515..128253f83f885c 100644
--- a/srcpkgs/gdm/template
+++ b/srcpkgs/gdm/template
@@ -1,7 +1,7 @@
 # Template file for 'gdm'
 pkgname=gdm
 version=45.0.1
-revision=1
+revision=2
 build_helper="gir"
 build_style=meson
 configure_args="

From 17b75e1d4a784a9499b73c9b641349df9c4c4cc0 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 12 Sep 2023 18:54:33 -0400
Subject: [PATCH 4/5] lightdm: patch pam files for turnstile

---
 .../patches/pam-turnstile-elogind.patch       | 32 +++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 srcpkgs/lightdm/patches/pam-turnstile-elogind.patch

diff --git a/srcpkgs/lightdm/patches/pam-turnstile-elogind.patch b/srcpkgs/lightdm/patches/pam-turnstile-elogind.patch
new file mode 100644
index 00000000000000..529531e294f942
--- /dev/null
+++ b/srcpkgs/lightdm/patches/pam-turnstile-elogind.patch
@@ -0,0 +1,32 @@
+1. pam_systemd doesn't exist on void, use pam_elogind instead
+2. pam_turnstile allows turnstile to integrate with lightdm
+
+See also: https://github.com/chimera-linux/cports/blob/master/main/gdm/patches/pam.patch
+
+--- a/data/pam/lightdm
++++ b/data/pam/lightdm
+@@ -17,4 +17,5 @@
+ 
+ # Setup session
+ session   required pam_unix.so
+-session   optional pam_systemd.so
++- session   optional pam_turnstile.so
++- session   optional pam_elogind.so
+--- a/data/pam/lightdm-autologin
++++ b/data/pam/lightdm-autologin
+@@ -19,4 +19,5 @@
+ 
+ # Setup session
+ session   required pam_unix.so
+-session   optional pam_systemd.so
++- session   optional pam_turnstile.so
++- session   optional pam_elogind.so
+--- a/data/pam/lightdm-greeter
++++ b/data/pam/lightdm-greeter
+@@ -14,4 +14,5 @@
+ 
+ # Setup session
+ session   required pam_unix.so
+-session   optional pam_systemd.so
++- session   optional pam_turnstile.so
++- session   optional pam_elogind.so

From d7bee88e71639ac731ac116416c5b93ed5d3187a Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Wed, 28 Jun 2023 05:10:55 -0400
Subject: [PATCH 5/5] New package: turnstile-0.1.8

---
 srcpkgs/turnstile/files/README.voidlinux     |  50 ++++
 srcpkgs/turnstile/files/dbus.run             |  11 +
 srcpkgs/turnstile/files/turnstiled/run       |   4 +
 srcpkgs/turnstile/patches/defer-rundir.patch | 121 ++++++++
 srcpkgs/turnstile/patches/dummy.patch        | 300 +++++++++++++++++++
 srcpkgs/turnstile/patches/fix-chdir.patch    |  25 ++
 srcpkgs/turnstile/patches/runit.patch        | 256 ++++++++++++++++
 srcpkgs/turnstile/template                   |  24 ++
 8 files changed, 791 insertions(+)
 create mode 100644 srcpkgs/turnstile/files/README.voidlinux
 create mode 100755 srcpkgs/turnstile/files/dbus.run
 create mode 100644 srcpkgs/turnstile/files/turnstiled/run
 create mode 100644 srcpkgs/turnstile/patches/defer-rundir.patch
 create mode 100644 srcpkgs/turnstile/patches/dummy.patch
 create mode 100644 srcpkgs/turnstile/patches/fix-chdir.patch
 create mode 100644 srcpkgs/turnstile/patches/runit.patch
 create mode 100644 srcpkgs/turnstile/template

diff --git a/srcpkgs/turnstile/files/README.voidlinux b/srcpkgs/turnstile/files/README.voidlinux
new file mode 100644
index 00000000000000..32025131de7d62
--- /dev/null
+++ b/srcpkgs/turnstile/files/README.voidlinux
@@ -0,0 +1,50 @@
+# User Services
+
+User services can be placed in ~/.config/service/.
+
+To ensure that a subset of services are started before login can proceed,
+these services can be listed in ~/.config/service/turnstile-ready/conf, for
+example:
+
+	core_services="dbus foo"
+
+The turnstile-ready service is created by turnstile on first login.
+
+## Shared Environment for User Services
+
+To give user services access to important environment variables, chpst's
+envdir functionality can be used. See chpst(8) (-e flag) for more info.
+
+To make a service aware of these variables:
+
+	- exec foo
+	+ exec chpst -e "$TURNSTILE_ENV_DIR" foo
+
+Inside user services, the convenience variable "$TURNSTILE_ENV_DIR" can be used
+to refer to this directory.
+
+The helper script 'turnstile-update-runit-env' can be used to easily update
+variables in this shared envdir:
+
+	turnstile-update-runit-env DISPLAY XAUTHORITY FOO=bar BAZ=
+
+# D-Bus Session Bus
+
+If you want to manage dbus using a turnstile-managed runit user service:
+
+	mkdir ~/.config/service/dbus
+	ln -s /usr/share/examples/turnstile/dbus.run ~/.config/service/dbus/run
+
+# Elogind Replacement
+
+Turnstile is not (nor ever will be, according to the developer) a complete
+replacement for elogind, but it can replace several parts, including
+XDG_RUNTIME_DIR management.
+
+If using turnstile with elogind:
+- disable rundir management in /etc/turnstile/turnstiled.conf
+  (manage_rundir = no)
+
+If using turnstile without elogind:
+- install and enable seatd for seat management
+- install and enable acpid for lid switch/button handling
diff --git a/srcpkgs/turnstile/files/dbus.run b/srcpkgs/turnstile/files/dbus.run
new file mode 100755
index 00000000000000..dc7473e45fc52f
--- /dev/null
+++ b/srcpkgs/turnstile/files/dbus.run
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+[ -r ./conf ] && . ./conf
+
+: "${DBUS_SESSION_BUS_ADDRESS:=unix:path=/run/user/$(id -u)/bus}"
+
+if [ -d "$TURNSTILE_ENV_DIR" ]; then
+	echo "$DBUS_SESSION_BUS_ADDRESS" > "$TURNSTILE_ENV_DIR"/DBUS_SESSION_BUS_ADDRESS
+fi
+
+exec chpst -e "$TURNSTILE_ENV_DIR" dbus-daemon --session --nofork --nopidfile --address="$DBUS_SESSION_BUS_ADDRESS" $OPTS
diff --git a/srcpkgs/turnstile/files/turnstiled/run b/srcpkgs/turnstile/files/turnstiled/run
new file mode 100644
index 00000000000000..aa5d624fda19a1
--- /dev/null
+++ b/srcpkgs/turnstile/files/turnstiled/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+exec 2>&1
+exec turnstiled
diff --git a/srcpkgs/turnstile/patches/defer-rundir.patch b/srcpkgs/turnstile/patches/defer-rundir.patch
new file mode 100644
index 00000000000000..33b94a1489b3dc
--- /dev/null
+++ b/srcpkgs/turnstile/patches/defer-rundir.patch
@@ -0,0 +1,121 @@
+From cae619b4f23c7b1bc44ba8cef59d004a1911a01d Mon Sep 17 00:00:00 2001
+From: q66 <q66@chimera-linux.org>
+Date: Fri, 1 Sep 2023 22:57:46 +0200
+Subject: [PATCH] defer creation of rundir for after pam session is established
+
+---
+ src/exec_utils.cc | 19 ++++++++++++++++++-
+ src/turnstiled.cc | 16 +++++-----------
+ src/turnstiled.hh |  2 +-
+ 3 files changed, 24 insertions(+), 13 deletions(-)
+
+diff --git a/src/exec_utils.cc b/src/exec_utils.cc
+index 49918be..96440ec 100644
+--- a/src/exec_utils.cc
++++ b/src/exec_utils.cc
+@@ -106,6 +106,8 @@ static pam_handle_t *dpam_begin(char const *user, unsigned int gid) {
+ static void sanitize_limits() {
+     struct rlimit l{0, 0};
+ 
++    print_dbg("srv: sanitize rlimits");
++
+     setrlimit(RLIMIT_NICE, &l);
+     setrlimit(RLIMIT_RTPRIO, &l);
+ 
+@@ -129,6 +131,8 @@ static bool dpam_open(pam_handle_t *pamh) {
+     /* before opening session, do not rely on just PAM and sanitize a bit */
+     sanitize_limits();
+ 
++    print_dbg("srv: open pam session");
++
+     auto pst = pam_open_session(pamh, 0);
+     if (pst != PAM_SUCCESS) {
+         fprintf(stderr, "srv: pam_open_session: %s", pam_strerror(pamh, pst));
+@@ -136,6 +140,7 @@ static bool dpam_open(pam_handle_t *pamh) {
+         pam_end(pamh, pst);
+         return false;
+     }
++
+     return true;
+ }
+ 
+@@ -288,7 +293,7 @@ static void srv_dummy() {
+     exit(0);
+ }
+ 
+-void srv_child(login &lgn, char const *backend) {
++void srv_child(login &lgn, char const *backend, bool make_rundir) {
+     pam_handle_t *pamh = nullptr;
+     bool is_root = (getuid() == 0);
+     /* create a new session */
+@@ -297,11 +302,23 @@ void srv_child(login &lgn, char const *backend) {
+     }
+     /* begin pam session setup */
+     if (is_root) {
++        print_dbg("srv: establish pam");
+         pamh = dpam_begin(lgn.username.data(), lgn.gid);
+         if (!dpam_open(pamh)) {
+             return;
+         }
+     }
++    /* make rundir if needed, we want to make it as late as possible, ideally
++     * after the PAM session setup is already finalized (so that nothing gets
++     * the idea to nuke it), but before we fork and drop privileges
++     */
++    if (make_rundir) {
++        print_dbg("srv: setup rundir for %u", lgn.uid);
++        if (!rundir_make(lgn.rundir.data(), lgn.uid, lgn.gid)) {
++            return;
++        }
++    }
++    print_dbg("srv: forking for service manager exec");
+     /* handle the parent/child logic here
+      * if we're forking, only child makes it past this func
+      */
+diff --git a/src/turnstiled.cc b/src/turnstiled.cc
+index 71f8372..a886739 100644
+--- a/src/turnstiled.cc
++++ b/src/turnstiled.cc
+@@ -124,16 +124,6 @@ static bool srv_start(login &lgn) {
+     std::snprintf(uidbuf, sizeof(uidbuf), "%u", lgn.uid);
+     /* mark as waiting */
+     lgn.srv_wait = true;
+-    /* make rundir if needed, we don't want to create that and login dir
+-     * any earlier than here as here we are sure the previous instance has
+-     * definitely terminated and stuff like login dirfd is actually clear
+-     */
+-    if (cdata->manage_rdir) {
+-        print_dbg("srv: setup rundir for %u", lgn.uid);
+-        if (!rundir_make(lgn.rundir.data(), lgn.uid, lgn.gid)) {
+-            return false;
+-        }
+-    }
+     bool has_backend = !cdata->disable && (
+         (lgn.uid != 0) || cdata->root_session
+     );
+@@ -208,7 +198,11 @@ static bool srv_start(login &lgn) {
+         close(sigpipe[0]);
+         close(sigpipe[1]);
+         /* and run the login */
+-        srv_child(lgn, has_backend ? cdata->backend.data() : nullptr);
++        srv_child(
++            lgn,
++            has_backend ? cdata->backend.data() : nullptr,
++            cdata->manage_rdir
++        );
+         exit(1);
+     } else if (pid < 0) {
+         print_err("srv: fork failed (%s)", strerror(errno));
+diff --git a/src/turnstiled.hh b/src/turnstiled.hh
+index d80043c..479ef83 100644
+--- a/src/turnstiled.hh
++++ b/src/turnstiled.hh
+@@ -144,7 +144,7 @@ void cfg_expand_rundir(
+ );
+ 
+ /* service manager utilities */
+-void srv_child(login &sess, char const *backend);
++void srv_child(login &sess, char const *backend, bool make_rundir);
+ bool srv_boot(login &sess, char const *backend);
+ 
+ struct cfg_data {
diff --git a/srcpkgs/turnstile/patches/dummy.patch b/srcpkgs/turnstile/patches/dummy.patch
new file mode 100644
index 00000000000000..693cdbe310efd7
--- /dev/null
+++ b/srcpkgs/turnstile/patches/dummy.patch
@@ -0,0 +1,300 @@
+From b7f8fd1c1d6493a83d52347be65a6c6535d5c18f Mon Sep 17 00:00:00 2001
+From: q66 <q66@chimera-linux.org>
+Date: Sat, 2 Sep 2023 14:06:34 +0200
+Subject: [PATCH] write session data in a separate sessions directory
+
+We need this because all of the session data should be publicly
+accessible, while the sessions' individual state directories are
+not.
+
+Also prepare a separate directory for user tracking.
+---
+ src/turnstiled.cc | 52 +++++++++++++++++++++++++++++++++--------------
+ 1 file changed, 37 insertions(+), 15 deletions(-)
+
+diff --git a/src/turnstiled.cc b/src/turnstiled.cc
+index a886739..861c1fe 100644
+--- a/src/turnstiled.cc
++++ b/src/turnstiled.cc
+@@ -58,7 +58,11 @@ static constexpr std::time_t kill_timeout = 60;
+ cfg_data *cdata = nullptr;
+ 
+ /* the file descriptor for the base directory */
+-static int userv_dirfd = -1;
++static int dirfd_base = -1;
++/* the file descriptor for the users directory */
++static int dirfd_users = -1;
++/* the file descriptor for the sessions directory */
++static int dirfd_sessions = -1;
+ 
+ login::login() {
+     timer_sev.sigev_notify = SIGEV_SIGNAL;
+@@ -70,7 +74,7 @@ login::login() {
+ void login::remove_sdir() {
+     char buf[32];
+     std::snprintf(buf, sizeof(buf), "%u", this->uid);
+-    unlinkat(userv_dirfd, buf, AT_REMOVEDIR);
++    unlinkat(dirfd_base, buf, AT_REMOVEDIR);
+     /* just in case, we know this is a named pipe */
+     unlinkat(this->dirfd, "ready", 0);
+     dir_clear_contents(this->dirfd);
+@@ -131,7 +135,7 @@ static bool srv_start(login &lgn) {
+     if (has_backend) {
+         print_dbg("srv: create login dir for %u", lgn.uid);
+         /* make the directory itself */
+-        lgn.dirfd = dir_make_at(userv_dirfd, uidbuf, 0700);
++        lgn.dirfd = dir_make_at(dirfd_base, uidbuf, 0700);
+         if (lgn.dirfd < 0) {
+             print_err(
+                 "srv: failed to make login dir for %u (%s)",
+@@ -141,7 +145,7 @@ static bool srv_start(login &lgn) {
+         }
+         /* ensure it's owned by the user */
+         if (fchownat(
+-            userv_dirfd, uidbuf, lgn.uid, lgn.gid, AT_SYMLINK_NOFOLLOW
++            dirfd_base, uidbuf, lgn.uid, lgn.gid, AT_SYMLINK_NOFOLLOW
+         ) || fcntl(lgn.dirfd, F_SETFD, FD_CLOEXEC)) {
+             print_err(
+                 "srv: login dir setup failed for %u (%s)",
+@@ -194,7 +198,7 @@ static bool srv_start(login &lgn) {
+         sigaction(SIGINT, &sa, nullptr);
+         /* close some descriptors, these can be reused */
+         close(lgn.userpipe);
+-        close(userv_dirfd);
++        close(dirfd_base);
+         close(sigpipe[0]);
+         close(sigpipe[1]);
+         /* and run the login */
+@@ -317,11 +321,13 @@ static session *handle_session_new(int fd, unsigned int uid) {
+ 
+ static bool write_sdata(session const &sess) {
+     char sessname[64], tmpname[64];
+-    std::snprintf(tmpname, sizeof(tmpname), "session.%lu.tmp", sess.id);
+-    std::snprintf(sessname, sizeof(sessname), "session.%lu", sess.id);
++    std::snprintf(tmpname, sizeof(tmpname), "%lu.tmp", sess.id);
++    std::snprintf(sessname, sizeof(sessname), "%lu", sess.id);
+     auto &lgn = *sess.lgn;
+     int omask = umask(0);
+-    int sessfd = openat(lgn.dirfd, tmpname, O_CREAT | O_TRUNC | O_WRONLY, 0644);
++    int sessfd = openat(
++        dirfd_sessions, tmpname, O_CREAT | O_TRUNC | O_WRONLY, 0644
++    );
+     if (sessfd < 0) {
+         print_err("msg: session tmpfile failed (%s)", strerror(errno));
+         umask(omask);
+@@ -365,9 +371,9 @@ static bool write_sdata(session const &sess) {
+     /* done writing */
+     std::fclose(sessf);
+     /* now rename to real file */
+-    if (renameat(lgn.dirfd, tmpname, lgn.dirfd, sessname) < 0) {
++    if (renameat(dirfd_sessions, tmpname, dirfd_sessions, sessname) < 0) {
+         print_err("msg: session renameat failed (%s)", strerror(errno));
+-        unlinkat(lgn.dirfd, tmpname, 0);
++        unlinkat(dirfd_sessions, tmpname, 0);
+         return false;
+     }
+     return true;
+@@ -375,8 +381,8 @@ static bool write_sdata(session const &sess) {
+ 
+ static void drop_sdata(session const &sess) {
+     char sessname[64];
+-    std::snprintf(sessname, sizeof(sessname), "session.%lu", sess.id);
+-    unlinkat(sess.lgn->dirfd, sessname, 0);
++    std::snprintf(sessname, sizeof(sessname), "%lu", sess.id);
++    unlinkat(dirfd_sessions, sessname, 0);
+ }
+ 
+ static bool sock_block(int fd, short events) {
+@@ -1173,15 +1179,31 @@ int main(int argc, char **argv) {
+             print_err("turnstiled base path does not exist");
+             return 1;
+         }
+-        userv_dirfd = dir_make_at(dfd, SOCK_DIR, 0755);
+-        if (userv_dirfd < 0) {
++        dirfd_base = dir_make_at(dfd, SOCK_DIR, 0755);
++        if (dirfd_base < 0) {
+             print_err("failed to create base directory (%s)", strerror(errno));
+             return 1;
+         }
++        dirfd_users = dir_make_at(dirfd_base, "users", 0755);
++        if (dirfd_users < 0) {
++            print_err("failed to create users directory (%s)", strerror(errno));
++            return 1;
++        }
++        dirfd_sessions = dir_make_at(dirfd_base, "sessions", 0755);
++        if (dirfd_sessions < 0) {
++            print_err(
++                "failed to create sessions directory (%s)", strerror(errno)
++            );
++            return 1;
++        }
+         close(dfd);
+     }
+     /* ensure it is not accessible by service manager child processes */
+-    if (fcntl(userv_dirfd, F_SETFD, FD_CLOEXEC)) {
++    if (
++        fcntl(dirfd_base, F_SETFD, FD_CLOEXEC) ||
++        fcntl(dirfd_users, F_SETFD, FD_CLOEXEC) ||
++        fcntl(dirfd_sessions, F_SETFD, FD_CLOEXEC)
++    ) {
+         print_err("fcntl failed (%s)", strerror(errno));
+         return 1;
+     }
+
+From 27f29a523cb75ba778ca538d319181a60c533eb4 Mon Sep 17 00:00:00 2001
+From: q66 <q66@chimera-linux.org>
+Date: Sun, 3 Sep 2023 16:32:16 +0200
+Subject: [PATCH] treat dummy service backend the same as a regular one
+
+This means less code for handling the dummy backend specifically,
+plus it fixes some bugs (e.g. not being able to write session
+files in a login dir that was not created).
+---
+ src/exec_utils.cc | 16 +++++++--
+ src/turnstiled.cc | 84 +++++++++++++++++++++++------------------------
+ 2 files changed, 55 insertions(+), 45 deletions(-)
+
+diff --git a/src/exec_utils.cc b/src/exec_utils.cc
+index 96440ec..aab57ba 100644
+--- a/src/exec_utils.cc
++++ b/src/exec_utils.cc
+@@ -280,13 +280,25 @@ static void fork_and_wait(
+ }
+ 
+ /* dummy "service manager" child process with none backend */
+-static void srv_dummy() {
++static void srv_dummy(unsigned int uid) {
+     /* block all signals except the ones we need to terminate */
+     sigset_t mask;
+     sigfillset(&mask);
+     /* kill/stop are ignored, but term is not */
+     sigdelset(&mask, SIGTERM);
+     sigprocmask(SIG_SETMASK, &mask, nullptr);
++    /* mark as ready */
++    char path[4096];
++    std::snprintf(
++        path, sizeof(path), "%s/%s/%u/ready", RUN_PATH, SOCK_DIR, uid
++    );
++    FILE *ready = std::fopen(path, "w");
++    if (!ready) {
++        perror("srv: could not open readiness fifo");
++        exit(1);
++    }
++    std::fprintf(ready, "boop\n");
++    std::fclose(ready);
+     /* this will sleep until a termination signal wakes it */
+     pause();
+     /* in which case just exit */
+@@ -337,7 +349,7 @@ void srv_child(login &lgn, char const *backend, bool make_rundir) {
+     }
+     /* dummy service manager if requested */
+     if (!backend) {
+-        srv_dummy();
++        srv_dummy(lgn.uid);
+         return;
+     }
+     /* change directory to home, fall back to / or error */
+diff --git a/src/turnstiled.cc b/src/turnstiled.cc
+index f33705c..f3166e9 100644
+--- a/src/turnstiled.cc
++++ b/src/turnstiled.cc
+@@ -135,51 +135,46 @@ static bool srv_start(login &lgn) {
+     std::snprintf(uidbuf, sizeof(uidbuf), "%u", lgn.uid);
+     /* mark as waiting */
+     lgn.srv_wait = true;
+-    bool has_backend = !cdata->disable && (
+-        (lgn.uid != 0) || cdata->root_session
+-    );
+     /* set up login dir */
+-    if (has_backend) {
+-        print_dbg("srv: create login dir for %u", lgn.uid);
+-        /* make the directory itself */
+-        lgn.dirfd = dir_make_at(dirfd_base, uidbuf, 0700);
+-        if (lgn.dirfd < 0) {
+-            print_err(
+-                "srv: failed to make login dir for %u (%s)",
+-                lgn.uid, strerror(errno)
+-            );
+-            return false;
+-        }
+-        /* ensure it's owned by the user */
+-        if (fchownat(
+-            dirfd_base, uidbuf, lgn.uid, lgn.gid, AT_SYMLINK_NOFOLLOW
+-        ) || fcntl(lgn.dirfd, F_SETFD, FD_CLOEXEC)) {
+-            print_err(
+-                "srv: login dir setup failed for %u (%s)",
+-                lgn.uid, strerror(errno)
+-            );
+-            lgn.remove_sdir();
+-            return false;
+-        }
+-        print_dbg("srv: create readiness pipe");
++    print_dbg("srv: create login dir for %u", lgn.uid);
++    /* make the directory itself */
++    lgn.dirfd = dir_make_at(dirfd_base, uidbuf, 0700);
++    if (lgn.dirfd < 0) {
++        print_err(
++            "srv: failed to make login dir for %u (%s)",
++            lgn.uid, strerror(errno)
++        );
++        return false;
++    }
++    /* ensure it's owned by the user */
++    if (fchownat(
++        dirfd_base, uidbuf, lgn.uid, lgn.gid, AT_SYMLINK_NOFOLLOW
++    ) || fcntl(lgn.dirfd, F_SETFD, FD_CLOEXEC)) {
++        print_err(
++            "srv: login dir setup failed for %u (%s)",
++            lgn.uid, strerror(errno)
++        );
++        lgn.remove_sdir();
++        return false;
++    }
++    print_dbg("srv: create readiness pipe");
++    unlinkat(lgn.dirfd, "ready", 0);
++    if (mkfifoat(lgn.dirfd, "ready", 0700) < 0) {
++        print_err("srv: failed to make ready pipe (%s)", strerror(errno));
++        return false;
++    }
++    /* ensure it's owned by user too, and open in nonblocking mode */
++    if (fchownat(
++        lgn.dirfd, "ready", lgn.uid, lgn.gid, AT_SYMLINK_NOFOLLOW
++    ) || ((lgn.userpipe = openat(
++        lgn.dirfd, "ready", O_NONBLOCK | O_RDONLY
++    )) < 0)) {
++        print_err(
++            "srv: failed to set up ready pipe (%s)", strerror(errno)
++        );
+         unlinkat(lgn.dirfd, "ready", 0);
+-        if (mkfifoat(lgn.dirfd, "ready", 0700) < 0) {
+-            print_err("srv: failed to make ready pipe (%s)", strerror(errno));
+-            return false;
+-        }
+-        /* ensure it's owned by user too, and open in nonblocking mode */
+-        if (fchownat(
+-            lgn.dirfd, "ready", lgn.uid, lgn.gid, AT_SYMLINK_NOFOLLOW
+-        ) || ((lgn.userpipe = openat(
+-            lgn.dirfd, "ready", O_NONBLOCK | O_RDONLY
+-        )) < 0)) {
+-            print_err(
+-                "srv: failed to set up ready pipe (%s)", strerror(errno)
+-            );
+-            unlinkat(lgn.dirfd, "ready", 0);
+-            lgn.remove_sdir();
+-            return false;
+-        }
++        lgn.remove_sdir();
++        return false;
+     }
+     /* set up the timer, issue SIGLARM when it fires */
+     print_dbg("srv: timer set");
+@@ -209,6 +204,9 @@ static bool srv_start(login &lgn) {
+         close(sigpipe[0]);
+         close(sigpipe[1]);
+         /* and run the login */
++        bool has_backend = !cdata->disable && (
++            (lgn.uid != 0) || cdata->root_session
++        );
+         srv_child(
+             lgn,
+             has_backend ? cdata->backend.data() : nullptr,
diff --git a/srcpkgs/turnstile/patches/fix-chdir.patch b/srcpkgs/turnstile/patches/fix-chdir.patch
new file mode 100644
index 00000000000000..3428fa79f77a1e
--- /dev/null
+++ b/srcpkgs/turnstile/patches/fix-chdir.patch
@@ -0,0 +1,25 @@
+From 00fd0b1ad7b5fd262bb83c75cb463ad32b1940c9 Mon Sep 17 00:00:00 2001
+From: q66 <q66@chimera-linux.org>
+Date: Wed, 29 Nov 2023 14:39:16 +0100
+Subject: [PATCH] exec_utils: fix operand for homedir chdir
+
+Using OR would result in the second operand running on success
+of the first so typically all the user services ended up starting
+in / by default.
+---
+ src/exec_utils.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/exec_utils.cc b/src/exec_utils.cc
+index aab57ba..c48f833 100644
+--- a/src/exec_utils.cc
++++ b/src/exec_utils.cc
+@@ -353,7 +353,7 @@ void srv_child(login &lgn, char const *backend, bool make_rundir) {
+         return;
+     }
+     /* change directory to home, fall back to / or error */
+-    if ((chdir(lgn.homedir.data()) < 0) || (chdir("/") < 0)) {
++    if ((chdir(lgn.homedir.data()) < 0) && (chdir("/") < 0)) {
+         perror("srv: failed to change directory");
+         return;
+     }
diff --git a/srcpkgs/turnstile/patches/runit.patch b/srcpkgs/turnstile/patches/runit.patch
new file mode 100644
index 00000000000000..b7a8c44e8c1b6f
--- /dev/null
+++ b/srcpkgs/turnstile/patches/runit.patch
@@ -0,0 +1,256 @@
+From 3974343c76392aad6f6998805fc0d2a6fa1eab8d Mon Sep 17 00:00:00 2001
+From: classabbyamp <dev@placeviolette.net>
+Date: Wed, 28 Jun 2023 05:05:25 -0400
+Subject: [PATCH] add runit backend
+
+---
+ backend/meson.build                   | 25 ++++++++
+ backend/runit                         | 88 +++++++++++++++++++++++++++
+ backend/runit.conf                    | 16 +++++
+ backend/turnstile-update-runit-env.in | 31 ++++++++++
+ meson.build                           | 14 +++--
+ meson_options.txt                     | 10 +++
+ 6 files changed, 180 insertions(+), 4 deletions(-)
+ create mode 100644 backend/runit
+ create mode 100644 backend/runit.conf
+ create mode 100644 backend/turnstile-update-runit-env.in
+
+diff --git a/backend/meson.build b/backend/meson.build
+index 681e6a0..5a5b200 100644
+--- a/backend/meson.build
++++ b/backend/meson.build
+@@ -13,3 +13,28 @@ if have_dinit
+         install_mode: 'rw-r--r--'
+     )
+ endif
++
++# runit backend
++
++if have_runit
++    install_data(
++        'runit',
++        install_dir: join_paths(get_option('libexecdir'), 'turnstile'),
++        install_mode: 'rwxr-xr-x'
++    )
++
++    install_data(
++        'runit.conf',
++        install_dir: join_paths(get_option('sysconfdir'), 'turnstile/backend'),
++        install_mode: 'rw-r--r--'
++    )
++
++    configure_file(
++        input: 'turnstile-update-runit-env.in',
++        output: 'turnstile-update-runit-env',
++        configuration: conf_data,
++        install: true,
++        install_dir: get_option('bindir'),
++        install_mode: 'rwxr-xr-x'
++    )
++endif
+diff --git a/backend/runit b/backend/runit
+new file mode 100644
+index 0000000..a9d7454
+--- /dev/null
++++ b/backend/runit
+@@ -0,0 +1,88 @@
++#!/bin/sh
++#
++# This is the turnstile runit backend. It accepts the action as its first
++# argument, which is either "ready", "run", or "stop". In case of "run", it's
++# invoked directly through /bin/sh as if it was a login shell, and therefore
++# it has acccess to shell profile, and the shebang is functionally useless but
++# should be preserved as a convention. For "ready", it's a regular shell.
++#
++# Arguments for "ready":
++#
++# ready_sv: path to the readiness service
++#
++# Arguments for "run":
++#
++# ready_p:  readiness pipe (fifo). has the path to the ready service written to it.
++# srvdir:   unused
++# confdir:  the path where turnstile's configuration data resides, used
++#           to source the configuration file
++#
++# Arguments for "stop":
++#
++# pid:      the PID of the service manager to stop (gracefully); it should
++#           terminate the services it's running and then stop itself
++#
++# Copyright 2023 classabbyamp <dev@placeviolette.net>
++# License: BSD-2-Clause
++
++case "$1" in
++    run) ;;
++    ready)
++        if [ -z "$2" ] || [ ! -d "$2" ]; then
++            echo "runit: invalid readiness service '$2'" >&2
++            exit 69
++        fi
++        exec sv start "$2" >&2
++        ;;
++    stop)
++        # If runsvdir receives a HUP signal, it sends a TERM signal to each
++        # runsv(8) process it is monitoring and then exits with 111.
++        exec kill -s HUP "$2"
++        ;;
++    *)
++        exit 32
++        ;;
++esac
++
++RUNIT_READY_PIPE="$2"
++RUNIT_CONF="$4/runit.conf"
++
++if [ ! -p "$RUNIT_READY_PIPE" ]; then
++    echo "runit: invalid input argument(s)" >&2
++    exit 69
++fi
++
++if [ -z "$HOME" ] || [ ! -d "$HOME" ]; then
++    echo "runit: invalid home directory" >&2
++    exit 70
++fi
++
++shift $#
++
++# be strict
++set -e
++
++# source the conf
++[ -r "$RUNIT_CONF" ] && . "$RUNIT_CONF"
++
++# set some defaults in case the conf cannot be read or is mangled
++: "${ready_sv:="turnstile-ready"}"
++: "${services_dir:="${HOME}/.config/service"}"
++: "${service_env_dir:="${HOME}/.config/service-env"}"
++
++mkdir -p "${services_dir}/${ready_sv}" > /dev/null 2>&1
++mkdir -p "${service_env_dir}" > /dev/null 2>&1
++
++# this must succeed
++cat << EOF > "${services_dir}/${ready_sv}/run"
++#!/bin/sh
++[ -r ./conf ] && . ./conf
++[ -n "\$core_services" ] && SVDIR=".." sv start \$core_services
++[ -p "$RUNIT_READY_PIPE" ] && printf "${services_dir}/${ready_sv}" > "$RUNIT_READY_PIPE"
++exec pause
++EOF
++chmod +x "${services_dir}/${ready_sv}/run"
++
++exec env TURNSTILE_ENV_DIR="$service_env_dir" \
++    runsvdir -P "$services_dir" \
++    'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+diff --git a/backend/runit.conf b/backend/runit.conf
+new file mode 100644
+index 0000000..88a2d04
+--- /dev/null
++++ b/backend/runit.conf
+@@ -0,0 +1,16 @@
++# This is the configuration file for turnstile's runit backend.
++#
++# It follows the POSIX shell syntax (being sourced into a script).
++# The complete launch environment available to dinit can be used.
++#
++# It is a low-level configuration file. In most cases, it should
++# not be modified by the user.
++
++# the name of the service that turnstile will check for login readiness
++ready_sv="turnstile-ready"
++
++# the directory user service files are read from.
++services_dir="${HOME}/.config/service"
++
++# the environment variable directory user service files can read from.
++service_env_dir="${HOME}/.config/service-env"
+diff --git a/backend/turnstile-update-runit-env.in b/backend/turnstile-update-runit-env.in
+new file mode 100644
+index 0000000..9999459
+--- /dev/null
++++ b/backend/turnstile-update-runit-env.in
+@@ -0,0 +1,31 @@
++#!/bin/sh
++# Copyright 2023 classabbyamp <dev@placeviolette.net>
++# License: BSD-2-Clause
++
++usage() {
++	cat <<-EOF
++	turnstile-update-runit-env [VAR] ...
++	Updates values in the shared chpst(8) env dir.
++	
++	If VAR is a variable name, the value is taken from the environment.
++	If VAR is VAR=VAL, sets VAR to VAL.
++	EOF
++}
++
++. @CONF_PATH@/backend/runit.conf
++
++if [ $# -eq 0 ] || [ "$1" = "-h" ]; then
++	usage
++	exit 0
++fi
++
++for var; do
++	case "$var" in
++	*=*)
++		eval echo "${var#*=}" > "$service_env_dir/${var%%=*}"
++		;;
++	*)
++		eval echo '$'"$var" > "$service_env_dir/$var"
++		;;
++	esac
++done
+diff --git a/meson.build b/meson.build
+index 762aac7..d5467a2 100644
+--- a/meson.build
++++ b/meson.build
+@@ -23,6 +23,7 @@ scdoc_dep = dependency(
+ )
+ 
+ have_dinit = get_option('dinit').enabled()
++have_runit = get_option('runit').enabled()
+ 
+ conf_data = configuration_data()
+ conf_data.set_quoted('RUN_PATH', get_option('rundir'))
+@@ -118,10 +119,15 @@ install_data(
+ )
+ 
+ # decide the default backend
+-if have_dinit
+-    default_backend = 'dinit'
+-else
+-    default_backend = 'none'
++default_backend = get_option('default_backend')
++if default_backend == ''
++    if have_dinit
++        default_backend = 'dinit'
++    elif have_runit
++        default_backend = 'runit'
++    else
++        default_backend = 'none'
++    endif
+ endif
+ 
+ uconf_data = configuration_data()
+diff --git a/meson_options.txt b/meson_options.txt
+index 9b03995..4325042 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -3,6 +3,16 @@ option('dinit',
+     description: 'Whether to install Dinit-related backend and data'
+ )
+ 
++option('runit',
++    type: 'feature', value: 'disabled',
++    description: 'Whether to install runit-related backend and data'
++)
++
++option('default_backend',
++    type: 'string', value: '',
++    description: 'Override the default backend'
++)
++
+ option('rundir',
+     type: 'string', value: '/run',
+     description: 'Where the base directory will be located'
diff --git a/srcpkgs/turnstile/template b/srcpkgs/turnstile/template
new file mode 100644
index 00000000000000..5a435e1ae64a04
--- /dev/null
+++ b/srcpkgs/turnstile/template
@@ -0,0 +1,24 @@
+# Template file for 'turnstile'
+pkgname=turnstile
+version=0.1.8
+revision=1
+build_style=meson
+configure_args="-Ddinit=enabled -Drunit=enabled -Ddefault_backend=runit
+ -Dmanage_rundir=true"
+hostmakedepends="pkg-config scdoc"
+makedepends="pam-devel"
+short_desc="Independent session/login tracker and user service manager"
+maintainer="classabbyamp <void@placeviolette.net>"
+license="BSD-2-Clause"
+homepage="https://github.com/chimera-linux/turnstile"
+distfiles="https://github.com/chimera-linux/turnstile/archive/refs/tags/v${version}.tar.gz"
+checksum=7eaab8c80c76ae9a9a711d7dc57ec346b9af09be99b526a5a3129a7fc9bd7a76
+conf_files="/etc/turnstile/turnstiled.conf"
+
+post_install() {
+	vsv turnstiled
+	vsconf "${FILESDIR}/dbus.run"
+	chmod +x "${DESTDIR}/usr/share/examples/turnstile/dbus.run"
+	vdoc "${FILESDIR}/README.voidlinux"
+	vlicense COPYING.md
+}

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PR PATCH] [Updated] New package: turnstile-0.1.8
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (51 preceding siblings ...)
  2024-03-22 20:31 ` [PR PATCH] [Updated] " classabbyamp
@ 2024-03-22 21:02 ` classabbyamp
  2024-03-22 21:11 ` [PR PATCH] [Merged]: " classabbyamp
  53 siblings, 0 replies; 55+ messages in thread
From: classabbyamp @ 2024-03-22 21:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 741 bytes --]

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages new/turnstile
https://github.com/void-linux/void-packages/pull/44676

New package: turnstile-0.1.8
WIP while i create the runit backend upstream ([mostly done](https://github.com/chimera-linux/turnstile/compare/master...classabbyamp:runit-backend))

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**



A patch file from https://github.com/void-linux/void-packages/pull/44676.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-new/turnstile-44676.patch --]
[-- Type: text/x-diff, Size: 38524 bytes --]

From f221363fbeaa3b8311eb5d59e60e34c95c2f455a Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 11 Jul 2023 22:02:49 -0400
Subject: [PATCH 1/5] polkit: patch to support turnstile

---
 srcpkgs/polkit/patches/turnstile.patch | 57 ++++++++++++++++++++++++++
 srcpkgs/polkit/template                |  2 +-
 2 files changed, 58 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/polkit/patches/turnstile.patch

diff --git a/srcpkgs/polkit/patches/turnstile.patch b/srcpkgs/polkit/patches/turnstile.patch
new file mode 100644
index 00000000000000..4f56ed130eefd4
--- /dev/null
+++ b/srcpkgs/polkit/patches/turnstile.patch
@@ -0,0 +1,57 @@
+commit 8d98aa421b92765695af13c033cf7e80375c03fe
+Author: q66 <q66@chimera-linux.org>
+Date:   Sun Jul 2 15:44:51 2023 +0200
+
+    ensure turnstile-session processes fall back to display check
+    
+    As turnstile session is shared between sessions, let us fall back
+    to the check for whether a graphical session is in place. We need
+    this as our dbus session bus is managed through turnstile. In
+    systemd-using systems there is no problem because user units are
+    not a part of any explicit session (we don't get this luxury
+    because using a session is the only way to make sure our pid is
+    tracked in systemd at all; we need that to be able to resolve
+    PID to UID).
+
+diff --git a/src/polkitbackend/polkitbackendsessionmonitor-systemd.c b/src/polkitbackend/polkitbackendsessionmonitor-systemd.c
+index b00cdbd..9a3f3c3 100644
+--- a/src/polkitbackend/polkitbackendsessionmonitor-systemd.c
++++ b/src/polkitbackend/polkitbackendsessionmonitor-systemd.c
+@@ -346,7 +346,7 @@ polkit_backend_session_monitor_get_session_for_subject (PolkitBackendSessionMoni
+   PolkitUnixProcess *tmp_process = NULL;
+   PolkitUnixProcess *process = NULL;
+   PolkitSubject *session = NULL;
+-  char *session_id = NULL;
++  char *session_id = NULL, *service_id = NULL;
+   pid_t pid;
+ #if HAVE_SD_UID_GET_DISPLAY
+   uid_t uid;
+@@ -377,8 +377,26 @@ polkit_backend_session_monitor_get_session_for_subject (PolkitBackendSessionMoni
+ 
+   if (sd_pid_get_session (pid, &session_id) >= 0)
+     {
+-      session = polkit_unix_session_new (session_id);
+-      goto out;
++      /* if belonging to turnstile, ignore */
++      if (sd_session_get_service (session_id, &service_id) >= 0)
++        {
++          if (strcmp (service_id, "turnstiled"))
++            {
++              free (service_id);
++              session = polkit_unix_session_new (session_id);
++              goto out;
++            }
++          else
++            {
++              /* turnstile-managed processes are shared */
++              free(service_id);
++            }
++        }
++      else
++        {
++          session = polkit_unix_session_new (session_id);
++          goto out;
++        }
+     }
+ 
+ #if HAVE_SD_UID_GET_DISPLAY
diff --git a/srcpkgs/polkit/template b/srcpkgs/polkit/template
index 84ab7453bb9b66..0435e1ce5976b8 100644
--- a/srcpkgs/polkit/template
+++ b/srcpkgs/polkit/template
@@ -1,7 +1,7 @@
 # Template file for 'polkit'
 pkgname=polkit
 version=121
-revision=1
+revision=2
 build_style=meson
 build_helper=gir
 configure_args="$(vopt_bool gir introspection) -Dman=true

From ebec18d806f62133a3a8985b36f1cbf6aeb98e0d Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sun, 2 Jul 2023 22:04:40 -0400
Subject: [PATCH 2/5] pam-base: add turnstile pam

---
 srcpkgs/pam-base/files/system-login | 1 +
 srcpkgs/pam-base/template           | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/pam-base/files/system-login b/srcpkgs/pam-base/files/system-login
index 2275deba480d3e..72c4638f07d3fe 100644
--- a/srcpkgs/pam-base/files/system-login
+++ b/srcpkgs/pam-base/files/system-login
@@ -14,6 +14,7 @@ session    optional   pam_loginuid.so
 session    include    system-auth
 session    optional   pam_motd.so          motd=/etc/motd
 session    optional   pam_mail.so          dir=/var/mail standard quiet
+-session   optional   pam_turnstile.so
 -session   optional   pam_elogind.so
 -session   optional   pam_dumb_runtime_dir.so
 session    required   pam_env.so
diff --git a/srcpkgs/pam-base/template b/srcpkgs/pam-base/template
index 70dfab9fa9965a..38bfa74cd88560 100644
--- a/srcpkgs/pam-base/template
+++ b/srcpkgs/pam-base/template
@@ -1,7 +1,7 @@
 # Template file for 'pam-base'
 pkgname=pam-base
 version=0.4
-revision=2
+revision=3
 short_desc="PAM base configuration files"
 maintainer="Érico Nogueira <ericonr@disroot.org>"
 license="Public Domain"

From 12610c1511bea0bfa9ecf333bce2281a09bc1eae Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 12 Sep 2023 18:54:27 -0400
Subject: [PATCH 3/5] gdm: patch pam files for turnstile

---
 srcpkgs/gdm/patches/pam-turnstile-elogind.patch | 13 +++++++++++++
 srcpkgs/gdm/template                            |  2 +-
 2 files changed, 14 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/gdm/patches/pam-turnstile-elogind.patch

diff --git a/srcpkgs/gdm/patches/pam-turnstile-elogind.patch b/srcpkgs/gdm/patches/pam-turnstile-elogind.patch
new file mode 100644
index 00000000000000..23f71ffa6633a2
--- /dev/null
+++ b/srcpkgs/gdm/patches/pam-turnstile-elogind.patch
@@ -0,0 +1,13 @@
+pam_turnstile allows turnstile to integrate with gdm
+
+See also: https://github.com/chimera-linux/cports/blob/master/main/gdm/patches/pam.patch
+
+--- a/data/pam-arch/gdm-launch-environment.pam
++++ b/data/pam-arch/gdm-launch-environment.pam
+@@ -14,6 +14,7 @@
+ session    required                    pam_succeed_if.so    audit quiet_success user in gdm:gnome-initial-setup
+ session    optional                    pam_permit.so
+ -session   optional                    pam_systemd.so
++-session   optional                    pam_turnstile.so
+ -session   optional                    pam_elogind.so
+ session    required                    pam_env.so
diff --git a/srcpkgs/gdm/template b/srcpkgs/gdm/template
index c171f236442515..128253f83f885c 100644
--- a/srcpkgs/gdm/template
+++ b/srcpkgs/gdm/template
@@ -1,7 +1,7 @@
 # Template file for 'gdm'
 pkgname=gdm
 version=45.0.1
-revision=1
+revision=2
 build_helper="gir"
 build_style=meson
 configure_args="

From 1fe1a233b26fc98e573dfecbe4abee20855a50f1 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 12 Sep 2023 18:54:33 -0400
Subject: [PATCH 4/5] lightdm: patch pam files for turnstile

---
 .../patches/pam-turnstile-elogind.patch       | 32 +++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 srcpkgs/lightdm/patches/pam-turnstile-elogind.patch

diff --git a/srcpkgs/lightdm/patches/pam-turnstile-elogind.patch b/srcpkgs/lightdm/patches/pam-turnstile-elogind.patch
new file mode 100644
index 00000000000000..3a54cdd326166a
--- /dev/null
+++ b/srcpkgs/lightdm/patches/pam-turnstile-elogind.patch
@@ -0,0 +1,32 @@
+1. pam_systemd doesn't exist on void, use pam_elogind instead
+2. pam_turnstile allows turnstile to integrate with lightdm
+
+See also: https://github.com/chimera-linux/cports/blob/master/main/gdm/patches/pam.patch
+
+--- a/data/pam/lightdm
++++ b/data/pam/lightdm
+@@ -17,4 +17,6 @@
+ 
+ # Setup session
+ session   required pam_unix.so
++- session   optional pam_turnstile.so
++- session   optional pam_elogind.so
+ session   optional pam_systemd.so
+--- a/data/pam/lightdm-autologin
++++ b/data/pam/lightdm-autologin
+@@ -19,4 +19,6 @@
+ 
+ # Setup session
+ session   required pam_unix.so
++- session   optional pam_turnstile.so
++- session   optional pam_elogind.so
+ session   optional pam_systemd.so
+--- a/data/pam/lightdm-greeter
++++ b/data/pam/lightdm-greeter
+@@ -14,4 +14,6 @@
+ 
+ # Setup session
+ session   required pam_unix.so
++- session   optional pam_turnstile.so
++- session   optional pam_elogind.so
+ session   optional pam_systemd.so

From f62fa6d89c6f54cacab375a2a204b73dbb4b29a4 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Wed, 28 Jun 2023 05:10:55 -0400
Subject: [PATCH 5/5] New package: turnstile-0.1.8

---
 srcpkgs/turnstile/files/README.voidlinux     |  50 ++++
 srcpkgs/turnstile/files/dbus.run             |  11 +
 srcpkgs/turnstile/files/turnstiled/run       |   4 +
 srcpkgs/turnstile/patches/defer-rundir.patch | 121 ++++++++
 srcpkgs/turnstile/patches/dummy.patch        | 300 +++++++++++++++++++
 srcpkgs/turnstile/patches/fix-chdir.patch    |  25 ++
 srcpkgs/turnstile/patches/runit.patch        | 256 ++++++++++++++++
 srcpkgs/turnstile/template                   |  24 ++
 8 files changed, 791 insertions(+)
 create mode 100644 srcpkgs/turnstile/files/README.voidlinux
 create mode 100755 srcpkgs/turnstile/files/dbus.run
 create mode 100644 srcpkgs/turnstile/files/turnstiled/run
 create mode 100644 srcpkgs/turnstile/patches/defer-rundir.patch
 create mode 100644 srcpkgs/turnstile/patches/dummy.patch
 create mode 100644 srcpkgs/turnstile/patches/fix-chdir.patch
 create mode 100644 srcpkgs/turnstile/patches/runit.patch
 create mode 100644 srcpkgs/turnstile/template

diff --git a/srcpkgs/turnstile/files/README.voidlinux b/srcpkgs/turnstile/files/README.voidlinux
new file mode 100644
index 00000000000000..32025131de7d62
--- /dev/null
+++ b/srcpkgs/turnstile/files/README.voidlinux
@@ -0,0 +1,50 @@
+# User Services
+
+User services can be placed in ~/.config/service/.
+
+To ensure that a subset of services are started before login can proceed,
+these services can be listed in ~/.config/service/turnstile-ready/conf, for
+example:
+
+	core_services="dbus foo"
+
+The turnstile-ready service is created by turnstile on first login.
+
+## Shared Environment for User Services
+
+To give user services access to important environment variables, chpst's
+envdir functionality can be used. See chpst(8) (-e flag) for more info.
+
+To make a service aware of these variables:
+
+	- exec foo
+	+ exec chpst -e "$TURNSTILE_ENV_DIR" foo
+
+Inside user services, the convenience variable "$TURNSTILE_ENV_DIR" can be used
+to refer to this directory.
+
+The helper script 'turnstile-update-runit-env' can be used to easily update
+variables in this shared envdir:
+
+	turnstile-update-runit-env DISPLAY XAUTHORITY FOO=bar BAZ=
+
+# D-Bus Session Bus
+
+If you want to manage dbus using a turnstile-managed runit user service:
+
+	mkdir ~/.config/service/dbus
+	ln -s /usr/share/examples/turnstile/dbus.run ~/.config/service/dbus/run
+
+# Elogind Replacement
+
+Turnstile is not (nor ever will be, according to the developer) a complete
+replacement for elogind, but it can replace several parts, including
+XDG_RUNTIME_DIR management.
+
+If using turnstile with elogind:
+- disable rundir management in /etc/turnstile/turnstiled.conf
+  (manage_rundir = no)
+
+If using turnstile without elogind:
+- install and enable seatd for seat management
+- install and enable acpid for lid switch/button handling
diff --git a/srcpkgs/turnstile/files/dbus.run b/srcpkgs/turnstile/files/dbus.run
new file mode 100755
index 00000000000000..dc7473e45fc52f
--- /dev/null
+++ b/srcpkgs/turnstile/files/dbus.run
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+[ -r ./conf ] && . ./conf
+
+: "${DBUS_SESSION_BUS_ADDRESS:=unix:path=/run/user/$(id -u)/bus}"
+
+if [ -d "$TURNSTILE_ENV_DIR" ]; then
+	echo "$DBUS_SESSION_BUS_ADDRESS" > "$TURNSTILE_ENV_DIR"/DBUS_SESSION_BUS_ADDRESS
+fi
+
+exec chpst -e "$TURNSTILE_ENV_DIR" dbus-daemon --session --nofork --nopidfile --address="$DBUS_SESSION_BUS_ADDRESS" $OPTS
diff --git a/srcpkgs/turnstile/files/turnstiled/run b/srcpkgs/turnstile/files/turnstiled/run
new file mode 100644
index 00000000000000..aa5d624fda19a1
--- /dev/null
+++ b/srcpkgs/turnstile/files/turnstiled/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+exec 2>&1
+exec turnstiled
diff --git a/srcpkgs/turnstile/patches/defer-rundir.patch b/srcpkgs/turnstile/patches/defer-rundir.patch
new file mode 100644
index 00000000000000..33b94a1489b3dc
--- /dev/null
+++ b/srcpkgs/turnstile/patches/defer-rundir.patch
@@ -0,0 +1,121 @@
+From cae619b4f23c7b1bc44ba8cef59d004a1911a01d Mon Sep 17 00:00:00 2001
+From: q66 <q66@chimera-linux.org>
+Date: Fri, 1 Sep 2023 22:57:46 +0200
+Subject: [PATCH] defer creation of rundir for after pam session is established
+
+---
+ src/exec_utils.cc | 19 ++++++++++++++++++-
+ src/turnstiled.cc | 16 +++++-----------
+ src/turnstiled.hh |  2 +-
+ 3 files changed, 24 insertions(+), 13 deletions(-)
+
+diff --git a/src/exec_utils.cc b/src/exec_utils.cc
+index 49918be..96440ec 100644
+--- a/src/exec_utils.cc
++++ b/src/exec_utils.cc
+@@ -106,6 +106,8 @@ static pam_handle_t *dpam_begin(char const *user, unsigned int gid) {
+ static void sanitize_limits() {
+     struct rlimit l{0, 0};
+ 
++    print_dbg("srv: sanitize rlimits");
++
+     setrlimit(RLIMIT_NICE, &l);
+     setrlimit(RLIMIT_RTPRIO, &l);
+ 
+@@ -129,6 +131,8 @@ static bool dpam_open(pam_handle_t *pamh) {
+     /* before opening session, do not rely on just PAM and sanitize a bit */
+     sanitize_limits();
+ 
++    print_dbg("srv: open pam session");
++
+     auto pst = pam_open_session(pamh, 0);
+     if (pst != PAM_SUCCESS) {
+         fprintf(stderr, "srv: pam_open_session: %s", pam_strerror(pamh, pst));
+@@ -136,6 +140,7 @@ static bool dpam_open(pam_handle_t *pamh) {
+         pam_end(pamh, pst);
+         return false;
+     }
++
+     return true;
+ }
+ 
+@@ -288,7 +293,7 @@ static void srv_dummy() {
+     exit(0);
+ }
+ 
+-void srv_child(login &lgn, char const *backend) {
++void srv_child(login &lgn, char const *backend, bool make_rundir) {
+     pam_handle_t *pamh = nullptr;
+     bool is_root = (getuid() == 0);
+     /* create a new session */
+@@ -297,11 +302,23 @@ void srv_child(login &lgn, char const *backend) {
+     }
+     /* begin pam session setup */
+     if (is_root) {
++        print_dbg("srv: establish pam");
+         pamh = dpam_begin(lgn.username.data(), lgn.gid);
+         if (!dpam_open(pamh)) {
+             return;
+         }
+     }
++    /* make rundir if needed, we want to make it as late as possible, ideally
++     * after the PAM session setup is already finalized (so that nothing gets
++     * the idea to nuke it), but before we fork and drop privileges
++     */
++    if (make_rundir) {
++        print_dbg("srv: setup rundir for %u", lgn.uid);
++        if (!rundir_make(lgn.rundir.data(), lgn.uid, lgn.gid)) {
++            return;
++        }
++    }
++    print_dbg("srv: forking for service manager exec");
+     /* handle the parent/child logic here
+      * if we're forking, only child makes it past this func
+      */
+diff --git a/src/turnstiled.cc b/src/turnstiled.cc
+index 71f8372..a886739 100644
+--- a/src/turnstiled.cc
++++ b/src/turnstiled.cc
+@@ -124,16 +124,6 @@ static bool srv_start(login &lgn) {
+     std::snprintf(uidbuf, sizeof(uidbuf), "%u", lgn.uid);
+     /* mark as waiting */
+     lgn.srv_wait = true;
+-    /* make rundir if needed, we don't want to create that and login dir
+-     * any earlier than here as here we are sure the previous instance has
+-     * definitely terminated and stuff like login dirfd is actually clear
+-     */
+-    if (cdata->manage_rdir) {
+-        print_dbg("srv: setup rundir for %u", lgn.uid);
+-        if (!rundir_make(lgn.rundir.data(), lgn.uid, lgn.gid)) {
+-            return false;
+-        }
+-    }
+     bool has_backend = !cdata->disable && (
+         (lgn.uid != 0) || cdata->root_session
+     );
+@@ -208,7 +198,11 @@ static bool srv_start(login &lgn) {
+         close(sigpipe[0]);
+         close(sigpipe[1]);
+         /* and run the login */
+-        srv_child(lgn, has_backend ? cdata->backend.data() : nullptr);
++        srv_child(
++            lgn,
++            has_backend ? cdata->backend.data() : nullptr,
++            cdata->manage_rdir
++        );
+         exit(1);
+     } else if (pid < 0) {
+         print_err("srv: fork failed (%s)", strerror(errno));
+diff --git a/src/turnstiled.hh b/src/turnstiled.hh
+index d80043c..479ef83 100644
+--- a/src/turnstiled.hh
++++ b/src/turnstiled.hh
+@@ -144,7 +144,7 @@ void cfg_expand_rundir(
+ );
+ 
+ /* service manager utilities */
+-void srv_child(login &sess, char const *backend);
++void srv_child(login &sess, char const *backend, bool make_rundir);
+ bool srv_boot(login &sess, char const *backend);
+ 
+ struct cfg_data {
diff --git a/srcpkgs/turnstile/patches/dummy.patch b/srcpkgs/turnstile/patches/dummy.patch
new file mode 100644
index 00000000000000..693cdbe310efd7
--- /dev/null
+++ b/srcpkgs/turnstile/patches/dummy.patch
@@ -0,0 +1,300 @@
+From b7f8fd1c1d6493a83d52347be65a6c6535d5c18f Mon Sep 17 00:00:00 2001
+From: q66 <q66@chimera-linux.org>
+Date: Sat, 2 Sep 2023 14:06:34 +0200
+Subject: [PATCH] write session data in a separate sessions directory
+
+We need this because all of the session data should be publicly
+accessible, while the sessions' individual state directories are
+not.
+
+Also prepare a separate directory for user tracking.
+---
+ src/turnstiled.cc | 52 +++++++++++++++++++++++++++++++++--------------
+ 1 file changed, 37 insertions(+), 15 deletions(-)
+
+diff --git a/src/turnstiled.cc b/src/turnstiled.cc
+index a886739..861c1fe 100644
+--- a/src/turnstiled.cc
++++ b/src/turnstiled.cc
+@@ -58,7 +58,11 @@ static constexpr std::time_t kill_timeout = 60;
+ cfg_data *cdata = nullptr;
+ 
+ /* the file descriptor for the base directory */
+-static int userv_dirfd = -1;
++static int dirfd_base = -1;
++/* the file descriptor for the users directory */
++static int dirfd_users = -1;
++/* the file descriptor for the sessions directory */
++static int dirfd_sessions = -1;
+ 
+ login::login() {
+     timer_sev.sigev_notify = SIGEV_SIGNAL;
+@@ -70,7 +74,7 @@ login::login() {
+ void login::remove_sdir() {
+     char buf[32];
+     std::snprintf(buf, sizeof(buf), "%u", this->uid);
+-    unlinkat(userv_dirfd, buf, AT_REMOVEDIR);
++    unlinkat(dirfd_base, buf, AT_REMOVEDIR);
+     /* just in case, we know this is a named pipe */
+     unlinkat(this->dirfd, "ready", 0);
+     dir_clear_contents(this->dirfd);
+@@ -131,7 +135,7 @@ static bool srv_start(login &lgn) {
+     if (has_backend) {
+         print_dbg("srv: create login dir for %u", lgn.uid);
+         /* make the directory itself */
+-        lgn.dirfd = dir_make_at(userv_dirfd, uidbuf, 0700);
++        lgn.dirfd = dir_make_at(dirfd_base, uidbuf, 0700);
+         if (lgn.dirfd < 0) {
+             print_err(
+                 "srv: failed to make login dir for %u (%s)",
+@@ -141,7 +145,7 @@ static bool srv_start(login &lgn) {
+         }
+         /* ensure it's owned by the user */
+         if (fchownat(
+-            userv_dirfd, uidbuf, lgn.uid, lgn.gid, AT_SYMLINK_NOFOLLOW
++            dirfd_base, uidbuf, lgn.uid, lgn.gid, AT_SYMLINK_NOFOLLOW
+         ) || fcntl(lgn.dirfd, F_SETFD, FD_CLOEXEC)) {
+             print_err(
+                 "srv: login dir setup failed for %u (%s)",
+@@ -194,7 +198,7 @@ static bool srv_start(login &lgn) {
+         sigaction(SIGINT, &sa, nullptr);
+         /* close some descriptors, these can be reused */
+         close(lgn.userpipe);
+-        close(userv_dirfd);
++        close(dirfd_base);
+         close(sigpipe[0]);
+         close(sigpipe[1]);
+         /* and run the login */
+@@ -317,11 +321,13 @@ static session *handle_session_new(int fd, unsigned int uid) {
+ 
+ static bool write_sdata(session const &sess) {
+     char sessname[64], tmpname[64];
+-    std::snprintf(tmpname, sizeof(tmpname), "session.%lu.tmp", sess.id);
+-    std::snprintf(sessname, sizeof(sessname), "session.%lu", sess.id);
++    std::snprintf(tmpname, sizeof(tmpname), "%lu.tmp", sess.id);
++    std::snprintf(sessname, sizeof(sessname), "%lu", sess.id);
+     auto &lgn = *sess.lgn;
+     int omask = umask(0);
+-    int sessfd = openat(lgn.dirfd, tmpname, O_CREAT | O_TRUNC | O_WRONLY, 0644);
++    int sessfd = openat(
++        dirfd_sessions, tmpname, O_CREAT | O_TRUNC | O_WRONLY, 0644
++    );
+     if (sessfd < 0) {
+         print_err("msg: session tmpfile failed (%s)", strerror(errno));
+         umask(omask);
+@@ -365,9 +371,9 @@ static bool write_sdata(session const &sess) {
+     /* done writing */
+     std::fclose(sessf);
+     /* now rename to real file */
+-    if (renameat(lgn.dirfd, tmpname, lgn.dirfd, sessname) < 0) {
++    if (renameat(dirfd_sessions, tmpname, dirfd_sessions, sessname) < 0) {
+         print_err("msg: session renameat failed (%s)", strerror(errno));
+-        unlinkat(lgn.dirfd, tmpname, 0);
++        unlinkat(dirfd_sessions, tmpname, 0);
+         return false;
+     }
+     return true;
+@@ -375,8 +381,8 @@ static bool write_sdata(session const &sess) {
+ 
+ static void drop_sdata(session const &sess) {
+     char sessname[64];
+-    std::snprintf(sessname, sizeof(sessname), "session.%lu", sess.id);
+-    unlinkat(sess.lgn->dirfd, sessname, 0);
++    std::snprintf(sessname, sizeof(sessname), "%lu", sess.id);
++    unlinkat(dirfd_sessions, sessname, 0);
+ }
+ 
+ static bool sock_block(int fd, short events) {
+@@ -1173,15 +1179,31 @@ int main(int argc, char **argv) {
+             print_err("turnstiled base path does not exist");
+             return 1;
+         }
+-        userv_dirfd = dir_make_at(dfd, SOCK_DIR, 0755);
+-        if (userv_dirfd < 0) {
++        dirfd_base = dir_make_at(dfd, SOCK_DIR, 0755);
++        if (dirfd_base < 0) {
+             print_err("failed to create base directory (%s)", strerror(errno));
+             return 1;
+         }
++        dirfd_users = dir_make_at(dirfd_base, "users", 0755);
++        if (dirfd_users < 0) {
++            print_err("failed to create users directory (%s)", strerror(errno));
++            return 1;
++        }
++        dirfd_sessions = dir_make_at(dirfd_base, "sessions", 0755);
++        if (dirfd_sessions < 0) {
++            print_err(
++                "failed to create sessions directory (%s)", strerror(errno)
++            );
++            return 1;
++        }
+         close(dfd);
+     }
+     /* ensure it is not accessible by service manager child processes */
+-    if (fcntl(userv_dirfd, F_SETFD, FD_CLOEXEC)) {
++    if (
++        fcntl(dirfd_base, F_SETFD, FD_CLOEXEC) ||
++        fcntl(dirfd_users, F_SETFD, FD_CLOEXEC) ||
++        fcntl(dirfd_sessions, F_SETFD, FD_CLOEXEC)
++    ) {
+         print_err("fcntl failed (%s)", strerror(errno));
+         return 1;
+     }
+
+From 27f29a523cb75ba778ca538d319181a60c533eb4 Mon Sep 17 00:00:00 2001
+From: q66 <q66@chimera-linux.org>
+Date: Sun, 3 Sep 2023 16:32:16 +0200
+Subject: [PATCH] treat dummy service backend the same as a regular one
+
+This means less code for handling the dummy backend specifically,
+plus it fixes some bugs (e.g. not being able to write session
+files in a login dir that was not created).
+---
+ src/exec_utils.cc | 16 +++++++--
+ src/turnstiled.cc | 84 +++++++++++++++++++++++------------------------
+ 2 files changed, 55 insertions(+), 45 deletions(-)
+
+diff --git a/src/exec_utils.cc b/src/exec_utils.cc
+index 96440ec..aab57ba 100644
+--- a/src/exec_utils.cc
++++ b/src/exec_utils.cc
+@@ -280,13 +280,25 @@ static void fork_and_wait(
+ }
+ 
+ /* dummy "service manager" child process with none backend */
+-static void srv_dummy() {
++static void srv_dummy(unsigned int uid) {
+     /* block all signals except the ones we need to terminate */
+     sigset_t mask;
+     sigfillset(&mask);
+     /* kill/stop are ignored, but term is not */
+     sigdelset(&mask, SIGTERM);
+     sigprocmask(SIG_SETMASK, &mask, nullptr);
++    /* mark as ready */
++    char path[4096];
++    std::snprintf(
++        path, sizeof(path), "%s/%s/%u/ready", RUN_PATH, SOCK_DIR, uid
++    );
++    FILE *ready = std::fopen(path, "w");
++    if (!ready) {
++        perror("srv: could not open readiness fifo");
++        exit(1);
++    }
++    std::fprintf(ready, "boop\n");
++    std::fclose(ready);
+     /* this will sleep until a termination signal wakes it */
+     pause();
+     /* in which case just exit */
+@@ -337,7 +349,7 @@ void srv_child(login &lgn, char const *backend, bool make_rundir) {
+     }
+     /* dummy service manager if requested */
+     if (!backend) {
+-        srv_dummy();
++        srv_dummy(lgn.uid);
+         return;
+     }
+     /* change directory to home, fall back to / or error */
+diff --git a/src/turnstiled.cc b/src/turnstiled.cc
+index f33705c..f3166e9 100644
+--- a/src/turnstiled.cc
++++ b/src/turnstiled.cc
+@@ -135,51 +135,46 @@ static bool srv_start(login &lgn) {
+     std::snprintf(uidbuf, sizeof(uidbuf), "%u", lgn.uid);
+     /* mark as waiting */
+     lgn.srv_wait = true;
+-    bool has_backend = !cdata->disable && (
+-        (lgn.uid != 0) || cdata->root_session
+-    );
+     /* set up login dir */
+-    if (has_backend) {
+-        print_dbg("srv: create login dir for %u", lgn.uid);
+-        /* make the directory itself */
+-        lgn.dirfd = dir_make_at(dirfd_base, uidbuf, 0700);
+-        if (lgn.dirfd < 0) {
+-            print_err(
+-                "srv: failed to make login dir for %u (%s)",
+-                lgn.uid, strerror(errno)
+-            );
+-            return false;
+-        }
+-        /* ensure it's owned by the user */
+-        if (fchownat(
+-            dirfd_base, uidbuf, lgn.uid, lgn.gid, AT_SYMLINK_NOFOLLOW
+-        ) || fcntl(lgn.dirfd, F_SETFD, FD_CLOEXEC)) {
+-            print_err(
+-                "srv: login dir setup failed for %u (%s)",
+-                lgn.uid, strerror(errno)
+-            );
+-            lgn.remove_sdir();
+-            return false;
+-        }
+-        print_dbg("srv: create readiness pipe");
++    print_dbg("srv: create login dir for %u", lgn.uid);
++    /* make the directory itself */
++    lgn.dirfd = dir_make_at(dirfd_base, uidbuf, 0700);
++    if (lgn.dirfd < 0) {
++        print_err(
++            "srv: failed to make login dir for %u (%s)",
++            lgn.uid, strerror(errno)
++        );
++        return false;
++    }
++    /* ensure it's owned by the user */
++    if (fchownat(
++        dirfd_base, uidbuf, lgn.uid, lgn.gid, AT_SYMLINK_NOFOLLOW
++    ) || fcntl(lgn.dirfd, F_SETFD, FD_CLOEXEC)) {
++        print_err(
++            "srv: login dir setup failed for %u (%s)",
++            lgn.uid, strerror(errno)
++        );
++        lgn.remove_sdir();
++        return false;
++    }
++    print_dbg("srv: create readiness pipe");
++    unlinkat(lgn.dirfd, "ready", 0);
++    if (mkfifoat(lgn.dirfd, "ready", 0700) < 0) {
++        print_err("srv: failed to make ready pipe (%s)", strerror(errno));
++        return false;
++    }
++    /* ensure it's owned by user too, and open in nonblocking mode */
++    if (fchownat(
++        lgn.dirfd, "ready", lgn.uid, lgn.gid, AT_SYMLINK_NOFOLLOW
++    ) || ((lgn.userpipe = openat(
++        lgn.dirfd, "ready", O_NONBLOCK | O_RDONLY
++    )) < 0)) {
++        print_err(
++            "srv: failed to set up ready pipe (%s)", strerror(errno)
++        );
+         unlinkat(lgn.dirfd, "ready", 0);
+-        if (mkfifoat(lgn.dirfd, "ready", 0700) < 0) {
+-            print_err("srv: failed to make ready pipe (%s)", strerror(errno));
+-            return false;
+-        }
+-        /* ensure it's owned by user too, and open in nonblocking mode */
+-        if (fchownat(
+-            lgn.dirfd, "ready", lgn.uid, lgn.gid, AT_SYMLINK_NOFOLLOW
+-        ) || ((lgn.userpipe = openat(
+-            lgn.dirfd, "ready", O_NONBLOCK | O_RDONLY
+-        )) < 0)) {
+-            print_err(
+-                "srv: failed to set up ready pipe (%s)", strerror(errno)
+-            );
+-            unlinkat(lgn.dirfd, "ready", 0);
+-            lgn.remove_sdir();
+-            return false;
+-        }
++        lgn.remove_sdir();
++        return false;
+     }
+     /* set up the timer, issue SIGLARM when it fires */
+     print_dbg("srv: timer set");
+@@ -209,6 +204,9 @@ static bool srv_start(login &lgn) {
+         close(sigpipe[0]);
+         close(sigpipe[1]);
+         /* and run the login */
++        bool has_backend = !cdata->disable && (
++            (lgn.uid != 0) || cdata->root_session
++        );
+         srv_child(
+             lgn,
+             has_backend ? cdata->backend.data() : nullptr,
diff --git a/srcpkgs/turnstile/patches/fix-chdir.patch b/srcpkgs/turnstile/patches/fix-chdir.patch
new file mode 100644
index 00000000000000..3428fa79f77a1e
--- /dev/null
+++ b/srcpkgs/turnstile/patches/fix-chdir.patch
@@ -0,0 +1,25 @@
+From 00fd0b1ad7b5fd262bb83c75cb463ad32b1940c9 Mon Sep 17 00:00:00 2001
+From: q66 <q66@chimera-linux.org>
+Date: Wed, 29 Nov 2023 14:39:16 +0100
+Subject: [PATCH] exec_utils: fix operand for homedir chdir
+
+Using OR would result in the second operand running on success
+of the first so typically all the user services ended up starting
+in / by default.
+---
+ src/exec_utils.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/exec_utils.cc b/src/exec_utils.cc
+index aab57ba..c48f833 100644
+--- a/src/exec_utils.cc
++++ b/src/exec_utils.cc
+@@ -353,7 +353,7 @@ void srv_child(login &lgn, char const *backend, bool make_rundir) {
+         return;
+     }
+     /* change directory to home, fall back to / or error */
+-    if ((chdir(lgn.homedir.data()) < 0) || (chdir("/") < 0)) {
++    if ((chdir(lgn.homedir.data()) < 0) && (chdir("/") < 0)) {
+         perror("srv: failed to change directory");
+         return;
+     }
diff --git a/srcpkgs/turnstile/patches/runit.patch b/srcpkgs/turnstile/patches/runit.patch
new file mode 100644
index 00000000000000..b7a8c44e8c1b6f
--- /dev/null
+++ b/srcpkgs/turnstile/patches/runit.patch
@@ -0,0 +1,256 @@
+From 3974343c76392aad6f6998805fc0d2a6fa1eab8d Mon Sep 17 00:00:00 2001
+From: classabbyamp <dev@placeviolette.net>
+Date: Wed, 28 Jun 2023 05:05:25 -0400
+Subject: [PATCH] add runit backend
+
+---
+ backend/meson.build                   | 25 ++++++++
+ backend/runit                         | 88 +++++++++++++++++++++++++++
+ backend/runit.conf                    | 16 +++++
+ backend/turnstile-update-runit-env.in | 31 ++++++++++
+ meson.build                           | 14 +++--
+ meson_options.txt                     | 10 +++
+ 6 files changed, 180 insertions(+), 4 deletions(-)
+ create mode 100644 backend/runit
+ create mode 100644 backend/runit.conf
+ create mode 100644 backend/turnstile-update-runit-env.in
+
+diff --git a/backend/meson.build b/backend/meson.build
+index 681e6a0..5a5b200 100644
+--- a/backend/meson.build
++++ b/backend/meson.build
+@@ -13,3 +13,28 @@ if have_dinit
+         install_mode: 'rw-r--r--'
+     )
+ endif
++
++# runit backend
++
++if have_runit
++    install_data(
++        'runit',
++        install_dir: join_paths(get_option('libexecdir'), 'turnstile'),
++        install_mode: 'rwxr-xr-x'
++    )
++
++    install_data(
++        'runit.conf',
++        install_dir: join_paths(get_option('sysconfdir'), 'turnstile/backend'),
++        install_mode: 'rw-r--r--'
++    )
++
++    configure_file(
++        input: 'turnstile-update-runit-env.in',
++        output: 'turnstile-update-runit-env',
++        configuration: conf_data,
++        install: true,
++        install_dir: get_option('bindir'),
++        install_mode: 'rwxr-xr-x'
++    )
++endif
+diff --git a/backend/runit b/backend/runit
+new file mode 100644
+index 0000000..a9d7454
+--- /dev/null
++++ b/backend/runit
+@@ -0,0 +1,88 @@
++#!/bin/sh
++#
++# This is the turnstile runit backend. It accepts the action as its first
++# argument, which is either "ready", "run", or "stop". In case of "run", it's
++# invoked directly through /bin/sh as if it was a login shell, and therefore
++# it has acccess to shell profile, and the shebang is functionally useless but
++# should be preserved as a convention. For "ready", it's a regular shell.
++#
++# Arguments for "ready":
++#
++# ready_sv: path to the readiness service
++#
++# Arguments for "run":
++#
++# ready_p:  readiness pipe (fifo). has the path to the ready service written to it.
++# srvdir:   unused
++# confdir:  the path where turnstile's configuration data resides, used
++#           to source the configuration file
++#
++# Arguments for "stop":
++#
++# pid:      the PID of the service manager to stop (gracefully); it should
++#           terminate the services it's running and then stop itself
++#
++# Copyright 2023 classabbyamp <dev@placeviolette.net>
++# License: BSD-2-Clause
++
++case "$1" in
++    run) ;;
++    ready)
++        if [ -z "$2" ] || [ ! -d "$2" ]; then
++            echo "runit: invalid readiness service '$2'" >&2
++            exit 69
++        fi
++        exec sv start "$2" >&2
++        ;;
++    stop)
++        # If runsvdir receives a HUP signal, it sends a TERM signal to each
++        # runsv(8) process it is monitoring and then exits with 111.
++        exec kill -s HUP "$2"
++        ;;
++    *)
++        exit 32
++        ;;
++esac
++
++RUNIT_READY_PIPE="$2"
++RUNIT_CONF="$4/runit.conf"
++
++if [ ! -p "$RUNIT_READY_PIPE" ]; then
++    echo "runit: invalid input argument(s)" >&2
++    exit 69
++fi
++
++if [ -z "$HOME" ] || [ ! -d "$HOME" ]; then
++    echo "runit: invalid home directory" >&2
++    exit 70
++fi
++
++shift $#
++
++# be strict
++set -e
++
++# source the conf
++[ -r "$RUNIT_CONF" ] && . "$RUNIT_CONF"
++
++# set some defaults in case the conf cannot be read or is mangled
++: "${ready_sv:="turnstile-ready"}"
++: "${services_dir:="${HOME}/.config/service"}"
++: "${service_env_dir:="${HOME}/.config/service-env"}"
++
++mkdir -p "${services_dir}/${ready_sv}" > /dev/null 2>&1
++mkdir -p "${service_env_dir}" > /dev/null 2>&1
++
++# this must succeed
++cat << EOF > "${services_dir}/${ready_sv}/run"
++#!/bin/sh
++[ -r ./conf ] && . ./conf
++[ -n "\$core_services" ] && SVDIR=".." sv start \$core_services
++[ -p "$RUNIT_READY_PIPE" ] && printf "${services_dir}/${ready_sv}" > "$RUNIT_READY_PIPE"
++exec pause
++EOF
++chmod +x "${services_dir}/${ready_sv}/run"
++
++exec env TURNSTILE_ENV_DIR="$service_env_dir" \
++    runsvdir -P "$services_dir" \
++    'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+diff --git a/backend/runit.conf b/backend/runit.conf
+new file mode 100644
+index 0000000..88a2d04
+--- /dev/null
++++ b/backend/runit.conf
+@@ -0,0 +1,16 @@
++# This is the configuration file for turnstile's runit backend.
++#
++# It follows the POSIX shell syntax (being sourced into a script).
++# The complete launch environment available to dinit can be used.
++#
++# It is a low-level configuration file. In most cases, it should
++# not be modified by the user.
++
++# the name of the service that turnstile will check for login readiness
++ready_sv="turnstile-ready"
++
++# the directory user service files are read from.
++services_dir="${HOME}/.config/service"
++
++# the environment variable directory user service files can read from.
++service_env_dir="${HOME}/.config/service-env"
+diff --git a/backend/turnstile-update-runit-env.in b/backend/turnstile-update-runit-env.in
+new file mode 100644
+index 0000000..9999459
+--- /dev/null
++++ b/backend/turnstile-update-runit-env.in
+@@ -0,0 +1,31 @@
++#!/bin/sh
++# Copyright 2023 classabbyamp <dev@placeviolette.net>
++# License: BSD-2-Clause
++
++usage() {
++	cat <<-EOF
++	turnstile-update-runit-env [VAR] ...
++	Updates values in the shared chpst(8) env dir.
++	
++	If VAR is a variable name, the value is taken from the environment.
++	If VAR is VAR=VAL, sets VAR to VAL.
++	EOF
++}
++
++. @CONF_PATH@/backend/runit.conf
++
++if [ $# -eq 0 ] || [ "$1" = "-h" ]; then
++	usage
++	exit 0
++fi
++
++for var; do
++	case "$var" in
++	*=*)
++		eval echo "${var#*=}" > "$service_env_dir/${var%%=*}"
++		;;
++	*)
++		eval echo '$'"$var" > "$service_env_dir/$var"
++		;;
++	esac
++done
+diff --git a/meson.build b/meson.build
+index 762aac7..d5467a2 100644
+--- a/meson.build
++++ b/meson.build
+@@ -23,6 +23,7 @@ scdoc_dep = dependency(
+ )
+ 
+ have_dinit = get_option('dinit').enabled()
++have_runit = get_option('runit').enabled()
+ 
+ conf_data = configuration_data()
+ conf_data.set_quoted('RUN_PATH', get_option('rundir'))
+@@ -118,10 +119,15 @@ install_data(
+ )
+ 
+ # decide the default backend
+-if have_dinit
+-    default_backend = 'dinit'
+-else
+-    default_backend = 'none'
++default_backend = get_option('default_backend')
++if default_backend == ''
++    if have_dinit
++        default_backend = 'dinit'
++    elif have_runit
++        default_backend = 'runit'
++    else
++        default_backend = 'none'
++    endif
+ endif
+ 
+ uconf_data = configuration_data()
+diff --git a/meson_options.txt b/meson_options.txt
+index 9b03995..4325042 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -3,6 +3,16 @@ option('dinit',
+     description: 'Whether to install Dinit-related backend and data'
+ )
+ 
++option('runit',
++    type: 'feature', value: 'disabled',
++    description: 'Whether to install runit-related backend and data'
++)
++
++option('default_backend',
++    type: 'string', value: '',
++    description: 'Override the default backend'
++)
++
+ option('rundir',
+     type: 'string', value: '/run',
+     description: 'Where the base directory will be located'
diff --git a/srcpkgs/turnstile/template b/srcpkgs/turnstile/template
new file mode 100644
index 00000000000000..5a435e1ae64a04
--- /dev/null
+++ b/srcpkgs/turnstile/template
@@ -0,0 +1,24 @@
+# Template file for 'turnstile'
+pkgname=turnstile
+version=0.1.8
+revision=1
+build_style=meson
+configure_args="-Ddinit=enabled -Drunit=enabled -Ddefault_backend=runit
+ -Dmanage_rundir=true"
+hostmakedepends="pkg-config scdoc"
+makedepends="pam-devel"
+short_desc="Independent session/login tracker and user service manager"
+maintainer="classabbyamp <void@placeviolette.net>"
+license="BSD-2-Clause"
+homepage="https://github.com/chimera-linux/turnstile"
+distfiles="https://github.com/chimera-linux/turnstile/archive/refs/tags/v${version}.tar.gz"
+checksum=7eaab8c80c76ae9a9a711d7dc57ec346b9af09be99b526a5a3129a7fc9bd7a76
+conf_files="/etc/turnstile/turnstiled.conf"
+
+post_install() {
+	vsv turnstiled
+	vsconf "${FILESDIR}/dbus.run"
+	chmod +x "${DESTDIR}/usr/share/examples/turnstile/dbus.run"
+	vdoc "${FILESDIR}/README.voidlinux"
+	vlicense COPYING.md
+}

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PR PATCH] [Merged]: New package: turnstile-0.1.8
  2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
                   ` (52 preceding siblings ...)
  2024-03-22 21:02 ` classabbyamp
@ 2024-03-22 21:11 ` classabbyamp
  53 siblings, 0 replies; 55+ messages in thread
From: classabbyamp @ 2024-03-22 21:11 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 569 bytes --]

There's a merged pull request on the void-packages repository

New package: turnstile-0.1.8
https://github.com/void-linux/void-packages/pull/44676

Description:
WIP while i create the runit backend upstream ([mostly done](https://github.com/chimera-linux/turnstile/compare/master...classabbyamp:runit-backend))

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**



^ permalink raw reply	[flat|nested] 55+ messages in thread

end of thread, other threads:[~2024-03-22 21:11 UTC | newest]

Thread overview: 55+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-28  9:12 [PR PATCH] New package: turnstile-0.1.4 classabbyamp
2023-06-28 20:45 ` dkwo
2023-06-28 21:36 ` classabbyamp
2023-07-04  8:36 ` [PR PATCH] [Updated] " classabbyamp
2023-07-04  8:40 ` classabbyamp
2023-07-04  8:43 ` classabbyamp
2023-07-04  8:45 ` classabbyamp
2023-07-04  8:59 ` classabbyamp
2023-07-04  9:00 ` classabbyamp
2023-07-04  9:44 ` New package: turnstile-0.1.5 classabbyamp
2023-07-04  9:58 ` classabbyamp
2023-07-09 22:52 ` [PR PATCH] [Updated] " classabbyamp
2023-07-10 14:03 ` junkminerman
2023-07-10 16:37 ` classabbyamp
2023-07-10 16:55 ` classabbyamp
2023-07-10 17:59 ` junkminerman
2023-07-10 18:04 ` classabbyamp
2023-07-10 21:36 ` junkminerman
2023-07-10 21:44 ` classabbyamp
2023-07-11  9:01 ` junkminerman
2023-07-12  3:06 ` [PR PATCH] [Updated] " classabbyamp
2023-07-13 23:29 ` New package: turnstile-0.1.6 junkminerman
2023-07-25 17:27 ` [PR PATCH] [Updated] " classabbyamp
2023-09-08 10:47 ` classabbyamp
2023-09-08 10:56 ` classabbyamp
2023-09-08 11:04 ` [PR PATCH] [Closed]: New package: turnstile-0.1.8 classabbyamp
2023-09-08 11:05 ` classabbyamp
2023-09-08 12:58 ` dkwo
2023-09-08 14:13 ` classabbyamp
2023-09-09 22:21 ` [PR PATCH] [Updated] " classabbyamp
2023-09-09 22:23 ` classabbyamp
2023-09-10  0:02 ` classabbyamp
2023-09-11  8:19 ` dkwo
2023-09-12 22:55 ` [PR PATCH] [Updated] " classabbyamp
2023-09-12 23:09 ` classabbyamp
2023-09-26 17:44 ` dkwo
2023-09-26 18:04 ` dkwo
2023-09-26 18:06 ` classabbyamp
2023-09-26 18:09 ` classabbyamp
2023-09-26 20:15 ` dkwo
2023-09-26 21:15 ` dkwo
2023-09-26 21:16 ` dkwo
2023-09-26 21:25 ` classabbyamp
2023-09-26 21:40 ` dkwo
2023-09-26 21:41 ` dkwo
2023-12-26  1:45 ` github-actions
2023-12-26 17:52 ` [PR PATCH] [Updated] " classabbyamp
2023-12-26 17:54 ` classabbyamp
2023-12-26 19:05 ` dkwo
2023-12-26 19:24 ` classabbyamp
2024-01-16 19:42 ` dkwo
2024-01-16 20:08 ` classabbyamp
2024-03-22 20:31 ` [PR PATCH] [Updated] " classabbyamp
2024-03-22 21:02 ` classabbyamp
2024-03-22 21:11 ` [PR PATCH] [Merged]: " classabbyamp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).