diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2014-10-03 18:15:09 +0000 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2014-10-03 18:15:09 +0000 |
commit | 27ff02bcc1f83367496fc797b10965009e78a205 (patch) | |
tree | 8c5f1ab73c1afa47f6fffbc971e2cb9c22bb352b /www-servers | |
parent | Stable on alpha for security bug 524256 (diff) | |
download | gentoo-2-27ff02bcc1f83367496fc797b10965009e78a205.tar.gz gentoo-2-27ff02bcc1f83367496fc797b10965009e78a205.tar.bz2 gentoo-2-27ff02bcc1f83367496fc797b10965009e78a205.zip |
Fix varnishncsa initd script, bug #524284
(Portage version: 2.2.8-r2/cvs/Linux x86_64, signed Manifest commit with key 0xF52D4BBA)
Diffstat (limited to 'www-servers')
-rw-r--r-- | www-servers/varnish/ChangeLog | 8 | ||||
-rw-r--r-- | www-servers/varnish/files/varnishncsa.initd-r1 | 45 | ||||
-rw-r--r-- | www-servers/varnish/varnish-4.0.1-r1.ebuild (renamed from www-servers/varnish/varnish-4.0.1.ebuild) | 7 |
3 files changed, 56 insertions, 4 deletions
diff --git a/www-servers/varnish/ChangeLog b/www-servers/varnish/ChangeLog index 54bdfa189499..863467c6c1d9 100644 --- a/www-servers/varnish/ChangeLog +++ b/www-servers/varnish/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for www-servers/varnish # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/www-servers/varnish/ChangeLog,v 1.79 2014/06/25 12:46:50 blueness Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-servers/varnish/ChangeLog,v 1.80 2014/10/03 18:15:09 blueness Exp $ + +*varnish-4.0.1-r1 (03 Oct 2014) + + 03 Oct 2014; Anthony G. Basile <blueness@gentoo.org> + +files/varnishncsa.initd-r1, +varnish-4.0.1-r1.ebuild, -varnish-4.0.1.ebuild: + Fix varnishncsa initd script, bug #524284 *varnish-4.0.1 (25 Jun 2014) diff --git a/www-servers/varnish/files/varnishncsa.initd-r1 b/www-servers/varnish/files/varnishncsa.initd-r1 new file mode 100644 index 000000000000..a13f087a60b1 --- /dev/null +++ b/www-servers/varnish/files/varnishncsa.initd-r1 @@ -0,0 +1,45 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/www-servers/varnish/files/varnishncsa.initd-r1,v 1.1 2014/10/03 18:15:09 blueness Exp $ + +VARNISHNCSA_PID=${VARNISHNCSA_PID:-/run/${SVCNAME}.pid} + +command="${VARNISHNCSA:-/usr/bin/varnishncsa}" +command_args="-D -P ${VARNISHNCSA_PID} ${VARNISHNCSA_OPTS}" +pidfile="${VARNISHNCSA_PID}" + +extra_started_commands="reload rotate flush" + +description_rotate="Rotate the log file" +description_flush="Flush any outstanding transactions" + +# We need to make sure varnishd has started first, bug #524284 +start_pre() { + TIMEOUT=${TIMEOUT:-5} + + local i=0 + while [ $i -lt ${TIMEOUT} ]; do + echo status | varnishadm 2>/dev/null | grep -q "Child in state running" + test $? -eq 0 && break + + sleep 1 && i=$(expr $i + 1) + done +} + +rotate() { + ebegin "Rotating log file" + start-stop-daemon -p ${VARNISHNCSA_PID} -s SIGHUP + eend $? +} + +flush() { + ebegin "Flushing any outstanding transactions" + start-stop-daemon -p ${VARNISHNCSA_PID} -s SIGUSR1 + eend $? +} + +reload() { + flush + rotate +} diff --git a/www-servers/varnish/varnish-4.0.1.ebuild b/www-servers/varnish/varnish-4.0.1-r1.ebuild index 6a25ea65783d..66dedd3618ed 100644 --- a/www-servers/varnish/varnish-4.0.1.ebuild +++ b/www-servers/varnish/varnish-4.0.1-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/www-servers/varnish/varnish-4.0.1.ebuild,v 1.1 2014/06/25 12:46:50 blueness Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-servers/varnish/varnish-4.0.1-r1.ebuild,v 1.1 2014/10/03 18:15:09 blueness Exp $ EAPI="5" @@ -80,7 +80,7 @@ src_install() { newinitd "${FILESDIR}"/varnishlog.initd varnishlog newconfd "${FILESDIR}"/varnishlog.confd varnishlog - newinitd "${FILESDIR}"/varnishncsa.initd varnishncsa + newinitd "${FILESDIR}"/varnishncsa.initd-r1 varnishncsa newconfd "${FILESDIR}"/varnishncsa.confd varnishncsa newinitd "${FILESDIR}"/varnishd.initd-r3 varnishd @@ -96,7 +96,8 @@ src_install() { systemd_dounit "${FILESDIR}/${PN}d.service" insinto /etc/varnish/ - doins lib/libvmod_std/vmod.vcc + doins lib/libvmod_std/vmod.vcc + doins etc/example.vcl fowners root:varnish /etc/varnish/ fowners varnish:varnish /var/lib/varnish/ |