Skip to content

Commit

Permalink
Update udev controller rules to use uacces
Browse files Browse the repository at this point in the history
  • Loading branch information
scaronni committed Jan 18, 2019
1 parent 2db6a90 commit bcd7118
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 17 deletions.
4 changes: 2 additions & 2 deletions 99-shield-controller.rules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# NVIDIA Shield Portable (2013)
SUBSYSTEM=="input", ENV{ID_MODEL}=="NVIDIA_Controller_v01.01", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1", ENV{ID_INPUT_MOUSE}=""
SUBSYSTEM=="input", ENV{ID_MODEL}=="NVIDIA_Controller_v01.01", MODE="0660", TAG+="uaccess", ENV{ID_INPUT_JOYSTICK}="1", ENV{ID_INPUT_MOUSE}=""
# NVIDIA Shield Controller (2015)
SUBSYSTEM=="input", ENV{ID_MODEL}=="NVIDIA_Controller_v01.03", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1", ENV{ID_INPUT_MOUSE}=""
SUBSYSTEM=="input", ENV{ID_MODEL}=="NVIDIA_Controller_v01.03", MODE="0660", TAG+="uaccess", ENV{ID_INPUT_JOYSTICK}="1", ENV{ID_INPUT_MOUSE}=""
11 changes: 0 additions & 11 deletions steam-controller-gamepad-emulation.patch

This file was deleted.

91 changes: 91 additions & 0 deletions steam-udev-relax-console-user.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
diff -Naur steam.old/lib/udev/rules.d/60-steam-input.rules steam/lib/udev/rules.d/60-steam-input.rules
--- steam.old/lib/udev/rules.d/60-steam-input.rules 2019-01-18 22:09:13.955398708 +0100
+++ steam/lib/udev/rules.d/60-steam-input.rules 2019-01-18 23:01:34.022657738 +0100
@@ -1,64 +1,65 @@
# Valve USB devices
-SUBSYSTEM=="usb", ATTRS{idVendor}=="28de", MODE="0666"
+SUBSYSTEM=="usb", ATTRS{idVendor}=="28de", MODE="0660", TAG+="uaccess"
+
# Steam Controller udev write access
-KERNEL=="uinput", SUBSYSTEM=="misc", TAG+="uaccess"
+KERNEL=="uinput", SUBSYSTEM=="misc", TAG+="uaccess", OPTIONS+="static_node=uinput"

# Valve HID devices over USB hidraw
-KERNEL=="hidraw*", ATTRS{idVendor}=="28de", MODE="0666"
+KERNEL=="hidraw*", ATTRS{idVendor}=="28de", MODE="0660", TAG+="uaccess"

# Valve HID devices over bluetooth hidraw
-KERNEL=="hidraw*", KERNELS=="*28DE:*", MODE="0666"
+KERNEL=="hidraw*", KERNELS=="*28DE:*", MODE="0660", TAG+="uaccess"

# DualShock 4 over USB hidraw
-KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="05c4", MODE="0666"
+KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="05c4", MODE="0660", TAG+="uaccess"

# DualShock 4 wireless adapter over USB hidraw
-KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0ba0", MODE="0666"
+KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0ba0", MODE="0660", TAG+="uaccess"

# DualShock 4 Slim over USB hidraw
-KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="09cc", MODE="0666"
+KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="09cc", MODE="0660", TAG+="uaccess"

# DualShock 4 over bluetooth hidraw
-KERNEL=="hidraw*", KERNELS=="*054C:05C4*", MODE="0666"
+KERNEL=="hidraw*", KERNELS=="*054C:05C4*", MODE="0660", TAG+="uaccess"

# DualShock 4 Slim over bluetooth hidraw
-KERNEL=="hidraw*", KERNELS=="*054C:09CC*", MODE="0666"
+KERNEL=="hidraw*", KERNELS=="*054C:09CC*", MODE="0660", TAG+="uaccess"

# Nintendo Switch Pro Controller over USB hidraw
-KERNEL=="hidraw*", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="2009", MODE="0666"
+KERNEL=="hidraw*", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="2009", MODE="0660", TAG+="uaccess"

# Nintendo Switch Pro Controller over bluetooth hidraw
-KERNEL=="hidraw*", KERNELS=="*057E:2009*", MODE="0666"
+KERNEL=="hidraw*", KERNELS=="*057E:2009*", MODE="0660", TAG+="uaccess"

# Nacon PS4 Revolution Pro Controller
-KERNEL=="hidraw*", ATTRS{idVendor}=="146b", ATTRS{idProduct}=="0d01", MODE="0666"
+KERNEL=="hidraw*", ATTRS{idVendor}=="146b", ATTRS{idProduct}=="0d01", MODE="0660", TAG+="uaccess"

# Razer Raiju PS4 Controller
-KERNEL=="hidraw*", ATTRS{idVendor}=="1532", ATTRS{idProduct}=="1000", MODE="0666"
+KERNEL=="hidraw*", ATTRS{idVendor}=="1532", ATTRS{idProduct}=="1000", MODE="0660", TAG+="uaccess"

# Razer Panthera Arcade Stick
-KERNEL=="hidraw*", ATTRS{idVendor}=="1532", ATTRS{idProduct}=="0401", MODE="0666"
+KERNEL=="hidraw*", ATTRS{idVendor}=="1532", ATTRS{idProduct}=="0401", MODE="0660", TAG+="uaccess"

# Mad Catz - Street Fighter V Arcade FightPad PRO
-KERNEL=="hidraw*", ATTRS{idVendor}=="0738", ATTRS{idProduct}=="8250", MODE="0666"
+KERNEL=="hidraw*", ATTRS{idVendor}=="0738", ATTRS{idProduct}=="8250", MODE="0660", TAG+="uaccess"

# Mad Catz - Street Fighter V Arcade FightStick TE S+
-KERNEL=="hidraw*", ATTRS{idVendor}=="0738", ATTRS{idProduct}=="8384", MODE="0666"
+KERNEL=="hidraw*", ATTRS{idVendor}=="0738", ATTRS{idProduct}=="8384", MODE="0660", TAG+="uaccess"

# EMiO Elite Controller for PS4
-KERNEL=="hidraw*", ATTRS{idVendor}=="0c12", ATTRS{idProduct}=="1cf6", MODE="0666"
+KERNEL=="hidraw*", ATTRS{idVendor}=="0c12", ATTRS{idProduct}=="1cf6", MODE="0660", TAG+="uaccess"

# HORI RAP4
-KERNEL=="hidraw*", ATTRS{idVendor}=="0f0d", ATTRS{idProduct}=="008a", MODE="0666"
+KERNEL=="hidraw*", ATTRS{idVendor}=="0f0d", ATTRS{idProduct}=="008a", MODE="0660", TAG+="uaccess"

# HORIPAD 4 FPS
-KERNEL=="hidraw*", ATTRS{idVendor}=="0f0d", ATTRS{idProduct}=="0055", MODE="0666"
+KERNEL=="hidraw*", ATTRS{idVendor}=="0f0d", ATTRS{idProduct}=="0055", MODE="0660", TAG+="uaccess"

# HORIPAD 4 FPS Plus
-KERNEL=="hidraw*", ATTRS{idVendor}=="0f0d", ATTRS{idProduct}=="0066", MODE="0666"
+KERNEL=="hidraw*", ATTRS{idVendor}=="0f0d", ATTRS{idProduct}=="0066", MODE="0660", TAG+="uaccess"

# Armor Armor 3 Pad PS4
-KERNEL=="hidraw*", ATTRS{idVendor}=="0c12", ATTRS{idProduct}=="0e10", MODE="0666"
+KERNEL=="hidraw*", ATTRS{idVendor}=="0c12", ATTRS{idProduct}=="0e10", MODE="0660", TAG+="uaccess"

# STRIKEPAD PS4 Grip Add-on
-KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="05c5", MODE="0666"
+KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="05c5", MODE="0660", TAG+="uaccess"
11 changes: 7 additions & 4 deletions steam.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

Name: steam
Version: 1.0.0.59
Release: 5%{?dist}
Release: 6%{?dist}
Summary: Installer for the Steam software distribution service
# Redistribution and repackaging for Linux is allowed, see license file
License: Steam License Agreement
Expand Down Expand Up @@ -38,9 +38,9 @@ Patch0: %{name}-3570.patch
# https://github.com/ValveSoftware/steam-for-linux/issues/3273
Patch1: %{name}-3273.patch

# Make Steam Controller usable as a GamePad:
# https://steamcommunity.com/app/353370/discussions/0/490123197956024380/
Patch2: %{name}-controller-gamepad-emulation.patch
# Use uaccess on device files so only the local console users have access to
# the files instead of using 666 permissions.
Patch2: %{name}-udev-relax-console-user.patch

BuildRequires: desktop-file-utils
BuildRequires: firewalld-filesystem
Expand Down Expand Up @@ -221,6 +221,9 @@ fi
%endif

%changelog
* Fri Jan 18 2019 Simone Caronni <[email protected]> - 1.0.0.59-6
- Update udev controller rules to use uacces.

* Fri Jan 18 2019 Simone Caronni <[email protected]> - 1.0.0.59-5
- Firewall definitions already bundled in firewalld 0.6.2 on Fedora 29+.
- Update firewall definitions to align with Fedora 29+.
Expand Down

0 comments on commit bcd7118

Please sign in to comment.