-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include udev/devd rules in Linux/FreeBSD packages using make install
#16007
base: master
Are you sure you want to change the base?
Conversation
This allows RPCS3 to communicate with Dualshock 3,4 and DualSense controller out of the box on Linux distributions and FreeBSD, without the need for manual actions.
At the very least these new files should not live in the rpcs3 code folder. Maybe add a config/udev folder to the repo root and add them there. No idea if that will be fine with cmake pathing. |
Why not ? I mean, I put them here because I see that's where the RPCS3 desktop file is, which fulfill a similar purpose (integration with platform standard systems)
|
Because it's bloating the main directory with stuff that is very specific to the build process and irrelevant for windows users for example |
Btw how does this work without root access? |
The more I think about this the less it seems useful. The udev rules need to go into the system udev folder, not the rpcs3 install dir, or even the lib folder. By default there is no udev folder in the system lib path on linux at least for example. |
I don't think make install does anything on rpcs3 anyways, so nobody's going to run it. We have appimages for most distros and rpcs3-git on aur for those who want to self compile. Building rpcs3 manually is something that only developers should have to do, and at that point they should know how to add udev rules (or at least know where to ask about it) |
The
I'm not sure I follow. The system udev folder would usually be
If you mean does this work when installing without root access, no it does not, since udev config needs to be done by root. (I don't know about devd on FreeBSD)
Well, since the block above in the CmakeList file is specific to Unix systems (desktop files and icons) so equally irrelevant to Windows build, it did not seem shocking ^^. |
Are we really expecting users to run
/config/udev/... |
In general I don't think rpcs3 should affect system configuration, which udev fundamentally is. Also as it is, the rules will only work after a system reboot or the user reload the rules manually. |
make install
I think it would exist on all systemd-based distributions, I'm not sure about other udev implementations. What's your system, for curiosity's sake ?
ACK, so this should probably be more something like
No. I should have make that clearer, but this is really more intended for packagers (traditional Linux packages rather than directly for users.
The first approach I considered was instead sending a patch for the
👍
Linux distros usually have an install hook for reloading udev rules in /usr/lib/udev/rules.d [Trigger]
Type = Path
Operation = Install
Operation = Upgrade
Operation = Remove
Target = usr/lib/udev/rules.d/*
[Action]
Description = Reloading device manager configuration...
When = PostTransaction
Exec = /usr/share/libalpm/scripts/systemd-hook udev-reload Other alternatives :
|
I double-checked, you're right. I was checking the cmake lib directory (/lib/x86_64-linux-gnu) which doesn't have the udev folder. As for the installation concerns, we can put that behind a switch for peace of mind. Something like "INSTALL_UDEV_RULES" or something that defaults to "OFF" so that the user has to request it explicitly. This way it's available to package maintainers without the risk to general tinkerers trying out linux for example. |
Someone on discord pointed out that there is already a package on the AUR for this: |
Yes, there is.
However, it's limited to Arch and the users need to know about it. Granted, that's not a lot to ask.
|
This guy from Steam is trying to upstream the udev rules to systemd: systemd/systemd#22681 |
This bundle the udev / devd config files described in the rpcs3 wiki as part of the rpcs3 install on Linux and FreeBSD.
Packagers using
make install
will end up with the udev rules in '/lib/udev/rules.d', which will cause (on most Linux distributions, which include install hooks for reloading new rules in/usr/lib/udev/rules.d
) a reload of the udev rules on rpcs3 install.The idea is to have out of the box support rather than needing manual action.
How to test this PR