Commit Graph

4 Commits

Author SHA1 Message Date
Michal Privoznik
dc3002b46c wireshark: Fix distcheck
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@redhat.com>
2016-04-25 18:56:48 +02:00
Michal Privoznik
50078cfbcb wireshark: Install into DESTDIR
Like everything we install, it should be prefixed with DESTDIR.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2016-01-12 18:51:38 +01:00
Michal Privoznik
7c8250d765 wireshark: Install to generic plugin directory
There has been a report on the list [1] that we are not
installing the wireshark dissector into the correct plugin
directory. And in fact we are not. The problem is, the plugin
directory path is constructed at compile time. However, it's
dependent on the wireshark version, e.g.

  /usr/lib/wireshark/plugins/1.12.6

This is rather unfortunate, because if libvirt RPMs were built
with one version, but installed on a system with newer one, the
plugins are not really loaded. This problem lead fedora packagers
to unify plugin path to:

  /usr/lib/wireshark/plugins/

Cool! But this was enabled just in wireshark-1.12.6-4. Therefore,
we must require at least that version.

And while at it, on some distributions, the wireshark.pc file
already has a variable that defines where plugin dir is. Use that
if possible.

1: https://www.redhat.com/archives/libvirt-users/2015-October/msg00063.html

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2015-10-29 13:55:06 +01:00
Pavel Hrdina
373973206a rpm-build: use pkg-config to detect wireshark presence
Wireshark supports pkg-config since 1.11.3.  Right now we build
wireshark-dissectior tool as default trough rpm build only on
fedora >= 21 and there is new wireshark that supports pkg-config.
If someone wants to build libvirt with wireshark-dissector against old
wireshark, they should specify the location by hand.

This patch is mainly to fix wrong dependency on wireshark binary as it
doesn't make sense to require that binary file to just get version info
of that package in makefile.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-03-16 22:58:54 +01:00