diff --git a/.gitignore b/.gitignore index 507f074..23788ae 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ varnish-2.1.3.tar.gz /varnish-4.0.0.tar.gz /varnish-4.0.1.tar.gz /varnish-4.0.2.tar.gz +/varnish-4.0.3.tar.gz diff --git a/sources b/sources index be98fdf..37b4c22 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -bf86f3630605c273b1bbadbbe518237a varnish-4.0.2.tar.gz +16a683f2e41f7d80219cec5d4649380c varnish-4.0.3.tar.gz diff --git a/varnish-4.0.3_fix_Werror_el6.patch b/varnish-4.0.3_fix_Werror_el6.patch new file mode 100644 index 0000000..277795a --- /dev/null +++ b/varnish-4.0.3_fix_Werror_el6.patch @@ -0,0 +1,11 @@ +--- configure.old 2015-03-05 13:20:10.546649666 +0100 ++++ configure 2015-03-05 13:20:14.099663485 +0100 +@@ -16794,7 +16794,7 @@ + # The reason for -Wno-error=unused-result is a glibc/gcc interaction + # idiocy where write is marked as warn_unused_result, causing build + # failures. +-CFLAGS="${CFLAGS} -Wall -Werror" ++#CFLAGS="${CFLAGS} -Wall -Werror" + OCFLAGS="${OCFLAGS} -Wall -Werror" + as_CACHEVAR=`$as_echo "ax_cv_check_cflags__-Werror=unused-result" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Werror=unused-result" >&5 diff --git a/varnish-4.0.3_fix_python24.el5.patch b/varnish-4.0.3_fix_python24.el5.patch new file mode 100644 index 0000000..24206f6 --- /dev/null +++ b/varnish-4.0.3_fix_python24.el5.patch @@ -0,0 +1,77 @@ +--- lib/libvcc/vmodtool.py.orig 2015-03-05 14:20:35.982791597 +0100 ++++ lib/libvcc/vmodtool.py 2015-03-05 14:34:46.896115280 +0100 +@@ -33,8 +33,8 @@ + vmod_${name}.rst -- Extracted documentation + """ + +-# This script should work with both Python 2 and Python 3. +-from __future__ import print_function ++## This script should work with both Python 2 and Python 3. ++#from __future__ import print_function + + import sys + import re +@@ -67,6 +67,15 @@ + + ####################################################################### + ++# __future__ print_function is not available on python2.4 in rhel5, so ++# make a local simple variant _print ++ ++def _print(*objects, **kwargs): ++ sep = kwargs.get('sep', ' ') ++ end = kwargs.get('end', '\n') ++ out = kwargs.get('file', sys.stdout) ++ out.write(sep.join(objects) + end) ++ + def write_file_warning(fo, a, b, c): + fo.write(a + "\n") + fo.write(b + " NB: This file is machine generated, DO NOT EDIT!\n") +@@ -741,8 +750,8 @@ + if opts.strict: + raise FormatError(m, details) + else: +- print("WARNING: %s:" % m, file=sys.stderr) +- print(details, file=sys.stderr) ++ _print("WARNING: %s:" % m, file=sys.stderr) ++ _print(details, file=sys.stderr) + else: + for ln, i in self.l: + o.doc(i) +@@ -784,9 +793,12 @@ + def runmain(inputvcc, outputname="vcc_if"): + # Read the file in + lines = [] +- with open(inputvcc, "r") as fp: ++ fp = open(inputvcc, "r") ++ try: + for i in fp: + lines.append(i.rstrip()) ++ finally: ++ fp.close + ln = 0 + + ####################################################################### +@@ -839,11 +851,11 @@ + for i in sl: + i.parse(vx) + assert len(i.tl) == 0 +- except ParseError as e: ++ except ParseError, e: + print("ERROR: Parse error reading \"%s\":" % inputvcc) + pprint(str(e)) + exit(-1) +- except FormatError as e: ++ except FormatError, e: + print("ERROR: Format error reading \"%s\": %s" % + (inputvcc, pformat(e.msg))) + print(e.details) +@@ -916,7 +928,7 @@ + if not i_vcc: + i_vcc = "vmod.vcc" + else: +- print("ERROR: No vmod.vcc file supplied or found.", ++ _print("ERROR: No vmod.vcc file supplied or found.", + file=sys.stderr) + oparser.print_help() + exit(-1) diff --git a/varnish.spec b/varnish.spec index b8228f7..2558726 100644 --- a/varnish.spec +++ b/varnish.spec @@ -5,7 +5,7 @@ %define __find_provides %{_builddir}/%{name}-%{version}%{?v_rc:-%{?v_rc}}/redhat/find-provides Summary: High-performance HTTP accelerator Name: varnish -Version: 4.0.2 +Version: 4.0.3 Release: 1%{?v_rc}%{?dist} License: BSD Group: System Environment/Daemons @@ -15,8 +15,8 @@ Source0: http://repo.varnish-cache.org/source/%{name}-%{version}.tar.gz #Source0: %{name}-trunk.tar.gz #Source0: http://repo.varnish-cache.org/snapshots/%{name}-%{version}%{?vd_rc}.tar.gz Patch1: varnish-4.0.2.fix_ld_library_path_in_sphinx_build.patch -Patch2: varnish-4.0.1_fix_Werror_el6.patch -Patch3: varnish-4.0.2-systemd_service_fixes.patch +Patch2: varnish-4.0.3_fix_Werror_el6.patch +Patch3: varnish-4.0.3_fix_python24.el5.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # To build from git, start with a make dist, see redhat/README.redhat # You will need at least automake autoconf libtool python-docutils @@ -97,13 +97,20 @@ Documentation files for %name %if 0%{?rhel} <= 6 && 0%{?fedora} <= 12 %patch2 -p0 %endif -%patch3 -p1 +%if 0%{?rhel} <= 5 && 0%{?fedora} <= 12 +%patch3 -p0 +%endif %build #export CFLAGS="$CFLAGS -Wp,-D_FORTIFY_SOURCE=0" # Remove "--disable static" if you want to build static libraries -%configure --disable-static --localstatedir=/var/lib --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} +%configure --disable-static \ +%if 0%{?rhel} <= 5 && 0%{?fedora} <= 12 + --with-rst2man=/bin/true \ +%endif + --localstatedir=/var/lib \ + --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} # We have to remove rpath - not allowed in Fedora # (This problem only visible on 64 bit arches) @@ -279,7 +286,7 @@ test -f /etc/varnish/secret || (uuidgen > /etc/varnish/secret && chmod 0600 /etc if [ $1 -lt 1 ]; then # Package removal, not upgrade - %if 0%{?fedora} >= 17 + %if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 /bin/systemctl --no-reload disable varnish.service > /dev/null 2>&1 || : /bin/systemctl stop varnish.service > /dev/null 2>&1 || : %else @@ -302,6 +309,12 @@ fi %endif %changelog +* Thu Mar 05 2015 Ingvar Hagelund 4.0.3-1 +- New upstream release +- Removed systemd patch included upstream +- Rebased trivial Werr-patch for varnish-4.0.3 +- Added patch to build on el5 + * Tue Nov 25 2014 Ingvar Hagelund 4.0.2-1 - New upstream release - Rebased sphinx makefile patch