Repository navigation
Description
Hi experts,
I found the meson options don't have the function that specify the commands' path which libvirt requires. How about I submit a patch like blow? If that's ok, I will start a pull request. Thanks!
`
diff --git a/meson.build b/meson.build
index 369548f127..6c93be8e4b 100644
--- a/meson.build
+++ b/meson.build
@@ -943,18 +943,24 @@ optional_programs = [
'udevadm',
]
+# if -Dxxx-path option is found, use that. Otherwise, check in $PATH,
+# /usr/sbin, /sbin, and fall back to the default from middle column.
foreach name : optional_programs
- prog = find_program(name, required: false, dirs: libvirt_sbin_path)
varname = name.underscorify() - if prog.found()
- prog_path = prog.path()
- prog_path = get_option(name + '-path')
- if prog_path != ''
- message('Using @1@ for @0@'.format(name, prog_path))
else
- prog_path = name
- prog = find_program(name, required: false, dirs: libvirt_sbin_path)
- if prog.found()
-
prog_path = prog.path() - else
-
prog_path = name - endif
- set_variable('@0@_prog'.format(varname), prog)
endif
- conf.set_quoted(varname.to_upper(), prog_path)
conf.set_quoted('@0@_PATH'.format(varname.to_upper()), prog_path) - set_variable('@0@_prog'.format(varname), prog)
endforeach
diff --git a/meson_options.txt b/meson_options.txt
index e5d79c2b6b..f06f46c7bb 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -102,3 +102,26 @@ option('numad', type: 'feature', value: 'auto', description: 'use numad to manag
option('pm_utils', type: 'feature', value: 'auto', description: 'use pm-utils for power management')
option('sysctl_config', type: 'feature', value: 'auto', description: 'Whether to install sysctl configs')
option('tls_priority', type: 'string', value: 'NORMAL', description: 'set the default TLS session priority string')
+
+
+option('addr2line-path', type : 'string', description : 'path to addr2line')
+option('augparse-path', type : 'string', description : 'path to augparse')
+option('dmidecode-path', type : 'string', description : 'path to dmidecode')
+option('dnsmasq-path', type : 'string', description : 'path to dnsmasq')
+option('ebtables-path', type : 'string', description : 'path to ebtables')
+option('flake8-path', type : 'string', description : 'path to flake8')
+option('ip-path', type : 'string', description : 'path to ip')
+option('ip6tables-path', type : 'string', description : 'path to ip6tables')
+option('iptables-path', type : 'string', description : 'path to iptables')
+option('iscsiadm-path', type : 'string', description : 'path to iscsiadm')
+option('mdevctl-path', type : 'string', description : 'path to mdevctl')
+option('mm-ctl-path', type : 'string', description : 'path to mm-ctl')
+option('modprobe-path', type : 'string', description : 'path to modprobe')
+option('ovs-vsctl-path', type : 'string', description : 'path to ovs-vsctl')
+option('pdwtags-path', type : 'string', description : 'path to pdwtags')
+option('radvd-path', type : 'string', description : 'path to radvd')
+option('rmmod-path', type : 'string', description : 'path to rmmod')
+option('scrub-path', type : 'string', description : 'path to scrub')
+option('tc-path', type : 'string', description : 'path to tc')
+option('udevadm-path', type : 'string', description : 'path to udevadm')
`
Activity
repo-lockdown commentedon Apr 1, 2021
Thank you for your interest in the libvirt project.
Since this repository is a read-only mirror of the project's master repostory hosted on GitLab, issues opened here are not processed.
We kindly request that new issues are reported to
https://gitlab.com/libvirt/libvirt/-/issues/new
Thank you for your time and understanding.