Bug 1270102

Summary: udev rules need to be fixed (obsolete plugdev->uaccess tag)
Product: [Fedora] Fedora Reporter: Przemek Klosowski <przemek>
Component: libsigrokAssignee: Alex G. <mr.nuke.me>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: dan, fedora, mr.nuke.me
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: http://sigrok.org/bugzilla/show_bug.cgi?id=665
Whiteboard:
Fixed In Version: libsigrok-0.3.0-4.fc23 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-20 21:56:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
60-libsigrok.rules patch to use uaccess tag none

Description Przemek Klosowski 2015-10-09 01:35:56 UTC
Description of problem:
libsigrok uses the obsolete group mechanism in udev rules: assigns device files to be R/W by group plugdev, which does not exist on Fedora. The correct action is to use systemd session mechanism that tags the devices as 'uaccess', which then creates ACLs enabling R/W for the current logged-in console user.


Version-Release number of selected component (if applicable):
libsigrok-0.3.0-1.fc22.x86_64


How reproducible: very


Steps to Reproduce:
1. grep plugdev /usr/lib/udev/rules.d/60-libsigrok.rules

Actual results: see many rules using plugdev


Expected results: no plugdev use

Comment 1 Przemek Klosowski 2015-10-09 01:38:41 UTC
The fix is simple: replacing the old GROUP/MODE settings with  TAG+="uaccess"
The /usr/lib/udev/rules.d/60-libsigrok.rules file is already ordered before 70-uaccess.rules so no further changes are necessary. I enclose the patch, which should be sent upstream.

Comment 2 Przemek Klosowski 2015-10-09 01:44:41 UTC
Created attachment 1081151 [details]
60-libsigrok.rules patch to use uaccess tag

Comment 3 Dan HorĂ¡k 2015-10-09 09:56:01 UTC
for upstream acceptance - is the uaccess tag systemd specific thing or a general mechanism?

Comment 4 Przemek Klosowski 2015-10-09 14:36:38 UTC
I believe it's systemd specific, but everyone uses systemd now, right? in particular, plugdev comes from Debian but they switched to systemd too, with wheezy.

Comment 5 Przemek Klosowski 2015-10-09 14:37:36 UTC
BTW, I filed a related bug for openOCD
https://bugzilla.redhat.com/show_bug.cgi?id=1270106

Comment 6 Alex G. 2015-10-10 01:20:54 UTC
I've notified upstream. I'd like to get their input before we start patching our release.

Comment 7 Przemek Klosowski 2015-10-13 20:22:26 UTC
Re. Comment 6: in the upstream bug report you say that you don't see problems with sigrok on the latest Fedora---but it it possible that you manually created group plugdev and added yourself to it? Without that, I believe it cannot work. 

Eliminating plugdev has been on the agenda for a while now:

https://bugzilla.redhat.com/show_bug.cgi?id=785729

Comment 8 Przemek Klosowski 2015-10-13 20:26:57 UTC
More bug reports with background on why plugdev should go away:

https://bugzilla.redhat.com/show_bug.cgi?id=815093
https://bugzilla.redhat.com/show_bug.cgi?id=859244

Comment 9 Daniel Thompson 2015-12-17 12:35:41 UTC
I've encountered this bug also (I am running Fedora 23 and its a fairly recent install so there's no plugdev group).

I'd just like to confirm that the patch in comment 2 resolves the issue for me.

Specifically without the change pulseview cannot find my FX2 based logic analyzer. Once I updated the udev rules and went through a hotplug cycle everything worked great.

Comment 10 Fedora Update System 2016-01-04 03:08:59 UTC
libsigrok-0.3.0-4.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-e837dcccc6

Comment 11 Fedora Update System 2016-01-04 20:53:32 UTC
libsigrok-0.3.0-4.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-e837dcccc6

Comment 12 Fedora Update System 2016-01-20 21:56:35 UTC
libsigrok-0.3.0-4.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.