[libvirt] [PATCH 0/2] Two wireshark fixes

While trying to do an RPM, I've ran into two problems. I've already pushed the fixes under 'build breaker rule'. I'm sending them for completeness. Michal Privoznik (2): virt-wireshark: Properly substract wireshark prefix libvirt.spec.in: Adapt to newest wireshark plugindir libvirt.spec.in | 6 ++---- m4/virt-wireshark.m4 | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) -- 2.8.4

So, when building wireshark plugin, we get the plugindir variable from the wireshark.pc as well as prefix. Then we replace the prefix in the plugindir with our own prefix where libvirt is building to: plugindir="${prefix}${plugindir#ws_prefix}" However, as you can see, there's '$' missing in front of the ws_prefix variable. This results in the mangled plugindir, for instance like this: plugindir='/usr/usr/lib64/wireshark/plugins' Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- m4/virt-wireshark.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/m4/virt-wireshark.m4 b/m4/virt-wireshark.m4 index d8cb7c8..f383e2b 100644 --- a/m4/virt-wireshark.m4 +++ b/m4/virt-wireshark.m4 @@ -38,7 +38,7 @@ AC_DEFUN([LIBVIRT_CHECK_WIRESHARK],[ if test "x$ws_prefix" = "x" ; then ws_prefix="/usr"; fi - plugindir="${prefix}${plugindir#ws_prefix}" + 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]) -- 2.8.4

In the old days, when wireshark plugin was introduced it was installed under /usr/lib64/wireshark/plugins/$VERSION/ while with wireshark-2.1.0 this path has changed just to /usr/lib64/wireshark/plugins. We should teach our spec file about this change. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- libvirt.spec.in | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index cc5d722..35c7449 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -406,7 +406,7 @@ BuildRequires: numad %endif %if %{with_wireshark} -BuildRequires: wireshark-devel +BuildRequires: wireshark-devel >= 2.1.0 %endif Provides: bundled(gnulib) @@ -1212,9 +1212,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/lock-driver/*.a rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/connection-driver/*.la rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/connection-driver/*.a %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 +rm -f $RPM_BUILD_ROOT%{_libdir}/wireshark/plugins/libvirt.la %endif install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/lib/libvirt/dnsmasq/ -- 2.8.4

Le 27/07/2016 à 17:03, Michal Privoznik a écrit :
In the old days, when wireshark plugin was introduced it was installed under /usr/lib64/wireshark/plugins/$VERSION/ while with wireshark-2.1.0 this path has changed just to /usr/lib64/wireshark/plugins. We should teach our spec file about this change.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- libvirt.spec.in | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in index cc5d722..35c7449 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -406,7 +406,7 @@ BuildRequires: numad %endif
%if %{with_wireshark} -BuildRequires: wireshark-devel +BuildRequires: wireshark-devel >= 2.1.0 %endif
Provides: bundled(gnulib) @@ -1212,9 +1212,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/lock-driver/*.a rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/connection-driver/*.la rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/connection-driver/*.a %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 +rm -f $RPM_BUILD_ROOT%{_libdir}/wireshark/plugins/libvirt.la %endif
install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/lib/libvirt/dnsmasq/
%package wireshark Requires: wireshark >= 1.12.6-4 Does this version number need to be bump ? Regards, Jean-Marc Liger
participants (2)
-
Jean-Marc Liger
-
Michal Privoznik