From nobody@FreeBSD.org  Fri Oct 11 04:21:56 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTP id 0BAA2DAB
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 11 Oct 2013 04:21:56 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id EC3F124B1
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 11 Oct 2013 04:21:55 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r9B4LtQW056116
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 11 Oct 2013 04:21:55 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r9B4Lt8A056115;
	Fri, 11 Oct 2013 04:21:55 GMT
	(envelope-from nobody)
Message-Id: <201310110421.r9B4Lt8A056115@oldred.freebsd.org>
Date: Fri, 11 Oct 2013 04:21:55 GMT
From: "Matthew X. Economou" <xenophon+fbsdports@irtnog.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: www/mod_security has the wrong LIB_DEPENDS entry for lua
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         182894
>Category:       ports
>Synopsis:       www/mod_security has the wrong LIB_DEPENDS entry for lua
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pawel
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 11 04:30:00 UTC 2013
>Closed-Date:    Tue Feb 04 15:40:53 UTC 2014
>Last-Modified:  Tue Feb  4 15:50:00 UTC 2014
>Originator:     Matthew X. Economou
>Release:        9.1-RELEASE-p1
>Organization:
IRTNOG
>Environment:
FreeBSD cinep100bsdweb.irtnog.net 9.1-RELEASE-p1 FreeBSD 9.1-RELEASE-p1 #12 r247012M: Wed Feb 20 09:51:27 EST 2013     root@cinep001bsdgw.irtnog.net:/usr/obj/usr/src/sys/FIREWALL  amd64

>Description:
After enabling the LUA option in the ports' config, the www/mod_security port explicitly sets LIB_DEPENDS to pull in lang/lua.  However, on my system the dependency explicitly states version 5.1.5 of the lua library, when the library version number is 5.1.1.  (I don't know why there is a discrepancy.)  If I replace the lua LIB_DEPENDS entry in www/mod_security/Makefile with LUA_COMPS=lua:lib, the port builds and links against lua properly, as ports/Mk/bsd.lua.mk sets LIB_DEPENDS for the port.
>How-To-Repeat:
(cd www/apache22 && make install BATCH=yes)
(cd www/mod_security && make install WITH=LUA)
>Fix:
Apply the following patch:

--- www/mod_security/Makefile.orig      2013-10-11 00:06:21.502494975 -0400
+++ www/mod_security/Makefile   2013-10-11 00:09:03.160494716 -0400
@@ -50,8 +50,8 @@

 .if ${PORT_OPTIONS:MLUA}
 USE_LUA=       5.1+
+LUA_COMPS=     lua:lib
 CONFIGURE_ARGS+=       --with-lua=${LOCALBASE}
-LIB_DEPENDS+=  lua-5.1.5:${PORTSDIR}/lang/lua
 .else
 CONFIGURE_ARGS+=       --without-lua
 .endif


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->araujo 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Fri Oct 11 04:30:24 UTC 2013 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=182894 
Responsible-Changed-From-To: araujo->freebsd-ports-bugs 
Responsible-Changed-By: araujo 
Responsible-Changed-When: Fri Nov 29 08:20:38 UTC 2013 
Responsible-Changed-Why:  
Back to the pool. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=182894 
Responsible-Changed-From-To: freebsd-ports-bugs->pawel 
Responsible-Changed-By: pawel 
Responsible-Changed-When: Mon Feb 3 21:10:08 UTC 2014 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=182894 
State-Changed-From-To: open->closed 
State-Changed-By: pawel 
State-Changed-When: Tue Feb 4 15:40:52 UTC 2014 
State-Changed-Why:  
Committed. Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/182894: commit references a PR
Date: Tue,  4 Feb 2014 15:40:47 +0000 (UTC)

 Author: pawel
 Date: Tue Feb  4 15:40:39 2014
 New Revision: 342545
 URL: http://svnweb.freebsd.org/changeset/ports/342545
 QAT: https://qat.redports.org/buildarchive/r342545/
 
 Log:
   - Fix build when LUA=on [1]
   - Remove leading article from COMMENT
   - Convert to LIB_DEPENDS format
   - Use option helpers
   - Support stage
   
   PR:		ports/182894 [1]
   Submitted by:	Matthew X. Economou <xenophon+fbsdports@irtnog.org>
 
 Modified:
   head/www/mod_security/Makefile
 
 Modified: head/www/mod_security/Makefile
 ==============================================================================
 --- head/www/mod_security/Makefile	Tue Feb  4 14:53:26 2014	(r342544)
 +++ head/www/mod_security/Makefile	Tue Feb  4 15:40:39 2014	(r342545)
 @@ -9,12 +9,12 @@ PKGNAMEPREFIX=	${APACHE_PKGNAMEPREFIX}
  DISTNAME=	${PORTNAME:S/_//:S/2//}-apache_${PORTVERSION}
  
  MAINTAINER=	ports@FreeBSD.org
 -COMMENT=	An intrusion detection and prevention engine
 +COMMENT=	Intrusion detection and prevention engine
  
  LICENSE=	APACHE20
  
 -LIB_DEPENDS+=	pcre:${PORTSDIR}/devel/pcre \
 -		apr-1:${PORTSDIR}/devel/apr1
 +LIB_DEPENDS+=	libpcre.so:${PORTSDIR}/devel/pcre \
 +		libapr-1.so:${PORTSDIR}/devel/apr1
  
  USE_APACHE=	22+
  GNU_CONFIGURE=	yes
 @@ -35,26 +35,18 @@ PLIST_FILES=	etc/modsecurity.conf-exampl
  		lib/mod_security2.so
  
  OPTIONS_DEFINE=	LUA MLOGC
 -MLOGC_DESC=	Build ModSecurity Log Collector
  
 -NO_STAGE=	yes
 -.include <bsd.port.pre.mk>
 +LUA_CONFIGURE_ON=	--with-lua=${LOCALBASE}
 +LUA_CONFIGURE_OFF+=	--without-lua
 +LUA_USE=		LUA=5.1+
 +
 +MLOGC_DESC=		Build ModSecurity Log Collector
 +MLOGC_CONFIGURE_ON=	--with-curl=${LOCALBASE} --disable-errors
 +MLOGC_CONFIGURE_OFF=	--disable-mlogc
 +MLOGC_LIB_DEPENDS=	libcurl.so:${PORTSDIR}/ftp/curl
 +MLOGC_PLIST_FILES=	bin/mlogc bin/mlogc-batch-load.pl
  
 -.if ${PORT_OPTIONS:MMLOGC}
 -LIB_DEPENDS+=	curl:${PORTSDIR}/ftp/curl
 -CONFIGURE_ARGS+=	--with-curl=${LOCALBASE} --disable-errors
 -PLIST_FILES+=	bin/mlogc bin/mlogc-batch-load.pl
 -.else
 -CONFIGURE_ARGS+=	--disable-mlogc
 -.endif
 -
 -.if ${PORT_OPTIONS:MLUA}
 -USE_LUA=	5.1+
 -CONFIGURE_ARGS+=	--with-lua=${LOCALBASE}
 -LIB_DEPENDS+=	lua-5.1.5:${PORTSDIR}/lang/lua
 -.else
 -CONFIGURE_ARGS+=	--without-lua
 -.endif
 +.include <bsd.port.options.mk>
  
  REINPLACE_ARGS=	-i ""
  AP_EXTRAS+=	-DWITH_LIBXML2
 @@ -66,14 +58,16 @@ post-build:
  	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} mlogc
  .endif
  
 +pre-install:
 +	@${MKDIR} ${STAGEDIR}${PREFIX}/${APACHEMODDIR}
 +
  post-install:
 -	${INSTALL_DATA} ${WRKSRC}/modsecurity.conf-recommended ${PREFIX}/etc/modsecurity.conf-example
 -.if !defined(NOPORTDOCS)
 -	@${MKDIR} ${DOCSDIR}
 -	@(cd ${WRKSRC} && ${COPYTREE_SHARE} "doc" ${DOCSDIR}/)
 -.endif
 +	${INSTALL_DATA} ${WRKSRC}/modsecurity.conf-recommended \
 +		${STAGEDIR}${PREFIX}/etc/modsecurity.conf-example
 +	@${MKDIR} ${STAGEDIR}${DOCSDIR}
 +	(cd ${WRKSRC} && ${COPYTREE_SHARE} "doc" ${STAGEDIR}${DOCSDIR})
  .if ${PORT_OPTIONS:MMLOGC}
 -	${INSTALL_PROGRAM} ${WRKSRC}/mlogc/mlogc ${PREFIX}/bin/
 +	${INSTALL_PROGRAM} ${WRKSRC}/mlogc/mlogc ${STAGEDIR}${PREFIX}/bin
  .endif
  
 -.include <bsd.port.post.mk>
 +.include <bsd.port.mk>
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
>Unformatted:
