diff --git a/.gitignore b/.gitignore index 7b241fb..5682627 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,5 @@ varnish-2.1.3.tar.gz /varnish-6.0.1.tgz /varnish-6.1.0.tgz /varnish-6.1.1.tgz +/varnish-6.2.0.tgz +/pkg-varnish-cache-114fcdd.tar.gz diff --git a/sources b/sources index dfd90d0..5be3fe1 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (varnish-6.1.1.tgz) = 67e546e5fee2d10ec038d7b011a3f61a0a056ce8a4813556526c8fce23bb1fe4e29952a773e6cbc2433c0228971a5e90693d5ce61f6cb5f2242e055e0ce13d18 -SHA512 (pkg-varnish-cache-0ad2f22.tar.gz) = b66c05f74f9bd62ddf16ab3e7904f4e74993bd1406aaebf20d4dca840198430da9f5e746af22778f1a73063113ac19b6f8127d77ff71c30c246fd5fab5ed78da +SHA512 (varnish-6.2.0.tgz) = fc447c27fbe31ef96c7e5666cd83007467619d012c7587c252da6fc8dc00e9534c790f1558c568f610ef9a61f5a0a61dc367e3723d905dece525dc27ee236376 +SHA512 (pkg-varnish-cache-114fcdd.tar.gz) = 06fef2beac511de3b28291b8a0978f7a2c4ecbc65bcfdea6df89e4aaeec23d096487dd0453cd45802985a010ffd151772e60bbc700d95a471bb57f5f70256b0e 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.spec b/varnish.spec index 7007f0f..087d34a 100644 --- a/varnish.spec +++ b/varnish.spec @@ -6,41 +6,59 @@ %if 0%{?rhel} == 6 || 0%{?rhel} == 7 %global _use_internal_dependency_generator 0 %global __find_provides %{_builddir}/%{name}-%{version}/find-provides %__find_provides +%global __python /usr/bin/python3.4 +%else +%global __python %{__python3} %endif %global __provides_exclude_from ^%{_libdir}/varnish/vmods -%global abi 4684c38ecfc194b4f3b5b81594832dbb197a3bb9 -%global vrt 8.0 +%global abi b14a3d38dbe918ad50d3838b11aa596f42179b54 +%global vrt 9.0 # Package scripts are now external # https://github.com/varnishcache/pkg-varnish-cache -%global commit1 0ad2f22629c4a368959c423a19e352c9c6c79682 +%global commit1 114fcddfdbd9f1177f34605bb86faa78859ae56a %global shortcommit1 %(c=%{commit1}; echo ${c:0:7}) Summary: High-performance HTTP accelerator Name: varnish -Version: 6.1.1 -Release: 5%{?dist} +Version: 6.2.0 +Release: 1%{?dist} License: BSD 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 + +# Patches: +# Patch 001: Because of Fedora's libtool no-rpath requirement, it is still +# necessary to add LD_LIBRARY_PATH when building the documentation Patch1: varnish-6.1.1_fix_ld_library_path_in_doc_build.patch + +# Patch 004: varnish selinux support for el6 Patch4: varnish-4.0.3_fix_varnish4_selinux.el6.patch -Patch9: varnish-5.1.1.fix_python_version.patch -# based on https://github.com/varnishcache/varnish-cache/commit/9bdc5f75d661a1659c4df60799612a7524a6caa7 -Patch12: varnish-6.0.1_fix_bug2668.patch +# Patch 009: Hard code older python support in configure for older el releases +#Patch9: varnish-5.1.1.fix_python_version.patch -# Just a simple formatting error -Patch13: varnish-6.1.0_fix_testu00008.patch +# Patch 012: Fix test for variants of ncurses, based on upstream commit 9bdc5f75, upstream issue #2668 +#Patch12: varnish-6.0.1_fix_bug2668.patch -# Another formatting error fixed upstream -Patch14: varnish-6.1.1_fix_upstrbug_2879.patch +# Patch 013: Just a simple format error +#Patch13: varnish-6.1.0_fix_testu00008.patch -# pcre-jit fixed upstream, issue #2912 -Patch15: varnish-6.1.1_fix_issue_2912.patch +# Patch 014: Another formatting error fixed upstream, issue 2879 +#Patch14: varnish-6.1.1_fix_upstrbug_2879.patch + +# Patch 015: pcre-jit fixed upstream, issue #2912 +#Patch15: varnish-6.1.1_fix_issue_2912.patch + +# Patch 016: Fix some warnings that prohibited clean -Werror compilation +# on el6. Will not be fixed upstream +Patch16: varnish-6.2.0_el6_fix_warning_from_old_gcc.patch + +# Patch 017: Fix stack size on ppc64 in test c_00057, upstream commit 88948d9 +Patch17: varnish-6.2.0_fix_ppc64_for_test_c00057.patch %if 0%{?fedora} > 29 Provides: varnish%{_isa} = %{version}-%{release} @@ -58,10 +76,14 @@ Provides: vmod(vtc)%{_isa} = %{version}-%{release} Obsoletes: varnish-libs -%if 0%{?rhel} == 6 || 0%{?rhel} == 7 +%if 0%{?rhel} == 6 BuildRequires: python-sphinx python34-docutils %else -BuildRequires: python3-sphinx, python3-docutils +%if 0%{?rhel} == 7 +BuildRequires: python34 python34-sphinx python34-docutils +%else +BuildRequires: python3 python3-sphinx, python3-docutils +%endif %endif BuildRequires: jemalloc-devel BuildRequires: libedit-devel @@ -158,12 +180,9 @@ sed -i '8 i\RPM_BUILD_ROOT=%{buildroot}' find-provides %patch1 -p0 %if 0%{?rhel} == 6 %patch4 -p0 -%patch9 -p0 +%patch16 -p0 %endif -#patch12 -p1 -%patch13 -p0 -%patch14 -p1 -%patch15 -p1 +%patch17 -p1 %build %if 0%{?rhel} == 6 @@ -181,57 +200,54 @@ export CFLAGS="%{optflags} -fno-exceptions -fPIC -ffloat-store" %endif %endif +# What gcc version is this? +gcc --version + +# What is the page size +getconf PAGESIZE + # Man pages are prebuilt. No need to regenerate them. export RST2MAN=/bin/true # Explicit python, please -export PYTHON=/usr/bin/python3 +export PYTHON=%{__python} %configure --disable-static \ %ifarch aarch64 --with-jemalloc=no \ +%endif +%if 0%{?rhel} != 6 + --with-sphinx-build=sphinx-build-3.4 \ %endif --localstatedir=/var/lib \ --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} \ # --disable-pcre-jit \ - # 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 - -%if 0%{?rhel} == 6 -# Upstream github issue #22650 -sed -i 's/-Werror$//g;' bin/varnishd/Makefile -sed -i 's/-Werror$//g;' lib/libvarnishapi/Makefile -# Workaround old readline/curses, ref upstream github issue #2550 -sed -i 's/vcl1/ vcl1/;' bin/varnishtest/tests/u00011.vtc -%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 -sed -i 's,env python,python3,;' lib/libvcc/vmodtool.py -sed -i 's,env python,python3,;' lib/libvcc/vsctool.py - # Clean up the html documentation rm -rf doc/html/_sources %check + +# rhbz #1690796 +%if 0%{?rhel} == 6 %ifarch ppc64 ppc64le aarch64 -sed -i 's/48/128/g;' bin/varnishtest/tests/c00057.vtc +rm bin/varnishtest/tests/c00057.vtc %endif +%endif + +export LD_LIBRARY_PATH="%{buildroot}%{_libdir}:%{buildroot}%{_libdir}/%{name}" make %{?_smp_mflags} check LD_LIBRARY_PATH="%{buildroot}%{_libdir}:%{buildroot}%{_libdir}/%{name}" VERBOSE=1 + %install rm -rf %{buildroot} @@ -240,7 +256,7 @@ rm -rf %{buildroot} export LANG=en_US.UTF-8 %endif -make install DESTDIR=%{buildroot} INSTALL="install -p" +%{make_install} # None of these for fedora find %{buildroot}/%{_libdir}/ -name '*.la' -exec rm -f {} ';' @@ -404,6 +420,18 @@ fi %changelog +* Fri Mar 15 2019 Ingvar Hagelund - 6.2.0-1 +- New upstream release varnish-6.2 +- Removed patches merged upstream +- Remove misc sed hacks for bugs that are fixed upstream +- Added a patch for gcc-4.4 -Werror support on el6 +- Added a patch from upstream to fix too small thread pool stack in a test +- Override macro __python to make brp-python-bytecompile choose python3 +- Explicitly use python-3.4 +- Switch to make_install macro +- Better documentation of patches +- Updated checkout of pkg-varnish-cache + * Thu Mar 07 2019 Ingvar Hagelund - 6.1.1-5 - Adding a patch based on upstream commits, fixing pcre-jit, see upstream bug 2912