ports/57196: [MAINTAINER] port security/nmap: update to version 3.46

Oliver Eikemeier eikemeier at fillmore-labs.com
Wed Sep 24 22:30:21 UTC 2003


>Number:         57196
>Category:       ports
>Synopsis:       [MAINTAINER] port security/nmap: update to version 3.46
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 24 15:30:18 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Oliver Eikemeier
>Release:        FreeBSD 5.1-CURRENT i386
>Organization:
Fillmore Labs - http://www.fillmore-labs.com
>Environment:
System: FreeBSD nuuk.fillmore-labs.com 5.1-CURRENT

>Description:

- update to version 3.46
  * tested on -CURRENT and -STABLE
- supersedes PR 56968

- please update pcre too (PR 56966)


>How-To-Repeat:
>Fix:

--- nmap-3.46.patch begins here ---
diff -Nur security/nmap.orig/Makefile security/nmap/Makefile
--- security/nmap.orig/Makefile	Wed Sep 24 20:14:30 2003
+++ security/nmap/Makefile	Thu Sep 25 00:12:49 2003
@@ -1,4 +1,3 @@
-# ex:ts=8
 # Ports collection makefile for:  nmap
 # Date created:			  Tue Aug 04, 1998
 # Whom:				  David O'Brien (obrien at NUXI.com)
@@ -6,37 +5,74 @@
 # $FreeBSD: ports/security/nmap/Makefile,v 1.72 2003/09/24 09:36:56 osa Exp $
 #
 
-PORTNAME?=	nmap
-PORTVERSION=	3.30
-CATEGORIES=	security ipv6
-MASTER_SITES=	http://download.insecure.org/nmap/dist/
-DISTNAME=	nmap-${PORTVERSION:S/.b/BETA/}
+PORTNAME?=		nmap
+PORTVERSION=		3.46
+CATEGORIES=		security ipv6
+MASTER_SITES=		http://download.insecure.org/nmap/dist/
+DISTNAME=		nmap-${PORTVERSION}
 
-MAINTAINER=	eikemeier at fillmore-labs.com
-COMMENT?=	Port scanning utility for large networks
+MAINTAINER=		eikemeier at fillmore-labs.com
+COMMENT?=		Port scanning utility for large networks
 
-GNU_CONFIGURE=	yes
-CONFIGURE_ARGS=	--without-localdirs
-USE_BZIP2=	yes
+USE_BZIP2=		yes
 
-MAN1?=		nmap.1
+GNU_CONFIGURE=		yes
+CONFIGURE_ARGS=		--without-localdirs
 
-.include <bsd.port.pre.mk>
+CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
 
-.if ${OSVERSION} < 300004
-CFLAGS+=	-DDLT_RAW=12 # for obsoleted <net/bpf.h>
+.ifndef BUILD_NMAPFE
+
+MAN1=			nmap.1
+
+LIB_DEPENDS=		pcre.0:${PORTSDIR}/devel/pcre
+
+CONFIGURE_ARGS+=	--with-libpcre=${LOCALBASE}
+
+.ifndef WITHOUT_SSL
+USE_OPENSSL=		yes
+CONFIGURE_ARGS+=	--with-openssl=${OPENSSLBASE}
+.else
+CONFIGURE_ARGS+=	--without-openssl
 .endif
 
-CONFIGURE_TARGET=	-build=${ARCH}-portbld-freebsd${OSREL}
-.if ${PORTNAME} == "nmap"
 CONFIGURE_ARGS+=	--without-nmapfe
-.endif
-ALL_TARGET?=		nmap
-INSTALL_TARGET?=	install-nmap
 
-.if !target(post-install) && (${PORTNAME} == "nmap")
+ALL_TARGET=		nmap
+INSTALL_TARGET=		install-nmap
+
 post-install:
 	@${STRIP_CMD} ${PREFIX}/bin/nmap
+.ifndef NOPORTDOCS
+	@${MKDIR} ${DOCSDIR}
+	@for doc in CHANGELOG HACKING docs/nmap.dtd; do \
+		${INSTALL_DATA} ${WRKSRC}/$${doc} ${DOCSDIR}; \
+	done
+.endif
+
+.else
+
+RUN_DEPENDS=		nmap:${PORTSDIR}/security/nmap
+
+DESCR=			${PKGDIR}/pkg-descr.fe
+PLIST=			${PKGDIR}/pkg-plist.fe
+PLIST_SUB=		REALPREFIX=${PREFIX}
+
+MAN1=			nmapfe.1
+MLINKS=			nmapfe.1 xnmap.1
+
+USE_GNOME=		gtk12
+
+CONFIGURE_ARGS+=	--without-openssl
+
+CONFIGURE_ARGS+=	--with-nmapfe
+
+ALL_TARGET=		nbase/libnbase.a nmapfe/nmapfe
+INSTALL_TARGET=		install-nmapfe
+
+post-install:
+	@${STRIP_CMD} ${PREFIX}/bin/nmapfe
+
 .endif
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff -Nur security/nmap.orig/distinfo security/nmap/distinfo
--- security/nmap.orig/distinfo	Tue Jul  1 05:38:03 2003
+++ security/nmap/distinfo	Wed Sep 24 20:35:19 2003
@@ -1 +1 @@
-MD5 (nmap-3.30.tar.bz2) = 639fc1c91f48319eca97401e74f9c90e
+MD5 (nmap-3.46.tar.bz2) = 58974b2d4059752a9f66adc4659f7878
diff -Nur security/nmap.orig/files/patch-Makefile.in security/nmap/files/patch-Makefile.in
--- security/nmap.orig/files/patch-Makefile.in	Tue Jul  1 09:27:43 2003
+++ security/nmap/files/patch-Makefile.in	Wed Sep 24 23:59:44 2003
@@ -1,6 +1,6 @@
---- Makefile.in.orig	Fri Mar  9 22:25:19 2001
-+++ Makefile.in	Sun May 27 17:49:17 2001
-@@ -9,14 +9,14 @@
+--- Makefile.in.orig	Sat Sep 20 11:00:04 2003
++++ Makefile.in	Wed Sep 24 23:59:42 2003
+@@ -9,7 +9,7 @@
  mandir = @mandir@
  srcdir = @srcdir@
  nmapdatadir = @datadir@/nmap
@@ -8,21 +8,12 @@
 +deskdir = $(X11BASE)/share/gnome/apps/Utilities
  
  NBASEDIR=@NBASEDIR@
- CC = @CC@
- CXX = @CXX@
- CCOPT = 
- LIBPCAPDIR = @libpcapdir@
--INCLS = -I$(LIBPCAPDIR) 
-+#INCLS = -I$(LIBPCAPDIR) 
- DEFS = @DEFS@ -DNMAP_VERSION=\"$(NMAP_VERSION)\" -DNMAP_NAME=\"$(NMAP_NAME)\" -DNMAP_URL=\"$(NMAP_URL)\" -DNMAP_PLATFORM=\"$(NMAP_PLATFORM)\" -DNMAPDATADIR=\"$(nmapdatadir)\"
+ NSOCKDIR=@NSOCKDIR@
+@@ -23,6 +23,7 @@
  # For mtrace debugging -- see MTRACE define in main.cc for instructions
  # Should only be enabled during debugging and not in any real release.
-@@ -200,7 +200,7 @@
- 	$(MAKEDEPEND) $(INCLS) -s "# DO NOT DELETE" -- $(DEFS) -- $(SRCS)
- 
- install-nmap: $(TARGET)
--	$(SHTOOL) mkdir -f -p -m 755 $(bindir) $(mandir)/man1 $(nmapdatadir) $(deskdir)
-+	$(SHTOOL) mkdir -f -p -m 755 $(bindir) $(mandir)/man1 $(nmapdatadir)
- 	$(INSTALL) -c -m 755 nmap $(bindir)/nmap
- 	$(INSTALL) -c -m 644 docs/$(TARGET).1 $(mandir)/man1/$(TARGET).1
- 	$(INSTALL) -c -m 644 nmap-os-fingerprints  $(nmapdatadir)/nmap-os-fingerprints
+ # DEFS += -DMTRACE=1
++CPPFLAGS = @CPPFLAGS@
+ CXXFLAGS = @CXXFLAGS@ $(CCOPT) $(DEFS) $(INCLS)
+ # CFLAGS = $(CXXFLAGS)
+ # CFLAGS = $(DEFS) $(INCLS)
diff -Nur security/nmap.orig/files/patch-configure security/nmap/files/patch-configure
--- security/nmap.orig/files/patch-configure	Thu Jan  1 01:00:00 1970
+++ security/nmap/files/patch-configure	Wed Sep 24 23:09:55 2003
@@ -0,0 +1,112 @@
+--- configure.orig	Sat Sep 20 09:06:56 2003
++++ configure	Wed Sep 24 23:09:21 2003
+@@ -1302,7 +1302,7 @@
+      fi
+    if test -d /usr/local/include; then
+      CFLAGS="$CFLAGS -I/usr/local/include"
+-     CXXFLAGS="$CFLAGS -I/usr/local/include"
++     CXXFLAGS="$CXXFLAGS -I/usr/local/include"
+    fi
+ fi
+ 
+@@ -3299,7 +3299,7 @@
+ 
+ 
+ 
+-for ac_header in string.h getopt.h strings.h memory.h sys/param.h sys/sockio.h bstring.h sys/time.h pwd.h unistd.h
++for ac_header in string.h strings.h memory.h sys/param.h sys/sockio.h bstring.h sys/time.h pwd.h unistd.h
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ if eval "test \"\${$as_ac_Header+set}\" = set"; then
+@@ -4319,7 +4319,7 @@
+     ;;
+   *)
+     specialssldir="$with_openssl"
+-    CXXFLAGS="$CXXFLAGS -I$with_openssl/include"
++    CPPFLAGS="$CPPFLAGS -I$with_openssl/include"
+     LDFLAGS="$LDFLAGS -L$with_openssl/lib"
+     ;;
+   esac
+@@ -5105,10 +5105,10 @@
+ 
+     ;;
+   *)
+-    _cppflags=$CXXFLAGS
++    _cppflags=$CPPFLAGS
+     _ldflags=$LDFLAGS
+ 
+-    CXXFLAGS="-I$with_libpcap/include $CXXFLAGS"
++    CPPFLAGS="-I$with_libpcap/include $CPPFLAGS"
+     LDFLAGS="-L$with_libpcap/lib $LDFLAGS"
+ 
+     if test "${ac_cv_header_pcap_h+set}" = set; then
+@@ -5307,7 +5307,7 @@
+ 
+ 
+     LDFLAGS=$_ldflags
+-    CXXFLAGS=$_cppflags
++    CPPFLAGS=$_cppflags
+     ;;
+   esac
+ 
+@@ -5323,10 +5323,10 @@
+ 
+ if test $have_libpcap = yes; then
+   if test "${LIBPCAP_INC+set}" = "set"; then
+-    _cflags=$CXXFLAGS
++    _cppflags=$CPPFLAGS
+     _ldflags=$LDFLAGS
+ 
+-    CXXFLAGS="-I$LIBPCAP_INC $CXXFLAGS"
++    CPPFLAGS="-I$LIBPCAP_INC $CPPFLAGS"
+     LDFLAGS="-L$LIBPCAP_LIB $LDFLAGS"
+   fi
+ 
+@@ -5336,6 +5336,8 @@
+   echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; have_libpcap=no
+ else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lpcap  $LIBS"
+   cat >conftest.$ac_ext <<_ACEOF
+ #line $LINENO "configure"
+ /* confdefs.h.  */
+@@ -5391,6 +5393,7 @@
+ echo "${ECHO_T}no" >&6; have_libpcap=no
+ fi
+ rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
+ fi
+ fi
+ 
+@@ -5406,10 +5409,10 @@
+ else
+   if test "${LIBPCAP_INC+set}" = "set"; then
+     LDFLAGS="-L$libpcapdir $_ldflags"
+-    CXXFLAGS="$_cflags -I$libpcapdir"
++    CPPFLAGS="$_cppflags -I$libpcapdir"
+   else
+     LDFLAGS="-L$libpcapdir $LDFLAGS"
+-    CXXFLAGS="$CXXFLAGS -I$libpcapdir"
++    CPPFLAGS="$CPPFLAGS -I$libpcapdir"
+   fi
+   PCAP_DEPENDS='$(LIBPCAPDIR)/libpcap.a'
+   PCAP_CLEAN="pcap_clean"
+@@ -5433,7 +5436,7 @@
+   yes)
+     ;;
+   *)
+-    CXXFLAGS="-I$with_libpcre/include $CXXFLAGS"
++    CPPFLAGS="-I$with_libpcre/include $CPPFLAGS"
+     LDFLAGS="-L$with_libpcre/lib $LDFLAGS"
+     have_pcre=yes
+     ;;
+@@ -5844,7 +5847,7 @@
+ 
+ subdirs="$subdirs libpcre "
+ 
+-  CXXFLAGS="-I$LIBPCREDIR $CXXFLAGS"
++  CPPFLAGS="-I$LIBPCREDIR $CPPFLAGS"
+   LIBPCRE_LIB="$LIBPCREDIR"
+   LIBS="$LIBS $LIBPCRE_LIB/libpcre.a"
+   PCRE_DEPENDS="$LIBPCRE_LIB/libpcre.a"
diff -Nur security/nmap.orig/files/patch-nbase::configure security/nmap/files/patch-nbase::configure
--- security/nmap.orig/files/patch-nbase::configure	Thu Jan  1 01:00:00 1970
+++ security/nmap/files/patch-nbase::configure	Wed Sep 24 23:10:22 2003
@@ -0,0 +1,20 @@
+--- nbase/configure.orig	Sat Sep 20 11:13:26 2003
++++ nbase/configure	Wed Sep 24 23:10:21 2003
+@@ -2971,7 +2971,7 @@
+ 
+ 
+ 
+-for ac_header in string.h getopt.h strings.h memory.h sys/param.h sys/time.h unistd.h bstring.h errno.h sys/types.h sys/socket.h netinet/in.h sys/sockio.h rpc/types.h netdb.h pwd.h arpa/inet.h sys/resource.h sys/stat.h sys/wait.h libiberty.h fcntl.h
++for ac_header in string.h strings.h memory.h sys/param.h sys/time.h unistd.h bstring.h errno.h sys/types.h sys/socket.h netinet/in.h sys/sockio.h rpc/types.h netdb.h pwd.h arpa/inet.h sys/resource.h sys/stat.h sys/wait.h libiberty.h fcntl.h
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ if eval "test \"\${$as_ac_Header+set}\" = set"; then
+@@ -5905,7 +5905,7 @@
+     ;;
+   *)
+     specialssldir="$with_openssl"
+-    CXXFLAGS="-I$with_openssl/include $CXXFLAGS"
++    CPPFLAGS="-I$with_openssl/include $CPPFLAGS"
+     ;;
+   esac
+ 
diff -Nur security/nmap.orig/files/patch-nsock::src::configure security/nmap/files/patch-nsock::src::configure
--- security/nmap.orig/files/patch-nsock::src::configure	Thu Jan  1 01:00:00 1970
+++ security/nmap/files/patch-nsock::src::configure	Wed Sep 24 22:05:33 2003
@@ -0,0 +1,67 @@
+--- nsock/src/configure.orig	Sat Sep 20 09:07:00 2003
++++ nsock/src/configure	Wed Sep 24 22:05:32 2003
+@@ -3169,27 +3169,6 @@
+ 
+ 
+ 
+-# Check whether --with-libnbase or --without-libnbase was given.
+-if test "${with_libnbase+set}" = set; then
+-  withval="$with_libnbase"
+-    case "$with_libnbase" in
+-  yes)
+-    ;;
+-  *)
+-    NBASEDIR="$with_libnbase"
+-    ;;
+-  esac
+-else
+-  NBASEDIR="../../nbase"
+-
+-fi;
+-
+-LDFLAGS="$LDFLAGS -L$NBASEDIR"
+-CFLAGS="$CFLAGS -I$NBASEDIR"
+-LIBS="$LIBS -lnbase"
+-
+-
+-
+ # First we test whether they specified openssl desires explicitly
+ use_openssl="yes"
+ specialssldir=""
+@@ -3206,7 +3185,7 @@
+     ;;
+   *)
+     specialssldir="$with_openssl"
+-    CXXFLAGS="-I$with_openssl/include $CXXFLAGS"
++    CPPFLAGS="-I$with_openssl/include $CPPFLAGS"
+     ;;
+   esac
+ 
+@@ -3856,6 +3835,27 @@
+ _ACEOF
+ 
+ fi
++
++
++# Check whether --with-libnbase or --without-libnbase was given.
++if test "${with_libnbase+set}" = set; then
++  withval="$with_libnbase"
++    case "$with_libnbase" in
++  yes)
++    ;;
++  *)
++    NBASEDIR="$with_libnbase"
++    ;;
++  esac
++else
++  NBASEDIR="../../nbase"
++
++fi;
++
++LDFLAGS="$LDFLAGS -L$NBASEDIR"
++CFLAGS="$CFLAGS -I$NBASEDIR"
++LIBS="$LIBS -lnbase"
++
+ 
+ 
+ echo "$as_me:$LINENO: checking struct ip" >&5
diff -Nur security/nmap.orig/pkg-descr security/nmap/pkg-descr
--- security/nmap.orig/pkg-descr	Thu Mar 14 19:18:08 2002
+++ security/nmap/pkg-descr	Thu Sep 25 00:11:17 2003
@@ -1,14 +1,14 @@
-nmap is a utility for port scanning large networks, although it works fine
-for single hosts.  The guiding philosophy for the creation of nmap was TMTOWTDI
-(There's More Than One Way To Do It).  Sometimes you need speed, other times
-you may need stealth.  In some cases, bypassing firewalls may be required. Not
-to mention the fact that you may want to scan different protocols (UDP, TCP,
-ICMP, etc.).  You just can't do all this with one scanning mode.  Thus nmap
-incorporates virtually every scanning technique known of.
+Nmap is a utility for network exploration or security auditing. It
+supports ping scanning (determine which hosts are up), many port
+scanning techniques, version detection (determine service protocols
+and application versions listening behind ports), and TCP/IP
+fingerprinting (remote host OS or device identification). Nmap also
+offers flexible target and port specification, decoy/stealth scanning,
+sunRPC scanning, and more.
 
-WWW: http://www.insecure.org/nmap/index.html
+WWW: http://www.insecure.org/nmap/
 
-See the webpage and the Phrack Magazine article (Volume 7, Issue 51 
+See the web page and the Phrack Magazine article (Volume 7, Issue 51 
 September 01, 1997, article 11 of 17) http://www.insecure.org/nmap/p51-11.txt
 
 -- David
diff -Nur security/nmap.orig/pkg-descr.fe security/nmap/pkg-descr.fe
--- security/nmap.orig/pkg-descr.fe	Thu Jan  1 01:00:00 1970
+++ security/nmap/pkg-descr.fe	Wed Sep 24 20:31:26 2003
@@ -0,0 +1,6 @@
+nmapfe is a GUI front end for the nmap port scanning tool.
+
+WWW: http://www.insecure.org/nmap/
+
+-- David
+   obrien at cs.ucdavis.edu
diff -Nur security/nmap.orig/pkg-plist security/nmap/pkg-plist
--- security/nmap.orig/pkg-plist	Tue Jul  1 05:38:03 2003
+++ security/nmap/pkg-plist	Wed Sep 24 23:28:43 2003
@@ -1,6 +1,11 @@
 bin/nmap
-share/nmap/nmap-os-fingerprints
-share/nmap/nmap-protocols
-share/nmap/nmap-services
-share/nmap/nmap-rpc
- at dirrm share/nmap
+%%DATADIR%%/nmap-os-fingerprints
+%%DATADIR%%/nmap-protocols
+%%DATADIR%%/nmap-rpc
+%%DATADIR%%/nmap-service-probes
+%%DATADIR%%/nmap-services
+ at dirrm %%DATADIR%%
+%%PORTDOCS%%%%DOCSDIR%%/CHANGELOG
+%%PORTDOCS%%%%DOCSDIR%%/HACKING
+%%PORTDOCS%%%%DOCSDIR%%/nmap.dtd
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
diff -Nur security/nmap.orig/pkg-plist.fe security/nmap/pkg-plist.fe
--- security/nmap.orig/pkg-plist.fe	Thu Jan  1 01:00:00 1970
+++ security/nmap/pkg-plist.fe	Thu Sep 25 00:05:50 2003
@@ -0,0 +1,8 @@
+bin/nmapfe
+bin/xnmap
+ at cwd %%X11BASE%%
+share/gnome/apps/Utilities/nmapfe.desktop
+ at unexec rmdir %D/share/gnome/apps/Utilities 2>/dev/null || true
+ at unexec rmdir %D/share/gnome/apps 2>/dev/null || true
+ at unexec rmdir %D/share/gnome 2>/dev/null || true
+ at cwd %%REALPREFIX%%
diff -Nur security/nmapfe.orig/Makefile security/nmapfe/Makefile
--- security/nmapfe.orig/Makefile	Tue Jul  1 06:04:02 2003
+++ security/nmapfe/Makefile	Wed Sep 24 20:31:26 2003
@@ -1,4 +1,3 @@
-# ex:ts=8
 # Ports collection makefile for:  nmap
 # Date created:			  Tue Aug 04, 1998
 # Whom:				  David O'Brien (obrien at NUXI.com)
@@ -10,16 +9,8 @@
 
 COMMENT=	GUI frontend for the nmap scanning utility
 
-RUN_DEPENDS=	nmap:${PORTSDIR}/security/nmap
-
 MASTERDIR=	${.CURDIR}/../nmap
-PLIST=		${.CURDIR}/pkg-plist
-
-USE_GNOME=	gtk12
-
-MAN1=		nmapfe.1 xnmap.1
 
-ALL_TARGET=	nbase/libnbase.a nmapfe/nmapfe
-INSTALL_TARGET=	install-nmapfe
+BUILD_NMAPFE=	yes
 
 .include "${MASTERDIR}/Makefile"
diff -Nur security/nmapfe.orig/pkg-descr security/nmapfe/pkg-descr
--- security/nmapfe.orig/pkg-descr	Fri Sep 10 08:26:35 1999
+++ security/nmapfe/pkg-descr	Thu Jan  1 01:00:00 1970
@@ -1,6 +0,0 @@
-nmapfe is a GUI front end for the nmap port scanning tool.
-
-WWW: http://www.insecure.org/nmap/index.html
-
--- David
-   obrien at cs.ucdavis.edu
diff -Nur security/nmapfe.orig/pkg-plist security/nmapfe/pkg-plist
--- security/nmapfe.orig/pkg-plist	Tue Jul  1 06:04:02 2003
+++ security/nmapfe/pkg-plist	Thu Jan  1 01:00:00 1970
@@ -1,5 +0,0 @@
-bin/nmapfe
-bin/xnmap
- at cwd %%X11BASE%%
-share/gnome/apps/Utilities/nmapfe.desktop
- at cwd %%LOCALBASE%%
--- nmap-3.46.patch ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list