diff --git a/nmap-6.25-displayerror.patch b/nmap-6.25-displayerror.patch new file mode 100644 index 0000000..6b59845 --- /dev/null +++ b/nmap-6.25-displayerror.patch @@ -0,0 +1,17 @@ +diff -up nmap-6.25/zenmap/zenmapGUI/App.py.displayerror nmap-6.25/zenmap/zenmapGUI/App.py +--- nmap-6.25/zenmap/zenmapGUI/App.py.displayerror 2013-05-23 15:11:46.595569883 +0200 ++++ nmap-6.25/zenmap/zenmapGUI/App.py 2013-05-23 15:12:44.786049525 +0200 +@@ -116,7 +116,12 @@ except Exception: + # startup scripts, and for some reason the first connection (the one that + # caused the launch) is rejected. But somehow subsequent connections work + # fine! So if the import fails, try one more time. +- import gtk ++ try: ++ import gtk ++ except Exception, e: ++ print >> sys.stderr, 'Error:', str(e) ++ sys.exit(1) ++ + warnings.resetwarnings() + + from zenmapGUI.higwidgets.higdialogs import HIGAlertDialog diff --git a/nmap.spec b/nmap.spec index 9f5cf36..19dd7a1 100644 --- a/nmap.spec +++ b/nmap.spec @@ -4,7 +4,7 @@ Name: nmap Epoch: 2 Version: 6.25 #global prerelease TEST5 -Release: 2%{?dist} +Release: 3%{?dist} # nmap is GPLv2 # zenmap is GPLv2 and LGPLv2+ (zenmap/higwidgets) and GPLv2+ (zenmap/radialnet) # libdnet-stripped is BSD (advertising clause rescinded by the Univ. of California in 1999) with some parts as Public Domain (crc32) @@ -33,6 +33,7 @@ Patch4: zenmap-621887-workaround.patch # upstream provided patch for rhbz#845005, not yet in upstream repository Patch5: ncat_reg_stdin.diff +Patch6: nmap-6.25-displayerror.patch URL: http://nmap.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -89,6 +90,7 @@ uses. %patch2 -p1 -b .noms %patch4 -p1 -b .bz637403 %patch5 -p1 -b .ncat_reg_stdin +%patch6 -p1 -b .displayerror # for aarch64 support, not needed with autotools 2.69+ for f in acinclude.m4 configure.ac nping/configure.ac @@ -226,6 +228,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/xnmap.1.gz %changelog +* Thu May 23 2013 Michal Hlavinka - 2:6.25-3 +- zenmap: do not traceback when there si no display, just exit nicely (#958240) + * Thu Mar 28 2013 Michal Hlavinka - 2:6.25-2 - fix aarch64 support (#926241)