summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThilo Bangert <bangert@gentoo.org>2009-07-12 12:04:06 +0000
committerThilo Bangert <bangert@gentoo.org>2009-07-12 12:04:06 +0000
commit042bdf78fa2cd5660f838b9c7be1f997c247fd14 (patch)
tree88efe954f825047bbe0e07d77528750808d7f51f /www-servers
parentStable on alpha, bug #250429 (diff)
downloadgentoo-2-042bdf78fa2cd5660f838b9c7be1f997c247fd14.tar.gz
gentoo-2-042bdf78fa2cd5660f838b9c7be1f997c247fd14.tar.bz2
gentoo-2-042bdf78fa2cd5660f838b9c7be1f997c247fd14.zip
implement logging (bug #270597) - thanks Joshua Bronson and Tim Taubert
(Portage version: 2.2_rc33/cvs/Linux i686)
Diffstat (limited to 'www-servers')
-rw-r--r--www-servers/varnish/ChangeLog8
-rw-r--r--www-servers/varnish/files/varnishd.confd3
-rwxr-xr-xwww-servers/varnish/files/varnishd.initd8
-rw-r--r--www-servers/varnish/files/varnishd.logrotate9
-rw-r--r--www-servers/varnish/varnish-2.0.4-r1.ebuild43
5 files changed, 69 insertions, 2 deletions
diff --git a/www-servers/varnish/ChangeLog b/www-servers/varnish/ChangeLog
index 2c97d13e8eb7..80c0fbd2686b 100644
--- a/www-servers/varnish/ChangeLog
+++ b/www-servers/varnish/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for www-servers/varnish
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/varnish/ChangeLog,v 1.24 2009/06/11 09:50:42 hollow Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-servers/varnish/ChangeLog,v 1.25 2009/07/12 12:04:06 bangert Exp $
+
+*varnish-2.0.4-r1 (12 Jul 2009)
+
+ 12 Jul 2009; Thilo Bangert <bangert@gentoo.org> +varnish-2.0.4-r1.ebuild,
+ files/varnishd.confd, files/varnishd.initd, +files/varnishd.logrotate:
+ implement logging (bug #270597)
11 Jun 2009; Benedikt Böhm <hollow@gentoo.org>
+files/varnish-2.0.4-virtual-ncsa.patch, varnish-2.0.4.ebuild:
diff --git a/www-servers/varnish/files/varnishd.confd b/www-servers/varnish/files/varnishd.confd
index e71aad9e4807..c2eb140db768 100644
--- a/www-servers/varnish/files/varnishd.confd
+++ b/www-servers/varnish/files/varnishd.confd
@@ -4,3 +4,6 @@
# please see the varnishd man page for more options
VARNISHD_OPTS="-a 127.0.0.1:8080 -b 127.0.0.1:80"
+# arguments passed to varnishncsa
+# please see the varnishncsa man page for more options
+VARNISHNCSA_ARGS="-c -a -w /var/log/varnish/access.log"
diff --git a/www-servers/varnish/files/varnishd.initd b/www-servers/varnish/files/varnishd.initd
index 4a7890f5dc8a..2ba1b7b7cdfb 100755
--- a/www-servers/varnish/files/varnishd.initd
+++ b/www-servers/varnish/files/varnishd.initd
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/varnish/files/varnishd.initd,v 1.5 2008/03/10 22:10:20 bangert Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-servers/varnish/files/varnishd.initd,v 1.6 2009/07/12 12:04:06 bangert Exp $
depend() {
need net
@@ -13,10 +13,16 @@ start() {
ulimit -l 82000
start-stop-daemon --quiet --start --pidfile /var/run/varnishd.pid --exec /usr/sbin/varnishd -- -P /var/run/varnishd.pid ${VARNISHD_OPTS} &> /dev/null
eend $?
+ ebegin "Starting varnish logging"
+ start-stop-daemon --quiet --start --pidfile /var/run/varnishncsa.pid --exec /usr/bin/varnishncsa -- -D -P /var/run/varnishncsa.pid ${VARNISHNCSA_ARGS}
+ eend $?
}
stop() {
ebegin "Stopping varnish"
start-stop-daemon --quiet --stop --pidfile /var/run/varnishd.pid
eend $?
+ ebegin "Stopping varnish logging"
+ start-stop-daemon --quiet --stop --pidfile /var/run/varnishncsa.pid
+ eend $?
}
diff --git a/www-servers/varnish/files/varnishd.logrotate b/www-servers/varnish/files/varnishd.logrotate
new file mode 100644
index 000000000000..62ee60007a2d
--- /dev/null
+++ b/www-servers/varnish/files/varnishd.logrotate
@@ -0,0 +1,9 @@
+/var/log/varnish/*.log {
+ weekly
+ rotate 10
+ copytruncate
+ delaycompress
+ compress
+ notifempty
+ missingok
+}
diff --git a/www-servers/varnish/varnish-2.0.4-r1.ebuild b/www-servers/varnish/varnish-2.0.4-r1.ebuild
new file mode 100644
index 000000000000..839d7a4f6a8a
--- /dev/null
+++ b/www-servers/varnish/varnish-2.0.4-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/varnish/varnish-2.0.4-r1.ebuild,v 1.1 2009/07/12 12:04:06 bangert Exp $
+
+EAPI="2"
+
+inherit autotools
+
+DESCRIPTION="Varnish is a state-of-the-art, high-performance HTTP accelerator."
+HOMEPAGE="http://varnish.projects.linpro.no/"
+SRC_URI="mirror://sourceforge/varnish/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+#varnish compiles stuff at run time
+RDEPEND="sys-devel/gcc"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-link-order.patch
+ epatch "${FILESDIR}"/${P}-virtual-ncsa.patch
+ eautoreconf
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ newinitd "${FILESDIR}"/varnishd.initd varnishd || die
+ newconfd "${FILESDIR}"/varnishd.confd varnishd || die
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/varnishd.logrotate" varnishd
+
+ dodir /var/log/varnish
+}
+
+pkg_postinst () {
+ elog "No demo-/sample-configfile is included in the distribution -"
+ elog "please read the man-page for more info."
+ elog "A sample (localhost:8080 -> localhost:80) for gentoo is given in"
+ elog " /etc/conf.d/varnishd"
+ echo
+}