Github messages for voidlinux
 help / color / mirror / Atom feed
From: classabbyamp <classabbyamp@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] steam: update udev rules
Date: Tue, 29 Aug 2023 02:57:17 +0200	[thread overview]
Message-ID: <20230829005717.YJ1XadYA2nsdUOfU5XV2UhNOsaKJkwORfvk-htlHbX4@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-45806@inbox.vuxu.org>

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

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

https://github.com/classabbyamp/void-packages steam-devices
https://github.com/void-linux/void-packages/pull/45806

steam: update udev rules
devendor things as possible, and make it possible for access with and without logind.

the steam controller rule in 99-steam-controller-perms.rules is now in the main rules file so is not needed.

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES** (tested native and proton games with a steam controller without elogind)



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

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

From f60bb071625c87618c3cd8170c72f590c641c923 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 28 Aug 2023 18:59:35 -0400
Subject: [PATCH] steam: update udev rules

devendor things as possible, and make it possible for access with and
without logind.

the steam controller rule in 99-steam-controller-perms.rules are now in
the main rules file so are not needed.
---
 srcpkgs/steam/files/60-steam-input.rules      | 64 -------------------
 srcpkgs/steam/files/60-steam-vr.rules         | 24 -------
 ...controller-perms.rules => 99-oculus.rules} |  4 +-
 srcpkgs/steam/template                        | 24 +++++--
 4 files changed, 18 insertions(+), 98 deletions(-)
 delete mode 100644 srcpkgs/steam/files/60-steam-input.rules
 delete mode 100644 srcpkgs/steam/files/60-steam-vr.rules
 rename srcpkgs/steam/files/{99-steam-controller-perms.rules => 99-oculus.rules} (57%)

diff --git a/srcpkgs/steam/files/60-steam-input.rules b/srcpkgs/steam/files/60-steam-input.rules
deleted file mode 100644
index 99c115b791450..0000000000000
--- a/srcpkgs/steam/files/60-steam-input.rules
+++ /dev/null
@@ -1,64 +0,0 @@
-# Valve USB devices
-SUBSYSTEM=="usb", ATTRS{idVendor}=="28de", MODE="0666"
-# Steam Controller udev write access
-KERNEL=="uinput", SUBSYSTEM=="misc", TAG+="uaccess"
-
-# Valve HID devices over USB hidraw
-KERNEL=="hidraw*", ATTRS{idVendor}=="28de", MODE="0666"
-
-# Valve HID devices over bluetooth hidraw
-KERNEL=="hidraw*", KERNELS=="*28DE:*", MODE="0666"
-
-# DualShock 4 over USB hidraw
-KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="05c4", MODE="0666"
-
-# DualShock 4 wireless adapter over USB hidraw
-KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0ba0", MODE="0666"
-
-# DualShock 4 Slim over USB hidraw
-KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="09cc", MODE="0666"
-
-# DualShock 4 over bluetooth hidraw
-KERNEL=="hidraw*", KERNELS=="*054C:05C4*", MODE="0666"
-
-# DualShock 4 Slim over bluetooth hidraw
-KERNEL=="hidraw*", KERNELS=="*054C:09CC*", MODE="0666"
-
-# Nintendo Switch Pro Controller over USB hidraw
-KERNEL=="hidraw*", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="2009", MODE="0666"
-
-# Nintendo Switch Pro Controller over bluetooth hidraw
-KERNEL=="hidraw*", KERNELS=="*057E:2009*", MODE="0666"
-
-# Nacon PS4 Revolution Pro Controller
-KERNEL=="hidraw*", ATTRS{idVendor}=="146b", ATTRS{idProduct}=="0d01", MODE="0666"
-
-# Razer Raiju PS4 Controller
-KERNEL=="hidraw*", ATTRS{idVendor}=="1532", ATTRS{idProduct}=="1000", MODE="0666"
-
-# Razer Panthera Arcade Stick
-KERNEL=="hidraw*", ATTRS{idVendor}=="1532", ATTRS{idProduct}=="0401", MODE="0666"
-
-# Mad Catz - Street Fighter V Arcade FightPad PRO
-KERNEL=="hidraw*", ATTRS{idVendor}=="0738", ATTRS{idProduct}=="8250", MODE="0666"
-
-# Mad Catz - Street Fighter V Arcade FightStick TE S+
-KERNEL=="hidraw*", ATTRS{idVendor}=="0738", ATTRS{idProduct}=="8384", MODE="0666"
-
-# EMiO Elite Controller for PS4
-KERNEL=="hidraw*", ATTRS{idVendor}=="0c12", ATTRS{idProduct}=="1cf6", MODE="0666"
-
-# HORI RAP4
-KERNEL=="hidraw*", ATTRS{idVendor}=="0f0d", ATTRS{idProduct}=="008a", MODE="0666"
-
-# HORIPAD 4 FPS
-KERNEL=="hidraw*", ATTRS{idVendor}=="0f0d", ATTRS{idProduct}=="0055", MODE="0666"
-
-# HORIPAD 4 FPS Plus
-KERNEL=="hidraw*", ATTRS{idVendor}=="0f0d", ATTRS{idProduct}=="0066", MODE="0666"
-
-# Armor Armor 3 Pad PS4
-KERNEL=="hidraw*", ATTRS{idVendor}=="0c12", ATTRS{idProduct}=="0e10", MODE="0666"
-
-# STRIKEPAD PS4 Grip Add-on
-KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="05c5", MODE="0666"
diff --git a/srcpkgs/steam/files/60-steam-vr.rules b/srcpkgs/steam/files/60-steam-vr.rules
deleted file mode 100644
index 49d1e668f59d1..0000000000000
--- a/srcpkgs/steam/files/60-steam-vr.rules
+++ /dev/null
@@ -1,24 +0,0 @@
-
-KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="114d", ATTRS{idProduct}=="8a12", TAG+="uaccess"
-
-KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="0bb4", ATTRS{idProduct}=="2c87", TAG+="uaccess"
-KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="0bb4", ATTRS{idProduct}=="0306", TAG+="uaccess"
-KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="0bb4", ATTRS{idProduct}=="0309", TAG+="uaccess"
-KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="0bb4", ATTRS{idProduct}=="030a", TAG+="uaccess"
-KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="0bb4", ATTRS{idProduct}=="030b", TAG+="uaccess"
-KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="0bb4", ATTRS{idProduct}=="030c", TAG+="uaccess"
-KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="0bb4", ATTRS{idProduct}=="030e", TAG+="uaccess"
-
-KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="28de", ATTRS{idProduct}=="1043", TAG+="uaccess"
-KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="28de", ATTRS{idProduct}=="1142", TAG+="uaccess"
-KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="28de", ATTRS{idProduct}=="2000", TAG+="uaccess"
-KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="28de", ATTRS{idProduct}=="2010", TAG+="uaccess"
-KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="28de", ATTRS{idProduct}=="2011", TAG+="uaccess"
-KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="28de", ATTRS{idProduct}=="2012", TAG+="uaccess"
-KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="28de", ATTRS{idProduct}=="2021", TAG+="uaccess"
-KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="28de", ATTRS{idProduct}=="2022", TAG+="uaccess"
-KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="28de", ATTRS{idProduct}=="2050", TAG+="uaccess"
-KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="28de", ATTRS{idProduct}=="2101", TAG+="uaccess"
-KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="28de", ATTRS{idProduct}=="2150", TAG+="uaccess"
-KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="28de", ATTRS{idProduct}=="2300", TAG+="uaccess"
-KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="28de", ATTRS{idProduct}=="2301", TAG+="uaccess"
diff --git a/srcpkgs/steam/files/99-steam-controller-perms.rules b/srcpkgs/steam/files/99-oculus.rules
similarity index 57%
rename from srcpkgs/steam/files/99-steam-controller-perms.rules
rename to srcpkgs/steam/files/99-oculus.rules
index bb7862fc4ac7a..f77c38a45b4d6 100644
--- a/srcpkgs/steam/files/99-steam-controller-perms.rules
+++ b/srcpkgs/steam/files/99-oculus.rules
@@ -1,4 +1,2 @@
-#USB devices
-SUBSYSTEM=="usb", ATTRS{idVendor}=="28de", MODE="0666"
 # Oculus HID Sensor naming and permissioning
-KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="2833", MODE="0666"
+KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="2833", MODE="0660", GROUP="input", TAG+="uaccess"
diff --git a/srcpkgs/steam/template b/srcpkgs/steam/template
index cf74dc3c256a2..f9491371b6d37 100644
--- a/srcpkgs/steam/template
+++ b/srcpkgs/steam/template
@@ -1,7 +1,9 @@
 # Template file for 'steam'
 pkgname=steam
 version=1.0.0.78
-revision=2
+revision=3
+_steam_devices_commit=13443480a64fe8f10676606bd57da6de89f8ccb1
+build_wrksrc="steam-launcher"
 archs="i686 x86_64"
 depends="zenity xz curl dbus freetype gdk-pixbuf hicolor-icon-theme desktop-file-utils
  liberation-fonts-ttf file tar bash coreutils lsof steam-udev-rules"
@@ -9,10 +11,18 @@ short_desc="Digital distribution client bootstrap package - Valve's steam client
 maintainer="Andrew Benson <abenson+void@gmail.com>"
 license="custom: Proprietary license"
 homepage="https://steampowered.com/"
-distfiles="http://repo.steampowered.com/${pkgname}/pool/${pkgname}/s/${pkgname}/${pkgname}_${version}.tar.gz"
-checksum=104259755d7211b5f101db247ff70ebfed6ae6ca3e14da61195d1fbf91c7200d
+distfiles="http://repo.steampowered.com/steam/pool/steam/s/steam/steam_${version}.tar.gz
+ https://github.com/ValveSoftware/steam-devices/archive/${_steam_devices_commit}.tar.gz"
+checksum="104259755d7211b5f101db247ff70ebfed6ae6ca3e14da61195d1fbf91c7200d
+ 2e508acb093d1428f32c3f6b0bc836cc4a20ceef4afc92b6cdb7cf631400fd36"
 repository=nonfree
 
+post_patch() {
+	vsed -e 's/TAG+="uaccess"/GROUP="input", &/g' \
+		-i ../steam-devices-${_steam_devices_commit}/60-steam-input.rules \
+		-i ../steam-devices-${_steam_devices_commit}/60-steam-vr.rules
+}
+
 do_install() {
 	make DESTDIR=${DESTDIR} install
 
@@ -21,14 +31,14 @@ do_install() {
 	# Ignore steamdeps.
 	ln -sf /bin/true ${DESTDIR}/usr/bin/steamdeps
 
-	# Steam Controller support: need read-write access to
+	# Oculus support: need read-write access to
 	# Valve-owned input event device nodes.
 	# See https://bugs.launchpad.net/ubuntu/+source/steam/+bug/1498655
-	vinstall ${FILESDIR}/99-steam-controller-perms.rules 644 usr/lib/udev/rules.d
+	vinstall ${FILESDIR}/99-oculus.rules 644 usr/lib/udev/rules.d
 
 	# Device support for Steam-related hardware (e.g. controllers over Steam Link)
-	vinstall ${FILESDIR}/60-steam-input.rules 644 usr/lib/udev/rules.d
-	vinstall ${FILESDIR}/60-steam-vr.rules 644 usr/lib/udev/rules.d
+	vinstall ../steam-devices-${_steam_devices_commit}/60-steam-input.rules 644 usr/lib/udev/rules.d
+	vinstall ../steam-devices-${_steam_devices_commit}/60-steam-vr.rules 644 usr/lib/udev/rules.d
 
 	# Void-specific documentation.
 	vdoc "${FILESDIR}/README.voidlinux"

  parent reply	other threads:[~2023-08-29  0:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-29  0:56 [PR PATCH] bchhivsteam: " classabbyamp
2023-08-29  0:56 ` steam: " classabbyamp
2023-08-29  0:57 ` classabbyamp [this message]
2023-08-29 21:45 ` [PR PATCH] [Updated] " classabbyamp
2023-08-30 19:01 ` classabbyamp
2023-08-30 19:21 ` [PR PATCH] [Merged]: " classabbyamp

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=20230829005717.YJ1XadYA2nsdUOfU5XV2UhNOsaKJkwORfvk-htlHbX4@z \
    --to=classabbyamp@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).