diff options
| -rw-r--r-- | njs.spec | 17 | ||||
| -rw-r--r-- | tests.patch | 63 |
2 files changed, 7 insertions, 73 deletions
@@ -1,6 +1,6 @@ # remirepo/fedora spec file for njs # -# SPDX-FileCopyrightText: Copyright 2023-2025 Remi Collet +# SPDX-FileCopyrightText: Copyright 2023-2026 Remi Collet # SPDX-License-Identifier: CECILL-2.1 # http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt # @@ -19,7 +19,7 @@ # See https://github.com/nginx/njs/tags %global gh_owner nginx %global project njs -%global gh_commit b9ac319d8bfa696e3943bebbe494e8e723952bdf +%global gh_commit e7ecb2c7365dd4f5a36d9b9b14bdb5dc4533360d %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) # See https://github.com/bellard/quickjs/commits/master/ @@ -32,18 +32,14 @@ Name: %{project} Summary: NGINX JavaScript -Version: 0.9.5 -Release: 2%{?dist} +Version: 0.9.6 +Release: 1%{?dist} License: BSD-2-Clause AND MIT URL: https://github.com/%{gh_owner}/%{project} Source0: https://github.com/%{gh_owner}/%{project}/archive/%{gh_commit}/%{project}-%{version}-%{gh_short}.tar.gz Source1: https://github.com/%{qjs_owner}/%{qjs_project}/archive/%{qjs_commit}/%{qjs_project}-%{qjs_short}.tar.gz -# ignore 1 failed test related to pcre2 version -# https://github.com/nginx/njs/issues/1011 -Patch0: tests.patch - BuildRequires: make BuildRequires: gcc BuildRequires: openssl-devel @@ -91,8 +87,6 @@ mv %{qjs_project}-%{qjs_commit} quickjs %setup -qn %{project}-%{gh_commit} %endif -%patch -P0 -p1 - %build %if %{with quickjs} @@ -166,6 +160,9 @@ make test %{?_smp_mflags} %changelog +* Wed Feb 4 2026 Remi Collet <remi@remirepo.net> - 0.9.6-1 +- update to 0.9.6 + * Thu Jan 15 2026 Remi Collet <remi@remirepo.net> - 0.9.5-2 - use upstream patch for test suite diff --git a/tests.patch b/tests.patch deleted file mode 100644 index 131b8ae..0000000 --- a/tests.patch +++ /dev/null @@ -1,63 +0,0 @@ -From ca8d7740d6545234909131a6de8404109a850d85 Mon Sep 17 00:00:00 2001 -From: Dmitry Volyntsev <xeioex@nginx.com> -Date: Wed, 14 Jan 2026 14:43:58 -0800 -Subject: [PATCH] Making unit tests less brittle when libpcre2 changes. - -This fixes #1011 issue on Github. ---- - src/njs_str.h | 6 ++++++ - src/test/njs_unit_test.c | 10 ++++------ - 2 files changed, 10 insertions(+), 6 deletions(-) - -diff --git a/src/njs_str.h b/src/njs_str.h -index 8c7e60b06..e64d88a97 100644 ---- a/src/njs_str.h -+++ b/src/njs_str.h -@@ -139,6 +139,12 @@ njs_strstr_case_eq(s1, s2) \ - && (njs_strncasecmp((s1)->start, (s2)->start, (s1)->length) == 0)) - - -+#define \ -+njs_strstr_starts_with(str, prefix) \ -+ (((str)->length >= (prefix)->length) \ -+ && (memcmp((str)->start, (prefix)->start, (prefix)->length) == 0)) -+ -+ - NJS_EXPORT njs_int_t njs_strncasecmp(u_char *s1, u_char *s2, size_t n); - - -diff --git a/src/test/njs_unit_test.c b/src/test/njs_unit_test.c -index c39523ac0..a89d80161 100644 ---- a/src/test/njs_unit_test.c -+++ b/src/test/njs_unit_test.c -@@ -11806,8 +11806,8 @@ static njs_unit_test_t njs_test[] = - - { njs_str("/+/.test('')"), - njs_str("SyntaxError: " -- njs_pcre_var("pcre_compile2(\"+\") failed: quantifier does not follow a repeatable item at \"+\" in 1", -- "pcre_compile(\"+\") failed: nothing to repeat at \"+\" in 1")) }, -+ njs_pcre_var("pcre_compile2(\"+\") failed: quantifier does not follow a repeatable item", -+ "pcre_compile(\"+\") failed: nothing to repeat")) }, - - { njs_str("/^$/.test('')"), - njs_str("true") }, -@@ -21994,9 +21994,7 @@ njs_process_test(njs_external_state_t *state, njs_opts_t *opts, - return NJS_ERROR; - } - -- success = expected->ret.length <= s.length -- && (memcmp(expected->ret.start, s.start, expected->ret.length) -- == 0); -+ success = njs_strstr_starts_with(&s, &expected->ret); - if (!success) { - njs_stderror("njs(\"%V\")\nexpected: \"%V\"\n got: \"%V\"\n", - &expected->script, &expected->ret, &s); -@@ -22156,7 +22154,7 @@ njs_unit_test(njs_unit_test_t tests[], size_t num, njs_str_t *name, - "Extra characters at the end of the script"); - } - -- success = njs_strstr_eq(&tests[i].ret, &s); -+ success = njs_strstr_starts_with(&s, &tests[i].ret); - if (!success) { - njs_stderror("njs(\"%V\")\nexpected: \"%V\"\n" - " got: \"%V\"\n", |
