From b328583b6b67c48a748ab5636b89f60477be7f7a Mon Sep 17 00:00:00 2001 From: Anton Novojilov Date: Wed, 27 Apr 2016 13:32:42 -0400 Subject: [PATCH] Updated to 1.10.0 --- SOURCES/bots.conf | 17 ++ ...peed_access.pswd => pagespeed-access.pswd} | 0 SOURCES/pagespeed-config-1.9.32.14.patch | 16 ++ ...ed_enabled.conf => pagespeed-enabled.conf} | 2 +- SOURCES/webkaos.conf | 34 +++- SOURCES/webkaos.logrotate | 3 +- SOURCES/webkaos.patch | 184 +++++++++++------- webkaos.spec | 68 +++++-- 8 files changed, 223 insertions(+), 101 deletions(-) create mode 100644 SOURCES/bots.conf rename SOURCES/{pagespeed_access.pswd => pagespeed-access.pswd} (100%) create mode 100644 SOURCES/pagespeed-config-1.9.32.14.patch rename SOURCES/{pagespeed_enabled.conf => pagespeed-enabled.conf} (96%) diff --git a/SOURCES/bots.conf b/SOURCES/bots.conf new file mode 100644 index 0000000..d574e44 --- /dev/null +++ b/SOURCES/bots.conf @@ -0,0 +1,17 @@ + + # Usage: + # include xtra/bots.conf + # if ($is_scanbot = 1) { + # return 403; + # } + + map $http_user_agent $is_scanbot { + default 0; + ~*(google|bing|yandex|msnbot) 1; + ~*(AltaVista|Googlebot|Slurp|BlackWidow|Bot|ChinaClaw|Custo|DISCo|Download|Demon|eCatch|EirGrabber|EmailSiphon|EmailWolf|SuperHTTP|Surfbot|WebWhacker) 1; + ~*(Express|WebPictures|ExtractorPro|EyeNetIE|FlashGet|GetRight|GetWeb!|Go!Zilla|Go-Ahead-Got-It|GrabNet|Grafula|HMView|Go!Zilla|Go-Ahead-Got-It) 1; + ~*(rafula|HMView|HTTrack|Stripper|Sucker|Indy|InterGET|Ninja|JetCar|Spider|larbin|LeechFTP|Downloader|tool|Navroad|NearSite|NetAnts|tAkeOut|WWWOFFLE) 1; + ~*(GrabNet|NetSpider|Vampire|NetZIP|Octopus|Offline|PageGrabber|Foto|pavuk|pcBrowser|RealDownload|ReGet|SiteSnagger|SmartDownload|SuperBot|WebSpider) 1; + ~*(Teleport|VoidEYE|Collector|WebAuto|WebCopier|WebFetch|WebGo|WebLeacher|WebReaper|WebSauger|eXtractor|Quester|WebStripper|WebZIP|Wget|Widow|Zeus) 1; + ~*(Twengabot|htmlparser|libwww|Python|perl|urllib|scan|email|Pyth|PyQ|WebCollector|WebCopy|webcraw) 1; + } diff --git a/SOURCES/pagespeed_access.pswd b/SOURCES/pagespeed-access.pswd similarity index 100% rename from SOURCES/pagespeed_access.pswd rename to SOURCES/pagespeed-access.pswd diff --git a/SOURCES/pagespeed-config-1.9.32.14.patch b/SOURCES/pagespeed-config-1.9.32.14.patch new file mode 100644 index 0000000..7f478f8 --- /dev/null +++ b/SOURCES/pagespeed-config-1.9.32.14.patch @@ -0,0 +1,16 @@ +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 diff --git a/SOURCES/pagespeed_enabled.conf b/SOURCES/pagespeed-enabled.conf similarity index 96% rename from SOURCES/pagespeed_enabled.conf rename to SOURCES/pagespeed-enabled.conf index c61db7b..899748f 100644 --- a/SOURCES/pagespeed_enabled.conf +++ b/SOURCES/pagespeed-enabled.conf @@ -23,7 +23,7 @@ location /pagespeed { deny all; auth_basic "PageSpeed Private Area"; - auth_basic_user_file xtra/pagespeed_access.pswd; + auth_basic_user_file xtra/pagespeed-access.pswd; } ############################################################################### diff --git a/SOURCES/webkaos.conf b/SOURCES/webkaos.conf index a9522e4..4c110b8 100644 --- a/SOURCES/webkaos.conf +++ b/SOURCES/webkaos.conf @@ -43,11 +43,25 @@ http { '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; - log_format upsteram '$remote_addr - [$time_local] "$request" ' - '$status $body_bytes_sent ' - '"$http_x_forwarded_for" "$http_referer" $host ' - '$request_time $upstream_response_time ' - '$upstream_addr - $upstream_status '; + log_format extended '$remote_addr - [$time_local] "$request" ' + '$status $body_bytes_sent ' + '"$http_x_forwarded_for" "$http_referer" $host ' + '$request_time $upstream_response_time ' + '$upstream_addr - $upstream_status '; + + log_format reflog '$remote_addr - $remote_user [$time_local] ' + '"$request" $status $bytes_sent ' + '"$http_referer" "$http_user_agent" '; + + log_format timed_combined '$remote_addr - $remote_user [$time_local] ' + '"$request" $status $body_bytes_sent ' + '"$http_x_forwarded_for" "$http_referer" $host' + '"$http_referer" "$http_user_agent" ' + '$request_time $upstream_response_time'; + + log_format vhost_ip_full_format '$remote_addr - $remote_user [$time_local] $host $server_addr $request ' + '$status $body_bytes_sent "$http_referer"' + '"$http_user_agent" "$http_x_forwarded_for" $request_time-$upstream_response_time'; access_log /var/log/webkaos/access.log main; @@ -56,10 +70,12 @@ http { tcp_nodelay off; ssi off; - client_body_timeout 15; - client_header_timeout 15; - keepalive_timeout 30; - send_timeout 15; + client_body_timeout 15; + client_header_timeout 15; + client_header_buffer_size 1k; + keepalive_timeout 30; + send_timeout 15; + large_client_header_buffers 4 16k; server_names_hash_max_size 1024; server_names_hash_bucket_size {BUCKET_SIZE}; diff --git a/SOURCES/webkaos.logrotate b/SOURCES/webkaos.logrotate index 0be12f7..c86016f 100644 --- a/SOURCES/webkaos.logrotate +++ b/SOURCES/webkaos.logrotate @@ -1,4 +1,5 @@ -/var/log/webkaos/*.log { +/var/log/webkaos/*.log +/var/log/webkaos/*/*.log { daily missingok rotate 62 diff --git a/SOURCES/webkaos.patch b/SOURCES/webkaos.patch index 3073ed9..9a040a6 100644 --- a/SOURCES/webkaos.patch +++ b/SOURCES/webkaos.patch @@ -1,21 +1,12 @@ -diff -urN nginx-1.9.10-orig/auto/lib/openssl/make nginx-1.9.10/auto/lib/openssl/make ---- nginx-1.9.10-orig/auto/lib/openssl/make 2016-02-02 00:50:21.845000241 +0100 -+++ nginx-1.9.10/auto/lib/openssl/make 2014-10-11 13:11:31.000000000 +0200 -@@ -41,22 +41,28 @@ - ;; - - *) -+ case $USE_THREADS in -+ NO) OPENSSL_OPT="$OPENSSL_OPT no-threads" ;; -+ *) OPENSSL_OPT="$OPENSSL_OPT threads" ;; -+ esac -+ - case $OPENSSL in +diff -urN nginx-1.10.0-orig/auto/lib/openssl/make nginx-1.10.0/auto/lib/openssl/make +--- nginx-1.10.0-orig/auto/lib/openssl/make 2016-04-26 09:31:19.000000000 -0400 ++++ nginx-1.10.0/auto/lib/openssl/make 2016-04-27 06:35:03.000000000 -0400 +@@ -45,18 +45,18 @@ /*) ngx_prefix="$OPENSSL/.openssl" ;; *) ngx_prefix="$PWD/$OPENSSL/.openssl" ;; esac - -+ if [ ! -d "$ngx_prefix" ]; then +- ++ if [ ! -d "$ngx_prefix" ]; then cat << END >> $NGX_MAKEFILE $OPENSSL/.openssl/include/openssl/ssl.h: $NGX_MAKEFILE @@ -23,22 +14,22 @@ diff -urN nginx-1.9.10-orig/auto/lib/openssl/make nginx-1.9.10/auto/lib/openssl/ && if [ -f Makefile ]; then \$(MAKE) clean; fi \\ && ./config --prefix=$ngx_prefix no-shared $OPENSSL_OPT \\ - && \$(MAKE) \\ -- && \$(MAKE) install LIBDIR=lib -+ && \$(MAKE) -j1 \\ -+ && \$(MAKE) -j1 install LIBDIR=lib +- && \$(MAKE) install_sw LIBDIR=lib ++ && \$(MAKE) -j1\\ ++ && \$(MAKE) -j1 install_sw LIBDIR=lib END - -+ fi ++ fi ;; esac -diff -urN nginx-1.9.10-orig/src/core/nginx.c nginx-1.9.10/src/core/nginx.c ---- nginx-1.9.10-orig/src/core/nginx.c 2016-02-02 00:50:21.870000529 +0100 -+++ nginx-1.9.10/src/core/nginx.c 2016-02-03 22:44:23.000000000 +0100 -@@ -366,13 +366,13 @@ +diff -urN nginx-1.10.0-orig/src/core/nginx.c nginx-1.10.0/src/core/nginx.c +--- nginx-1.10.0-orig/src/core/nginx.c 2016-04-26 09:31:19.000000000 -0400 ++++ nginx-1.10.0/src/core/nginx.c 2016-04-27 06:36:46.000000000 -0400 +@@ -374,13 +374,13 @@ static void - ngx_show_version_info() + ngx_show_version_info(void) { - ngx_write_stderr("nginx version: " NGINX_VER_BUILD NGX_LINEFEED); + ngx_write_stderr("webkaos version: " NGINX_VER_BUILD NGX_LINEFEED); @@ -54,13 +45,13 @@ diff -urN nginx-1.9.10-orig/src/core/nginx.c nginx-1.9.10/src/core/nginx.c "Options:" NGX_LINEFEED " -?,-h : this help" NGX_LINEFEED " -v : show version and exit" NGX_LINEFEED -diff -urN nginx-1.9.10-orig/src/core/nginx.h nginx-1.9.10/src/core/nginx.h ---- nginx-1.9.10-orig/src/core/nginx.h 2016-02-02 00:50:21.871000531 +0100 -+++ nginx-1.9.10/src/core/nginx.h 2016-02-03 22:43:38.000000000 +0100 +diff -urN nginx-1.10.0-orig/src/core/nginx.h nginx-1.10.0/src/core/nginx.h +--- nginx-1.10.0-orig/src/core/nginx.h 2016-04-26 09:31:19.000000000 -0400 ++++ nginx-1.10.0/src/core/nginx.h 2016-04-27 06:35:35.000000000 -0400 @@ -11,7 +11,7 @@ - #define nginx_version 1009010 - #define NGINX_VERSION "1.9.10" + #define nginx_version 1010000 + #define NGINX_VERSION "1.10.0" -#define NGINX_VER "nginx/" NGINX_VERSION +#define NGINX_VER "webkaos/" NGINX_VERSION @@ -75,9 +66,9 @@ diff -urN nginx-1.9.10-orig/src/core/nginx.h nginx-1.9.10/src/core/nginx.h #define NGX_OLDPID_EXT ".oldbin" -diff -urN nginx-1.9.10-orig/src/core/ngx_log.c nginx-1.9.10/src/core/ngx_log.c ---- nginx-1.9.10-orig/src/core/ngx_log.c 2016-02-02 00:50:21.870000530 +0100 -+++ nginx-1.9.10/src/core/ngx_log.c 2016-02-03 22:45:32.000000000 +0100 +diff -urN nginx-1.10.0-orig/src/core/ngx_log.c nginx-1.10.0/src/core/ngx_log.c +--- nginx-1.10.0-orig/src/core/ngx_log.c 2016-04-26 09:31:19.000000000 -0400 ++++ nginx-1.10.0/src/core/ngx_log.c 2016-04-27 06:37:52.000000000 -0400 @@ -202,9 +202,9 @@ return; } @@ -108,10 +99,10 @@ diff -urN nginx-1.9.10-orig/src/core/ngx_log.c nginx-1.9.10/src/core/ngx_log.c return NGX_CONF_ERROR; #endif -diff -urN nginx-1.9.10-orig/src/event/ngx_event_openssl.c nginx-1.9.10/src/event/ngx_event_openssl.c ---- nginx-1.9.10-orig/src/event/ngx_event_openssl.c 2016-02-02 00:50:21.855000475 +0100 -+++ nginx-1.9.10/src/event/ngx_event_openssl.c 2016-02-03 22:47:09.000000000 +0100 -@@ -729,7 +729,7 @@ +diff -urN nginx-1.10.0-orig/src/event/ngx_event_openssl.c nginx-1.10.0/src/event/ngx_event_openssl.c +--- nginx-1.10.0-orig/src/event/ngx_event_openssl.c 2016-04-26 09:31:19.000000000 -0400 ++++ nginx-1.10.0/src/event/ngx_event_openssl.c 2016-04-27 06:44:07.000000000 -0400 +@@ -740,7 +740,7 @@ wbio = SSL_get_wbio((ngx_ssl_conn_t *) ssl_conn); if (rbio != wbio) { @@ -120,10 +111,10 @@ diff -urN nginx-1.9.10-orig/src/event/ngx_event_openssl.c nginx-1.9.10/src/event c->ssl->handshake_buffer_set = 1; } } -diff -urN nginx-1.9.10-orig/src/event/ngx_event_openssl.h nginx-1.9.10/src/event/ngx_event_openssl.h ---- nginx-1.9.10-orig/src/event/ngx_event_openssl.h 2016-02-02 00:50:21.856000493 +0100 -+++ nginx-1.9.10/src/event/ngx_event_openssl.h 2016-02-03 22:47:31.000000000 +0100 -@@ -118,7 +118,8 @@ +diff -urN nginx-1.10.0-orig/src/event/ngx_event_openssl.h nginx-1.10.0/src/event/ngx_event_openssl.h +--- nginx-1.10.0-orig/src/event/ngx_event_openssl.h 2016-04-26 09:31:19.000000000 -0400 ++++ nginx-1.10.0/src/event/ngx_event_openssl.h 2016-04-27 06:43:05.000000000 -0400 +@@ -135,7 +135,8 @@ #define NGX_SSL_BUFFER 1 #define NGX_SSL_CLIENT 2 @@ -133,9 +124,9 @@ diff -urN nginx-1.9.10-orig/src/event/ngx_event_openssl.h nginx-1.9.10/src/event ngx_int_t ngx_ssl_init(ngx_log_t *log); -diff -urN nginx-1.9.10-orig/src/http/modules/ngx_http_autoindex_module.c nginx-1.9.10/src/http/modules/ngx_http_autoindex_module.c ---- nginx-1.9.10-orig/src/http/modules/ngx_http_autoindex_module.c 2016-02-02 00:50:21.861000547 +0100 -+++ nginx-1.9.10/src/http/modules/ngx_http_autoindex_module.c 2014-12-29 14:19:39.000000000 +0100 +diff -urN nginx-1.10.0-orig/src/http/modules/ngx_http_autoindex_module.c nginx-1.10.0/src/http/modules/ngx_http_autoindex_module.c +--- nginx-1.10.0-orig/src/http/modules/ngx_http_autoindex_module.c 2016-04-26 09:31:19.000000000 -0400 ++++ nginx-1.10.0/src/http/modules/ngx_http_autoindex_module.c 2014-12-29 08:19:39.000000000 -0500 @@ -445,9 +445,11 @@ ; @@ -211,9 +202,9 @@ diff -urN nginx-1.9.10-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.9.10-orig/src/http/ngx_http_header_filter_module.c nginx-1.9.10/src/http/ngx_http_header_filter_module.c ---- nginx-1.9.10-orig/src/http/ngx_http_header_filter_module.c 2016-02-02 00:50:21.866000529 +0100 -+++ nginx-1.9.10/src/http/ngx_http_header_filter_module.c 2016-02-03 22:49:43.000000000 +0100 +diff -urN nginx-1.10.0-orig/src/http/ngx_http_header_filter_module.c nginx-1.10.0/src/http/ngx_http_header_filter_module.c +--- nginx-1.10.0-orig/src/http/ngx_http_header_filter_module.c 2016-04-26 09:31:20.000000000 -0400 ++++ nginx-1.10.0/src/http/ngx_http_header_filter_module.c 2016-04-27 06:52:57.000000000 -0400 @@ -46,7 +46,7 @@ }; @@ -223,9 +214,60 @@ diff -urN nginx-1.9.10-orig/src/http/ngx_http_header_filter_module.c nginx-1.9.1 static char ngx_http_server_full_string[] = "Server: " NGINX_VER CRLF; -diff -urN nginx-1.9.10-orig/src/http/ngx_http_special_response.c nginx-1.9.10/src/http/ngx_http_special_response.c ---- nginx-1.9.10-orig/src/http/ngx_http_special_response.c 2016-02-02 00:50:21.866000529 +0100 -+++ nginx-1.9.10/src/http/ngx_http_special_response.c 2016-02-03 23:53:21.000000000 +0100 +@@ -95,15 +95,41 @@ + ngx_string("414 Request-URI Too Large"), + ngx_string("415 Unsupported Media Type"), + ngx_string("416 Requested Range Not Satisfiable"), +- +- /* ngx_null_string, */ /* "417 Expectation Failed" */ +- /* ngx_null_string, */ /* "418 unused" */ +- /* ngx_null_string, */ /* "419 unused" */ +- /* ngx_null_string, */ /* "420 unused" */ +- /* ngx_null_string, */ /* "421 unused" */ +- /* ngx_null_string, */ /* "422 Unprocessable Entity" */ +- /* ngx_null_string, */ /* "423 Locked" */ +- /* ngx_null_string, */ /* "424 Failed Dependency" */ ++ ngx_null_string, /* "417 Expectation Failed" */ ++ ngx_null_string, /* "418 unused" */ ++ ngx_null_string, /* "419 unused" */ ++ ngx_null_string, /* "420 unused" */ ++ ngx_null_string, /* "421 unused" */ ++ ngx_null_string, /* "422 Unprocessable Entity" */ ++ ngx_null_string, /* "423 Locked" */ ++ ngx_null_string, /* "424 Failed Dependency" */ ++ ngx_null_string, /* "425 unused" */ ++ ngx_null_string, /* "426 unused" */ ++ ngx_null_string, /* "427 unused" */ ++ ngx_null_string, /* "428 unused" */ ++ ngx_null_string, /* "429 unused" */ ++ ngx_null_string, /* "430 unused" */ ++ ngx_null_string, /* "431 unused" */ ++ ngx_null_string, /* "432 unused" */ ++ ngx_null_string, /* "433 unused" */ ++ ngx_null_string, /* "434 unused" */ ++ ngx_null_string, /* "435 unused" */ ++ ngx_null_string, /* "436 unused" */ ++ ngx_null_string, /* "437 unused" */ ++ ngx_null_string, /* "438 unused" */ ++ ngx_null_string, /* "439 unused" */ ++ ngx_null_string, /* "440 unused" */ ++ ngx_null_string, /* "441 unused" */ ++ ngx_null_string, /* "442 unused" */ ++ ngx_null_string, /* "443 unused" */ ++ ngx_null_string, /* "444 unused" */ ++ ngx_null_string, /* "445 unused" */ ++ ngx_null_string, /* "446 unused" */ ++ ngx_null_string, /* "447 unused" */ ++ ngx_null_string, /* "448 unused" */ ++ ngx_null_string, /* "449 unused" */ ++ ngx_null_string, /* "450 unused" */ ++ ngx_string("451 Unavailable For Legal Reasons"), + + #define NGX_HTTP_LAST_4XX 417 + #define NGX_HTTP_OFF_5XX (NGX_HTTP_LAST_4XX - 400 + NGX_HTTP_OFF_4XX) +diff -urN nginx-1.10.0-orig/src/http/ngx_http_special_response.c nginx-1.10.0/src/http/ngx_http_special_response.c +--- nginx-1.10.0-orig/src/http/ngx_http_special_response.c 2016-04-26 09:31:20.000000000 -0400 ++++ nginx-1.10.0/src/http/ngx_http_special_response.c 2016-02-03 17:53:21.000000000 -0500 @@ -19,14 +19,14 @@ @@ -671,32 +713,30 @@ diff -urN nginx-1.9.10-orig/src/http/ngx_http_special_response.c nginx-1.9.10/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.9.10-orig/src/http/v2/ngx_http_v2_filter_module.c nginx-1.9.10/src/http/v2/ngx_http_v2_filter_module.c ---- nginx-1.9.10-orig/src/http/v2/ngx_http_v2_filter_module.c 2016-02-02 00:50:21.867000523 +0100 -+++ nginx-1.9.10/src/http/v2/ngx_http_v2_filter_module.c 2016-02-03 23:05:38.000000000 +0100 -@@ -216,7 +216,7 @@ - +diff -urN nginx-1.10.0-orig/src/http/v2/ngx_http_v2_filter_module.c nginx-1.10.0/src/http/v2/ngx_http_v2_filter_module.c +--- nginx-1.10.0-orig/src/http/v2/ngx_http_v2_filter_module.c 2016-04-26 09:31:20.000000000 -0400 ++++ nginx-1.10.0/src/http/v2/ngx_http_v2_filter_module.c 2016-04-27 08:38:56.000000000 -0400 +@@ -143,7 +143,7 @@ + #endif + u_char addr[NGX_SOCKADDR_STRLEN]; + +- static const u_char nginx[5] = "\x84\xaa\x63\x55\xe7"; ++ static const u_char nginx[6] = "\x85\xf0\x58\xfa\x8c\xe8"; + #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 @@ if (r->headers_out.server == NULL) { - len += 1 + clcf->server_tokens ? ngx_http_v2_literal_size(NGINX_VER) -- : ngx_http_v2_literal_size("nginx"); -+ : ngx_http_v2_literal_size("webkaos"); - } + ngx_log_debug1(NGX_LOG_DEBUG_HTTP, fc->log, 0, + "http2 output header: \"server: %s\"", +- clcf->server_tokens ? NGINX_VER : "nginx"); ++ clcf->server_tokens ? NGINX_VER : "webkaos"); - if (r->headers_out.date == NULL) { -@@ -412,8 +412,8 @@ - pos = ngx_cpymem(pos, NGINX_VER, sizeof(NGINX_VER) - 1); - - } else { -- *pos++ = NGX_HTTP_V2_ENCODE_RAW | (sizeof("nginx") - 1); -- pos = ngx_cpymem(pos, "nginx", sizeof("nginx") - 1); -+ *pos++ = NGX_HTTP_V2_ENCODE_RAW | (sizeof("webkaos") - 1); -+ pos = ngx_cpymem(pos, "webkaos", sizeof("webkaos") - 1); - } - } + *pos++ = ngx_http_v2_inc_indexed(NGX_HTTP_V2_SERVER_INDEX); -diff -urN nginx-1.9.10-orig/src/os/unix/ngx_setproctitle.c nginx-1.9.10/src/os/unix/ngx_setproctitle.c ---- nginx-1.9.10-orig/src/os/unix/ngx_setproctitle.c 2016-02-02 00:50:21.851000419 +0100 -+++ nginx-1.9.10/src/os/unix/ngx_setproctitle.c 2016-02-03 23:06:08.000000000 +0100 +diff -urN nginx-1.10.0-orig/src/os/unix/ngx_setproctitle.c nginx-1.10.0/src/os/unix/ngx_setproctitle.c +--- nginx-1.10.0-orig/src/os/unix/ngx_setproctitle.c 2016-04-26 09:31:20.000000000 -0400 ++++ nginx-1.10.0/src/os/unix/ngx_setproctitle.c 2016-04-27 07:35:45.000000000 -0400 @@ -89,7 +89,7 @@ ngx_os_argv[1] = NULL; diff --git a/webkaos.spec b/webkaos.spec index 45c6dd1..b9e6b57 100644 --- a/webkaos.spec +++ b/webkaos.spec @@ -43,21 +43,23 @@ %define service_name %{name} %define service_home %{_cachedir}/%{service_name} -%define open_ssl_ver 1.0.2f -%define psol_ver 1.9.32.13 +%define open_ssl_ver 1.0.2g +%define psol_ver 1.9.32.14 +%define lua_module_ver 0.10.2 +%define mh_module_ver 0.29 +%define pcre_ver 8.38 +%define zlib_ver 1.2.8 + %define pagespeed_ver %{psol_ver}-beta %define pagespeed_fullver release-%{pagespeed_ver} %define pagespeed_cache_path %{service_home}/pagespeed -%define lua_module_ver 0.10.0 -%define mh_module_ver 0.29 - ############################################################################### Summary: Superb high performance web server Name: webkaos -Version: 1.9.10 -Release: 1%{?dist} +Version: 1.10.0 +Release: 0%{?dist} License: 2-clause BSD-like license Group: System Environment/Daemons Vendor: Nginx / Google / CloudFlare / ESSENTIALKAOS @@ -70,10 +72,11 @@ Source3: %{name}.sysconfig Source4: %{name}.conf Source20: pagespeed.conf -Source21: pagespeed_enabled.conf -Source22: pagespeed_access.pswd +Source21: pagespeed-enabled.conf +Source22: pagespeed-access.pswd Source23: ssl.conf Source24: common.conf +Source25: bots.conf Source30: %{name}-index.html @@ -82,17 +85,19 @@ Source51: https://dl.google.com/dl/page-speed/psol/%{psol_ver}.tar.g Source52: https://github.com/openresty/lua-nginx-module/archive/v%{lua_module_ver}.tar.gz Source53: http://www.openssl.org/source/openssl-%{open_ssl_ver}.tar.gz Source54: https://github.com/openresty/headers-more-nginx-module/archive/v%{mh_module_ver}.tar.gz +Source55: http://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-%{pcre_ver}.tar.gz +Source56: http://zlib.net/zlib-%{zlib_ver}.tar.gz Patch0: %{name}.patch Patch1: mime.patch +Patch2: pagespeed-config-%{psol_ver}.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: initscripts >= 8.36 openssl zlib -Requires: gd libXpm libxslt libluajit kaosv >= 2.6 +Requires: gd libXpm libxslt libluajit kaosv >= 2.8 -BuildRequires: make gcc-c++ zlib-devel pcre-devel perl -BuildRequires: openssl-devel make libluajit-devel +BuildRequires: make gcc-c++ perl openssl-devel libluajit-devel Requires(pre): shadow-utils Requires(post): chkconfig @@ -132,15 +137,22 @@ Links for nginx compatibility. %prep %setup -q -n nginx-%{version} -%patch0 -p1 -%patch1 -p1 - -%build %{__unzip} %{SOURCE50} %{__tar} xzvf %{SOURCE51} -C ngx_pagespeed-%{pagespeed_fullver} %{__tar} xzvf %{SOURCE52} %{__tar} xzvf %{SOURCE53} %{__tar} xzvf %{SOURCE54} +%{__tar} xzvf %{SOURCE55} +%{__tar} xzvf %{SOURCE56} + +%patch0 -p1 +%patch1 -p1 + +pushd ngx_pagespeed-%{pagespeed_fullver} +%patch2 -p1 +popd + +%build # Fixed bug with ngx_pagespeed comilation on i386 %ifarch %ix86 @@ -159,6 +171,8 @@ Links for nginx compatibility. %{__mv} lua-nginx-module-%{lua_module_ver}/README.markdown ./LUAMODULE-README.markdown %{__mv} lua-nginx-module-%{lua_module_ver}/Changes ./LUAMODULE-CHANGES +%{__mv} headers-more-nginx-module-%{mh_module_ver}/README.markdown ./HEADERSMORE-README.markdown + ./configure \ --prefix=%{_sysconfdir}/%{name} \ --sbin-path=%{_sbindir}/%{name} \ @@ -194,6 +208,9 @@ Links for nginx compatibility. --with-file-aio \ --with-ipv6 \ --with-debug \ + --with-zlib=zlib-%{zlib_ver} \ + --with-pcre-jit \ + --with-pcre=pcre-%{pcre_ver} \ --with-openssl-opt=no-krb5 \ --with-openssl=openssl-%{open_ssl_ver} \ --add-module=ngx_pagespeed-%{pagespeed_fullver} \ @@ -239,6 +256,9 @@ Links for nginx compatibility. --with-mail_ssl_module \ --with-file-aio \ --with-ipv6 \ + --with-zlib=zlib-%{zlib_ver} \ + --with-pcre-jit \ + --with-pcre=pcre-%{pcre_ver} \ --with-openssl-opt=no-krb5 \ --with-openssl=openssl-%{open_ssl_ver} \ --add-module=ngx_pagespeed-%{pagespeed_fullver} \ @@ -295,6 +315,7 @@ install -dm 755 %{buildroot}%{_sysconfdir}/%{name}/xtra install -pm 644 %{SOURCE4} \ %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf +# Install XTRA configs install -pm 644 %{SOURCE20} \ %{buildroot}%{_sysconfdir}/%{name}/xtra/ install -pm 644 %{SOURCE21} \ @@ -305,6 +326,8 @@ install -pm 644 %{SOURCE23} \ %{buildroot}%{_sysconfdir}/%{name}/xtra/ install -pm 644 %{SOURCE24} \ %{buildroot}%{_sysconfdir}/%{name}/xtra/ +install -pm 644 %{SOURCE25} \ + %{buildroot}%{_sysconfdir}/%{name}/xtra/ install -dm 755 %{buildroot}%{_sysconfdir}/sysconfig @@ -385,6 +408,7 @@ fi %doc NGINX-CHANGES NGINX-CHANGES.ru NGINX-LICENSE NGINX-README %doc PAGESPEED-LICENSE PAGESPEED-README.md %doc LUAMODULE-README.markdown LUAMODULE-CHANGES +%doc HEADERSMORE-README.markdown %{_sbindir}/%{name} @@ -393,11 +417,12 @@ fi %dir %{_sysconfdir}/%{name}/conf.d %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf -%config(noreplace) %{_sysconfdir}/%{name}/xtra/pagespeed_access.pswd +%config(noreplace) %{_sysconfdir}/%{name}/xtra/pagespeed-access.pswd %config(noreplace) %{_sysconfdir}/%{name}/xtra/pagespeed.conf -%config(noreplace) %{_sysconfdir}/%{name}/xtra/pagespeed_enabled.conf +%config(noreplace) %{_sysconfdir}/%{name}/xtra/pagespeed-enabled.conf %config %{_sysconfdir}/%{name}/xtra/common.conf %config %{_sysconfdir}/%{name}/xtra/ssl.conf +%config %{_sysconfdir}/%{name}/xtra/bots.conf %config %{_sysconfdir}/%{name}/mime.types %config %{_sysconfdir}/%{name}/fastcgi_params @@ -436,6 +461,13 @@ fi ############################################################################### %changelog +* Wed Apr 27 2016 Anton Novojilov - 1.10.0-0 +- Nginx updated to 1.10.0 +- PageSpeed updated to 1.9.32.14 +- Lua module updated to 0.10.2 +- OpenSSL updated to 1.0.2g +- Added pcre with jit and zlib + * Wed Feb 10 2016 Anton Novojilov - 1.9.10-1 - PageSpeed updated to 1.9.32.13