pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

(www/unit) rename patch files for standard naming



Module Name:	pkgsrc-wip
Committed By:	Makoto Fujiwara <makoto%ki.nu@localhost>
Pushed By:	mef
Date:		Tue Aug 11 11:50:10 2020 +0900
Changeset:	2d722c4223baba697cee1ea7e9d2269471b3c479

Added Files:
	unit/patches/patch-auto_sendfile
	unit/patches/patch-src_nxt__application.c
	unit/patches/patch-src_nxt__conn__write.c
Removed Files:
	unit/patches/patch-aa
	unit/patches/patch-ab
	unit/patches/patch-ac

Log Message:
(www/unit) rename patch files for standard naming

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=2d722c4223baba697cee1ea7e9d2269471b3c479

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 unit/patches/patch-aa                     | 27 -----------------
 unit/patches/patch-ab                     | 48 -------------------------------
 unit/patches/patch-ac                     | 33 ---------------------
 unit/patches/patch-auto_sendfile          | 48 +++++++++++++++++++++++++++++++
 unit/patches/patch-src_nxt__application.c | 33 +++++++++++++++++++++
 unit/patches/patch-src_nxt__conn__write.c | 27 +++++++++++++++++
 6 files changed, 108 insertions(+), 108 deletions(-)

diffs:
diff --git a/unit/patches/patch-aa b/unit/patches/patch-aa
deleted file mode 100644
index 1e7a807de8..0000000000
--- a/unit/patches/patch-aa
+++ /dev/null
@@ -1,27 +0,0 @@
-$NetBSD$
-
-
---- src/nxt_conn_write.c.orig	2020-05-28 12:04:00.000000000 -0400
-+++ src/nxt_conn_write.c	2020-08-08 16:49:50.752693316 -0400
-@@ -266,6 +266,21 @@
-     res = sendfile(s, fd, &pos, size);
- #endif
- 
-+#ifdef NXT_HAVE_NETBSD_SENDFILE
-+    struct stat fileinfo;
-+    void *fmem = NULL;
-+    res = fstat(fd, &fileinfo);
-+    if (res == 0) {
-+        fmem = mmap(NULL, fileinfo.st_size, PROT_READ, MAP_FILE | MAP_SHARED, fd, 0);
-+    }
-+    if (fmem != NULL) {
-+        res = write(s, fmem, fileinfo.st_size);
-+        munmap(fmem, fileinfo.st_size);
-+    } else {
-+        res = -1;
-+    }
-+#endif 
-+
-     return res;
- }
- 
diff --git a/unit/patches/patch-ab b/unit/patches/patch-ab
deleted file mode 100644
index 9267f73642..0000000000
--- a/unit/patches/patch-ab
+++ /dev/null
@@ -1,48 +0,0 @@
-$NetBSD$
-
-
---- auto/sendfile.orig	2020-08-08 16:00:55.378410575 -0400
-+++ auto/sendfile	2020-08-08 16:16:14.270362755 -0400
-@@ -5,6 +5,7 @@
- 
- NXT_HAVE_LINUX_SENDFILE=NO
- NXT_HAVE_FREEBSD_SENDFILE=NO
-+NXT_HAVE_NETBSD_SENDFILE=NO
- NXT_HAVE_MACOSX_SENDFILE=NO
- NXT_HAVE_SOLARIS_SENDFILEV=NO
- NXT_HAVE_AIX_SEND_FILE=NO
-@@ -82,6 +83,34 @@
-     fi
- fi
- 
-+if [ $nxt_found = no ]; then
-+
-+    # NetBSD has no sendfile().
-+
-+    nxt_feature="NetBSD mmap()/write()"
-+    nxt_feature_name=NXT_HAVE_NETBSD_SENDFILE
-+    nxt_feature_libs=
-+    nxt_feature_test="#include <sys/types.h>
-+                      #include <sys/mman.h>
-+                      #include <sys/stat.h>
-+                      #include <fcntl.h>
-+                      #include <unistd.h>
-+
-+                      int main() {
-+                          struct stat f;
-+                          void *m = NULL;
-+
-+                          fstat(-1, &f);
-+                          m = mmap(NULL, f.st_size, PROT_READ, MAP_FILE | MAP_SHARED, -1, 0);
-+                          write(-1, m, f.st_size);
-+                          munmap(m, f.st_size);
-+                      }"
-+    . auto/feature
-+
-+    if [ $nxt_found = yes ]; then
-+        NXT_HAVE_NETBSD_SENDFILE=YES
-+    fi
-+fi
- 
- if [ $nxt_found = no ]; then
-     $echo
diff --git a/unit/patches/patch-ac b/unit/patches/patch-ac
deleted file mode 100644
index 415ab87dfe..0000000000
--- a/unit/patches/patch-ac
+++ /dev/null
@@ -1,33 +0,0 @@
-$NetBSD$
-
-
---- src/nxt_application.c.orig	2020-08-08 16:28:19.771768606 -0400
-+++ src/nxt_application.c	2020-08-08 16:33:14.070404193 -0400
-@@ -474,20 +474,24 @@
- static nxt_int_t
- nxt_app_prefork(nxt_task_t *task, nxt_process_t *process, nxt_mp_t *mp)
- {
--    nxt_int_t              cap_setid, cap_chroot;
-+    nxt_int_t              cap_setid;
-     nxt_int_t              ret;
-     nxt_runtime_t          *rt;
-     nxt_common_app_conf_t  *app_conf;
--    nxt_app_lang_module_t  *lang;
- 
-     rt = task->thread->runtime;
-     app_conf = process->data.app;
-     cap_setid = rt->capabilities.setid;
--    cap_chroot = rt->capabilities.chroot;
- 
-+#if (NXT_HAVE_ISOLATION_ROOTFS)
-+    nxt_int_t               cap_chroot;
-+    nxt_app_lang_module_t  *lang;
-+
-+    cap_chroot = rt->capabilities.chroot;
-     lang = nxt_app_lang_module(rt, &app_conf->type);
- 
-     nxt_assert(lang != NULL);
-+#endif
- 
-     if (app_conf->isolation != NULL) {
-         ret = nxt_app_set_isolation(task, app_conf->isolation, process);
diff --git a/unit/patches/patch-auto_sendfile b/unit/patches/patch-auto_sendfile
new file mode 100644
index 0000000000..9267f73642
--- /dev/null
+++ b/unit/patches/patch-auto_sendfile
@@ -0,0 +1,48 @@
+$NetBSD$
+
+
+--- auto/sendfile.orig	2020-08-08 16:00:55.378410575 -0400
++++ auto/sendfile	2020-08-08 16:16:14.270362755 -0400
+@@ -5,6 +5,7 @@
+ 
+ NXT_HAVE_LINUX_SENDFILE=NO
+ NXT_HAVE_FREEBSD_SENDFILE=NO
++NXT_HAVE_NETBSD_SENDFILE=NO
+ NXT_HAVE_MACOSX_SENDFILE=NO
+ NXT_HAVE_SOLARIS_SENDFILEV=NO
+ NXT_HAVE_AIX_SEND_FILE=NO
+@@ -82,6 +83,34 @@
+     fi
+ fi
+ 
++if [ $nxt_found = no ]; then
++
++    # NetBSD has no sendfile().
++
++    nxt_feature="NetBSD mmap()/write()"
++    nxt_feature_name=NXT_HAVE_NETBSD_SENDFILE
++    nxt_feature_libs=
++    nxt_feature_test="#include <sys/types.h>
++                      #include <sys/mman.h>
++                      #include <sys/stat.h>
++                      #include <fcntl.h>
++                      #include <unistd.h>
++
++                      int main() {
++                          struct stat f;
++                          void *m = NULL;
++
++                          fstat(-1, &f);
++                          m = mmap(NULL, f.st_size, PROT_READ, MAP_FILE | MAP_SHARED, -1, 0);
++                          write(-1, m, f.st_size);
++                          munmap(m, f.st_size);
++                      }"
++    . auto/feature
++
++    if [ $nxt_found = yes ]; then
++        NXT_HAVE_NETBSD_SENDFILE=YES
++    fi
++fi
+ 
+ if [ $nxt_found = no ]; then
+     $echo
diff --git a/unit/patches/patch-src_nxt__application.c b/unit/patches/patch-src_nxt__application.c
new file mode 100644
index 0000000000..415ab87dfe
--- /dev/null
+++ b/unit/patches/patch-src_nxt__application.c
@@ -0,0 +1,33 @@
+$NetBSD$
+
+
+--- src/nxt_application.c.orig	2020-08-08 16:28:19.771768606 -0400
++++ src/nxt_application.c	2020-08-08 16:33:14.070404193 -0400
+@@ -474,20 +474,24 @@
+ static nxt_int_t
+ nxt_app_prefork(nxt_task_t *task, nxt_process_t *process, nxt_mp_t *mp)
+ {
+-    nxt_int_t              cap_setid, cap_chroot;
++    nxt_int_t              cap_setid;
+     nxt_int_t              ret;
+     nxt_runtime_t          *rt;
+     nxt_common_app_conf_t  *app_conf;
+-    nxt_app_lang_module_t  *lang;
+ 
+     rt = task->thread->runtime;
+     app_conf = process->data.app;
+     cap_setid = rt->capabilities.setid;
+-    cap_chroot = rt->capabilities.chroot;
+ 
++#if (NXT_HAVE_ISOLATION_ROOTFS)
++    nxt_int_t               cap_chroot;
++    nxt_app_lang_module_t  *lang;
++
++    cap_chroot = rt->capabilities.chroot;
+     lang = nxt_app_lang_module(rt, &app_conf->type);
+ 
+     nxt_assert(lang != NULL);
++#endif
+ 
+     if (app_conf->isolation != NULL) {
+         ret = nxt_app_set_isolation(task, app_conf->isolation, process);
diff --git a/unit/patches/patch-src_nxt__conn__write.c b/unit/patches/patch-src_nxt__conn__write.c
new file mode 100644
index 0000000000..1e7a807de8
--- /dev/null
+++ b/unit/patches/patch-src_nxt__conn__write.c
@@ -0,0 +1,27 @@
+$NetBSD$
+
+
+--- src/nxt_conn_write.c.orig	2020-05-28 12:04:00.000000000 -0400
++++ src/nxt_conn_write.c	2020-08-08 16:49:50.752693316 -0400
+@@ -266,6 +266,21 @@
+     res = sendfile(s, fd, &pos, size);
+ #endif
+ 
++#ifdef NXT_HAVE_NETBSD_SENDFILE
++    struct stat fileinfo;
++    void *fmem = NULL;
++    res = fstat(fd, &fileinfo);
++    if (res == 0) {
++        fmem = mmap(NULL, fileinfo.st_size, PROT_READ, MAP_FILE | MAP_SHARED, fd, 0);
++    }
++    if (fmem != NULL) {
++        res = write(s, fmem, fileinfo.st_size);
++        munmap(fmem, fileinfo.st_size);
++    } else {
++        res = -1;
++    }
++#endif 
++
+     return res;
+ }
+ 


Home | Main Index | Thread Index | Old Index