diff options
author | osa <osa@FreeBSD.org> | 2008-07-01 16:19:03 +0800 |
---|---|---|
committer | osa <osa@FreeBSD.org> | 2008-07-01 16:19:03 +0800 |
commit | 522dcb17d1ff4ca56ff724366e1a0b5fffa0120a (patch) | |
tree | c224f59ef03b41a4d569c2c0d1003082f8081847 /www | |
parent | 653073147dd705fc969d575679d8ec7cace06637 (diff) | |
download | freebsd-ports-gnome-522dcb17d1ff4ca56ff724366e1a0b5fffa0120a.tar.gz freebsd-ports-gnome-522dcb17d1ff4ca56ff724366e1a0b5fffa0120a.tar.zst freebsd-ports-gnome-522dcb17d1ff4ca56ff724366e1a0b5fffa0120a.zip |
Update from 0.7.3 to 0.7.5.
Add profiles support (adopt rc from www/apache22). (*)
Update CONFLICTS.
Idea from PR: ports/124940
Special thanks to: az@ (*)
<ChangeLog>
Changes with nginx 0.7.5 01 Jul 2008
*) Bugfixes in variables support in the "access_log" directive; the bug
had appeared in 0.7.4.
*) Bugfix: nginx could not be built --without-http_gzip_module; the bug
had appeared in 0.7.3.
Thanks to Kirill A. Korinskiy.
*) Bugfix: if sub_filter and SSI were used together, then responses
might were transferred incorrectly.
Changes with nginx 0.7.4 30 Jun 2008
*) Feature: variables support in the "access_log" directive.
*) Feature: the "open_log_file_cache" directive.
*) Feature: the -g switch.
*) Feature: the "Expect" request header line support.
*) Bugfix: large SSI inclusions might be truncated.
</ChangeLog>
Diffstat (limited to 'www')
-rw-r--r-- | www/nginx-devel/Makefile | 6 | ||||
-rw-r--r-- | www/nginx-devel/distinfo | 6 | ||||
-rw-r--r-- | www/nginx-devel/files/nginx.sh.in | 107 |
3 files changed, 92 insertions, 27 deletions
diff --git a/www/nginx-devel/Makefile b/www/nginx-devel/Makefile index 69d803fc2592..eda7bfb240bb 100644 --- a/www/nginx-devel/Makefile +++ b/www/nginx-devel/Makefile @@ -6,7 +6,7 @@ # PORTNAME= nginx -PORTVERSION= 0.7.3 +PORTVERSION= 0.7.5 CATEGORIES= www MASTER_SITES= http://sysoev.ru/nginx/ MASTER_SITES+= ${MASTER_SITE_LOCAL} @@ -43,8 +43,10 @@ NGINX_RUNDIR?= ${NGINX_VARDIR}/run NGINX_TMPDIR?= ${NGINX_VARDIR}/tmp/nginx HTTP_PORT?= 80 -CONFLICTS?= nginx-0.5.* +CONFLICTS?= nginx-0.6.* USE_RC_SUBR= nginx.sh +SUB_LIST+= RC_SUBR_SUFFIX=${RC_SUBR_SUFFIX} WWWOWN=${WWWOWN} + HAS_CONFIGURE= yes CONFIGURE_ARGS+=--prefix=${ETCDIR} \ --with-cc-opt="-I ${LOCALBASE}/include" \ diff --git a/www/nginx-devel/distinfo b/www/nginx-devel/distinfo index 4f0d07e01214..fe7dc264e381 100644 --- a/www/nginx-devel/distinfo +++ b/www/nginx-devel/distinfo @@ -1,3 +1,3 @@ -MD5 (nginx-0.7.3.tar.gz) = 7de6de07d356266d35a640f7ef4865e0 -SHA256 (nginx-0.7.3.tar.gz) = 120863b96e8e2245489326693a969d97699500b9d6fb470c7045f8916fe013aa -SIZE (nginx-0.7.3.tar.gz) = 525490 +MD5 (nginx-0.7.5.tar.gz) = 881e2069181adecdfae9b58ab811a17b +SHA256 (nginx-0.7.5.tar.gz) = 911dc688fe5f6f58e97ea0b01697efc7dddfc8c00fb750d0b9d52aa9c4ff6094 +SIZE (nginx-0.7.5.tar.gz) = 528205 diff --git a/www/nginx-devel/files/nginx.sh.in b/www/nginx-devel/files/nginx.sh.in index 69e3405162b0..95d0fb4259d3 100644 --- a/www/nginx-devel/files/nginx.sh.in +++ b/www/nginx-devel/files/nginx.sh.in @@ -2,43 +2,106 @@ # $FreeBSD$ # PROVIDE: nginx -# REQUIRE: DAEMON -# BEFORE: LOGIN +# REQUIRE: LOGIN cleanvar # KEYWORD: shutdown -# Define these nginx_* variables in one of these files: -# /etc/rc.conf -# /etc/rc.conf.local -# /etc/rc.conf.d/nginx # -# DO NOT CHANGE THESE DEFAULT VALUES HERE -# -nginx_enable=${nginx_enable-"NO"} -nginx_flags=${nginx_flags-""} -nginx_pidfile=${nginx_pidfile-"/var/run/nginx.pid"} +# Add the following lines to /etc/rc.conf to enable nginx: +# nginx_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable nginx +# nginx_profiles (str): Set to "" by default. +# Define your profiles here. +# nginxlimits_enable (bool): Set to "NO" by default. +# Set it to yes to run `limits $limits_args` +# just before nginx starts. +# nginx_flags (str): Set to "" by default. +# Extra flags passed to start command. +# nginxlimits_args (str): Default to "-e -U %%WWWOWN%%" +# Arguments of pre-start limits run. . %%RC_SUBR%% name="nginx" rcvar=`set_rcvar` -command="%%PREFIX%%/sbin/nginx" -load_rc_config $name +start_precmd="nginx_precmd" +restart_precmd="nginx_checkconfig" +reload_precmd="nginx_checkconfig" +reload_cmd="nginx_reload" +configtest_cmd="nginx_checkconfig" +command="%%PREFIX%%/sbin/nginx" +_pidprefix="/var/run/nginx" +pidfile="${_pidprefix}.pid" +required_files=%%PREFIX%%/etc/nginx/nginx.conf -pidfile="${nginx_pidfile}" +[ -z "$nginx_enable" ] && nginx_enable="NO" +[ -z "$nginx_profiles" ] && nginx_profiles="" +[ -z "$nginx_flags" ] && nginx_flags="" +[ -z "$nginxlimits_enable" ] && nginxlimits_enable="NO" +[ -z "$nginxlimits_args" ] && nginxlimits_args="-e -U %%WWWOWN%%" -extra_commands="configtest reload" +load_rc_config $name -configtest_cmd="configtest_cmd" -configtest_cmd() { - echo "Configuration syntax test for ${name}." - if ${command} ${nginx_flags} -t; then - : +if [ -n "$2" ]; then + profile="$2" + if [ "x${nginx_profiles}" != "x" ]; then + pidfile="${_pidprefix}.${profile}.pid" + eval nginx_configfile="\${nginx_${profile}_configfile:-}" + if [ "x${nginx_configfile}" = "x" ]; then + echo "You must define a configuration file (nginx_${profile}_configfile)" + exit 1 + fi + required_files="${nginx_configfile}" + eval nginx_enable="\${nginx_${profile}_enable:-${nginx_enable}}" + eval nginx_flags="\${nginx_${profile}_flags:-${nginx_flags}}" + eval nginxlimits_enable="\${nginxlimits_${profile}_enable:-${nginxlimits_enable}}" + eval nginxlimits_args="\${nginxlimits_${profile}_args:-${nginxlimits_args}}" + nginx_flags="-c ${nginx_configfile} -g \"pid ${pidfile};\" ${nginx_flags}" else - err 8 "FATAL: bad config for ${name}" + echo "$0: extra argument ignored" + fi +else + if [ "x${nginx_profiles}" != "x" -a "x$1" != "x" ]; then + for profile in ${nginx_profiles}; do + echo "===> nginx profile: ${profile}" + %%PREFIX%%/etc/rc.d/nginx%%RC_SUBR_SUFFIX%% $1 ${profile} + retcode="$?" + if [ "0${retcode}" -ne 0 ]; then + failed="${profile} (${retcode}) ${failed:-}" + else + success="${profile} ${success:-}" + fi + done + exit 0 + fi +fi + +nginx_requirepidfile() +{ + if [ ! "0`check_pidfile ${pidfile} ${command}`" -gt 1 ]; then + echo "${name} not running? (check $pidfile)." + exit 1 fi } -start_cmd="echo \"Starting ${name}.\"; /usr/bin/limits -U www ${command} ${nginx_flags}" +nginx_checkconfig() +{ + echo "Performing sanity check on nginx configuration:" + eval ${command} ${nginx_flags} -t +} + +nginx_precmd() +{ + nginx_checkconfig + + if checkyesno nginxlimits_enable + then + eval `/usr/bin/limits ${nginxlimits_args}` 2>/dev/null + else + return 0 + fi + +} +extra_commands="reload configtest" run_rc_command "$1" |