|
|
d17577 |
diff -uap varnish-5.1.3/redhat/varnish.logrotate.scl varnish-5.1.3/redhat/varnish.logrotate
|
|
|
d17577 |
--- varnish-5.1.3/redhat/varnish.logrotate.scl
|
|
|
d17577 |
+++ varnish-5.1.3/redhat/varnish.logrotate
|
|
|
d17577 |
@@ -1,10 +1,10 @@
|
|
|
d17577 |
-/var/log/varnish/varnishncsa.log {
|
|
|
d17577 |
+$logdir/varnishncsa.log {
|
|
|
d17577 |
daily
|
|
|
d17577 |
rotate 7
|
|
|
d17577 |
compress
|
|
|
d17577 |
delaycompress
|
|
|
d17577 |
missingok
|
|
|
d17577 |
postrotate
|
|
|
d17577 |
- /bin/kill -HUP `cat /var/run/varnishncsa.pid /run/varnishncsa/varnishncsa.pid 2>/dev/null` 2> /dev/null || true
|
|
|
d17577 |
+ /bin/kill -HUP `cat $rundir/varnishlog.pid $rundir/varnishncsa.pid 2>/dev/null` 2> /dev/null || true
|
|
|
d17577 |
endscript
|
|
|
d17577 |
}
|
|
|
d17577 |
diff -uap varnish-5.1.3/redhat/varnishncsa.initrc.scl varnish-5.1.3/redhat/varnishncsa.initrc
|
|
|
d17577 |
--- varnish-5.1.3/redhat/varnishncsa.initrc.scl
|
|
|
d17577 |
+++ varnish-5.1.3/redhat/varnishncsa.initrc
|
|
|
d17577 |
@@ -22,17 +22,17 @@
|
|
|
d17577 |
. /etc/init.d/functions
|
|
|
d17577 |
|
|
|
d17577 |
retval=0
|
|
|
d17577 |
-pidfile="/var/run/varnishncsa.pid"
|
|
|
d17577 |
-lockfile="/var/lock/subsys/varnishncsa"
|
|
|
d17577 |
-logfile="/var/log/varnish/varnishncsa.log"
|
|
|
d17577 |
+pidfile="$rundir/varnishncsa.pid"
|
|
|
d17577 |
+lockfile="$localstatedir/lock/subsys/varnishncsa"
|
|
|
d17577 |
+logfile="$logdir/varnishncsa.log"
|
|
|
d17577 |
|
|
|
d17577 |
-exec="/usr/bin/varnishncsa"
|
|
|
d17577 |
+exec="$bindir/varnishncsa"
|
|
|
d17577 |
prog="varnishncsa"
|
|
|
d17577 |
|
|
|
d17577 |
DAEMON_OPTS="-a -w $logfile -D -P $pidfile"
|
|
|
d17577 |
|
|
|
d17577 |
# Include varnishncsa defaults
|
|
|
d17577 |
-[ -e /etc/sysconfig/varnishncsa ] && . /etc/sysconfig/varnishncsa
|
|
|
d17577 |
+[ -e $sysconfdir/sysconfig/varnishncsa ] && . $sysconfdir/sysconfig/varnishncsa
|
|
|
d17577 |
|
|
|
d17577 |
start() {
|
|
|
d17577 |
|
|
|
d17577 |
diff -uap varnish-5.1.3/redhat/varnishncsa.service.scl varnish-5.1.3/redhat/varnishncsa.service
|
|
|
d17577 |
--- varnish-5.1.3/redhat/varnishncsa.service.scl
|
|
|
d17577 |
+++ varnish-5.1.3/redhat/varnishncsa.service
|
|
|
d17577 |
@@ -1,14 +1,13 @@
|
|
|
d17577 |
[Unit]
|
|
|
d17577 |
Description=Varnish Cache HTTP accelerator NCSA logging daemon
|
|
|
d17577 |
-After=varnish.service
|
|
|
d17577 |
+After=$name.service
|
|
|
d17577 |
|
|
|
d17577 |
[Service]
|
|
|
d17577 |
-RuntimeDirectory=varnishncsa
|
|
|
d17577 |
Type=forking
|
|
|
d17577 |
-PIDFile=/run/varnishncsa/varnishncsa.pid
|
|
|
d17577 |
+PIDFile=$rundir/varnishncsa.pid
|
|
|
d17577 |
User=varnishlog
|
|
|
d17577 |
Group=varnish
|
|
|
d17577 |
-ExecStart=/usr/bin/varnishncsa -a -w /var/log/varnish/varnishncsa.log -D -P /run/varnishncsa/varnishncsa.pid
|
|
|
d17577 |
+ExecStart=$bindir/varnishncsa -a -w $logdir/varnishncsa.log -D -P $rundir/varnishncsa.pid
|
|
|
d17577 |
ExecReload=/bin/kill -HUP $MAINPID
|
|
|
d17577 |
|
|
|
d17577 |
[Install]
|
|
|
d17577 |
diff -uap varnish-5.1.3/redhat/varnish.params.scl varnish-5.1.3/redhat/varnish.params
|
|
|
d17577 |
--- varnish-5.1.3/redhat/varnish.params.scl
|
|
|
d17577 |
+++ varnish-5.1.3/redhat/varnish.params
|
|
|
d17577 |
@@ -10,7 +10,7 @@
|
|
|
d17577 |
#WARMUP_TIME=0
|
|
|
d17577 |
|
|
|
d17577 |
# Main configuration file. You probably want to change it.
|
|
|
d17577 |
-VARNISH_VCL_CONF=/etc/varnish/default.vcl
|
|
|
d17577 |
+VARNISH_VCL_CONF=$sysconfdir/varnish/default.vcl
|
|
|
d17577 |
|
|
|
d17577 |
# Default address and port to bind to. Blank address means all IPv4
|
|
|
d17577 |
# and IPv6 interfaces, otherwise specify a host name, an IPv4 dotted
|
|
|
d17577 |
@@ -23,7 +23,7 @@
|
|
|
d17577 |
VARNISH_ADMIN_LISTEN_PORT=6082
|
|
|
d17577 |
|
|
|
d17577 |
# Shared secret file for admin interface
|
|
|
d17577 |
-VARNISH_SECRET_FILE=/etc/varnish/secret
|
|
|
d17577 |
+VARNISH_SECRET_FILE=$sysconfdir/varnish/secret
|
|
|
d17577 |
|
|
|
d17577 |
# Backend storage specification, see Storage Types in the varnishd(5)
|
|
|
d17577 |
# man page for details.
|
|
|
d17577 |
diff -uap varnish-5.1.3/redhat/varnish.service.scl varnish-5.1.3/redhat/varnish.service
|
|
|
d17577 |
--- varnish-5.1.3/redhat/varnish.service.scl
|
|
|
d17577 |
+++ varnish-5.1.3/redhat/varnish.service
|
|
|
d17577 |
@@ -1,15 +1,13 @@
|
|
|
d17577 |
+# If you want to make changes to this file, please create
|
|
|
d17577 |
+# an override file via "systemctl edit $name".
|
|
|
d17577 |
+#
|
|
|
d17577 |
+# Environment variables may be found in $sysconfdir/varnish/varnish.params
|
|
|
d17577 |
+#
|
|
|
d17577 |
[Unit]
|
|
|
d17577 |
Description=Varnish Cache, a high-performance HTTP accelerator
|
|
|
d17577 |
After=network.target
|
|
|
d17577 |
|
|
|
d17577 |
[Service]
|
|
|
d17577 |
-# If you want to make changes to this file, please copy it to
|
|
|
d17577 |
-# /etc/systemd/system/varnish.service and make your changes there.
|
|
|
d17577 |
-# This will override the file kept at /lib/systemd/system/varnish.service
|
|
|
d17577 |
-#
|
|
|
d17577 |
-# Enviroment variables may be found in /etc/varnish/varnish.params
|
|
|
d17577 |
-#
|
|
|
d17577 |
-
|
|
|
d17577 |
# Maximum number of open files (for ulimit -n)
|
|
|
d17577 |
LimitNOFILE=131072
|
|
|
d17577 |
|
|
|
d17577 |
@@ -23,22 +21,20 @@
|
|
|
d17577 |
# Maximum size of the corefile.
|
|
|
d17577 |
LimitCORE=infinity
|
|
|
d17577 |
|
|
|
d17577 |
-EnvironmentFile=/etc/varnish/varnish.params
|
|
|
d17577 |
+EnvironmentFile=$sysconfdir/varnish/varnish.params
|
|
|
d17577 |
|
|
|
d17577 |
Type=forking
|
|
|
d17577 |
-PIDFile=/var/run/varnish.pid
|
|
|
d17577 |
+PIDFile=$rundir/varnish.pid
|
|
|
d17577 |
PrivateTmp=true
|
|
|
d17577 |
-ExecStart=/usr/sbin/varnishd \
|
|
|
d17577 |
- -P /var/run/varnish.pid \
|
|
|
d17577 |
+ExecStart=$sbindir/varnishd \
|
|
|
d17577 |
+ -P $rundir/varnish.pid \
|
|
|
d17577 |
-f $VARNISH_VCL_CONF \
|
|
|
d17577 |
-a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} \
|
|
|
d17577 |
-T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} \
|
|
|
d17577 |
-S $VARNISH_SECRET_FILE \
|
|
|
d17577 |
-s $VARNISH_STORAGE \
|
|
|
d17577 |
$DAEMON_OPTS
|
|
|
d17577 |
-
|
|
|
d17577 |
-ExecReload=/usr/sbin/varnish_reload_vcl
|
|
|
d17577 |
+ExecReload=$sbindir/varnish_reload_vcl
|
|
|
d17577 |
|
|
|
d17577 |
[Install]
|
|
|
d17577 |
WantedBy=multi-user.target
|
|
|
d17577 |
-
|
|
|
94ead7 |
diff --git a/configure.ac b/configure.ac
|
|
|
94ead7 |
index d47beaf..97e47ba 100644
|
|
|
94ead7 |
--- a/configure.ac
|
|
|
94ead7 |
+++ b/configure.ac
|
|
|
94ead7 |
@@ -325,7 +325,7 @@ AC_ARG_WITH([jemalloc],
|
|
|
94ead7 |
case $target in
|
|
|
94ead7 |
*-*-linux*)
|
|
|
94ead7 |
if test "x$with_jemalloc" != xno; then
|
|
|
94ead7 |
- AC_CHECK_LIB([jemalloc], [malloc_conf],
|
|
|
94ead7 |
+ AC_CHECK_LIB([rh-varnish6jemalloc], [malloc_conf],
|
|
|
94ead7 |
[JEMALLOC_LDADD="-ljemalloc"],
|
|
|
94ead7 |
[AC_MSG_WARN([No system jemalloc found, using system malloc])])
|
|
|
94ead7 |
fi
|