Added the naxsi (http://code.google.com/p/naxsi/) module, an applicative

firewall for nginx.
This commit is contained in:
imil 2012-04-21 10:32:47 +00:00
parent cf875fa1c8
commit a745123d2e
4 changed files with 33 additions and 9 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.21 2012/04/17 21:12:42 shattered Exp $
# $NetBSD: Makefile,v 1.22 2012/04/21 10:32:47 imil Exp $
DISTNAME= nginx-1.0.15
CATEGORIES= www
@ -50,12 +50,18 @@ CONFIGURE_ARGS+= --http-fastcgi-temp-path=${NGINX_DATADIR}/fstcgi_temp
PKG_SYSCONFSUBDIR= nginx
.include "options.mk"
EGDIR= ${PREFIX}/share/examples/nginx
EGFILES+= fastcgi.conf fastcgi_params koi-utf koi-win \
mime.types nginx.conf win-utf
.for file in ${EGFILES}
CONF_FILES+= ${EGDIR}/conf/${file} ${PKG_SYSCONFDIR}/${file}
CONF_FILES+= ${EGDIR}/conf/${file} ${PKG_SYSCONFDIR}/${file}
. if !empty(PKG_OPTIONS:Mnaxsi)
CONF_FILES+= ${EGDIR}/conf/naxsi_core.rules
CONF_FILES+= ${PKG_SYSCONFDIR}/naxsi_core.rules
. endif
.endfor
RCD_SCRIPTS= nginx
@ -80,8 +86,6 @@ SUBST_SED.paths+= -e 's,%%NGINX_GROUP%%,${NGINX_GROUP},g'
MESSAGE_SUBST+= NGINX_LOGDIR=${NGINX_LOGDIR}
MESSAGE_SUBST+= NGINX_PIDDIR=${NGINX_PIDDIR}
.include "options.mk"
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/objs/nginx ${DESTDIR}${PREFIX}/sbin/nginx
.for file in ${EGFILES}
@ -90,6 +94,10 @@ do-install:
${INSTALL_DATA} ${WRKSRC}/html/50x.html ${DESTDIR}${EGDIR}/html/50x.html
${INSTALL_DATA} ${WRKSRC}/html/index.html ${DESTDIR}${EGDIR}/html/index.html
${INSTALL_MAN} ${WRKSRC}/man/nginx.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8
.if !empty(PKG_OPTIONS:Mnaxsi)
${INSTALL_DATA} ${WRKDIR}/${NAXSI}/naxsi_config/naxsi_core.rules ${DESTDIR}${EGDIR}/conf
.endif
.include "../../devel/zlib/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

View file

@ -1,4 +1,4 @@
@comment $NetBSD: PLIST,v 1.5 2011/06/10 10:36:18 joerg Exp $
@comment $NetBSD: PLIST,v 1.6 2012/04/21 10:32:47 imil Exp $
man/man8/nginx.8
sbin/nginx
share/examples/nginx/conf/fastcgi.conf
@ -8,6 +8,7 @@ share/examples/nginx/conf/koi-win
share/examples/nginx/conf/mime.types
share/examples/nginx/conf/nginx.conf
${PLIST.uwsgi}share/examples/nginx/conf/uwsgi_params
${PLIST.naxsi}share/examples/nginx/conf/naxsi_core.rules
share/examples/nginx/conf/win-utf
share/examples/nginx/html/50x.html
share/examples/nginx/html/index.html

View file

@ -1,5 +1,8 @@
$NetBSD: distinfo,v 1.17 2012/04/17 21:12:42 shattered Exp $
$NetBSD: distinfo,v 1.18 2012/04/21 10:32:47 imil Exp $
SHA1 (naxsi-0.45.tgz) = e1f29219fc9f7d3b39c4abfac558816f6046363b
RMD160 (naxsi-0.45.tgz) = bbb535c3f22c4951263a80a962ea0d8fa2208cbd
Size (naxsi-0.45.tgz) = 175358 bytes
SHA1 (nginx-1.0.15.tar.gz) = e506b301ea849f58f2efb499d77b819fe55eea9a
RMD160 (nginx-1.0.15.tar.gz) = 99653499916b81fb0f5842755484983606cea5ec
Size (nginx-1.0.15.tar.gz) = 693025 bytes

View file

@ -1,12 +1,12 @@
# $NetBSD: options.mk,v 1.13 2012/03/13 10:00:14 fhajny Exp $
# $NetBSD: options.mk,v 1.14 2012/04/21 10:32:47 imil Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.nginx
PKG_SUPPORTED_OPTIONS= dav flv gtools inet6 mail-proxy memcache pcre \
PKG_SUPPORTED_OPTIONS= dav flv gtools inet6 mail-proxy memcache naxsi pcre \
push realip ssl sub uwsgi image-filter upload debug \
status
PKG_SUGGESTED_OPTIONS= pcre ssl
PLIST_VARS+= uwsgi
PLIST_VARS+= naxsi uwsgi
.include "../../mk/bsd.options.mk"
@ -51,6 +51,18 @@ CONFIGURE_ARGS+= --with-mail
CONFIGURE_ARGS+= --without-http_memcached_module
.endif
.if !empty(PKG_OPTIONS:Mnaxsi)
PLIST.naxsi= yes
CONFIGURE_ARGS+= --add-module=../${NAXSI}/naxsi_src
.endif
.if !empty(PKG_OPTIONS:Mnaxsi) || make(makesum)
NAXSI= naxsi-0.45
NAXSI_DISTFILE= ${NAXSI}.tgz
SITES.${NAXSI_DISTFILE}= http://naxsi.googlecode.com/files/
DISTFILES+= ${NAXSI_DISTFILE}
.endif
.if !empty(PKG_OPTIONS:Mrealip)
CONFIGURE_ARGS+= --with-http_realip_module
.endif