commit e96c01647306910e531b1f176e551e48e1a15dc82e1bf44c5ddffdd5e8847dfb Author: OBS User autobuild Date: Thu Sep 23 23:07:49 2010 +0000 Accepting request 48519 from server:http Copy from server:http/varnish based on submit request 48519 from user jengelh OBS-URL: https://build.opensuse.org/request/show/48519 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/varnish?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/upstream-config.tar.bz2 b/upstream-config.tar.bz2 new file mode 100644 index 0000000..69ad588 --- /dev/null +++ b/upstream-config.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:56d9ed708430038d6a0192443fdba23a9005ea38f40598d498175ca8954cc498 +size 3955 diff --git a/varnish-2.1.3.tar.gz b/varnish-2.1.3.tar.gz new file mode 100644 index 0000000..318d1b5 --- /dev/null +++ b/varnish-2.1.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:09a97dabbc081a28f3b4530491fcbc6f2510ee9964794e24cbc9f1f6935340ef +size 886945 diff --git a/varnish.changes b/varnish.changes new file mode 100644 index 0000000..a22f8b0 --- /dev/null +++ b/varnish.changes @@ -0,0 +1,87 @@ +------------------------------------------------------------------- +Thu Aug 5 22:11:24 UTC 2010 - jengelh@medozas.de + +- Update to new upstream release: 2.1.3 +* fixed an off-by-one error in the ESI handling causing includes to + fail a large part of the time. +* Avoid triggering an assert if the other end closes the connection + while we are lingering and waiting for another request from them. +* Make it possible to specify the per-thread stack size. This might + be useful on 32 bit systems with their limited address space. +* Persistent storage is now experimentally supported using the + persistent stevedore. It has the same command line arguments as + the file stevedore. +* The regular expression engine is now PCRE instead of POSIX + regular expressions. +* Add a new hashing method called critbit. This autoscales and + should work better on large object workloads than the classic + hash. Critbit has been made the default hash algorithm. +* Add support for authenticating CLI connections. +* Add hash director that chooses which backend to use depending on + req.hash. +* Add client director that chooses which backend to use depending + on the client's IP address. Note that this ignores the + X-Forwarded-For header. +* Add a timestamp to bans, so you can know how old they are. +* Varnish can now connect its CLI to a remote instance when + starting up, rather than just being connected to. +* It is no longer needed to specify the maximum number of HTTP + headers to allow from backends. This is now a run-time parameter. +* HEAD requests would be converted to GET requests too early, which + affected pass and pipe. This has been fixed. +* Add experimental support for the Range header. This has to be + enabled using the parameter http_range_support. +- Add PreReqs for %post +- Run %setup quietly +- Remove unneeded .la files from installation - libraries are in + a standard directory already +- Avoid use of bash-specific &>/dev/null during %post +- Refine file lists +- Remove old changelog from .spec - changelog is in .changes + +------------------------------------------------------------------- +Tue Dec 15 15:03.01 CEST 2009 - jg@internetx.de + +- update 2.0.5 + + +------------------------------------------------------------------- +Fri Apr 3 13:48:01 CEST 2009 - mrueckert@suse.de + +- update to 2.0.4 + +------------------------------------------------------------------- +Tue Mar 10 17:47:23 CET 2009 - mrueckert@suse.de + +- update to 2.0.3 + +------------------------------------------------------------------- +Wed Jul 25 22:16:29 CEST 2007 - mrueckert@suse.de + +- updated to 1.1 + +------------------------------------------------------------------- +Tue Feb 20 18:28:29 CET 2007 - mrueckert@suse.de + +- update to version 1.0.3 + Consistency issues with statistics and backend parameters were + fixed. Parsing of -w command-line options was fixed. A + short-lived DNS cache was added to avoid thrashing DNS servers + when the backend fails. + +------------------------------------------------------------------- +Sat Dec 2 17:14:16 CET 2006 - mrueckert@suse.de + +- fixing build on sles9 +- added files from the official rh4 rpm: + o init scripts for non suse distros + o the default configs for all distros +- added init/sysconfig script for suse. +- we create a user now. Remaining TODO item: how to run varnish as + non root user on port 80? + +------------------------------------------------------------------- +Sun Nov 19 03:37:50 CET 2006 - mrueckert@suse.de + +- update to 1.0.2 + diff --git a/varnish.init b/varnish.init new file mode 100644 index 0000000..7e94015 --- /dev/null +++ b/varnish.init @@ -0,0 +1,256 @@ +#!/bin/sh +# +# /etc/init.d/varnish +# and its symbolic link +# /(usr/)sbin/rcvarnish +# +# Note: This template uses functions rc_XXX defined in /etc/rc.status on +# UnitedLinux/SUSE/Novell based Linux distributions. If you want to base your +# script on this template and ensure that it works on non UL based LSB +# compliant Linux distributions, you either have to provide the rc.status +# functions from UL or change the script to work without them. +# See skeleton.compat for a template that works with other distros as well. +# +### BEGIN INIT INFO +# Provides: varnish +# Required-Start: $syslog $remote_fs +# Should-Start: $time ypbind sendmail +# Required-Stop: $syslog $remote_fs +# Should-Stop: $time ypbind sendmail +# Default-Start: 3 5 +# Default-Stop: 0 1 2 6 +# Short-Description: varnish HTTP accelerator +# Description: varnish HTTP accelerator +### END INIT INFO +# +# Any extensions to the keywords given above should be preceeded by +# X-VendorTag- (X-UnitedLinux- X-SuSE- for us) according to LSB. +# +# Notes on Required-Start/Should-Start: +# * There are two different issues that are solved by Required-Start +# and Should-Start +# (a) Hard dependencies: This is used by the runlevel editor to determine +# which services absolutely need to be started to make the start of +# this service make sense. Example: nfsserver should have +# Required-Start: $portmap +# Also, required services are started before the dependent ones. +# The runlevel editor will warn about such missing hard dependencies +# and suggest enabling. During system startup, you may expect an error, +# if the dependency is not fulfilled. +# (b) Specifying the init script ordering, not real (hard) dependencies. +# This is needed by insserv to determine which service should be +# started first (and at a later stage what services can be started +# in parallel). The tag Should-Start: is used for this. +# It tells, that if a service is available, it should be started +# before. If not, never mind. +# * When specifying hard dependencies or ordering requirements, you can +# use names of services (contents of their Provides: section) +# or pseudo names starting with a $. The following ones are available +# according to LSB (1.1): +# $local_fs all local file systems are mounted +# (most services should need this!) +# $remote_fs all remote file systems are mounted +# (note that /usr may be remote, so +# many services should Require this!) +# $syslog system logging facility up +# $network low level networking (eth card, ...) +# $named hostname resolution available +# $netdaemons all network daemons are running +# The $netdaemons pseudo service has been removed in LSB 1.2. +# For now, we still offer it for backward compatibility. +# These are new (LSB 1.2): +# $time the system time has been set correctly +# $portmap SunRPC portmapping service available +# UnitedLinux extensions: +# $ALL indicates that a script should be inserted +# at the end +# * The services specified in the stop tags +# (Required-Stop/Should-Stop) +# specify which services need to be still running when this service +# is shut down. Often the entries there are just copies or a subset +# from the respective start tag. +# * Should-Start/Stop are now part of LSB as of 2.0, +# formerly SUSE/Unitedlinux used X-UnitedLinux-Should-Start/-Stop. +# insserv does support both variants. +# * X-UnitedLinux-Default-Enabled: yes/no is used at installation time +# (%fillup_and_insserv macro in %post of many RPMs) to specify whether +# a startup script should default to be enabled after installation. +# It's not used by insserv. +# +# Note on runlevels: +# 0 - halt/poweroff 6 - reboot +# 1 - single user 2 - multiuser without network exported +# 3 - multiuser w/ network (text mode) 5 - multiuser w/ network and X11 (xdm) +# +# Note on script names: +# http://www.linuxbase.org/spec/refspecs/LSB_1.3.0/gLSB/gLSB/scrptnames.html +# A registry has been set up to manage the init script namespace. +# http://www.lanana.org/ +# Please use the names already registered or register one or use a +# vendor prefix. + + +# Check for missing binaries (stale symlinks should not happen) +# Note: Special treatment of stop for LSB conformance +VARNISH_BIN=/usr/sbin/varnishd +test -x $VARNISH_BIN || { echo "$VARNISH_BIN not installed"; + if [ "$1" = "stop" ]; then exit 0; + else exit 5; fi; } + +# Check for existence of needed config file and read it +VARNISH_CONFIG=/etc/sysconfig/varnish +test -r $VARNISH_CONFIG || { echo "$VARNISH_CONFIG not existing"; + if [ "$1" = "stop" ]; then exit 0; + else exit 6; fi; } + +# Read config +. $VARNISH_CONFIG + +# Source LSB init functions +# providing start_daemon, killproc, pidofproc, +# log_success_msg, log_failure_msg and log_warning_msg. +# This is currently not used by UnitedLinux based distributions and +# not needed for init scripts for UnitedLinux only. If it is used, +# the functions from rc.status should not be sourced or used. +#. /lib/lsb/init-functions + +# Shell functions sourced from /etc/rc.status: +# rc_check check and set local and overall rc status +# rc_status check and set local and overall rc status +# rc_status -v be verbose in local rc status and clear it afterwards +# rc_status -v -r ditto and clear both the local and overall rc status +# rc_status -s display "skipped" and exit with status 3 +# rc_status -u display "unused" and exit with status 3 +# rc_failed set local and overall rc status to failed +# rc_failed set local and overall rc status to +# rc_reset clear both the local and overall rc status +# rc_exit exit appropriate to overall rc status +# rc_active checks whether a service is activated by symlinks +. /etc/rc.status + +# Reset status of this service +rc_reset + +# Return values acc. to LSB for all commands but status: +# 0 - success +# 1 - generic or unspecified error +# 2 - invalid or excess argument(s) +# 3 - unimplemented feature (e.g. "reload") +# 4 - user had insufficient privileges +# 5 - program is not installed +# 6 - program is not configured +# 7 - program is not running +# 8--199 - reserved (8--99 LSB, 100--149 distrib, 150--199 appl) +# +# Note that starting an already running service, stopping +# or restarting a not-running service as well as the restart +# with force-reload (in case signaling is not supported) are +# considered a success. + +case "$1" in + start) + echo -n "Starting varnish " + ## Start daemon with startproc(8). If this fails + ## the return value is set appropriately by startproc. + /sbin/startproc $VARNISH_BIN ${VARNISHD_PARAMS:--f /etc/varnish/vcl.conf -T127.0.0.1:6082 -s file,/var/cache/varnish} + + # Remember status and be verbose + rc_status -v + ;; + stop) + echo -n "Shutting down varnish " + ## Stop daemon with killproc(8) and if this fails + ## killproc sets the return value according to LSB. + + /sbin/killproc -TERM $VARNISH_BIN + + # Remember status and be verbose + rc_status -v + ;; + try-restart|condrestart) + ## Do a restart only if the service was active before. + ## Note: try-restart is now part of LSB (as of 1.9). + ## RH has a similar command named condrestart. + if test "$1" = "condrestart"; then + echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}" + fi + $0 status + if test $? = 0; then + $0 restart + else + rc_reset # Not running is not a failure. + fi + # Remember status and be quiet + rc_status + ;; + restart) + ## Stop the service and regardless of whether it was + ## running or not, start it again. + $0 stop + $0 start + + # Remember status and be quiet + rc_status + ;; + force-reload) + ## Signal the daemon to reload its config. Most daemons + ## do this on signal 1 (SIGHUP). + ## If it does not support it, restart the service if it + ## is running. + + echo -n "Reload service varnish " + ## if it supports it: + /sbin/killproc -HUP $VARNISH_BIN + #touch /var/run/varnish.pid + rc_status -v + + ## Otherwise: + #$0 try-restart + #rc_status + ;; + reload) + ## Like force-reload, but if daemon does not support + ## signaling, do nothing (!) + + # If it supports signaling: + echo -n "Reload service varnish " + /sbin/killproc -HUP $VARNISH_BIN + #touch /var/run/varnish.pid + rc_status -v + + ## Otherwise if it does not support reload: + #rc_failed 3 + #rc_status -v + ;; + status) + echo -n "Checking for service varnish " + ## Check status with checkproc(8), if process is running + ## checkproc will return with exit status 0. + + # Return value is slightly different for the status command: + # 0 - service up and running + # 1 - service dead, but /var/run/ pid file exists + # 2 - service dead, but /var/lock/ lock file exists + # 3 - service not running (unused) + # 4 - service status unknown :-( + # 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.) + + # NOTE: checkproc returns LSB compliant status values. + /sbin/checkproc $VARNISH_BIN + # NOTE: rc_status knows that we called this init script with + # "status" option and adapts its messages accordingly. + rc_status -v + ;; + probe) + ## Optional: Probe for the necessity of a reload, print out the + ## argument to this init script which is required for a reload. + ## Note: probe is not (yet) part of LSB (as of 1.9) + + test /etc/sysconfig/varnish -nt /var/run/varnish.pid && test -f /etc/varnish/default.vcl.net -nt /var/run/varnish.pid && echo reload + ;; + *) + echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}" + exit 1 + ;; +esac +rc_exit diff --git a/varnish.spec b/varnish.spec new file mode 100644 index 0000000..e12b99b --- /dev/null +++ b/varnish.spec @@ -0,0 +1,224 @@ +# +# spec file for package varnish (Version 2.1.3) +# +# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +# norootforbuild + + +Name: varnish +Version: 2.1.3 +Release: 1 +# +License: BSD +Group: Productivity/Networking/Web/Proxy +# +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: libxslt ncurses-devel pcre-devel pkg-config +Prereq(post): /usr/sbin/useradd /usr/sbin/groupadd +%if 0%{?suse_version} +Recommends: logrotate +%endif +%define _bindir %{_sbindir} +%define pkg_home %{_var}/lib/%{name} +%define pkg_logdir %{_var}/log/%{name} +%define pkg_cachedir %{_var}/cache/%{name} +%define pkg_name %{name} +# +Url: http://www.varnish-cache.org/ +Source0: http://downloads.sourceforge.net/varnish/varnish-%{version}.tar.gz +# http://downloads.sourceforge.net/varnish/varnish-%{version}.tar.bz2 +Source1: upstream-config.tar.bz2 +Source2: varnish.init +Source3: varnish.sysconfig +# +Summary: Varnish is a high-performance HTTP accelerator + +%description +Varnish is an HTTP accelerator. An HTTP accelerator (often called Reverse +Proxy) is an application that stores (caches) documents that have been +requested over the HTTP protocol. + +Based on certain criteria the next client requesting the document is either +given the cached document, or a "fresh" document requested from a backend +server. The purpose of this is to minimize the requests going to the backend +server(s) by serving the same document to potentially many users. + + +Authors: +-------- + Poul-Henning Kamp + +%define library_name libvarnish1 + +%package -n %{library_name} + +Group: Productivity/Networking/Web/Proxy +# +Summary: Shared libraries for Varnish + +%description -n %{library_name} +Varnish is an HTTP accelerator. An HTTP accelerator (often called Reverse +Proxy) is an application that stores (caches) documents that have been +requested over the HTTP protocol. + +Based on certain criteria the next client requesting the document is either +given the cached document, or a "fresh" document requested from a backend +server. The purpose of this is to minimize the requests going to the backend +server(s) by serving the same document to potentially many users. + + +This package holds the shared libraries for varnish. + + +Authors: +-------- + Poul-Henning Kamp + + +%package devel +License: BSD +Group: Development/Libraries/C and C++ +Requires: %{name} = %{version} +# +Summary: Development files for Varnish + +%description devel +Varnish is an HTTP accelerator. An HTTP accelerator (often called Reverse +Proxy) is an application that stores (caches) documents that have been +requested over the HTTP protocol. + +Based on certain criteria the next client requesting the document is either +given the cached document, or a "fresh" document requested from a backend +server. The purpose of this is to minimize the requests going to the backend +server(s) by serving the same document to potentially many users. + + +This package holds the development files for varnish. + + +Authors: +-------- + Poul-Henning Kamp + + +%prep +%setup -qa1 +#sed -e ' s/8080/80/g ' etc/vcl.conf > redhat/vcl.conf + +%build +%if 0%{?suse_version} > 1000 +export CFLAGS="%{optflags} -fstack-protector" +%endif +%configure --disable-static --localstatedir=%{_var}/cache/ \ + --enable-debugging-symbols \ + --enable-developer-warnings +%{__make} + +%install +%makeinstall +find %{buildroot} -ls +# +# remove unneeded files +# libvarnish.la has -lrt as dependency lib +#%{__rm} -fv %{buildroot}%{_libdir}/*.la +# +##missing directories +%{__install} -d -m 0755 %{buildroot}{%{pkg_logdir},%{pkg_home}} +%{__install} -D -m 0644 redhat/varnish.logrotate %{buildroot}/etc/logrotate.d/varnish +%if 0%{?suse_version} +# +##init scripts +%{__install} -D -m 0644 %{S:3} %{buildroot}/var/adm/fillup-templates/sysconfig.%{name} +%{__install} -D -m 0755 %{S:2} %{buildroot}%{_sysconfdir}/init.d/%{name} +%{__ln_s} -f %{_sysconfdir}/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name} +# +##config files +%{__install} -D -m 0644 etc/vcl.conf %{buildroot}%{_sysconfdir}/%{name}/vcl.conf +%{__install} -D -m 0644 etc/vcl.conf %{buildroot}%{_sysconfdir}/%{name}/vcl.conf.example +%else +# +##init scripts +%{__install} -D -m 0644 redhat/varnish.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/%{name} +%{__install} -D -m 0755 redhat/varnish.initrc %{buildroot}%{_sysconfdir}/init.d/%{name} +# +##config files +%{__install} -D -m 0644 redhat/vcl.conf %{buildroot}%{_sysconfdir}/%{name}/vcl.conf +%{__install} -D -m 0644 redhat/vcl.conf %{buildroot}%{_sysconfdir}/%{name}/vcl.conf.example +%endif + +find "%buildroot" -type f -name "*.la" -delete + +%clean +%{__rm} -rf %{buildroot} + +%pre +/usr/sbin/groupadd -r %{pkg_name} 2>/dev/null || : +/usr/sbin/useradd -g %{pkg_name} -s /bin/false -r -c "user for %{pkg_name}" -d %{pkg_home} %{pkg_name} 2>/dev/null || : +%if 0%{?suse_version} + +%post +%fillup_and_insserv %{pkg_name} + +%preun +%stop_on_removal %{pkg_name} + +%postun +%restart_on_update %{pkg_name} +%{insserv_cleanup} +%else +# how to do the same for RH/mandriva? +%endif + +%post -n %{library_name} -p /sbin/ldconfig + +%postun -n %{library_name} -p /sbin/ldconfig + +%files +%defattr(-,root,root,-) +%if 0%{?suse_version} +%{_sbindir}/rc%{name} +/var/adm/fillup-templates/sysconfig.%{name} +%else +%config(noreplace) %{_sysconfdir}/sysconfig/%{name} +%endif +%config(noreplace) %{_sysconfdir}/init.d/%{name} +# +%dir %attr(750,%{pkg_name},%{pkg_name}) %{_sysconfdir}/%{name}/ +%config(noreplace) %attr(640,%{pkg_name},%{pkg_name}) %{_sysconfdir}/%{name}/vcl.conf +%config %attr(640,%{pkg_name},%{pkg_name}) %{_sysconfdir}/%{name}/vcl.conf.example +%config(noreplace) %attr(640,%{pkg_name},%{pkg_name}) %{_sysconfdir}/%{name}/default.vcl +# +%_sbindir/* +%doc %_mandir/*/* +%doc ChangeLog LICENSE README +%if ! 0%{?suse_version} +%doc redhat/README.redhat +%endif +%dir %attr(750,%{pkg_name},%{pkg_name}) %{pkg_home} +%dir %attr(750,%{pkg_name},%{pkg_name}) %{pkg_cachedir} +%config(noreplace) /etc/logrotate.d/varnish + +%files -n %{library_name} +%defattr(-,root,root,-) +%_libdir/*.so.* + +%files devel +%defattr(-,root,root,-) +%{_includedir}/varnish/ +%{_libdir}/pkgconfig/* +%{_libdir}/*.so + +%changelog diff --git a/varnish.sysconfig b/varnish.sysconfig new file mode 100644 index 0000000..be96443 --- /dev/null +++ b/varnish.sysconfig @@ -0,0 +1,13 @@ +## Path: Network/WWW/Varnishd +## Description: start parameters for varnishd. +## Type: string +## Default: "-f /etc/varnish/vcl.conf -T127.0.0.1:6082 -s file,/var/cache/varnish" +## Config: varnishd +# +# start parameters for varnishd. +# +# see man 1 varnishd for more +# +# You might want to keep "/var/cache/varnish" when using the file backend. +# +VARNISHD_PARAMS="-f /etc/varnish/vcl.conf -T127.0.0.1:6082 -s file,/var/cache/varnish,524288"