From nobody Mon Feb 9 16:51:41 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1597832310; cv=none; d=zohomail.com; s=zohoarc; b=lytXTWlb8Du0tQQ7NeXBNiGr4fNUKdmIEpfcvpwy6KJSEcSKTCIEwnnzfzgBC33/TQ2bKzMzYq1oPWmBOW0sKxgXgwJm6qIGhGR1S/dT2B0Sc2ODi+dRztw1OtloO1xOFOSDdUg01qt6N+KlW7fflRyJailYAr7Zu9t7X2U4lp0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1597832310; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=yvMyx2T6Cwoi/IyCBBozLxG4C2B2etx2oxkAzDjjT/I=; b=hDHMwGEK9RKPc0joiNvkgvN+Ctf33Pa5yyTwDpU+m5lr5HsFKF1VIjroQ+EUxtdMQpIfW0a5whdJxmG0LJ3+EtuQITvV48rmkbNvGpVs84mlX0/SbroyK0wHnchqgNJF8FGK3G72FFbKecrEcDVsFubynCY946N7OsxHt1lwQlw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1597832310500529.0561276994808; Wed, 19 Aug 2020 03:18:30 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-129-9dyiCXxINaiWaHbBbzNCrg-1; Wed, 19 Aug 2020 06:18:26 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7072764082; Wed, 19 Aug 2020 10:18:20 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4E5B47A436; Wed, 19 Aug 2020 10:18:20 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 1C11185CD; Wed, 19 Aug 2020 10:18:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 07JAIJf6027639 for ; Wed, 19 Aug 2020 06:18:19 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2097C7A434; Wed, 19 Aug 2020 10:18:19 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.40.193.163]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1BA397A436 for ; Wed, 19 Aug 2020 10:18:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1597832309; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=yvMyx2T6Cwoi/IyCBBozLxG4C2B2etx2oxkAzDjjT/I=; b=F0l2zeAxhSJoFCpzOkTm8cZ4LjrL+QvMS28urFfT+OJzHfAKe9Z43OUiUjahDXPeTAqAMW HJ1YXGEy3vEDeqyJHWpUGHL0fpQ+k+DgFR0x3CGqb4Y4f7EXbqK3GM2+mFyhvT8lzIdsTX 1FT3IUYz5wWTbh56qvx6bCJva+Ypx9M= X-MC-Unique: 9dyiCXxINaiWaHbBbzNCrg-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 1/2] meson: Introduce rpath option Date: Wed, 19 Aug 2020 12:18:07 +0200 Message-Id: <20200819101808.144869-2-abologna@redhat.com> In-Reply-To: <20200819101808.144869-1-abologna@redhat.com> References: <20200819101808.144869-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Right now we're unconditionally adding RPATH information to the installed binaries and libraries, but that's not always desired. Debian explicitly passes --disable-rpath to configure, and while I haven't been able to find the same option in the spec file for either Fedora or RHEL, by running $ readelf -d /usr/bin/virsh | grep PATH I can see that the information is not present, so I assume they also strip it somehow. Both Debian and Fedora have wiki pages encouraging packagers to avoid setting RPATH: https://wiki.debian.org/RpathIssue https://fedoraproject.org/wiki/RPath_Packaging_Draft Given the above I'm not actually sure whether there even is a valid usecase for RPATH, but I will openly admit I don't understand the problem space well enough to pass judgement. So, assuming there are scenarios where we want RPATH information to be present, our only course of action is making its inclusion configurable, just like it was with autotools. This commit introduces the 'rpath' option, which is enabled by default and can be turned off to avoid including RPATH information in the distributed binaries and libraries. The implementation is pretty naive and arguably verging on unmaintainable, but unfortunately I lack the Meson-fu necessary to do any better than this. Thankfully we have developers on the list who are well versed in the build system and will certainly come up with a reasonable solution :) This commit is better viewed with 'git show -w'. Signed-off-by: Andrea Bolognani --- meson.build | 7 + meson_options.txt | 1 + src/meson.build | 485 +++++++++++++++++++++++++++++++--------------- tools/meson.build | 332 ++++++++++++++++++++----------- 4 files changed, 566 insertions(+), 259 deletions(-) diff --git a/meson.build b/meson.build index a72d0c0e85..bc050a63e2 100644 --- a/meson.build +++ b/meson.build @@ -156,6 +156,13 @@ if rc.returncode() =3D=3D 0 endif =20 =20 +# whether to enable rpath + +if get_option('rpath') + conf.set_quoted('RPATH', libdir) +endif + + # figure out libvirt version strings =20 arr_version =3D meson.project_version().split('.') diff --git a/meson_options.txt b/meson_options.txt index c538d323c1..71d81304bc 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -6,6 +6,7 @@ option('runstatedir', type: 'string', value: '', descriptio= n: 'State directory f option('expensive_tests', type: 'feature', value: 'auto', description: 'se= t the default for enabling expensive tests (long timeouts), use VIR_TEST_EX= PENSIVE to override') option('test_coverage', type: 'boolean', value: false, description: 'turn = on code coverage instrumentation') option('git_werror', type: 'feature', value: 'auto', description: 'use -We= rror if building from GIT') +option('rpath', type: 'boolean', value: true, description: 'add rpath info= rmation to installed binaries and libraries') =20 =20 # build dependencies options diff --git a/src/meson.build b/src/meson.build index 73ac99f01e..876f954df3 100644 --- a/src/meson.build +++ b/src/meson.build @@ -437,27 +437,50 @@ libvirt_qemu_sources =3D files( 'libvirt-qemu.c', ) =20 -libvirt_qemu_lib =3D shared_library( - 'virt-qemu', - libvirt_qemu_sources, - dependencies: [ - src_dep, - ], - link_args: [ - libvirt_nodelete, - libvirt_qemu_syms_flags, - ], - link_with: [ - libvirt_lib, - ], - link_depends: [ - libvirt_qemu_syms_file, - ], - install: true, - install_rpath: libdir, - version: libvirt_lib_version, - soversion: libvirt_so_version, -) +if conf.has('RPATH') + libvirt_qemu_lib =3D shared_library( + 'virt-qemu', + libvirt_qemu_sources, + dependencies: [ + src_dep, + ], + link_args: [ + libvirt_nodelete, + libvirt_qemu_syms_flags, + ], + link_with: [ + libvirt_lib, + ], + link_depends: [ + libvirt_qemu_syms_file, + ], + install: true, + install_rpath: conf.get('RPATH'), + version: libvirt_lib_version, + soversion: libvirt_so_version, + ) +else + libvirt_qemu_lib =3D shared_library( + 'virt-qemu', + libvirt_qemu_sources, + dependencies: [ + src_dep, + ], + link_args: [ + libvirt_nodelete, + libvirt_qemu_syms_flags, + ], + link_with: [ + libvirt_lib, + ], + link_depends: [ + libvirt_qemu_syms_file, + ], + install: true, + version: libvirt_lib_version, + soversion: libvirt_so_version, + ) +endif =20 =20 # libvirt-lxc.so symbol files @@ -491,178 +514,338 @@ libvirt_lxc_sources =3D files( 'libvirt-lxc.c', ) =20 -libvirt_lxc_lib =3D shared_library( - 'virt-lxc', - libvirt_lxc_sources, - dependencies: [ - apparmor_dep, - selinux_dep, - src_dep, - ], - link_args: [ - libvirt_nodelete, - libvirt_lxc_syms_flags, - ], - link_with: [ - libvirt_lib, - ], - link_depends: [ - libvirt_lxc_syms_file, - ], - install: true, - install_rpath: libdir, - version: libvirt_lib_version, - soversion: libvirt_so_version, -) - - -# libvirt-admin.so - -libvirt_admin_lib =3D shared_library( - 'virt-admin', - [ - admin_sources, - admin_client_generated, - admin_driver_generated, - datatypes_sources, - dtrace_gen_objects, - ], - dependencies: [ - capng_dep, - devmapper_dep, - gnutls_dep, - libssh2_dep, - libssh_dep, - sasl_dep, - src_dep, - rpc_dep, - xdr_dep, - yajl_dep, - ], - include_directories: [ - admin_inc_dir, - remote_inc_dir, - ], - link_args: [ - libvirt_admin_syms_flags, - libvirt_nodelete, - ], - link_with: [ - libvirt_lib, - ], - link_depends: [ - libvirt_admin_syms_file, - ], - install: true, - install_rpath: libdir, - version: libvirt_lib_version, - soversion: libvirt_so_version, -) - - -# build libvirt shared modules - -foreach module : virt_modules - mod =3D shared_module( - module['name'], - module.get('sources', []), - name_prefix: module.get('name_prefix', 'lib'), - include_directories: [ - conf_inc_dir, - module.get('include', []), - ], +if conf.has('RPATH') + libvirt_lxc_lib =3D shared_library( + 'virt-lxc', + libvirt_lxc_sources, dependencies: [ + apparmor_dep, + selinux_dep, src_dep, - module.get('deps', []), - ], + ], + link_args: [ + libvirt_nodelete, + libvirt_lxc_syms_flags, + ], link_with: [ libvirt_lib, - module.get('link_with', []), - ], - link_whole: [ - module.get('link_whole', []), - ], + ], + link_depends: [ + libvirt_lxc_syms_file, + ], + install: true, + install_rpath: conf.get('RPATH'), + version: libvirt_lib_version, + soversion: libvirt_so_version, + ) +else + libvirt_lxc_lib =3D shared_library( + 'virt-lxc', + libvirt_lxc_sources, + dependencies: [ + apparmor_dep, + selinux_dep, + src_dep, + ], link_args: [ libvirt_nodelete, - module.get('link_args', []), - ], + libvirt_lxc_syms_flags, + ], + link_with: [ + libvirt_lib, + ], + link_depends: [ + libvirt_lxc_syms_file, + ], install: true, - install_dir: module.get('install_dir', libdir / 'libvirt' / 'connectio= n-driver'), - install_rpath: libdir, - ) - set_variable('@0@_module'.format(module['name'].underscorify()), mod) -endforeach + version: libvirt_lib_version, + soversion: libvirt_so_version, + ) +endif =20 =20 -# build libvirt daemons +# libvirt-admin.so =20 -foreach daemon : virt_daemons - bin =3D executable( - daemon['name'], +if conf.has('RPATH') + libvirt_admin_lib =3D shared_library( + 'virt-admin', [ - daemon.get('sources', [ remote_daemon_sources, remote_daemon_generat= ed ]), + admin_sources, + admin_client_generated, + admin_driver_generated, + datatypes_sources, dtrace_gen_objects, - ], - c_args: [ - daemon.get('c_args', []), - ], + ], + dependencies: [ + capng_dep, + devmapper_dep, + gnutls_dep, + libssh2_dep, + libssh_dep, + sasl_dep, + src_dep, + rpc_dep, + xdr_dep, + yajl_dep, + ], include_directories: [ - conf_inc_dir, + admin_inc_dir, remote_inc_dir, - daemon.get('include', []), - ], + ], + link_args: [ + libvirt_admin_syms_flags, + libvirt_nodelete, + ], + link_with: [ + libvirt_lib, + ], + link_depends: [ + libvirt_admin_syms_file, + ], + install: true, + install_rpath: conf.get('RPATH'), + version: libvirt_lib_version, + soversion: libvirt_so_version, + ) +else + libvirt_admin_lib =3D shared_library( + 'virt-admin', + [ + admin_sources, + admin_client_generated, + admin_driver_generated, + datatypes_sources, + dtrace_gen_objects, + ], dependencies: [ - admin_dep, - access_dep, - dbus_dep, + capng_dep, + devmapper_dep, gnutls_dep, - libnl_dep, - rpc_dep, - src_dep, + libssh2_dep, + libssh_dep, sasl_dep, + src_dep, + rpc_dep, xdr_dep, - ], + yajl_dep, + ], + include_directories: [ + admin_inc_dir, + remote_inc_dir, + ], + link_args: [ + libvirt_admin_syms_flags, + libvirt_nodelete, + ], link_with: [ - admin_driver_lib, libvirt_lib, - libvirt_lxc_lib, - libvirt_qemu_lib, - ], - link_args: [ - libvirt_no_undefined, - ], + ], + link_depends: [ + libvirt_admin_syms_file, + ], install: true, - install_dir: sbindir, - install_rpath: libdir, - ) + version: libvirt_lib_version, + soversion: libvirt_so_version, + ) +endif + + +# build libvirt shared modules + +foreach module : virt_modules + if conf.has('RPATH') + mod =3D shared_module( + module['name'], + module.get('sources', []), + name_prefix: module.get('name_prefix', 'lib'), + include_directories: [ + conf_inc_dir, + module.get('include', []), + ], + dependencies: [ + src_dep, + module.get('deps', []), + ], + link_with: [ + libvirt_lib, + module.get('link_with', []), + ], + link_whole: [ + module.get('link_whole', []), + ], + link_args: [ + libvirt_nodelete, + module.get('link_args', []), + ], + install: true, + install_dir: module.get('install_dir', libdir / 'libvirt' / 'connect= ion-driver'), + install_rpath: conf.get('RPATH'), + ) + else + mod =3D shared_module( + module['name'], + module.get('sources', []), + name_prefix: module.get('name_prefix', 'lib'), + include_directories: [ + conf_inc_dir, + module.get('include', []), + ], + dependencies: [ + src_dep, + module.get('deps', []), + ], + link_with: [ + libvirt_lib, + module.get('link_with', []), + ], + link_whole: [ + module.get('link_whole', []), + ], + link_args: [ + libvirt_nodelete, + module.get('link_args', []), + ], + install: true, + install_dir: module.get('install_dir', libdir / 'libvirt' / 'connect= ion-driver'), + ) + endif + set_variable('@0@_module'.format(module['name'].underscorify()), mod) +endforeach + + +# build libvirt daemons + +foreach daemon : virt_daemons + if conf.has('RPATH') + bin =3D executable( + daemon['name'], + [ + daemon.get('sources', [ remote_daemon_sources, remote_daemon_gener= ated ]), + dtrace_gen_objects, + ], + c_args: [ + daemon.get('c_args', []), + ], + include_directories: [ + conf_inc_dir, + remote_inc_dir, + daemon.get('include', []), + ], + dependencies: [ + admin_dep, + access_dep, + dbus_dep, + gnutls_dep, + libnl_dep, + rpc_dep, + src_dep, + sasl_dep, + xdr_dep, + ], + link_with: [ + admin_driver_lib, + libvirt_lib, + libvirt_lxc_lib, + libvirt_qemu_lib, + ], + link_args: [ + libvirt_no_undefined, + ], + install: true, + install_dir: sbindir, + install_rpath: conf.get('RPATH'), + ) + else + bin =3D executable( + daemon['name'], + [ + daemon.get('sources', [ remote_daemon_sources, remote_daemon_gener= ated ]), + dtrace_gen_objects, + ], + c_args: [ + daemon.get('c_args', []), + ], + include_directories: [ + conf_inc_dir, + remote_inc_dir, + daemon.get('include', []), + ], + dependencies: [ + admin_dep, + access_dep, + dbus_dep, + gnutls_dep, + libnl_dep, + rpc_dep, + src_dep, + sasl_dep, + xdr_dep, + ], + link_with: [ + admin_driver_lib, + libvirt_lib, + libvirt_lxc_lib, + libvirt_qemu_lib, + ], + link_args: [ + libvirt_no_undefined, + ], + install: true, + install_dir: sbindir, + ) +endif endforeach =20 =20 # build libvirt helpers =20 foreach helper : virt_helpers + if conf.has('RPATH') + bin =3D executable( + helper['name'], + [ + helper['sources'], + ], + c_args: [ + helper.get('c_args', []), + ], + include_directories: [ + helper.get('include', []), + ], + dependencies: [ + src_dep, + helper.get('deps', []), + ], + link_with: [ + libvirt_lib, + ], + install: true, + install_dir: helper.get('install_dir', libexecdir), + install_rpath: conf.get('RPATH'), + ) +else bin =3D executable( helper['name'], [ helper['sources'], - ], + ], c_args: [ helper.get('c_args', []), - ], + ], include_directories: [ helper.get('include', []), - ], + ], dependencies: [ src_dep, helper.get('deps', []), - ], + ], link_with: [ libvirt_lib, - ], + ], install: true, install_dir: helper.get('install_dir', libexecdir), - install_rpath: libdir, - ) + ) +endif endforeach =20 =20 diff --git a/tools/meson.build b/tools/meson.build index 090179470a..d50ee94f30 100644 --- a/tools/meson.build +++ b/tools/meson.build @@ -59,24 +59,44 @@ if conf.has('WITH_HOST_VALIDATE') ] endif =20 - executable( - 'virt-host-validate', - [ - virt_host_validate_sources, - ], - dependencies: [ - tools_dep, - ], - link_args: [ - coverage_flags, - ], - link_with: [ - libvirt_lib, - ], - install: true, - install_dir: bindir, - install_rpath: libdir, - ) + if conf.has('RPATH') + executable( + 'virt-host-validate', + [ + virt_host_validate_sources, + ], + dependencies: [ + tools_dep, + ], + link_args: [ + coverage_flags, + ], + link_with: [ + libvirt_lib, + ], + install: true, + install_dir: bindir, + install_rpath: conf.get('RPATH'), + ) + else + executable( + 'virt-host-validate', + [ + virt_host_validate_sources, + ], + dependencies: [ + tools_dep, + ], + link_args: [ + coverage_flags, + ], + link_with: [ + libvirt_lib, + ], + install: true, + install_dir: bindir, + ) + endif endif =20 if conf.has('WITH_LOGIN_SHELL') @@ -95,25 +115,46 @@ if conf.has('WITH_LOGIN_SHELL') install_dir: bindir, ) =20 - executable( - 'virt-login-shell-helper', - [ - 'virt-login-shell-helper.c', - ], - dependencies: [ - tools_dep, - ], - link_args: [ - coverage_flags, - ], - link_with: [ - libvirt_lib, - libvirt_lxc_lib, - ], - install: true, - install_dir: libexecdir, - install_rpath: libdir, - ) + if conf.has('RPATH') + executable( + 'virt-login-shell-helper', + [ + 'virt-login-shell-helper.c', + ], + dependencies: [ + tools_dep, + ], + link_args: [ + coverage_flags, + ], + link_with: [ + libvirt_lib, + libvirt_lxc_lib, + ], + install: true, + install_dir: libexecdir, + install_rpath: conf.get('RPATH'), + ) + else + executable( + 'virt-login-shell-helper', + [ + 'virt-login-shell-helper.c', + ], + dependencies: [ + tools_dep, + ], + link_args: [ + coverage_flags, + ], + link_with: [ + libvirt_lib, + libvirt_lxc_lib, + ], + install: true, + install_dir: libexecdir, + ) + endif =20 install_data('virt-login-shell.conf', install_dir: sysconfdir / 'libvirt= ') endif @@ -149,78 +190,153 @@ else virsh_icon_res =3D [] endif =20 -executable( - 'virsh', - [ - 'virsh.c', - 'virsh-backup.c', - 'virsh-checkpoint.c', - 'virsh-completer.c', - 'virsh-completer-domain.c', - 'virsh-completer-checkpoint.c', - 'virsh-completer-host.c', - 'virsh-completer-interface.c', - 'virsh-completer-network.c', - 'virsh-completer-nodedev.c', - 'virsh-completer-nwfilter.c', - 'virsh-completer-pool.c', - 'virsh-completer-secret.c', - 'virsh-completer-snapshot.c', - 'virsh-completer-volume.c', - 'virsh-console.c', - 'virsh-domain.c', - 'virsh-domain-monitor.c', - 'virsh-host.c', - 'virsh-interface.c', - 'virsh-network.c', - 'virsh-nodedev.c', - 'virsh-nwfilter.c', - 'virsh-pool.c', - 'virsh-secret.c', - 'virsh-snapshot.c', - 'virsh-util.c', - 'virsh-volume.c', - virsh_icon_res, - ], - dependencies: [ - tools_dep, - readline_dep, - thread_dep, - ], - link_args: [ - coverage_flags, - ], - link_with: [ - libvirt_lxc_lib, - libvirt_qemu_lib, - libvirt_shell_lib, - ], - install: true, - install_dir: bindir, - install_rpath: libdir, -) +if conf.has('RPATH') + executable( + 'virsh', + [ + 'virsh.c', + 'virsh-backup.c', + 'virsh-checkpoint.c', + 'virsh-completer.c', + 'virsh-completer-domain.c', + 'virsh-completer-checkpoint.c', + 'virsh-completer-host.c', + 'virsh-completer-interface.c', + 'virsh-completer-network.c', + 'virsh-completer-nodedev.c', + 'virsh-completer-nwfilter.c', + 'virsh-completer-pool.c', + 'virsh-completer-secret.c', + 'virsh-completer-snapshot.c', + 'virsh-completer-volume.c', + 'virsh-console.c', + 'virsh-domain.c', + 'virsh-domain-monitor.c', + 'virsh-host.c', + 'virsh-interface.c', + 'virsh-network.c', + 'virsh-nodedev.c', + 'virsh-nwfilter.c', + 'virsh-pool.c', + 'virsh-secret.c', + 'virsh-snapshot.c', + 'virsh-util.c', + 'virsh-volume.c', + virsh_icon_res, + ], + dependencies: [ + tools_dep, + readline_dep, + thread_dep, + ], + link_args: [ + coverage_flags, + ], + link_with: [ + libvirt_lxc_lib, + libvirt_qemu_lib, + libvirt_shell_lib, + ], + install: true, + install_dir: bindir, + install_rpath: conf.get('RPATH'), + ) +else + executable( + 'virsh', + [ + 'virsh.c', + 'virsh-backup.c', + 'virsh-checkpoint.c', + 'virsh-completer.c', + 'virsh-completer-domain.c', + 'virsh-completer-checkpoint.c', + 'virsh-completer-host.c', + 'virsh-completer-interface.c', + 'virsh-completer-network.c', + 'virsh-completer-nodedev.c', + 'virsh-completer-nwfilter.c', + 'virsh-completer-pool.c', + 'virsh-completer-secret.c', + 'virsh-completer-snapshot.c', + 'virsh-completer-volume.c', + 'virsh-console.c', + 'virsh-domain.c', + 'virsh-domain-monitor.c', + 'virsh-host.c', + 'virsh-interface.c', + 'virsh-network.c', + 'virsh-nodedev.c', + 'virsh-nwfilter.c', + 'virsh-pool.c', + 'virsh-secret.c', + 'virsh-snapshot.c', + 'virsh-util.c', + 'virsh-volume.c', + virsh_icon_res, + ], + dependencies: [ + tools_dep, + readline_dep, + thread_dep, + ], + link_args: [ + coverage_flags, + ], + link_with: [ + libvirt_lxc_lib, + libvirt_qemu_lib, + libvirt_shell_lib, + ], + install: true, + install_dir: bindir, + ) +endif =20 -executable( - 'virt-admin', - [ - 'virt-admin.c', - 'virt-admin-completer.c', - ], - dependencies: [ - tools_dep, - readline_dep, - ], - link_args: [ - coverage_flags, - ], - link_with: [ - libvirt_admin_lib, - libvirt_shell_lib, - ], - install: true, - install_dir: bindir, - install_rpath: libdir, -) +if conf.has('RPATH') + executable( + 'virt-admin', + [ + 'virt-admin.c', + 'virt-admin-completer.c', + ], + dependencies: [ + tools_dep, + readline_dep, + ], + link_args: [ + coverage_flags, + ], + link_with: [ + libvirt_admin_lib, + libvirt_shell_lib, + ], + install: true, + install_dir: bindir, + install_rpath: conf.get('RPATH'), + ) +else + executable( + 'virt-admin', + [ + 'virt-admin.c', + 'virt-admin-completer.c', + ], + dependencies: [ + tools_dep, + readline_dep, + ], + link_args: [ + coverage_flags, + ], + link_with: [ + libvirt_admin_lib, + libvirt_shell_lib, + ], + install: true, + install_dir: bindir, + ) +endif =20 tools_conf =3D configuration_data() tools_conf.set('PACKAGE', meson.project_name()) --=20 2.26.2