From 5b40187305874959bc7ae1f1844bb0d772dfe1cc Mon Sep 17 00:00:00 2001 From: Anton Novojilov Date: Tue, 12 Jul 2016 19:57:20 -0400 Subject: [PATCH 1/2] Version 1.11.2 --- SOURCES/webkaos.patch | 64 +++++++++++++++++------------------ patch-check.sh | 77 +++++++++++++++++++++++++++++++++++++++++++ webkaos-centos6.spec | 24 ++++++++------ webkaos-centos7.spec | 10 ++++-- 4 files changed, 130 insertions(+), 45 deletions(-) create mode 100755 patch-check.sh diff --git a/SOURCES/webkaos.patch b/SOURCES/webkaos.patch index 8942867..84a88b5 100644 --- a/SOURCES/webkaos.patch +++ b/SOURCES/webkaos.patch @@ -1,6 +1,6 @@ -diff -urN nginx-1.11.1-orig/auto/lib/openssl/make nginx-1.11.1/auto/lib/openssl/make ---- nginx-1.11.1-orig/auto/lib/openssl/make 2016-06-01 07:31:55.597143474 -0400 -+++ nginx-1.11.1/auto/lib/openssl/make 2016-04-27 06:35:03.000000000 -0400 +diff -urN nginx-1.11.2-orig/auto/lib/openssl/make nginx-1.11.2/auto/lib/openssl/make +--- nginx-1.11.2-orig/auto/lib/openssl/make 2016-07-12 18:27:54.827769832 -0400 ++++ nginx-1.11.2/auto/lib/openssl/make 2016-07-12 18:54:29.616445352 -0400 @@ -45,18 +45,18 @@ /*) ngx_prefix="$OPENSSL/.openssl" ;; *) ngx_prefix="$PWD/$OPENSSL/.openssl" ;; @@ -24,9 +24,9 @@ diff -urN nginx-1.11.1-orig/auto/lib/openssl/make nginx-1.11.1/auto/lib/openssl/ ;; esac -diff -urN nginx-1.11.1-orig/src/core/nginx.c nginx-1.11.1/src/core/nginx.c ---- nginx-1.11.1-orig/src/core/nginx.c 2016-06-01 07:31:55.631143491 -0400 -+++ nginx-1.11.1/src/core/nginx.c 2016-06-01 09:18:45.000000000 -0400 +diff -urN nginx-1.11.2-orig/src/core/nginx.c nginx-1.11.2/src/core/nginx.c +--- nginx-1.11.2-orig/src/core/nginx.c 2016-07-12 18:27:54.864769825 -0400 ++++ nginx-1.11.2/src/core/nginx.c 2016-07-12 18:55:27.651473539 -0400 @@ -378,9 +378,9 @@ if (ngx_show_help) { @@ -40,13 +40,13 @@ diff -urN nginx-1.11.1-orig/src/core/nginx.c nginx-1.11.1/src/core/nginx.c "Options:" NGX_LINEFEED " -?,-h : this help" NGX_LINEFEED " -v : show version and exit" NGX_LINEFEED -diff -urN nginx-1.11.1-orig/src/core/nginx.h nginx-1.11.1/src/core/nginx.h ---- nginx-1.11.1-orig/src/core/nginx.h 2016-06-01 07:31:55.636143493 -0400 -+++ nginx-1.11.1/src/core/nginx.h 2016-06-01 09:18:22.000000000 -0400 +diff -urN nginx-1.11.2-orig/src/core/nginx.h nginx-1.11.2/src/core/nginx.h +--- nginx-1.11.2-orig/src/core/nginx.h 2016-07-12 18:27:54.868769825 -0400 ++++ nginx-1.11.2/src/core/nginx.h 2016-07-12 18:55:41.000000000 -0400 @@ -11,7 +11,7 @@ - #define nginx_version 1011001 - #define NGINX_VERSION "1.11.1" + #define nginx_version 1011002 + #define NGINX_VERSION "1.11.2" -#define NGINX_VER "nginx/" NGINX_VERSION +#define NGINX_VER "webkaos/" NGINX_VERSION @@ -61,9 +61,9 @@ diff -urN nginx-1.11.1-orig/src/core/nginx.h nginx-1.11.1/src/core/nginx.h #define NGX_OLDPID_EXT ".oldbin" -diff -urN nginx-1.11.1-orig/src/core/ngx_log.c nginx-1.11.1/src/core/ngx_log.c ---- nginx-1.11.1-orig/src/core/ngx_log.c 2016-06-01 07:31:55.634143491 -0400 -+++ nginx-1.11.1/src/core/ngx_log.c 2016-06-01 09:20:32.000000000 -0400 +diff -urN nginx-1.11.2-orig/src/core/ngx_log.c nginx-1.11.2/src/core/ngx_log.c +--- nginx-1.11.2-orig/src/core/ngx_log.c 2016-07-12 18:27:54.867769824 -0400 ++++ nginx-1.11.2/src/core/ngx_log.c 2016-07-12 18:57:00.359519372 -0400 @@ -202,9 +202,9 @@ return; } @@ -94,9 +94,9 @@ diff -urN nginx-1.11.1-orig/src/core/ngx_log.c nginx-1.11.1/src/core/ngx_log.c return NGX_CONF_ERROR; #endif -diff -urN nginx-1.11.1-orig/src/http/modules/ngx_http_autoindex_module.c nginx-1.11.1/src/http/modules/ngx_http_autoindex_module.c ---- nginx-1.11.1-orig/src/http/modules/ngx_http_autoindex_module.c 2016-06-01 07:31:55.617143484 -0400 -+++ nginx-1.11.1/src/http/modules/ngx_http_autoindex_module.c 2014-12-29 08:19:39.000000000 -0500 +diff -urN nginx-1.11.2-orig/src/http/modules/ngx_http_autoindex_module.c nginx-1.11.2/src/http/modules/ngx_http_autoindex_module.c +--- nginx-1.11.2-orig/src/http/modules/ngx_http_autoindex_module.c 2016-07-12 18:27:54.850769821 -0400 ++++ nginx-1.11.2/src/http/modules/ngx_http_autoindex_module.c 2016-07-12 18:57:24.517531092 -0400 @@ -445,9 +445,11 @@ ; @@ -172,9 +172,9 @@ diff -urN nginx-1.11.1-orig/src/http/modules/ngx_http_autoindex_module.c nginx-1 tm.ngx_tm_mday, months[tm.ngx_tm_mon - 1], tm.ngx_tm_year, -diff -urN nginx-1.11.1-orig/src/http/ngx_http_header_filter_module.c nginx-1.11.1/src/http/ngx_http_header_filter_module.c ---- nginx-1.11.1-orig/src/http/ngx_http_header_filter_module.c 2016-06-01 07:31:55.623143487 -0400 -+++ nginx-1.11.1/src/http/ngx_http_header_filter_module.c 2016-06-01 09:32:39.000000000 -0400 +diff -urN nginx-1.11.2-orig/src/http/ngx_http_header_filter_module.c nginx-1.11.2/src/http/ngx_http_header_filter_module.c +--- nginx-1.11.2-orig/src/http/ngx_http_header_filter_module.c 2016-07-12 18:27:54.855769823 -0400 ++++ nginx-1.11.2/src/http/ngx_http_header_filter_module.c 2016-07-12 19:01:30.000000000 -0400 @@ -46,7 +46,7 @@ }; @@ -228,9 +228,9 @@ diff -urN nginx-1.11.1-orig/src/http/ngx_http_header_filter_module.c nginx-1.11. #define NGX_HTTP_OFF_5XX (NGX_HTTP_LAST_4XX - 400 + NGX_HTTP_OFF_4XX) ngx_string("500 Internal Server Error"), -diff -urN nginx-1.11.1-orig/src/http/ngx_http_special_response.c nginx-1.11.1/src/http/ngx_http_special_response.c ---- nginx-1.11.1-orig/src/http/ngx_http_special_response.c 2016-06-01 07:31:55.624143487 -0400 -+++ nginx-1.11.1/src/http/ngx_http_special_response.c 2016-06-01 09:49:41.000000000 -0400 +diff -urN nginx-1.11.2-orig/src/http/ngx_http_special_response.c nginx-1.11.2/src/http/ngx_http_special_response.c +--- nginx-1.11.2-orig/src/http/ngx_http_special_response.c 2016-07-12 18:27:54.857769823 -0400 ++++ nginx-1.11.2/src/http/ngx_http_special_response.c 2016-07-12 18:57:48.265543888 -0400 @@ -19,14 +19,14 @@ @@ -683,11 +683,11 @@ diff -urN nginx-1.11.1-orig/src/http/ngx_http_special_response.c nginx-1.11.1/sr #define NGX_HTTP_OFF_5XX (NGX_HTTP_LAST_4XX - 400 + NGX_HTTP_OFF_4XX) ngx_string(ngx_http_error_494_page), /* 494, request header too large */ -diff -urN nginx-1.11.1-orig/src/http/v2/ngx_http_v2_filter_module.c nginx-1.11.1/src/http/v2/ngx_http_v2_filter_module.c ---- nginx-1.11.1-orig/src/http/v2/ngx_http_v2_filter_module.c 2016-06-01 07:31:55.626143488 -0400 -+++ nginx-1.11.1/src/http/v2/ngx_http_v2_filter_module.c 2016-06-01 10:28:47.000000000 -0400 -@@ -143,7 +143,7 @@ - #endif +diff -urN nginx-1.11.2-orig/src/http/v2/ngx_http_v2_filter_module.c nginx-1.11.2/src/http/v2/ngx_http_v2_filter_module.c +--- nginx-1.11.2-orig/src/http/v2/ngx_http_v2_filter_module.c 2016-07-12 18:27:54.860769824 -0400 ++++ nginx-1.11.2/src/http/v2/ngx_http_v2_filter_module.c 2016-07-12 19:03:04.000000000 -0400 +@@ -139,7 +139,7 @@ + ngx_http_core_srv_conf_t *cscf; u_char addr[NGX_SOCKADDR_STRLEN]; - static const u_char nginx[5] = "\x84\xaa\x63\x55\xe7"; @@ -695,7 +695,7 @@ diff -urN nginx-1.11.1-orig/src/http/v2/ngx_http_v2_filter_module.c nginx-1.11.1 #if (NGX_HTTP_GZIP) static const u_char accept_encoding[12] = "\x8b\x84\x84\x2d\x69\x5b\x05\x44\x3c\x86\xaa\x6f"; -@@ -437,7 +437,7 @@ +@@ -416,7 +416,7 @@ if (r->headers_out.server == NULL) { ngx_log_debug1(NGX_LOG_DEBUG_HTTP, fc->log, 0, "http2 output header: \"server: %s\"", @@ -704,9 +704,9 @@ diff -urN nginx-1.11.1-orig/src/http/v2/ngx_http_v2_filter_module.c nginx-1.11.1 *pos++ = ngx_http_v2_inc_indexed(NGX_HTTP_V2_SERVER_INDEX); -diff -urN nginx-1.11.1-orig/src/os/unix/ngx_setproctitle.c nginx-1.11.1/src/os/unix/ngx_setproctitle.c ---- nginx-1.11.1-orig/src/os/unix/ngx_setproctitle.c 2016-06-01 07:31:55.603143476 -0400 -+++ nginx-1.11.1/src/os/unix/ngx_setproctitle.c 2016-06-01 09:54:30.000000000 -0400 +diff -urN nginx-1.11.2-orig/src/os/unix/ngx_setproctitle.c nginx-1.11.2/src/os/unix/ngx_setproctitle.c +--- nginx-1.11.2-orig/src/os/unix/ngx_setproctitle.c 2016-07-12 18:27:54.836769823 -0400 ++++ nginx-1.11.2/src/os/unix/ngx_setproctitle.c 2016-07-12 18:58:12.202554002 -0400 @@ -89,7 +89,7 @@ ngx_os_argv[1] = NULL; diff --git a/patch-check.sh b/patch-check.sh new file mode 100755 index 0000000..738d4e9 --- /dev/null +++ b/patch-check.sh @@ -0,0 +1,77 @@ +#!/usr/bin/env bash + +############################################################################### + +NORM=0 +BOLD=1 +UNLN=4 +RED=31 +GREEN=32 +BROWN=33 +BLUE=34 +MAG=35 +CYAN=36 +GREY=37 + +CL_NORM="\e[${NORM}m" +CL_RED="\e[0;${RED};49m" +CL_GREEN="\e[0;${GREEN};49m" +CL_BROWN="\e[0;${BROWN};49m" +CL_BLUE="\e[0;${BLUE};49m" +CL_MAG="\e[0;${MAG};49m" +CL_CYAN="\e[0;${CYAN};49m" +CL_GREY="\e[0;${GREY};49m" +CL_BL_RED="\e[1;${RED};49m" +CL_BL_GREEN="\e[1;${GREEN};49m" +CL_BL_BROWN="\e[1;${BROWN};49m" +CL_BL_BLUE="\e[1;${BLUE};49m" +CL_BL_MAG="\e[1;${MAG};49m" +CL_BL_CYAN="\e[1;${CYAN};49m" +CL_BL_GREY="\e[1;${GREY};49m" + +############################################################################### + +main() { + if [[ $# -ne 3 ]] ; then + echo "Usage: ./patch-check.sh webkaos.patch old-ver-dir new-ver-dir" + exit 0 + fi + + local patch_file="$1" + local old_ver_dir="$2" + local new_ver_dir="$3" + + local sources=$(grep '+++' "$patch_file" | tr "\t" " " | cut -f2 -d" " | cut -f2-99 -d "/") + + show "" + + for source_file in $sources ; do + local old_ver_hash=$(getHash "$old_ver_dir/$source_file") + local new_ver_hash=$(getHash "$new_ver_dir/$source_file") + + if [[ "$old_ver_hash" == "$new_ver_hash" ]] ; then + show " ${CL_GREEN}✔${CL_NORM} $source_file" + else + local diff_size=$(diff -U 0 "$old_ver_dir/$source_file" "$new_ver_dir/$source_file" | grep -v ^@ | wc -l) + show " ${CL_RED}✖${CL_NORM} $source_file ${CL_GREY}($diff_size lines)${CL_NORM}" + fi + done + + show "" +} + +getHash() { + sha256sum "$1" | cut -f1 -d" " +} + +show() { + if [[ -n "$2" ]] ; then + echo -e "\e[${2}m${1}${CL_NORM}" + else + echo -e "$@" + fi +} + +############################################################################### + +main $@ diff --git a/webkaos-centos6.spec b/webkaos-centos6.spec index c615c1c..3489594 100644 --- a/webkaos-centos6.spec +++ b/webkaos-centos6.spec @@ -44,10 +44,10 @@ %define service_home %{_cachedir}/%{service_name} %define open_ssl_ver 1.0.2h -%define psol_ver 1.9.32.14 +%define psol_ver 1.11.33.2 %define lua_module_ver 0.10.5 %define mh_module_ver 0.30 -%define pcre_ver 8.38 +%define pcre_ver 8.39 %define zlib_ver 1.2.8 %define pagespeed_ver %{psol_ver}-beta @@ -58,8 +58,8 @@ Summary: Superb high performance web server Name: webkaos -Version: 1.11.1 -Release: 1%{?dist} +Version: 1.11.2 +Release: 0%{?dist} License: 2-clause BSD-like license Group: System Environment/Daemons Vendor: Nginx / Google / CloudFlare / ESSENTIALKAOS @@ -91,14 +91,14 @@ Source56: http://zlib.net/zlib-%{zlib_ver}.tar.gz Patch0: %{name}.patch Patch1: %{name}-dynamic-tls-records.patch Patch2: mime.patch -Patch3: pagespeed-config-%{psol_ver}.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: initscripts >= 8.36 kaosv >= 2.8 Requires: gd libXpm libxslt libluajit -BuildRequires: make gcc-c++ perl libluajit-devel +BuildRequires: make devtoolset-2-gcc-c++ devtoolset-2-binutils +BuildRequires: perl libluajit-devel Requires(pre): shadow-utils Requires(post): chkconfig @@ -152,10 +152,6 @@ Links for nginx compatibility. %patch1 -p1 %patch2 -p1 -pushd ngx_pagespeed-%{pagespeed_fullver} -%patch3 -p1 -popd - %build # Fixed bug with ngx_pagespeed comilation on i386 @@ -177,6 +173,9 @@ popd %{__mv} headers-more-nginx-module-%{mh_module_ver}/README.markdown ./HEADERSMORE-README.markdown +# Use gcc and gcc-c++ from devtoolset for build +export PATH="/opt/rh/devtoolset-2/root/usr/bin:$PATH" + ./configure \ --prefix=%{_sysconfdir}/%{name} \ --sbin-path=%{_sbindir}/%{name} \ @@ -465,6 +464,11 @@ fi ############################################################################### %changelog +* Wed Jul 13 2016 Anton Novojilov - 1.11.2-0 +- Nginx updated to 1.11.2 +- PageSpeed updated to 1.11.33.2 +- PCRE updated to 8.39 + * Tue Jun 14 2016 Anton Novojilov - 1.11.1-1 - Added patch for dynamic TLS records size diff --git a/webkaos-centos7.spec b/webkaos-centos7.spec index 8689f0d..18c765e 100644 --- a/webkaos-centos7.spec +++ b/webkaos-centos7.spec @@ -47,7 +47,7 @@ %define psol_ver 1.11.33.2 %define lua_module_ver 0.10.5 %define mh_module_ver 0.30 -%define pcre_ver 8.38 +%define pcre_ver 8.39 %define zlib_ver 1.2.8 %define pagespeed_ver %{psol_ver}-beta @@ -58,8 +58,8 @@ Summary: Superb high performance web server Name: webkaos -Version: 1.11.1 -Release: 2%{?dist} +Version: 1.11.2 +Release: 0%{?dist} License: 2-clause BSD-like license Group: System Environment/Daemons Vendor: Nginx / Google / CloudFlare / ESSENTIALKAOS @@ -460,6 +460,10 @@ fi ############################################################################### %changelog +* Wed Jul 13 2016 Anton Novojilov - 1.11.2-0 +- Nginx updated to 1.11.2 +- PCRE updated to 8.39 + * Fri Jun 17 2016 Anton Novojilov - 1.11.1-2 - Added TCP Fast Open support From dc9993e8d95b860e3ad1c9256e4aefafd51e4faa Mon Sep 17 00:00:00 2001 From: Anton Novojilov Date: Tue, 12 Jul 2016 19:57:58 -0400 Subject: [PATCH 2/2] Removed patch for old verions of pagespeed --- SOURCES/pagespeed-config-1.9.32.14.patch | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 SOURCES/pagespeed-config-1.9.32.14.patch diff --git a/SOURCES/pagespeed-config-1.9.32.14.patch b/SOURCES/pagespeed-config-1.9.32.14.patch deleted file mode 100644 index 7f478f8..0000000 --- a/SOURCES/pagespeed-config-1.9.32.14.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -urN ngx_pagespeed-release-1.9.32.14-beta-orig/config ngx_pagespeed-release-1.9.32.14-beta/config ---- ngx_pagespeed-release-1.9.32.14-beta-orig/config 2016-04-27 12:24:06.986198238 -0400 -+++ ngx_pagespeed-release-1.9.32.14-beta/config 2016-04-27 12:24:38.000000000 -0400 -@@ -195,10 +195,10 @@ - - # Make pagespeed run immediately before gzip. - HTTP_FILTER_MODULES=$(echo $HTTP_FILTER_MODULES |\ -- sed "s/$HTTP_GZIP_FILTER_MODULE/$HTTP_GZIP_FILTER_MODULE $ngx_addon_name/") -+ sed "s/ngx_http_gzip_filter_module/ngx_http_gzip_filter_module $ngx_addon_name/") - # Make the etag header filter run immediately after gzip. - HTTP_FILTER_MODULES=$(echo $HTTP_FILTER_MODULES |\ -- sed "s/$HTTP_GZIP_FILTER_MODULE/ngx_pagespeed_etag_filter $HTTP_GZIP_FILTER_MODULE/") -+ sed "s/ngx_http_gzip_filter_module/ngx_pagespeed_etag_filter ngx_http_gzip_filter_module/") - CORE_LIBS="$CORE_LIBS $pagespeed_libs" - CORE_INCS="$CORE_INCS $pagespeed_include" - echo "List of modules (in reverse order of applicability): "$HTTP_FILTER_MODULES