Re: [PATCH 3/3] wireshark: Fix distcheck

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/25/2016 03:11 AM, Michal Privoznik wrote:
> Our distcheck is broken. Well, it works but only by pure chance.
> When wireshark plugin is enabled, we try to query which path
> should the plugin be installed into. Firstly, we try to ask
> pkg-config as some releases of wireshark already sets
> corresponding variable in their pkg-config files. However, if we
> obtained no value from there we try to construct the path on our
> own. Based on our observations it usually is:
> $libdir/wireshark/plugins/$version/.
> Now, the problem is in the way we are deciding whether we have
> obtained the plugin directory from pkg-config or not. Simply
> said, we are checking wrong variable. The variable we are
> checking has never been set, thus in our test is empty and
> therefore we will always construct the plugin dir path on our
> own, regardless of its presence in the pkg-config file.
> To make things worse, after fixing this problem, VPATH build was
> broken as it now tried to install plugin into correct directory.
> Yes, this is problem, because --prefix was not honoured and
> everything but the plugin was installed into given prefix. I've
> managed to resolve this issue by replacing plugin dir prefix with
> our own. So when doing regular installation (our prefix ==
> wireshark prefix), nothing changes. When doing VPATH build &
> installation plugin is installed into correctly prefixed dir.
> 
> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
> ---
>  m4/virt-wireshark.m4 | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/m4/virt-wireshark.m4 b/m4/virt-wireshark.m4
> index ac2e44c..d8cb7c8 100644
> --- a/m4/virt-wireshark.m4
> +++ b/m4/virt-wireshark.m4
> @@ -29,10 +29,16 @@ AC_DEFUN([LIBVIRT_CHECK_WIRESHARK],[
>    if test "x$with_wireshark_dissector" != "xno" ; then
>      if test "x$with_ws_plugindir" = "xcheck" ; then
>        plugindir="$($PKG_CONFIG --variable plugindir wireshark)"
> -      if test "x$ws_plugindir" = "x" ; then
> +      if test "x$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.
>          plugindir="$libdir/wireshark/plugins/$($PKG_CONFIG --modversion wireshark)"
> +      else
> +        ws_prefix="$($PKG_CONFIG --variable prefix wireshark)"
> +        if test "x$ws_prefix" = "x" ; then
> +          ws_prefix="/usr";
> +        fi
> +        plugindir="${prefix}${plugindir#ws_prefix}"
>        fi
>      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])
> 

Sounds reasonable to me, ACK

- Cole

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]