2cf05b
From b0fb5cbba2e03fbca8471487bf78931b3090b108 Mon Sep 17 00:00:00 2001
2cf05b
Message-Id: <b0fb5cbba2e03fbca8471487bf78931b3090b108@dist-git>
2cf05b
From: Jim Fehlig <jfehlig@suse.com>
2cf05b
Date: Mon, 10 Jan 2022 11:42:58 -0700
2cf05b
Subject: [PATCH] build: Only install libvirt-guests when building libvirtd
2cf05b
2cf05b
libvirt-guests was already moved to the libvirt daemon package in commit
2cf05b
d800c50349. It only needs to be installed when building libvirtd.
2cf05b
2cf05b
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
2cf05b
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2cf05b
(cherry picked from commit 3be5ba11a2c6fcb2dfdffa03ab4f847113f36b85)
2cf05b
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2153688
2cf05b
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2cf05b
---
2cf05b
 tools/meson.build | 38 ++++++++++++++++++++------------------
2cf05b
 1 file changed, 20 insertions(+), 18 deletions(-)
2cf05b
2cf05b
diff --git a/tools/meson.build b/tools/meson.build
2cf05b
index 22fa3604ba..2d0aecb90b 100644
2cf05b
--- a/tools/meson.build
2cf05b
+++ b/tools/meson.build
2cf05b
@@ -297,29 +297,31 @@ if conf.has('WITH_SANLOCK')
2cf05b
   )
2cf05b
 endif
2cf05b
 
2cf05b
-configure_file(
2cf05b
-  input: 'libvirt-guests.sh.in',
2cf05b
-  output: '@BASENAME@',
2cf05b
-  configuration: tools_conf,
2cf05b
-  install: true,
2cf05b
-  install_dir: libexecdir,
2cf05b
-  install_mode: 'rwxrwxr-x',
2cf05b
-)
2cf05b
-
2cf05b
-if init_script == 'systemd'
2cf05b
-  install_data(
2cf05b
-    'libvirt-guests.sysconf',
2cf05b
-    install_dir: sysconfdir / 'sysconfig',
2cf05b
-    rename: 'libvirt-guests',
2cf05b
-  )
2cf05b
-
2cf05b
+if conf.has('WITH_LIBVIRTD')
2cf05b
   configure_file(
2cf05b
-    input: 'libvirt-guests.service.in',
2cf05b
+    input: 'libvirt-guests.sh.in',
2cf05b
     output: '@BASENAME@',
2cf05b
     configuration: tools_conf,
2cf05b
     install: true,
2cf05b
-    install_dir: prefix / 'lib' / 'systemd' / 'system',
2cf05b
+    install_dir: libexecdir,
2cf05b
+    install_mode: 'rwxrwxr-x',
2cf05b
   )
2cf05b
+
2cf05b
+  if init_script == 'systemd'
2cf05b
+    install_data(
2cf05b
+      'libvirt-guests.sysconf',
2cf05b
+      install_dir: sysconfdir / 'sysconfig',
2cf05b
+      rename: 'libvirt-guests',
2cf05b
+    )
2cf05b
+
2cf05b
+    configure_file(
2cf05b
+      input: 'libvirt-guests.service.in',
2cf05b
+      output: '@BASENAME@',
2cf05b
+      configuration: tools_conf,
2cf05b
+      install: true,
2cf05b
+      install_dir: prefix / 'lib' / 'systemd' / 'system',
2cf05b
+    )
2cf05b
+  endif
2cf05b
 endif
2cf05b
 
2cf05b
 if bash_completion_dep.found()
2cf05b
-- 
2cf05b
2.39.0
2cf05b