diff --git a/wireshark-1.2.0-disable-warning-dialog.patch b/wireshark-1.2.0-disable-warning-dialog.patch index 6b5eb52..f52c015 100644 --- a/wireshark-1.2.0-disable-warning-dialog.patch +++ b/wireshark-1.2.0-disable-warning-dialog.patch @@ -2,58 +2,40 @@ Index: gtk/main.c =================================================================== --- gtk/main.c.orig +++ gtk/main.c -@@ -1247,11 +1247,11 @@ set_display_filename(capture_file *cf) +@@ -1246,13 +1246,13 @@ set_display_filename(capture_file *cf) + } GtkWidget *close_dlg = NULL; - --static void --priv_warning_dialog_cb(gpointer dialog, gint btn _U_, gpointer data _U_) --{ -- recent.privs_warn_if_elevated = !simple_dialog_check_get(dialog); --} -+// static void -+// priv_warning_dialog_cb(gpointer dialog, gint btn _U_, gpointer data _U_) -+// { -+// recent.privs_warn_if_elevated = !simple_dialog_check_get(dialog); -+// } - +- ++/* + static void + priv_warning_dialog_cb(gpointer dialog, gint btn _U_, gpointer data _U_) + { + recent.privs_warn_if_elevated = !simple_dialog_check_get(dialog); + } +- ++*/ #ifdef _WIN32 static void -@@ -1817,7 +1817,7 @@ main(int argc, char *argv[]) - e_prefs *prefs; - char badopt; - GtkWidget *splash_win = NULL; + npf_warning_dialog_cb(gpointer dialog, gint btn _U_, gpointer data _U_) +@@ -1792,9 +1792,10 @@ check_and_warn_user_startup(gchar *cf_na + #endif + { + gchar *cur_user, *cur_group; - gpointer priv_warning_dialog; +// gpointer priv_warning_dialog; - GLogLevelFlags log_flags; - guint go_to_packet = 0; - int optind_initial; -@@ -2577,17 +2577,17 @@ main(int argc, char *argv[]) - main_load_window_geometry(top_level); /* Tell the user not to run as root. */ -- if (running_with_special_privs() && recent.privs_warn_if_elevated) { -- cur_user = get_cur_username(); -- cur_group = get_cur_groupname(); -- priv_warning_dialog = simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK, -- "Running as user \"%s\" and group \"%s\".\n" -- "This could be dangerous.", cur_user, cur_group); -- g_free(cur_user); -- g_free(cur_group); -- simple_dialog_check_set(priv_warning_dialog, "Don't show this message again."); -- simple_dialog_set_cb(priv_warning_dialog, priv_warning_dialog_cb, NULL); -- } -+// if (running_with_special_privs() && recent.privs_warn_if_elevated) { -+// cur_user = get_cur_username(); -+// cur_group = get_cur_groupname(); -+// priv_warning_dialog = simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK, -+// "Running as user \"%s\" and group \"%s\".\n" -+// "This could be dangerous.", cur_user, cur_group); -+// g_free(cur_user); -+// g_free(cur_group); -+// simple_dialog_check_set(priv_warning_dialog, "Don't show this message again."); -+// simple_dialog_set_cb(priv_warning_dialog, priv_warning_dialog_cb, NULL); -+// } - ++/* + if (running_with_special_privs() && recent.privs_warn_if_elevated) { + cur_user = get_cur_username(); + cur_group = get_cur_groupname(); +@@ -1806,7 +1807,7 @@ check_and_warn_user_startup(gchar *cf_na + simple_dialog_check_set(priv_warning_dialog, "Don't show this message again."); + simple_dialog_set_cb(priv_warning_dialog, priv_warning_dialog_cb, NULL); + } +- ++*/ #ifdef _WIN32 /* Warn the user if npf.sys isn't loaded. */ + if (!stdin_capture && !cf_name && !npf_sys_is_running() && recent.privs_warn_if_no_npf && get_os_major_version() >= 6) { diff --git a/wireshark-1.2.0-geoip.patch b/wireshark-1.2.0-geoip.patch index 671b5c4..fc6e233 100644 --- a/wireshark-1.2.0-geoip.patch +++ b/wireshark-1.2.0-geoip.patch @@ -2,7 +2,7 @@ Index: epan/geoip_db.c =================================================================== --- epan/geoip_db.c.orig +++ epan/geoip_db.c -@@ -160,6 +160,9 @@ geoip_db_init(void) { +@@ -161,6 +161,9 @@ geoip_db_init(void) { geoip_dat_scan_dir(geoip_db_paths[i].path); } } diff --git a/wireshark.spec b/wireshark.spec index 3d77ee3..ff4fea2 100644 --- a/wireshark.spec +++ b/wireshark.spec @@ -61,9 +61,11 @@ BuildRequires: pcre-devel BuildRequires: portaudio-devel BuildRequires: python BuildRequires: tcpd-devel -BuildRequires: update-desktop-files BuildRequires: xdg-utils BuildRequires: zlib-devel +%if 0%{?suse_version} +BuildRequires: update-desktop-files +%endif %description Wireshark is a free network protocol analyzer for Unix and Windows. It @@ -98,22 +100,25 @@ view the reconstructed stream of a TCP session. %build %configure -make %{?jobs:-j%jobs} +make %{?_smp_mflags} %install -make "DESTDIR=$RPM_BUILD_ROOT" install +make DESTDIR=$RPM_BUILD_ROOT install ln -fs wireshark $RPM_BUILD_ROOT%{_bindir}/ethereal ln -fs tshark $RPM_BUILD_ROOT%{_bindir}/tethereal install -d -m 0755 $RPM_BUILD_ROOT%{_sysconfdir} install -d -m 0755 $RPM_BUILD_ROOT%{_mandir}/man1/ install -m 0644 *.1 $RPM_BUILD_ROOT%{_mandir}/man1/ -%suse_update_desktop_file -i wireshark System Network find $RPM_BUILD_ROOT -name "*.la" -exec rm {} \; install -d -m 0755 $RPM_BUILD_ROOT%{_includedir}/wireshark for i in `cat %{SOURCE1}`; do install -m 644 $i $RPM_BUILD_ROOT%{_includedir}/wireshark done install -D -m 0644 image/wsicon48.png $RPM_BUILD_ROOT%{_datadir}/pixmaps/wireshark.png +install -D -m 0644 wireshark.desktop $RPM_BUILD_ROOT%{_datadir}/applications/wireshark.desktop +%if 0%{?suse_version} +%suse_update_desktop_file %{name} +%endif %clean rm -rf $RPM_BUILD_ROOT @@ -127,7 +132,7 @@ rm -rf $RPM_BUILD_ROOT %doc AUTHORS COPYING NEWS README README.linux README.vmware %doc %{_mandir}/man1/[^i]* %doc %{_mandir}/man4/* -%{_datadir}/applications/*.desktop +%{_datadir}/applications/wireshark.desktop %{_datadir}/pixmaps/wireshark.png %{_bindir}/[^i]* %{_libdir}/lib*.so.*