Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] Plugdev
@ 2022-03-20  3:31 0x5c
  2022-03-20  4:55 ` [PR PATCH] [Updated] Add plugdev to default groups, drop server_group in templates 0x5c
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: 0x5c @ 2022-03-20  3:31 UTC (permalink / raw)
  To: ml

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

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

https://github.com/0x5c/void-packages plugdev
https://github.com/void-linux/void-packages/pull/36238

Plugdev
Plugdev is used by many packages' udev rules for pluggable devices.
Currently, some of those packages use the system_groups trigger to add it, some forget to add it, and others patch it to "users" or "uaccess" (which breaks the packages on systems that don't use logind).
By adding plugdev to the default groups, we get rid of those problems.

This PR will be needed for
- https://github.com/void-linux/void-packages/pull/34757
- https://github.com/void-linux/void-packages/issues/23580

While this pr deals with packages that had the `system_groups` hook to add plugdev, it does not deal with
1. packages that patch their rules to use `uaccess` instead (those packages are broken on systems that don't use logind)
    I do not have the hardware to test any of those: `airspy hackrf libnfc openobex`
2. `libfido2`, which patches its rules to use `users`
    This one works as is (I have hardware and I have to add myself to the `users` group to use it) but could arguably fit more in `plugdev`

#### Testing the changes
- I tested the changes in this PR: **YES** (`base-files and openocd), **briefly** (I don't have hardware for openrazer or wally, but I did check that the removal of the hook was done correctly)


### **This PR will require addition of the plugdev group in the void documentation, PR to void-docs incoming**

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

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

From aeb084f2a4737da0d49c88a0d03a6fc4e86913f0 Mon Sep 17 00:00:00 2001
From: 0x5c <dev@0x5c.io>
Date: Sat, 19 Mar 2022 18:54:35 -0400
Subject: [PATCH 1/4] base-files: add plugdev group

Plugdev is used by many packages' udev rules for pluggable devices.
Currently, some of those packages use the system_groups trigger to add it,
some forget to add it, and others patch it to "users" or "uaccess"
(which breaks the packages on systems that don't use logind).

By adding plugdev to the default groups, we get rid of those problems.
---
 srcpkgs/base-files/files/group | 1 +
 srcpkgs/base-files/template    | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/base-files/files/group b/srcpkgs/base-files/files/group
index 0797f31c14d9..50b7f61b9942 100644
--- a/srcpkgs/base-files/files/group
+++ b/srcpkgs/base-files/files/group
@@ -22,6 +22,7 @@ scanner:x:20:
 network:x:21:
 kvm:x:24:
 input:x:25:
+plugdev:x:46:
 nogroup:x:99:
 users:x:100:
 xbuilder:x:101:
diff --git a/srcpkgs/base-files/template b/srcpkgs/base-files/template
index 758cd54ad147..2349ff7e2fa0 100644
--- a/srcpkgs/base-files/template
+++ b/srcpkgs/base-files/template
@@ -1,7 +1,7 @@
 # Template file for 'base-files'
 pkgname=base-files
 version=0.142
-revision=11
+revision=12
 bootstrap=yes
 depends="xbps-triggers"
 short_desc="Void Linux base system files"
@@ -29,7 +29,7 @@ conf_files="
 
 replaces="base-directories>=0"
 # New system groups
-system_groups="kvm:24"
+system_groups="kvm:24 plugdev:46"
 
 do_install() {
 	# Create bin and lib dirs and symlinks.

From e0abc61aaeb72240a944c84a76130397188500cd Mon Sep 17 00:00:00 2001
From: 0x5c <dev@0x5c.io>
Date: Sat, 19 Mar 2022 19:17:56 -0400
Subject: [PATCH 2/4] openocd: drop system_groups

Now that we have plugdev as a system group, we don't need to create it here.
---
 srcpkgs/openocd/template | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/srcpkgs/openocd/template b/srcpkgs/openocd/template
index 3c45ba54dd59..5537a78575c3 100644
--- a/srcpkgs/openocd/template
+++ b/srcpkgs/openocd/template
@@ -1,7 +1,7 @@
 # Template file for 'openocd'
 pkgname=openocd
 version=0.11.0
-revision=3
+revision=4
 build_style=gnu-configure
 configure_args="
  --disable-werror
@@ -49,8 +49,6 @@ homepage="http://openocd.org/"
 distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.bz2"
 checksum=43a3ce734aff1d3706ad87793a9f3a5371cb0e357f0ffd0a151656b06b3d1e7d
 
-system_groups="plugdev"
-
 CFLAGS="-fcommon"
 
 post_install() {

From 90c71d1029eaee6dbaaa0b767fbaf30ee44ee2fa Mon Sep 17 00:00:00 2001
From: 0x5c <dev@0x5c.io>
Date: Sat, 19 Mar 2022 19:23:15 -0400
Subject: [PATCH 3/4] wally-udev-rules: drop system_groups trigger

Now that we have plugdev as a system group, we don't need to create it here.
We also no longer need that INSTALL.msg
---
 srcpkgs/wally-udev-rules/INSTALL.msg | 3 ---
 srcpkgs/wally-udev-rules/template    | 3 +--
 2 files changed, 1 insertion(+), 5 deletions(-)
 delete mode 100644 srcpkgs/wally-udev-rules/INSTALL.msg

diff --git a/srcpkgs/wally-udev-rules/INSTALL.msg b/srcpkgs/wally-udev-rules/INSTALL.msg
deleted file mode 100644
index 6313b5615bad..000000000000
--- a/srcpkgs/wally-udev-rules/INSTALL.msg
+++ /dev/null
@@ -1,3 +0,0 @@
-Please add your user to the group 'plugdev' by executing the following:
-
-usermod -aG plugdev "$USER"
diff --git a/srcpkgs/wally-udev-rules/template b/srcpkgs/wally-udev-rules/template
index 83f37457047b..173a99733c56 100644
--- a/srcpkgs/wally-udev-rules/template
+++ b/srcpkgs/wally-udev-rules/template
@@ -1,7 +1,7 @@
 # Template file for 'wally-udev-rules'
 pkgname=wally-udev-rules
 version=2.1.1
-revision=1
+revision=2
 build_style=fetch
 short_desc="Set of udev rules for ZSA keyboards, for usage with wally and oryx"
 maintainer="Jan Christian Grünhage <jan.christian@gruenhage.xyz>"
@@ -14,7 +14,6 @@ checksum="6c7d4d27745080269115c58c4c5d863b23c534635975f3bca581c52687721c52
  269c9196bc65b2e62be549e3d34e56768fe702ff099b7780a1661ca4c92a0143
  d2841d63f4e0bdfda102390ab1ca09136230d22f88538863b24b0c7fc68e548e"
 conf_files="/usr/lib/udev/rules.d/50-wally.rules /usr/lib/udev/rules.d/50-oryx.rules"
-system_groups="plugdev"
 
 do_install() {
 	vlicense license.md

From eba168fe6ad12ebbcece6adc9084fc923340a38b Mon Sep 17 00:00:00 2001
From: 0x5c <dev@0x5c.io>
Date: Sat, 19 Mar 2022 19:30:36 -0400
Subject: [PATCH 4/4] openrazer-meta: drop system_groups trigger

Now that we have plugdev as a system group, we don't need to create it here.
---
 srcpkgs/openrazer-meta/template | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/srcpkgs/openrazer-meta/template b/srcpkgs/openrazer-meta/template
index 5713a84bbd15..3cd401cb9878 100644
--- a/srcpkgs/openrazer-meta/template
+++ b/srcpkgs/openrazer-meta/template
@@ -1,7 +1,7 @@
 # Template file for 'openrazer-meta'
 pkgname=openrazer-meta
 version=3.0.1
-revision=2
+revision=3
 wrksrc="openrazer-${version}"
 build_style=gnu-makefile
 make_install_target="setup_dkms udev_install daemon_install xdg_install
@@ -36,7 +36,6 @@ openrazer-driver-dkms_package() {
 	short_desc="Kernel driver for Razer devices (DKMS-variant)"
 	depends="dkms"
 	dkms_modules="openrazer-driver $version"
-	system_groups="plugdev"
 	pkg_install() {
 		vmove usr/lib/udev
 		vmove usr/src

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

end of thread, other threads:[~2022-04-06 22:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-20  3:31 [PR PATCH] Plugdev 0x5c
2022-03-20  4:55 ` [PR PATCH] [Updated] Add plugdev to default groups, drop server_group in templates 0x5c
2022-03-20  5:49 ` Anachron
2022-03-20  6:00 ` 0x5c
2022-03-29 10:03 ` [PR PATCH] [Updated] " 0x5c
2022-04-06 22:41 ` [PR PATCH] [Merged]: " q66

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