[libvirt PATCH] meson: Fix qemu_{user,group} defaults for Arch

Andrea Bolognani posted 1 patch 9 months, 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20230502161403.19153-1-abologna@redhat.com
meson.build | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
[libvirt PATCH] meson: Fix qemu_{user,group} defaults for Arch
Posted by Andrea Bolognani 9 months, 3 weeks ago
The current values might have been accurate at the time
when the logic was introduced, but these days Arch is
using the same ones as Debian.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
---
Proof that I'm not making this up:

https://github.com/archlinux/svntogit-community/blob/83e66277ba6e08968496c8258a14d6109ec6dc82/trunk/PKGBUILD#L110-L111

 meson.build | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/meson.build b/meson.build
index bad13c0c9d..09c3ab00f4 100644
--- a/meson.build
+++ b/meson.build
@@ -1614,20 +1614,18 @@ if not get_option('driver_qemu').disabled()
         qemu_group = 'wheel'
       else
         os_release = run_command('grep', '-E', '^ID(_LIKE)*=', '/etc/os-release', check: false).stdout()
-        if os_release.contains('arch')
-          qemu_user = 'nobody'
-          qemu_group = 'nobody'
         # RHEL and CentOS both have ID_LIKE=fedora, SLES has ID_LIKE=suse
-        elif (os_release.contains('fedora') or
-              os_release.contains('gentoo') or
-              os_release.contains('suse'))
+        if (os_release.contains('fedora') or
+            os_release.contains('gentoo') or
+            os_release.contains('suse'))
           qemu_user = 'qemu'
           qemu_group = 'qemu'
         # Ubuntu has ID_LIKE=debian so we need to handle it first
         elif os_release.contains('ubuntu')
           qemu_user = 'libvirt-qemu'
           qemu_group = 'kvm'
-        elif os_release.contains('debian')
+        elif (os_release.contains('arch') or
+              os_release.contains('debian'))
           qemu_user = 'libvirt-qemu'
           qemu_group = 'libvirt-qemu'
         else
-- 
2.40.1
Re: [libvirt PATCH] meson: Fix qemu_{user,group} defaults for Arch
Posted by Erik Skultety 9 months, 3 weeks ago
On Tue, May 02, 2023 at 06:14:03PM +0200, Andrea Bolognani wrote:
> The current values might have been accurate at the time
> when the logic was introduced, but these days Arch is
> using the same ones as Debian.
> 
> Signed-off-by: Andrea Bolognani <abologna@redhat.com>
> ---
Reviewed-by: Erik Skultety <eskultet@redhat>