Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 773286 - app-emulation/qemu udev rules should also cover /dev/vhost-vsock
Summary: app-emulation/qemu udev rules should also cover /dev/vhost-vsock
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Matthias Maier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-27 14:15 UTC by Maciej S. Szmigiero
Modified: 2021-02-28 23:45 UTC (History)
3 users (show)

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


Attachments
Patch in git-format-patch format (0001-app-emulation-qemu-Add-dev-vhost-vsock-to-udev-rules.patch,1.14 KB, patch)
2021-02-28 23:01 UTC, Maciej S. Szmigiero
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej S. Szmigiero 2021-02-27 14:15:43 UTC
The udev rules installed as /lib/udev/rules.d/65-kvm.rules by app-emulation/qemu  cover only /dev/vhost-net but they should also cover /dev/vhost-vsock.

Example additional rule line:
> KERNEL=="vhost-vsock", GROUP="kvm", MODE="0660", OPTIONS+="static_node=vhost-vsock"
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2021-02-28 09:28:17 UTC
Can you file an upstream bug report? Or perhaps just send a patch?https://wiki.qemu.org/Contribute/SubmitAPatch
Comment 2 Maciej S. Szmigiero 2021-02-28 13:39:15 UTC
That's a Gentoo-provided file, can't find it in upstream QEMU repo.
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2021-02-28 18:58:36 UTC
Ah, good point! Do you want to write an ebuild patch yourself? I would apply it with `git am`.
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2021-02-28 19:05:31 UTC
Longer term alternative is to explore why we don't have these rules from systemd-udev in Gentoo:

git/systemd $ git grep vhost- | cat
rules.d/50-udev-default.rules.in:KERNEL=="vhost-vsock", GROUP="kvm", MODE="@DEV_KVM_MODE@", OPTIONS+="static_node=vhost-vsock"
rules.d/50-udev-default.rules.in:KERNEL=="vhost-net", GROUP="kvm", MODE="@DEV_KVM_MODE@", OPTIONS+="static_node=vhost-net"
Comment 6 Maciej S. Szmigiero 2021-02-28 23:01:08 UTC
Created attachment 688782 [details, diff]
Patch in git-format-patch format
Comment 7 Maciej S. Szmigiero 2021-02-28 23:04:20 UTC
(In reply to Sergei Trofimovich from comment #3)
> Ah, good point! Do you want to write an ebuild patch yourself? I would apply
> it with `git am`.

Added a patch in git-format-patch format generated against the ebuild git tree.

> Longer term alternative is to explore why we don't have these rules from
> systemd-udev in Gentoo

Yes, we probably should strive to have the smallest number of udev rule differences from the upstream that's reasonably possible to avoid extra maintainer effort.
Comment 8 Larry the Git Cow gentoo-dev 2021-02-28 23:24:17 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=470064cb7fb8c6cda0b5f2ea40fcb6542faf86de

commit 470064cb7fb8c6cda0b5f2ea40fcb6542faf86de
Author:     Maciej S. Szmigiero <mail@maciej.szmigiero.name>
AuthorDate: 2021-02-28 22:58:09 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2021-02-28 23:24:08 +0000

    app-emulation/qemu: Add /dev/vhost-vsock to udev rules
    
    The installed udev rules should also cover /dev/vhost-vsock just as they
    currently cover /dev/vhost-net.
    The upstream systemd rules will include vhost-vsock in systemd v248.
    
    Closes: https://bugs.gentoo.org/773286
    Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 app-emulation/qemu/files/65-kvm.rules-r2 |   3 +
 app-emulation/qemu/qemu-5.2.0-r3.ebuild  | 860 +++++++++++++++++++++++++++++++
 app-emulation/qemu/qemu-9999.ebuild      |   2 +-
 3 files changed, 864 insertions(+), 1 deletion(-)
Comment 9 Sergei Trofimovich (RETIRED) gentoo-dev 2021-02-28 23:25:42 UTC
Pulled your change with slight modification: instead of changing ebuild inplace I pulled changed to new 5.2.0-r3 ebuild (and existing -9999 one).

Thank you!
Comment 10 Maciej S. Szmigiero 2021-02-28 23:45:32 UTC
Thanks Sergei!