Github messages for voidlinux
 help / color / mirror / Atom feed
From: 0x5c <0x5c@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] Add plugdev to default groups, drop server_group in templates
Date: Tue, 29 Mar 2022 12:03:19 +0200	[thread overview]
Message-ID: <20220329100319.d59I3d9eO2bMd2MrG4szs2tOjxv-gGcR5q2vypPVfME@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-36238@inbox.vuxu.org>

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

There is an updated 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

Add plugdev to default groups, drop server_group in templates
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/pull/36144

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: https://github.com/void-linux/void-docs/pull/663**

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 7ef860c5a9f1dda164aaed53d15de585be538707 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..b4e61903105c 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:26:
 nogroup:x:99:
 users:x:100:
 xbuilder:x:101:
diff --git a/srcpkgs/base-files/template b/srcpkgs/base-files/template
index 758cd54ad147..bf7b7ef242b0 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:26"
 
 do_install() {
 	# Create bin and lib dirs and symlinks.

From cd01d9e0330bbb2bf56f4d986f5f24703aef1823 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 3f1a35a127bf93c7917910416310ffe878beb7bf 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 9302c1b12d8867810f64c45ef638d5b8f840cc35 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

  parent reply	other threads:[~2022-03-29 10:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` 0x5c [this message]
2022-04-06 22:41 ` [PR PATCH] [Merged]: " q66

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=20220329100319.d59I3d9eO2bMd2MrG4szs2tOjxv-gGcR5q2vypPVfME@z \
    --to=0x5c@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).