提交 7c8250d7 编写于 作者: M Michal Privoznik

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.htmlSigned-off-by: NMichal Privoznik <mprivozn@redhat.com>
上级 2589ca30
......@@ -1170,7 +1170,7 @@ virtualization capabilities of recent versions of Linux (and other OSes).
%package wireshark
Summary: Wireshark dissector plugin for libvirt RPC transactions
Group: Development/Libraries
Requires: wireshark
Requires: wireshark >= 1.12.6-4
Requires: %{name}-client = %{version}-%{release}
%description wireshark
......@@ -1561,6 +1561,8 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/connection-driver/*.a
%endif
%if %{with_wireshark}
rm -f $RPM_BUILD_ROOT%{_libdir}/wireshark/plugins/*/libvirt.la
mv $RPM_BUILD_ROOT%{_libdir}/wireshark/plugins/*/libvirt.so \
$RPM_BUILD_ROOT%{_libdir}/wireshark/plugins/libvirt.so
%endif
# Temporarily get rid of not-installed libvirt-admin.so
......@@ -2279,7 +2281,7 @@ exit 0
%if %{with_wireshark}
%files wireshark
%{_libdir}/wireshark/plugins/*/libvirt.so
%{_libdir}/wireshark/plugins/libvirt.so
%endif
%if %{with_lxc}
......
......@@ -28,7 +28,12 @@ AC_DEFUN([LIBVIRT_CHECK_WIRESHARK],[
dnl Check for system location of wireshark plugins
if test "x$with_wireshark_dissector" != "xno" ; then
if test "x$with_ws_plugindir" = "xcheck" ; then
ws_plugindir="$libdir/wireshark/plugins/$($PKG_CONFIG --modversion wireshark)"
ws_plugindir="$($PKG_CONFIG --variable plugindir 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/$($PKG_CONFIG --modversion wireshark)"
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])
else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册