diff --git a/libvirt.spec.in b/libvirt.spec.in index 9dff994f25546891f69ea83f8f3d146dfbe73ed2..469bfcae3f682598febaa08a2baf628635e4fdd0 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -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} diff --git a/m4/virt-wireshark.m4 b/m4/virt-wireshark.m4 index 47204ed2a3dd93ccae8458dc0daf373f129c9022..199317eaa312aa2ac9ff0fe58a34b5b1a8e2191d 100644 --- a/m4/virt-wireshark.m4 +++ b/m4/virt-wireshark.m4 @@ -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