mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-12 07:42:56 +00:00
meson: bump min wireshark to 2.6.0
If using the declared min version of wireshark, 2.4.0, libvirt plugin fails to build. This min version isn't present in any supported distros and thus not tested by CI. We don't support wireshark on RHEL-7 since it has 1.x.x series. The next oldest version present in supported distros is 2.6.2 on RHEL-8. Thus we should bump the min version to 2.6.0. This also lets us assume that the "plugindir" variable exists in pkg-config. Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
7b42f33278
commit
45d714ce2e
41
meson.build
41
meson.build
@ -1403,7 +1403,7 @@ else
|
|||||||
win32_link_flags = []
|
win32_link_flags = []
|
||||||
endif
|
endif
|
||||||
|
|
||||||
wireshark_version = '2.4.0'
|
wireshark_version = '2.6.0'
|
||||||
wireshark_dep = dependency('wireshark', version: '>=' + wireshark_version, required: get_option('wireshark_dissector'))
|
wireshark_dep = dependency('wireshark', version: '>=' + wireshark_version, required: get_option('wireshark_dissector'))
|
||||||
if wireshark_dep.found()
|
if wireshark_dep.found()
|
||||||
wireshark_plugindir = get_option('wireshark_plugindir')
|
wireshark_plugindir = get_option('wireshark_plugindir')
|
||||||
@ -1411,31 +1411,22 @@ if wireshark_dep.found()
|
|||||||
wireshark_plugindir = wireshark_dep.get_pkgconfig_variable('plugindir')
|
wireshark_plugindir = wireshark_dep.get_pkgconfig_variable('plugindir')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# On some systems the plugindir variable may not be stored within pkg config.
|
wireshark_prefix = wireshark_dep.get_pkgconfig_variable('prefix')
|
||||||
# Fall back to older style of constructing the plugin dir path.
|
if wireshark_prefix == ''
|
||||||
if wireshark_plugindir == ''
|
# If wireshark's prefix cannot be retrieved from pkg-config,
|
||||||
wireshark_modversion = wireshark_dep.version()
|
# this is our best bet.
|
||||||
wireshark_plugindir = '@0@/wireshark/plugins/@1@'.format(
|
wireshark_prefix = '/usr'
|
||||||
libdir, wireshark_modversion
|
|
||||||
)
|
|
||||||
else
|
|
||||||
wireshark_prefix = wireshark_dep.get_pkgconfig_variable('prefix')
|
|
||||||
if wireshark_prefix == ''
|
|
||||||
# If wireshark's prefix cannot be retrieved from pkg-config,
|
|
||||||
# this is our best bet.
|
|
||||||
wireshark_prefix = '/usr'
|
|
||||||
endif
|
|
||||||
# Replace wireshark's prefix with our own.
|
|
||||||
# There is no replace method in meson so we have to workaround it.
|
|
||||||
rc = run_command(
|
|
||||||
'python3', '-c',
|
|
||||||
'print("@0@".replace("@1@", "@2@"))'.format(
|
|
||||||
wireshark_plugindir, wireshark_prefix, prefix,
|
|
||||||
),
|
|
||||||
check: true,
|
|
||||||
)
|
|
||||||
wireshark_plugindir = rc.stdout().strip()
|
|
||||||
endif
|
endif
|
||||||
|
# Replace wireshark's prefix with our own.
|
||||||
|
# There is no replace method in meson so we have to workaround it.
|
||||||
|
rc = run_command(
|
||||||
|
'python3', '-c',
|
||||||
|
'print("@0@".replace("@1@", "@2@"))'.format(
|
||||||
|
wireshark_plugindir, wireshark_prefix, prefix,
|
||||||
|
),
|
||||||
|
check: true,
|
||||||
|
)
|
||||||
|
wireshark_plugindir = rc.stdout().strip()
|
||||||
|
|
||||||
# Since wireshark 2.5.0 plugins can't live in top level plugindir but have
|
# Since wireshark 2.5.0 plugins can't live in top level plugindir but have
|
||||||
# to be under one of ["epan", "wiretap", "codecs"] subdir. The first one looks okay.
|
# to be under one of ["epan", "wiretap", "codecs"] subdir. The first one looks okay.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user