From cherry@spica.trombik.org  Sat Jul 19 23:00:42 2008
Return-Path: <cherry@spica.trombik.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A76B71065678
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 19 Jul 2008 23:00:42 +0000 (UTC)
	(envelope-from cherry@spica.trombik.org)
Received: from spica.trombik.org (spica.trombik.org [211.19.48.12])
	by mx1.freebsd.org (Postfix) with ESMTP id 7C9518FC31
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 19 Jul 2008 23:00:42 +0000 (UTC)
	(envelope-from cherry@spica.trombik.org)
Received: by spica.trombik.org (Postfix, from userid 999)
	id 0DFC51CC0D; Sun, 20 Jul 2008 08:00:39 +0900 (JST)
Message-Id: <20080719230039.0DFC51CC0D@spica.trombik.org>
Date: Sun, 20 Jul 2008 08:00:39 +0900 (JST)
From: Tomoyuki Sakurai <cherry@trombik.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: araujo@FreeBSD.org
Subject: [PATCH] www/mod_security: SecRuleScript (lua) support
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         125789
>Category:       ports
>Synopsis:       [PATCH] www/mod_security: SecRuleScript (lua) support
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    araujo
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jul 19 23:10:02 UTC 2008
>Closed-Date:    Sun Jul 20 18:00:02 UTC 2008
>Last-Modified:  Sun Jul 20 18:00:05 UTC 2008
>Originator:     Tomoyuki Sakurai
>Release:        FreeBSD 7.0-STABLE amd64
>Organization:
>Environment:
System: FreeBSD spica.trombik.org 7.0-STABLE FreeBSD 7.0-STABLE #5: Thu Jul 10 22:29:26 JST 2008
>Description:
Add SecRuleScript (lua) support.
Tested on amd64 only.

Added file(s):
- files/patch-configure

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

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

--- mod_security-2.5.5_1.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/www/mod_security/Makefile /usr/home/cherry/svk/ports/www/mod_security/Makefile
--- /usr/ports/www/mod_security/Makefile	2008-07-08 07:50:42.000000000 +0900
+++ /usr/home/cherry/svk/ports/www/mod_security/Makefile	2008-07-20 07:27:03.000000000 +0900
@@ -35,6 +35,7 @@
 SUB_FILES+=	mod_security2.conf
 SUB_LIST+=	APACHEETCDIR="${APACHEETCDIR}"
 PLIST_FILES+=	${APACHEMODDIR}/mod_security2.so
+OPTIONS=	LUA "Embedded Lua language support (EXPERIMENTAL)" off
 
 .if !defined(SKIP_RULES)
 SUB_FILES+=	pkg-message.rules
@@ -64,6 +65,14 @@
 
 .endif
 
+.if defined(WITH_LUA)
+USE_LUA=	5.1+
+CONFIGURE_ARGS+=	--with-lua=${LOCALBASE}
+LIB_DEPENDS+=	lua.1:${PORTSDIR}/lang/lua
+.else
+CONFIGURE_ARGS+=	--without-lua
+.endif
+
 REINPLACE_ARGS=	-i ""
 
 post-patch:
@@ -73,6 +82,9 @@
 		s|SecDebugLog.*logs/modsec_debug.log|SecDebugLog /var/log/httpd-modsec2_debug.log|; \
 		s|SecServerSignature "Apache/2.2.0 (Fedora)"|SecServerSignature "Apache/${APACHE_VERSION:C/[0-9]/\0./g}x (${OPSYS})"|; \
 		' ${WRKSRCTOP}/rules/modsecurity_crs_10_config.conf
+.if defined(WITH_LUA)
+	${REINPLACE_CMD} -e 's|%%LUA_VER%%|${LUA_VER}|' ${WRKSRC}/configure
+.endif
 
 post-install:
 .if !defined(NOPORTDOCS)
diff -ruN --exclude=CVS /usr/ports/www/mod_security/files/patch-configure /usr/home/cherry/svk/ports/www/mod_security/files/patch-configure
--- /usr/ports/www/mod_security/files/patch-configure	1970-01-01 09:00:00.000000000 +0900
+++ /usr/home/cherry/svk/ports/www/mod_security/files/patch-configure	2008-07-20 06:49:42.000000000 +0900
@@ -0,0 +1,11 @@
+--- configure.orig	2008-06-04 09:32:50.000000000 +0900
++++ configure	2008-06-04 09:35:07.000000000 +0900
+@@ -5132,7 +5132,7 @@
+ 
+ 
+ LUA_CONFIG="pkg-config"
+-LUA_PKGNAMES="lua5.1 lua5 lua"
++LUA_PKGNAMES="lua5.1 lua5 lua lua-%%LUA_VER%% "
+ LUA_CFLAGS=""
+ LUA_LIBS=""
+ 
--- mod_security-2.5.5_1.patch ends here ---

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->araujo 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sat Jul 19 23:10:11 UTC 2008 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=125789 
State-Changed-From-To: open->closed 
State-Changed-By: araujo 
State-Changed-When: Sun Jul 20 18:00:00 UTC 2008 
State-Changed-Why:  
Committed. Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/125789: commit references a PR
Date: Sun, 20 Jul 2008 17:59:57 +0000 (UTC)

 araujo      2008-07-20 17:59:44 UTC
 
   FreeBSD ports repository
 
   Modified files:
     www/mod_security     Makefile 
   Added files:
     www/mod_security/files patch-configure 
   Log:
   - Add support a LUA scripts.
   - Bump PORTREVISION.
   
   PR:             ports/125789
   Submitted by:   Tomoyuki Sakurai <cherry@trombik.org>
   
   Revision  Changes    Path
   1.25      +13 -1     ports/www/mod_security/Makefile
   1.1       +11 -0     ports/www/mod_security/files/patch-configure (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
