1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-15 03:14:23 +00:00

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>
This commit is contained in:
Sergey A. Osokin 2008-07-01 08:19:03 +00:00
parent ce356765b5
commit 619ef0157f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=216083
3 changed files with 92 additions and 27 deletions

View File

@ -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" \

View File

@ -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

View File

@ -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`
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
[ -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%%"
load_rc_config $name
pidfile="${nginx_pidfile}"
extra_commands="configtest reload"
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"