diff --git a/.cvsignore b/.cvsignore index e795082..4522888 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -varnish-2.1.tar.gz +varnish-2.1.1.tar.gz diff --git a/sources b/sources index 5c0e157..004152b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -91d92ea69f7dce470e55ef4721ef9b7d varnish-2.1.tar.gz +2dec86e24915aa8d427584f671d25f40 varnish-2.1.1.tar.gz diff --git a/varnish.from_r4750_fixes_lowspec_buildhost.patch b/varnish.from_r4750_fixes_lowspec_buildhost.patch new file mode 100644 index 0000000..0cff1e3 --- /dev/null +++ b/varnish.from_r4750_fixes_lowspec_buildhost.patch @@ -0,0 +1,170 @@ +diff -Naur ../varnish-2.1.1.orig/bin/varnishtest/tests/b00000.vtc ./bin/varnishtest/tests/b00000.vtc +--- ../varnish-2.1.1.orig/bin/varnishtest/tests/b00000.vtc 2010-04-26 10:50:52.000000000 +0200 ++++ ./bin/varnishtest/tests/b00000.vtc 2010-04-30 10:58:57.199838479 +0200 +@@ -9,7 +9,7 @@ + txresp -body "012345\n" + } -start + +-varnish v1 -arg "-smalloc,1m" -vcl+backend {} -start ++varnish v1 -storage "-smalloc,1m" -vcl+backend {} -start + + varnish v1 -cliok "param.set diag_bitmap 0x2" + +diff -Naur ../varnish-2.1.1.orig/bin/varnishtest/tests/p00000.vtc ./bin/varnishtest/tests/p00000.vtc +--- ../varnish-2.1.1.orig/bin/varnishtest/tests/p00000.vtc 2010-04-26 10:50:52.000000000 +0200 ++++ ./bin/varnishtest/tests/p00000.vtc 2010-04-30 10:58:57.150839765 +0200 +@@ -11,7 +11,8 @@ + + varnish v1 \ + -arg "-pdiag_bitmap=0x20000" \ +- -arg "-spersistent,${tmpdir}/_.per,10m" -vcl+backend { } -start ++ -storage "-spersistent,${tmpdir}/_.per,10m" \ ++ -vcl+backend { } -start + + varnish v1 -stop + +diff -Naur ../varnish-2.1.1.orig/bin/varnishtest/tests/p00001.vtc ./bin/varnishtest/tests/p00001.vtc +--- ../varnish-2.1.1.orig/bin/varnishtest/tests/p00001.vtc 2010-04-26 10:50:52.000000000 +0200 ++++ ./bin/varnishtest/tests/p00001.vtc 2010-04-30 11:05:26.478837801 +0200 +@@ -11,7 +11,8 @@ + + varnish v1 \ + -arg "-pdiag_bitmap=0x20000" \ +- -arg "-spersistent,${tmpdir}/_.per,10m" -vcl+backend { } -start ++ -storage "-spersistent,${tmpdir}/_.per,10m" \ ++ -vcl+backend { } -start + + client c1 { + txreq -url "/" +diff -Naur ../varnish-2.1.1.orig/bin/varnishtest/tests/p00002.vtc ./bin/varnishtest/tests/p00002.vtc +--- ../varnish-2.1.1.orig/bin/varnishtest/tests/p00002.vtc 2010-04-26 10:50:52.000000000 +0200 ++++ ./bin/varnishtest/tests/p00002.vtc 2010-04-30 10:58:57.151838730 +0200 +@@ -11,8 +11,8 @@ + + varnish v1 \ + -arg "-pdiag_bitmap=0x20000" \ +- -arg "-spersistent,${tmpdir}/_.per1,10m" \ +- -arg "-spersistent,${tmpdir}/_.per2,10m" \ ++ -storage "-spersistent,${tmpdir}/_.per1,10m" \ ++ -storage "-spersistent,${tmpdir}/_.per2,10m" \ + -vcl+backend { } -start + + client c1 { +diff -Naur ../varnish-2.1.1.orig/bin/varnishtest/tests/p00003.vtc ./bin/varnishtest/tests/p00003.vtc +--- ../varnish-2.1.1.orig/bin/varnishtest/tests/p00003.vtc 2010-04-26 10:50:52.000000000 +0200 ++++ ./bin/varnishtest/tests/p00003.vtc 2010-04-30 11:06:28.054838375 +0200 +@@ -11,7 +11,7 @@ + + varnish v1 \ + -arg "-pdiag_bitmap=0x20000" \ +- -arg "-spersistent,${tmpdir}/_.per,10m" \ ++ -storage "-spersistent,${tmpdir}/_.per,10m" \ + -vcl+backend { } -start + + varnish v1 -cliok purge.list +diff -Naur ../varnish-2.1.1.orig/bin/varnishtest/tests/p00004.vtc ./bin/varnishtest/tests/p00004.vtc +--- ../varnish-2.1.1.orig/bin/varnishtest/tests/p00004.vtc 2010-04-26 10:50:52.000000000 +0200 ++++ ./bin/varnishtest/tests/p00004.vtc 2010-04-30 11:03:35.717837935 +0200 +@@ -13,7 +13,7 @@ + + varnish v1 \ + -arg "-pdiag_bitmap=0x20000" \ +- -arg "-spersistent,${tmpdir}/_.per,10m" \ ++ -storage "-spersistent,${tmpdir}/_.per,10m" \ + -vcl+backend { } -start + + client c1 { +diff -Naur ../varnish-2.1.1.orig/bin/varnishtest/tests/p00005.vtc ./bin/varnishtest/tests/p00005.vtc +--- ../varnish-2.1.1.orig/bin/varnishtest/tests/p00005.vtc 2010-04-26 10:50:52.000000000 +0200 ++++ ./bin/varnishtest/tests/p00005.vtc 2010-04-30 11:06:59.774838225 +0200 +@@ -11,7 +11,7 @@ + + varnish v1 \ + -arg "-pdiag_bitmap=0x30000" \ +- -arg "-spersistent,${tmpdir}/_.per,10m" \ ++ -storage "-spersistent,${tmpdir}/_.per,10m" \ + -vcl+backend { + sub vcl_fetch { + set beresp.ttl = 3s; +diff -Naur ../varnish-2.1.1.orig/bin/varnishtest/tests/p00006.vtc ./bin/varnishtest/tests/p00006.vtc +--- ../varnish-2.1.1.orig/bin/varnishtest/tests/p00006.vtc 2010-04-26 10:50:52.000000000 +0200 ++++ ./bin/varnishtest/tests/p00006.vtc 2010-04-30 11:04:20.310962837 +0200 +@@ -13,7 +13,7 @@ + + + varnish v1 \ +- -arg "-spersistent,${tmpdir}/_.per,10m" \ ++ -storage "-spersistent,${tmpdir}/_.per,10m" \ + -vcl+backend { } -start + + client c1 { +diff -Naur ../varnish-2.1.1.orig/bin/varnishtest/tests/v00010.vtc ./bin/varnishtest/tests/v00010.vtc +--- ../varnish-2.1.1.orig/bin/varnishtest/tests/v00010.vtc 2010-04-26 10:50:52.000000000 +0200 ++++ ./bin/varnishtest/tests/v00010.vtc 2010-04-30 10:58:57.199838479 +0200 +@@ -13,7 +13,7 @@ + txresp -hdr "Foo: foo" -body "abcdef\n" + } -start + +-varnish v1 -arg "-smalloc,1m" -vcl+backend { ++varnish v1 -storage "-smalloc,1m" -vcl+backend { + + sub vcl_fetch { + if (beresp.http.panic) { +diff -Naur ../varnish-2.1.1.orig/bin/varnishtest/vtc_varnish.c ./bin/varnishtest/vtc_varnish.c +--- ../varnish-2.1.1.orig/bin/varnishtest/vtc_varnish.c 2010-04-26 10:50:52.000000000 +0200 ++++ ./bin/varnishtest/vtc_varnish.c 2010-04-30 10:58:57.261838026 +0200 +@@ -33,6 +33,7 @@ + + #include + ++#include + #include + #include + #include +@@ -68,6 +69,8 @@ + + struct varnish_stats *stats; + ++ struct vsb *storage; ++ + struct vsb *args; + int fds[4]; + pid_t pid; +@@ -171,9 +174,15 @@ + vtc_log(v->vl, 0, "Varnish name must start with 'v'"); + + v->args = vsb_newauto(); ++ ++ v->storage = vsb_newauto(); ++ vsb_printf(v->storage, "-sfile,%s,10M", v->workdir); ++ vsb_finish(v->storage); ++ + v->cli_fd = -1; + VTAILQ_INSERT_TAIL(&varnishes, v, list); + ++ + return (v); + } + +@@ -269,6 +278,7 @@ + vsb_printf(vsb, " -S %s/_S", v->workdir); + vsb_printf(vsb, " -M %s:%s", abuf, pbuf); + vsb_printf(vsb, " -P %s/varnishd.pid", v->workdir); ++ vsb_printf(vsb, " %s", vsb_data(v->storage)); + vsb_printf(vsb, " %s", vsb_data(v->args)); + vsb_finish(vsb); + AZ(vsb_overflowed(vsb)); +@@ -663,6 +673,13 @@ + for (; *av != NULL; av++) { + if (vtc_error) + break; ++ if (!strcmp(*av, "-storage")) { ++ vsb_clear(v->storage); ++ vsb_cat(v->storage, av[1]); ++ vsb_finish(v->storage); ++ av++; ++ continue; ++ } + if (!strcmp(*av, "-arg")) { + AN(av[1]); + AZ(v->pid); diff --git a/varnish.spec b/varnish.spec index 9282f91..4b922f5 100644 --- a/varnish.spec +++ b/varnish.spec @@ -1,19 +1,17 @@ Summary: High-performance HTTP accelerator Name: varnish -Version: 2.1.0 -Release: 2%{?dist} +Version: 2.1.1 +Release: 1%{?dist} License: BSD Group: System Environment/Daemons URL: http://www.varnish-cache.org/ -#Source0: http://downloads.sourceforge.net/varnish/varnish-%{version}.tar.gz -Source0: http://downloads.sourceforge.net/varnish/varnish-2.1.tar.gz -patch0: varnish.S-option.patch -patch1: varnish.floor.patch -patch2: varnish.changes-2.1.0.patch +Source0: http://downloads.sourceforge.net/varnish/varnish-%{version}.tar.gz +Patch0: varnish.v00002fix.patch +Patch1: varnish.from_r4750_fixes_lowspec_buildhost.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # The svn sources needs autoconf, automake and libtool to generate a suitable # configure script. Release tarballs would not need this -BuildRequires: automake autoconf libtool +#BuildRequires: automake autoconf libtool BuildRequires: ncurses-devel libxslt groff pcre-devel pkgconfig Requires: varnish-libs = %{version}-%{release} Requires: logrotate @@ -65,21 +63,16 @@ Varnish is a high-performance HTTP accelerator #Varnish is a high-performance HTTP accelerator %prep -#%setup -q -%setup -q -n varnish-2.1 +%setup -q #%setup -q -n varnish-cache +%patch0 +%patch1 + # The svn sources needs to generate a suitable configure script # Release tarballs would not need this #./autogen.sh -%patch0 -%patch1 -%patch2 - -# Makefile.am was patched. Needs to rerun autoconf -./autogen.sh - # Hack to get 32- and 64-bits tests run concurrently on the same build machine case `uname -m` in ppc64 | s390x | x86_64 | sparc64 ) @@ -100,6 +93,12 @@ cp bin/varnishd/default.vcl etc/zope-plone.vcl examples %build +# No pkgconfig/libpcre.pc in rhel4 +%if 0%{?rhel} == 4 + export PCRE_CFLAGS=`pcre-config --cflags` + export PCRE_LIBS=`pcre-config --libs` +%endif + # Remove "--disable static" if you want to build static libraries # jemalloc is not compatible with Red Hat's ppc* RHEL5 kernel koji server :-( %ifarch ppc64 ppc @@ -111,11 +110,6 @@ cp bin/varnishd/default.vcl etc/zope-plone.vcl examples %configure --disable-static --localstatedir=/var/lib %endif -# Have to regenerate the docs because of patched doc/changes-2.0.6-2.1.0.xml -pushd doc/ -make clean -popd - # We have to remove rpath - not allowed in Fedora # (This problem only visible on 64 bit arches) sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g; @@ -263,6 +257,13 @@ fi %postun libs -p /sbin/ldconfig %changelog +* Tue Apr 27 2010 Ingvar Hagelund - 2.1.1-1 +- New upstream release +- Added a fix for missing pkgconfig/libpcre.pc on rhel4 +- Added a patch from trunk making the rpm buildable on lowspec + build hosts (like Red Hat's ppc build farm nodes) +- Removed patches that are merged upstream + * Wed Apr 14 2010 Ingvar Hagelund - 2.1.0-2 - Added a patch from svn that fixes changes-2.0.6-2.1.0.xml diff --git a/varnish.v00002fix.patch b/varnish.v00002fix.patch new file mode 100644 index 0000000..be36f2a --- /dev/null +++ b/varnish.v00002fix.patch @@ -0,0 +1,13 @@ +Index: bin/varnishtest/tests/v00002.vtc +=================================================================== +--- bin/varnishtest/tests/v00002.vtc (revision 4730) ++++ bin/varnishtest/tests/v00002.vtc (revision 4731) +@@ -114,7 +114,7 @@ + + varnish v1 -badvcl { + /* too many IP numbers */ +- backend b1 { .host = "cnn.com"; } ++ backend b1 { .host = "v00002.freebsd.dk"; } + } + + varnish v1 -badvcl {