Просмотр исходного кода

Add ws dissector to rpm

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto 2 недель назад
Родитель
Сommit
429cbb5fb6
3 измененных файлов с 28 добавлено и 5 удалено
  1. 0 5
      Makefile.am
  2. 1 0
      configure.ac
  3. 27 0
      corosync.spec.in

+ 0 - 5
Makefile.am

@@ -159,11 +159,6 @@ $(SPEC): $(SPEC).in
 		-e "s#@DIRTY@#$$dirty#g" \
 		-e "s#@date@#$$date#g" \
 	$< > $@-t; \
-if BUILD_WSDISSECTOR
-	sed -i -e "s#@buildwsdissector@#bcond_without#g" $@-t \
-else
-	sed -i -e "s#@buildwsdissector@#bcond_with#g" $@-t \
-endif
 	chmod a-w $@-t
 	mv $@-t $@
 

+ 1 - 0
configure.ac

@@ -206,6 +206,7 @@ if test "x$enable_wireshark_dissector" = xyes; then
 	if test "x$wireshark_PREFIX" != "x${prefix}"; then
 		wireshark_INSTALL_PREFIX="${prefix}"
 	fi
+	WITH_LIST="$WITH_LIST --with wsdissector"
 fi
 AC_SUBST([wireshark_INSTALL_PREFIX], [$wireshark_INSTALL_PREFIX])
 

+ 27 - 0
corosync.spec.in

@@ -15,6 +15,11 @@
 %bcond_with vqsim
 %bcond_with runautogen
 %bcond_with userflags
+%bcond_with wsdissector
+
+%if %{with wsdissector}
+%define wireshark_plugindir %(pkg-config --variable plugindir wireshark)/epan
+%endif
 
 %global gitver %{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}
 %global gittarver %{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}
@@ -78,6 +83,9 @@ Requires: libxslt
 %if %{with vqsim}
 BuildRequires: readline-devel
 %endif
+%if %{with wsdissector}
+BuildRequires: wireshark-devel >= 4.6
+%endif
 
 %prep
 %setup -q -n %{name}-%{version}%{?gittarver}
@@ -114,6 +122,9 @@ BuildRequires: readline-devel
 %endif
 %if %{with userflags}
 	--enable-user-flags \
+%endif
+%if %{with wsdissector}
+	--enable-wireshark-dissector \
 %endif
 	--with-initddir=%{_initrddir} \
 	--with-systemddir=%{_unitdir} \
@@ -133,6 +144,8 @@ install -m 644 %{_builddir}/%{name}-%{version}%{?gittarver}/conf/corosync-signal
 # drop static libs
 rm -f %{buildroot}%{_libdir}/*.a
 rm -f %{buildroot}%{_libdir}/*.la
+rm -f %{buildroot}%{wireshark_plugindir}/*.a
+rm -f %{buildroot}%{wireshark_plugindir}/*.la
 # drop docs and html docs for now
 rm -rf %{buildroot}%{_docdir}/*
 # /etc/sysconfig/corosync-notifyd
@@ -302,6 +315,20 @@ network splits)
 %{_mandir}/man8/corosync-vqsim.8*
 %endif
 
+%if %{with wsdissector}
+%package -n corosync-wireshark
+Summary: Wireshark dissector plugin for corosync
+License: LGPL-2.1-or-later
+Requires: wireshark >= 4.6.0
+Requires: kronosnet-wireshark
+
+%description -n corosync-wireshark
+ Wireshark dissector plugin for better analysis of corosync traffic.
+
+%files -n corosync-wireshark
+%{wireshark_plugindir}/corosync-totemknet.so
+%endif
+
 %changelog
 * @date@ Autotools generated version <nobody@nowhere.org> - @version@-1-@numcomm@.@alphatag@.@dirty@
 - Autotools generated version