Web lists-archives.com

Re: Bug#899299: libu2f-udev: Post-inst script should make udev reload rules


On 03/06/18 16:08, Nicolas Braud-Santoni wrote:
> X-Debbugs-CC: debian-devel@xxxxxxxxxxxxxxxx
> Hi Debianites !
> On Tue, May 22, 2018 at 10:23:33AM +0200, Nicolas Braud-Santoni wrote:
>> [libu2f-udev's post-inst script should make udev reload rules.]
>> Otherwise, the rules are not active until the next reboot (or until the user
>> manually calls `udevadm control -R`).
> To fix this bug, I need to call `udevadm` from the postinstall script,
> meaning that libu2f-udev needs to Pre-Depends on udev.

Running a command from another package in postinst only requires a
normal Depends - not a Pre-Depends.

However, I don't think you need to run "udevadm control -R" at all. udev
will monitor rules from /lib/udev/rules.d while its running and
automatically reload them when changed.

For the second half of this bug:
> Consider investigating whether it is possible to apply the udev rules to
> already-plugged-in devices (as setting tag uaccess should be idempotent).

This can be done by running "udevadm trigger". By default every device
on the system will be triggered which is a bit heavyweight, so you
probably want to add some *match parameters to restrict this to the
devices you're interested in (see the udevadm man page).


Attachment: signature.asc
Description: OpenPGP digital signature