Blob Blame History Raw
From f45c99be9258f2d97c1f19b93ae8f5e73f4cb486 Mon Sep 17 00:00:00 2001
Message-Id: <f45c99be9258f2d97c1f19b93ae8f5e73f4cb486@dist-git>
From: Jim Fehlig <jfehlig@suse.com>
Date: Mon, 10 Jan 2022 11:42:58 -0700
Subject: [PATCH] build: Only install libvirt-guests when building libvirtd

libvirt-guests was already moved to the libvirt daemon package in commit
d800c50349. It only needs to be installed when building libvirtd.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
(cherry picked from commit 3be5ba11a2c6fcb2dfdffa03ab4f847113f36b85)

https://bugzilla.redhat.com/show_bug.cgi?id=2042529
---
 tools/meson.build | 38 ++++++++++++++++++++------------------
 1 file changed, 20 insertions(+), 18 deletions(-)

diff --git a/tools/meson.build b/tools/meson.build
index 22fa3604ba..2d0aecb90b 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -297,29 +297,31 @@ if conf.has('WITH_SANLOCK')
   )
 endif
 
-configure_file(
-  input: 'libvirt-guests.sh.in',
-  output: '@BASENAME@',
-  configuration: tools_conf,
-  install: true,
-  install_dir: libexecdir,
-  install_mode: 'rwxrwxr-x',
-)
-
-if init_script == 'systemd'
-  install_data(
-    'libvirt-guests.sysconf',
-    install_dir: sysconfdir / 'sysconfig',
-    rename: 'libvirt-guests',
-  )
-
+if conf.has('WITH_LIBVIRTD')
   configure_file(
-    input: 'libvirt-guests.service.in',
+    input: 'libvirt-guests.sh.in',
     output: '@BASENAME@',
     configuration: tools_conf,
     install: true,
-    install_dir: prefix / 'lib' / 'systemd' / 'system',
+    install_dir: libexecdir,
+    install_mode: 'rwxrwxr-x',
   )
+
+  if init_script == 'systemd'
+    install_data(
+      'libvirt-guests.sysconf',
+      install_dir: sysconfdir / 'sysconfig',
+      rename: 'libvirt-guests',
+    )
+
+    configure_file(
+      input: 'libvirt-guests.service.in',
+      output: '@BASENAME@',
+      configuration: tools_conf,
+      install: true,
+      install_dir: prefix / 'lib' / 'systemd' / 'system',
+    )
+  endif
 endif
 
 if bash_completion_dep.found()
-- 
2.35.0