Index | Thread | Search

From:
"Sergey A. Osokin" <osa@freebsd.org>
Subject:
[patch] www/unit update
To:
ports@openbsd.org
Date:
Sat, 1 Jun 2024 16:05:09 +0000

Download raw body.

Thread
Hi,

here's the patch to update www/unit to the recent version, 1.32.1.

There're two small patches to fix build with the recent version of
njs are included.

Thank you.

-- 
Sergey A. Osokin
Index: Makefile.inc
===================================================================
RCS file: /cvs/ports/www/unit/Makefile.inc,v
diff -u -p -r1.11 Makefile.inc
--- Makefile.inc	27 Sep 2023 19:13:06 -0000	1.11
+++ Makefile.inc	1 Jun 2024 15:52:58 -0000
@@ -1,4 +1,4 @@
-VERSION?=	1.31.0
+VERSION?=	1.32.1
 DISTNAME=	unit-${VERSION}
 
 CATEGORIES=	www
Index: unit/Makefile
===================================================================
RCS file: /cvs/ports/www/unit/unit/Makefile,v
diff -u -p -r1.7 Makefile
--- unit/Makefile	8 Sep 2023 05:40:28 -0000	1.7
+++ unit/Makefile	1 Jun 2024 15:52:58 -0000
@@ -1,7 +1,5 @@
 COMMENT=	dynamic web application server
 
-REVISION=	0
-
 WANTLIB=	c crypto m pcre2-8 pthread ssl xml2 z
 
 LIB_DEPENDS=	devel/pcre2
Index: unit/distinfo
===================================================================
RCS file: /cvs/ports/www/unit/unit/distinfo,v
diff -u -p -r1.7 distinfo
--- unit/distinfo	5 Sep 2023 11:31:17 -0000	1.7
+++ unit/distinfo	1 Jun 2024 15:52:58 -0000
@@ -1,2 +1,2 @@
-SHA256 (unit-1.31.0.tar.gz) = JosYALxOAwZn5nln0FKBdDff8D94CsCphZCaoiXeYe0=
-SIZE (unit-1.31.0.tar.gz) = 905152
+SHA256 (unit-1.32.1.tar.gz) = DkQO9jo635QA25eKZPyE4euIh/YaBMz/KEw/aC+4PqI=
+SIZE (unit-1.32.1.tar.gz) = 937669
Index: unit-perl/distinfo
===================================================================
RCS file: /cvs/ports/www/unit/unit-perl/distinfo,v
diff -u -p -r1.7 distinfo
--- unit-perl/distinfo	5 Sep 2023 11:31:17 -0000	1.7
+++ unit-perl/distinfo	1 Jun 2024 15:52:58 -0000
@@ -1,2 +1,2 @@
-SHA256 (unit-1.31.0.tar.gz) = JosYALxOAwZn5nln0FKBdDff8D94CsCphZCaoiXeYe0=
-SIZE (unit-1.31.0.tar.gz) = 905152
+SHA256 (unit-1.32.1.tar.gz) = DkQO9jo635QA25eKZPyE4euIh/YaBMz/KEw/aC+4PqI=
+SIZE (unit-1.32.1.tar.gz) = 937669
Index: unit-php/distinfo
===================================================================
RCS file: /cvs/ports/www/unit/unit-php/distinfo,v
diff -u -p -r1.7 distinfo
--- unit-php/distinfo	5 Sep 2023 11:31:17 -0000	1.7
+++ unit-php/distinfo	1 Jun 2024 15:52:58 -0000
@@ -1,2 +1,2 @@
-SHA256 (unit-1.31.0.tar.gz) = JosYALxOAwZn5nln0FKBdDff8D94CsCphZCaoiXeYe0=
-SIZE (unit-1.31.0.tar.gz) = 905152
+SHA256 (unit-1.32.1.tar.gz) = DkQO9jo635QA25eKZPyE4euIh/YaBMz/KEw/aC+4PqI=
+SIZE (unit-1.32.1.tar.gz) = 937669
Index: unit-python/distinfo
===================================================================
RCS file: /cvs/ports/www/unit/unit-python/distinfo,v
diff -u -p -r1.7 distinfo
--- unit-python/distinfo	5 Sep 2023 11:31:17 -0000	1.7
+++ unit-python/distinfo	1 Jun 2024 15:52:58 -0000
@@ -1,2 +1,2 @@
-SHA256 (unit-1.31.0.tar.gz) = JosYALxOAwZn5nln0FKBdDff8D94CsCphZCaoiXeYe0=
-SIZE (unit-1.31.0.tar.gz) = 905152
+SHA256 (unit-1.32.1.tar.gz) = DkQO9jo635QA25eKZPyE4euIh/YaBMz/KEw/aC+4PqI=
+SIZE (unit-1.32.1.tar.gz) = 937669
Index: unit-ruby/distinfo
===================================================================
RCS file: /cvs/ports/www/unit/unit-ruby/distinfo,v
diff -u -p -r1.7 distinfo
--- unit-ruby/distinfo	5 Sep 2023 11:31:17 -0000	1.7
+++ unit-ruby/distinfo	1 Jun 2024 15:52:58 -0000
@@ -1,2 +1,2 @@
-SHA256 (unit-1.31.0.tar.gz) = JosYALxOAwZn5nln0FKBdDff8D94CsCphZCaoiXeYe0=
-SIZE (unit-1.31.0.tar.gz) = 905152
+SHA256 (unit-1.32.1.tar.gz) = DkQO9jo635QA25eKZPyE4euIh/YaBMz/KEw/aC+4PqI=
+SIZE (unit-1.32.1.tar.gz) = 937669
--- /dev/null	Sat Jun  1 11:55:05 2024
+++ unit/patches/patch-src_nxt__js.c	Sat Jun  1 11:47:20 2024
@@ -0,0 +1,50 @@
+Fix build with nginx javascript library, version 0.8.4
+
+--- src/nxt_js.c.orig	2023-10-17 14:15:38 UTC
++++ src/nxt_js.c
+@@ -69,14 +69,6 @@ nxt_js_module_loader(njs_vm_t *vm, njs_external_ptr_t 
+ }
+ 
+ 
+-static njs_vm_ops_t  nxt_js_ops = {
+-    NULL,
+-    NULL,
+-    nxt_js_module_loader,
+-    NULL,
+-};
+-
+-
+ njs_int_t  nxt_js_proto_id;
+ 
+ 
+@@ -127,6 +119,7 @@ nxt_js_vm_create(nxt_js_conf_t *jcf)
+ {
+     u_char           *p;
+     size_t           size;
++    njs_vm_t         *vm;
+     nxt_uint_t       i;
+     njs_vm_opt_t     opts;
+     nxt_js_module_t  *module, *mod;
+@@ -146,7 +139,6 @@ nxt_js_vm_create(nxt_js_conf_t *jcf)
+         goto done;
+     }
+ 
+-    opts.ops = &nxt_js_ops;
+     opts.external = jcf;
+ 
+     size = 0;
+@@ -203,7 +195,13 @@ nxt_js_vm_create(nxt_js_conf_t *jcf)
+ 
+ done:
+ 
+-    return njs_vm_create(&opts);
++    vm = njs_vm_create(&opts);
++
++    if (nxt_fast_path(vm != NULL)) {
++        njs_vm_set_module_loader(vm, nxt_js_module_loader, jcf);
++    }
++
++    return vm;
+ }
+ 
+ 
--- /dev/null	Sat Jun  1 11:55:14 2024
+++ unit/patches/patch-src_nxt__script.c	Sat Jun  1 11:47:46 2024
@@ -0,0 +1,28 @@
+Fix build with nginx javascript library, version 0.8.4
+
+--- src/nxt_script.c.orig	2023-10-17 14:15:38 UTC
++++ src/nxt_script.c
+@@ -37,14 +37,6 @@ static void nxt_script_buf_completion(nxt_task_t *task
+ static nxt_lvlhsh_t  nxt_script_info;
+ 
+ 
+-static njs_vm_ops_t  nxt_js_ops = {
+-    NULL,
+-    NULL,
+-    nxt_js_module_loader,
+-    NULL,
+-};
+-
+-
+ nxt_script_t *
+ nxt_script_new(nxt_task_t *task, nxt_str_t *name, u_char *data, size_t size,
+     u_char *error)
+@@ -62,8 +54,6 @@ nxt_script_new(nxt_task_t *task, nxt_str_t *name, u_ch
+ 
+     opts.file.start = (u_char *) "default";
+     opts.file.length = 7;
+-
+-    opts.ops = &nxt_js_ops;
+ 
+     vm = njs_vm_create(&opts);
+     if (nxt_slow_path(vm == NULL)) {