diff options
author | osa <osa@FreeBSD.org> | 2013-06-04 14:58:09 +0800 |
---|---|---|
committer | osa <osa@FreeBSD.org> | 2013-06-04 14:58:09 +0800 |
commit | 4256b4b499bad84464edb00b67ee00f5903b8254 (patch) | |
tree | 26f25193b9a32798030731d8c5d46917b3e6a6cb /www | |
parent | e1344f88792aca6fb3899daa31315b0b35dc6540 (diff) | |
download | freebsd-ports-gnome-4256b4b499bad84464edb00b67ee00f5903b8254.tar.gz freebsd-ports-gnome-4256b4b499bad84464edb00b67ee00f5903b8254.tar.zst freebsd-ports-gnome-4256b4b499bad84464edb00b67ee00f5903b8254.zip |
Add third-party modsecurity module support, version 2.7.4.
Diffstat (limited to 'www')
-rw-r--r-- | www/nginx-devel/Makefile | 26 | ||||
-rw-r--r-- | www/nginx-devel/distinfo | 2 | ||||
-rw-r--r-- | www/nginx-devel/files/extra-patch-nginx-modsecurity-config | 10 | ||||
-rw-r--r-- | www/nginx/Makefile | 26 | ||||
-rw-r--r-- | www/nginx/distinfo | 2 | ||||
-rw-r--r-- | www/nginx/files/extra-patch-nginx-modsecurity-config | 10 |
6 files changed, 76 insertions, 0 deletions
diff --git a/www/nginx-devel/Makefile b/www/nginx-devel/Makefile index 3912eacc5b0c..00dd1519edcd 100644 --- a/www/nginx-devel/Makefile +++ b/www/nginx-devel/Makefile @@ -82,6 +82,7 @@ OPTIONS_DEFINE= \ LET \ LUA \ MEMC \ + MODSECURITY \ NAXSI \ PASSENGER \ POSTGRES \ @@ -170,6 +171,7 @@ ICONV_DESC= 3rd party iconv module LET_DESC= 3rd party let module LUA_DESC= 3rd party lua module MEMC_DESC= 3rd party memc (memcached) module +MODSECURITY_DESC= 3rd party mod_security module NAXSI_DESC= 3rd party naxsi module PASSENGER_DESC= 3rd party passenger module POSTGRES_DESC= 3rd party postgresql module @@ -626,6 +628,18 @@ DISTFILES+= agentzh-memc-nginx-module-v${NGINX_MEMC_VERSION}-${GIT_MEMC_VERSION} CONFIGURE_ARGS+=--add-module=${WRKDIR}/agentzh-memc-nginx-module-${GIT_MEMC_VERSION:S/^0-g//} .endif +.if ${PORT_OPTIONS:MMODSECURITY} +NGINX_MODSECURITY_VERSION= 2.7.4 +LIB_DEPENDS+= pcre:${PORTSDIR}/devel/pcre \ + apr-1:${PORTSDIR}/devel/apr1 +USE_APACHE= 22+ +USE_GNOME= libxml2 +MASTER_SITES+= http://www.modsecurity.org/tarball/${NGINX_MODSECURITY_VERSION}/:modsecurity +DISTFILES+= modsecurity-apache_${NGINX_MODSECURITY_VERSION}.tar.gz:modsecurity +CONFIGURE_ARGS+=--add-module=${WRKDIR}/modsecurity-apache_${NGINX_MODSECURITY_VERSION}/nginx/modsecurity +EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-nginx-modsecurity-config +.endif + .if ${PORT_OPTIONS:MNAXSI} NGINX_NAXSI_VERSION= 0.50 MASTER_SITES+= http://naxsi.googlecode.com/files/:naxsi @@ -956,6 +970,18 @@ post-patch: 's!%%PREFIX%%!${LOCALBASE}!g' \ ${WRKDIR}/calio-iconv-nginx-module-${GIT_ICONV_VERSION:S/^0-g//}/config .endif +.if ${PORT_OPTIONS:MMODSECURITY} + @${REINPLACE_CMD} \ + 's!%%PREFIX%%!${LOCALBASE}!g' \ + ${WRKDIR}/modsecurity-apache_${NGINX_MODSECURITY_VERSION}/nginx/modsecurity/config +.endif + +pre-configure: +.if ${PORT_OPTIONS:MMODSECURITY} + ( cd ${WRKDIR}/modsecurity-apache_${NGINX_MODSECURITY_VERSION} && \ + CC="${CC}" ./${CONFIGURE_SCRIPT} --enable-standalone-module && \ + ${MAKE} ) +.endif do-build: @cd ${WRKSRC} && ${MAKE} diff --git a/www/nginx-devel/distinfo b/www/nginx-devel/distinfo index 9b8cdfc970a0..607d883c0259 100644 --- a/www/nginx-devel/distinfo +++ b/www/nginx-devel/distinfo @@ -70,6 +70,8 @@ SHA256 (chaoslawful-lua-nginx-module-v0.8.2-0-g3915187.tar.gz) = f10ac35781eb119 SIZE (chaoslawful-lua-nginx-module-v0.8.2-0-g3915187.tar.gz) = 480845 SHA256 (agentzh-memc-nginx-module-v0.13rc3-0-g4007350.tar.gz) = 8c6f7a421346be1f53240b370cd29edd833f8ca32f6f9b926d66230b15727f0c SIZE (agentzh-memc-nginx-module-v0.13rc3-0-g4007350.tar.gz) = 39778 +SHA256 (modsecurity-apache_2.7.4.tar.gz) = 605d6f1b03e648001ef1c7db7b18d51c01edd443b57cbbd4e298770ffdcd0eb9 +SIZE (modsecurity-apache_2.7.4.tar.gz) = 1014983 SHA256 (naxsi-core-0.50.tgz) = 7cece5f9d9c5df9e09af1e1023bc8e04bbbbe953e67461b893b8240e82ca52ef SIZE (naxsi-core-0.50.tgz) = 49809 SHA256 (passenger-4.0.5.tar.gz) = a138dbc32377541ba6474d79759d8357622cd762b34385bc59f0936206b26e36 diff --git a/www/nginx-devel/files/extra-patch-nginx-modsecurity-config b/www/nginx-devel/files/extra-patch-nginx-modsecurity-config new file mode 100644 index 000000000000..0b34d169bdf0 --- /dev/null +++ b/www/nginx-devel/files/extra-patch-nginx-modsecurity-config @@ -0,0 +1,10 @@ +--- ../modsecurity-apache_2.7.4/nginx/modsecurity/config.orig 2013-06-04 10:14:07.000000000 +0400 ++++ ../modsecurity-apache_2.7.4/nginx/modsecurity/config 2013-06-04 10:17:30.000000000 +0400 +@@ -3,5 +3,5 @@ + HTTP_AUX_FILTER_MODULES="ngx_http_modsecurity $HTTP_AUX_FILTER_MODULES" + NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_modsecurity.c $ngx_addon_dir/apr_bucket_nginx.c $ngx_addon_dir/ngx_pool_context.c" + NGX_ADDON_DEPS="$NGX_ADDON_DEPS $ngx_addon_dir/apr_bucket_nginx.h $ngx_addon_dir/ngx_pool_context.h" +-CORE_LIBS="$CORE_LIBS $ngx_addon_dir/../../standalone/.libs/standalone.a -L/usr/local/apr/lib -lapr-1 -L/usr/local/apr/lib -laprutil-1 -lpcre -lxml2 -lz -lm -ldl " +-CORE_INCS="$CORE_INCS $ngx_addon_dir $ngx_addon_dir/../../standalone $ngx_addon_dir/../../apache2 /usr/include/libxml2 /usr/local/apache2/include /usr/local/apr/include/apr-1 /usr/local/apr/include/apr-1" ++CORE_LIBS="$CORE_LIBS $ngx_addon_dir/../../standalone/.libs/standalone.a -lapr-1 -laprutil-1 -lpcre -lxml2 -lz -lm " ++CORE_INCS="$CORE_INCS $ngx_addon_dir $ngx_addon_dir/../../standalone $ngx_addon_dir/../../apache2 %%PREFIX%%/include/libxml2 %%PREFIX%%/include/apache22 %%PREFIX%%/include/apr-1 " diff --git a/www/nginx/Makefile b/www/nginx/Makefile index 23948fe3b099..112564168885 100644 --- a/www/nginx/Makefile +++ b/www/nginx/Makefile @@ -82,6 +82,7 @@ OPTIONS_DEFINE= \ LET \ LUA \ MEMC \ + MODSECURITY \ NAXSI \ PASSENGER \ POSTGRES \ @@ -170,6 +171,7 @@ ICONV_DESC= 3rd party iconv module LET_DESC= 3rd party let module LUA_DESC= 3rd party lua module MEMC_DESC= 3rd party memc (memcached) module +MODSECURITY_DESC= 3rd party mod_security module NAXSI_DESC= 3rd party naxsi module PASSENGER_DESC= 3rd party passenger module POSTGRES_DESC= 3rd party postgresql module @@ -626,6 +628,18 @@ DISTFILES+= agentzh-memc-nginx-module-v${NGINX_MEMC_VERSION}-${GIT_MEMC_VERSION} CONFIGURE_ARGS+=--add-module=${WRKDIR}/agentzh-memc-nginx-module-${GIT_MEMC_VERSION:S/^0-g//} .endif +.if ${PORT_OPTIONS:MMODSECURITY} +NGINX_MODSECURITY_VERSION= 2.7.4 +LIB_DEPENDS+= pcre:${PORTSDIR}/devel/pcre \ + apr-1:${PORTSDIR}/devel/apr1 +USE_APACHE= 22+ +USE_GNOME= libxml2 +MASTER_SITES+= http://www.modsecurity.org/tarball/${NGINX_MODSECURITY_VERSION}/:modsecurity +DISTFILES+= modsecurity-apache_${NGINX_MODSECURITY_VERSION}.tar.gz:modsecurity +CONFIGURE_ARGS+=--add-module=${WRKDIR}/modsecurity-apache_${NGINX_MODSECURITY_VERSION}/nginx/modsecurity +EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-nginx-modsecurity-config +.endif + .if ${PORT_OPTIONS:MNAXSI} NGINX_NAXSI_VERSION= 0.50 MASTER_SITES+= http://naxsi.googlecode.com/files/:naxsi @@ -956,6 +970,18 @@ post-patch: 's!%%PREFIX%%!${LOCALBASE}!g' \ ${WRKDIR}/calio-iconv-nginx-module-${GIT_ICONV_VERSION:S/^0-g//}/config .endif +.if ${PORT_OPTIONS:MMODSECURITY} + @${REINPLACE_CMD} \ + 's!%%PREFIX%%!${LOCALBASE}!g' \ + ${WRKDIR}/modsecurity-apache_${NGINX_MODSECURITY_VERSION}/nginx/modsecurity/config +.endif + +pre-configure: +.if ${PORT_OPTIONS:MMODSECURITY} + ( cd ${WRKDIR}/modsecurity-apache_${NGINX_MODSECURITY_VERSION} && \ + CC="${CC}" ./${CONFIGURE_SCRIPT} --enable-standalone-module && \ + ${MAKE} ) +.endif do-build: @cd ${WRKSRC} && ${MAKE} diff --git a/www/nginx/distinfo b/www/nginx/distinfo index 77be61bb1252..a071ec530b72 100644 --- a/www/nginx/distinfo +++ b/www/nginx/distinfo @@ -70,6 +70,8 @@ SHA256 (chaoslawful-lua-nginx-module-v0.8.2-0-g3915187.tar.gz) = f10ac35781eb119 SIZE (chaoslawful-lua-nginx-module-v0.8.2-0-g3915187.tar.gz) = 480845 SHA256 (agentzh-memc-nginx-module-v0.13rc3-0-g4007350.tar.gz) = 8c6f7a421346be1f53240b370cd29edd833f8ca32f6f9b926d66230b15727f0c SIZE (agentzh-memc-nginx-module-v0.13rc3-0-g4007350.tar.gz) = 39778 +SHA256 (modsecurity-apache_2.7.4.tar.gz) = 605d6f1b03e648001ef1c7db7b18d51c01edd443b57cbbd4e298770ffdcd0eb9 +SIZE (modsecurity-apache_2.7.4.tar.gz) = 1014983 SHA256 (naxsi-core-0.50.tgz) = 7cece5f9d9c5df9e09af1e1023bc8e04bbbbe953e67461b893b8240e82ca52ef SIZE (naxsi-core-0.50.tgz) = 49809 SHA256 (passenger-4.0.5.tar.gz) = a138dbc32377541ba6474d79759d8357622cd762b34385bc59f0936206b26e36 diff --git a/www/nginx/files/extra-patch-nginx-modsecurity-config b/www/nginx/files/extra-patch-nginx-modsecurity-config new file mode 100644 index 000000000000..0b34d169bdf0 --- /dev/null +++ b/www/nginx/files/extra-patch-nginx-modsecurity-config @@ -0,0 +1,10 @@ +--- ../modsecurity-apache_2.7.4/nginx/modsecurity/config.orig 2013-06-04 10:14:07.000000000 +0400 ++++ ../modsecurity-apache_2.7.4/nginx/modsecurity/config 2013-06-04 10:17:30.000000000 +0400 +@@ -3,5 +3,5 @@ + HTTP_AUX_FILTER_MODULES="ngx_http_modsecurity $HTTP_AUX_FILTER_MODULES" + NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_modsecurity.c $ngx_addon_dir/apr_bucket_nginx.c $ngx_addon_dir/ngx_pool_context.c" + NGX_ADDON_DEPS="$NGX_ADDON_DEPS $ngx_addon_dir/apr_bucket_nginx.h $ngx_addon_dir/ngx_pool_context.h" +-CORE_LIBS="$CORE_LIBS $ngx_addon_dir/../../standalone/.libs/standalone.a -L/usr/local/apr/lib -lapr-1 -L/usr/local/apr/lib -laprutil-1 -lpcre -lxml2 -lz -lm -ldl " +-CORE_INCS="$CORE_INCS $ngx_addon_dir $ngx_addon_dir/../../standalone $ngx_addon_dir/../../apache2 /usr/include/libxml2 /usr/local/apache2/include /usr/local/apr/include/apr-1 /usr/local/apr/include/apr-1" ++CORE_LIBS="$CORE_LIBS $ngx_addon_dir/../../standalone/.libs/standalone.a -lapr-1 -laprutil-1 -lpcre -lxml2 -lz -lm " ++CORE_INCS="$CORE_INCS $ngx_addon_dir $ngx_addon_dir/../../standalone $ngx_addon_dir/../../apache2 %%PREFIX%%/include/libxml2 %%PREFIX%%/include/apache22 %%PREFIX%%/include/apr-1 " |