On 29.12.2016 12:38, Stefan Bruens wrote:
> 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

This is even a sed 1-liner in case of Martin's solution [0] :)

[0]:
https://github.com/s09bQ5/libsigrok/blob/75dab8c5/contrib/usb_device_ids.txt

> 2. Don't change anything that is not broken

Yes okay, if you consider the rules being examples and not set in stone.
Otherwise, it's obviously broken at least for Fedora.

> 3. udev rules are not as distribution specific as some people assume, 
> actually 
> the "group=plugdev" is the odd one here

OK, it seems to me that the last part of that sentence is indeed an
argument for distribution-specificness. Though I don't know enough about
cross-distro-udev to say anything about plugdev being the only issue, if
so, then the sed solution should be enough. If not, I'd rather tend to
Martin's solution.

> 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"'

Ah. That sounds like a better solution to me, but distributions will
still have to edit it, although not every line.

 - Roland

------------------------------------------------------------------------------
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