From chinsan@chinsan.info  Fri Mar  4 21:08:06 2011
Return-Path: <chinsan@chinsan.info>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BD9871065677
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  4 Mar 2011 21:08:06 +0000 (UTC)
	(envelope-from chinsan@chinsan.info)
Received: from chinsan.info (chinsan.info [72.232.65.226])
	by mx1.freebsd.org (Postfix) with ESMTP id 970E38FC16
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  4 Mar 2011 21:08:06 +0000 (UTC)
Received: by chinsan.info (Postfix, from userid 1001)
	id 280EAB822; Sat,  5 Mar 2011 05:24:21 +0800 (CST)
Message-Id: <20110304212422.280EAB822@chinsan.info>
Date: Sat,  5 Mar 2011 05:24:21 +0800 (CST)
From: chinsan <chinsan@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: ohauer@FreeBSD.org
Subject: [PATCH] security/nmap: Fix build on 6.x
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         155276
>Category:       ports
>Synopsis:       [PATCH] security/nmap: Fix build on 6.x
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    ohauer
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 04 21:10:09 UTC 2011
>Closed-Date:    Sat Mar 05 03:33:25 UTC 2011
>Last-Modified:  Sat Mar 05 21:34:21 UTC 2011
>Originator:     chinsan
>Release:        FreeBSD 7.1-STABLE i386
>Organization:
Taiwan
>Environment:
System: FreeBSD chinsan.info 7.1-STABLE FreeBSD 7.1-STABLE #0: Mon Jan 12 01:44:01 CST 2009
>Description:
- Fix build on 6.x
  As nmap/nping needs OpenSSL to supports SHA-256 (ver 0.9.8 or later).
  Check for OPENSSL 0.9.8 in BASE:  If not present require PORT

Port maintainer (ohauer@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:
>Fix:

--- nmap-5.51.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/security/nmap/Makefile /usr/home/tinderbox/tinderbox-3.3/portstrees/FreeBSD/ports/security/nmap/Makefile
--- /usr/ports/security/nmap/Makefile	2011-02-14 06:07:34.000000000 +0800
+++ /usr/home/tinderbox/tinderbox-3.3/portstrees/FreeBSD/ports/security/nmap/Makefile	2011-03-05 05:07:04.000000000 +0800
@@ -35,8 +35,21 @@
 MAN1=		nmap.1
 MAN1_EN=	ncat.1 nping.1
 
-.ifndef WITHOUT_SSL
-USE_OPENSSL=	yes
+PORTDOCS=	CHANGELOG HACKING
+EXAMPLES=	docs/sample-script.nse
+PORTEXAMPLES=	${EXAMPLES:T}
+
+.include <bsd.port.pre.mk>
+
+.if !defined(WITHOUT_SSL)
+# nmap/nping needs OpenSSL to supports SHA-256 (ver 0.9.8 or later).
+# Check for OPENSSL 0.9.8 in BASE:  If not present require PORT
+.if ${OSVERSION} < 700019
+WITH_OPENSSL_PORT=	yes
+.else
+WITH_OPENSSL_BASE=	yes
+.endif
+.include "${PORTSDIR}/Mk/bsd.openssl.mk"
 CONFIGURE_ARGS+=	--with-openssl=${OPENSSLBASE}
 CONFIGURE_ENV+=		CFLAGS="${CFLAGS} -I${OPENSSLINC}"
 PLIST_SUB+=		WITHSSL=""
@@ -46,10 +59,6 @@
 PLIST_SUB+=		WITHSSL="@comment "
 .endif
 
-PORTDOCS=	CHANGELOG HACKING
-EXAMPLES=	docs/sample-script.nse
-PORTEXAMPLES=	${EXAMPLES:T}
-
 # XXX limit results if we do a grep in the sources!
 post-extract:
 	@${RM} -rf ${WRKSRC}/mswin32
@@ -71,4 +80,4 @@
 .	endfor
 .endif
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
--- nmap-5.51.patch ends here ---

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->ohauer 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Fri Mar 4 21:10:24 UTC 2011 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=155276 

Date: Fri, 04 Mar 2011 22:42:51 +0100
From: olli hauer <ohauer@gmx.de>
To: chinsan <chinsan@FreeBSD.org>
Cc: FreeBSD-gnats-submit@freebsd.org, ohauer@FreeBSD.org
Subject: Re: [PATCH] security/nmap: Fix build on 6.x

 I haven't implement this since 6.x is marked as EOL since end of 2010.
 If there a valid reason to bring back 6.x support then I will apply your patch.
 
 --
 Regards,
 olli

State-Changed-From-To: open->closed 
State-Changed-By: miwi 
State-Changed-When: Sat Mar 5 03:33:23 UTC 2011 
State-Changed-Why:  
freebsd 6.X is unsupported since 31 Januar 2011, we are about to remove 
6.X gruft from the portstree. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=155276 

Date: Sat, 5 Mar 2011 11:30:12 +0800
From: chinsan <chinsan.tw@gmail.com>
To: olli hauer <ohauer@gmx.de>
Subject: Re: [PATCH] security/nmap: Fix build on 6.x

 Hi, olli hauer:
 
 My staff(network team) needs to run on 6.x for running some commerical
 software(only binary, no code) and something which is hard-coding.
 So, they want to fix it to build on 6.x, although FreeBSD 6.x is EoL in 2010.
 
 When I was called for this problem, I found it was just caused by the
 newer version of nping needs sha256 function which support in OpenSSL
 0.9.8 or later.
 
 - chinsan

From: olli hauer <ohauer@gmx.de>
To: Chin-San Huang <chinsan@FreeBSD.org>
Cc: Chin-San Huang <chinsan.tw@gmail.com>, ohauer@freebsd.org, 
 bug-followup@freebsd.org
Subject: ports/155276: [PATCH] security/nmap: Fix build on 6.x
Date: Sat, 05 Mar 2011 21:33:38 +0100

 >> I haven't implement this since 6.x is marked as EOL since end of 2010.
 >> If there a valid reason to bring back 6.x support then I will apply your patch.
 > 
 > Hi, olli hauer:
 > 
 > My staff(network team) needs to run on 6.x for running some commerical
 > software(only binary, no code) and something which is hard-coding.
 > So, they want to fix it to build on 6.x, although FreeBSD 6.x is EoL in 2010.
 > 
 > When I was called for this problem, I found it was just caused by the
 > newer version of nping needs sha256 function which support in OpenSSL
 > 0.9.8 or later.
 > 
 > - chinsan
 
 
 Hi Chin-San,
 
 For testing the nmap builds against OpenSSL from ports I use the
 following entry in make.conf and I suspect this will also work
 in your case.
 
 
 file: /etc/make.conf
 ======================
 .if ${.CURDIR:M*/security/nmap*}
 WITH_OPENSSL_PORT=     yes
 .endif
 
 --
 olli
>Unformatted:
