Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Aug 2008 10:20:00 +0900 (JST)
From:      Tomoyuki Sakurai <cherry@trombik.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        araujo@FreeBSD.org
Subject:   ports/126559: [PATCH] www/mod_security: add WITH_MLOGC knob, ModSecurity Log Collector
Message-ID:  <20080816012000.CCEE81CDEA@spica.trombik.org>
Resent-Message-ID: <200808160130.m7G1U2Ws048103@freefall.freebsd.org>

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

>Number:         126559
>Category:       ports
>Synopsis:       [PATCH] www/mod_security: add WITH_MLOGC knob, ModSecurity Log Collector
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Aug 16 01:30:01 UTC 2008
>Closed-Date:
>Last-Modified:
>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 WITH_MLOGC knob
- add --build option to CONFIGURE_TARGET
- bump PORTREVISION

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

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

--- mod_security-2.5.5_3.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-21 02:59:44.000000000 +0900
+++ /usr/home/cherry/svk/ports/www/mod_security/Makefile	2008-08-16 10:10:16.000000000 +0900
@@ -7,7 +7,7 @@
 
 PORTNAME=	mod_security
 PORTVERSION=	2.5.5
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	www security
 MASTER_SITES=	http://www.modsecurity.org/download/
 DISTNAME=	${PORTNAME:S/_//:S/2//}-apache_${PORTVERSION}
@@ -20,8 +20,8 @@
 
 USE_APACHE=	2.0+
 GNU_CONFIGURE=	yes
+CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
 AP_GENPLIST=	yes
-AP_EXTRAS+=	-DWITH_LIBXML2
 AP_INC=	${LOCALBASE}/include/libxml2
 AP_LIB=	${LOCALBASE}/lib
 USE_GNOME=	libxml2
@@ -35,11 +35,19 @@
 SUB_FILES+=	mod_security2.conf
 SUB_LIST+=	APACHEETCDIR="${APACHEETCDIR}"
 PLIST_FILES+=	${APACHEMODDIR}/mod_security2.so
-OPTIONS=	LUA "Embedded Lua language support (EXPERIMENTAL)" off
+OPTIONS=	LUA "Embedded Lua language support (EXPERIMENTAL)" off \
+			MLOGC "build ModSecurity Log Collector (mlogc)" off
+
+.include <bsd.port.pre.mk>
+
+# XXX make portlint happy
+AP_EXTRAS+=	-DWITH_LIBXML2
 
 .if !defined(SKIP_RULES)
 SUB_FILES+=	pkg-message.rules
-
+.if defined(WITH_MLOGC)
+PLIST_FILES+=	${PREFIX}/bin/mlogc
+.endif
 PLIST_DIRS+=	${APACHEETCDIR}/Includes/mod_security2/optional_rules
 PLIST_DIRS+=	${APACHEETCDIR}/Includes/mod_security2
 
@@ -72,7 +80,12 @@
 .else
 CONFIGURE_ARGS+=	--without-lua
 .endif
-
+.if defined(WITH_MLOGC)
+LIB_DEPENDS+=	curl:${PORTSDIR}/ftp/curl
+CONFIGURE_ARGS+=	--with-curl=${LOCALBASE}
+.else
+CONFIGURE_ARGS+=	--without-curl
+.endif
 REINPLACE_ARGS=	-i ""
 
 post-patch:
@@ -86,15 +99,24 @@
 	${REINPLACE_CMD} -e 's|%%LUA_VER%%|${LUA_VER}|' ${WRKSRC}/configure
 .endif
 
+post-build:
+.if defined(WITH_MLOGC)
+	# XXX there is "mlogc-static" target in the Makefile, too
+	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} mlogc
+.endif
+
 post-install:
 .if !defined(NOPORTDOCS)
 	@${MKDIR} ${DOCSDIR}
 	@(cd ${WRKSRCTOP} && ${COPYTREE_SHARE} "doc rules" ${DOCSDIR}/)
 .endif
+.if defined(WITH_MLOGC)
+	${INSTALL_PROGRAM} ${WRKSRC}/mlogc-src/mlogc ${PREFIX}/bin/
+.endif
 .if !defined(SKIP_RULES)
 	@${INSTALL_DATA} ${WRKDIR}/mod_security2.conf ${PREFIX}/${APACHEETCDIR}/Includes/
 	@cd ${WRKSRCTOP} && ${PAX} -rw -pe -s +rules+mod_security2+ rules ${PREFIX}/${APACHEETCDIR}/Includes
 	@${CAT} ${PKGMESSAGE}
 .endif
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
--- mod_security-2.5.5_3.patch ends here ---

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



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