From 89e0f836a4281c6f9b4b3d1fec3c5723f0789987 Mon Sep 17 00:00:00 2001 From: ssm Date: Tue, 4 Sep 2007 10:55:25 +0000 Subject: [PATCH] * Set statedir to /var/lib, to conform to debian packaging standards. * Removed -n switch from varnish defaults file and varnishlog init script. Use the default instance name instead. This makes sure varnish utilities work without having to use the -n switch for the default instance. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1935 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/debian/changelog | 12 +++++++++--- varnish-cache/debian/rules | 2 +- varnish-cache/debian/varnish.default | 12 +++++++----- varnish-cache/debian/varnish.varnishlog.init | 2 +- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/varnish-cache/debian/changelog b/varnish-cache/debian/changelog index bcf649dc..b8425d32 100644 --- a/varnish-cache/debian/changelog +++ b/varnish-cache/debian/changelog @@ -1,13 +1,19 @@ -varnish (1.1.1) unstable; urgency=low +varnish (1.1.1-1) unstable; urgency=low + [Lars Bahner] * New upstream release * User and Group id added to default DAEMON_OPTS * Added user and group creation to postinst * Added missing man pages - -- Lars Bahner Mon, 20 Aug 2007 11:29:33 +0200 + [Stig Sandbeck Mathisen] + * Set statedir to /var/lib + * Removed -n switch from varnish defaults file and varnishlog init script. + Use the default instance name instead. -varnish (1.1) unstable; urgency=low + -- Stig Sandbeck Mathisen Tue, 04 Sep 2007 12:27:09 +0200 + +varnish (1.1-1) unstable; urgency=low * New upstream release * Split package into varnish, libvarnish and libvarnish-dev diff --git a/varnish-cache/debian/rules b/varnish-cache/debian/rules index af1d05af..715306aa 100755 --- a/varnish-cache/debian/rules +++ b/varnish-cache/debian/rules @@ -32,7 +32,7 @@ config.status: configure # The boilerplate linker flags won't allow varnish to compile :( # There are circular dependencies in the varnish libraries, but # the core developers have OK'ed that we don't check. - ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="$(CFLAGS)" --localstatedir=/var + ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="$(CFLAGS)" --localstatedir=/var/lib build: build-stamp diff --git a/varnish-cache/debian/varnish.default b/varnish-cache/debian/varnish.default index 161835a8..7a40c3cc 100644 --- a/varnish-cache/debian/varnish.default +++ b/varnish-cache/debian/varnish.default @@ -7,6 +7,10 @@ # Maximum number of open files (for ulimit -n) NFILES=131072 +# Default varnish instance name is the local nodename. Can be overridden with +# the -n switch, to have more instances on a single server. +INSTANCE=$(uname -n) + # This file contains 4 alternatives, please use only one. ## Alternative 1, Minimal configuration, no VCL @@ -18,8 +22,7 @@ DAEMON_OPTS="-a :6081 \ -T localhost:6082 \ -b localhost:8080 \ -u varnish -g varnish \ - -n /var/lib/varnish \ - -s file,/var/lib/varnish/varnish_storage.bin,1G" + -s file,/var/lib/varnish/$INSTANCE/varnish_storage.bin,1G" ## Alternative 2, Configuration with VCL @@ -32,7 +35,7 @@ DAEMON_OPTS="-a :6081 \ # -T localhost:6082 \ # -f /etc/varnish/default.vcl \ # -n /var/lib/varnish \ -# -s file,/var/lib/varnish/varnish_storage.bin,1G" +# -s file,/var/lib/varnish/$INSTANCE/varnish_storage.bin,1G" ## Alternative 3, Advanced configuration @@ -65,7 +68,7 @@ DAEMON_OPTS="-a :6081 \ # VARNISH_HOMEDIR=/var/lib/varnish # # # Cache file location -# VARNISH_STORAGE_FILE=/var/lib/varnish/varnish_storage.bin +# VARNISH_STORAGE_FILE=/var/lib/varnish/$INSTANCE/varnish_storage.bin # # # Cache file size: in bytes, optionally using k / M / G / T suffix, # # or in percentage of available disk space using the % suffix. @@ -84,7 +87,6 @@ DAEMON_OPTS="-a :6081 \ # -T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} \ # -t ${VARNISH_TTL} \ # -w ${VARNISH_MIN_THREADS},${VARNISH_MAX_THREADS},${VARNISH_THREAD_TIMEOUT} \ -# -n ${VARNISH_HOMEDIR} \ # -s ${VARNISH_STORAGE}" # diff --git a/varnish-cache/debian/varnish.varnishlog.init b/varnish-cache/debian/varnish.varnishlog.init index 9f92afd6..5fd6f256 100755 --- a/varnish-cache/debian/varnish.varnishlog.init +++ b/varnish-cache/debian/varnish.varnishlog.init @@ -24,7 +24,7 @@ LOGFILE=/var/log/varnish/varnish.log test -x $DAEMON || exit 0 -DAEMON_OPTS="-a -n /var/lib/varnish -w ${LOGFILE} -D -P $PIDFILE" +DAEMON_OPTS="-a -w ${LOGFILE} -D -P $PIDFILE" case "$1" in start) -- 2.39.5