[libvirt] [PATCH 4/5] m4: Put wireshark plugin into epan/ directory

Michal Privoznik posted 5 patches 6 years, 10 months ago
[libvirt] [PATCH 4/5] m4: Put wireshark plugin into epan/ directory
Posted by Michal Privoznik 6 years, 10 months ago
Since wirshark-2.5.0 toplevel plugins are no longer loaded. Only
plugins from epan/, wiretap/ or codecs/ subdirs are. Update the
plugin dir we generate. This is safe to do even for older
wiresharks, since they load plugins from there too.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
 libvirt.spec.in      | 4 ++--
 m4/virt-wireshark.m4 | 6 ++++++
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/libvirt.spec.in b/libvirt.spec.in
index c0e538d92d..13f41bb4a5 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -168,9 +168,9 @@
     %define with_wireshark 0%{!?_without_wireshark:1}
 %endif
 %if 0%{?fedora} || 0%{?rhel} > 7
-    %define wireshark_plugindir %(pkg-config --variable plugindir wireshark)
+    %define wireshark_plugindir %(pkg-config --variable plugindir wireshark)/epan
 %else
-    %define wireshark_plugindir %{_libdir}/wireshark/plugins
+    %define wireshark_plugindir %{_libdir}/wireshark/plugins/epan
 %endif
 
 # Enable libssh transport for new enough distros
diff --git a/m4/virt-wireshark.m4 b/m4/virt-wireshark.m4
index 1283a0f403..a8f8083f5e 100644
--- a/m4/virt-wireshark.m4
+++ b/m4/virt-wireshark.m4
@@ -50,6 +50,12 @@ AC_DEFUN([LIBVIRT_CHECK_WIRESHARK],[
         dnl time
         ws_plugindir='${exec_prefix}'"${ws_plugindir#$ws_exec_prefix}"
       fi
+
+      dnl Since wireshark 2.5.0 plugins can't leave in top level
+      dnl plugindir but have to be under one of ["epan",
+      dnl "wiretap", "codecs"] subdir. The first one looks okay.
+      ws_plugindir="$ws_plugindir/epan"
+
     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
-- 
2.19.2

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 4/5] m4: Put wireshark plugin into epan/ directory
Posted by Ján Tomko 6 years, 10 months ago
On Fri, Feb 08, 2019 at 12:23:27PM +0100, Michal Privoznik wrote:
>Since wirshark-2.5.0 toplevel plugins are no longer loaded. Only
>plugins from epan/, wiretap/ or codecs/ subdirs are. Update the
>plugin dir we generate. This is safe to do even for older
>wiresharks, since they load plugins from there too.
>
>Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
>---
> libvirt.spec.in      | 4 ++--
> m4/virt-wireshark.m4 | 6 ++++++
> 2 files changed, 8 insertions(+), 2 deletions(-)
>
>diff --git a/libvirt.spec.in b/libvirt.spec.in
>index c0e538d92d..13f41bb4a5 100644
>--- a/libvirt.spec.in
>+++ b/libvirt.spec.in
>@@ -168,9 +168,9 @@
>     %define with_wireshark 0%{!?_without_wireshark:1}
> %endif
> %if 0%{?fedora} || 0%{?rhel} > 7
>-    %define wireshark_plugindir %(pkg-config --variable plugindir wireshark)
>+    %define wireshark_plugindir %(pkg-config --variable plugindir wireshark)/epan
> %else
>-    %define wireshark_plugindir %{_libdir}/wireshark/plugins
>+    %define wireshark_plugindir %{_libdir}/wireshark/plugins/epan
> %endif
>
> # Enable libssh transport for new enough distros
>diff --git a/m4/virt-wireshark.m4 b/m4/virt-wireshark.m4
>index 1283a0f403..a8f8083f5e 100644
>--- a/m4/virt-wireshark.m4
>+++ b/m4/virt-wireshark.m4
>@@ -50,6 +50,12 @@ AC_DEFUN([LIBVIRT_CHECK_WIRESHARK],[
>         dnl time
>         ws_plugindir='${exec_prefix}'"${ws_plugindir#$ws_exec_prefix}"
>       fi
>+
>+      dnl Since wireshark 2.5.0 plugins can't leave in top level

s/leave/live/

Jano

>+      dnl plugindir but have to be under one of ["epan",
>+      dnl "wiretap", "codecs"] subdir. The first one looks okay.
>+      ws_plugindir="$ws_plugindir/epan"
>+
>     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
>-- 
>2.19.2
>
>--
>libvir-list mailing list
>libvir-list@redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list