Index: head/www/varnish4/Makefile =================================================================== --- head/www/varnish4/Makefile (revision 387609) +++ head/www/varnish4/Makefile (revision 387610) @@ -1,52 +1,52 @@ # $FreeBSD$ PORTNAME= varnish PORTVERSION= 4.0.3 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= www MASTER_SITES= http://repo.varnish-cache.org/source/ PKGNAMESUFFIX= 4 MAINTAINER= feld@FreeBSD.org COMMENT= High-performance HTTP accelerator LICENSE= BSD2CLAUSE LIB_DEPENDS= libpcre.so:${PORTSDIR}/devel/pcre \ libedit.so.0:${PORTSDIR}/devel/libedit CONFLICTS= varnish-2.* varnish-3.* USES= autoreconf cpe gmake libtool pkgconfig python:build readline CPE_VENDOR= varnish-cache CFLAGS+= -I${LOCALBASE}/include GNU_CONFIGURE= yes CONFIGURE_ARGS= --localstatedir=${PREFIX} --enable-tests CONFIGURE_ENV= RST2MAN=true USE_LDCONFIG= yes INSTALL_TARGET= install-strip USE_RC_SUBR= varnishd varnishlog varnishncsa SUB_FILES= pkg-message .if defined(NO_INET6) || defined(WITHOUT_INET6) BAD_TESTS+= r00832 EXTRA_PATCHES+= ${FILESDIR}/no-inet6.patch .endif post-patch: @${REINPLACE_CMD} -e 's|\$$(libdir)/pkgconfig|\$$(prefix)/libdata/pkgconfig|' \ ${WRKSRC}/Makefile.am .if defined(BAD_TESTS) ${RM} -f ${BAD_TESTS:C|.+|${WRKSRC}/bin/varnishtest/tests/\0.vtc|} .endif regression-test check test: build ${MAKE_CMD} TESTS_PARALLELISM=1 -C ${WRKSRC} check .include .if ${ARCH} == "arm" BROKEN= Does not configure on arm .endif .include Index: head/www/varnish4/files/varnishd.in =================================================================== --- head/www/varnish4/files/varnishd.in (revision 387609) +++ head/www/varnish4/files/varnishd.in (revision 387610) @@ -1,83 +1,84 @@ #!/bin/sh # # $FreeBSD$ # # PROVIDE: varnishd # REQUIRE: DAEMON # KEYWORD: shutdown # # Add the following line to /etc/rc.conf to enable varnishd: # # varnishd_enable="YES" # # Configuration variables and their default values: # # varnishd_pidfile - full path to the PID file. # default: "/var/run/varnishd.pid" # # varnishd_listen - address and port at which varnishd will listen for # client requests. # default: ":80" # # varnishd_admin - address and port at which varnishd will listen for # administrative commands. # default: "localhost:81" # # varnishd_backend - address of the backend server. # default: "localhost:8080" # # varnishd_config - name of the varnishd config file. # default: unset. # # varnishd_hash - hash algorithm # default: "classic,16383" # # varnishd_storage - storage method and parameters. # default: "file,/tmp,100M" # # varnishd_user - unprivileged user for the child process. # default: "www" # # varnishd_group - unprivileged group for the child process. # default: "www" # # varnishd_flags - complete command line arguments. # default if varnishd_config is unset: "-P ${varnishd_pidfile} -a ${varnishd_listen} -T ${varnishd_admin} -b ${varnishd_backend} -s ${varnishd_storage} -h ${varnishd_hash} -u ${varnishd_user} -g ${varnishd_group}" # default if varnishd_config is set: "-P ${varnishd_pidfile} -a ${varnishd_listen} -T ${varnishd_admin} -f ${varnishd_config} -s ${varnishd_storage} -h ${varnishd_hash} -u ${varnishd_user} -g ${varnishd_group}" # # See varnishd(1) for a detailed overview of command-line options. # . /etc/rc.subr -name="varnishd" +name=varnishd rcvar=varnishd_enable +load_rc_config ${name} + +: ${varnishd_enable:=NO} +: ${varnishd_pidfile=/var/run/${name}.pid} +: ${varnishd_listen=:80} +: ${varnishd_admin=localhost:81} +: ${varnishd_backend=localhost:8080} +: ${varnishd_storage=file,/tmp,100M} +: ${varnishd_hash=classic,16383} +: ${varnishd_user=www} +: ${varnishd_group=www} + command="%%PREFIX%%/sbin/${name}" +pidfile="${varnishd_pidfile}" -# read configuration and set defaults -load_rc_config ${name} -: ${varnishd_enable:="NO"} -: ${varnishd_pidfile:="/var/run/${name}.pid"} -: ${varnishd_listen:=":80"} -: ${varnishd_admin:="localhost:81"} -: ${varnishd_backend:="localhost:8080"} -: ${varnishd_storage:="file,/tmp,100M"} -: ${varnishd_hash:="classic,16383"} -: ${varnishd_user:="www"} -: ${varnishd_group:="www"} if [ -n "${varnishd_config}" ] ; then - : ${varnishd_flags:="-P ${varnishd_pidfile} -a ${varnishd_listen} -T ${varnishd_admin} -f ${varnishd_config} -s ${varnishd_storage} -h ${varnishd_hash} -u ${varnishd_user} -g ${varnishd_group}"} + : ${varnishd_flags:="-P ${varnishd_pidfile} -a ${varnishd_listen} -T ${varnishd_admin} -f ${varnishd_config} -s ${varnishd_storage} -h ${varnishd_hash} -u ${varnishd_user} -g ${varnishd_group} ${varnishd_extra_flags}"} else - : ${varnishd_flags:="-P ${varnishd_pidfile} -a ${varnishd_listen} -T ${varnishd_admin} -b ${varnishd_backend} -s ${varnishd_storage} -h ${varnishd_hash} -u ${varnishd_user} -g ${varnishd_group}"} + : ${varnishd_flags:="-P ${varnishd_pidfile} -a ${varnishd_listen} -T ${varnishd_admin} -b ${varnishd_backend} -s ${varnishd_storage} -h ${varnishd_hash} -u ${varnishd_user} -g ${varnishd_group} ${varnishd_extra_flags}"} fi # If we leave these set, rc.subr will su to them before starting # varnishd, which is not what we want. unset varnishd_user unset varnishd_group -pidfile="${varnishd_pidfile}" run_rc_command "$1" Index: head/www/varnish4/files/varnishlog.in =================================================================== --- head/www/varnish4/files/varnishlog.in (revision 387609) +++ head/www/varnish4/files/varnishlog.in (revision 387610) @@ -1,49 +1,48 @@ #!/bin/sh # # $FreeBSD$ # # PROVIDE: varnishlog # REQUIRE: DAEMON # KEYWORD: shutdown # # Add the following line to /etc/rc.conf to enable varnishlog: # # varnishlog_enable="YES" # # Configuration variables and their default values: # # varnishlog_pidfile - full path to the PID file. # default: "/var/run/varnishlog.pid" # # varnishlog_file - full path to the log file. # default: "/var/log/varnish.log" # # varnishlog_flags - command line arguments. # default: "-D -P ${varnishlog_pidfile} -a -w ${varnishlog_file}" # # Add the following line to /etc/newsyslog.conf to rotate the log file # once a day: # # /var/log/varnish.log 640 7 * @T00 JB /var/run/varnishlog.pid # # See varnishlog(1) for a detailed overview of command-line options. # . /etc/rc.subr -name="varnishlog" +name=varnishlog rcvar=varnishlog_enable -command="%%PREFIX%%/bin/${name}" - -# read configuration and set defaults load_rc_config ${name} -: ${varnishlog_enable:="NO"} -: ${varnishlog_pidfile:="/var/run/${name}.pid"} -: ${varnishlog_file:="/var/log/varnish.log"} -: ${varnishlog_flags:="-P ${varnishlog_pidfile} -D -a -w ${varnishlog_file}"} +: ${varnishlog_enable:=NO} +: ${varnishlog_pidfile=/var/run/${name}.pid} +: ${varnishlog_file=/var/log/varnish.log} +: ${varnishlog_flags="-P ${varnishlog_pidfile} -D -a -w ${varnishlog_file}"} +command="%%PREFIX%%/bin/${name}" pidfile=${varnishlog_pidfile} + run_rc_command "$1" Index: head/www/varnish4/files/varnishncsa.in =================================================================== --- head/www/varnish4/files/varnishncsa.in (revision 387609) +++ head/www/varnish4/files/varnishncsa.in (revision 387610) @@ -1,54 +1,53 @@ #!/bin/sh # # $FreeBSD$ # # PROVIDE: varnishncsa # REQUIRE: DAEMON # KEYWORD: shutdown # # Add the following line to /etc/rc.conf to enable varnishncsa: # # varnishncsa_enable="YES" # # Configuration variables and their default values: # # varnishncsa_pidfile - full path to the PID file. # default: "/var/run/varnishncsa.pid" # # varnishncsa_file - full path to the log file. # default: "/var/log/varnishncsa.log" # # varnishncsa_flags - command line arguments. # default: "-D -P ${varnishncsa_pidfile} -a -c -w ${varnishncsa_file}${varnishncsa_logformat:+ -P \"$varnishncsa_logformat\"" # # varnishncsa_logformat - log file format. # default: "" (uses varnishncsa's default format) # example: "%h %l %u %t %r %s %b %{Referer}i %{User-agent}i" # # Add the following line to /etc/newsyslog.conf to rotate the log file # once a day: # # /var/log/varnishncsa.log 640 7 * @T00 JB /var/run/varnishncsa.pid # # See varnishncsa(1) for a detailed overview of command-line options. # . /etc/rc.subr -name="varnishncsa" +name=varnishncsa rcvar=varnishncsa_enable -command="%%PREFIX%%/bin/${name}" - -# read configuration and set defaults load_rc_config ${name} -: ${varnishncsa_enable:="NO"} -: ${varnishncsa_pidfile:="/var/run/${name}.pid"} -: ${varnishncsa_file:="/var/log/${name}.log"} -: ${varnishncsa_logformat:=""} -: ${varnishncsa_flags:="-P ${varnishncsa_pidfile} -D -a -c -w ${varnishncsa_file}${varnishncsa_logformat:+ -F \"$varnishncsa_logformat\"}"} +: ${varnishncsa_enable:=NO} +: ${varnishncsa_pidfile=/var/run/${name}.pid} +: ${varnishncsa_file=/var/log/${name}.log} +: ${varnishncsa_flags="-P ${varnishncsa_pidfile} -D -a -c -w ${varnishncsa_file}${varnishncsa_logformat:+ -F \"$varnishncsa_logformat\"}"} + +command="%%PREFIX%%/bin/${name}" pidfile=${varnishncsa_pidfile} + run_rc_command "$1"