[packages/nmap] - up to 7.91

mrozowik mrozowik at pld-linux.org
Wed May 26 02:31:10 CEST 2021


commit cd6b49b0c95ffd039df9ea9d50b1cd3be4c0ee78
Author: Krzysztof Mrozowicz <mrozowik at pld-linux.org>
Date:   Wed May 26 00:30:22 2021 +0000

    - up to 7.91

 ncat-system-ssl.patch  | 10 +++----
 nmap-am18.patch        | 47 --------------------------------
 nmap-system-dnet.patch | 10 -------
 nmap-system-lua.patch  | 11 --------
 nmap.spec              | 73 +++++++++++++++++++-------------------------------
 5 files changed, 31 insertions(+), 120 deletions(-)
---
diff --git a/nmap.spec b/nmap.spec
index a0f270f..778d362 100644
--- a/nmap.spec
+++ b/nmap.spec
@@ -1,8 +1,7 @@
 #
 # Conditional build:
 %bcond_with	system_dnet	# use system libdnet instead of local modified version
-%bcond_without	svn		# nmap-update support (using subversion library)
-%bcond_without	python		# Python based scripts
+%bcond_without	python		# Python2 based scripts (zenmap, ndiff)
 %bcond_without	lua		# Nmap Scripting Engine (lua based)
 
 Summary:	Network exploration tool and security scanner
@@ -12,18 +11,15 @@ Summary(pt_BR.UTF-8):	Ferramenta de exploração da rede e segurança
 Summary(ru.UTF-8):	Утилита сканирования сети и аудита безопасности
 Summary(uk.UTF-8):	Утиліта сканування мережі та аудиту безпеки
 Name:		nmap
-Version:	7.70
-Release:	2
+Version:	7.91
+Release:	1
 License:	GPL v2 clarified, with OpenSSL exception
 Group:		Networking/Utilities
 Source0:	http://nmap.org/dist/%{name}-%{version}.tar.bz2
-# Source0-md5:	84eb6fbe788e0d4918c2b1e39421bf79
-Patch0:		%{name}-am18.patch
-Patch1:		%{name}-system-lua.patch
-Patch2:		%{name}-system-dnet.patch
-Patch3:		%{name}-desktop.patch
-Patch4:		ncat-system-ssl.patch
-Patch5:		%{name}-pythondir.patch
+# Source0-md5:	239cef725863ab454590a1bb8793b72b
+Patch0:		%{name}-desktop.patch
+Patch1:		ncat-system-ssl.patch
+Patch2:		%{name}-pythondir.patch
 URL:		http://nmap.org/
 BuildRequires:	autoconf >= 2.50
 BuildRequires:	automake
@@ -37,15 +33,11 @@ BuildRequires:	libtool
 BuildRequires:	openssl-devel
 BuildRequires:	pcre-devel
 BuildRequires:	python-devel >= 1:2.4
-BuildRequires:	rpm-javaprov
 BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.672
 BuildRequires:	sed >= 4.0
-%{?with_svn:BuildRequires:	subversion-devel}
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define		_noautoreq_java ClassDataVersion
-
 %description
 Nmap is a utility for network exploration or security auditing. It
 supports ping scanning (determine which hosts are up), many port
@@ -112,6 +104,7 @@ Requires:	python-sqlite >= 2.0
 Provides:	nmap-X11
 Obsoletes:	nmap-X11
 Obsoletes:	nmap-frontend
+Suggests:	gksu
 
 %description zenmap
 This package includes zenmap, a graphical frontend for nmap.
@@ -149,32 +142,21 @@ zastosowań.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
-%patch3 -p1
-%patch4 -p1
-%patch5 -p1
+# use system provided libraries
+%{__rm} -r liblinear liblua libpcap libpcre libssh2 libz
 
 %build
-ln -s config/acinclude.m4 libdnet-stripped
-ln -s ../acinclude.m4 ncat
-%{__libtoolize}
-find -type f -name configure.ac -o -name configure.in | while read CFG; do
-	cd $(dirname "$CFG")
-	%{__aclocal}
-	%{__autoconf}
-	cd "$OLDPWD"
-done
-cp -f /usr/share/automake/config.sub .
-
-CXXFLAGS="%{rpmcxxflags} -fno-exceptions"
 CPPFLAGS="-I/usr/include/lua5.3"
 %configure \
 	%{?with_lua:LIBLUA_LIBS="-llua5.3"} \
 	--with-liblinear \
 	--with%{!?with_lua:out}-liblua \
-	--with%{!?with_svn:out}-subversion \
-	--with-libdnet%{!?with_system_dnet:=included}
+	--with-libdnet%{!?with_system_dnet:=included} \
+	--with%{!?with_python:out}-zenmap \
+	--with%{!?with_python:out}-ndiff \
+	STRIP=/bin/true
 
-%{__make} -j1
+%{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -183,6 +165,7 @@ install -d $RPM_BUILD_ROOT%{_pixmapsdir}
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
+%if %{with python}
 cp -p docs/zenmap.1 $RPM_BUILD_ROOT%{_mandir}/man1
 
 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
@@ -193,29 +176,27 @@ cp -p docs/zenmap.1 $RPM_BUILD_ROOT%{_mandir}/man1
 %{__rm} $RPM_BUILD_ROOT%{_bindir}/uninstall_zenmap
 %{__rm} $RPM_BUILD_ROOT%{_bindir}/uninstall_ndiff
 
+# unify locale names
+%{__mv} $RPM_BUILD_ROOT%{_datadir}/zenmap/locale/zh{,_CN}
+%endif
+
 # unify locale names
 %{__mv} $RPM_BUILD_ROOT%{_mandir}/pt{_PT,}
 %{__mv} $RPM_BUILD_ROOT%{_mandir}/zh{,_CN}
-%{__mv} $RPM_BUILD_ROOT%{_datadir}/zenmap/locale/zh{,_CN}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-# note: COPYING contains important notes and clarifications
-%doc docs/README docs/*.txt CHANGELOG COPYING
-%attr(755,root,root) %{_bindir}/ndiff
+%doc docs/README docs/*.txt CHANGELOG HACKING
+%{?with_python:%attr(755,root,root) %{_bindir}/ndiff}
 %attr(755,root,root) %{_bindir}/nmap
-%{?with_svn:%attr(755,root,root) %{_bindir}/nmap-update}
 %attr(755,root,root) %{_bindir}/nping
 %{_datadir}/nmap
-%if %{with python}
-%{py_sitescriptdir}/ndiff.py[co]
-%endif
-%{_mandir}/man1/ndiff.1*
+%{?with_python:%{_mandir}/man1/ndiff.1*}
+%{?with_python:%{py_sitescriptdir}/ndiff.py[co]}
 %{_mandir}/man1/nmap.1*
-%{?with_svn:%{_mandir}/man1/nmap-update.1*}
 %{_mandir}/man1/nping.1*
 %lang(de) %{_mandir}/de/man1/nmap.1*
 %lang(es) %{_mandir}/es/man1/nmap.1*
@@ -237,12 +218,12 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/ncat
 %{_mandir}/man1/ncat.1*
 
+%if %{with python}
 %files zenmap
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/nmapfe
 %attr(755,root,root) %{_bindir}/xnmap
 %attr(755,root,root) %{_bindir}/zenmap
-%if %{with python}
 %dir %{py_sitescriptdir}/radialnet
 %dir %{py_sitescriptdir}/radialnet/bestwidgets
 %dir %{py_sitescriptdir}/radialnet/core
@@ -260,7 +241,6 @@ rm -rf $RPM_BUILD_ROOT
 %{py_sitescriptdir}/zenmapGUI/*.py[co]
 %{py_sitescriptdir}/zenmapGUI/higwidgets/*.py[co]
 %{py_sitescriptdir}/zenmap-%{version}-py*.egg-info
-%endif
 %dir %{_datadir}/zenmap
 %{_datadir}/zenmap/config
 %{_datadir}/zenmap/docs
@@ -277,7 +257,8 @@ rm -rf $RPM_BUILD_ROOT
 %lang(ru) %{_datadir}/zenmap/locale/ru
 %lang(zh_CN) %{_datadir}/zenmap/locale/zh_CN
 %{_datadir}/zenmap/pixmaps
-%{_datadir}/zenmap/su-to-zenmap.sh
+%attr(755,root,root) %{_datadir}/zenmap/su-to-zenmap.sh
 %{_desktopdir}/zenmap-root.desktop
 %{_desktopdir}/zenmap.desktop
 %{_mandir}/man1/zenmap.1*
+%endif
diff --git a/ncat-system-ssl.patch b/ncat-system-ssl.patch
index c7f6288..84e0e54 100644
--- a/ncat-system-ssl.patch
+++ b/ncat-system-ssl.patch
@@ -1,12 +1,10 @@
-https://bugzilla.redhat.com/show_bug.cgi?id=734389
-
---- nmap-6.47/ncat/Makefile.in~	2013-09-12 11:20:13.000000000 +0300
-+++ nmap-6.47/ncat/Makefile.in	2015-05-27 11:49:55.759139244 +0300
-@@ -79,7 +79,6 @@
+--- nmap-7.91/ncat/Makefile.in~	2018-10-16 14:34:39.000000000 +0000
++++ nmap-7.91/ncat/Makefile.in	2021-03-25 00:06:14.652085342 +0000
+@@ -80,7 +80,6 @@
  ifneq ($(HAVE_OPENSSL),)
  SRCS += http_digest.c
  OBJS += http_digest.o
 -DATAFILES = certs/ca-bundle.crt
  endif
  
- ifneq ($(HAVE_LUA),)
+ ifneq ($(NOLUA),yes)
diff --git a/nmap-am18.patch b/nmap-am18.patch
deleted file mode 100644
index d0bc8aa..0000000
--- a/nmap-am18.patch
+++ /dev/null
@@ -1,47 +0,0 @@
---- nmap-3.50/nbase/acinclude.m4.orig	2002-09-09 00:56:01.000000000 +0200
-+++ nmap-3.50/nbase/acinclude.m4	2004-01-22 21:37:57.178324264 +0100
-@@ -11,7 +11,7 @@
- dnl can't use getaddrinfo() because we can't get strings
- dnl describing the error codes.
- dnl
--AC_DEFUN(APR_CHECK_WORKING_GETADDRINFO,[
-+AC_DEFUN([APR_CHECK_WORKING_GETADDRINFO],[
-   AC_CACHE_CHECK(for working getaddrinfo, ac_cv_working_getaddrinfo,[
-   AC_TRY_RUN( [
- #ifdef HAVE_NETDB_H
-@@ -62,7 +62,7 @@
- dnl
- dnl check for working getnameinfo() -- from Apache 2.0.40
- dnl
--AC_DEFUN(APR_CHECK_WORKING_GETNAMEINFO,[
-+AC_DEFUN([APR_CHECK_WORKING_GETNAMEINFO],[
-   AC_CACHE_CHECK(for working getnameinfo, ac_cv_working_getnameinfo,[
-   AC_TRY_RUN( [
- #ifdef HAVE_NETDB_H
-@@ -114,7 +114,7 @@
- fi
- ])
- 
--AC_DEFUN(APR_CHECK_SOCKADDR_IN6,[
-+AC_DEFUN([APR_CHECK_SOCKADDR_IN6],[
- AC_CACHE_CHECK(for sockaddr_in6, ac_cv_define_sockaddr_in6,[
- AC_TRY_COMPILE([
- #ifdef HAVE_SYS_TYPES_H
-@@ -140,7 +140,7 @@
- fi
- ])
- 
--AC_DEFUN(CHECK_AF_INET6_DEFINE,[
-+AC_DEFUN([CHECK_AF_INET6_DEFINE],[
- AC_CACHE_CHECK(for AF_INET6 definition, ac_cv_define_af_inet6,[
- AC_TRY_COMPILE([
- #ifdef HAVE_SYS_TYPES_H
-@@ -169,7 +169,7 @@
- fi
- ])
- 
--AC_DEFUN(APR_CHECK_SOCKADDR_STORAGE,[
-+AC_DEFUN([APR_CHECK_SOCKADDR_STORAGE],[
- AC_CACHE_CHECK(for sockaddr_storage, ac_cv_define_sockaddr_storage,[
- AC_TRY_COMPILE([
- #ifdef HAVE_SYS_TYPES_H
diff --git a/nmap-system-dnet.patch b/nmap-system-dnet.patch
deleted file mode 100644
index b0b99b8..0000000
--- a/nmap-system-dnet.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- nmap-4.60/configure.ac.orig	2008-03-21 18:18:08.912209000 +0100
-+++ nmap-4.60/configure.ac	2008-03-21 19:49:46.741509563 +0100
-@@ -423,6 +423,7 @@
- AC_HELP_STRING([--with-libdnet=DIR], [Use an existing (compiled) dnet lib from DIR/include and DIR/lib.]),
- [  case "$with_libdnet" in
-   yes)
-+    have_dnet=yes
-     ;;
-   included)
-     ;;
diff --git a/nmap-system-lua.patch b/nmap-system-lua.patch
deleted file mode 100644
index ecad37e..0000000
--- a/nmap-system-lua.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- nmap-4.60/configure.ac.orig	2008-01-17 08:22:03.000000000 +0100
-+++ nmap-4.60/configure.ac	2008-03-21 17:40:50.652654146 +0100
-@@ -471,6 +471,7 @@
- AC_HELP_STRING([--without-liblua], [Compile without lua (this will exclude all of NSE from compilation)]),
- [  case "$with_liblua" in
-   yes)
-+    have_lua=yes
-   ;;
-   included)
-     CXXFLAGS="-I$LIBLUADIR $CXXFLAGS"
-
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/nmap.git/commitdiff/cd6b49b0c95ffd039df9ea9d50b1cd3be4c0ee78



More information about the pld-cvs-commit mailing list