Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] keyd: add check to runit service
@ 2022-08-04 13:33 Barbaross93
  2022-08-09 14:19 ` akhiljalagam
                   ` (25 more replies)
  0 siblings, 26 replies; 27+ messages in thread
From: Barbaross93 @ 2022-08-04 13:33 UTC (permalink / raw)
  To: ml

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

There is a new 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: add check to runit service
<!-- 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 could 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: 961 bytes --]

From 83ed77ad015e38fe6420d7f2380b84ac429e854f 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: add check to runit service

---
 srcpkgs/keyd/files/keyd/run | 1 +
 srcpkgs/keyd/template       | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/keyd/files/keyd/run b/srcpkgs/keyd/files/keyd/run
index 868cb747ab6c..f80b5e3513c8 100644
--- a/srcpkgs/keyd/files/keyd/run
+++ b/srcpkgs/keyd/files/keyd/run
@@ -1,2 +1,3 @@
 #!/bin/sh
+[ "$(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"

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

* Re: keyd: add check to runit service
  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
                   ` (24 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: akhiljalagam @ 2022-08-09 14:19 UTC (permalink / raw)
  To: ml

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

New comment by akhiljalagam on void-packages repository

https://github.com/void-linux/void-packages/pull/38467#issuecomment-1209445605

Comment:
**keyboard can become unresponsive.**
true.  
I disabled keyd runit service and starting manully as a workaround.

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

* Re: keyd: add check to runit service
  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
                   ` (23 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: akhiljalagam @ 2022-08-09 14:24 UTC (permalink / raw)
  To: ml

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

New comment by akhiljalagam on void-packages repository

https://github.com/void-linux/void-packages/pull/38467#issuecomment-1209451512

Comment:
https://github.com/rvaiya/keyd/issues/263#issuecomment-1198818780
I don't understand why udevd starting 2 times.  
Is it necessary?

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

* Re: keyd: add check to runit service
  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
                   ` (22 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Barbaross93 @ 2022-09-12 16:32 UTC (permalink / raw)
  To: ml

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

New comment by Barbaross93 on void-packages repository

https://github.com/void-linux/void-packages/pull/38467#issuecomment-1243994032

Comment:
I'm not sure either @akhiljalagam . I'm hoping a void maintainer can chime in here.

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

* Re: keyd: add check to runit service
  2022-08-04 13:33 [PR PATCH] keyd: add check to runit service Barbaross93
                   ` (2 preceding siblings ...)
  2022-09-12 16:32 ` Barbaross93
@ 2022-09-12 17:02 ` Duncaen
  2022-09-12 17:08 ` Duncaen
                   ` (21 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Duncaen @ 2022-09-12 17:02 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/38467#issuecomment-1244030246

Comment:
This makes no sense at all.

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

* Re: keyd: add check to runit service
  2022-08-04 13:33 [PR PATCH] keyd: add check to runit service Barbaross93
                   ` (3 preceding siblings ...)
  2022-09-12 17:02 ` Duncaen
@ 2022-09-12 17:08 ` Duncaen
  2022-09-12 17:10 ` Barbaross93
                   ` (20 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Duncaen @ 2022-09-12 17:08 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/38467#issuecomment-1244030246

Comment:
This makes no sense at all.

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

* Re: keyd: add check to runit service
  2022-08-04 13:33 [PR PATCH] keyd: add check to runit service Barbaross93
                   ` (4 preceding siblings ...)
  2022-09-12 17:08 ` Duncaen
@ 2022-09-12 17:10 ` Barbaross93
  2022-09-12 17:10 ` Barbaross93
                   ` (19 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Barbaross93 @ 2022-09-12 17:10 UTC (permalink / raw)
  To: ml

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

New comment by Barbaross93 on void-packages repository

https://github.com/void-linux/void-packages/pull/38467#issuecomment-1244038826

Comment:
Hi @Duncaen, thanks for chiming in.

Could you elaborate on what doesn't make sense?

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

* Re: keyd: add check to runit service
  2022-08-04 13:33 [PR PATCH] keyd: add check to runit service Barbaross93
                   ` (5 preceding siblings ...)
  2022-09-12 17:10 ` Barbaross93
@ 2022-09-12 17:10 ` Barbaross93
  2022-09-12 17:13 ` Duncaen
                   ` (18 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Barbaross93 @ 2022-09-12 17:10 UTC (permalink / raw)
  To: ml

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

New comment by Barbaross93 on void-packages repository

https://github.com/void-linux/void-packages/pull/38467#issuecomment-1244038826

Comment:
Hi @Duncaen, thanks for chiming in.

Could you elaborate on what doesn't make sense?

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

* Re: keyd: add check to runit service
  2022-08-04 13:33 [PR PATCH] keyd: add check to runit service Barbaross93
                   ` (6 preceding siblings ...)
  2022-09-12 17:10 ` Barbaross93
@ 2022-09-12 17:13 ` Duncaen
  2022-09-12 17:14 ` Duncaen
                   ` (17 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Duncaen @ 2022-09-12 17:13 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/38467#issuecomment-1244043182

Comment:
Because udevd is needed early for early initialization at a point where runit services are not running. Its replaced by the service so its supervised.

> Could you elaborate on what doesn't make sense?

The whole description of the problem and what the check does. 

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

* Re: keyd: add check to runit service
  2022-08-04 13:33 [PR PATCH] keyd: add check to runit service Barbaross93
                   ` (7 preceding siblings ...)
  2022-09-12 17:13 ` Duncaen
@ 2022-09-12 17:14 ` Duncaen
  2022-09-12 17:15 ` Duncaen
                   ` (16 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Duncaen @ 2022-09-12 17:14 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/38467#issuecomment-1244043182

Comment:
>  I don't understand why udevd starting 2 times.

Because udevd is needed early for early initialization at a point where runit services are not running. Its replaced by the service so its supervised.

> Could you elaborate on what doesn't make sense?

The whole description of the problem and what the check does. 

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

* Re: keyd: add check to runit service
  2022-08-04 13:33 [PR PATCH] keyd: add check to runit service Barbaross93
                   ` (8 preceding siblings ...)
  2022-09-12 17:14 ` Duncaen
@ 2022-09-12 17:15 ` Duncaen
  2022-09-12 17:25 ` Barbaross93
                   ` (15 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Duncaen @ 2022-09-12 17:15 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/38467#issuecomment-1244043182

Comment:
>  I don't understand why udevd starting 2 times.

Because udevd is needed early for early initialization at a point where runit services are not running. Its replaced by the runit  service so its supervised by runit and not just some random daemon in the background.

> Could you elaborate on what doesn't make sense?

The whole description of the problem and what the check does. 

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

* Re: keyd: add check to runit service
  2022-08-04 13:33 [PR PATCH] keyd: add check to runit service Barbaross93
                   ` (9 preceding siblings ...)
  2022-09-12 17:15 ` Duncaen
@ 2022-09-12 17:25 ` Barbaross93
  2022-09-12 17:30 ` Duncaen
                   ` (14 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Barbaross93 @ 2022-09-12 17:25 UTC (permalink / raw)
  To: ml

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

New comment by Barbaross93 on void-packages repository

https://github.com/void-linux/void-packages/pull/38467#issuecomment-1244063503

Comment:
The problem boils down to a race condition. Sometimes, but not always, the keyd program is launched but the keyboard is unresponsive until the process is terminated. Based on the linked issue, the reason for this is because keyd process launched after the early udevd process, but _before_ the udevd runit service. So, when the runit service starts for udevd, it kills the early udevd process causing keyd to stop working as expected.

This PR adds a check to ensure that keyd doesn't launch until the the udevd runit service has launched.

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

* Re: keyd: add check to runit service
  2022-08-04 13:33 [PR PATCH] keyd: add check to runit service Barbaross93
                   ` (10 preceding siblings ...)
  2022-09-12 17:25 ` Barbaross93
@ 2022-09-12 17:30 ` Duncaen
  2022-09-12 17:42 ` Barbaross93
                   ` (13 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Duncaen @ 2022-09-12 17:30 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/38467#issuecomment-1244068335

Comment:
This should be mentioned in the services, otherwise the "check" makes no sense at all.

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

* Re: keyd: add check to runit service
  2022-08-04 13:33 [PR PATCH] keyd: add check to runit service Barbaross93
                   ` (11 preceding siblings ...)
  2022-09-12 17:30 ` Duncaen
@ 2022-09-12 17:42 ` Barbaross93
  2022-09-12 17:52 ` Duncaen
                   ` (12 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Barbaross93 @ 2022-09-12 17:42 UTC (permalink / raw)
  To: ml

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

New comment by Barbaross93 on void-packages repository

https://github.com/void-linux/void-packages/pull/38467#issuecomment-1244083708

Comment:
> This should be mentioned in the services

Are you suggesting that I should merely leave a comment in the service file about this issue? Won't peoples custom solutions be overwritten on updates then?

The check verifies that the supervised udevd process is the current running udevd process. I thought it was pretty self-explanatory.

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

* Re: keyd: add check to runit service
  2022-08-04 13:33 [PR PATCH] keyd: add check to runit service Barbaross93
                   ` (12 preceding siblings ...)
  2022-09-12 17:42 ` Barbaross93
@ 2022-09-12 17:52 ` Duncaen
  2022-09-12 17:53 ` Duncaen
                   ` (11 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Duncaen @ 2022-09-12 17:52 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/38467#issuecomment-1244095061

Comment:
> Are you suggesting that I should merely leave a comment in the service file about this issue? Won't peoples custom solutions be overwritten on updates then?

No there should be a comment to why this check exist.

> The check verifies that the supervised udevd process is the current running udevd process. I thought it was pretty self-explanatory.

nobody will know why this check exists in the first place without having to track down the PR where it has been introduced.

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

* Re: keyd: add check to runit service
  2022-08-04 13:33 [PR PATCH] keyd: add check to runit service Barbaross93
                   ` (13 preceding siblings ...)
  2022-09-12 17:52 ` Duncaen
@ 2022-09-12 17:53 ` Duncaen
  2022-09-12 17:57 ` Barbaross93
                   ` (10 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Duncaen @ 2022-09-12 17:53 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/38467#issuecomment-1244095061

Comment:
> Are you suggesting that I should merely leave a comment in the service file about this issue? Won't peoples custom solutions be overwritten on updates then?

No there should be a comment to why this check exist.

> The check verifies that the supervised udevd process is the current running udevd process. I thought it was pretty self-explanatory.

nobody will know why this check exists in the first place without having to track down the PR where it has been introduced.
The commit just says "add check to runit service" and the line alone makes not much sense without knowing the full context and specifics about how udevd is spawned twice without a comment that mentions that.

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

* Re: keyd: add check to runit service
  2022-08-04 13:33 [PR PATCH] keyd: add check to runit service Barbaross93
                   ` (14 preceding siblings ...)
  2022-09-12 17:53 ` Duncaen
@ 2022-09-12 17:57 ` Barbaross93
  2022-09-12 18:08 ` Duncaen
                   ` (9 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Barbaross93 @ 2022-09-12 17:57 UTC (permalink / raw)
  To: ml

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

New comment by Barbaross93 on void-packages repository

https://github.com/void-linux/void-packages/pull/38467#issuecomment-1244099855

Comment:
> No there should be a comment to why this check exist.

OK, thank you, this makes much more sense.

> nobody will know why this check exists in the first place without having to track down the PR where it has been introduced.
The commit just says "add check to runit service" and the line alone makes not much sense without knowing the full context and specifics about how udevd is spawned twice without a comment that mentions that.

This also makes much more sense. Will it be sufficient to edit the commit message in addition to a comment?

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

* Re: keyd: add check to runit service
  2022-08-04 13:33 [PR PATCH] keyd: add check to runit service Barbaross93
                   ` (15 preceding siblings ...)
  2022-09-12 17:57 ` Barbaross93
@ 2022-09-12 18:08 ` Duncaen
  2022-09-12 18:09 ` [PR PATCH] [Updated] " Barbaross93
                   ` (8 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Duncaen @ 2022-09-12 18:08 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/38467#issuecomment-1244111954

Comment:
> This also makes much more sense. Will it be sufficient to edit the commit message in addition to a comment?

Should probably be in both, because its not clear from just the command compared to `sv check`.

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

* Re: [PR PATCH] [Updated] keyd: add check to runit service
  2022-08-04 13:33 [PR PATCH] keyd: add check to runit service Barbaross93
                   ` (16 preceding siblings ...)
  2022-09-12 18:08 ` Duncaen
@ 2022-09-12 18:09 ` Barbaross93
  2022-09-12 18:14 ` [PR PATCH] [Updated] keyd: Verify current udevd process is supervised by runit Barbaross93
                   ` (7 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Barbaross93 @ 2022-09-12 18:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 779 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: add check to runit service
<!-- 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: 1480 bytes --]

From 0c6cc2a70832091b19a45506803afcdb72ad5712 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

---
 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"

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

* Re: [PR PATCH] [Updated] keyd: Verify current udevd process is supervised by runit
  2022-08-04 13:33 [PR PATCH] keyd: add check to runit service Barbaross93
                   ` (17 preceding siblings ...)
  2022-09-12 18:09 ` [PR PATCH] [Updated] " Barbaross93
@ 2022-09-12 18:14 ` Barbaross93
  2022-09-12 18:15 ` Barbaross93
                   ` (6 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Barbaross93 @ 2022-09-12 18:14 UTC (permalink / raw)
  To: ml

[-- 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: 1480 bytes --]

From 44529eab80786272bb867b112aee0eafdb1d19c2 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

---
 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"

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

* Re: keyd: Verify current udevd process is supervised by runit
  2022-08-04 13:33 [PR PATCH] keyd: add check to runit service Barbaross93
                   ` (18 preceding siblings ...)
  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
                   ` (5 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Barbaross93 @ 2022-09-12 18:15 UTC (permalink / raw)
  To: ml

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

New comment by Barbaross93 on void-packages repository

https://github.com/void-linux/void-packages/pull/38467#issuecomment-1244120076

Comment:
Sounds good. 

The github checks: I'm not sure why they're failing?

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

* Re: [PR PATCH] [Updated] keyd: Verify current udevd process is supervised by runit
  2022-08-04 13:33 [PR PATCH] keyd: add check to runit service Barbaross93
                   ` (19 preceding siblings ...)
  2022-09-12 18:15 ` Barbaross93
@ 2022-09-12 21:32 ` Barbaross93
  2022-09-12 21:34 ` Barbaross93
                   ` (4 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Barbaross93 @ 2022-09-12 21:32 UTC (permalink / raw)
  To: ml

[-- 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: 1480 bytes --]

From abd9265d4bbdcfb4eba54aabbf30cab78a0698d4 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

---
 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"

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

* Re: keyd: Verify current udevd process is supervised by runit
  2022-08-04 13:33 [PR PATCH] keyd: add check to runit service Barbaross93
                   ` (20 preceding siblings ...)
  2022-09-12 21:32 ` [PR PATCH] [Updated] " Barbaross93
@ 2022-09-12 21:34 ` Barbaross93
  2022-10-05 12:43 ` [PR PATCH] [Updated] " Barbaross93
                   ` (3 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Barbaross93 @ 2022-09-12 21:34 UTC (permalink / raw)
  To: ml

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

New comment by Barbaross93 on void-packages repository

https://github.com/void-linux/void-packages/pull/38467#issuecomment-1244120076

Comment:
Sounds good. 

~~The github checks: I'm not sure why they're failing?~~
Looks like there was a temporary blip there.

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

* Re: [PR PATCH] [Updated] keyd: Verify current udevd process is supervised by runit
  2022-08-04 13:33 [PR PATCH] keyd: add check to runit service Barbaross93
                   ` (21 preceding siblings ...)
  2022-09-12 21:34 ` Barbaross93
@ 2022-10-05 12:43 ` Barbaross93
  2022-10-05 12:46 ` Barbaross93
                   ` (2 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Barbaross93 @ 2022-10-05 12:43 UTC (permalink / raw)
  To: ml

[-- 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 aecab22515974d36d8b08b2e0973d98f1795b124 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"

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

* Re: [PR PATCH] [Updated] keyd: Verify current udevd process is supervised by runit
  2022-08-04 13:33 [PR PATCH] keyd: add check to runit service Barbaross93
                   ` (22 preceding siblings ...)
  2022-10-05 12:43 ` [PR PATCH] [Updated] " Barbaross93
@ 2022-10-05 12:46 ` Barbaross93
  2022-10-05 13:01 ` Barbaross93
  2022-10-05 13:07 ` [PR PATCH] [Merged]: " Duncaen
  25 siblings, 0 replies; 27+ messages in thread
From: Barbaross93 @ 2022-10-05 12:46 UTC (permalink / raw)
  To: ml

[-- 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"

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

* Re: keyd: Verify current udevd process is supervised by runit
  2022-08-04 13:33 [PR PATCH] keyd: add check to runit service Barbaross93
                   ` (23 preceding siblings ...)
  2022-10-05 12:46 ` Barbaross93
@ 2022-10-05 13:01 ` Barbaross93
  2022-10-05 13:07 ` [PR PATCH] [Merged]: " Duncaen
  25 siblings, 0 replies; 27+ messages in thread
From: Barbaross93 @ 2022-10-05 13:01 UTC (permalink / raw)
  To: ml

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

New comment by Barbaross93 on void-packages repository

https://github.com/void-linux/void-packages/pull/38467#issuecomment-1268405382

Comment:
@Duncaen I think this is all set? Let me know if I missed something.

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

* Re: [PR PATCH] [Merged]: keyd: Verify current udevd process is supervised by runit
  2022-08-04 13:33 [PR PATCH] keyd: add check to runit service Barbaross93
                   ` (24 preceding siblings ...)
  2022-10-05 13:01 ` Barbaross93
@ 2022-10-05 13:07 ` Duncaen
  25 siblings, 0 replies; 27+ messages in thread
From: Duncaen @ 2022-10-05 13:07 UTC (permalink / raw)
  To: ml

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

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

keyd: Verify current udevd process is supervised by runit
https://github.com/void-linux/void-packages/pull/38467

Description:
<!-- 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.


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

end of thread, other threads:[~2022-10-05 13:07 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2022-10-05 13:01 ` Barbaross93
2022-10-05 13:07 ` [PR PATCH] [Merged]: " Duncaen

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).