Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jan 2008 00:02:00 +0100 (CET)
From:      Dan Lukes <dan@obluda.cz>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/119844: nmap-4.53 has been released (we missed 4.21, 4.22, 4.23, 4.50, 4.51, 4.52 already)
Message-ID:  <200801202302.m0KN205p029431@kulesh.obluda.cz>
Resent-Message-ID: <200801202310.m0KNA2Mk093750@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         119844
>Category:       ports
>Synopsis:       nmap-4.53 has been released (we missed 4.21,4.22,4.23,4.50,4.51,4.52 already)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 20 23:10:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Dan Lukes
>Release:        FreeBSD 6.3-PRERELEASE i386
>Organization:
Obludarium
>Environment:
nmap-4.20_1: Makefile,v 1.106 2007/08/04 11:41:17 gabor

>Description:

	Nmap 4.20 is more than year old. It lacks signatures for some current OSs
and services.

	The support for nmapfe GUI has been replaced by zenmap GUI on version 4.23

	I want to save nmapfe+current nmap for those users who like to use nmapfe
so this upgrade is somewhat complicated. 

	If you decide not to save nmapfe then just delete it and skip step 1

>How-To-Repeat:
>Fix:

1. Save nmapfe+current nmap

1a. rename nmap port to nmap420
1b. change reference within nmapfe to nmap420
1c. add CONFLICT with zenmap-* to nmapfe
1d. add CONFLICT with nmap-4.[5-9]* to nmap420

2. Create new nmap + zenmap

2a. New NMAP files are attached bellow
2b. New zenmap files are attached bellow



 ***********************************************
 *****                                     *****
 *****             NMAP files              *****
 *****           security/nmap             *****
 *****                                     *****
 ***********************************************

--- Makefile begins here ---
PORTNAME?=	nmap
PORTVERSION=	${DISTVERSION:L:C/([a-z])[a-z]+/\1/g:C/[^a-z0-9+]+/./g}
CATEGORIES=	security ipv6
MASTER_SITES=	http://download.insecure.org/nmap/dist/ \
		http://www.mirrors.wiretapped.net/security/network-mapping/nmap/ \
		http://www.mirrorservice.org/sites/ftp.wiretapped.net/pub/security/network-mapping/nmap/ \
		http://mirror.sg.depaul.edu/pub/security/nmap/
DISTNAME=	nmap-${DISTVERSION}	# needed for security/nmapfe

MAINTAINER=	daniel@roe.ch
COMMENT?=	Port scanning utility for large networks

DISTVERSION=	4.53

USE_BZIP2=	yes
USE_GMAKE=	yes

GNU_CONFIGURE=	yes
CONFIGURE_ARGS=	--without-localdirs

CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}

.ifdef BUILD_NMAPFE
BROKEN=security/nmapfe port is obsolete, use security/zenmap
.endif

CONFLICTS=	nmapfe-*

.ifndef BUILD_ZENMAP
MAN1=		nmap.1

LIB_DEPENDS=	pcre.0:${PORTSDIR}/devel/pcre \
		dnet.1:${PORTSDIR}/net/libdnet

CONFIGURE_ARGS+=	--with-libpcre=${LOCALBASE} --with-libdnet=${LOCALBASE}

.ifndef WITHOUT_LUA
USE_LUA=        5.1+
LUA_COMPS=      lua:build
CONFIGURE_ARGS+=	--with-liblua=${LUA_PREFIX}
CFLAGS+=	-I${LUA_INCDIR}
LDFLAGS+=	-L${LUA_LIBDIR}
CONFIGURE_ENV=	LIBS=-lm
.else
CONFIGURE_ARGS+=	--without-lua
.endif

.ifndef WITHOUT_SSL
USE_OPENSSL=	yes
CONFIGURE_ARGS+=	--with-openssl=${OPENSSLBASE}
.else
CONFIGURE_ARGS+=	--without-openssl
.endif

CONFIGURE_ARGS+=	--without-zenmap

post-configure:
	@${REINPLACE_CMD} -e "s|^DESTDIR *=|& ${DESTDIR}|" ${WRKSRC}/Makefile

post-install:
.ifndef NOPORTDOCS
	@${MKDIR} ${DOCSDIR}
	@for doc in CHANGELOG HACKING docs/nmap.dtd; do \
		${INSTALL_DATA} ${WRKSRC}/$${doc} ${DOCSDIR}; \
	done
.endif
	@for file in ${WRKSRC}/scripts/script.db ${WRKSRC}/scripts/*.nse ${WRKSRC}/nselib/*.lua; do \
		echo ${DATADIR_REL}/$${file#${WRKSRC}/} >> ${TMPPLIST}; \
	done
	@echo @dirrm ${DATADIR_REL}/scripts >> ${TMPPLIST}
	@echo @dirrm ${DATADIR_REL}/nselib >> ${TMPPLIST}
	@echo @dirrm ${DATADIR_REL} >> ${TMPPLIST}
	@for file in ${WRKSRC}/nselib-bin/*.so ; do \
		echo libexec/nmap/$${file#${WRKSRC}/} >> ${TMPPLIST}; \
	done
	@echo @dirrm libexec/nmap/nselib-bin >> ${TMPPLIST}
	@echo @dirrm libexec/nmap >> ${TMPPLIST}

.else

CONFLICTS+=	nmap-4.[012]*

USE_PYTHON=	2.5+

RUN_DEPENDS=    nmap:${PORTSDIR}/security/nmap

DESCR=          ${PKGDIR}/pkg-descr.zen
PLIST=          ${PKGDIR}/pkg-plist.zen
PLIST_SUB=      REALPREFIX=${PREFIX}

MAN1=           zenmap.1
MLINKS=         zenmap.1 xnmap.1

RUN_DEPENDS=   ${PYTHON_SITELIBDIR}/pygtk.pth:${PORTSDIR}/x11-toolkits/py-gtk2
RUN_DEPENDS+=  ${PYTHON_SITELIBDIR}/_sqlite3.so:${PORTSDIR}/databases/py-sqlite3

CONFIGURE_ARGS+=--without-openssl --without-lua


ALL_TARGET=     build-zenmap
INSTALL_TARGET= install-zenmap

post-install:
	@rm ${LOCALBASE}/bin/uninstall_zenmap
	${INSTALL_MAN} ${WRKSRC}/docs/zenmap.1 ${MAN1PREFIX}/man/man1

.endif

.include <bsd.port.mk>
--- Makefile ends here ---

--- distinfo begins here ---
MD5 (nmap-4.53.tar.bz2) = bb203c47f3c234b61d3c4916da7eaa27
SHA256 (nmap-4.53.tar.bz2) = 5e09463b2c91007932755c19f7cb7d076a8e456305d2495673c3206e8e0cfd46
SIZE (nmap-4.53.tar.bz2) = 3145948
--- distinfo ends here ---

--- pkg-descr begins here ---
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/

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
   obrien@cs.ucdavis.edu
--- pkg-descr ends here ---

--- pkg-plist begins here ---
bin/nmap
%%DATADIR%%/nmap-mac-prefixes
%%DATADIR%%/nmap-os-db
%%DATADIR%%/nmap-protocols
%%DATADIR%%/nmap-rpc
%%DATADIR%%/nmap-service-probes
%%DATADIR%%/nmap-services
%%DATADIR%%/nmap.dtd
%%DATADIR%%/nmap.xsl
%%PORTDOCS%%%%DOCSDIR%%/CHANGELOG
%%PORTDOCS%%%%DOCSDIR%%/HACKING
%%PORTDOCS%%%%DOCSDIR%%/nmap.dtd
%%PORTDOCS%%@dirrm %%DOCSDIR%%
--- pkg-plist ends here ---

--- pkg-descr.zen begins here ---
ZenNmap is a GUI front end for the nmap port scanning tool.

WWW: http://www.insecure.org/nmap/

-- David
   obrien@cs.ucdavis.edu
--- pkg-descr.zen ends here ---

--- pkg-descr.zen begins here ---
ZenNmap is a GUI front end for the nmap port scanning tool.

WWW: http://www.insecure.org/nmap/

-- David
   obrien@cs.ucdavis.edu
--- pkg-descr.zen ends here ---

--- files/patch-Makefile.in begins here ---
--- Makefile.in.orig	Mon Oct  6 12:57:49 2003
+++ Makefile.in	Mon Oct  6 12:58:00 2003
@@ -9,7 +9,7 @@
 mandir = @mandir@
 srcdir = @srcdir@
 nmapdatadir = @datadir@/nmap
-deskdir = $(prefix)/share/applications
+deskdir = $(X11BASE)/share/applications
 NMAPDEVDIR=~/nmap-dev
 
 export NBASEDIR=@NBASEDIR@
--- patch-Makefile.in ends here ---

--- files/patch-output.cc begins here ---
--- output.cc.orig	Fri Dec  8 04:01:19 2006
+++ output.cc	Wed Jan  3 17:10:43 2007
@@ -109,6 +109,7 @@
 #include "NmapOutputTable.h"
 #include "MACLookup.h"
 
+#include <sys/param.h>
 #include <string>
 
 /* Workaround for lack of namespace std on HP-UX 11.00 */
@@ -742,8 +743,8 @@
   case LOG_MACHINE:
   case LOG_SKID:
   case LOG_XML:
-#ifdef WIN32
-	  apcopy = ap;
+#if defined(WIN32) || (defined(FREEBSD) && (__FreeBSD_version < 500000))
+    apcopy = ap;
 #else
     va_copy(apcopy, ap); /* Needed in case we need to so a second vnsprintf */
 #endif
--- patch-output.cc ends here ---

--- files/patch-configure begins here ---

$FreeBSD: ports/security/nmap/files/patch-configure,v 1.8 2006/02/02 08:13:19 krion Exp $

--- configure.orig
+++ configure
@@ -1395,7 +1395,7 @@
 if test -z "$ac_cv_prog_CC"; then
   ac_ct_CC=$CC
   # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
+set dummy ${ac_tool_prefix}$CXX; ac_word=$2
 echo "$as_me:$LINENO: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
@@ -6929,7 +6929,7 @@
 
 
   # If they didn't specify it, we try to find it
-  if test $have_lua != yes; then
+  if test $no_lua != yes; then
     if test "${ac_cv_header_lua_h+set}" = set; then
   echo "$as_me:$LINENO: checking for lua.h" >&5
 echo $ECHO_N "checking for lua.h... $ECHO_C" >&6
@@ -7589,7 +7589,7 @@
 int
 main ()
 {
-#if BYTE_ORDER != BIG_ENDIAN
+#if 0
  not big endian
 #endif
 
--- patch-configure ends here ---

--- files/patch-tcpip.cc begins here ---
--- tcpip.cc.orig	Fri Dec  8 04:01:19 2006
+++ tcpip.cc	Wed Jan  3 17:15:05 2007
@@ -133,6 +133,8 @@
 #endif /* NETINET_IF_ETHER_H */
 #endif /* HAVE_NETINET_IF_ETHER_H */
 
+#include <sys/param.h>
+
 extern NmapOps o;
 
 #ifdef WIN32
@@ -1959,7 +1961,7 @@
 
 // Returns whether the system supports pcap_get_selectable_fd() properly
 bool pcap_selectable_fd_valid() {
-#if defined(WIN32) || defined(MACOSX)
+#if defined(WIN32) || defined(MACOSX) || (defined(FREEBSD) && (__FreeBSD_version < 500000))
   return false;
 #endif
   return true;
@@ -1972,7 +1974,7 @@
    results.  If you just want to test whether the function is supported,
    use pcap_selectable_fd_valid() instead. */
 int my_pcap_get_selectable_fd(pcap_t *p) {
-#if defined(WIN32) || defined(MACOSX)
+#if defined(WIN32) || defined(MACOSX) || (defined(FREEBSD) && (__FreeBSD_version < 500000))
   return -1;
 #else
   assert(pcap_selectable_fd_valid());
--- patch-tcpip.cc ends here ---

--- files/patch-libdnet-stripped__src__eth-bsd.c begins here ---
#
# $FreeBSD: ports/security/nmap/files/patch-libdnet-stripped__src__eth-bsd.c,v 1.1 2006/06/06 01:30:16 mnag Exp $
#
# - nmap fails to attach to bpf when more than 128 bpfs are busy.
# PR: 98080
#
--- libdnet-stripped/src/eth-bsd.c.orig
+++ libdnet-stripped/src/eth-bsd.c
@@ -45,7 +45,7 @@
 	int i;
 
 	if ((e = calloc(1, sizeof(*e))) != NULL) {
-		for (i = 0; i < 128; i++) {
+		for (i = 0; i < 1024; i++) {
 			snprintf(file, sizeof(file), "/dev/bpf%d", i);
 			e->fd = open(file, O_WRONLY);
 			if (e->fd != -1 || errno != EBUSY)
--- patch-libdnet-stripped__src__eth-bsd.c ends here ---


 ***********************************************
 *****                                     *****
 *****            ZENMAP files             *****
 *****          security/zenmap            *****
 *****                                     *****
 ***********************************************

--- Makefile begins here ---
PORTNAME=	zenmap

COMMENT=	GUI frontend for the nmap scanning utility

MASTERDIR=	${.CURDIR}/../nmap

BUILD_ZENMAP=	yes

.include "${MASTERDIR}/Makefile"
--- Makefile ends here ---

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801202302.m0KN205p029431>