Created attachment 406290 [details] 99-pcscd-hotplug-systemd.rules Hello, Please find attached a new udev rule file which allows hotplugging pcscd on systemd machines. In principle one could just add systemd-related directives to the original rule file, at which point it would work with both systemd and OpenRC, however using two different files eliminates log warnings produced whenever an OpenRC init file is attempted to be run on a systemd host. A patch for the latest pcsc-lite ebuild file which installs this rule file instead of the original one when USE=systemd is set, has been provided as well.
Created attachment 406292 [details, diff] pcsc-lite-1.8.13-r1.ebuild-systemd-hotplug.patch
1.5 years later, the udev rule file is still OpenRC-specific.
Pinging this bug - any chance of having this integrated into the portage tree? Regards, Moritz
Just wrote the same rule to then find it pending here. Can this please be added?
I'm not sure why this bug was assigned to the systemd project. It should be assigned to the package maintainer.
Rather than conditionally installing different udev rules, I would rather see a new script added that makes the OpenRC rule a no-op if the system is not currently booted using OpenRC.
Created attachment 592118 [details, diff] Provide merged udev rule with OpenRC helper As a matter of taste and aesthetics I would argue that it introduces an additional helper script[1] and a redundant spawn of a shell on systemd systems. Still, here you go. Tested with systemd where an strace proves that the helper is indeed executed and correctly behaves as a no-op. [1] Verified through testing and documentation that in its rules udev accepts neither shell expressions such as "[ ! -e /run/openrc ] || IN_HOTPLUG=1 ..." nor expose udevd's own process environment variables for filtering as in RC_SERVICE=="udev", necessitating the helper script.
Thanks! If possible, please provide a patch generated by "git format-patch". This way you will get credit for the changes in the git repository. Also, please ensure you understand our copyright policy [1], and add a Signed-off-by tag to the commit message. [1] https://www.gentoo.org/glep/glep-0076.html
Created attachment 592262 [details, diff] sys-apps/pcsc-lite: Provide systemd-aware udev rule Here you go.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1123ad37dafee0cc747fc8e55b18d7f143e08957 commit 1123ad37dafee0cc747fc8e55b18d7f143e08957 Author: Michael Weiser <michael.weiser@gmx.de> AuthorDate: 2019-10-10 15:42:43 +0000 Commit: Craig Andrews <candrews@gentoo.org> CommitDate: 2019-10-10 16:04:49 +0000 sys-apps/pcsc-lite: Provide systemd-aware udev rule Provide a systemd-aware udev rule. Move OpenRC logic to helper script which behaves as a no-op on non-OpenRC systems. Closes: https://bugs.gentoo.org/554118 Signed-off-by: Michael Weiser <michael.weiser@gmx.de> Package-Manager: Portage-2.3.76, Repoman-2.3.17 Signed-off-by: Craig Andrews <candrews@gentoo.org> sys-apps/pcsc-lite/files/99-pcscd-hotplug-r1.rules | 6 ++ sys-apps/pcsc-lite/files/pcscd-udev | 14 +++ sys-apps/pcsc-lite/pcsc-lite-1.8.25-r1.ebuild | 107 +++++++++++++++++++++ 3 files changed, 127 insertions(+)