On 26.10.2016 15:27, Andrea Bolognani wrote: > Well, almost :) There are still some cases that are not > handled correctly, but at least this will unbreak 'make > rpm' while I work on the rest. > > Tested by running 'make rpm' successfully on Fedora 23, > Fedora 24 and Fedora rawhide. > > > Andrea Bolognani (5): > wireshark: Introduce $ws_modversion > wireshark: Hoist $ws_prefix declaration > wireshark: Strip prefix correctly > wireshark: Inject $(prefix) at the right time > wireshark: Rename plugindir to ws_plugindir > > m4/virt-wireshark.m4 | 29 ++++++++++++++++++----------- > tools/Makefile.am | 2 +- > 2 files changed, 19 insertions(+), 12 deletions(-) > Thanks for the fixes. As it happens, I have tried to fix our local builds in parallel, and thus have some minor suggestions, patch attached. -- Mit freundlichen Grüßen/Kind Regards Viktor Mihajlovski IBM Deutschland Research & Development GmbH Vorsitzender des Aufsichtsrats: Martina Köderitz Geschäftsführung: Dirk Wittkopp Sitz der Gesellschaft: Böblingen Registergericht: Amtsgericht Stuttgart, HRB 243294
>From 50ce169ed1c2fa30d2b8f13d6b1dbbd126a9b496 Mon Sep 17 00:00:00 2001 From: Viktor Mihajlovski <mihajlov@xxxxxxxxxxxxxxxxxx> Date: Wed, 26 Oct 2016 17:16:32 +0200 Subject: [PATCH] wireshark: minor improvements for plugin directory detecion/guessing 1. If libvirt's and wiresharks' libdirs are different (they were on my system) the plugin install can fail. Fixed by evaluating the pkg-config libdir variable. 2. May seem pedantic, but the default for libdir is ${exec_prefix}/lib and - while uncommon - exec_prefix might be different from prefix. So use exec_prefix instead of prefix. 3. AC_SUBST will take care of inserting ws_plugindir = @ws_plugindir@ into Makefile.in, so that line can be removed. Signed-off-by: Viktor Mihajlovski <mihajlov@xxxxxxxxxxxxxxxxxx> --- m4/virt-wireshark.m4 | 20 ++++++++++---------- tools/Makefile.am | 1 - 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/m4/virt-wireshark.m4 b/m4/virt-wireshark.m4 index 556272a..9660c22 100644 --- a/m4/virt-wireshark.m4 +++ b/m4/virt-wireshark.m4 @@ -29,24 +29,24 @@ AC_DEFUN([LIBVIRT_CHECK_WIRESHARK],[ if test "x$with_wireshark_dissector" != "xno" ; then if test "x$with_ws_plugindir" = "xcheck" ; then ws_plugindir="$($PKG_CONFIG --variable plugindir wireshark)" - ws_prefix="$($PKG_CONFIG --variable prefix wireshark)" + ws_libdir="$($PKG_CONFIG --variable libdir wireshark)" + ws_exec_prefix="$($PKG_CONFIG --variable exec_prefix wireshark)" ws_modversion="$($PKG_CONFIG --modversion wireshark)" if test "x$ws_plugindir" = "x" ; then dnl On some systems the plugindir variable may not be stored within pkg config. dnl Fall back to older style of constructing the plugin dir path. - ws_plugindir="$libdir/wireshark/plugins/$ws_modversion" - ws_prefix="$prefix" + ws_plugindir="$ws_libdir/wireshark/plugins/$ws_modversion" fi - if test "x$ws_prefix" = "x" ; then - dnl If the wireshark prefix cannot be retrieved from pkg-config, + if test "x$ws_exec_prefix" = "x" ; then + dnl If the wireshark exec_prefix cannot be retrieved from pkg-config, dnl /usr is our best bet - ws_prefix="/usr" + ws_exec_prefix="/usr" fi - dnl Replace the wireshark prefix with our own. - dnl Note that $(prefix) is kept verbatim at this point in time, and will + dnl Replace the wireshark exec_prefix with our own. + dnl Note that $(exec_prefix) is kept verbatim at this point in time, and will dnl only be expanded later, when make is called: this makes it possible - dnl to override the prefix at compilation or installation time - ws_plugindir='$(prefix)'"${ws_plugindir#$ws_prefix}" + dnl to override the exec_prefix at compilation or installation time + ws_plugindir='$(exec_prefix)'"${ws_plugindir#$ws_exec_prefix}" elif test "x$with_ws_plugindir" = "xno" || test "x$with_ws_plugindir" = "xyes"; then AC_MSG_ERROR([ws-plugindir must be used only with valid path]) else diff --git a/tools/Makefile.am b/tools/Makefile.am index 319abb2..100e657 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -398,7 +398,6 @@ EXTRA_DIST += \ if WITH_WIRESHARK_DISSECTOR -ws_plugindir = @ws_plugindir@ ws_plugin_LTLIBRARIES = wireshark/src/libvirt.la wireshark_src_libvirt_la_CPPFLAGS = \ -I wireshark/src $(WIRESHARK_DISSECTOR_CFLAGS) -- 1.9.1
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list