Mailing List Archive

r1452 - in branches/1.0: . bin/varnishlog bin/varnishncsa doc redhat
Author: des
Date: 2007-05-18 13:22:58 +0200 (Fri, 18 May 2007)
New Revision: 1452

Modified:
branches/1.0/
branches/1.0/bin/varnishlog/varnishlog.c
branches/1.0/bin/varnishncsa/varnishncsa.c
branches/1.0/doc/changes-1.0.3-1.0.4.xml
branches/1.0/redhat/varnish.initrc
branches/1.0/redhat/varnish.spec
branches/1.0/redhat/varnish.sysconfig
Log:
Merged revisions 1447-1451 via svnmerge from
svn+ssh://projects.linpro.no/svn/varnish/trunk/varnish-cache

........
r1447 | ingvar | 2007-05-17 20:17:12 +0200 (Thu, 17 May 2007) | 1 line

just some output cleanup
........
r1448 | ingvar | 2007-05-17 23:11:37 +0200 (Thu, 17 May 2007) | 1 line

:- is simpler than reverse negation
........
r1449 | ingvar | 2007-05-17 23:49:45 +0200 (Thu, 17 May 2007) | 10 lines

Our default.vcl has a minor change: It uses localhost:80 (thus not
default anymore, but whatever, it will work with apache httpd out of
the box, and that's better for easy testing) as the backend. sysconfig
file changed to reflect this.

Minor cosmetic changes in the specfile

Ingvar
........
r1450 | des | 2007-05-18 10:15:23 +0200 (Fri, 18 May 2007) | 2 lines

reopen needs to be volatile, or the compiler might optimize it away.
........
r1451 | des | 2007-05-18 11:14:11 +0200 (Fri, 18 May 2007) | 2 lines

Add entry for r1450.
........



Property changes on: branches/1.0
___________________________________________________________________
Name: svnmerge-integrated
- /trunk/varnish-cache:1-1315,1359-1387,1394,1399-1421,1424-1432,1434,1437-1445
+ /trunk/varnish-cache:1-1315,1359-1387,1394,1399-1421,1424-1432,1434,1437-1445,1447-1451

Modified: branches/1.0/bin/varnishlog/varnishlog.c
===================================================================
--- branches/1.0/bin/varnishlog/varnishlog.c 2007-05-18 09:14:11 UTC (rev 1451)
+++ branches/1.0/bin/varnishlog/varnishlog.c 2007-05-18 11:22:58 UTC (rev 1452)
@@ -212,7 +212,7 @@

/*--------------------------------------------------------------------*/

-static sig_atomic_t reopen;
+static volatile sig_atomic_t reopen;

static void
sighup(int sig)

Modified: branches/1.0/bin/varnishncsa/varnishncsa.c
===================================================================
--- branches/1.0/bin/varnishncsa/varnishncsa.c 2007-05-18 09:14:11 UTC (rev 1451)
+++ branches/1.0/bin/varnishncsa/varnishncsa.c 2007-05-18 11:22:58 UTC (rev 1452)
@@ -347,7 +347,7 @@

/*--------------------------------------------------------------------*/

-static sig_atomic_t reopen;
+static volatile sig_atomic_t reopen;

static void
sighup(int sig)

Modified: branches/1.0/doc/changes-1.0.3-1.0.4.xml
===================================================================
--- branches/1.0/doc/changes-1.0.3-1.0.4.xml 2007-05-18 09:14:11 UTC (rev 1451)
+++ branches/1.0/doc/changes-1.0.3-1.0.4.xml 2007-05-18 11:22:58 UTC (rev 1452)
@@ -147,6 +147,12 @@
options have been added to daemonize and create a pidfile,
respectively.</para>
</change>
+
+ <change type="bug" ref="1450">
+ <para>The flag that is raised upon reception of a
+ <code>SIGHUP</code> has been marked <code>volatile</code> so it
+ will not be optimized away by the compiler.</para>
+ </change>
</subsystem>

<subsystem>
@@ -161,6 +167,12 @@
<code>varnishncsa</code> output from servers which handle
multiple virtual hosts far more useful.</para>
</change>
+
+ <change type="bug" ref="1450">
+ <para>The flag that is raised upon reception of a
+ <code>SIGHUP</code> has been marked <code>volatile</code> so it
+ will not be optimized away by the compiler.</para>
+ </change>
</subsystem>

<subsystem>

Modified: branches/1.0/redhat/varnish.initrc
===================================================================
--- branches/1.0/redhat/varnish.initrc 2007-05-18 09:14:11 UTC (rev 1451)
+++ branches/1.0/redhat/varnish.initrc 2007-05-18 11:22:58 UTC (rev 1452)
@@ -21,34 +21,34 @@

DAEMON="/usr/sbin/varnishd"

-# $DAEMON_OPTS is set in /etc/sysconfig/varnish. At least, one
-# have to set up a backend.
-if [ "$DAEMON_OPTS" = "" ]; then
- echo "No values specified in DAEMON_OPTS. Please read the varnishd(1)"
- echo "manpage and put configuration options in /etc/sysconfig/varnish"
- exit 1
-fi
-
mkdir -p /var/run/varnish 2>/dev/null

# Open files (usually 1024, which is way too small for varnish)
-[ ! "${NFILES}" ] && NFILES="131072"
-ulimit -n ${NFILES}
+ulimit -n ${NFILES:-131072}

# See how we were called.
case "$1" in
start)
echo -n "Starting varnish HTTP accelerator: "
- daemon --pidfile ${PIDFILE} ${DAEMON} "$DAEMON_OPTS" -P ${PIDFILE}
- sleep 1
- pkill -0 $PROCNAME
- RETVAL=$?
- if [ $RETVAL -eq 0 ]
- then
+
+ # $DAEMON_OPTS is set in /etc/sysconfig/varnish. At least, one
+ # has to set up a backend, or /tmp will be used, which is a bad idea.
+ if [ "$DAEMON_OPTS" = "" ]; then
+ echo "\$DAEMON_OPTS empty."
+ echo -n "Please put configuration options in /etc/sysconfig/varnish"
+ echo_failure
+ else
+ daemon --pidfile ${PIDFILE} ${DAEMON} "$DAEMON_OPTS" -P ${PIDFILE} > /dev/null 2>&1
+ sleep 1
+ pkill -0 $PROCNAME
+ RETVAL=$?
+ if [ $RETVAL -eq 0 ]
+ then
echo_success
touch $LOCKFILE
- else
+ else
echo_failure
+ fi
fi
echo
;;

Modified: branches/1.0/redhat/varnish.spec
===================================================================
--- branches/1.0/redhat/varnish.spec 2007-05-18 09:14:11 UTC (rev 1451)
+++ branches/1.0/redhat/varnish.spec 2007-05-18 11:22:58 UTC (rev 1452)
@@ -51,7 +51,7 @@

# Remove "--disable static" if you want to build static libraries
# (ie for the devel package)
-%configure --sbindir=/usr/sbin --disable-static
+%configure --disable-static

# We have to remove rpath - not allowed in Fedora
# (This problem only visible on 64 bit arches)
@@ -135,7 +135,7 @@
%postun libs -p /sbin/ldconfig

%changelog
-* Wed May 16 2007 Ingvar Hagelund <ingvar at linpro.no> - 1.0.svn-20070516
+* Wed May 16 2007 Ingvar Hagelund <ingvar at linpro.no> - 1.0.svn-20070517
- Wrapping up for 1.0.4
- Changes in sysconfig and init scripts. Syncing with files in
trunk/debian

Modified: branches/1.0/redhat/varnish.sysconfig
===================================================================
--- branches/1.0/redhat/varnish.sysconfig 2007-05-18 09:14:11 UTC (rev 1451)
+++ branches/1.0/redhat/varnish.sysconfig 2007-05-18 11:22:58 UTC (rev 1452)
@@ -14,10 +14,10 @@
# Listen on port 6081, administration on localhost:6082, and forward to
# content server on localhost:8080. Use a fixed-size cache file.
#
-DAEMON_OPTS="-a :6081 \
- -T localhost:6082 \
- -b localhost:8080 \
- -s file,/var/lib/varnish/varnish_storage.bin,1G"
+#DAEMON_OPTS="-a :6081 \
+# -T localhost:6082 \
+# -b localhost:8080 \
+# -s file,/var/lib/varnish/varnish_storage.bin,1G"


## Alternative 2, Configuration with VCL
@@ -26,10 +26,10 @@
# one content server selected by the vcl file, based on the request. Use a
# fixed-size cache file.
#
-# DAEMON_OPTS="-a :6081 \
-# -T localhost:6082 \
-# -f /etc/varnish/default.vcl \
-# -s file,/var/lib/varnish/varnish_storage.bin,1G"
+DAEMON_OPTS="-a :6081 \
+ -T localhost:6082 \
+ -f /etc/varnish/default.vcl \
+ -s file,/var/lib/varnish/varnish_storage.bin,1G"


## Alternative 3, Advanced configuration