Github messages for voidlinux
 help / color / mirror / Atom feed
From: Barbaross93 <Barbaross93@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] keyd: Verify current udevd process is supervised by runit
Date: Wed, 05 Oct 2022 14:46:14 +0200	[thread overview]
Message-ID: <20221005124614.ud9Ia_-ICB86SBN_8VqqaINNW2z8J2g4sSRSWqKYvYA@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-38467@inbox.vuxu.org>

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

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

https://github.com/Barbaross93/void-packages keyd
https://github.com/void-linux/void-packages/pull/38467

keyd: Verify current udevd process is supervised by runit
<!-- Uncomment relevant sections and delete options which are not applicable -->

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

This PR adds a check to the runit service for `keyd`. Sometimes, when starting the `keyd` service, the keyboard can become unresponsive. This was the result of the `udevd` process being replaced while `keyd` was launching. See [here](https://github.com/rvaiya/keyd/issues/263) for more details.


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

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

From 24598e210a3cd7e9a33b022c9ea95b38b8f7c7d7 Mon Sep 17 00:00:00 2001
From: Barbaross <cullen.ross@proton.me>
Date: Thu, 4 Aug 2022 09:27:43 -0400
Subject: [PATCH] keyd: Verify current udevd process is supervised by runit

Sometimes when starting the keyd service, the keyboard can become unresponsive.
This is the result of keyd starting when the early udevd process is still
running but before the udevd runit service has started. The udevd runit
service kills the early udevd process causing the keyboard to become
unresponsive until the keyd process has been terminated. The below
code verifies that the supervised udevd process is the same as the
currently running udevd process. Please enter the commit message for
your changes. Lines starting with '#' will be ignored, and an empty
message aborts the commit.
---
 srcpkgs/keyd/files/keyd/run | 9 +++++++++
 srcpkgs/keyd/template       | 2 +-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/keyd/files/keyd/run b/srcpkgs/keyd/files/keyd/run
index 868cb747ab6c..5e62cef91c72 100644
--- a/srcpkgs/keyd/files/keyd/run
+++ b/srcpkgs/keyd/files/keyd/run
@@ -1,2 +1,11 @@
 #!/bin/sh
+
+# Sometimes when starting the keyd service, the keyboard can become unresponsive.
+# This is the result of keyd starting when the early udevd process is still running but
+# before the udevd runit service has started. The udevd runit service kills the early udevd
+# process causing the keyboard to become unresponsive until the keyd process has been
+# terminated. The below code verifies that the supervised udevd process is the same as
+# the currently running udevd process.
+[ "$(cat /var/service/udevd/supervise/pid)" = "$(pgrep -x udevd)" ] || exit 1
+
 exec keyd
diff --git a/srcpkgs/keyd/template b/srcpkgs/keyd/template
index 39b6aeaff0ae..b9d4b6aefe24 100644
--- a/srcpkgs/keyd/template
+++ b/srcpkgs/keyd/template
@@ -1,7 +1,7 @@
 # Template file for 'keyd'
 pkgname=keyd
 version=2.4.1
-revision=1
+revision=2
 build_style=gnu-makefile
 make_use_env=yes
 short_desc="Key remapping daemon for linux"

  parent reply	other threads:[~2022-10-05 12:46 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-04 13:33 [PR PATCH] keyd: add check to runit service Barbaross93
2022-08-09 14:19 ` akhiljalagam
2022-08-09 14:24 ` akhiljalagam
2022-09-12 16:32 ` Barbaross93
2022-09-12 17:02 ` Duncaen
2022-09-12 17:08 ` Duncaen
2022-09-12 17:10 ` Barbaross93
2022-09-12 17:10 ` Barbaross93
2022-09-12 17:13 ` Duncaen
2022-09-12 17:14 ` Duncaen
2022-09-12 17:15 ` Duncaen
2022-09-12 17:25 ` Barbaross93
2022-09-12 17:30 ` Duncaen
2022-09-12 17:42 ` Barbaross93
2022-09-12 17:52 ` Duncaen
2022-09-12 17:53 ` Duncaen
2022-09-12 17:57 ` Barbaross93
2022-09-12 18:08 ` Duncaen
2022-09-12 18:09 ` [PR PATCH] [Updated] " Barbaross93
2022-09-12 18:14 ` [PR PATCH] [Updated] keyd: Verify current udevd process is supervised by runit Barbaross93
2022-09-12 18:15 ` Barbaross93
2022-09-12 21:32 ` [PR PATCH] [Updated] " Barbaross93
2022-09-12 21:34 ` Barbaross93
2022-10-05 12:43 ` [PR PATCH] [Updated] " Barbaross93
2022-10-05 12:46 ` Barbaross93 [this message]
2022-10-05 13:01 ` Barbaross93
2022-10-05 13:07 ` [PR PATCH] [Merged]: " Duncaen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221005124614.ud9Ia_-ICB86SBN_8VqqaINNW2z8J2g4sSRSWqKYvYA@z \
    --to=barbaross93@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).