diff options
author | Remi Collet <remi@remirepo.net> | 2024-07-03 10:12:50 +0200 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2024-07-03 10:12:50 +0200 |
commit | b128bf7f2b33652f56fbbefaac26d4ccefd2f475 (patch) | |
tree | 829704597264e9c1ca32dad31b02aa06abfa5fa0 | |
parent | c5459c92a82c33611ab69637f75c47d4b0045a6f (diff) |
update to 0.8.5
-rw-r--r-- | github704.patch | 76 | ||||
-rw-r--r-- | njs.spec | 12 |
2 files changed, 5 insertions, 83 deletions
diff --git a/github704.patch b/github704.patch deleted file mode 100644 index 22e894a..0000000 --- a/github704.patch +++ /dev/null @@ -1,76 +0,0 @@ -# HG changeset patch -# User Dmitry Volyntsev <xeioex@nginx.com> -# Date 1713338720 25200 -# Wed Apr 17 00:25:20 2024 -0700 -# Node ID ca18b6292d6eea0bb58f5e7b08a7249d04629a8a -# Parent 40c980ca34563c056e871d5585d1aedd8f4d0890 -Zlib: fixed inflate(). - -Previously, the function might fail to return the last part of the -compressed content. This problem is more visible when output size is > -1024 or when chunkSize < the content size. - -diff --git a/external/njs_zlib_module.c b/external/njs_zlib_module.c ---- a/external/njs_zlib_module.c -+++ b/external/njs_zlib_module.c -@@ -463,7 +463,7 @@ njs_zlib_ext_inflate(njs_vm_t *vm, njs_v - - njs_chb_init(&chain, njs_vm_memory_pool(vm)); - -- while (stream.avail_in > 0) { -+ while (rc != Z_STREAM_END) { - stream.next_out = njs_chb_reserve(&chain, chunk_size); - if (njs_slow_path(stream.next_out == NULL)) { - njs_vm_memory_error(vm); -diff --git a/src/test/njs_unit_test.c b/src/test/njs_unit_test.c ---- a/src/test/njs_unit_test.c -+++ b/src/test/njs_unit_test.c -@@ -22352,6 +22352,13 @@ static njs_unit_test_t njs_zlib_test[] - njs_str("eJwLd/R2BAAC+gEl,eJw7t/HcpnObAQ/sBIE=") }, - - { njs_str("const zlib = require('zlib');" -+ "const buf = 'αβγ'.repeat(56);" -+ "const enc = zlib.deflateRawSync(buf, {chunkSize:64}).toString('base64');" -+ "const dec = zlib.inflateRawSync(Buffer.from(enc, 'base64')).toString();" -+ "buf == dec"), -+ njs_str("true") }, -+ -+ { njs_str("const zlib = require('zlib');" - "['WAKA'.repeat(1024), 'αβγ'.repeat(1024)]" - ".map(v => [v, zlib.deflateRawSync(v).toString('base64')])" - ".every(pair => pair[0] == zlib.inflateRawSync(Buffer.from(pair[1], 'base64')).toString())"), -# HG changeset patch -# User Dmitry Volyntsev <xeioex@nginx.com> -# Date 1713338872 25200 -# Wed Apr 17 00:27:52 2024 -0700 -# Node ID 2b6b25100aef6cbf8c2ab0bc2bd4d60942e41a45 -# Parent ca18b6292d6eea0bb58f5e7b08a7249d04629a8a -Zlib: improved tests with zlib-ng. - -This fixes #704 issue on Github. - -diff --git a/src/test/njs_unit_test.c b/src/test/njs_unit_test.c ---- a/src/test/njs_unit_test.c -+++ b/src/test/njs_unit_test.c -@@ -22319,14 +22319,15 @@ static njs_unit_test_t njs_zlib_test[] - njs_str("WAKA,αβγ") }, - - { njs_str("const zlib = require('zlib');" -- "['WAKA', 'αβγ']" -- ".map(v => zlib.deflateRawSync(v).toString('base64'))"), -- njs_str("C3f0dgQA,O7fx3KZzmwE=") }, -+ "const enc = ['WAKA', 'αβγ'].map(v => zlib.deflateRawSync(v).toString('base64'));" -+ "enc.map(v => zlib.inflateRawSync(Buffer.from(v, 'base64')).toString())"), -+ njs_str("WAKA,αβγ") }, - - { njs_str("const zlib = require('zlib');" -- "['WAKA', 'αβγ']" -- ".map(v => zlib.deflateRawSync(v, {dictionary: Buffer.from('WAKA')}).toString('base64'))"), -- njs_str("CwdiAA==,O7fx3KZzmwE=") }, -+ "const enc = ['WAKA', 'αβγ']" -+ ".map(v => zlib.deflateRawSync(v, {dictionary: Buffer.from('WAKA')}).toString('base64'));" -+ "enc.map(v => zlib.inflateRawSync(Buffer.from(v, 'base64'), {dictionary: Buffer.from('WAKA')}))"), -+ njs_str("WAKA,αβγ") }, - - { njs_str("const zlib = require('zlib');" - "['WAKA', 'αβγ']" @@ -13,22 +13,18 @@ %global gh_owner nginx %global project njs -%global gh_commit 3fb0ee5e907c9a4153d92946c1ef1b96202f883b +%global gh_commit 9d4bf6c60aa60a828609f64d1b5c50f71bb7ef62 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) Name: %{project} Summary: NGINX JavaScript -Version: 0.8.4 +Version: 0.8.5 Release: 1%{?dist} License: BSD-2-Clause URL: https://github.com/%{gh_owner}/%{project} Source0: https://github.com/%{gh_owner}/%{project}/archive/%{gh_commit}/%{project}-%{version}-%{gh_short}.tar.gz -# Fix the test-suite with zlib-ng -# See https://github.com/nginx/njs/issues/704 -Patch0: github704.patch - BuildRequires: make BuildRequires: gcc BuildRequires: openssl-devel @@ -63,7 +59,6 @@ Library and include files required for libnjs. %prep %setup -qn %{project}-%{gh_commit} -%patch -P0 -p1 %build @@ -111,6 +106,9 @@ make test %{?_smp_mflags} %changelog +* Wed Jul 3 2024 Remi Collet <remi@remirepo.net> - 0.8.5-1 +- update to 0.8.5 + * Tue Apr 16 2024 Remi Collet <remi@remirepo.net> - 0.8.4-1 - update to 0.8.4 - report test failure with zlib-ng |