nginx: 1.26.3
This commit is contained in:
parent
adbf5f9291
commit
6bb9654f85
276
modular/nginx-cp/1.26.2-zlib-ng.patch
Normal file
276
modular/nginx-cp/1.26.2-zlib-ng.patch
Normal file
@ -0,0 +1,276 @@
|
||||
diff -ru nginx-1.26.2/auto/lib/zlib/conf nginx-1.26.2-zlib-ng/auto/lib/zlib/conf
|
||||
--- nginx-1.26.2/auto/lib/zlib/conf 2024-08-12 16:28:31.000000000 +0200
|
||||
+++ nginx-1.26.2-zlib-ng/auto/lib/zlib/conf 2024-10-18 13:59:33.218699818 +0200
|
||||
@@ -33,8 +33,8 @@
|
||||
|
||||
*)
|
||||
have=NGX_ZLIB . auto/have
|
||||
- LINK_DEPS="$LINK_DEPS $ZLIB/libz.a"
|
||||
- CORE_LIBS="$CORE_LIBS $ZLIB/libz.a"
|
||||
+ LINK_DEPS="$LINK_DEPS $ZLIB/libz-ng.a"
|
||||
+ CORE_LIBS="$CORE_LIBS $ZLIB/libz-ng.a"
|
||||
#CORE_LIBS="$CORE_LIBS -L $ZLIB -lz"
|
||||
;;
|
||||
|
||||
@@ -50,10 +50,10 @@
|
||||
ngx_feature="zlib library"
|
||||
ngx_feature_name="NGX_ZLIB"
|
||||
ngx_feature_run=no
|
||||
- ngx_feature_incs="#include <zlib.h>"
|
||||
+ ngx_feature_incs="#include <zlib-ng.h>"
|
||||
ngx_feature_path=
|
||||
- ngx_feature_libs="-lz"
|
||||
- ngx_feature_test="z_stream z; deflate(&z, Z_NO_FLUSH)"
|
||||
+ ngx_feature_libs="-lz-ng"
|
||||
+ ngx_feature_test="zng_stream z; zng_deflate(&z, Z_NO_FLUSH)"
|
||||
. auto/feature
|
||||
|
||||
|
||||
diff -ru nginx-1.26.2/src/core/ngx_config.h nginx-1.26.2-zlib-ng/src/core/ngx_config.h
|
||||
--- nginx-1.26.2/src/core/ngx_config.h 2024-08-12 16:28:31.000000000 +0200
|
||||
+++ nginx-1.26.2-zlib-ng/src/core/ngx_config.h 2024-10-18 14:26:37.446504000 +0200
|
||||
@@ -141,5 +141,9 @@
|
||||
|
||||
#endif
|
||||
|
||||
+/* Force enable ZLIB-NG */
|
||||
+#ifndef NGX_ZLIB_NG
|
||||
+#define NGX_ZLIB_NG 1
|
||||
+#endif
|
||||
|
||||
#endif /* _NGX_CONFIG_H_INCLUDED_ */
|
||||
diff -ru nginx-1.26.2/src/http/modules/ngx_http_gunzip_filter_module.c nginx-1.26.2-zlib-ng/src/http/modules/ngx_http_gunzip_filter_module.c
|
||||
--- nginx-1.26.2/src/http/modules/ngx_http_gunzip_filter_module.c 2024-08-12 16:28:31.000000000 +0200
|
||||
+++ nginx-1.26.2-zlib-ng/src/http/modules/ngx_http_gunzip_filter_module.c 2024-10-18 13:59:33.218699818 +0200
|
||||
@@ -10,7 +10,14 @@
|
||||
#include <ngx_core.h>
|
||||
#include <ngx_http.h>
|
||||
|
||||
-#include <zlib.h>
|
||||
+#if defined(NGX_ZLIB_NG)
|
||||
+# include <zlib-ng.h>
|
||||
+# define ZPREFIX(x) zng_ ## x
|
||||
+# define z_stream zng_stream
|
||||
+#elif defined(NGX_ZLIB)
|
||||
+# include <zlib.h>
|
||||
+# define ZPREFIX(x) x
|
||||
+#endif
|
||||
|
||||
|
||||
typedef struct {
|
||||
@@ -312,7 +319,7 @@
|
||||
ctx->zstream.opaque = ctx;
|
||||
|
||||
/* windowBits +16 to decode gzip, zlib 1.2.0.4+ */
|
||||
- rc = inflateInit2(&ctx->zstream, MAX_WBITS + 16);
|
||||
+ rc = ZPREFIX(inflateInit2)(&ctx->zstream, MAX_WBITS + 16);
|
||||
|
||||
if (rc != Z_OK) {
|
||||
ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,
|
||||
@@ -435,7 +442,7 @@
|
||||
ctx->zstream.avail_in, ctx->zstream.avail_out,
|
||||
ctx->flush, ctx->redo);
|
||||
|
||||
- rc = inflate(&ctx->zstream, ctx->flush);
|
||||
+ rc = ZPREFIX(inflate)(&ctx->zstream, ctx->flush);
|
||||
|
||||
if (rc != Z_OK && rc != Z_STREAM_END && rc != Z_BUF_ERROR) {
|
||||
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
|
||||
@@ -533,7 +540,7 @@
|
||||
|
||||
if (rc == Z_STREAM_END && ctx->zstream.avail_in > 0) {
|
||||
|
||||
- rc = inflateReset(&ctx->zstream);
|
||||
+ rc = ZPREFIX(inflateReset)(&ctx->zstream);
|
||||
|
||||
if (rc != Z_OK) {
|
||||
ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,
|
||||
@@ -584,7 +591,7 @@
|
||||
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
|
||||
"gunzip inflate end");
|
||||
|
||||
- rc = inflateEnd(&ctx->zstream);
|
||||
+ rc = ZPREFIX(inflateEnd)(&ctx->zstream);
|
||||
|
||||
if (rc != Z_OK) {
|
||||
ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,
|
||||
diff -ru nginx-1.26.2/src/http/modules/ngx_http_gzip_filter_module.c nginx-1.26.2-zlib-ng/src/http/modules/ngx_http_gzip_filter_module.c
|
||||
--- nginx-1.26.2/src/http/modules/ngx_http_gzip_filter_module.c 2024-08-12 16:28:31.000000000 +0200
|
||||
+++ nginx-1.26.2-zlib-ng/src/http/modules/ngx_http_gzip_filter_module.c 2024-10-18 14:55:07.499545547 +0200
|
||||
@@ -9,7 +9,14 @@
|
||||
#include <ngx_core.h>
|
||||
#include <ngx_http.h>
|
||||
|
||||
-#include <zlib.h>
|
||||
+#if defined(NGX_ZLIB_NG)
|
||||
+# include <zlib-ng.h>
|
||||
+# define ZPREFIX(x) zng_ ## x
|
||||
+# define z_stream zng_stream
|
||||
+#elif defined(NGX_ZLIB)
|
||||
+# include <zlib.h>
|
||||
+# define ZPREFIX(x) x
|
||||
+#endif
|
||||
|
||||
|
||||
typedef struct {
|
||||
@@ -454,7 +461,7 @@
|
||||
ctx->done = 1;
|
||||
|
||||
if (ctx->preallocated) {
|
||||
- deflateEnd(&ctx->zstream);
|
||||
+ ZPREFIX(deflateEnd)(&ctx->zstream);
|
||||
|
||||
ngx_pfree(r->pool, ctx->preallocated);
|
||||
}
|
||||
@@ -515,20 +522,20 @@
|
||||
} else {
|
||||
/*
|
||||
* Another zlib variant, https://github.com/zlib-ng/zlib-ng.
|
||||
- * It used to force window bits to 13 for fast compression level,
|
||||
- * uses (64 + sizeof(void*)) additional space on all allocations
|
||||
- * for alignment, 16-byte padding in one of window-sized buffers,
|
||||
- * and 128K hash.
|
||||
*/
|
||||
-
|
||||
- if (conf->level == 1) {
|
||||
- wbits = ngx_max(wbits, 13);
|
||||
- }
|
||||
-
|
||||
- ctx->allocated = 8192 + 16 + (1 << (wbits + 2))
|
||||
- + 131072 + (1 << (memlevel + 8))
|
||||
- + 4 * (64 + sizeof(void*));
|
||||
ctx->zlib_ng = 1;
|
||||
+ ctx->allocated = 6144 // State
|
||||
+ + 65536 // Window
|
||||
+ + 65536 // Prev
|
||||
+ + 131072 // Head
|
||||
+ + 163840 // Pending
|
||||
+ + 56 + 8 // Alloc struct + padding
|
||||
+#if (defined(__s390__) || defined(__s390x__) || defined(__zarch__))
|
||||
+ + 4096 // Required to fix allocation alignment
|
||||
+#else
|
||||
+ + 64 // Required to fix allocation alignment
|
||||
+#endif
|
||||
+ + 256; // Extra to allow for future changes
|
||||
}
|
||||
}
|
||||
|
||||
@@ -621,7 +628,7 @@
|
||||
ctx->zstream.zfree = ngx_http_gzip_filter_free;
|
||||
ctx->zstream.opaque = ctx;
|
||||
|
||||
- rc = deflateInit2(&ctx->zstream, (int) conf->level, Z_DEFLATED,
|
||||
+ rc = ZPREFIX(deflateInit2)(&ctx->zstream, (int) conf->level, Z_DEFLATED,
|
||||
ctx->wbits + 16, ctx->memlevel, Z_DEFAULT_STRATEGY);
|
||||
|
||||
if (rc != Z_OK) {
|
||||
@@ -756,7 +763,7 @@
|
||||
ctx->zstream.avail_in, ctx->zstream.avail_out,
|
||||
ctx->flush, ctx->redo);
|
||||
|
||||
- rc = deflate(&ctx->zstream, ctx->flush);
|
||||
+ rc = ZPREFIX(deflate)(&ctx->zstream, ctx->flush);
|
||||
|
||||
if (rc != Z_OK && rc != Z_STREAM_END && rc != Z_BUF_ERROR) {
|
||||
ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,
|
||||
@@ -880,7 +887,7 @@
|
||||
ctx->zin = ctx->zstream.total_in;
|
||||
ctx->zout = ctx->zstream.total_out;
|
||||
|
||||
- rc = deflateEnd(&ctx->zstream);
|
||||
+ rc = ZPREFIX(deflateEnd)(&ctx->zstream);
|
||||
|
||||
if (rc != Z_OK) {
|
||||
ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,
|
||||
diff -ru nginx-1.26.2/src/http/modules/ngx_http_log_module.c nginx-1.26.2-zlib-ng/src/http/modules/ngx_http_log_module.c
|
||||
--- nginx-1.26.2/src/http/modules/ngx_http_log_module.c 2024-08-12 16:28:31.000000000 +0200
|
||||
+++ nginx-1.26.2-zlib-ng/src/http/modules/ngx_http_log_module.c 2024-10-18 13:59:33.219699787 +0200
|
||||
@@ -9,8 +9,13 @@
|
||||
#include <ngx_core.h>
|
||||
#include <ngx_http.h>
|
||||
|
||||
-#if (NGX_ZLIB)
|
||||
-#include <zlib.h>
|
||||
+#if defined(NGX_ZLIB_NG)
|
||||
+# include <zlib-ng.h>
|
||||
+# define ZPREFIX(x) zng_ ## x
|
||||
+# define z_stream zng_stream
|
||||
+#elif defined(NGX_ZLIB)
|
||||
+# include <zlib.h>
|
||||
+# define ZPREFIX(x) x
|
||||
#endif
|
||||
|
||||
|
||||
@@ -634,7 +639,7 @@
|
||||
zstream.next_out = out;
|
||||
zstream.avail_out = size;
|
||||
|
||||
- rc = deflateInit2(&zstream, (int) level, Z_DEFLATED, wbits + 16, memlevel,
|
||||
+ rc = ZPREFIX(deflateInit2)(&zstream, (int) level, Z_DEFLATED, wbits + 16, memlevel,
|
||||
Z_DEFAULT_STRATEGY);
|
||||
|
||||
if (rc != Z_OK) {
|
||||
@@ -647,7 +652,7 @@
|
||||
zstream.next_in, zstream.next_out,
|
||||
zstream.avail_in, zstream.avail_out);
|
||||
|
||||
- rc = deflate(&zstream, Z_FINISH);
|
||||
+ rc = ZPREFIX(deflate)(&zstream, Z_FINISH);
|
||||
|
||||
if (rc != Z_STREAM_END) {
|
||||
ngx_log_error(NGX_LOG_ALERT, log, 0,
|
||||
@@ -663,7 +668,7 @@
|
||||
|
||||
size -= zstream.avail_out;
|
||||
|
||||
- rc = deflateEnd(&zstream);
|
||||
+ rc = ZPREFIX(deflateEnd)(&zstream);
|
||||
|
||||
if (rc != Z_OK) {
|
||||
ngx_log_error(NGX_LOG_ALERT, log, 0, "deflateEnd() failed: %d", rc);
|
||||
diff -ru nginx-1.26.2/src/stream/ngx_stream_log_module.c nginx-1.26.2-zlib-ng/src/stream/ngx_stream_log_module.c
|
||||
--- nginx-1.26.2/src/stream/ngx_stream_log_module.c 2024-08-12 16:28:31.000000000 +0200
|
||||
+++ nginx-1.26.2-zlib-ng/src/stream/ngx_stream_log_module.c 2024-10-18 13:59:33.219699787 +0200
|
||||
@@ -9,8 +9,13 @@
|
||||
#include <ngx_core.h>
|
||||
#include <ngx_stream.h>
|
||||
|
||||
-#if (NGX_ZLIB)
|
||||
-#include <zlib.h>
|
||||
+#if defined(NGX_ZLIB_NG)
|
||||
+# include <zlib-ng.h>
|
||||
+# define ZPREFIX(x) zng_ ## x
|
||||
+# define z_stream zng_stream
|
||||
+#elif defined(NGX_ZLIB)
|
||||
+# include <zlib.h>
|
||||
+# define ZPREFIX(x) x
|
||||
#endif
|
||||
|
||||
|
||||
@@ -525,7 +530,7 @@
|
||||
zstream.next_out = out;
|
||||
zstream.avail_out = size;
|
||||
|
||||
- rc = deflateInit2(&zstream, (int) level, Z_DEFLATED, wbits + 16, memlevel,
|
||||
+ rc = ZPREFIX(deflateInit2)(&zstream, (int) level, Z_DEFLATED, wbits + 16, memlevel,
|
||||
Z_DEFAULT_STRATEGY);
|
||||
|
||||
if (rc != Z_OK) {
|
||||
@@ -538,7 +543,7 @@
|
||||
zstream.next_in, zstream.next_out,
|
||||
zstream.avail_in, zstream.avail_out);
|
||||
|
||||
- rc = deflate(&zstream, Z_FINISH);
|
||||
+ rc = ZPREFIX(deflate)(&zstream, Z_FINISH);
|
||||
|
||||
if (rc != Z_STREAM_END) {
|
||||
ngx_log_error(NGX_LOG_ALERT, log, 0,
|
||||
@@ -554,7 +559,7 @@
|
||||
|
||||
size -= zstream.avail_out;
|
||||
|
||||
- rc = deflateEnd(&zstream);
|
||||
+ rc = ZPREFIX(deflateEnd)(&zstream);
|
||||
|
||||
if (rc != Z_OK) {
|
||||
ngx_log_error(NGX_LOG_ALERT, log, 0, "deflateEnd() failed: %d", rc);
|
271
modular/nginx-cp/1.26.3-zlib-ng.patch
Normal file
271
modular/nginx-cp/1.26.3-zlib-ng.patch
Normal file
@ -0,0 +1,271 @@
|
||||
diff -ru nginx-1.26.3/auto/lib/zlib/conf nginx-1.26.3-zlib-ng/auto/lib/zlib/conf
|
||||
--- nginx-1.26.3/auto/lib/zlib/conf 2024-08-12 16:28:31.000000000 +0200
|
||||
+++ nginx-1.26.3-zlib-ng/auto/lib/zlib/conf 2024-10-18 13:59:33.218699818 +0200
|
||||
@@ -33,8 +33,8 @@
|
||||
|
||||
*)
|
||||
have=NGX_ZLIB . auto/have
|
||||
- LINK_DEPS="$LINK_DEPS $ZLIB/libz.a"
|
||||
- CORE_LIBS="$CORE_LIBS $ZLIB/libz.a"
|
||||
+ LINK_DEPS="$LINK_DEPS $ZLIB/libz-ng.a"
|
||||
+ CORE_LIBS="$CORE_LIBS $ZLIB/libz-ng.a"
|
||||
#CORE_LIBS="$CORE_LIBS -L $ZLIB -lz"
|
||||
;;
|
||||
|
||||
@@ -50,10 +50,10 @@
|
||||
ngx_feature="zlib library"
|
||||
ngx_feature_name="NGX_ZLIB"
|
||||
ngx_feature_run=no
|
||||
- ngx_feature_incs="#include <zlib.h>"
|
||||
+ ngx_feature_incs="#include <zlib-ng.h>"
|
||||
ngx_feature_path=
|
||||
- ngx_feature_libs="-lz"
|
||||
- ngx_feature_test="z_stream z; deflate(&z, Z_NO_FLUSH)"
|
||||
+ ngx_feature_libs="-lz-ng"
|
||||
+ ngx_feature_test="zng_stream z; zng_deflate(&z, Z_NO_FLUSH)"
|
||||
. auto/feature
|
||||
|
||||
|
||||
diff -ru nginx-1.26.3/src/core/ngx_config.h nginx-1.26.3-zlib-ng/src/core/ngx_config.h
|
||||
--- nginx-1.26.3/src/core/ngx_config.h 2024-08-12 16:28:31.000000000 +0200
|
||||
+++ nginx-1.26.3-zlib-ng/src/core/ngx_config.h 2024-10-18 14:26:37.446504000 +0200
|
||||
@@ -141,5 +141,9 @@
|
||||
|
||||
#endif
|
||||
|
||||
+/* Force enable ZLIB-NG */
|
||||
+#ifndef NGX_ZLIB_NG
|
||||
+#define NGX_ZLIB_NG 1
|
||||
+#endif
|
||||
|
||||
#endif /* _NGX_CONFIG_H_INCLUDED_ */
|
||||
diff -ru nginx-1.26.3/src/http/modules/ngx_http_gunzip_filter_module.c nginx-1.26.3-zlib-ng/src/http/modules/ngx_http_gunzip_filter_module.c
|
||||
--- nginx-1.26.3/src/http/modules/ngx_http_gunzip_filter_module.c 2024-08-12 16:28:31.000000000 +0200
|
||||
+++ nginx-1.26.3-zlib-ng/src/http/modules/ngx_http_gunzip_filter_module.c 2024-10-18 13:59:33.218699818 +0200
|
||||
@@ -10,7 +10,14 @@
|
||||
#include <ngx_core.h>
|
||||
#include <ngx_http.h>
|
||||
|
||||
-#include <zlib.h>
|
||||
+#if defined(NGX_ZLIB_NG)
|
||||
+# include <zlib-ng.h>
|
||||
+# define ZPREFIX(x) zng_ ## x
|
||||
+# define z_stream zng_stream
|
||||
+#elif defined(NGX_ZLIB)
|
||||
+# include <zlib.h>
|
||||
+# define ZPREFIX(x) x
|
||||
+#endif
|
||||
|
||||
|
||||
typedef struct {
|
||||
@@ -312,7 +319,7 @@
|
||||
ctx->zstream.opaque = ctx;
|
||||
|
||||
/* windowBits +16 to decode gzip, zlib 1.2.0.4+ */
|
||||
- rc = inflateInit2(&ctx->zstream, MAX_WBITS + 16);
|
||||
+ rc = ZPREFIX(inflateInit2)(&ctx->zstream, MAX_WBITS + 16);
|
||||
|
||||
if (rc != Z_OK) {
|
||||
ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,
|
||||
@@ -435,7 +442,7 @@
|
||||
ctx->zstream.avail_in, ctx->zstream.avail_out,
|
||||
ctx->flush, ctx->redo);
|
||||
|
||||
- rc = inflate(&ctx->zstream, ctx->flush);
|
||||
+ rc = ZPREFIX(inflate)(&ctx->zstream, ctx->flush);
|
||||
|
||||
if (rc != Z_OK && rc != Z_STREAM_END && rc != Z_BUF_ERROR) {
|
||||
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
|
||||
@@ -533,7 +540,7 @@
|
||||
|
||||
if (rc == Z_STREAM_END && ctx->zstream.avail_in > 0) {
|
||||
|
||||
- rc = inflateReset(&ctx->zstream);
|
||||
+ rc = ZPREFIX(inflateReset)(&ctx->zstream);
|
||||
|
||||
if (rc != Z_OK) {
|
||||
ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,
|
||||
@@ -584,7 +591,7 @@
|
||||
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
|
||||
"gunzip inflate end");
|
||||
|
||||
- rc = inflateEnd(&ctx->zstream);
|
||||
+ rc = ZPREFIX(inflateEnd)(&ctx->zstream);
|
||||
|
||||
if (rc != Z_OK) {
|
||||
ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,
|
||||
diff -ru nginx-1.26.3/src/http/modules/ngx_http_gzip_filter_module.c nginx-1.26.3-zlib-ng/src/http/modules/ngx_http_gzip_filter_module.c
|
||||
--- nginx-1.26.3/src/http/modules/ngx_http_gzip_filter_module.c 2024-08-12 16:28:31.000000000 +0200
|
||||
+++ nginx-1.26.3-zlib-ng/src/http/modules/ngx_http_gzip_filter_module.c 2024-10-18 14:55:07.499545547 +0200
|
||||
@@ -9,7 +9,14 @@
|
||||
#include <ngx_core.h>
|
||||
#include <ngx_http.h>
|
||||
|
||||
-#include <zlib.h>
|
||||
+#if defined(NGX_ZLIB_NG)
|
||||
+# include <zlib-ng.h>
|
||||
+# define ZPREFIX(x) zng_ ## x
|
||||
+# define z_stream zng_stream
|
||||
+#elif defined(NGX_ZLIB)
|
||||
+# include <zlib.h>
|
||||
+# define ZPREFIX(x) x
|
||||
+#endif
|
||||
|
||||
|
||||
typedef struct {
|
||||
@@ -454,7 +461,7 @@
|
||||
ctx->done = 1;
|
||||
|
||||
if (ctx->preallocated) {
|
||||
- deflateEnd(&ctx->zstream);
|
||||
+ ZPREFIX(deflateEnd)(&ctx->zstream);
|
||||
|
||||
ngx_pfree(r->pool, ctx->preallocated);
|
||||
}
|
||||
@@ -523,14 +530,20 @@
|
||||
* and 128K hash.
|
||||
*/
|
||||
|
||||
- if (conf->level == 1) {
|
||||
- wbits = ngx_max(wbits, 13);
|
||||
- }
|
||||
-
|
||||
- ctx->allocated = 8192 + 16 + (1 << (wbits + 2))
|
||||
- + 131072 + (5 << (memlevel + 6))
|
||||
- + 4 * (64 + sizeof(void*));
|
||||
ctx->zlib_ng = 1;
|
||||
+
|
||||
+ ctx->allocated = 6144 // State
|
||||
+ + 65536 // Window
|
||||
+ + 65536 // Prev
|
||||
+ + 131072 // Head
|
||||
+ + 163840 // Pending
|
||||
+ + 56 + 8 // Alloc struct + padding
|
||||
+#if (defined(__s390__) || defined(__s390x__) || defined(__zarch__))
|
||||
+ + 4096 // Required to fix allocation alignment
|
||||
+#else
|
||||
+ + 64 // Required to fix allocation alignment
|
||||
+#endif
|
||||
+ + 256; // Extra to allow for future changes
|
||||
}
|
||||
}
|
||||
|
||||
@@ -623,7 +636,7 @@
|
||||
ctx->zstream.zfree = ngx_http_gzip_filter_free;
|
||||
ctx->zstream.opaque = ctx;
|
||||
|
||||
- rc = deflateInit2(&ctx->zstream, (int) conf->level, Z_DEFLATED,
|
||||
+ rc = ZPREFIX(deflateInit2)(&ctx->zstream, (int) conf->level, Z_DEFLATED,
|
||||
ctx->wbits + 16, ctx->memlevel, Z_DEFAULT_STRATEGY);
|
||||
|
||||
if (rc != Z_OK) {
|
||||
@@ -758,7 +771,7 @@
|
||||
ctx->zstream.avail_in, ctx->zstream.avail_out,
|
||||
ctx->flush, ctx->redo);
|
||||
|
||||
- rc = deflate(&ctx->zstream, ctx->flush);
|
||||
+ rc = ZPREFIX(deflate)(&ctx->zstream, ctx->flush);
|
||||
|
||||
if (rc != Z_OK && rc != Z_STREAM_END && rc != Z_BUF_ERROR) {
|
||||
ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,
|
||||
@@ -882,7 +895,7 @@
|
||||
ctx->zin = ctx->zstream.total_in;
|
||||
ctx->zout = ctx->zstream.total_out;
|
||||
|
||||
- rc = deflateEnd(&ctx->zstream);
|
||||
+ rc = ZPREFIX(deflateEnd)(&ctx->zstream);
|
||||
|
||||
if (rc != Z_OK) {
|
||||
ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,
|
||||
diff -ru nginx-1.26.3/src/http/modules/ngx_http_log_module.c nginx-1.26.3-zlib-ng/src/http/modules/ngx_http_log_module.c
|
||||
--- nginx-1.26.3/src/http/modules/ngx_http_log_module.c 2024-08-12 16:28:31.000000000 +0200
|
||||
+++ nginx-1.26.3-zlib-ng/src/http/modules/ngx_http_log_module.c 2024-10-18 13:59:33.219699787 +0200
|
||||
@@ -9,8 +9,13 @@
|
||||
#include <ngx_core.h>
|
||||
#include <ngx_http.h>
|
||||
|
||||
-#if (NGX_ZLIB)
|
||||
-#include <zlib.h>
|
||||
+#if defined(NGX_ZLIB_NG)
|
||||
+# include <zlib-ng.h>
|
||||
+# define ZPREFIX(x) zng_ ## x
|
||||
+# define z_stream zng_stream
|
||||
+#elif defined(NGX_ZLIB)
|
||||
+# include <zlib.h>
|
||||
+# define ZPREFIX(x) x
|
||||
#endif
|
||||
|
||||
|
||||
@@ -634,7 +639,7 @@
|
||||
zstream.next_out = out;
|
||||
zstream.avail_out = size;
|
||||
|
||||
- rc = deflateInit2(&zstream, (int) level, Z_DEFLATED, wbits + 16, memlevel,
|
||||
+ rc = ZPREFIX(deflateInit2)(&zstream, (int) level, Z_DEFLATED, wbits + 16, memlevel,
|
||||
Z_DEFAULT_STRATEGY);
|
||||
|
||||
if (rc != Z_OK) {
|
||||
@@ -647,7 +652,7 @@
|
||||
zstream.next_in, zstream.next_out,
|
||||
zstream.avail_in, zstream.avail_out);
|
||||
|
||||
- rc = deflate(&zstream, Z_FINISH);
|
||||
+ rc = ZPREFIX(deflate)(&zstream, Z_FINISH);
|
||||
|
||||
if (rc != Z_STREAM_END) {
|
||||
ngx_log_error(NGX_LOG_ALERT, log, 0,
|
||||
@@ -663,7 +668,7 @@
|
||||
|
||||
size -= zstream.avail_out;
|
||||
|
||||
- rc = deflateEnd(&zstream);
|
||||
+ rc = ZPREFIX(deflateEnd)(&zstream);
|
||||
|
||||
if (rc != Z_OK) {
|
||||
ngx_log_error(NGX_LOG_ALERT, log, 0, "deflateEnd() failed: %d", rc);
|
||||
diff -ru nginx-1.26.3/src/stream/ngx_stream_log_module.c nginx-1.26.3-zlib-ng/src/stream/ngx_stream_log_module.c
|
||||
--- nginx-1.26.3/src/stream/ngx_stream_log_module.c 2024-08-12 16:28:31.000000000 +0200
|
||||
+++ nginx-1.26.3-zlib-ng/src/stream/ngx_stream_log_module.c 2024-10-18 13:59:33.219699787 +0200
|
||||
@@ -9,8 +9,13 @@
|
||||
#include <ngx_core.h>
|
||||
#include <ngx_stream.h>
|
||||
|
||||
-#if (NGX_ZLIB)
|
||||
-#include <zlib.h>
|
||||
+#if defined(NGX_ZLIB_NG)
|
||||
+# include <zlib-ng.h>
|
||||
+# define ZPREFIX(x) zng_ ## x
|
||||
+# define z_stream zng_stream
|
||||
+#elif defined(NGX_ZLIB)
|
||||
+# include <zlib.h>
|
||||
+# define ZPREFIX(x) x
|
||||
#endif
|
||||
|
||||
|
||||
@@ -525,7 +530,7 @@
|
||||
zstream.next_out = out;
|
||||
zstream.avail_out = size;
|
||||
|
||||
- rc = deflateInit2(&zstream, (int) level, Z_DEFLATED, wbits + 16, memlevel,
|
||||
+ rc = ZPREFIX(deflateInit2)(&zstream, (int) level, Z_DEFLATED, wbits + 16, memlevel,
|
||||
Z_DEFAULT_STRATEGY);
|
||||
|
||||
if (rc != Z_OK) {
|
||||
@@ -538,7 +543,7 @@
|
||||
zstream.next_in, zstream.next_out,
|
||||
zstream.avail_in, zstream.avail_out);
|
||||
|
||||
- rc = deflate(&zstream, Z_FINISH);
|
||||
+ rc = ZPREFIX(deflate)(&zstream, Z_FINISH);
|
||||
|
||||
if (rc != Z_STREAM_END) {
|
||||
ngx_log_error(NGX_LOG_ALERT, log, 0,
|
||||
@@ -554,7 +559,7 @@
|
||||
|
||||
size -= zstream.avail_out;
|
||||
|
||||
- rc = deflateEnd(&zstream);
|
||||
+ rc = ZPREFIX(deflateEnd)(&zstream);
|
||||
|
||||
if (rc != Z_OK) {
|
||||
ngx_log_error(NGX_LOG_ALERT, log, 0, "deflateEnd() failed: %d", rc);
|
@ -50,8 +50,8 @@
|
||||
|
||||
Name: nginx%{_suffix}
|
||||
Epoch: 1
|
||||
Version: 1.26.2
|
||||
Release: 2%{?dist}
|
||||
Version: 1.26.3
|
||||
Release: 1%{?dist}
|
||||
|
||||
Summary: A high performance web server and reverse proxy server
|
||||
Group: System Environment/Daemons
|
||||
@ -121,6 +121,9 @@ Patch4: ngx_brotli-config.patch
|
||||
Patch5: nginx-1.24-lua-mod-lowering-luajit-alert-severity.patch
|
||||
%endif
|
||||
|
||||
%if 0%{?rhel} >= 8
|
||||
Patch10: 1.26.3-zlib-ng.patch
|
||||
%endif
|
||||
|
||||
BuildRequires: make binutils
|
||||
BuildRequires: gcc >= 4.8
|
||||
@ -133,11 +136,15 @@ BuildRequires: gperftools-devel
|
||||
BuildRequires: pkgconfig(openssl) >= 3.8
|
||||
%else
|
||||
BuildRequires: pkgconfig(openssl) >= %{openssl_ver}
|
||||
BuildRequires: pkgconfig(openssl) < 3.5
|
||||
BuildRequires: pkgconfig(openssl) < 3.8
|
||||
%endif
|
||||
|
||||
BuildRequires: pcre2-devel
|
||||
%if 0%{?rhel} >= 8
|
||||
BuildRequires: pkgconfig(zlib-ng) >= 2.2.0
|
||||
%else
|
||||
BuildRequires: zlib-devel
|
||||
%endif
|
||||
BuildRequires: pkgconfig(gdlib)
|
||||
BuildRequires: libxslt-devel
|
||||
BuildRequires: redhat-rpm-config
|
||||
@ -196,9 +203,6 @@ Conflicts: nginx-mimetypes
|
||||
%endif
|
||||
|
||||
Provides: webserver
|
||||
%if 0%{rhel} == 8
|
||||
Modularitylabel: %{name}:stable:%{version}:latest
|
||||
%endif
|
||||
Provides: nginx
|
||||
Provides: nginx%{_isa} = %{epoch}:%{version}-%{release}
|
||||
Provides: nginx(abi) = %{epoch}:%{version}-%{release}
|
||||
@ -318,6 +322,10 @@ tar -xf %{SOURCE304}
|
||||
%patch5 -p1 -b .luajit
|
||||
%endif
|
||||
|
||||
%if 0%{?rhel} >= 8
|
||||
%patch10 -p1 -b .zlib-ng
|
||||
%endif
|
||||
|
||||
tar -xf %{SOURCE305}
|
||||
|
||||
%if %{with fancyindex}
|
||||
@ -720,7 +728,10 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Sep 18 2024 Raven <raven@sysadmins.ws> - 1.26.2-2
|
||||
* Thu Feb 6 2025 Raven <raven@sysadmins.ws> - 1.26.3-1
|
||||
- new stable version
|
||||
|
||||
* Wed Sep 18 2024 Raven <raven@sysadmins.ws> - 1.26.2-2
|
||||
- rebuild (OpenSSL)
|
||||
|
||||
* Thu Aug 15 2024 Raven <raven@sysadmins.ws> - 1.26.2-1
|
||||
|
Loading…
x
Reference in New Issue
Block a user