On 27.10.2016 02:13, Michal Sekletar wrote:
On Thu, Oct 27, 2016 at 8:37 AM, Jiri Denemark
<jdenemar(a)redhat.com> wrote:
> Yeah, the rule should really be part of this series.
I am working on udev hook-up. I found out that SECLABEL key doesn't
support substitutions (see %c in man 7 udev). I need to fix that first
and then we can have very simple udev rule file that employs helper.
This is my WIP version,
# /etc/udev/rules.d/99-virt.rules
ACTION!="add|change", GOTO="virt_rules_end"
SUBSYSTEM!="block", GOTO="virt_rules_end"
PROGRAM="/usr/local/libexec/libvirt_udevhelper", OWNER="%c{1}",
GROUP="%c{2}", SECLABEL{selinux}="%c{3}", TAG+="libvirt"
LABEL="virt_rules_end"
So probably we should require a fixed version of udev then in our spec
file. And also, once you finish the rule, it should be installed by
libvirt rpm, so please post it here so that I can add it to my patch set.
SECLABEL part doesn't work yet. Also helper uses DEVNODE env variable
to obtain path to work with. It should use DEVNAME. This is my fault,
because I told Michal to use DEVNODE. I've patched it locally for now.
I will send PR to Michal with the fix.
Thank you, I've fixed this locally.
Michal