diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6783298 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/varnish-4.0.3.tar.gz diff --git a/.rh-varnish4-varnish.metadata b/.rh-varnish4-varnish.metadata new file mode 100644 index 0000000..1b22fe6 --- /dev/null +++ b/.rh-varnish4-varnish.metadata @@ -0,0 +1 @@ +ba4668cb7d17f95c4c5e4baf964fe1412a269297 SOURCES/varnish-4.0.3.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/scl-register-helper.sh b/SOURCES/scl-register-helper.sh new file mode 100644 index 0000000..3ad5289 --- /dev/null +++ b/SOURCES/scl-register-helper.sh @@ -0,0 +1,113 @@ +#!/bin/sh + +scl_reggen(){ + + # helper function to save some chars + add2file(){ + if ! [ -f "${2}" ] ; then + mkdir -p $(dirname "${2}") + echo "#!/bin/sh" >"${2}" + chmod a+x "${2}" + fi + echo "${1}" >>"${2}" + } + + package=$1 + [ -z "$package" ] && echo "No package specified." && return 1 + shift + + while [ -n "$1" ] ; do + action="$1" + shift + + case "$action" in + + --cpfile ) + file=$1 + shift + [ -z "$file" ] && echo "No file specified for cpfile." && return 1 + # make dir and cp file + mkdir -p $(dirname ${_SR_BUILDROOT}${_SR_SCL_SCRIPTS}/register.content${file}) + cp ${_SR_BUILDROOT}${file} ${_SR_BUILDROOT}${_SR_SCL_SCRIPTS}/register.content${file} + # add command to script that handles copying file on register + add2file "cp -n ${_SR_SCL_SCRIPTS}/register.content${file} ${file}" \ + ${_SR_BUILDROOT}${_SR_SCL_SCRIPTS}/register.d/50.${package}.content-create + # add command to script that handles removing file on deregister + add2file "rm -f ${file}" ${_SR_BUILDROOT}${_SR_SCL_SCRIPTS}/deregister.d/50.${package}.content-remove + ;; + + --selinux ) + dst=$1 + src=$2 + shift 2 + [ -z "$dst" ] && echo "No src or dst specified for selinux." && return 1 + # store rule for setting selinux + add2file "semanage fcontext -a -e \"$src\" \"$dst\" >/dev/null 2>&1 || :" \ + ${_SR_BUILDROOT}${_SR_SCL_SCRIPTS}/register.d/20.${package}.selinux-set + # store rule for restoring selinux + add2file "restorecon -R \"$dst\" >/dev/null 2>&1 || :" \ + ${_SR_BUILDROOT}${_SR_SCL_SCRIPTS}/register.d/80.${package}.selinux-restore + ;; + + --mkdir ) + dst=$1 + shift + [ -z "$dst" ] && echo "No dst specified for mkdir." && return 1 + # store command for creating directory + add2file "mkdir -p ${dst}" ${_SR_BUILDROOT}${_SR_SCL_SCRIPTS}/register.d/40.${package}.content-create + # store command for removing directory if empty, ignore errors + add2file "rmdir --ignore-fail-on-non-empty -p ${dst}" \ + ${_SR_BUILDROOT}${_SR_SCL_SCRIPTS}/deregister.d/60.${package}.content-remove + ;; + + --touch ) + file=$1 + shift + [ -z "$file" ] && echo "No file specified for touch." && return 1 + # store command for creating file + add2file "touch ${file}" ${_SR_BUILDROOT}${_SR_SCL_SCRIPTS}/register.d/50.${package}.content-create + # add command to script that handles removing file on deregister + add2file "rm -f ${file}" ${_SR_BUILDROOT}${_SR_SCL_SCRIPTS}/deregister.d/50.${package}.content-remove + ;; + + --chmod ) + dst=$1 + args=$2 + shift 2 + [ -z "$args" ] && echo "No dst or args specified for chmod." && return 1 + # store command for chmod + add2file "chmod $args ${dst}" ${_SR_BUILDROOT}${_SR_SCL_SCRIPTS}/register.d/60.${package}.attrs + ;; + + --chown ) + dst=$1 + args=$2 + shift 2 + [ -z "$args" ] && echo "No dst or args specified for chown." && return 1 + # store command for chown + add2file "chown $args ${dst}" ${_SR_BUILDROOT}${_SR_SCL_SCRIPTS}/register.d/60.${package}.attrs + ;; + + --runafterregister ) + cmd=$1 + shift + [ -z "$cmd" ] && echo "No cmd specified for run." && return 1 + # store command for running after + add2file "$cmd" ${_SR_BUILDROOT}${_SR_SCL_SCRIPTS}/register.d/90.${package}.run + ;; + + --runafterderegister ) + cmd=$1 + shift + [ -z "$cmd" ] && echo "No cmd specified for run." && return 1 + # store command for running after + add2file "$cmd" ${_SR_BUILDROOT}${_SR_SCL_SCRIPTS}/deregister.d/90.${package}.run + ;; + + *) + echo "Wrong action $*" + return 1 + ;; + esac + done +} diff --git a/SOURCES/varnish-4.0.2.fix_ld_library_path_in_sphinx_build.patch b/SOURCES/varnish-4.0.2.fix_ld_library_path_in_sphinx_build.patch new file mode 100644 index 0000000..751739d --- /dev/null +++ b/SOURCES/varnish-4.0.2.fix_ld_library_path_in_sphinx_build.patch @@ -0,0 +1,10 @@ +--- doc/sphinx/Makefile.in.orig 2014-10-08 09:48:47.000000000 +0200 ++++ doc/sphinx/Makefile.in 2014-11-25 22:49:55.137641462 +0100 +@@ -517,6 +517,7 @@ + rm -rf $(BUILDDIR) + + include/params.rst: $(top_builddir)/bin/varnishd/varnishd ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnish/.libs:$(top_builddir)/lib/libvarnishcompat/.libs:$(top_builddir)/lib/libvcc/.libs:$(top_builddir)/lib/libvgz/.libs \ + $(top_builddir)/bin/varnishd/varnishd -x dumprstparam > include/params.rst + + # XXX add varnishstat here when it's been _opt2rst'ed diff --git a/SOURCES/varnish-4.0.3-soname.patch b/SOURCES/varnish-4.0.3-soname.patch new file mode 100644 index 0000000..bcefdd7 --- /dev/null +++ b/SOURCES/varnish-4.0.3-soname.patch @@ -0,0 +1,376 @@ +diff --git a/bin/varnishadm/Makefile.in b/bin/varnishadm/Makefile.in +index 621ee35..58a3d2a 100644 +--- a/bin/varnishadm/Makefile.in ++++ b/bin/varnishadm/Makefile.in +@@ -72,7 +72,7 @@ AM_V_lt = $(am__v_lt_@AM_V@) + am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) + am__v_lt_0 = --silent + varnishadm_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ +- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(varnishadm_CFLAGS) \ ++ $(LIBTOOLFLAGS) --mode=link $(CCLD) -release rh-varnish4 $(varnishadm_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ + DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) + depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp +@@ -92,7 +92,7 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) + am__v_at_0 = @ + CCLD = $(CC) + LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ +- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ ++ $(LIBTOOLFLAGS) --mode=link $(CCLD) -release rh-varnish4 $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ + AM_V_CCLD = $(am__v_CCLD_@AM_V@) + am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +diff --git a/bin/varnishd/Makefile.in b/bin/varnishd/Makefile.in +index b191bcd..d3653af 100644 +--- a/bin/varnishd/Makefile.in ++++ b/bin/varnishd/Makefile.in +@@ -128,7 +128,7 @@ AM_V_lt = $(am__v_lt_@AM_V@) + am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) + am__v_lt_0 = --silent + varnishd_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ +- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(varnishd_CFLAGS) \ ++ $(LIBTOOLFLAGS) --mode=link $(CCLD) -release rh-varnish4 $(varnishd_CFLAGS) \ + $(CFLAGS) $(varnishd_LDFLAGS) $(LDFLAGS) -o $@ + DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) + depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp +@@ -148,7 +148,7 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) + am__v_at_0 = @ + CCLD = $(CC) + LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ +- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ ++ $(LIBTOOLFLAGS) --mode=link $(CCLD) -release rh-varnish4 $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ + AM_V_CCLD = $(am__v_CCLD_@AM_V@) + am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +diff --git a/bin/varnishhist/Makefile.in b/bin/varnishhist/Makefile.in +index ded554b..c9e07a2 100644 +--- a/bin/varnishhist/Makefile.in ++++ b/bin/varnishhist/Makefile.in +@@ -93,7 +93,7 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) + am__v_at_0 = @ + CCLD = $(CC) + LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ +- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ ++ $(LIBTOOLFLAGS) --mode=link $(CCLD) -release rh-varnish4 $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ + AM_V_CCLD = $(am__v_CCLD_@AM_V@) + am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +diff --git a/bin/varnishlog/Makefile.in b/bin/varnishlog/Makefile.in +index b228951..6f3c47d 100644 +--- a/bin/varnishlog/Makefile.in ++++ b/bin/varnishlog/Makefile.in +@@ -95,7 +95,7 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) + am__v_at_0 = @ + CCLD = $(CC) + LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ +- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ ++ $(LIBTOOLFLAGS) --mode=link $(CCLD) -release rh-varnish4 $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ + AM_V_CCLD = $(am__v_CCLD_@AM_V@) + am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +diff --git a/bin/varnishncsa/Makefile.in b/bin/varnishncsa/Makefile.in +index 927d1f4..1b92ac1 100644 +--- a/bin/varnishncsa/Makefile.in ++++ b/bin/varnishncsa/Makefile.in +@@ -94,7 +94,7 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) + am__v_at_0 = @ + CCLD = $(CC) + LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ +- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ ++ $(LIBTOOLFLAGS) --mode=link $(CCLD) -release rh-varnish4 $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ + AM_V_CCLD = $(am__v_CCLD_@AM_V@) + am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +diff --git a/bin/varnishstat/Makefile.in b/bin/varnishstat/Makefile.in +index 8d9a584..6738133 100644 +--- a/bin/varnishstat/Makefile.in ++++ b/bin/varnishstat/Makefile.in +@@ -89,7 +89,7 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) + am__v_at_0 = @ + CCLD = $(CC) + LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ +- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ ++ $(LIBTOOLFLAGS) --mode=link $(CCLD) -release rh-varnish4 $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ + AM_V_CCLD = $(am__v_CCLD_@AM_V@) + am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +diff --git a/bin/varnishtest/Makefile.in b/bin/varnishtest/Makefile.in +index 073e4fc..9c8b9d1 100644 +--- a/bin/varnishtest/Makefile.in ++++ b/bin/varnishtest/Makefile.in +@@ -77,7 +77,7 @@ AM_V_lt = $(am__v_lt_@AM_V@) + am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) + am__v_lt_0 = --silent + varnishtest_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ +- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(varnishtest_CFLAGS) \ ++ $(LIBTOOLFLAGS) --mode=link $(CCLD) -release rh-varnish4 $(varnishtest_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ + DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) + depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp +@@ -97,7 +97,7 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) + am__v_at_0 = @ + CCLD = $(CC) + LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ +- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ ++ $(LIBTOOLFLAGS) --mode=link $(CCLD) -release rh-varnish4 $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ + AM_V_CCLD = $(am__v_CCLD_@AM_V@) + am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +diff --git a/bin/varnishtop/Makefile.in b/bin/varnishtop/Makefile.in +index 59bfa9e..4d6da76 100644 +--- a/bin/varnishtop/Makefile.in ++++ b/bin/varnishtop/Makefile.in +@@ -95,7 +95,7 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) + am__v_at_0 = @ + CCLD = $(CC) + LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ +- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ ++ $(LIBTOOLFLAGS) --mode=link $(CCLD) -release rh-varnish4 $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ + AM_V_CCLD = $(am__v_CCLD_@AM_V@) + am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh +index c2852d8..b98e506 100644 +--- a/build-aux/ltmain.sh ++++ b/build-aux/ltmain.sh +@@ -2393,7 +2393,7 @@ BSD-compatible install options are recognized)." + + link) + $ECHO \ +-"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... ++"Usage: $progname [OPTION]... -release rh-varnish4 --mode=link LINK-COMMAND... + + Link object files or libraries together to form another library, or to + create an executable program. +diff --git a/lib/libvarnish/Makefile.in b/lib/libvarnish/Makefile.in +index 92dd001..893ce11 100644 +--- a/lib/libvarnish/Makefile.in ++++ b/lib/libvarnish/Makefile.in +@@ -105,7 +105,7 @@ AM_V_lt = $(am__v_lt_@AM_V@) + am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) + am__v_lt_0 = --silent + libvarnish_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ +- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libvarnish_la_CFLAGS) \ ++ $(LIBTOOLFLAGS) --mode=link $(CCLD) -release rh-varnish4 $(libvarnish_la_CFLAGS) \ + $(CFLAGS) $(libvarnish_la_LDFLAGS) $(LDFLAGS) -o $@ + @ENABLE_TESTS_TRUE@am__EXEEXT_1 = vnum_c_test$(EXEEXT) + PROGRAMS = $(noinst_PROGRAMS) +@@ -115,7 +115,7 @@ am__vnum_c_test_SOURCES_DIST = vnum.c + vnum_c_test_OBJECTS = $(am_vnum_c_test_OBJECTS) + @ENABLE_TESTS_TRUE@vnum_c_test_DEPENDENCIES = $(am__DEPENDENCIES_1) + vnum_c_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ +- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(vnum_c_test_CFLAGS) \ ++ $(LIBTOOLFLAGS) --mode=link $(CCLD) -release rh-varnish4 $(vnum_c_test_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ + DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) + depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp +@@ -135,7 +135,7 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) + am__v_at_0 = @ + CCLD = $(CC) + LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ +- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ ++ $(LIBTOOLFLAGS) --mode=link $(CCLD) -release rh-varnish4 $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ + AM_V_CCLD = $(am__v_CCLD_@AM_V@) + am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +diff --git a/lib/libvarnishapi/Makefile.in b/lib/libvarnishapi/Makefile.in +index 625b5a8..42116d7 100644 +--- a/lib/libvarnishapi/Makefile.in ++++ b/lib/libvarnishapi/Makefile.in +@@ -108,7 +108,7 @@ AM_V_lt = $(am__v_lt_@AM_V@) + am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) + am__v_lt_0 = --silent + libvarnishapi_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ +- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ ++ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) -release rh-varnish4 \ + $(libvarnishapi_la_CFLAGS) $(CFLAGS) \ + $(libvarnishapi_la_LDFLAGS) $(LDFLAGS) -o $@ + PROGRAMS = $(noinst_PROGRAMS) +@@ -121,7 +121,7 @@ am__DEPENDENCIES_1 = + vsl_glob_test_DEPENDENCIES = $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) libvarnishapi.la + vsl_glob_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ +- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(vsl_glob_test_CFLAGS) \ ++ $(LIBTOOLFLAGS) --mode=link $(CCLD) -release rh-varnish4 $(vsl_glob_test_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ + am__objects_1 = vxp_test-vas.$(OBJEXT) vxp_test-vav.$(OBJEXT) \ + vxp_test-version.$(OBJEXT) vxp_test-cli_common.$(OBJEXT) \ +@@ -140,7 +140,7 @@ vxp_test_OBJECTS = $(am_vxp_test_OBJECTS) + vxp_test_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) + vxp_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ +- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(vxp_test_CFLAGS) \ ++ $(LIBTOOLFLAGS) --mode=link $(CCLD) -release rh-varnish4 $(vxp_test_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ + DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) + depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp +@@ -160,7 +160,7 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) + am__v_at_0 = @ + CCLD = $(CC) + LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ +- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ ++ $(LIBTOOLFLAGS) --mode=link $(CCLD) -release rh-varnish4 $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ + AM_V_CCLD = $(am__v_CCLD_@AM_V@) + am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +diff --git a/lib/libvarnishcompat/Makefile.in b/lib/libvarnishcompat/Makefile.in +index 00c932a..c7564b2 100644 +--- a/lib/libvarnishcompat/Makefile.in ++++ b/lib/libvarnishcompat/Makefile.in +@@ -91,7 +91,7 @@ AM_V_lt = $(am__v_lt_@AM_V@) + am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) + am__v_lt_0 = --silent + libvarnishcompat_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ +- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ ++ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) -release rh-varnish4 \ + $(AM_CFLAGS) $(CFLAGS) $(libvarnishcompat_la_LDFLAGS) \ + $(LDFLAGS) -o $@ + DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +@@ -112,7 +112,7 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) + am__v_at_0 = @ + CCLD = $(CC) + LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ +- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ ++ $(LIBTOOLFLAGS) --mode=link $(CCLD) -release rh-varnish4 $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ + AM_V_CCLD = $(am__v_CCLD_@AM_V@) + am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +diff --git a/lib/libvcc/Makefile.in b/lib/libvcc/Makefile.in +index 9f0469a..3628b08 100644 +--- a/lib/libvcc/Makefile.in ++++ b/lib/libvcc/Makefile.in +@@ -96,7 +96,7 @@ AM_V_lt = $(am__v_lt_@AM_V@) + am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) + am__v_lt_0 = --silent + libvcc_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ +- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ ++ $(LIBTOOLFLAGS) --mode=link $(CCLD) -release rh-varnish4 $(AM_CFLAGS) $(CFLAGS) \ + $(libvcc_la_LDFLAGS) $(LDFLAGS) -o $@ + SCRIPTS = $(dist_pkgdata_SCRIPTS) + DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +@@ -117,7 +117,7 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) + am__v_at_0 = @ + CCLD = $(CC) + LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ +- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ ++ $(LIBTOOLFLAGS) --mode=link $(CCLD) -release rh-varnish4 $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ + AM_V_CCLD = $(am__v_CCLD_@AM_V@) + am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +diff --git a/lib/libvgz/Makefile.in b/lib/libvgz/Makefile.in +index 426d479..82b7097 100644 +--- a/lib/libvgz/Makefile.in ++++ b/lib/libvgz/Makefile.in +@@ -93,7 +93,7 @@ AM_V_lt = $(am__v_lt_@AM_V@) + am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) + am__v_lt_0 = --silent + libvgz_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ +- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libvgz_la_CFLAGS) \ ++ $(LIBTOOLFLAGS) --mode=link $(CCLD) -release rh-varnish4 $(libvgz_la_CFLAGS) \ + $(CFLAGS) $(libvgz_la_LDFLAGS) $(LDFLAGS) -o $@ + DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) + depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp +@@ -113,7 +113,7 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) + am__v_at_0 = @ + CCLD = $(CC) + LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ +- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ ++ $(LIBTOOLFLAGS) --mode=link $(CCLD) -release rh-varnish4 $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ + AM_V_CCLD = $(am__v_CCLD_@AM_V@) + am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +diff --git a/lib/libvmod_debug/Makefile.in b/lib/libvmod_debug/Makefile.in +index 23d7700..7019702 100644 +--- a/lib/libvmod_debug/Makefile.in ++++ b/lib/libvmod_debug/Makefile.in +@@ -63,7 +63,7 @@ AM_V_lt = $(am__v_lt_@AM_V@) + am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) + am__v_lt_0 = --silent + libvmod_debug_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ +- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ ++ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) -release rh-varnish4 \ + $(AM_CFLAGS) $(CFLAGS) $(libvmod_debug_la_LDFLAGS) $(LDFLAGS) \ + -o $@ + DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +@@ -84,7 +84,7 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) + am__v_at_0 = @ + CCLD = $(CC) + LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ +- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ ++ $(LIBTOOLFLAGS) --mode=link $(CCLD) -release rh-varnish4 $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ + AM_V_CCLD = $(am__v_CCLD_@AM_V@) + am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +diff --git a/lib/libvmod_directors/Makefile.in b/lib/libvmod_directors/Makefile.in +index 6c267c5..033e020 100644 +--- a/lib/libvmod_directors/Makefile.in ++++ b/lib/libvmod_directors/Makefile.in +@@ -92,7 +92,7 @@ AM_V_lt = $(am__v_lt_@AM_V@) + am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) + am__v_lt_0 = --silent + libvmod_directors_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ +- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ ++ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) -release rh-varnish4 \ + $(AM_CFLAGS) $(CFLAGS) $(libvmod_directors_la_LDFLAGS) \ + $(LDFLAGS) -o $@ + DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +@@ -113,7 +113,7 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) + am__v_at_0 = @ + CCLD = $(CC) + LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ +- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ ++ $(LIBTOOLFLAGS) --mode=link $(CCLD) -release rh-varnish4 $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ + AM_V_CCLD = $(am__v_CCLD_@AM_V@) + am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +diff --git a/lib/libvmod_std/Makefile.in b/lib/libvmod_std/Makefile.in +index ab7632a..a6eaab9 100644 +--- a/lib/libvmod_std/Makefile.in ++++ b/lib/libvmod_std/Makefile.in +@@ -94,7 +94,7 @@ AM_V_lt = $(am__v_lt_@AM_V@) + am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) + am__v_lt_0 = --silent + libvmod_std_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ +- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ ++ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) -release rh-varnish4 \ + $(AM_CFLAGS) $(CFLAGS) $(libvmod_std_la_LDFLAGS) $(LDFLAGS) -o \ + $@ + DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +@@ -115,7 +115,7 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) + am__v_at_0 = @ + CCLD = $(CC) + LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ +- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ ++ $(LIBTOOLFLAGS) --mode=link $(CCLD) -release rh-varnish4 $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ + AM_V_CCLD = $(am__v_CCLD_@AM_V@) + am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +diff --git a/man/Makefile.in b/man/Makefile.in +index 7a54b0d..a426a35 100644 +--- a/man/Makefile.in ++++ b/man/Makefile.in +@@ -82,7 +82,7 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) + am__v_at_0 = @ + CCLD = $(CC) + LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ +- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ ++ $(LIBTOOLFLAGS) --mode=link $(CCLD) -release rh-varnish4 $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ + AM_V_CCLD = $(am__v_CCLD_@AM_V@) + am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +diff --git a/redhat/find-provides b/redhat/find-provides +index 2545e99..d0928b9 100755 +--- a/redhat/find-provides ++++ b/redhat/find-provides +@@ -13,8 +13,8 @@ fi + cd $(dirname $0)/.. + + printf '#include "vcs_version.h"\nVCS_Version\n' \ +- | cpp - -Iinclude | sed -e '/^"/!d' -e 's/\"//g' -e 's/^/varnishabi-strict-/' ++ | cpp - -Iinclude | sed -e '/^"/!d' -e 's/\"//g' -e 's/^/rh-varnish4abi-strict-/' + +-printf '#include "vrt.h"\nvarnishabi- VRT_MAJOR_VERSION . VRT_MINOR_VERSION\n' \ ++printf '#include "vrt.h"\nrh-varnish4abi- VRT_MAJOR_VERSION . VRT_MINOR_VERSION\n' \ + | cpp - -Iinclude \ +- | sed -e '/^varnishabi-/!d' -e 's/U//g' -e 's/ //g' ++ | sed -e '/^rh-varnish4abi-/!d' -e 's/U//g' -e 's/ //g' diff --git a/SOURCES/varnish-4.0.3_fix_Werror_el6.patch b/SOURCES/varnish-4.0.3_fix_Werror_el6.patch new file mode 100644 index 0000000..277795a --- /dev/null +++ b/SOURCES/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/SOURCES/varnish-4.0.3_fix_content_length_bug.patch b/SOURCES/varnish-4.0.3_fix_content_length_bug.patch new file mode 100644 index 0000000..5fe7101 --- /dev/null +++ b/SOURCES/varnish-4.0.3_fix_content_length_bug.patch @@ -0,0 +1,274 @@ +This patch is a rebase of commit 9d61ea4d722549a984d912603902fccfac473824 +Author: Martin Blix Grydeland +Date: Fri Mar 13 15:23:15 2015 +0100 + + Fail fetch on malformed Content-Length header + + Add a common content length parser that is being used by both client + and backend side. + + Original patch by: fgs + + Fixes: #1691 + +diff -Nur varnish-4.0.3.nofix/bin/varnishd/cache/cache.h varnish-4.0.3/bin/varnishd/cache/cache.h +--- varnish-4.0.3.nofix/bin/varnishd/cache/cache.h 2015-02-18 15:14:11.000000000 +0100 ++++ varnish-4.0.3/bin/varnishd/cache/cache.h 2015-03-13 16:22:42.943549723 +0100 +@@ -208,7 +208,7 @@ + * + */ + +-typedef ssize_t htc_read(struct http_conn *, void *, size_t); ++typedef ssize_t htc_read(struct http_conn *, void *, ssize_t); + + struct http_conn { + unsigned magic; +@@ -560,7 +560,7 @@ + + struct pool_task fetch_task; + +- char *h_content_length; ++ ssize_t content_length; + + #define BO_FLAG(l, r, w, d) unsigned l:1; + #include "tbl/bo_flags.h" +@@ -1014,6 +1014,7 @@ + int http_GetHdrField(const struct http *hp, const char *hdr, + const char *field, char **ptr); + double http_GetHdrQ(const struct http *hp, const char *hdr, const char *field); ++ssize_t http_GetContentLength(const struct http *hp); + uint16_t http_GetStatus(const struct http *hp); + void http_SetStatus(struct http *to, uint16_t status); + const char *http_GetReq(const struct http *hp); +@@ -1040,7 +1041,7 @@ + unsigned maxbytes, unsigned maxhdr); + enum htc_status_e HTTP1_Reinit(struct http_conn *htc); + enum htc_status_e HTTP1_Rx(struct http_conn *htc); +-ssize_t HTTP1_Read(struct http_conn *htc, void *d, size_t len); ++ssize_t HTTP1_Read(struct http_conn *htc, void *d, ssize_t len); + enum htc_status_e HTTP1_Complete(struct http_conn *htc); + uint16_t HTTP1_DissectRequest(struct req *); + uint16_t HTTP1_DissectResponse(struct http *sp, const struct http_conn *htc); +diff -Nur varnish-4.0.3.nofix/bin/varnishd/cache/cache_http1_fetch.c varnish-4.0.3/bin/varnishd/cache/cache_http1_fetch.c +--- varnish-4.0.3.nofix/bin/varnishd/cache/cache_http1_fetch.c 2015-02-18 15:14:11.000000000 +0100 ++++ varnish-4.0.3/bin/varnishd/cache/cache_http1_fetch.c 2015-03-13 16:22:42.944549727 +0100 +@@ -43,29 +43,6 @@ + #include "vtcp.h" + #include "vtim.h" + +-/*-------------------------------------------------------------------- +- * Convert a string to a size_t safely +- */ +- +-static ssize_t +-vbf_fetch_number(const char *nbr, int radix) +-{ +- uintmax_t cll; +- ssize_t cl; +- char *q; +- +- if (*nbr == '\0') +- return (-1); +- cll = strtoumax(nbr, &q, radix); +- if (q == NULL || *q != '\0') +- return (-1); +- +- cl = (ssize_t)cll; +- if((uintmax_t)cl != cll) /* Protect against bogusly large values */ +- return (-1); +- return (cl); +-} +- + /*--------------------------------------------------------------------*/ + + static enum vfp_status __match_proto__(vfp_pull_f) +@@ -167,7 +144,6 @@ + V1F_Setup_Fetch(struct busyobj *bo) + { + struct http_conn *htc; +- ssize_t cl; + + CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC); + htc = &bo->htc; +@@ -176,13 +152,15 @@ + + switch(htc->body_status) { + case BS_EOF: ++ assert(bo->content_length == -1); + VFP_Push(bo, v1f_pull_eof, 0); + return(-1); + case BS_LENGTH: +- cl = vbf_fetch_number(bo->h_content_length, 10); +- VFP_Push(bo, v1f_pull_straight, cl); +- return (cl); ++ assert(bo->content_length > 0); ++ VFP_Push(bo, v1f_pull_straight, bo->content_length); ++ return (bo->content_length); + case BS_CHUNKED: ++ assert(bo->content_length == -1); + VFP_Push(bo, v1f_pull_chunked, -1); + return (-1); + default: +diff -Nur varnish-4.0.3.nofix/bin/varnishd/cache/cache_http1_fsm.c varnish-4.0.3/bin/varnishd/cache/cache_http1_fsm.c +--- varnish-4.0.3.nofix/bin/varnishd/cache/cache_http1_fsm.c 2015-02-18 15:14:11.000000000 +0100 ++++ varnish-4.0.3/bin/varnishd/cache/cache_http1_fsm.c 2015-03-13 16:22:42.944549727 +0100 +@@ -262,22 +262,22 @@ + static enum req_body_state_e + http1_req_body_status(struct req *req) + { +- char *ptr, *endp; ++ ssize_t cl; + + CHECK_OBJ_NOTNULL(req, REQ_MAGIC); + +- if (http_GetHdr(req->http, H_Content_Length, &ptr)) { +- AN(ptr); +- if (*ptr == '\0') +- return (REQ_BODY_FAIL); +- req->req_bodybytes = strtoul(ptr, &endp, 10); +- if (*endp != '\0' && !vct_islws(*endp)) +- return (REQ_BODY_FAIL); +- if (req->req_bodybytes == 0) +- return (REQ_BODY_NONE); ++ req->req_bodybytes = 0; ++ cl = http_GetContentLength(req->http); ++ if (cl == -2) ++ return (REQ_BODY_FAIL); ++ else if (cl == 0) ++ return (REQ_BODY_NONE); ++ else if (cl > 0) { ++ req->req_bodybytes = cl; + req->h1.bytes_yet = req->req_bodybytes - req->h1.bytes_done; + return (REQ_BODY_PRESENT); + } ++ assert(cl == -1); /* No Content-Length header */ + if (http_HdrIs(req->http, H_Transfer_Encoding, "chunked")) { + req->chunk_ctr = -1; + return (REQ_BODY_CHUNKED); +diff -Nur varnish-4.0.3.nofix/bin/varnishd/cache/cache_http1_proto.c varnish-4.0.3/bin/varnishd/cache/cache_http1_proto.c +--- varnish-4.0.3.nofix/bin/varnishd/cache/cache_http1_proto.c 2015-02-18 15:14:11.000000000 +0100 ++++ varnish-4.0.3/bin/varnishd/cache/cache_http1_proto.c 2015-03-13 16:22:42.944549727 +0100 +@@ -191,14 +191,15 @@ + * Read up to len bytes, returning pipelined data first. + */ + +-ssize_t +-HTTP1_Read(struct http_conn *htc, void *d, size_t len) ++ssize_t __match_proto__(htc_read) ++HTTP1_Read(struct http_conn *htc, void *d, ssize_t len) + { + size_t l; + unsigned char *p; + ssize_t i = 0; + + CHECK_OBJ_NOTNULL(htc, HTTP_CONN_MAGIC); ++ assert(len > 0); + l = 0; + p = d; + if (htc->pipeline.b) { +diff -Nur varnish-4.0.3.nofix/bin/varnishd/cache/cache_http.c varnish-4.0.3/bin/varnishd/cache/cache_http.c +--- varnish-4.0.3.nofix/bin/varnishd/cache/cache_http.c 2015-02-18 15:14:11.000000000 +0100 ++++ varnish-4.0.3/bin/varnishd/cache/cache_http.c 2015-03-13 16:22:42.943549723 +0100 +@@ -488,6 +488,35 @@ + return (i); + } + ++/*--------------------------------------------------------------------*/ ++ ++ssize_t ++http_GetContentLength(const struct http *hp) ++{ ++ ssize_t cl, cll; ++ char *b; ++ ++ CHECK_OBJ_NOTNULL(hp, HTTP_MAGIC); ++ ++ if (!http_GetHdr(hp, H_Content_Length, &b)) ++ return (-1); ++ cl = 0; ++ if (!vct_isdigit(*b)) ++ return (-2); ++ for (;vct_isdigit(*b); b++) { ++ cll = cl; ++ cl *= 10; ++ cl += *b - '0'; ++ if (cll != cl / 10) ++ return (-2); ++ } ++ while (vct_islws(*b)) ++ b++; ++ if (*b != '\0') ++ return (-2); ++ return (cl); ++} ++ + /*-------------------------------------------------------------------- + * XXX: redo with http_GetHdrField() ? + */ +diff -Nur varnish-4.0.3.nofix/bin/varnishd/cache/cache_rfc2616.c varnish-4.0.3/bin/varnishd/cache/cache_rfc2616.c +--- varnish-4.0.3.nofix/bin/varnishd/cache/cache_rfc2616.c 2015-02-18 15:14:11.000000000 +0100 ++++ varnish-4.0.3/bin/varnishd/cache/cache_rfc2616.c 2015-03-13 16:22:42.944549727 +0100 +@@ -188,6 +188,7 @@ + RFC2616_Body(struct busyobj *bo, struct dstat *stats) + { + struct http *hp; ++ ssize_t cl; + char *b; + + hp = bo->beresp; +@@ -199,6 +200,8 @@ + else + bo->should_close = 0; + ++ bo->content_length = -1; ++ + if (!strcasecmp(http_GetReq(bo->bereq), "head")) { + /* + * A HEAD request can never have a body in the reply, +@@ -246,9 +249,18 @@ + return (BS_ERROR); + } + +- if (http_GetHdr(hp, H_Content_Length, &bo->h_content_length)) { +- stats->fetch_length++; +- return (BS_LENGTH); ++ cl = http_GetContentLength(hp); ++ if (cl == -2) ++ return (BS_ERROR); ++ if (cl >= 0) { ++ bo->content_length = cl; ++ if (cl == 0) { ++ stats->fetch_zero++; ++ return (BS_NONE); ++ } else { ++ stats->fetch_length++; ++ return (BS_LENGTH); ++ } + } + + if (http_HdrIs(hp, H_Connection, "keep-alive")) { +diff -Nur varnish-4.0.3.nofix/bin/varnishtest/tests/r01691.vtc varnish-4.0.3/bin/varnishtest/tests/r01691.vtc +--- varnish-4.0.3.nofix/bin/varnishtest/tests/r01691.vtc 1970-01-01 01:00:00.000000000 +0100 ++++ varnish-4.0.3/bin/varnishtest/tests/r01691.vtc 2015-03-13 16:22:42.945549731 +0100 +@@ -0,0 +1,21 @@ ++varnishtest "Test bogus Content-Length header" ++ ++server s1 { ++ rxreq ++ txresp -nolen -hdr "Content-Length: bogus" ++} -start ++ ++varnish v1 -vcl+backend { ++ ++} -start ++ ++logexpect l1 -v v1 { ++ expect * 1002 VCL_Error "Body cannot be fetched" ++} -start ++ ++client c1 { ++ txreq ++ rxresp ++} -run ++ ++logexpect l1 -wait diff --git a/SOURCES/varnish-4.0.3_fix_python24.el5.patch b/SOURCES/varnish-4.0.3_fix_python24.el5.patch new file mode 100644 index 0000000..24206f6 --- /dev/null +++ b/SOURCES/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/SOURCES/varnish-4.0.3_fix_varnish4_selinux.el6.patch b/SOURCES/varnish-4.0.3_fix_varnish4_selinux.el6.patch new file mode 100644 index 0000000..2a8deed --- /dev/null +++ b/SOURCES/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/SOURCES/varnish.scl.patch b/SOURCES/varnish.scl.patch new file mode 100644 index 0000000..250fa6c --- /dev/null +++ b/SOURCES/varnish.scl.patch @@ -0,0 +1,332 @@ +diff --git a/configure b/configure +index 59d0c01..561da34 100755 +--- a/configure ++++ b/configure +@@ -16699,7 +16699,7 @@ fi + LIBS="${save_LIBS}" + + # Run-time directory +-VARNISH_STATE_DIR='${localstatedir}/varnish' ++VARNISH_STATE_DIR='${localstatedir}/$rhsclpkgname' + + + # Default configuration directory. +diff --git a/configure.ac b/configure.ac +index bbe9da2..ce08a41 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -456,11 +456,11 @@ fi + LIBS="${save_LIBS}" + + # Run-time directory +-VARNISH_STATE_DIR='${localstatedir}/varnish' ++VARNISH_STATE_DIR='${localstatedir}/$rhsclpkgname' + AC_SUBST(VARNISH_STATE_DIR) + + # Default configuration directory. +-varnishconfdir='${sysconfdir}/varnish' ++varnishconfdir='${sysconfdir}/$rhsclpkgname' + AC_SUBST(varnishconfdir) + + # Check for linker script support +diff --git a/redhat/varnish.initrc b/redhat/varnish.initrc +index 082c770..a221618 100755 +--- a/redhat/varnish.initrc ++++ b/redhat/varnish.initrc +@@ -5,8 +5,8 @@ + # chkconfig: - 90 10 + # description: Varnish is a high-perfomance HTTP accelerator + # processname: varnishd +-# config: /etc/sysconfig/varnish +-# pidfile: /var/run/varnishd.pid ++# config: $sysconfdir/varnish ++# pidfile: $rundir/varnishd.pid + + ### BEGIN INIT INFO + # Provides: varnish +@@ -23,16 +23,16 @@ + . /etc/init.d/functions + + retval=0 +-pidfile=/var/run/varnish.pid ++pidfile=$rundir/varnish.pid + +-exec="/usr/sbin/varnishd" +-reload_exec="/usr/sbin/varnish_reload_vcl" ++exec="$sbindir/varnishd" ++reload_exec="$sbindir/varnish_reload_vcl" + prog="varnishd" +-config="/etc/sysconfig/varnish" +-lockfile="/var/lock/subsys/varnish" ++config="$sysconfdir/sysconfig/varnish" ++lockfile="$localstatedir/lock/subsys/varnish" + + # Include varnish defaults +-[ -e /etc/sysconfig/varnish ] && . /etc/sysconfig/varnish ++[ -e $sysconfdir/sysconfig/varnish ] && . $sysconfdir/sysconfig/varnish + + + start() { +@@ -66,7 +66,7 @@ start() { + ulimit -c ${DAEMON_COREFILE_LIMIT} + fi + +- # $DAEMON_OPTS is set in /etc/sysconfig/varnish. At least, one ++ # $DAEMON_OPTS is set in $sysconfdir/varnish. At least, one + # has to set up a backend, or /tmp will be used, which is a bad idea. + if [ "$DAEMON_OPTS" = "" ]; then + echo "\$DAEMON_OPTS empty." +@@ -74,7 +74,7 @@ start() { + return 6 + else + # Varnish always gives output on STDOUT +- daemon --pidfile $pidfile $exec -P $pidfile "$DAEMON_OPTS" > /dev/null 2>&1 ++ daemon --pidfile $pidfile $exec -P $pidfile "$DAEMON_OPTS" > /dev/null + retval=$? + if [ $retval -eq 0 ] + then +diff --git a/redhat/varnish.logrotate b/redhat/varnish.logrotate +index 535614d..7387665 100644 +--- a/redhat/varnish.logrotate ++++ b/redhat/varnish.logrotate +@@ -1,10 +1,10 @@ +-/var/log/varnish/*.log { ++$logdir/*.log { + missingok + notifempty + sharedscripts + delaycompress + postrotate +- /bin/kill -HUP `cat /var/run/varnishlog.pid 2>/dev/null` 2> /dev/null || true +- /bin/kill -HUP `cat /var/run/varnishncsa.pid 2>/dev/null` 2> /dev/null || true ++ /bin/kill -HUP `cat $rundir/varnishlog.pid 2>/dev/null` 2> /dev/null || true ++ /bin/kill -HUP `cat $rundir/varnishncsa.pid 2>/dev/null` 2> /dev/null || true + endscript + } +diff --git a/redhat/varnish.params b/redhat/varnish.params +index 27a14dd..3f3f4d5 100644 +--- a/redhat/varnish.params ++++ b/redhat/varnish.params +@@ -5,7 +5,7 @@ + RELOAD_VCL=1 + + # Main configuration file. You probably want to change it. +-VARNISH_VCL_CONF=/etc/varnish/default.vcl ++VARNISH_VCL_CONF=$sysconfdir/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 +@@ -18,11 +18,11 @@ 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 ++VARNISH_SECRET_FILE=$sysconfdir/varnish/secret + + # Backend storage specification, see Storage Types in the varnishd(5) + # man page for details. +-VARNISH_STORAGE="file,/var/lib/varnish/varnish_storage.bin,1G" ++VARNISH_STORAGE="file,$localstatedir/lib/$name/varnish_storage.bin,1G" + + # Default TTL used when the backend does not specify one + VARNISH_TTL=120 +diff --git a/redhat/varnish.service b/redhat/varnish.service +index a4f3355..f4abd09 100644 +--- a/redhat/varnish.service ++++ b/redhat/varnish.service +@@ -6,10 +6,10 @@ After=syslog.target network.target + + # + # 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 ++# /etc/systemd/system/$name.service and make your changes there. ++# This will override the file kept at /lib/systemd/system/$name.service + # +-# Enviroment variables may be found in /etc/varnish/varnish.params ++# Enviroment variables may be found in $sysconfdir/varnish/varnish.params + # + + # Maximum number of open files (for ulimit -n) +@@ -22,14 +22,13 @@ LimitMEMLOCK=82000 + # Maximum size of the corefile. + LimitCORE=infinity + +-EnvironmentFile=/etc/varnish/varnish.params ++EnvironmentFile=$sysconfdir/varnish/varnish.params + + Type=forking +-PIDFile=/var/run/varnish.pid ++PIDFile=$rundir/varnish.pid + PrivateTmp=true +-ExecStartPre=/usr/sbin/varnishd -C -f $VARNISH_VCL_CONF +-ExecStart=/usr/sbin/varnishd \ +- -P /var/run/varnish.pid \ ++ExecStart=$sbindir/varnishd \ ++ -P $rundir/varnish.pid \ + -f $VARNISH_VCL_CONF \ + -a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} \ + -T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} \ +@@ -40,7 +39,7 @@ ExecStart=/usr/sbin/varnishd \ + -s $VARNISH_STORAGE \ + $DAEMON_OPTS + +-ExecReload=/usr/sbin/varnish_reload_vcl ++ExecReload=$sbindir/varnish_reload_vcl + + [Install] + WantedBy=multi-user.target +diff --git a/redhat/varnish.sysconfig b/redhat/varnish.sysconfig +index 6aa2354..41b68d8 100644 +--- a/redhat/varnish.sysconfig ++++ b/redhat/varnish.sysconfig +@@ -1,6 +1,6 @@ + # Configuration file for varnish + # +-# /etc/init.d/varnish expects the variable $DAEMON_OPTS to be set from this ++# /etc/init.d/$name expects the variable $DAEMON_OPTS to be set from this + # shell script fragment. + # + +@@ -35,7 +35,7 @@ RELOAD_VCL=1 + # -T localhost:6082 \ + # -b localhost:8080 \ + # -u varnish -g varnish \ +-# -s file,/var/lib/varnish/varnish_storage.bin,1G" ++# -s file,$localstatedir/$name/varnish_storage.bin,1G" + + + ## Alternative 2, Configuration with VCL +@@ -46,10 +46,10 @@ RELOAD_VCL=1 + # + #DAEMON_OPTS="-a :6081 \ + # -T localhost:6082 \ +-# -f /etc/varnish/default.vcl \ ++# -f $sysconfdir/varnish/default.vcl \ + # -u varnish -g varnish \ +-# -S /etc/varnish/secret \ +-# -s file,/var/lib/varnish/varnish_storage.bin,1G" ++# -S $sysconfdir/varnish/secret \ ++# -s file,$localstatedir/lib/$name/varnish_storage.bin,1G" + + + ## Alternative 3, Advanced configuration +@@ -57,7 +57,7 @@ RELOAD_VCL=1 + # See varnishd(1) for more information. + # + # # Main configuration file. You probably want to change it :) +-VARNISH_VCL_CONF=/etc/varnish/default.vcl ++VARNISH_VCL_CONF=$sysconfdir/varnish/default.vcl + # + # # Default address and port to bind to + # # Blank address means all IPv4 and IPv6 interfaces, otherwise specify +@@ -70,7 +70,7 @@ 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 ++VARNISH_SECRET_FILE=$sysconfdir/varnish/secret + # + # # The minimum number of worker threads to start + VARNISH_MIN_THREADS=50 +diff --git a/redhat/varnishlog.initrc b/redhat/varnishlog.initrc +index 2b5fc51..f015b12 100644 +--- a/redhat/varnishlog.initrc ++++ b/redhat/varnishlog.initrc +@@ -6,7 +6,7 @@ + # description: Varnish Cache logging daemon + # processname: varnishlog + # config: +-# pidfile: /var/run/varnishlog.pid ++# pidfile: $rundir/varnishlog.pid + + ### BEGIN INIT INFO + # Provides: varnishlog +@@ -22,17 +22,17 @@ + . /etc/init.d/functions + + retval=0 +-pidfile="/var/run/varnishlog.pid" +-lockfile="/var/lock/subsys/varnishlog" +-logfile="/var/log/varnish/varnish.log" ++pidfile="$rundir/varnishlog.pid" ++lockfile="$localstatedir/lock/subsys/varnishlog" ++logfile="$logdir/varnish.log" + +-exec="/usr/bin/varnishlog" ++exec="$bindir/varnishlog" + prog="varnishlog" + + DAEMON_OPTS="-a -w $logfile -D -P $pidfile" + + # Include varnishlog defaults +-[ -e /etc/sysconfig/varnishlog ] && . /etc/sysconfig/varnishlog ++[ -e $sysconfdir/sysconfig/varnishlog ] && . $sysconfdir/sysconfig/varnishlog + + start() { + +diff --git a/redhat/varnishlog.service b/redhat/varnishlog.service +index c7a0193..91ce329 100644 +--- a/redhat/varnishlog.service ++++ b/redhat/varnishlog.service +@@ -1,11 +1,11 @@ + [Unit] + Description=Varnish HTTP accelerator logging daemon +-After=varnish.service ++After=$name.service + + [Service] + Type=forking +-PIDFile=/run/varnishlog.pid +-ExecStart=/usr/bin/varnishlog -a -w /var/log/varnish/varnish.log -D -P /run/varnishlog.pid ++PIDFile=$rundir/varnishlog.pid ++ExecStart=$bindir/varnishlog -a -w $logdir/varnish.log -D -P $rundir/varnishlog.pid + + [Install] + WantedBy=multi-user.target +diff --git a/redhat/varnishncsa.initrc b/redhat/varnishncsa.initrc +index b23fa48..a41d2fe 100644 +--- a/redhat/varnishncsa.initrc ++++ b/redhat/varnishncsa.initrc +@@ -22,17 +22,17 @@ + . /etc/init.d/functions + + retval=0 +-pidfile="/var/run/varnishncsa.pid" +-lockfile="/var/lock/subsys/varnishncsa" +-logfile="/var/log/varnish/varnishncsa.log" ++pidfile="$rundir/varnishncsa.pid" ++lockfile="$localstatedir/lock/subsys/varnishncsa" ++logfile="$logdir/varnishncsa.log" + +-exec="/usr/bin/varnishncsa" ++exec="$bindir/varnishncsa" + prog="varnishncsa" + + DAEMON_OPTS="-a -w $logfile -D -P $pidfile" + + # Include varnishncsa defaults +-[ -e /etc/sysconfig/varnishncsa ] && . /etc/sysconfig/varnishncsa ++[ -e $sysconfdir/sysconfig/varnishncsa ] && . $sysconfdir/sysconfig/varnishncsa + + start() { + +diff --git a/redhat/varnishncsa.service b/redhat/varnishncsa.service +index e2ebdcd..2d104c7 100644 +--- a/redhat/varnishncsa.service ++++ b/redhat/varnishncsa.service +@@ -1,11 +1,11 @@ + [Unit] + Description=Varnish HTTP accelerator NCSA daemon +-After=varnish.service ++After=$name.service + + [Service] + Type=forking +-PIDFile=/run/varnishncsa.pid +-ExecStart=/usr/bin/varnishncsa -a -w /var/log/varnish/varnishncsa.log -D -P /run/varnishncsa.pid ++PIDFile=$rundir/varnishncsa.pid ++ExecStart=$bindir/varnishncsa -a -w $logdir/varnishncsa.log -D -P $rundir/varnishncsa.pid + + [Install] + WantedBy=multi-user.target diff --git a/SOURCES/varnish.tmpfiles b/SOURCES/varnish.tmpfiles new file mode 100644 index 0000000..99c7295 --- /dev/null +++ b/SOURCES/varnish.tmpfiles @@ -0,0 +1 @@ +d /var/run/$name 710 root root diff --git a/SPECS/varnish.spec b/SPECS/varnish.spec new file mode 100644 index 0000000..1e0ef82 --- /dev/null +++ b/SPECS/varnish.spec @@ -0,0 +1,939 @@ +%{?scl:%scl_package varnish} + +%global _hardened_build 1 +#% define v_rc beta1 +%define vd_rc %{?v_rc:-%{?v_rc}} +%define _use_internal_dependency_generator 0 +%define __find_provides %{_builddir}/varnish-%{version}%{?v_rc:-%{?v_rc}}/redhat/find-provides +Summary: High-performance HTTP accelerator +Name: %{?scl:%scl_prefix}varnish +Version: 4.0.3 +Release: 13%{?v_rc}%{?dist} +License: BSD +Group: System Environment/Daemons +URL: http://www.varnish-cache.org/ +Source0: http://repo.varnish-cache.org/source/varnish-%{version}.tar.gz +Source1: varnish.tmpfiles +Source2: scl-register-helper.sh +Patch0: varnish.scl.patch +Patch1: varnish-4.0.2.fix_ld_library_path_in_sphinx_build.patch +Patch2: varnish-4.0.3_fix_Werror_el6.patch +Patch3: varnish-4.0.3_fix_python24.el5.patch +Patch4: varnish-4.0.3_fix_varnish4_selinux.el6.patch +Patch5: varnish-4.0.3_fix_content_length_bug.patch +Patch6: varnish-4.0.3-soname.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 +#BuildRequires: automake autoconf libtool python-docutils +BuildRequires: ncurses-devel groff pcre-devel pkgconfig python-docutils libedit-devel %{?scl:%scl_prefix}jemalloc-devel +%if 0%{?rhel} == 6 +BuildRequires: selinux-policy +%endif +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Requires: logrotate +Requires: ncurses +Requires: pcre +Requires: %{?scl:%scl_prefix}jemalloc +Requires: redhat-rpm-config +Requires(pre): shadow-utils +Requires(post): /sbin/chkconfig, /usr/bin/uuidgen +Requires(preun): /sbin/chkconfig +Requires(preun): /sbin/service +Requires(post): policycoreutils-python libselinux-utils +#Provides: varnishabi-4.0.0-2acedeb +%if %{undefined suse_version} +Requires(preun): initscripts +%endif +%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 +%endif + +# 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 + +%description +This is Varnish Cache, a high-performance HTTP accelerator. +Documentation wiki and additional information about Varnish is +available on the following web site: http://www.varnish-cache.org/ + +%package libs +Summary: Libraries for %{name} +Group: Development/Libraries +BuildRequires: ncurses-devel +#Obsoletes: libvarnish1 +%description libs +Libraries for %{name}. +Varnish Cache is a high-performance HTTP accelerator + +%package libs-devel +Summary: Development files for %{name}-libs +Group: Development/Libraries +BuildRequires: ncurses-devel +Requires: %{?scl:%scl_prefix}varnish-libs = %{version}-%{release} + +%description libs-devel +Development files for %{name}-libs +Varnish Cache is a high-performance HTTP accelerator + +%package docs +Summary: Documentation files for %name +Group: Documentation + +%description docs +Documentation files for %name + +#%package libs-static +#Summary: Files for static linking of %{name} library functions +#Group: Development/Libraries +#BuildRequires: ncurses-devel +#Requires: varnish-libs-devel = %{version}-%{release} +# +#%description libs-static +#Files for static linking of varnish library functions +#Varnish Cache is a high-performance HTTP accelerator + +%if 0%{?rhel} == 6 +%package selinux +Summary: Minimal selinux policy for running varnish4 +Group: System Environment/Daemons + +%description selinux +Minimal selinux policy for running varnish4 +%endif + +%prep +%setup -q -n varnish-%{version}%{?vd_rc} +#%setup -q -n varnish-trunk + +%patch0 -p1 +sed -i 's|\$rhsclpkgname|%{name}|g' ./configure +sed -i 's|\$rhsclpkgname|%{name}|g' ./configure.ac +sed -i 's|ljemalloc|lrh-varnish4jemalloc|g' ./configure +sed -i 's|ljemalloc|lrh-varnish4jemalloc|g' ./configure.ac + +%patch1 -p0 +%if 0%{?rhel} <= 6 && 0%{?fedora} <= 12 +%patch2 -p0 +%endif +%if 0%{?rhel} <= 5 && 0%{?fedora} <= 12 +%patch3 -p0 +%endif +%if 0%{?rhel} == 6 +%patch4 -p0 +%endif +%patch5 -p1 +%patch6 -p1 + +%build +#export CFLAGS="$CFLAGS -Wp,-D_FORTIFY_SOURCE=0" + +export LD_LIBRARY_PATH=%{_libdir}:$LD_LIBRARY_PATH +%if 0%{?rhel} <= 6 +export LDFLAGS="-L%{_libdir} -Wl,-rpath,%{_libdir}" +%else +export LDFLAGS="-L%{_libdir} -Wl,-rpath,%{_libdir} %{__global_ldflags}" +%endif + +# Remove "--disable static" if you want to build static libraries +%configure --disable-static \ +%if 0%{?rhel} <= 5 && 0%{?fedora} <= 12 + --with-rst2man=/bin/true \ +%endif + --localstatedir=%{_localstatedir}/lib \ + --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} + +# 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 + +make %{?_smp_mflags} V=1 + +%if 0%{?fedora}%{?rhel} != 0 && 0%{?rhel} <= 4 && 0%{?fedora} <= 8 + # Old style daemon function + sed -i 's,--pidfile \$pidfile,,g; + s,status -p \$pidfile,status,g; + s,killproc -p \$pidfile,killproc,g' \ + redhat/varnish.initrc redhat/varnishlog.initrc redhat/varnishncsa.initrc +%endif + +rm -rf doc/sphinx/build/html/_sources +mv doc/sphinx/build/html doc +rm -rf doc/sphinx/build + +%check +make check LD_LIBRARY_PATH="%{buildroot}%{_libdir}:%{buildroot}%{_libdir}/%{name}" TESTS_PARALLELISM=5 VERBOSE=1 + +%install +#include helper script for creating register stuff +export _SR_BUILDROOT=%{buildroot} +export _SR_SCL_SCRIPTS=%{?_scl_scripts} + +source %{SOURCE2} + +expand_variables() { + sed -i 's|\$sbindir|%{_sbindir}|g' "$1" + sed -i 's|\$bindir|%{_bindir}|g' "$1" + sed -i 's|\$rundir|%{_localstatedir}/run/%{?scl:%scl_prefix}varnish|g' "$1" + sed -i 's|\$sysconfdir|%{_sysconfdir}|g' "$1" + sed -i 's|\$logdir|%{_localstatedir}/log/varnish|g' "$1" + sed -i 's|\$name|%{name}|g' "$1" + sed -i 's|\$localstatedir|%{_localstatedir}|g' "$1" +} + +rm -rf %{buildroot} +make install DESTDIR=%{buildroot} INSTALL="install -p" + +# None of these for fedora +find %{buildroot}/%{_libdir}/ -name '*.la' -exec rm -f {} ';' + +# Remove this line to build a devel package with symlinks +#find %{buildroot}/%{_libdir}/ -name '*.so' -type l -exec rm -f {} ';' + +mkdir -p %{buildroot}%{_localstatedir}/lib/%{?scl:%scl_prefix}varnish +mkdir -p %{buildroot}%{_localstatedir}/log/varnish +mkdir -p %{buildroot}%{_localstatedir}/run/%{?scl:%scl_prefix}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}/etc/logrotate.d/%{?scl:%scl_prefix}varnish +expand_variables %{buildroot}/etc/logrotate.d/%{?scl:%scl_prefix}varnish + +scl_reggen %{name} --mkdir %{_localstatedir}/lib/%{?scl:%scl_prefix}varnish +scl_reggen %{name} --mkdir %{_root_localstatedir}/log/%{?scl:%scl_prefix}varnish +scl_reggen %{name} --mkdir %{_localstatedir}/run/%{?scl:%scl_prefix}varnish +scl_reggen %{name} --cpfile %{_sysconfdir}/varnish/default.vcl +scl_reggen %{name} --cpfile %{_root_sysconfdir}/logrotate.d/%{?scl:%scl_prefix}varnish + +scl_reggen %{name} --runafterregister "semanage fcontext -a -e /var/log/varnish %{_localstatedir}/log/varnish >/dev/null 2>&1 || :" +scl_reggen %{name} --runafterregister "restorecon -R %{_localstatedir}/log/varnish >/dev/null 2>&1 || :" +scl_reggen %{name} --runafterregister "semanage fcontext -a -e %{_root_localstatedir}/lib/varnish %{_localstatedir}/lib/%{name} >/dev/null 2>&1 || :" +scl_reggen %{name} --runafterregister "restorecon -R %{_localstatedir} >/dev/null 2>&1 || :" +scl_reggen %{name} --runafterregister "semanage fcontext -a -e %{_root_localstatedir}/run/varnish %{_localstatedir}/run/%{name} >/dev/null 2>&1 || :" +scl_reggen %{name} --runafterregister "restorecon -R %{_localstatedir} >/dev/null 2>&1 || :" + + +# systemd support +%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 +mkdir -p %{buildroot}%{_unitdir} + +install -D -m 0644 redhat/varnish.service %{buildroot}%{_unitdir}/%{?scl:%scl_prefix}varnish.service +expand_variables %{buildroot}%{_unitdir}/%{?scl:%scl_prefix}varnish.service +scl_reggen %{name} --cpfile /%{_unitdir}/%{?scl:%scl_prefix}varnish.service + +install -D -m 0644 redhat/varnish.params %{buildroot}%{_sysconfdir}/varnish/varnish.params +expand_variables %{buildroot}%{_sysconfdir}/varnish/varnish.params +scl_reggen %{name} --cpfile %{_sysconfdir}/varnish/varnish.params + +install -D -m 0644 redhat/varnishncsa.service %{buildroot}%{_unitdir}/%{?scl:%scl_prefix}varnishncsa.service +expand_variables %{buildroot}%{_unitdir}/%{?scl:%scl_prefix}varnishncsa.service +scl_reggen %{name} --cpfile /%{_unitdir}/%{?scl:%scl_prefix}varnishncsa.service + +install -D -m 0644 redhat/varnishlog.service %{buildroot}%{_unitdir}/%{?scl:%scl_prefix}varnishlog.service +expand_variables %{buildroot}%{_unitdir}/%{?scl:%scl_prefix}varnishlog.service +scl_reggen %{name} --cpfile /%{_unitdir}/%{?scl:%scl_prefix}varnishlog.service + +sed -i 's,sysconfig/varnish,varnish/varnish.params,' redhat/varnish_reload_vcl + +# tmpfiles.d configuration +mkdir -p %{buildroot}%{_root_prefix}/lib/tmpfiles.d +install -m 644 -p $RPM_SOURCE_DIR/varnish.tmpfiles %{buildroot}%{_root_prefix}/lib/tmpfiles.d/%{name}.conf +expand_variables %{buildroot}%{_root_prefix}/lib/tmpfiles.d/%{name}.conf +scl_reggen %{name} --cpfile %{_root_prefix}/lib/tmpfiles.d/%{name}.conf + +# default is standard sysvinit +%else +install -D -m 0644 redhat/varnish.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/varnish +expand_variables %{buildroot}%{_sysconfdir}/sysconfig/varnish +scl_reggen %{name} --cpfile %{_sysconfdir}/sysconfig/varnish + +install -D -m 0755 redhat/varnish.initrc %{buildroot}%{_root_initddir}/%{?scl:%scl_prefix}varnish +expand_variables %{buildroot}%{_root_initddir}/%{?scl:%scl_prefix}varnish +scl_reggen %{name} --cpfile %{_root_initddir}/%{?scl:%scl_prefix}varnish + +install -D -m 0755 redhat/varnishlog.initrc %{buildroot}%{_root_initddir}/%{?scl:%scl_prefix}varnishlog +expand_variables %{buildroot}%{_root_initddir}/%{?scl:%scl_prefix}varnishlog +scl_reggen %{name} --cpfile %{_root_initddir}/%{?scl:%scl_prefix}varnishlog + +install -D -m 0755 redhat/varnishncsa.initrc %{buildroot}%{_root_initddir}/%{?scl:%scl_prefix}varnishncsa +expand_variables %{buildroot}%{_root_initddir}/%{?scl:%scl_prefix}varnishncsa +scl_reggen %{name} --cpfile %{_root_initddir}/%{?scl:%scl_prefix}varnishncsa +%endif +install -D -m 0755 redhat/varnish_reload_vcl %{buildroot}%{_sbindir}/varnish_reload_vcl +expand_variables %{buildroot}%{_sbindir}/varnish_reload_vcl + +echo %{_libdir}/varnish > %{buildroot}%{_sysconfdir}/ld.so.conf.d/varnish-%{_arch}.conf +mv %{buildroot}%{_libdir}/pkgconfig/varnishapi.pc %{buildroot}%{_libdir}/pkgconfig/%{?scl:%scl_prefix}varnishapi.pc + +# selinux module for el6 +%if 0%{?rhel} == 6 +cd selinux +make -f %{_root_datadir}/selinux/devel/Makefile +install -p -m 644 -D varnish4.pp %{buildroot}%{_root_datadir}/selinux/packages/%{name}/%{?scl:%scl_prefix}varnish4.pp +scl_reggen %{name} --cpfile %{_root_datadir}/selinux/packages/%{name}/%{?scl:%scl_prefix}varnish4.pp +%endif + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%{_sbindir}/* +%{_bindir}/* +%{_localstatedir}/lib/%{name} +%attr(0700,root,root) %dir %{_localstatedir}/log/varnish +%{_mandir}/man1/*.1* +%{_mandir}/man3/*.3* +%{_mandir}/man7/*.7* +%doc LICENSE README redhat/README.redhat ChangeLog +%dir %{_sysconfdir}/varnish/ +%dir %{_localstatedir}/run/%{name} +%config(noreplace) %{_sysconfdir}/varnish/default.vcl +%config(noreplace) /etc/logrotate.d/%{?scl:%scl_prefix}varnish + +%{?scl: %{_scl_scripts}/register.d/*} +%{?scl: %{_scl_scripts}/register.content/*} +%{?scl: %{_scl_scripts}/deregister.d/*} + +# systemd from fedora 17 +%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 +%{_unitdir}/%{?scl:%scl_prefix}varnish.service +%{_unitdir}/%{?scl:%scl_prefix}varnishncsa.service +%{_unitdir}/%{?scl:%scl_prefix}varnishlog.service +%config(noreplace) %{_sysconfdir}/varnish/varnish.params +%{_root_prefix}/lib/tmpfiles.d/%{name}.conf + +# default is standard sysvinit +%else +%config(noreplace) %{_sysconfdir}/sysconfig/varnish +%{_root_initddir}/%{?scl:%scl_prefix}varnish +%{_root_initddir}/%{?scl:%scl_prefix}varnishlog +%{_root_initddir}/%{?scl:%scl_prefix}varnishncsa +%endif + +%files libs +%defattr(-,root,root,-) +%{_libdir}/*.so.* +%{_libdir}/varnish +%doc LICENSE +%config %{_sysconfdir}/ld.so.conf.d/varnish-%{_arch}.conf + +%files libs-devel +%defattr(-,root,root,-) +%{_libdir}/lib*.so +%{_includedir}/varnish +%{_libdir}/pkgconfig/%{?scl:%scl_prefix}varnishapi.pc +%{_datadir}/varnish +%{_datadir}/aclocal/varnish.m4 + +%doc LICENSE + +%files docs +%defattr(-,root,root,-) +%doc LICENSE +%doc doc/sphinx +%doc doc/html +%doc doc/changes*.html + +#%files libs-static +#%{_libdir}/libvarnish.a +#%{_libdir}/libvarnishapi.a +#%{_libdir}/libvarnishcompat.a +#%{_libdir}/libvcc.a +#%doc LICENSE + +%if 0%{?rhel} == 6 +%files selinux +%defattr(-,root,root,-) +%{_root_datadir}/selinux/packages/%{name}/%{?scl:%scl_prefix}varnish4.pp +%endif + +%pre +getent group varnish >/dev/null || groupadd -r varnish +getent passwd varnish >/dev/null || \ + useradd -r -g varnish -d %{_localstatedir}/lib/%{?scl:%scl_prefix}varnish -s /sbin/nologin \ + -c "Varnish Cache" varnish +exit 0 + +%post +%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 + +# Fedora 17 +%if 0%{?fedora} == 17 +# Initial installation +if [ $1 -eq 1 ] ; then +/bin/systemctl daemon-reload >/dev/null 2>&1 || : +fi + +# Fedora 18+, rhel7+ +%else +%systemd_post %{?scl:%scl_prefix}varnish.service +%endif + +# Other distros: Use chkconfig +%else +/sbin/chkconfig --add %{?scl:%scl_prefix}varnish +/sbin/chkconfig --add %{?scl:%scl_prefix}varnishlog +/sbin/chkconfig --add %{?scl:%scl_prefix}varnishncsa +%endif + +test -f %{_sysconfdir}/varnish/secret || (uuidgen > %{_sysconfdir}/varnish/secret && chmod 0600 %{_sysconfdir}/varnish/secret) + +restorecon -R %{_scl_root} >/dev/null 2>&1 || : + +semanage fcontext -a -e /var/log/varnish %{_localstatedir}/log/varnish >/dev/null 2>&1 || : +restorecon -R %{_localstatedir}/log/varnish >/dev/null 2>&1 || : + +semanage fcontext -a -e %{_root_localstatedir}/lib/varnish %{_localstatedir}/lib/%{name} >/dev/null 2>&1 || : +restorecon -R %{_localstatedir} >/dev/null 2>&1 || : + +semanage fcontext -a -e %{_root_localstatedir}/run/varnish %{_localstatedir}/run/%{name} >/dev/null 2>&1 || : +restorecon -R %{_localstatedir} >/dev/null 2>&1 || : + +# selinux module for el6 +%if 0%{?rhel} == 6 +%post selinux +if [ "$1" -le "1" ] ; then # First install +semodule -i %{_root_datadir}/selinux/packages/%{name}/%{?scl:%scl_prefix}varnish4.pp 2>/dev/null || : + +restorecon -R %{_scl_root} >/dev/null 2>&1 || : + +semanage fcontext -a -e /var/log/varnish %{_localstatedir}/log/varnish >/dev/null 2>&1 || : +restorecon -R %{_localstatedir}/log/varnish >/dev/null 2>&1 || : + +semanage fcontext -a -e %{_root_localstatedir}/lib/%{name} %{_localstatedir}/lib/varnish >/dev/null 2>&1 || : +restorecon -R %{_localstatedir} >/dev/null 2>&1 || : + +semanage fcontext -a -e %{_root_localstatedir}/run/%{name} %{_localstatedir}/run/varnish >/dev/null 2>&1 || : +restorecon -R %{_localstatedir} >/dev/null 2>&1 || : +fi + +%preun selinux +if [ "$1" -lt "1" ] ; then # Final removal +semodule -r %{?scl:%scl_prefix}varnish4 2>/dev/null || : +fi + +%postun selinux +if [ "$1" -ge "1" ] ; then # Upgrade +semodule -i %{_root_datadir}/selinux/packages/%{name}/%{?scl:%scl_prefix}varnish4.pp 2>/dev/null || : +fi + +%endif + +%preun + +%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 +%systemd_preun %{?scl:%scl_prefix}varnish.service +%else + +if [ $1 -lt 1 ]; then + # Package removal, not upgrade + %if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 + /bin/systemctl --no-reload disable %{?scl:%scl_prefix}varnish.service > /dev/null 2>&1 || : + /bin/systemctl stop %{?scl:%scl_prefix}varnish.service > /dev/null 2>&1 || : + %else + /sbin/service %{?scl:%scl_prefix}varnish stop > /dev/null 2>&1 + /sbin/service %{?scl:%scl_prefix}varnishlog stop > /dev/null 2>&1 + /sbin/service %{?scl:%scl_prefix}varnishncsa stop > /dev/null 2>%1 + /sbin/chkconfig --del %{?scl:%scl_prefix}varnish + /sbin/chkconfig --del %{?scl:%scl_prefix}varnishlog + /sbin/chkconfig --del %{?scl:%scl_prefix}varnishncsa + %endif +fi +%endif + +%post libs -p /sbin/ldconfig + +%postun libs +/sbin/ldconfig +%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 +%systemd_postun_with_restart %{?scl:%scl_prefix}varnish.service +%endif + +%changelog +* Fri Sep 18 2015 Jan Kaluza - 4.0.3-13 +- add prefix also to pkgconfig, use "rh-varnish4" for all prefixes (#1254034) + +* Tue Sep 15 2015 Jan Kaluza - 4.0.3-12 +- compile with hardening on RHEL-7 + +* Fri Sep 11 2015 Jan Kaluza - 4.0.3-11 +- add rh-varnish4 infix/suffix to libraries (#1254034) + +* Mon Sep 07 2015 Jan Kaluza - 4.0.3-10 +- enable build time tests + +* Sun Aug 16 2015 Jan Kaluza - 4.0.3-9 +- use SELinux context equivalency for localstatedir directories + +* Wed Aug 12 2015 Jan Kaluza - 4.0.3-8 +- move logs to /var/opt/rh/rh-varnish4/log (#1250099) + +* Mon Jul 27 2015 Jan Kaluza - 4.0.3-7 +- use localstatedir instead of /var +- fix hard-coded SCL name in paths +- fix hard-coded storage dir + +* Fri Jul 10 2015 Jan Kaluza - 4.0.3-6 +- set the SELinux context for scl root + +* Thu Jul 09 2015 Jan Kaluza - 4.0.3-5 +- add support for NFS + +* Thu Jul 09 2015 Jan Kaluza - 4.0.3-4 +- package as SCL + +* 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.