From 10579818e351bd91b7b4f28663f360fbac29f889 Mon Sep 17 00:00:00 2001 From: James Antill Date: Mon, 8 Aug 2022 14:10:15 -0400 Subject: [PATCH] Import rpm: fa35ce6118b0d9786b6830afe1ec1fc15eacaec3 --- .gitignore | 2 + gating.yaml | 9 + sources | 2 + varnish-4.0.3_fix_varnish4_selinux.el6.patch | 17 + varnish-4.1.0.fix_find-provides.patch | 11 + ...1.1.fix_ld_library_path_in_doc_build.patch | 52 + varnish-5.1.1.fix_python_version.patch | 62 + varnish-5.2.1-python3.patch | 66 ++ varnish-6.0.0.fix_el6_fortify_source.patch | 20 + varnish-6.0.1_fix_bug2668.patch | 96 ++ ...1.0_fix_ld_library_path_in_doc_build.patch | 53 + varnish-6.1.0_fix_testu00008.patch | 13 + varnish-6.1.1_fix_issue_2912.patch | 115 ++ ...1.1_fix_ld_library_path_in_doc_build.patch | 68 ++ varnish-6.1.1_fix_upstrbug_2879.patch | 39 + ...h-6.2.0_el6_fix_warning_from_old_gcc.patch | 73 ++ varnish-6.2.0_fix_ppc64_for_test_c00057.patch | 40 + ...h-6.3.0_el6_fix_warning_from_old_gcc.patch | 79 ++ varnish-6.3.2_fix_s390x.patch | 19 + ...h-6.4.0_el6_fix_warning_from_old_gcc.patch | 67 ++ ...h-6.5.0_el6_fix_warning_from_old_gcc.patch | 78 ++ varnish.params | 40 + varnish.service | 47 + varnish.spec | 1036 +++++++++++++++++ varnishlog.service | 11 + varnishncsa.service | 11 + vsv00002_test.patch | 11 + 27 files changed, 2137 insertions(+) create mode 100644 .gitignore create mode 100644 gating.yaml create mode 100644 sources create mode 100644 varnish-4.0.3_fix_varnish4_selinux.el6.patch create mode 100644 varnish-4.1.0.fix_find-provides.patch create mode 100644 varnish-5.1.1.fix_ld_library_path_in_doc_build.patch create mode 100644 varnish-5.1.1.fix_python_version.patch create mode 100644 varnish-5.2.1-python3.patch create mode 100644 varnish-6.0.0.fix_el6_fortify_source.patch create mode 100644 varnish-6.0.1_fix_bug2668.patch create mode 100644 varnish-6.1.0_fix_ld_library_path_in_doc_build.patch create mode 100644 varnish-6.1.0_fix_testu00008.patch create mode 100644 varnish-6.1.1_fix_issue_2912.patch create mode 100644 varnish-6.1.1_fix_ld_library_path_in_doc_build.patch create mode 100644 varnish-6.1.1_fix_upstrbug_2879.patch create mode 100644 varnish-6.2.0_el6_fix_warning_from_old_gcc.patch create mode 100644 varnish-6.2.0_fix_ppc64_for_test_c00057.patch create mode 100644 varnish-6.3.0_el6_fix_warning_from_old_gcc.patch create mode 100644 varnish-6.3.2_fix_s390x.patch create mode 100644 varnish-6.4.0_el6_fix_warning_from_old_gcc.patch create mode 100644 varnish-6.5.0_el6_fix_warning_from_old_gcc.patch create mode 100644 varnish.params create mode 100644 varnish.service create mode 100644 varnish.spec create mode 100644 varnishlog.service create mode 100644 varnishncsa.service create mode 100644 vsv00002_test.patch diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..84741e1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +SOURCES/pkg-varnish-cache-0ad2f22.tar.gz +SOURCES/varnish-6.0.8.tgz diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..2e4e68f --- /dev/null +++ b/gating.yaml @@ -0,0 +1,9 @@ +--- !Policy +product_versions: + - rhel-9 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional} + - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier2.functional} + - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier3.functional} + - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.acceptance-tier.functional} diff --git a/sources b/sources new file mode 100644 index 0000000..1774a2b --- /dev/null +++ b/sources @@ -0,0 +1,2 @@ +SHA1 (pkg-varnish-cache-0ad2f22.tar.gz) = db2cd6c296e7f19d65c09e642b7011338d9d0e04 +SHA1 (varnish-6.0.8.tgz) = 7c5e50eabcd3c0ddb6c463ba4645678a2f71233a diff --git a/varnish-4.0.3_fix_varnish4_selinux.el6.patch b/varnish-4.0.3_fix_varnish4_selinux.el6.patch new file mode 100644 index 0000000..2a8deed --- /dev/null +++ b/varnish-4.0.3_fix_varnish4_selinux.el6.patch @@ -0,0 +1,17 @@ +diff -Nur ../varnish-4.0.3_pre_selinux/selinux/varnish4.te ./selinux/varnish4.te +--- ../varnish-4.0.3_pre_selinux/selinux/varnish4.te 1970-01-01 01:00:00.000000000 +0100 ++++ ./selinux/varnish4.te 2015-03-06 10:00:00.015151633 +0100 +@@ -0,0 +1,13 @@ ++ ++module varnish4 1.0; ++ ++require { ++ type varnishd_t; ++ class capability { fowner chown fsetid }; ++} ++ ++#============= varnishd_t ============== ++allow varnishd_t self:capability fowner; ++allow varnishd_t self:capability chown; ++allow varnishd_t self:capability fsetid; ++ diff --git a/varnish-4.1.0.fix_find-provides.patch b/varnish-4.1.0.fix_find-provides.patch new file mode 100644 index 0000000..521a175 --- /dev/null +++ b/varnish-4.1.0.fix_find-provides.patch @@ -0,0 +1,11 @@ +--- redhat/find-provides.orig 2015-10-04 16:55:34.057574682 +0200 ++++ redhat/find-provides 2015-10-04 16:56:04.120280796 +0200 +@@ -9,8 +9,6 @@ + /usr/lib/rpm/find-provides "$@" + fi + +-# We don't install vcs_version.h, so we can't use RPM_BUILD_ROOT directly. +-cd /builddir/build/BUILD/varnish* || true + cd ${RPM_BUILD_ROOT}/../../BUILD/varnish* || true + + printf '#include "vcs_version.h"\nVCS_Version\n' \ diff --git a/varnish-5.1.1.fix_ld_library_path_in_doc_build.patch b/varnish-5.1.1.fix_ld_library_path_in_doc_build.patch new file mode 100644 index 0000000..5a98fa4 --- /dev/null +++ b/varnish-5.1.1.fix_ld_library_path_in_doc_build.patch @@ -0,0 +1,52 @@ +diff --git a/doc/sphinx/Makefile.in b/doc/sphinx/Makefile.in +index 0819064..11e4ba2 100644 +--- a/doc/sphinx/Makefile.in ++++ b/doc/sphinx/Makefile.in +@@ -659,37 +659,47 @@ include/counters.rst: $(top_srcdir)/lib/libvcc/vsctool.py $(COUNTERS) + # XXX add varnishstat here when it's been _opt2rst'ed + + include/varnishncsa_options.rst: $(top_builddir)/bin/varnishncsa/varnishncsa ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishncsa/varnishncsa --options > ${@}_ + mv ${@}_ ${@} + include/varnishncsa_synopsis.rst: $(top_builddir)/bin/varnishncsa/varnishncsa ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishncsa/varnishncsa --synopsis > ${@}_ + mv ${@}_ ${@} + + include/varnishlog_options.rst: $(top_builddir)/bin/varnishlog/varnishlog ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishlog/varnishlog --options > ${@}_ + mv ${@}_ ${@} + include/varnishlog_synopsis.rst: $(top_builddir)/bin/varnishlog/varnishlog ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishlog/varnishlog --synopsis > ${@}_ + mv ${@}_ ${@} + + include/varnishtop_options.rst: $(top_builddir)/bin/varnishtop/varnishtop ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishtop/varnishtop --options > ${@}_ + mv ${@}_ ${@} + include/varnishtop_synopsis.rst: $(top_builddir)/bin/varnishtop/varnishtop ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishtop/varnishtop --synopsis > ${@}_ + mv ${@}_ ${@} + + include/varnishhist_options.rst: $(top_builddir)/bin/varnishhist/varnishhist ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishhist/varnishhist --options > ${@}_ + mv ${@}_ ${@} + include/varnishhist_synopsis.rst: $(top_builddir)/bin/varnishhist/varnishhist ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishhist/varnishhist --synopsis > ${@}_ + mv ${@}_ ${@} + + include/varnishstat_options.rst: $(top_builddir)/bin/varnishstat/varnishstat ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishstat/varnishstat --options > ${@}_ + mv ${@}_ ${@} + include/varnishstat_synopsis.rst: $(top_builddir)/bin/varnishstat/varnishstat ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishstat/varnishstat --synopsis > ${@}_ + mv ${@}_ ${@} + diff --git a/varnish-5.1.1.fix_python_version.patch b/varnish-5.1.1.fix_python_version.patch new file mode 100644 index 0000000..5d682a4 --- /dev/null +++ b/varnish-5.1.1.fix_python_version.patch @@ -0,0 +1,62 @@ +--- configure.orig 2017-03-18 02:53:31.235204299 +0100 ++++ configure 2017-03-18 02:54:54.229053852 +0100 +@@ -13545,13 +13545,13 @@ + + if test -n "$PYTHON"; then + # If the user set $PYTHON, use it and don't search something else. +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version is >= 2.7" >&5 +-$as_echo_n "checking whether $PYTHON version is >= 2.7... " >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version is >= 2.4" >&5 ++$as_echo_n "checking whether $PYTHON version is >= 2.4... " >&6; } + prog="import sys + # split strings by '.' and convert to numeric. Append some zeros + # because we need at least 4 digits for the hex conversion. + # map returns an iterator in Python 3.0 and a list in 2.x +-minver = list(map(int, '2.7'.split('.'))) + [0, 0, 0] ++minver = list(map(int, '2.4'.split('.'))) + [0, 0, 0] + minverhex = 0 + # xrange is not present in Python 3.0 and range returns an iterator + for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] +@@ -13572,8 +13572,8 @@ + else + # Otherwise, try each interpreter until we find one that satisfies + # VERSION. +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= 2.7" >&5 +-$as_echo_n "checking for a Python interpreter with version >= 2.7... " >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= 2.4" >&5 ++$as_echo_n "checking for a Python interpreter with version >= 2.4... " >&6; } + if ${am_cv_pathless_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 + else +@@ -13584,7 +13584,7 @@ + # split strings by '.' and convert to numeric. Append some zeros + # because we need at least 4 digits for the hex conversion. + # map returns an iterator in Python 3.0 and a list in 2.x +-minver = list(map(int, '2.7'.split('.'))) + [0, 0, 0] ++minver = list(map(int, '2.4'.split('.'))) + [0, 0, 0] + minverhex = 0 + # xrange is not present in Python 3.0 and range returns an iterator + for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] +@@ -13651,7 +13651,7 @@ + + if test "$PYTHON" = :; then + +- as_fn_error $? "Python >= 2.7 is required." "$LINENO" 5 ++ as_fn_error $? "Python >= 2.4 is required." "$LINENO" 5 + + else + +@@ -13698,11 +13698,11 @@ + can_use_sysconfig = 0 + else: + can_use_sysconfig = 1 +-# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs: ++# Can't use sysconfig in CPython 2.4, since it's broken in virtualenvs: + # + try: + from platform import python_implementation +- if python_implementation() == 'CPython' and sys.version[:3] == '2.7': ++ if python_implementation() == 'CPython' and sys.version[:3] == '2.4': + can_use_sysconfig = 0 + except ImportError: + pass" diff --git a/varnish-5.2.1-python3.patch b/varnish-5.2.1-python3.patch new file mode 100644 index 0000000..f83385a --- /dev/null +++ b/varnish-5.2.1-python3.patch @@ -0,0 +1,66 @@ +From 17c92e43fda114bf5341e51d752e882238b8fe8c Mon Sep 17 00:00:00 2001 +From: Nils Goroll +Date: Thu, 5 Oct 2017 13:39:23 +0200 +Subject: [PATCH] hack up vsctool to work with python 2 and 3 + +StringIO does not exist any more in python3, yet requiring 2.7 would +not pave the path forward, so try to be compatible with both. + +Works for me on Python 2.7.9 and Python 3.4 + +I would appreciate if someone more fluent in serpentinous programming +language reviewed and/or rewrote this. +--- + lib/libvcc/vsctool.py | 24 ++++++++++++++++++++---- + 1 file changed, 20 insertions(+), 4 deletions(-) + +diff --git a/lib/libvcc/vsctool.py b/lib/libvcc/vsctool.py +index 854968e3b..829c6e518 100644 +--- a/lib/libvcc/vsctool.py ++++ b/lib/libvcc/vsctool.py +@@ -37,7 +37,10 @@ + import json + import sys + import gzip +-import StringIO ++try: ++ import StringIO ++except ImportError: ++ import io + import collections + import struct + +@@ -54,9 +57,22 @@ + "format": [ "integer", FORMATS], + } + ++# http://python3porting.com/problems.html#bytes-strings-and-unicode ++if sys.version_info < (3,): ++ def b(x): ++ return x ++else: ++ import codecs ++ def b(x): ++ return codecs.latin_1_encode(x)[0] ++ + def gzip_str(s): +- out = StringIO.StringIO() +- gzip.GzipFile(fileobj=out, mode="w").write(s) ++ try: ++ out = StringIO.StringIO() ++ except NameError: ++ out = io.BytesIO() ++ ++ gzip.GzipFile(fileobj=out, mode="w").write(b(s)) + out.seek(4) + out.write(struct.pack("vl, 4, "stdout", buf, i); + else if (p->log == 3) + vtc_hexdump(p->vl, 4, "stdout", buf, i); +- (void)write(p->f_stdout, buf, i); ++ assert(write(p->f_stdout, buf, i) == i); + Term_Feed(p->term, buf, buf + i); + return (0); + } +@@ -239,7 +239,7 @@ + p->stderr_bytes += i; + AZ(pthread_mutex_unlock(&p->mtx)); + vtc_dump(p->vl, 4, "stderr", buf, i); +- (void)write(p->f_stderr, buf, i); ++ assert(write(p->f_stdout, buf, i) == i); + return (0); + } + diff --git a/varnish-6.0.1_fix_bug2668.patch b/varnish-6.0.1_fix_bug2668.patch new file mode 100644 index 0000000..93539fa --- /dev/null +++ b/varnish-6.0.1_fix_bug2668.patch @@ -0,0 +1,96 @@ +Based on fix for upstream bug #2668, see +https://github.com/varnishcache/varnish-cache/commit/9bdc5f75d661a1659c4df60799612a7524a6caa7 + + +diff -Naur ../varnish-6.0.1.orig/bin/varnishtest/gensequences ./bin/varnishtest/gensequences +--- ../varnish-6.0.1.orig/bin/varnishtest/gensequences 2018-08-29 11:48:32.000000000 +0200 ++++ ./bin/varnishtest/gensequences 2018-09-27 12:18:20.946853383 +0200 +@@ -149,6 +149,7 @@ + + if (l_prefix_name[p] != "teken_state_init") { + print ""; ++ print "\tt->t_last = 0;"; + print "\tteken_state_switch(t, teken_state_init);"; + } + print "}"; +diff -Naur ../varnish-6.0.1.orig/bin/varnishtest/sequences ./bin/varnishtest/sequences +--- ../varnish-6.0.1.orig/bin/varnishtest/sequences 2018-08-29 11:48:32.000000000 +0200 ++++ ./bin/varnishtest/sequences 2018-09-27 12:18:50.193581932 +0200 +@@ -113,3 +113,6 @@ + + # VT52 compatibility + #DECID VT52 DECID ^[ Z ++ ++# ECMA-48 ++REP Repeat last graphic char ^[ [ b n +diff -Naur ../varnish-6.0.1.orig/bin/varnishtest/teken.h ./bin/varnishtest/teken.h +--- ../varnish-6.0.1.orig/bin/varnishtest/teken.h 2018-08-29 11:48:32.000000000 +0200 ++++ ./bin/varnishtest/teken.h 2018-09-27 12:18:20.947853442 +0200 +@@ -153,6 +153,7 @@ + + unsigned int t_utf8_left; + teken_char_t t_utf8_partial; ++ teken_char_t t_last; + + unsigned int t_curscs; + teken_scs_t *t_saved_curscs; +diff -Naur ../varnish-6.0.1.orig/bin/varnishtest/teken_subr.h ./bin/varnishtest/teken_subr.h +--- ../varnish-6.0.1.orig/bin/varnishtest/teken_subr.h 2018-08-29 11:48:32.000000000 +0200 ++++ ./bin/varnishtest/teken_subr.h 2018-09-27 12:18:20.947853442 +0200 +@@ -777,10 +777,11 @@ + } + + static void +-teken_subr_do_putchar(const teken_t *t, const teken_pos_t *tp, teken_char_t c, ++teken_subr_do_putchar(teken_t *t, const teken_pos_t *tp, teken_char_t c, + int width) + { + ++ t->t_last = c; + if (t->t_stateflags & TS_INSERT && + tp->tp_col < t->t_winsize.tp_col - width) { + teken_rect_t ctr; +@@ -1313,3 +1314,12 @@ + t->t_stateflags &= ~TS_WRAPPED; + teken_funcs_cursor(t); + } ++ ++static void ++teken_subr_repeat_last_graphic_char(teken_t *t, unsigned int rpts) ++{ ++ ++ for (; t->t_last != 0 && rpts > 0; rpts--) ++ teken_subr_regular_character(t, t->t_last); ++} ++ +diff -Naur ../varnish-6.0.1.orig/bin/varnishtest/tests/a00001.vtc ./bin/varnishtest/tests/a00001.vtc +--- ../varnish-6.0.1.orig/bin/varnishtest/tests/a00001.vtc 2018-08-29 11:48:32.000000000 +0200 ++++ ./bin/varnishtest/tests/a00001.vtc 2018-09-27 12:18:20.948853501 +0200 +@@ -204,6 +204,27 @@ + process p4 -expect-text 21 11 "Enter choice number (0 - 12):" + process p4 -screen_dump + ++# 11. Test non-VT100 (e.g., VT220, XTERM) terminals ++process p4 -writehex "31 31 0d" ++process p4 -expect-text 0 0 "Menu 11: Non-VT100 Tests" ++ ++process p4 -writehex "37 0d" ++process p4 -expect-text 0 0 "Menu 11.7: Miscellaneous ISO-6429 (ECMA-48) Tests" ++ ++process p4 -writehex "32 0d" ++process p4 -expect-text 0 0 "Push " ++process p4 -screen_dump ++process p4 -expect-text 20 1 "Test Repeat (REP)" ++process p4 -expect-text 1 1 " ++ " ++process p4 -expect-text 2 2 " ++ " ++process p4 -expect-text 17 17 " ++ " ++process p4 -expect-text 18 18 "*++*" ++process p4 -writehex "0d" ++process p4 -expect-text 0 0 "Menu 11.7: Miscellaneous ISO-6429 (ECMA-48) Tests" ++process p4 -writehex "30 0d" ++process p4 -expect-text 0 0 "Menu 11: Non-VT100 Tests" ++process p4 -writehex "30 0d" ++ + # 0. Exit + process p4 -writehex "30 0d" + process p4 -expect-text 12 30 "That's all, folks!" diff --git a/varnish-6.1.0_fix_ld_library_path_in_doc_build.patch b/varnish-6.1.0_fix_ld_library_path_in_doc_build.patch new file mode 100644 index 0000000..d93c49a --- /dev/null +++ b/varnish-6.1.0_fix_ld_library_path_in_doc_build.patch @@ -0,0 +1,53 @@ +--- doc/sphinx/Makefile.in.orig 2018-11-02 14:53:14.812956915 +0100 ++++ doc/sphinx/Makefile.in 2018-11-02 14:54:31.575517733 +0100 +@@ -642,9 +642,11 @@ + rm -rf $(BUILDDIR) + + include/cli.rst: $(top_builddir)/bin/varnishd/varnishd ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishd/varnishd -x cli > $@ + + include/params.rst: $(top_builddir)/bin/varnishd/varnishd ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishd/varnishd -x parameter > $@ + + include/counters.rst: $(top_srcdir)/lib/libvcc/vsctool.py $(COUNTERS) +@@ -656,28 +658,38 @@ + # XXX add varnishstat here when it's been _opt2rst'ed + + include/varnishncsa_options.rst: $(top_builddir)/bin/varnishncsa/varnishncsa ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishncsa/varnishncsa --options > $@ + include/varnishncsa_synopsis.rst: $(top_builddir)/bin/varnishncsa/varnishncsa ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishncsa/varnishncsa --synopsis > $@ + + include/varnishlog_options.rst: $(top_builddir)/bin/varnishlog/varnishlog ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishlog/varnishlog --options > $@ + include/varnishlog_synopsis.rst: $(top_builddir)/bin/varnishlog/varnishlog ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishlog/varnishlog --synopsis > $@ + + include/varnishtop_options.rst: $(top_builddir)/bin/varnishtop/varnishtop ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishtop/varnishtop --options > $@ + include/varnishtop_synopsis.rst: $(top_builddir)/bin/varnishtop/varnishtop ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishtop/varnishtop --synopsis > $@ + + include/varnishhist_options.rst: $(top_builddir)/bin/varnishhist/varnishhist ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishhist/varnishhist --options > $@ + include/varnishhist_synopsis.rst: $(top_builddir)/bin/varnishhist/varnishhist ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishhist/varnishhist --synopsis > $@ + + include/varnishstat_options.rst: $(top_builddir)/bin/varnishstat/varnishstat ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishstat/varnishstat --options > $@ + include/varnishstat_synopsis.rst: $(top_builddir)/bin/varnishstat/varnishstat ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishstat/varnishstat --synopsis > $@ + + include/vsl-tags.rst: $(top_builddir)/lib/libvarnishapi/vsl2rst diff --git a/varnish-6.1.0_fix_testu00008.patch b/varnish-6.1.0_fix_testu00008.patch new file mode 100644 index 0000000..59f17fe --- /dev/null +++ b/varnish-6.1.0_fix_testu00008.patch @@ -0,0 +1,13 @@ +--- bin/varnishtest/tests/u00008.vtc.orig 2018-11-02 16:06:40.731680282 +0100 ++++ bin/varnishtest/tests/u00008.vtc 2018-11-02 16:07:21.587092836 +0100 +@@ -38,8 +38,8 @@ + process p1 -screen_dump + + process p1 -winsz 25 132 +-process p1 -expect-text 4 124 "AVG_1000" +-process p1 -expect-text 22 108 "UNSEEN DIAG" ++process p1 -expect-text 4 0 "AVG_1000" ++process p1 -expect-text 22 0 "UNSEEN DIAG" + + process p1 -screen_dump -write {q} -wait + diff --git a/varnish-6.1.1_fix_issue_2912.patch b/varnish-6.1.1_fix_issue_2912.patch new file mode 100644 index 0000000..ab38f04 --- /dev/null +++ b/varnish-6.1.1_fix_issue_2912.patch @@ -0,0 +1,115 @@ +This patch is a fix for memory issues with +pcre-jit, see upstream bug report at +https://github.com/varnishcache/varnish-cache/issues/2817 + +The patch is based on upstream commits +a3129a5340566d17192de8058a9c1dbb051a7039 +683b7cbe8cde1dde8f9e516a354b82430f1d318e +1226e77f9501c56976635c714c99d84f417aa5d2 + + +diff -Naur a/bin/varnishd/cache/cache_panic.c b/bin/varnishd/cache/cache_panic.c +--- a/bin/varnishd/cache/cache_panic.c 2018-10-24 11:29:10.000000000 +0200 ++++ b/bin/varnishd/cache/cache_panic.c 2019-03-07 16:27:16.592441674 +0100 +@@ -601,6 +601,33 @@ + VSB_indent(vsb, -2); + } + ++#ifdef HAVE_PTHREAD_GETATTR_NP ++static void ++pan_threadattr(struct vsb *vsb) ++{ ++ pthread_attr_t attr[1]; ++ size_t sz; ++ void *addr; ++ ++ if (pthread_getattr_np(pthread_self(), attr) != 0) ++ return; ++ ++ VSB_cat(vsb, "pthread.attr = {\n"); ++ VSB_indent(vsb, 2); ++ ++ if (pthread_attr_getguardsize(attr, &sz) == 0) ++ VSB_printf(vsb, "guard = %zu,\n", sz); ++ if (pthread_attr_getstack(attr, &addr, &sz) == 0) { ++ VSB_printf(vsb, "stack_bottom = %p,\n", addr); ++ VSB_printf(vsb, "stack_top = %p,\n", (char *)addr + sz); ++ VSB_printf(vsb, "stack_size = %zu,\n", sz); ++ } ++ VSB_indent(vsb, -2); ++ VSB_cat(vsb, "}\n"); ++ (void) pthread_attr_destroy(attr); ++} ++#endif ++ + /*--------------------------------------------------------------------*/ + + static void __attribute__((__noreturn__)) +@@ -673,6 +700,10 @@ + if (q != NULL) + VSB_printf(pan_vsb, "thread = (%s)\n", q); + ++#ifdef HAVE_PTHREAD_GETATTR_NP ++ pan_threadattr(pan_vsb); ++#endif ++ + if (!FEATURE(FEATURE_SHORT_PANIC)) { + req = THR_GetRequest(); + VSB_cat(pan_vsb, "thr."); +diff -Naur a/bin/varnishd/mgt/mgt_param.c b/bin/varnishd/mgt/mgt_param.c +--- a/bin/varnishd/mgt/mgt_param.c 2018-10-24 11:29:10.000000000 +0200 ++++ b/bin/varnishd/mgt/mgt_param.c 2019-03-07 16:27:16.594441699 +0100 +@@ -494,6 +494,8 @@ + + MCF_TcpParams(); + ++ def = 56 * 1024; ++ + if (sizeof(void *) < 8) { /*lint !e506 !e774 */ + /* + * Adjust default parameters for 32 bit systems to conserve +@@ -505,20 +507,16 @@ + MCF_ParamConf(MCF_DEFAULT, "http_req_size", "12k"); + MCF_ParamConf(MCF_DEFAULT, "gzip_buffer", "4k"); + MCF_ParamConf(MCF_MAXIMUM, "vsl_space", "1G"); ++ def = 48 * 1024; + } + +-#if !defined(HAVE_ACCEPT_FILTERS) || defined(__linux) +- MCF_ParamConf(MCF_DEFAULT, "accept_filter", "off"); +-#endif +- + low = sysconf(_SC_THREAD_STACK_MIN); + MCF_ParamConf(MCF_MINIMUM, "thread_pool_stack", "%jdb", (intmax_t)low); + + #if defined(__SANITIZER) || __has_feature(address_sanitizer) + def = 92 * 1024; +-#else +- def = 48 * 1024; + #endif ++ + if (def < low) + def = low; + MCF_ParamConf(MCF_DEFAULT, "thread_pool_stack", "%jdb", (intmax_t)def); +@@ -529,6 +527,10 @@ + + MCF_ParamConf(MCF_MAXIMUM, "thread_pools", "%d", MAX_THREAD_POOLS); + ++#if !defined(HAVE_ACCEPT_FILTERS) || defined(__linux) ++ MCF_ParamConf(MCF_DEFAULT, "accept_filter", "off"); ++#endif ++ + VCLS_AddFunc(mgt_cls, MCF_AUTH, cli_params); + + vsb = VSB_new_auto(); +diff -Naur a/configure.ac b/configure.ac +--- a/configure.ac 2018-10-26 13:22:45.000000000 +0200 ++++ b/configure.ac 2019-03-07 16:27:16.592441674 +0100 +@@ -239,6 +239,7 @@ + AC_CHECK_FUNCS([pthread_set_name_np]) + AC_CHECK_FUNCS([pthread_setname_np]) + AC_CHECK_FUNCS([pthread_mutex_isowned_np]) ++AC_CHECK_FUNCS([pthread_getattr_np]) + LIBS="${save_LIBS}" + + # Support for visibility attribute diff --git a/varnish-6.1.1_fix_ld_library_path_in_doc_build.patch b/varnish-6.1.1_fix_ld_library_path_in_doc_build.patch new file mode 100644 index 0000000..8a5917e --- /dev/null +++ b/varnish-6.1.1_fix_ld_library_path_in_doc_build.patch @@ -0,0 +1,68 @@ +--- doc/sphinx/Makefile.in.orig 2018-11-06 16:46:59.403632379 +0100 ++++ doc/sphinx/Makefile.in 2018-11-06 16:48:28.011784013 +0100 +@@ -643,10 +643,12 @@ + rm -rf $(BUILDDIR) + + include/cli.rst: $(top_builddir)/bin/varnishd/varnishd ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishd/varnishd -x cli > ${@}_ + mv ${@}_ ${@} + + include/params.rst: $(top_builddir)/bin/varnishd/varnishd ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishd/varnishd -x parameter > ${@}_ + mv ${@}_ ${@} + +@@ -660,41 +662,52 @@ + # XXX add varnishstat here when it's been _opt2rst'ed + + include/varnishncsa_options.rst: $(top_builddir)/bin/varnishncsa/varnishncsa ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishncsa/varnishncsa --options > ${@}_ + mv ${@}_ ${@} + include/varnishncsa_synopsis.rst: $(top_builddir)/bin/varnishncsa/varnishncsa ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishncsa/varnishncsa --synopsis > ${@}_ + mv ${@}_ ${@} + + include/varnishlog_options.rst: $(top_builddir)/bin/varnishlog/varnishlog ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishlog/varnishlog --options > ${@}_ + mv ${@}_ ${@} + include/varnishlog_synopsis.rst: $(top_builddir)/bin/varnishlog/varnishlog ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishlog/varnishlog --synopsis > ${@}_ + mv ${@}_ ${@} + + include/varnishtop_options.rst: $(top_builddir)/bin/varnishtop/varnishtop ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishtop/varnishtop --options > ${@}_ + mv ${@}_ ${@} + include/varnishtop_synopsis.rst: $(top_builddir)/bin/varnishtop/varnishtop ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishtop/varnishtop --synopsis > ${@}_ + mv ${@}_ ${@} + + include/varnishhist_options.rst: $(top_builddir)/bin/varnishhist/varnishhist ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishhist/varnishhist --options > ${@}_ + mv ${@}_ ${@} + include/varnishhist_synopsis.rst: $(top_builddir)/bin/varnishhist/varnishhist ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishhist/varnishhist --synopsis > ${@}_ + mv ${@}_ ${@} + + include/varnishstat_options.rst: $(top_builddir)/bin/varnishstat/varnishstat ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishstat/varnishstat --options > ${@}_ + mv ${@}_ ${@} + include/varnishstat_synopsis.rst: $(top_builddir)/bin/varnishstat/varnishstat ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishstat/varnishstat --synopsis > ${@}_ + mv ${@}_ ${@} + + include/vsl-tags.rst: $(top_builddir)/lib/libvarnishapi/vsl2rst ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/lib/libvarnishapi/vsl2rst > ${@}_ + mv ${@}_ ${@} + include/vtc-syntax.rst: vtc-syntax.py $(VTCSYN_SRC) diff --git a/varnish-6.1.1_fix_upstrbug_2879.patch b/varnish-6.1.1_fix_upstrbug_2879.patch new file mode 100644 index 0000000..376175f --- /dev/null +++ b/varnish-6.1.1_fix_upstrbug_2879.patch @@ -0,0 +1,39 @@ +commit 7119d790b590e7fb560ad602cedfda5185c7e841 +Author: Poul-Henning Kamp +Date: Fri Jan 11 10:26:44 2019 +0000 + + Avoid printing %s,NULL in case of errors we do not expect. + + Fixes #2879 + +diff --git a/lib/libvarnish/vnum.c b/lib/libvarnish/vnum.c +index b619199c6..59e804ec8 100644 +--- a/lib/libvarnish/vnum.c ++++ b/lib/libvarnish/vnum.c +@@ -349,15 +349,17 @@ main(int argc, char *argv[]) + + for (tc = test_cases; tc->str; ++tc) { + e = VNUM_2bytes(tc->str, &val, tc->rel); +- if (e != tc->err) { +- printf("%s: VNUM_2bytes(\"%s\", %ju) (%s) != (%s)\n", +- *argv, tc->str, tc->rel, tc->err, e); +- ++ec; +- } else if (e == NULL && val != tc->val) { +- printf("%s: VNUM_2bytes(\"%s\", %ju) %ju != %ju (%s)\n", +- *argv, tc->str, tc->rel, val, tc->val, e); +- ++ec; +- } ++ if (e != NULL) ++ val = 0; ++ if (e == tc->err && val == tc->val) ++ continue; ++ ++ec; ++ printf("%s: VNUM_2bytes(\"%s\", %ju)\n", ++ *argv, tc->str, tc->rel); ++ printf("\tExpected:\tstatus %s - value %ju\n", ++ tc->err ? tc->err : "Success", tc->val); ++ printf("\tGot:\t\tstatus %s - value %ju\n", ++ e ? e : "Success", val); + } + if (!isnan(VNUM_duration(NULL))) { + printf("%s: VNUM_Duration(NULL) fail\n", *argv); diff --git a/varnish-6.2.0_el6_fix_warning_from_old_gcc.patch b/varnish-6.2.0_el6_fix_warning_from_old_gcc.patch new file mode 100644 index 0000000..828e14b --- /dev/null +++ b/varnish-6.2.0_el6_fix_warning_from_old_gcc.patch @@ -0,0 +1,73 @@ +--- bin/varnishtest/vtc_main.c.orig 2019-03-15 12:31:56.999877378 +0100 ++++ bin/varnishtest/vtc_main.c 2019-03-15 12:33:07.679889311 +0100 +@@ -228,7 +228,7 @@ + assert(cleaner_pid >= 0); + if (cleaner_pid == 0) { + closefd(&p[1]); +- (void)nice(1); /* Not important */ ++ if (nice(1)) 1; /* Not important */ + setbuf(stdin, NULL); + AZ(dup2(p[0], STDIN_FILENO)); + while (fgets(buf, sizeof buf, stdin)) { +--- lib/libvarnishapi/vsm.c.orig 2019-03-18 13:24:01.377237092 +0100 ++++ lib/libvarnishapi/vsm.c 2019-03-18 13:24:42.765783845 +0100 +@@ -682,18 +682,18 @@ + VSM_ResetError(vd); + if (u & VSM_MGT_RUNNING) { + if (progress >= 0 && n > 4) +- (void)write(progress, "\n", 1); ++ if (write(progress, "\n", 1)) 1; + vd->attached = 1; + return (0); + } + if (t0 < VTIM_mono()) { + if (progress >= 0 && n > 4) +- (void)write(progress, "\n", 1); ++ if (write(progress, "\n", 1)) 1; + return (vsm_diag(vd, + "Could not get hold of varnishd, is it running?")); + } + if (progress >= 0 && !(++n % 4)) +- (void)write(progress, ".", 1); ++ if (write(progress, ".", 1)) 1; + VTIM_sleep(.25); + } + return (vsm_diag(vd, "Attach interrupted")); +--- bin/varnishd/http1/cache_http1_deliver.c.orig 2019-03-18 13:30:43.262546105 +0100 ++++ bin/varnishd/http1/cache_http1_deliver.c 2019-03-18 14:12:48.980850397 +0100 +@@ -74,7 +74,7 @@ + VSLb(req->vsl, SLT_RespReason, "Internal Server Error"); + + req->wrk->stats->client_resp_500++; +- (void)write(req->sp->fd, r_500, sizeof r_500 - 1); ++ if (write(req->sp->fd, r_500, sizeof r_500 - 1)) 0; + req->doclose = SC_TX_EOF; + } + +--- ./bin/varnishd/mgt/mgt_param.c.orig 2019-03-18 14:48:56.084720420 +0100 ++++ ./bin/varnishd/mgt/mgt_param.c 2019-03-18 14:51:25.867836687 +0100 +@@ -802,11 +802,11 @@ + t2 = strchr(t1 + 1, '\t'); + AN(t2); + printf("\n\t*"); +- (void)fwrite(t1 + 1, (t2 - 1) - t1, 1, stdout); ++ if (fwrite(t1 + 1, (t2 - 1) - t1, 1, stdout)) 1; + printf("*\n\t\t"); + p = t2 + 1; + } +- (void)fwrite(p, q - p, 1, stdout); ++ if (fwrite(p, q - p, 1, stdout)) 1; + p = q; + if (*p == '\n') { + printf("\n"); +--- ./bin/varnishd/proxy/cache_proxy_proto.c.orig 2019-03-18 14:54:18.257283901 +0100 ++++ ./bin/varnishd/proxy/cache_proxy_proto.c 2019-03-18 14:54:47.119693630 +0100 +@@ -669,7 +669,7 @@ + WRONG("Wrong proxy version"); + + AZ(VSB_finish(vsb)); +- (void)write(fd, VSB_data(vsb), VSB_len(vsb)); ++ if (write(fd, VSB_data(vsb), VSB_len(vsb))) 1; + if (!DO_DEBUG(DBG_PROTOCOL)) { + VSB_delete(vsb); + return; diff --git a/varnish-6.2.0_fix_ppc64_for_test_c00057.patch b/varnish-6.2.0_fix_ppc64_for_test_c00057.patch new file mode 100644 index 0000000..ce64b19 --- /dev/null +++ b/varnish-6.2.0_fix_ppc64_for_test_c00057.patch @@ -0,0 +1,40 @@ +commit 88948d982bcd165e05967d2a9c8684eb9f9cbd01 +Author: Nils Goroll +Date: Wed Mar 20 11:24:33 2019 +0100 + + Change the stack overflow test to 128kb stacksize + + on ppc64 fedora, the thread_pool_stack minimum is 128kb due to + sysconf(_SC_THREAD_STACK_MIN) = 131072 + + It does not harm the test to use a larger stacksize, so we adjust it to + this requirement for consistency and simplicity + +diff --git a/bin/varnishtest/tests/c00057.vtc b/bin/varnishtest/tests/c00057.vtc +index 5118c79a0..be6569d24 100644 +--- a/bin/varnishtest/tests/c00057.vtc ++++ b/bin/varnishtest/tests/c00057.vtc +@@ -12,7 +12,7 @@ server s1 { + varnish v1 \ + -arg "-p feature=+no_coredump" \ + -arg "-p vcc_allow_inline_c=true" \ +- -arg "-p thread_pool_stack=48k" \ ++ -arg "-p thread_pool_stack=128k" \ + -vcl+backend { + C{ + #include +@@ -27,11 +27,12 @@ void (*accessor)(volatile char *p) = _accessor; + + }C + sub vcl_recv { C{ ++ const int stkkb = 128; + int i; +- volatile char overflow[48*1024]; ++ volatile char overflow[stkkb * 1024]; + + /* for downwards stack, take care to hit a single guard page */ +- for (i = 47*1024; i >= 0; i -= 1024) ++ for (i = (stkkb - 1) * 1024; i >= 0; i -= 1024) + accessor(overflow + i); + /* NOTREACHED */ + sleep(2); diff --git a/varnish-6.3.0_el6_fix_warning_from_old_gcc.patch b/varnish-6.3.0_el6_fix_warning_from_old_gcc.patch new file mode 100644 index 0000000..feadc72 --- /dev/null +++ b/varnish-6.3.0_el6_fix_warning_from_old_gcc.patch @@ -0,0 +1,79 @@ +diff -Naur varnish-6.3.0.orig/bin/varnishd/http1/cache_http1_deliver.c varnish-6.3.0/bin/varnishd/http1/cache_http1_deliver.c +--- varnish-6.3.0.orig/bin/varnishd/http1/cache_http1_deliver.c 2019-09-16 10:24:15.000000000 +0200 ++++ varnish-6.3.0/bin/varnishd/http1/cache_http1_deliver.c 2019-09-20 08:59:52.609482627 +0200 +@@ -74,7 +74,7 @@ + VSLb(req->vsl, SLT_RespReason, "Internal Server Error"); + + req->wrk->stats->client_resp_500++; +- (void)write(req->sp->fd, r_500, sizeof r_500 - 1); ++ if (write(req->sp->fd, r_500, sizeof r_500 - 1)) 0; + req->doclose = SC_TX_EOF; + } + +diff -Naur varnish-6.3.0.orig/bin/varnishd/mgt/mgt_param.c varnish-6.3.0/bin/varnishd/mgt/mgt_param.c +--- varnish-6.3.0.orig/bin/varnishd/mgt/mgt_param.c 2019-09-16 10:24:15.000000000 +0200 ++++ varnish-6.3.0/bin/varnishd/mgt/mgt_param.c 2019-09-20 09:01:38.866609297 +0200 +@@ -805,11 +805,11 @@ + t2 = strchr(t1 + 1, '\t'); + AN(t2); + printf("\n\t*"); +- (void)fwrite(t1 + 1, (t2 - 1) - t1, 1, stdout); ++ if (fwrite(t1 + 1, (t2 - 1) - t1, 1, stdout)) 1; + printf("*\n\t\t"); + p = t2 + 1; + } +- (void)fwrite(p, q - p, 1, stdout); ++ if(fwrite(p, q - p, 1, stdout)) 1; + p = q; + if (*p == '\n') { + printf("\n"); +diff -Naur varnish-6.3.0.orig/bin/varnishd/proxy/cache_proxy_proto.c varnish-6.3.0/bin/varnishd/proxy/cache_proxy_proto.c +--- varnish-6.3.0.orig/bin/varnishd/proxy/cache_proxy_proto.c 2019-09-16 10:24:15.000000000 +0200 ++++ varnish-6.3.0/bin/varnishd/proxy/cache_proxy_proto.c 2019-09-20 09:02:55.762424644 +0200 +@@ -645,7 +645,7 @@ + WRONG("Wrong proxy version"); + + AZ(VSB_finish(vsb)); +- (void)VSB_tofile(fd, vsb); // XXX: Error handling ? ++ if (VSB_tofile(fd, vsb)) 1; // XXX: Error handling ? + if (!DO_DEBUG(DBG_PROTOCOL)) { + VSB_delete(vsb); + return; +diff -Naur varnish-6.3.0.orig/bin/varnishtest/vtc_main.c varnish-6.3.0/bin/varnishtest/vtc_main.c +--- varnish-6.3.0.orig/bin/varnishtest/vtc_main.c 2019-09-16 10:24:15.000000000 +0200 ++++ varnish-6.3.0/bin/varnishtest/vtc_main.c 2019-09-20 08:56:45.639506046 +0200 +@@ -230,7 +230,7 @@ + assert(cleaner_pid >= 0); + if (cleaner_pid == 0) { + closefd(&p[1]); +- (void)nice(1); /* Not important */ ++ if (nice(1)) 1; + setbuf(stdin, NULL); + AZ(dup2(p[0], STDIN_FILENO)); + while (fgets(buf, sizeof buf, stdin)) { +diff -Naur varnish-6.3.0.orig/lib/libvarnishapi/vsm.c varnish-6.3.0/lib/libvarnishapi/vsm.c +--- varnish-6.3.0.orig/lib/libvarnishapi/vsm.c 2019-09-16 10:24:19.000000000 +0200 ++++ varnish-6.3.0/lib/libvarnishapi/vsm.c 2019-09-20 10:36:02.434763755 +0200 +@@ -763,18 +763,18 @@ + VSM_ResetError(vd); + if (u & VSM_MGT_RUNNING) { + if (progress >= 0 && n > 4) +- (void)write(progress, "\n", 1); ++ if (!write(progress, "\n", 1)) return (vsm_diag(vd, "Unable to write progress")); + vd->attached = 1; + return (0); + } + if (t0 < VTIM_mono()) { + if (progress >= 0 && n > 4) +- (void)write(progress, "\n", 1); ++ if (!write(progress, "\n", 1)) return (vsm_diag(vd, "Unable to write progress")); + return (vsm_diag(vd, + "Could not get hold of varnishd, is it running?")); + } + if (progress >= 0 && !(++n % 4)) +- (void)write(progress, ".", 1); ++ if (!write(progress, ".", 1)) return (vsm_diag(vd, "Unable to write progress")); + VTIM_sleep(.25); + } + return (vsm_diag(vd, "Attach interrupted")); + diff --git a/varnish-6.3.2_fix_s390x.patch b/varnish-6.3.2_fix_s390x.patch new file mode 100644 index 0000000..50656c7 --- /dev/null +++ b/varnish-6.3.2_fix_s390x.patch @@ -0,0 +1,19 @@ +commit b0af060fb688b8fc2ff3817ea99430432668b291 +Author: Ingvar Hagelund +Date: Tue Feb 11 12:56:54 2020 +0100 + + simple fix for fedora/gcc-10.0.1: -Werror=format-overflow, by some reason hit on s390x + +diff --git a/bin/varnishtest/vtc_varnish.c b/bin/varnishtest/vtc_varnish.c +index 1ec748cb6..09e49d258 100644 +--- a/bin/varnishtest/vtc_varnish.c ++++ b/bin/varnishtest/vtc_varnish.c +@@ -121,7 +121,7 @@ varnish_ask_cli(const struct varnish *v, const char *cmd, char **repl) + i = VCLI_ReadResult(v->cli_fd, &retval, &r, vtc_maxdur); + if (i != 0 && !vtc_stop) + vtc_fatal(v->vl, "CLI failed (%s) = %d %u %s", +- cmd, i, retval, r); ++ cmd != NULL ? cmd : "NULL", i, retval, r); + vtc_log(v->vl, 3, "CLI RX %u", retval); + vtc_dump(v->vl, 4, "CLI RX", r, -1); + if (repl != NULL) diff --git a/varnish-6.4.0_el6_fix_warning_from_old_gcc.patch b/varnish-6.4.0_el6_fix_warning_from_old_gcc.patch new file mode 100644 index 0000000..aeb7b5f --- /dev/null +++ b/varnish-6.4.0_el6_fix_warning_from_old_gcc.patch @@ -0,0 +1,67 @@ +diff -Naur varnish-6.3.0.orig/bin/varnishd/http1/cache_http1_deliver.c varnish-6.3.0/bin/varnishd/http1/cache_http1_deliver.c +--- varnish-6.3.0.orig/bin/varnishd/http1/cache_http1_deliver.c 2019-09-16 10:24:15.000000000 +0200 ++++ varnish-6.3.0/bin/varnishd/http1/cache_http1_deliver.c 2019-09-20 08:59:52.609482627 +0200 +@@ -74,7 +74,7 @@ + VSLb(req->vsl, SLT_RespReason, "Internal Server Error"); + + req->wrk->stats->client_resp_500++; +- (void)write(req->sp->fd, r_500, sizeof r_500 - 1); ++ if (write(req->sp->fd, r_500, sizeof r_500 - 1)) 0; + req->doclose = SC_TX_EOF; + } + +diff -Naur varnish-6.3.0.orig/bin/varnishd/mgt/mgt_param.c varnish-6.3.0/bin/varnishd/mgt/mgt_param.c +--- varnish-6.3.0.orig/bin/varnishd/mgt/mgt_param.c 2019-09-16 10:24:15.000000000 +0200 ++++ varnish-6.3.0/bin/varnishd/mgt/mgt_param.c 2019-09-20 09:01:38.866609297 +0200 +@@ -805,11 +805,11 @@ + t2 = strchr(t1 + 1, '\t'); + AN(t2); + printf("\n\t*"); +- (void)fwrite(t1 + 1, (t2 - 1) - t1, 1, stdout); ++ if (fwrite(t1 + 1, (t2 - 1) - t1, 1, stdout)) 1; + printf("*\n\t\t"); + p = t2 + 1; + } +- (void)fwrite(p, q - p, 1, stdout); ++ if(fwrite(p, q - p, 1, stdout)) 1; + p = q; + if (*p == '\n') { + printf("\n"); +diff -Naur varnish-6.3.0.orig/bin/varnishtest/vtc_main.c varnish-6.3.0/bin/varnishtest/vtc_main.c +--- varnish-6.3.0.orig/bin/varnishtest/vtc_main.c 2019-09-16 10:24:15.000000000 +0200 ++++ varnish-6.3.0/bin/varnishtest/vtc_main.c 2019-09-20 08:56:45.639506046 +0200 +@@ -230,7 +230,7 @@ + assert(cleaner_pid >= 0); + if (cleaner_pid == 0) { + closefd(&p[1]); +- (void)nice(1); /* Not important */ ++ if (nice(1)) 1; + setbuf(stdin, NULL); + AZ(dup2(p[0], STDIN_FILENO)); + while (fgets(buf, sizeof buf, stdin)) { +diff -Naur varnish-6.3.0.orig/lib/libvarnishapi/vsm.c varnish-6.3.0/lib/libvarnishapi/vsm.c +--- varnish-6.3.0.orig/lib/libvarnishapi/vsm.c 2019-09-16 10:24:19.000000000 +0200 ++++ varnish-6.3.0/lib/libvarnishapi/vsm.c 2019-09-20 10:36:02.434763755 +0200 +@@ -763,18 +763,18 @@ + VSM_ResetError(vd); + if (u & VSM_MGT_RUNNING) { + if (progress >= 0 && n > 4) +- (void)write(progress, "\n", 1); ++ if (!write(progress, "\n", 1)) return (vsm_diag(vd, "Unable to write progress")); + vd->attached = 1; + return (0); + } + if (t0 < VTIM_mono()) { + if (progress >= 0 && n > 4) +- (void)write(progress, "\n", 1); ++ if (!write(progress, "\n", 1)) return (vsm_diag(vd, "Unable to write progress")); + return (vsm_diag(vd, + "Could not get hold of varnishd, is it running?")); + } + if (progress >= 0 && !(++n % 4)) +- (void)write(progress, ".", 1); ++ if (!write(progress, ".", 1)) return (vsm_diag(vd, "Unable to write progress")); + VTIM_sleep(.25); + } + return (vsm_diag(vd, "Attach interrupted")); + diff --git a/varnish-6.5.0_el6_fix_warning_from_old_gcc.patch b/varnish-6.5.0_el6_fix_warning_from_old_gcc.patch new file mode 100644 index 0000000..d72b238 --- /dev/null +++ b/varnish-6.5.0_el6_fix_warning_from_old_gcc.patch @@ -0,0 +1,78 @@ +diff -Naur ../varnish-6.5.0.orig/bin/varnishd/http1/cache_http1_deliver.c ./bin/varnishd/http1/cache_http1_deliver.c +--- ../varnish-6.5.0.orig/bin/varnishd/http1/cache_http1_deliver.c 2020-09-15 17:06:03.000000000 +0200 ++++ ./bin/varnishd/http1/cache_http1_deliver.c 2020-09-16 11:45:28.663086943 +0200 +@@ -76,7 +76,7 @@ + VSLb(req->vsl, SLT_RespReason, "Internal Server Error"); + + req->wrk->stats->client_resp_500++; +- (void)write(req->sp->fd, r_500, sizeof r_500 - 1); ++ if (write(req->sp->fd, r_500, sizeof r_500 - 1)) 0; + req->doclose = SC_TX_EOF; + } + +diff -Naur ../varnish-6.5.0.orig/bin/varnishd/mgt/mgt_main.c ./bin/varnishd/mgt/mgt_main.c +--- ../varnish-6.5.0.orig/bin/varnishd/mgt/mgt_main.c 2020-09-15 17:06:03.000000000 +0200 ++++ ./bin/varnishd/mgt/mgt_main.c 2020-09-16 11:46:21.323667133 +0200 +@@ -252,7 +252,7 @@ + return; + VJ_rmdir("vmod_cache"); + VJ_unlink("_.pid"); +- (void)chdir("/"); ++ if (chdir("/")) 0; + VJ_rmdir(workdir); + } + +diff -Naur ../varnish-6.5.0.orig/bin/varnishd/mgt/mgt_param.c ./bin/varnishd/mgt/mgt_param.c +--- ../varnish-6.5.0.orig/bin/varnishd/mgt/mgt_param.c 2020-09-15 17:06:03.000000000 +0200 ++++ ./bin/varnishd/mgt/mgt_param.c 2020-09-16 11:45:28.771086082 +0200 +@@ -829,11 +829,11 @@ + t2 = strchr(t1 + 1, '\t'); + AN(t2); + printf("\n\t*"); +- (void)fwrite(t1 + 1, (t2 - 1) - t1, 1, stdout); ++ if (fwrite(t1 + 1, (t2 - 1) - t1, 1, stdout)) 1; + printf("*\n\t\t"); + p = t2 + 1; + } +- (void)fwrite(p, q - p, 1, stdout); ++ if(fwrite(p, q - p, 1, stdout)) 1; + p = q; + if (*p == '\n') { + printf("\n"); +diff -Naur ../varnish-6.5.0.orig/bin/varnishtest/vtc_main.c ./bin/varnishtest/vtc_main.c +--- ../varnish-6.5.0.orig/bin/varnishtest/vtc_main.c 2020-09-15 17:06:03.000000000 +0200 ++++ ./bin/varnishtest/vtc_main.c 2020-09-16 11:45:28.771086082 +0200 +@@ -233,7 +233,7 @@ + assert(cleaner_pid >= 0); + if (cleaner_pid == 0) { + closefd(&p[1]); +- (void)nice(1); /* Not important */ ++ if (nice(1)) 1; + setbuf(stdin, NULL); + AZ(dup2(p[0], STDIN_FILENO)); + while (fgets(buf, sizeof buf, stdin)) { +diff -Naur ../varnish-6.5.0.orig/lib/libvarnishapi/vsm.c ./lib/libvarnishapi/vsm.c +--- ../varnish-6.5.0.orig/lib/libvarnishapi/vsm.c 2020-09-15 17:06:03.000000000 +0200 ++++ ./lib/libvarnishapi/vsm.c 2020-09-16 11:45:28.772086074 +0200 +@@ -764,18 +764,18 @@ + VSM_ResetError(vd); + if (u & VSM_MGT_RUNNING) { + if (progress >= 0 && n > 4) +- (void)write(progress, "\n", 1); ++ if (!write(progress, "\n", 1)) return (vsm_diag(vd, "Unable to write progress")); + vd->attached = 1; + return (0); + } + if (t0 < VTIM_mono()) { + if (progress >= 0 && n > 4) +- (void)write(progress, "\n", 1); ++ if (!write(progress, "\n", 1)) return (vsm_diag(vd, "Unable to write progress")); + return (vsm_diag(vd, + "Could not get hold of varnishd, is it running?")); + } + if (progress >= 0 && !(++n % 4)) +- (void)write(progress, ".", 1); ++ if (!write(progress, ".", 1)) return (vsm_diag(vd, "Unable to write progress")); + VTIM_sleep(.25); + } + return (vsm_diag(vd, "Attach interrupted")); diff --git a/varnish.params b/varnish.params new file mode 100644 index 0000000..532e5b3 --- /dev/null +++ b/varnish.params @@ -0,0 +1,40 @@ +# Varnish environment configuration description. This was derived from +# the old style sysconfig/defaults settings + +# Set this to 1 to make systemd reload try to switch vcl without restart. +RELOAD_VCL=1 + +# Main configuration file. You probably want to change it. +VARNISH_VCL_CONF=/etc/varnish/default.vcl + +# Default address and port to bind to. Blank address means all IPv4 +# and IPv6 interfaces, otherwise specify a host name, an IPv4 dotted +# quad, or an IPv6 address in brackets. +# VARNISH_LISTEN_ADDRESS=192.168.1.5 +VARNISH_LISTEN_PORT=6081 + +# Admin interface listen address and port +VARNISH_ADMIN_LISTEN_ADDRESS=127.0.0.1 +VARNISH_ADMIN_LISTEN_PORT=6082 + +# Shared secret file for admin interface +VARNISH_SECRET_FILE=/etc/varnish/secret + +# The minimum and maximum number of worker threads to start +VARNISH_MIN_THREADS=5 +VARNISH_MAX_THREADS=1000 + +# Idle timeout for worker threads +VARNISH_THREAD_TIMEOUT=120 + +# Backend storage specification, see Storage Types in the varnishd(5) +# man page for details. +VARNISH_STORAGE="file,/var/lib/varnish/varnish_storage.bin,1G" + +# Default TTL used when the backend does not specify one +VARNISH_TTL=120 + +# User and group for the varnishd worker processes +VARNISH_USER=varnish +VARNISH_GROUP=varnish + diff --git a/varnish.service b/varnish.service new file mode 100644 index 0000000..6f7b107 --- /dev/null +++ b/varnish.service @@ -0,0 +1,47 @@ +[Unit] +Description=Varnish a high-perfomance HTTP accelerator +After=syslog.target network.target + +[Service] + +# +# If you want to make changes to this file, please copy it to +# /etc/systemd/system/varnish.service and make your changes there. +# This will override the file kept at /lib/systemd/system/varnish.service +# +# Enviroment variables may be found in /etc/varnish/varnish.params +# + +# Maximum number of open files (for ulimit -n) +LimitNOFILE=131072 + +# Locked shared memory (for ulimit -l) +# Default log size is 82MB + header +LimitMEMLOCK=82000 + +# Maximum size of the corefile. +LimitCORE=infinity + +EnvironmentFile=/etc/varnish/varnish.params + +Type=forking +PIDFile=/var/run/varnish.pid +PrivateTmp=true +ExecStart=/usr/sbin/varnishd \ + -P /var/run/varnish.pid \ + -f $VARNISH_VCL_CONF \ + -a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} \ + -T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} \ + -t $VARNISH_TTL \ + -w ${VARNISH_MIN_THREADS},${VARNISH_MAX_THREADS},${VARNISH_THREAD_TIMEOUT} \ + -u $VARNISH_USER \ + -g $VARNISH_GROUP \ + -S $VARNISH_SECRET_FILE \ + -s $VARNISH_STORAGE \ + $DAEMON_OPTS + +ExecReload=/usr/sbin/varnish_reload_vcl + +[Install] +WantedBy=multi-user.target + diff --git a/varnish.spec b/varnish.spec new file mode 100644 index 0000000..bcd941a --- /dev/null +++ b/varnish.spec @@ -0,0 +1,1036 @@ +%global _hardened_build 1 +%global debug_package %{nil} +# https://github.com/varnishcache/varnish-cache/issues/2269 +%global _use_internal_dependency_generator 0 +%global __find_provides %{_builddir}/%{name}-%{version}/find-provides %__find_provides + +# Package scripts are now external +# https://github.com/varnishcache/pkg-varnish-cache +%global commit1 0ad2f22629c4a368959c423a19e352c9c6c79682 +%global shortcommit1 %(c=%{commit1}; echo ${c:0:7}) + +%bcond_without python2 +%bcond_with python3 + +%if %{with python2} == %{with python3} +%error Pick exactly one Python version +%endif + +Summary: High-performance HTTP accelerator +Name: varnish +Version: 6.0.8 +Release: 1%{?dist} +License: BSD +Group: System Environment/Daemons +URL: https://www.varnish-cache.org/ +Source0: http://varnish-cache.org/_downloads/%{name}-%{version}%{?vd_rc}.tgz +Source1: https://github.com/varnishcache/pkg-varnish-cache/archive/%{commit1}.tar.gz#/pkg-varnish-cache-%{shortcommit1}.tar.gz +Patch1: varnish-5.1.1.fix_ld_library_path_in_doc_build.patch +Patch4: varnish-4.0.3_fix_varnish4_selinux.el6.patch +Patch9: varnish-5.1.1.fix_python_version.patch + +# https://github.com/varnishcache/varnish-cache/commit/5220c394232c25bb7a807a35e7394059ecefa821#diff-2279587378a4426edde05f42e1acca5e +Patch11: varnish-6.0.0.fix_el6_fortify_source.patch + +Obsoletes: varnish-libs + +%if %{with python3} +BuildRequires: python3, python3-sphinx, python3-docutils +%else +%if 0%{?rhel} >= 6 +BuildRequires: python-sphinx +%endif +BuildRequires: python-docutils +%endif +BuildRequires: libedit-devel +BuildRequires: ncurses-devel +BuildRequires: pcre-devel +BuildRequires: pkgconfig +BuildRequires: gcc +BuildRequires: make +BuildRequires: graphviz +BuildRequires: nghttp2 + +%if 0%{?rhel} == 6 +BuildRequires: selinux-policy +%endif +Requires: logrotate +Requires: ncurses +Requires: pcre +Requires: redhat-rpm-config +Requires(pre): shadow-utils +Requires(post): /usr/bin/uuidgen +# Varnish actually needs gcc installed to work. It uses the C compiler +# at runtime to compile the VCL configuration files. This is by design. +Requires: gcc +%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 +Requires(post): systemd-units +Requires(post): systemd-sysv +Requires(preun): systemd-units +Requires(postun): systemd-units +BuildRequires: systemd-units +%endif +%if 0%{?rhel} == 6 +Requires: %{name}-selinux +Requires(post): policycoreutils, +Requires(preun): policycoreutils +Requires(postun): policycoreutils +Requires(post): /sbin/chkconfig +Requires(preun): /sbin/chkconfig +Requires(preun): /sbin/service +%endif + +%description +This is Varnish Cache, a high-performance HTTP accelerator. + +Varnish Cache stores web pages in memory so web servers don’t have to +create the same web page over and over again. Varnish Cache serves +pages much faster than any application server; giving the website a +significant speed up. + +Documentation wiki and additional information about Varnish Cache is +available on: https://www.varnish-cache.org/ + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +BuildRequires: ncurses-devel +Provides: varnish-libs-devel = %{version}-%{release} +Obsoletes: varnish-libs-devel +%if %{with python2} +Requires: python +%endif +Requires: %{name} = %{version}-%{release} + +%description devel +Development files for %{name} +Varnish Cache is a high-performance HTTP accelerator + +%package docs +Summary: Documentation files for %name +Group: Documentation + +%description docs +Documentation files for %name + +%if 0%{?rhel} == 6 +%package selinux +Summary: Minimal selinux policy for running varnish +Group: System Environment/Daemons + +%description selinux +Minimal selinux policy for running varnish4 +%endif + +%prep +%setup -q -n varnish-%{version}%{?vd_rc} +tar xzf %SOURCE1 +ln -s pkg-varnish-cache-%{commit1}/redhat redhat +ln -s pkg-varnish-cache-%{commit1}/debian debian +cp redhat/find-provides . +%if 0%{?rhel} == 6 +cp pkg-varnish-cache-%{commit1}/sysv/redhat/* redhat/ +sed -i '8 i\RPM_BUILD_ROOT=%{buildroot}' find-provides +%endif + +%patch1 -p1 +%if 0%{?rhel} == 6 +%patch4 -p0 +%patch9 -p0 +%patch11 -p0 +%endif + +%build +%if 0%{?rhel} == 6 +export CFLAGS="%{optflags} -fPIC" +export LDFLAGS=" -pie" +%endif + +# https://gcc.gnu.org/wiki/FAQ#PR323 +%ifarch %ix86 +%if 0%{?fedora} > 21 +export CFLAGS="%{optflags} -ffloat-store -fexcess-precision=standard" +%endif +%if 0%{?rhel} >= 6 +export CFLAGS="%{optflags} -fPIC -ffloat-store" +%endif +%endif + +# Man pages are prebuilt. No need to regenerate them. +export RST2MAN=/bin/true + +%configure --disable-static \ + --with-jemalloc=no \ + --localstatedir=/var/lib \ + --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} +#ifarch x86_64 #arm +# --disable-pcre-jit \ +#endif + +# 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; + s|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool + +# I'll never understand libtool +mkdir lib/libvarnishapi/.libs +pushd lib/libvarnishapi/.libs +ln -s libvarnishapi.so libvarnishapi.so.1 +popd + +# Upstream github issue #2265 +%if 0%{?rhel} == 6 +sed -i 's/-Werror$//g;' bin/varnishd/Makefile +sed -i 's/-Werror$//g;' lib/libvarnishapi/Makefile +%endif + +make %{?_smp_mflags} V=1 + +# One varnish user is enough +sed -i 's,User=varnishlog,User=varnish,g;' redhat/varnishncsa.service + +# Explicit python, please +%if %{with python2} +sed -i 's/env python3/python2/g;' lib/libvcc/vmodtool.py lib/libvcc/vsctool.py +%else +sed -i 's/env python3/python3/g;' lib/libvcc/vmodtool.py lib/libvcc/vsctool.py +%endif + +# Clean up the html documentation +rm -rf doc/html/_sources + +%check +%ifarch ppc64 ppc64le aarch64 +sed -i 's/48/128/g;' bin/varnishtest/tests/c00057.vtc +%endif +#make %{?_smp_mflags} check LD_LIBRARY_PATH="%{buildroot}%{_libdir}:%{buildroot}%{_libdir}/%{name}" VERBOSE=1 + +%install +rm -rf %{buildroot} +make install DESTDIR=%{buildroot} INSTALL="install -p" + +# None of these for fedora +find %{buildroot}/%{_libdir}/ -name '*.la' -exec rm -f {} ';' + +mkdir -p %{buildroot}/var/lib/varnish +mkdir -p %{buildroot}/var/log/varnish +mkdir -p %{buildroot}/var/run/varnish +mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d/ +install -D -m 0644 etc/example.vcl %{buildroot}%{_sysconfdir}/varnish/default.vcl +install -D -m 0644 redhat/varnish.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/varnish +install -D -m 0644 include/vcs_version.h %{buildroot}%{_includedir}/varnish +install -D -m 0644 include/vrt.h %{buildroot}%{_includedir}/varnish + +# systemd support +%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 +mkdir -p %{buildroot}%{_unitdir} +install -D -m 0644 redhat/varnish.service %{buildroot}%{_unitdir}/varnish.service +install -D -m 0644 redhat/varnishncsa.service %{buildroot}%{_unitdir}/varnishncsa.service + +# default is standard sysvinit +%else +install -D -m 0644 redhat/varnish.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/varnish +install -D -m 0755 redhat/varnish.initrc %{buildroot}%{_initrddir}/varnish +install -D -m 0755 redhat/varnishncsa.initrc %{buildroot}%{_initrddir}/varnishncsa +%endif +install -D -m 0755 redhat/varnishreload %{buildroot}%{_sbindir}/varnishreload + +echo %{_libdir}/varnish > %{buildroot}%{_sysconfdir}/ld.so.conf.d/varnish-%{_arch}.conf + +# No idea why these ends up with mode 600 in the debug package +chmod 644 lib/libvmod_*/*.c +chmod 644 lib/libvmod_*/*.h + +# selinux module for el6 +%if 0%{?rhel} == 6 +cd selinux +make -f %{_datadir}/selinux/devel/Makefile +install -p -m 644 -D varnish4.pp %{buildroot}%{_datadir}/selinux/packages/%{name}/varnish4.pp +%endif + +%files +%{_sbindir}/* +%{_bindir}/* +%{_libdir}/*.so.* +%{_libdir}/varnish +%{_var}/lib/varnish +%attr(0700,varnish,varnish) %dir %{_var}/log/varnish +%{_mandir}/man1/*.1* +%{_mandir}/man3/*.3* +%{_mandir}/man7/*.7* +%license LICENSE +%doc README.rst ChangeLog +%doc etc/builtin.vcl etc/example.vcl +%dir %{_sysconfdir}/varnish/ +%config(noreplace) %{_sysconfdir}/varnish/default.vcl +%config(noreplace) %{_sysconfdir}/logrotate.d/varnish +%config %{_sysconfdir}/ld.so.conf.d/varnish-%{_arch}.conf + + +# systemd from fedora 17 and rhel 7 +%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 +%{_unitdir}/varnish.service +%{_unitdir}/varnishncsa.service + +# default is standard sysvinit +%else +%config(noreplace) %{_sysconfdir}/sysconfig/varnish +%{_initrddir}/varnish +%{_initrddir}/varnishncsa +%endif + +%files devel +%license LICENSE +%doc README.rst +%{_libdir}/lib*.so +%{_includedir}/%{name} +%{_libdir}/pkgconfig/varnishapi.pc +%{_datadir}/%{name} +%{_datadir}/aclocal/*.m4 + +%files docs +%license LICENSE +%doc doc/html +%doc doc/changes*.html + +%if 0%{?rhel} == 6 +%files selinux +%{_datadir}/selinux/packages/%{name}/varnish4.pp +%endif + +%pre +getent group varnish >/dev/null || groupadd -r varnish +getent passwd varnish >/dev/null || \ + useradd -r -g varnish -d /var/lib/varnish -s /sbin/nologin \ + -c "Varnish Cache" varnish +exit 0 + +%post +%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 +%systemd_post varnish.service + +# Other distros: Use chkconfig +%else +/sbin/chkconfig --add varnish +/sbin/chkconfig --add varnishncsa +%endif + +/sbin/ldconfig + +# Previous versions had varnishlog and varnishncsa running as root +chown varnish:varnish /var/log/varnish/varnishncsa.log 2>/dev/null || true + +test -f /etc/varnish/secret || (uuidgen > /etc/varnish/secret && chmod 0600 /etc/varnish/secret) + +# selinux module for el6 +%if 0%{?rhel} == 6 +%post selinux +if [ "$1" -le "1" ] ; then # First install +semodule -i %{_datadir}/selinux/packages/%{name}/varnish4.pp 2>/dev/null || : +fi + +%preun selinux +if [ "$1" -lt "1" ] ; then # Final removal +semodule -r varnish4 2>/dev/null || : +fi + +%postun +%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 +%systemd_postun_with_restart varnish.service +%endif +/sbin/ldconfig + + +%postun selinux +if [ "$1" -ge "1" ] ; then # Upgrade +semodule -i %{_datadir}/selinux/packages/%{name}/varnish4.pp 2>/dev/null || : +fi + +%endif + +%preun + +%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 +%systemd_preun varnish.service +%else + +if [ $1 -lt 1 ]; then + # Package removal, not upgrade + %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 || : + /bin/systemctl stop varnishncsa.service > /dev/null 2>&1 || : + %else + /sbin/service varnish stop > /dev/null 2>&1 + /sbin/service varnishncsa stop > /dev/null 2>%1 + /sbin/chkconfig --del varnish + /sbin/chkconfig --del varnishncsa + %endif +fi +%endif + + +%changelog +* Thu Jul 22 2021 Luboš Uhliarik - 6.0.8-1 +- new version 6.0.8 +- Resolves: #1982862 - CVE-2021-36740 varnish:6/varnish: HTTP/2 request + smuggling attack via a large Content-Length header for a POST request + +* Tue Apr 14 2020 Lubos Uhliarik - 6.0.6-2 +- new version 6.0.6 +- Resolves: #1795673 - RFE: rebase varnish:6 to latest 6.0.x LTS +- Resolves: #1790907 - CVE-2019-20637 varnish: not clearing pointer between two + client requests leads to information disclosure +- Resolves: #1763958 - CVE-2019-15892 varnish:6/varnish: denial of service + handling certain crafted HTTP/1 requests + +* Mon Oct 08 2018 Lubos Uhliarik - 6.0.2-1 +- new version 6.0.2 (#1633338) + +* Wed Aug 01 2018 Luboš Uhliarik - 6.0.0-3 +- Resolves: #1591765 - varnish: Remove dependency on jemalloc + +* Sat Jul 14 2018 Fedora Release Engineering - 6.0.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Apr 25 2018 Ingvar Hagelund - 6.0.0-1 +- New upstream release +- Added a patch that fixes _FORTIFY_SOURCE=2 on copr/el6 +- Added a patch fixing compilation on epel6 +- Fresh checkout of pkg-varnish-cache +- Updated find-requires sed fix to update variant and moved it to prep +- Removed -libs subpackage +- varnish_reload_vcl changed name to varnishreload, as in upstream +- varnish.params is gone. To override startup configuration, + use /etc/systemd/system/varnish.service +- Dropped patch and sed fixes for find-provides, as it is fixed upstream +- Dropped patch for test vsv00002, as it is fixed upstream +- Droppet patch for python3, as it is included upstream +- Dropped buildreq on groff, as tarball includes prebuilt manpages +- Dropped systemv to systemd helpers +- Updated project url +- Use prebuilt html files for docs subpackage +- Dropped unnecessary explicit require of initscripts, closes #1592398 + +* Wed Mar 28 2018 Joe Orton - 5.2.1-5 +- add conditional build support for Python 3 + +* Fri Feb 09 2018 Fedora Release Engineering - 5.2.1-4.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Dec 21 2017 Ingvar Hagelund - 5.2.1-4 +- Disabled pcre-jit on x86_64 and arm in rawhide for now. It does not + work, and makes other varnish dependant packages crash + (upstream bug #2521) + +* Thu Nov 16 2017 Ingvar Hagelund - 5.2.1-3 +- Disabled running make check again. Too many timing issues. All tests run + successfully on all arches from time to time, but seldom in a single + run while all redhat builders are loaded. + +* Thu Nov 16 2017 Ingvar Hagelund - 5.2.1-2 +- Added patch for vsv00002 on ppc64[le] +- Added buildreq on nghttp2 for the test suite + +* Wed Nov 15 2017 Ingvar Hagelund - 5.2.1-1 +- New upstream release. A security release + Includes fix for CVE-2017-8807, closes 1512798, 1513523, 1513524 + +* Mon Oct 23 2017 Ingvar Hagelund - 5.2.0-2 +- Use ix86 macro for all ifarch matches of 32bit x86 hardware +- Added Makefile hack for el6 also to libvarnishapi + +* Thu Oct 12 2017 Ingvar Hagelund - 5.2.0-1 +- New upstream release + +* Fri Aug 04 2017 Ingvar Hagelund - 5.1.3-2 +- Disabled jemalloc on aarch64, as it fails reproducably +- Disabled running make check. Too many timing issues. All tests run + successfully on all arches from time to time, but not in a single + run. + +* Thu Aug 03 2017 Ingvar Hagelund - 5.1.3-1 +- New upstream release, including fix for VSV00001 + +* Wed Aug 02 2017 Patrick Uiterwijk - 5.1.2-3 +- Added patch for vsv00001 + +* Thu Jul 27 2017 Fedora Release Engineering - 5.1.2-1.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Apr 07 2017 Ingvar Hagelund 5.1.2-1 +- New upstream release +- Updated pkg-varnish checkout to 5b97619, setting systemd memlock limit + to actual 82MB, as it says in the comment +- Disabled stripping and building of debug packages, upstream issue #2269 + +* Thu Mar 16 2017 Ingvar Hagelund 5.1.1-1 +- New upstream release +- Rebased patches for 5.1.1 +- Removed patches merged upstream +- Pulled support for rhel5 and clones +- Updated pkg-varnish checkout to 92373fe + +* Mon Feb 13 2017 Ingvar Hagelund 5.0.0-2 +- Updated snapshot of pgk-varnish +- Added a patch for varnish_reload_vcl, fixes stricter vcl names + +* Sat Feb 11 2017 Fedora Release Engineering - 5.0.0-1.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Wed Sep 14 2016 Ingvar Hagelund 5.0.0-1 +- New upstream release: 5.0.0 +- Rebased patches for 5.0.0 +- Added patch from upstream fixing a h/2 bug visible on secondary arches +- New snapshot of pkg-varnish +- Some cosmetic changes to reduce the diff to the upstream specfile +- Renamed subpackage varnish-libs-devel to just varnish-devel + (as in upstream) +- Removed varnishlog initrc and systemd start scripts, as in upstream + (Nobody should run varnishlog as a daemon continously) + +* Thu Sep 01 2016 Ingvar Hagelund 4.1.3-5 +- Changed ownership of varnishlog and varnishncsa logs, as previous + versions have had them run as root +- Removed old outcommented config that is no longer in use + +* Mon Aug 29 2016 Ingvar Hagelund 4.1.3-4 +- Removed out-commented stuff about building from git +- Removed out-commented sub package -libs-static +- Use user varnish also for varnishlog and varnishncsa (#1371181) +- Changed owner of /var/log/varnish, so varnishlog/ncsa can start (#1371181) +- Reduced the number of parallell checks, to not overflow the builders + +* Fri Aug 05 2016 Ingvar Hagelund 4.1.3-3 +- Reduced the number of parallell checks ran by make, to reduce + stress on the builders + +* Fri Aug 05 2016 Ingvar Hagelund 4.1.3-2 +- Added python2.4 fix for el5 to the fedora tree + +* Thu Aug 04 2016 Ingvar Hagelund 4.1.3-1 +- New upstream release +- New snapshot of pkg-varnish, commit 4e27994 +- README is now named README.rst +- Rebased Werror patch for el6 +- vmod vcc files readable for all users +- set explicit python version in vmodtool.py +- Remove superflous Makefile.in.orig generated by patch + +* Thu Mar 31 2016 Ingvar Hagelund 4.1.2-2 +- Added missing tarball for pkg-varnish + +* Tue Mar 29 2016 Ingvar Hagelund 4.1.2-1 +- New upstream realease +- New checkout of pkg-varnish-cache from github +- Removed systemd patches now merged upstream +- Updated fix_python_24 patch for el5 +- General i386 floating point precision fix (was fix for gcc6) now for more + fedoras/el variants + +* Mon Feb 29 2016 Ingvar Hagelund 4.1.1-4 +- Rebuilt against jemalloc-4.1.0-1 +- fix for gcc6 now for fedora >23 + +* Thu Feb 04 2016 Ingvar Hagelund 4.1.1-3 +- Added "-ffloat-store -fexcess-precision=standard" to CFLAGS on i386 + to work around a bug in gcc6, see + https://github.com/dhobsd/Varnish-Cache/commit/9f1035d +- Quieted unpacking of distro package source + +* Wed Feb 03 2016 Ingvar Hagelund 4.1.1-2 +- Added patch from upstream, daemonizing varnishd in systemd, as + it handles SIGHUP otherwice when running foregrounded under systemd + +* Fri Jan 29 2016 Ingvar Hagelund 4.1.1-1 +- New upstream release +- Rebased sphinx build patch +- Removed patch for dns corner case, it has been fixed upstream +- Removed patch for pcre madness test. It has been removed +- Added new source pkg-varnish-cache from github, replacing varnish-cache-redhat +- Also stop varnishlog and varnishncsa on package removal +- Removed redhat/README.rst. It is no longer included upstream + +* Wed Oct 21 2015 Ingvar Hagelund 4.1.0-2 +- Moved LICENSE to license catalog for fedora and el7 + +* Fri Oct 09 2015 Ingvar Hagelund 4.1.0-1 +- New upstream release 4.1.0 +- Changed buildreqs list to be one per line +- Skipped patches included upstream +- Rebased sphinx build patch +- Changed description to match upstream +- Added basic buildreqs gcc and make +- Included vcs_version.h and vrt.h to produce correct provides, even + when building in a non-standard buildroot +- Patched local find_provides similarily +- Added a couple of patches that adjusts test values for the koji + i686 and ppc64 build servers +- Added -fPIC and -pie for el6 rebuilds +- redhat subdir is now fetched from new upstream gitrepo + +* Tue Sep 01 2015 Ingvar Hagelund 4.0.3-6 +- Rebuilt for jemalloc-4.0.0 + +* Wed Aug 26 2015 Ingvar Hagelund 4.1.0-0.1.tp1 +- Added patch for varnish unix-jail, instead of old-style -u user + +* Fri Aug 21 2015 Ingvar Hagelund 4.1.0-0.0.tp1 +- New upstream tech preview release +- Removed patches included upstream +- Prebuild html docs now placed in doc dir already + +* Fri Aug 21 2015 Ingvar Hagelund 4.0.3-5 +- Added example vcl files explicitly. They are installed by make, but + have been removed by the cleaning of docroot in older rpmbuild. This makes + varnish build again in rawhide + +* Fri Jun 19 2015 Fedora Release Engineering - 4.0.3-4.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Wed May 27 2015 Ingvar Hagelund 4.0.3-4 +- libs-devel package now requires python, closing #1225243 + +* Fri Mar 13 2015 Ingvar Hagelund 4.0.3-3 +- Added a patch fixing a crash on bogus content-length header, + closing #1200034 + +* Fri Mar 06 2015 Ingvar Hagelund 4.0.3-2 +- Added selinux module for varnish4 on el6 + +* 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 +- Added systemd services patch from Federico Schwindt + +* Mon Aug 18 2014 Fedora Release Engineering - 4.0.1-2.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Wed Jul 30 2014 Ingvar Hagelund 4.0.1-2 +- Rebased patch for el6 + +* Wed Jul 30 2014 Ingvar Hagelund 4.0.1-1 +- New upstream release +- systemd support for rhel7 +- Dropped patches included upstream + +* Sun Jun 08 2014 Fedora Release Engineering - 4.0.0-3.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Wed Apr 23 2014 Ingvar Hagelund 4.0.0-3 +- Added a patch that fixes broken find_provides and hard coded provides + from upstream +- Added _isa macro to the libs dependency and updated Group definitions to + more modern tags, closes bz 1090196 +- Added aclocal macros to libs-devel sub package + +* Tue Apr 22 2014 Ingvar Hagelund 4.0.0-2 +- Use _pkgdocdir macro on fedora + +* Fri Apr 11 2014 Ingvar Hagelund 4.0.0-1 +- New upstream release +- Updated patches to match new release +- Dropped patches included upstream + +* Tue Apr 01 2014 Ingvar Hagelund 4.0.0-0.4.beta1 +- New upstream beta release +- Added a few patches from upstream git for building on ppc + +* Wed Mar 12 2014 Ingvar Hagelund 4.0.0-0.3.tp2+20140327 +- Daily snapshot build + +* Wed Mar 12 2014 Ingvar Hagelund 4.0.0-0.2.tp2+20140306 +- First try on wrapping 4.0.0-tp2+ daily snapshot series +- Added the rc and __find_provides macros from upstream +- Added LD_LIBRARY_PATH fix for varnishd-to-sphinx doc thing +- Changed LD_LIBRARY_PATH for make check to something more readable +- etc/zope-plone.vcl is gone. example.vcl replaces default.vcl as example vcl doc +- Now using example.vcl for /etc/varnish/default.vcl +- Added docdir to configure call, to get example docs in the right place +- Systemd scripts are now upstream +- Added some explicit provides not found automatically + +* Tue Dec 03 2013 Ingvar Hagelund 3.0.5-1 +- New upstream release +- Dropped patch for CVE-2013-4484, as it's in upstream + +* Thu Nov 21 2013 Ingvar Hagelund 3.0.4-2 +- Changed default mask for varnish log dir to 700, closing #915413 +- Added a patch for CVE-2013-4484 from upstream, closing #1025128 + +* Mon Aug 12 2013 Ingvar Hagelund 3.0.4-1 +- New upstream release +- Added libedit-devel to the build reqs +- Changed the old-style initrc sed patching to a blacklist as in upstream +- Some tab vs space cleanup to make rpmlint more happy +- Added requirement of redhat-rpm-config, which provides redhat-hardened-cc1, + needed for _hardened_build, closes #975147 +- Removed no-pcre patch, as pcre is now switched off by default upstream + +* Sun Jul 28 2013 Dennis Gilmore - 3.0.3-6 +- no pcre jit on arm arches + +* Wed May 15 2013 Ingvar Hagelund 3.0.3-5 +- Added macro _hardened_build to enforce compiling with PIE, closes #955156 +- moved ldconfig in postun script to a shell line, since the following lines + may expand to more shell commands on fedora >=18 +- Corrected some bogus dates in the changelog + +* Fri Feb 15 2013 Fedora Release Engineering - 3.0.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Tue Oct 09 2012 Ingvar Hagelund - 3.0.3-3 +- Upped the minimum number of threads from 1 to 5, closes #861493 + +* Tue Sep 18 2012 Ingvar Hagelund - 3.0.3-2 +- Added a patch from phk, fixing upstream ppc64 bug #1194 + +* Tue Aug 21 2012 Ingvar Hagelund - 3.0.3-1 +- New upstream release +- Remove unneeded hacks for ppc +- Remove hacks for rhel4, we no longer support that +- Remove unneeded hacks for docs, since we use the pregenerated docs +- Add new systemd scriptlets from f18+ +- Added a patch switching off pcre jit on i386 and ppc to avoid upstream bug #1191 + +* Sun Jul 22 2012 Fedora Release Engineering - 3.0.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Mon Mar 12 2012 Ingvar Hagelund - 3.0.2-2 +- Added PrivateTmp=true to varnishd unit file, closing #782539 +- Fixed comment typos in varnish unit file + +* Tue Mar 06 2012 Ingvar Hagelund - 3.0.2-1 +- New upstream version 3.0.2 +- Removed INSTALL as requested by rpmlint +- Added a ld.so.conf.d fragment file listing libdir/varnish +- Removed redundant doc/html/_sources +- systemd support from fedora 17 +- Stopped using macros for make and install, according to + Fedora's packaging guidelines +- Changes merged from upstream: + - Added suse_version macro + - Added comments on building from a git checkout + - mkpasswd -> uuidgen for fewer dependencies + - Fixed missing quotes around cflags for pcre + - Removed unnecessary 32/64 bit parallell build hack as this is fixed upstream + - Fixed typo in configure call, disable -> without + - Added lib/libvgz/.libs to LD_LIBRARY_PATH in make check + - Added section 3 manpages + - Configure with --without-rst2man --without-rst2html + - changelog entries +- Removed unnecessary patch for system jemalloc, upstream now supports this + +* Fri Feb 10 2012 Petr Pisar - 2.1.5-4 +- Rebuild against PCRE 8.30 + +* Sat Jan 14 2012 Fedora Release Engineering - 2.1.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Feb 07 2011 Fedora Release Engineering - 2.1.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Tue Feb 01 2011 Ingvar Hagelund - 2.1.5-1 +- New upstream release +- New download location +- Moved varnish_reload_vcl to sbin +- Removed patches included upstream +- Use jemalloc as system installed library + +* Mon Nov 15 2010 Ingvar Hagelund - 3.0.0-0.svn20101115r5543 +- Merged some changes from fedora +- Upped general version to 3.0 prerelease in trunk + +* Thu Nov 04 2010 Ingvar Hagelund - 2.1.4-4 +- Added a patch fixing a missing echo in the init script that + masked failure output from the script +- Added a patch from upstream, fixing a problem with Content-Length + headers (upstream r5461, upstream bug #801) +- Added a patch from upstream, adding empty Default-Start and Default-Stop + to initscripts for better lsb compliance +- Added varnish_reload_vcl from trunk +- Synced descriptions from release spec + +* Thu Oct 28 2010 Ingvar Hagelund - 2.1.4-3 +- Fixed missing manpages because of no rst2man in rhel4 and 5 + +* Mon Oct 25 2010 Ingvar Hagelund - 2.1.4-2 +- Removed RHEL6/ppc64 specific patch that has been included upstream + +* Mon Oct 25 2010 Ingvar Hagelund - 2.1.4-1 +- New upstream release +- New URL for source tarball and main website +- Prebuilt html docs now included, use that instead of running sphinx +- Putting sphinx generated doc in a separate subpackage +- Replaced specific include files with a wildcard glob +- Needs python-sphinx and deps to build sphinx documentation + +* Tue Aug 24 2010 Ingvar Hagelund - 2.1.3-2 +- Added a RHEL6/ppc64 specific patch that changes the hard coded + stack size in tests/c00031.vtc + +* Thu Jul 29 2010 Ingvar Hagelund - 2.1.4-0.svn20100824r5117 +- Replaced specific include files with a wildcard glob +- Needs python-sphinx and deps to build sphinx documentation +- Builds html and latex documentation. Put that in a subpackage varnish-docs + +* Thu Jul 29 2010 Ingvar Hagelund - 2.1.3-1 +- New upstream release +- Add a patch for jemalloc on s390 that lacks upstream + +* Wed May 05 2010 Ingvar Hagelund - 2.1.2-1 +- New upstream release +- Remove patches merged upstream + +* 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 + +* Tue Apr 06 2010 Ingvar Hagelund - 2.1.0-1 +- New upstream release; note: Configuration changes, see the README +- Removed unneeded patches +- CVE-2009-2936: Added a patch from Debian that adds the -S option + to the varnisdh(1) manpage and to the sysconfig defaults, thus + password-protecting the admin interface port (#579536,#579533) +- Generates that password in the post script, requires mkpasswd +- Added a patch from Robert Scheck for explicit linking to libm +- Requires pcre + +* Wed Dec 23 2009 Ingvar Hagelund - 2.0.6-2 +- Added a test that enables jemalloc on ppc if the kernel is + not a rhel5 kernel (as on redhat builders) +- Removed tests c00031.vtc and r00387on rhel4/ppc as they fail + on the Red Hat ppc builders (but works on my rhel4 ppc instance) +- Added a patch that fixes broken changes-2.0.6.html in doc + +* Mon Dec 14 2009 Ingvar Hagelund - 2.0.6-1 +- New upstream release +- Removed patches for libjemalloc, as they are added upstream + +* Mon Nov 09 2009 Ingvar Hagelund - 2.0.5-1 +- New upstream release + +* Thu Aug 13 2009 Ingvar Hagelund - 2.0.4-4 +- Added a sparc specific patch to libjemalloc. + +* Sun Jul 26 2009 Fedora Release Engineering - 2.0.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Thu Jun 04 2009 Ingvar Hagelund - 2.0.4-2 +- Added a s390 specific patch to libjemalloc. + +* Fri Mar 27 2009 Ingvar Hagelund - 2.0.4-1 + New upstream release 2.0.4 + +* Wed Feb 25 2009 Fedora Release Engineering - 2.0.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Wed Feb 11 2009 Ingvar Hagelund - 2.0.3-1 + New upstream release 2.0.3. A bugfix and feature enhancement release + +* Fri Dec 12 2008 Ingvar Hagelund - 2.0.2-2 + Added a fix for a timeout bug, backported from trunk + +* Mon Nov 10 2008 Ingvar Hagelund - 2.0.2-1 + New upstream release 2.0.2. A bugfix release + +* Sun Nov 02 2008 Ingvar Hagelund - 2.0.1-2 +- Removed the requirement for kernel => 2.6.0. All supported + platforms meets this, and it generates strange errors in EPEL + +* Fri Oct 17 2008 Ingvar Hagelund - 2.0.1-1 +- 2.0.1 released, a bugfix release. New upstream sources +- Package now also available in EPEL + +* Thu Oct 16 2008 Ingvar Hagelund - 2.0-2 +- Readded the debugflag patch. It's so practical +- Added a strange workaround for make check on ppc64 + +* Wed Oct 15 2008 Ingvar Hagelund - 2.0-1 +- 2.0 released. New upstream sources +- Disabled jemalloc on ppc and ppc64. Added a note in README.redhat +- Synced to upstream again. No more patches needed + +* Wed Oct 08 2008 Ingvar Hagelund - 2.0-0.11.rc1 +- 2.0-rc1 released. New upstream sources +- Added a patch for pagesize to match redhat's rhel5 ppc64 koji build boxes +- Added a patch for test a00008, from r3269 +- Removed condrestart in postscript at upgrade. We don't want that + +* Fri Sep 26 2008 Ingvar Hagelund - 2.0-0.10.beta2 +- 2.0-beta2 released. New upstream sources +- Whitespace changes to make rpmlint more happy + +* Fri Sep 12 2008 Ingvar Hagelund - 2.0-0.9.20080912svn3184 +- Added varnisncsa init script (Colin Hill) +- Corrected varnishlog init script (Colin Hill) + +* Tue Sep 09 2008 Ingvar Hagelund - 2.0-0.8.beta1 +- Added a patch from r3171 that fixes an endian bug on ppc and ppc64 +- Added a hack that changes the varnishtest ports for 64bits builds, + so they can run in parallell with 32bits build on same build host + +* Tue Sep 02 2008 Ingvar Hagelund - 2.0-0.7.beta1 +- Added a patch from r3156 and r3157, hiding a legit errno in make check + +* Tue Sep 02 2008 Ingvar Hagelund - 2.0-0.6.beta1 +- Added a commented option for max coresize in the sysconfig script +- Added a comment in README.redhat about upgrading from 1.x to 2.0 + +* Fri Aug 29 2008 Ingvar Hagelund - 2.0-0.5.beta1 +- Bumped version numbers and source url for first beta release \o/ +- Added a missing directory to the libs-devel package (Michael Schwendt) +- Added the LICENSE file to the libs-devel package +- Moved make check to its proper place +- Removed superfluous definition of lockfile in initscripts + +* Wed Aug 27 2008 Ingvar Hagelund - 2.0-0.4.20080827svn3136 +- Fixed up init script for varnishlog too + +* Mon Aug 25 2008 Ingvar Hagelund - 2.0-0.3.20080825svn3125 +- Fixing up init script according to newer Fedora standards +- The build now runs the test suite after compiling +- Requires initscripts +- Change default.vcl from nothing but comments to point to localhost:80, + +* Mon Aug 18 2008 Ingvar Hagelund - 2.0-0.2.tp2 +- Changed source, version and release to match 2.0-tp2 + +* Thu Aug 14 2008 Ingvar Hagelund - 2.0-0.1.20080814svn +- default.vcl has moved +- Added groff to build requirements + +* Tue Feb 19 2008 Fedora Release Engineering - 1.1.2-6 +- Autorebuild for GCC 4.3 + +* Sat Dec 29 2007 Ingvar Hagelund - 1.1.2-5 +- Added missing configuration examples +- Corrected the license to "BSD" + +* Fri Dec 28 2007 Ingvar Hagelund - 1.1.2-4 +- Build for fedora update + +* Fri Dec 28 2007 Ingvar Hagelund - 1.1.2-2 +- Added missing changelog items + +* Thu Dec 20 2007 Stig Sandbeck Mathisen - 1.1.2-1 +- Bumped the version number to 1.1.2. +- Addeed build dependency on libxslt + +* Fri Sep 07 2007 Ingvar Hagelund - 1.1.1-3 +- Added a patch, changeset 1913 from svn trunk. This makes varnish + more stable under specific loads. + +* Thu Sep 06 2007 Ingvar Hagelund - 1.1.1-2 +- Removed autogen call (only diff from relase tarball) + +* Mon Aug 20 2007 Ingvar Hagelund - 1.1.1-1 +- Bumped the version number to 1.1.1. + +* Tue Aug 14 2007 Ingvar Hagelund - 1.1.svn +- Update for 1.1 branch +- Added the devel package for the header files and static library files +- Added a varnish user, and fixed the init script accordingly + +* Thu Jul 05 2007 Dag-Erling Smørgrav - 1.1-1 +- Bump Version and Release for 1.1 + +* Mon May 28 2007 Ingvar Hagelund - 1.0.4-3 +- Fixed initrc-script bug only visible on el4 (fixes #107) + +* Sun May 20 2007 Ingvar Hagelund - 1.0.4-2 +- Repack from unchanged 1.0.4 tarball +- Final review request and CVS request for Fedora Extras +- Repack with extra obsoletes for upgrading from older sf.net package + +* Fri May 18 2007 Dag-Erling Smørgrav - 1.0.4-1 +- Bump Version and Release for 1.0.4 + +* Wed May 16 2007 Ingvar Hagelund - 1.0.svn-20070517 +- Wrapping up for 1.0.4 +- Changes in sysconfig and init scripts. Syncing with files in + trunk/debian + +* Fri May 11 2007 Ingvar Hagelund - 1.0.svn-20070511 +- Threw latest changes into svn trunk +- Removed the conversion of manpages into utf8. They are all utf8 in trunk + +* Wed May 09 2007 Ingvar Hagelund - 1.0.3-7 +- Simplified the references to the subpackage names +- Added init and logrotate scripts for varnishlog + +* Mon Apr 23 2007 Ingvar Hagelund - 1.0.3-6 +- Removed unnecessary macro lib_name +- Fixed inconsistently use of brackets in macros +- Added a condrestart to the initscript +- All manfiles included, not just the compressed ones +- Removed explicit requirement for ncurses. rpmbuild figures out the + correct deps by itself. +- Added ulimit value to initskript and sysconfig file +- Many thanks to Matthias Saou for valuable input + +* Mon Apr 16 2007 Ingvar Hagelund - 1.0.3-5 +- Added the dist tag +- Exchanged RPM_BUILD_ROOT variable for buildroot macro +- Removed stripping of binaries to create a meaningful debug package +- Removed BuildRoot and URL from subpackages, they are picked from the + main package +- Removed duplication of documentation files in the subpackages +- 'chkconfig --list' removed from post script +- Package now includes _sysconfdir/varnish/ +- Trimmed package information +- Removed static libs and .so-symlinks. They can be added to a -devel package + later if anybody misses them + +* Wed Feb 28 2007 Ingvar Hagelund - 1.0.3-4 +- More small specfile fixes for Fedora Extras Package + Review Request, see bugzilla ticket 230275 +- Removed rpath (only visible on x86_64 and probably ppc64) + +* Tue Feb 27 2007 Ingvar Hagelund - 1.0.3-3 +- Made post-1.0.3 changes into a patch to the upstream tarball +- First Fedora Extras Package Review Request + +* Fri Feb 23 2007 Ingvar Hagelund - 1.0.3-2 +- A few other small changes to make rpmlint happy + +* Thu Feb 22 2007 Ingvar Hagelund - 1.0.3-1 +- New release 1.0.3. See the general ChangeLog +- Splitted the package into varnish, libvarnish1 and + libvarnish1-devel + +* Thu Oct 19 2006 Ingvar Hagelund - 1.0.2-7 +- Added a Vendor tag + +* Thu Oct 19 2006 Ingvar Hagelund - 1.0.2-6 +- Added redhat subdir to svn +- Removed default vcl config file. Used the new upstream variant instead. +- Based build on svn. Running autogen.sh as start of build. Also added + libtool, autoconf and automake to BuildRequires. +- Removed rule to move varnishd to sbin. This is now fixed in upstream +- Changed the sysconfig script to include a lot more nice features. + Most of these were ripped from the Debian package. Updated initscript + to reflect this. + +* Tue Oct 10 2006 Ingvar Hagelund - 1.0.1-3 +- Moved Red Hat specific files to its own subdirectory + +* Tue Sep 26 2006 Ingvar Hagelund - 1.0.1-2 +- Added gcc requirement. +- Changed to an even simpler example vcl in to /etc/varnish (thanks, perbu) +- Added a sysconfig entry + +* Fri Sep 22 2006 Ingvar Hagelund - 1.0.1-1 +- Initial build. diff --git a/varnishlog.service b/varnishlog.service new file mode 100644 index 0000000..1e3e274 --- /dev/null +++ b/varnishlog.service @@ -0,0 +1,11 @@ +[Unit] +Description=Varnish HTTP accelerator logging daemon +After=network.target + +[Service] +Type=forking +PIDFile=/run/varnishlog.pid +ExecStart=/usr/bin/varnishlog -a -w /var/log/varnish/varnish.log -D -P /run/varnishlog.pid + +[Install] +WantedBy=multi-user.target diff --git a/varnishncsa.service b/varnishncsa.service new file mode 100644 index 0000000..df5f19f --- /dev/null +++ b/varnishncsa.service @@ -0,0 +1,11 @@ +[Unit] +Description=Varnish NCSA logging +After=network.target + +[Service] +Type=forking +PIDFile=/run/varnishncsa.pid +ExecStart=/usr/bin/varnishncsa -a -w /var/log/varnish/varnishncsa.log -D -P /run/varnishncsa.pid + +[Install] +WantedBy=multi-user.target diff --git a/vsv00002_test.patch b/vsv00002_test.patch new file mode 100644 index 0000000..138e6b8 --- /dev/null +++ b/vsv00002_test.patch @@ -0,0 +1,11 @@ +--- bin/varnishtest/tests/r02429.vtc.orig 2017-11-16 11:08:04.718822949 +0100 ++++ bin/varnishtest/tests/r02429.vtc 2017-11-16 11:08:12.411275341 +0100 +@@ -4,7 +4,7 @@ + accept + } -start + +-varnish v1 -arg "-s Transient=file,${tmpdir}/_.file,1m" -vcl+backend { ++varnish v1 -arg "-s Transient=file,${tmpdir}/_.file,10m" -vcl+backend { + sub vcl_backend_error { + synthetic("foo"); + return (deliver);