From 68e7ca9a29fadf3673f141ec098cf800b634c919 Mon Sep 17 00:00:00 2001 From: Radek Vokál Date: Dec 15 2009 08:36:27 +0000 Subject: enable Lua support --- diff --git a/wireshark-1.2.4-enable_lua.patch b/wireshark-1.2.4-enable_lua.patch new file mode 100644 index 0000000..caa3204 --- /dev/null +++ b/wireshark-1.2.4-enable_lua.patch @@ -0,0 +1,21 @@ +diff -up wireshark-1.2.4/epan/wslua/template-init.lua.enable_lua wireshark-1.2.4/epan/wslua/template-init.lua +--- wireshark-1.2.4/epan/wslua/template-init.lua.enable_lua 2009-11-16 21:30:58.000000000 +0100 ++++ wireshark-1.2.4/epan/wslua/template-init.lua 2009-12-15 09:33:59.000000000 +0100 +@@ -26,7 +26,7 @@ + -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + -- Lua is disabled by default, comment out the following line to enable Lua support. +-disable_lua = true; do return end; ++-- disable_lua = true; do return end; + + + -- If set and we are running with special privileges this setting +@@ -39,7 +39,7 @@ if running_superuser then + local disabled_lib = {} + setmetatable(disabled_lib,{ __index = function() error("this package has been disabled") end } ); + +- dofile = function() error("dofile has been disabled") end ++-- dofile = function() error("dofile has been disabled") end + loadfile = function() error("loadfile has been disabled") end + loadlib = function() error("loadlib has been disabled") end + require = function() error("require has been disabled") end diff --git a/wireshark-1.2.4-filter_null.patch b/wireshark-1.2.4-filter_null.patch new file mode 100644 index 0000000..cadef53 --- /dev/null +++ b/wireshark-1.2.4-filter_null.patch @@ -0,0 +1,14 @@ +diff -up wireshark-1.2.4/gtk/filter_autocomplete.c.bckp wireshark-1.2.4/gtk/filter_autocomplete.c +--- wireshark-1.2.4/gtk/filter_autocomplete.c.bckp 2009-11-16 21:30:43.000000000 +0100 ++++ wireshark-1.2.4/gtk/filter_autocomplete.c 2009-12-14 15:51:18.000000000 +0100 +@@ -776,7 +776,9 @@ filter_autocomplete_handle_backspace(Gtk + GtkRequisition requisition; + size_t prefix_len; + gboolean protocols_only = FALSE; +- ++ ++ if (prefix == NULL) return; ++ + /* Delete the last character in the prefix string */ + prefix_len = strlen(prefix)-1; + prefix[prefix_len] = '\0'; diff --git a/wireshark.spec b/wireshark.spec index af6007d..96387f8 100644 --- a/wireshark.spec +++ b/wireshark.spec @@ -2,6 +2,7 @@ #define to 0 for final version %define svn_version 0 %define with_adns 0 +%define with_lua 1 %if 0%{?rhel} != 0 %define with_portaudio 0 %else @@ -11,7 +12,7 @@ Summary: Network traffic analyzer Name: wireshark Version: 1.2.4 -Release: 1%{?dist} +Release: 2%{?dist} License: GPL+ Group: Applications/Internet %if %{svn_version} @@ -26,6 +27,9 @@ Patch1: wireshark-1.0.2-pie.patch Patch2: wireshark-nfsv4-opts.patch Patch3: wireshark-0.99.7-path.patch Patch4: wireshark-1.1.2-nfs41-backchnl-decode.patch +Patch5: wireshark-1.2.4-filter_null.patch + +Patch10: wireshark-1.2.4-enable_lua.patch Url: http://www.wireshark.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -46,6 +50,9 @@ BuildRequires: adns-devel %if %{with_portaudio} BuildRequires: portaudio-devel %endif +%if %{with_lua} +BuildRequires: lua-devel +%endif Obsoletes: ethereal Provides: ethereal @@ -91,6 +98,11 @@ Contains wireshark for Gnome 2 and desktop integration file %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 + +%if %{with_lua} +%patch10 -p1 -b .enable_lua +%endif %build %ifarch s390 s390x sparcv9 sparc64 @@ -117,9 +129,14 @@ export LDFLAGS="$LDFLAGS -lm -lcrypto" %else --with-adns=no \ %endif +%if %{with_lua} + --with-lua \ +%else + --with-lua=no \ +%endif --with-ssl \ --disable-warnings-as-errors \ - --with-plugindir=%{_libdir}/%{name}/plugins/%{version} + --with-plugindir=%{_libdir}/%{name}/plugins/%{version} time make %{?_smp_mflags} %install @@ -203,6 +220,9 @@ rm -rf $RPM_BUILD_ROOT %config(noreplace) %{_sysconfdir}/pam.d/wireshark %config(noreplace) %{_sysconfdir}/security/console.apps/wireshark %{_datadir}/wireshark +%if %{with_lua} +%config(noreplace) %{_datadir}/wireshark/init.lua +%endif %files gnome %defattr(-,root,root) @@ -214,6 +234,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Dec 14 2009 Radek Vokal - 1.2.4-2 +- enable lua support - http://wiki.wireshark.org/Lua +- attempt to fix filter crash on 64bits + * Wed Nov 18 2009 Radek Vokal - 1.2.4-1 - upgrade to 1.2.4 - http://www.wireshark.org/docs/relnotes/wireshark-1.2.4.html