On Donnerstag, 29. Dezember 2016 05:28:33 CET Roland Hieber wrote:
> On 29.12.2016 02:54, Martin Ling wrote:
> > On Wed, Dec 28, 2016 at 11:49:50AM +0300, Paul Fertser wrote:
> >> So what libsigrok usecase on what particular OS won't be covered by
> >> doing all three of these:
> >> 
> >> 1. plugdev group assignment
> >> 2. uaccess tag
> >> 3. ModemManager antidote?
> > 
> > Apparently this wouldn't be acceptable on Fedora - they wanted uaccess
> > only. That was what led to the discussion in our bug #665.
> 
> As mentioned in that bugreport, upstream udev files can only serve as an
> example and it is the job of the distributions to come up with the
> actual rules, the right groups, tags, etc. (And boy, don't get me
> started on that modem-manager stuff.) In that manner, udev files are a
> lot like SysV init scripts...
> 
> The problem will probably consist in the future: users who find the udev
> rules will take them for granted, and if they don't work, either rant
> about it, or report bugs. Both is bad for us, since we cannot patch
> distribution-specific things.
> 
> We could prefix the rules file with a big comment that it is only meant
> as a template, but that doesn't help the users at all, since the actual
> rule implementation (groups, tags, ...) is distribution-specific and we
> cannot link to documentation for all distributions.
> 
> Even if we provided a script to read VIDs/PIDs from a file to generate
> udev rules, that script needed to have specific parts for every
> distribution.
> 
> So I think the best way is to replace contrib/z60_libsigrok.rules with a
> plain (machine-readable) list of VIDs/PIDs for known hardware, and a
> notice for the users saying they need to figure out the udev rules
> themselves.

Talking with my distribution/maintainers hat on, I am strictly against 
changing the format here:

1. Adapting the current file to distribution needs is a sed 1-liner
2. Don't change anything that is not broken
3. udev rules are not as distribution specific as some people assume, actually 
the "group=plugdev" is the odd one here

Sticking with a valid udev rules file also allows users doing manual 
compilation/installation to use the file as is.

*If* one wanted to reduce the amount of eventual changes a distributor or user 
with local install has to do, the approach done by sane and libgphoto might be 
more sensible:

1. Add a tag to every matched device, e.g. 'ATTR{idProduct}=="1234" 
ENV{libsigrok_matched}="yes"'
2. Set the permissions in a single rule, e.g. 'ENV{libsigrok_matched}=="yes" 
GROUP="plugdev"'

Kind regards,

Stefan


-- 
Stefan Brüns  /  Bergstraße 21  /  52062 Aachen
home: +49 241 53809034     mobile: +49 151 50412019
work: +49 2405 49936-424

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to