Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 765358 - dev-libs/libcec-6.0.2: fix udev rule and set device to video group
Summary: dev-libs/libcec-6.0.2: fix udev rule and set device to video group
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords: PATCH, PullRequest
Depends on:
Blocks:
 
Reported: 2021-01-13 22:32 UTC by Alan Swanson
Modified: 2021-10-03 07:00 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
libcec-udev-rules-ebuild.patch (libcec-udev-rules-ebuild.patch,847 bytes, text/plain)
2021-01-13 22:32 UTC, Alan Swanson
Details
libcec-udev-rules-ebuild-take2.patch (libcec-udev-rules-ebuild-take2.patch,912 bytes, text/plain)
2021-01-21 14:31 UTC, Alan Swanson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Swanson 2021-01-13 22:32:16 UTC
Created attachment 682777 [details]
libcec-udev-rules-ebuild.patch

The current (from upstream) libcec udev rule does not work due to two issues;

1) The rule needs to be suffixed with ".rules" not ".udev" to be considered by udev. I presume on Debian their toolset renames it on install.

2) The default 50-udev-default.rules would still take earlier precedence over a fixed 65-pulse-eight-usb-cec.rules by matching against the ttyACM0 device.

Fix both by renaming the file. However, since 50-udev-default.rules no longer applies, we can also set the group to "video" instead of "uucp" since most users are likely to be running Kodi and will already be members of the video group. (Using sed to append the group rule only on lines rules with Pulse USB vendor ID 2548.)

Same patch applies to libcec-4.0.7 (uncleanly due to whitespace change at "if use udev" line).
Comment 1 Alan Swanson 2021-01-21 14:31:33 UTC
Created attachment 684040 [details]
libcec-udev-rules-ebuild-take2.patch

Obviously didn't test properly as not working on reboot.

Need to match plural SUBSYSTEMS=="usb" not SUBSYSTEM=="usb" for child tty device. Also (mis)understood that udev would stop at first lexical rule match but 45 was being overruled by 50 for group setting so leave as original 65.

Now properly tested with unplug/plug.