On irc we discussed the joystick interface. It makes sense to me to put it there as well.
To me the real question is surrounding the udev rules. @ikey mentioned on IRC last week that the steam and Feral controllers need to have udev rules installed on the system in order to function. Of course, snapd has this capability since that is exactly what the modem-manager interface does via
UDevPermanentSlot(), but where should the udev rules go? Should they by in
UDevPermanentSlot() of the joystick interface and if so, who should slot that, steam? That seems a little awkward because why should steam slots ‘joystick’-- it should plugs ‘joystick’. The problem with the plugs side is that we only want the rules to be on the system once, not once for each snap that plugs joystick.
One thing that might work is we put the udev rules in the slot side of the joystick interface. We then create a ‘game-controllers’ snap that ‘slots: [ joystick ]’ which installs the udev rules. Steam and any other snap ‘plugs: [ joystick ]’ like normal. When the game-controllers snap is not installed, steam/etc gets the current security policy when plugging joystick, and when it is installed, it gets everything it has now plus whatever additional accesses are required to use the devices that the udev rules expose.
@niemeyer and @zyga: what do you think?