pkgsrc-WIP-changes archive

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

www/nginx-devel: add for the future updates



Module Name:	pkgsrc-wip
Committed By:	Sergey A. Osokin <osa%FreeBSD.org@localhost>
Pushed By:	osa
Date:		Mon Oct 4 12:11:05 2021 -0400
Changeset:	6602b4b55277989a79c2057a68d6606f7e09d1ee

Added Files:
	nginx-devel/DESCR
	nginx-devel/MESSAGE
	nginx-devel/Makefile
	nginx-devel/PLIST
	nginx-devel/distinfo
	nginx-devel/files/nginx.sh
	nginx-devel/files/smf/manifest.xml
	nginx-devel/patches/patch-auto_install
	nginx-devel/patches/patch-conf_nginx.conf
	nginx-devel/patches/patch-src_event_modules_ngx__eventport__module.c
	nginx-devel/patches/patch-src_os_unix_ngx__udp__sendmsg__chain.c

Log Message:
www/nginx-devel: add for the future updates

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

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

diffstat:
 nginx-devel/DESCR                                  | 20 +++++
 nginx-devel/MESSAGE                                |  9 +++
 nginx-devel/Makefile                               |  8 ++
 nginx-devel/PLIST                                  | 16 ++++
 nginx-devel/distinfo                               | 70 +++++++++++++++++
 nginx-devel/files/nginx.sh                         | 19 +++++
 nginx-devel/files/smf/manifest.xml                 | 34 +++++++++
 nginx-devel/patches/patch-auto_install             | 16 ++++
 nginx-devel/patches/patch-conf_nginx.conf          | 89 ++++++++++++++++++++++
 ...atch-src_event_modules_ngx__eventport__module.c | 25 ++++++
 .../patch-src_os_unix_ngx__udp__sendmsg__chain.c   | 16 ++++
 11 files changed, 322 insertions(+)

diffs:
diff --git a/nginx-devel/DESCR b/nginx-devel/DESCR
new file mode 100644
index 0000000000..9b4c22585f
--- /dev/null
+++ b/nginx-devel/DESCR
@@ -0,0 +1,20 @@
+Nginx (pronounced engine-x) is a free, open-source, high-performance HTTP
+server and reverse proxy, as well as an IMAP/POP3 proxy server. Igor Sysoev
+started development of Nginx in 2002, with the first public release in 2004.
+Nginx now hosts nearly 12.18% (22.2M) of active sites across all domains.
+Nginx is known for its high performance, stability, rich feature set, simple
+configuration, and low resource consumption.
+
+Nginx is one of a handful of servers written to address the C10K problem.
+Unlike traditional servers, Nginx doesn't rely on threads to handle requests.
+Instead it uses a much more scalable event-driven (asynchronous) architecture.
+This architecture uses small, but more importantly, predictable amounts of
+memory under load.
+Even if you don't expect to handle thousands of simultaneous requests, you can
+still benefit from Nginx's high-performance and small memory footprint.
+Nginx scales in all directions: from the smallest VPS all the way up to
+clusters of servers.
+
+Nginx powers several high-visibility sites, such as Netflix, Hulu, Pinterest,
+CloudFlare, Airbnb, WordPress.com, GitHub, SoundCloud, Zynga, Eventbrite,
+Zappos, Media Temple, Heroku, RightScale, Engine Yard and NetDNA.
diff --git a/nginx-devel/MESSAGE b/nginx-devel/MESSAGE
new file mode 100644
index 0000000000..595f95d2b2
--- /dev/null
+++ b/nginx-devel/MESSAGE
@@ -0,0 +1,9 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1 2013/02/22 17:06:54 imil Exp $
+
+Consider adding something like following lines to /etc/newsyslog.conf:
+
+${NGINX_LOGDIR}/access.log ${NGINX_USER}:${NGINX_GROUP} 640 7 * 24 Z  ${NGINX_PIDDIR}/nginx.pid SIGUSR1
+${NGINX_LOGDIR}/error.log  ${NGINX_USER}:${NGINX_GROUP} 640 7 * 24 Z  ${NGINX_PIDDIR}/nginx.pid SIGUSR1
+
+===========================================================================
diff --git a/nginx-devel/Makefile b/nginx-devel/Makefile
new file mode 100644
index 0000000000..a3101ff8b2
--- /dev/null
+++ b/nginx-devel/Makefile
@@ -0,0 +1,8 @@
+# $NetBSD: Makefile,v 1.65 2021/09/15 12:37:33 adam Exp $
+
+DISTNAME=	nginx-1.21.3
+
+MAINTAINER=	imil%NetBSD.org@localhost
+
+.include "../../www/nginx/Makefile.common"
+.include "../../mk/bsd.pkg.mk"
diff --git a/nginx-devel/PLIST b/nginx-devel/PLIST
new file mode 100644
index 0000000000..b0366eb81d
--- /dev/null
+++ b/nginx-devel/PLIST
@@ -0,0 +1,16 @@
+@comment $NetBSD: PLIST,v 1.5 2017/10/28 10:57:50 adam Exp $
+${PLIST.perl}${PERL5_SUB_INSTALLVENDORARCH}/auto/nginx/nginx.${SOEXT}
+${PLIST.perl}${PERL5_SUB_INSTALLVENDORARCH}/nginx.pm
+man/man8/nginx.8
+sbin/nginx
+share/examples/nginx/conf/fastcgi.conf
+share/examples/nginx/conf/fastcgi_params
+share/examples/nginx/conf/koi-utf
+share/examples/nginx/conf/koi-win
+share/examples/nginx/conf/mime.types
+${PLIST.naxsi}share/examples/nginx/conf/naxsi_core.rules
+share/examples/nginx/conf/nginx.conf
+${PLIST.uwsgi}share/examples/nginx/conf/uwsgi_params
+share/examples/nginx/conf/win-utf
+share/examples/nginx/html/50x.html
+share/examples/nginx/html/index.html
diff --git a/nginx-devel/distinfo b/nginx-devel/distinfo
new file mode 100644
index 0000000000..1e702cc4a7
--- /dev/null
+++ b/nginx-devel/distinfo
@@ -0,0 +1,70 @@
+$NetBSD: distinfo,v 1.69 2021/09/15 12:37:33 adam Exp $
+
+SHA1 (array-var-nginx-module-0.05.tar.gz) = c69fac77814947009ab783a471783b3c95a63a26
+RMD160 (array-var-nginx-module-0.05.tar.gz) = 89bd4efc04864e3e90781588a337338951ec8733
+SHA512 (array-var-nginx-module-0.05.tar.gz) = 7c9fa9b76bc7cd2473ceae6d5ffb8de26993be9293ea967908d6c4550e086affa7016df4c936fb0b79f1142dc0aa1a5f2058d417e6433b5a3497a45d7e866e84
+Size (array-var-nginx-module-0.05.tar.gz) = 11280 bytes
+SHA1 (echo-nginx-module-0.62.tar.gz) = 786ae3880fbf104e57ef4d92872fa9fa8e98623c
+RMD160 (echo-nginx-module-0.62.tar.gz) = 2a2099e0436702d42ed3bd74231c099661c14260
+SHA512 (echo-nginx-module-0.62.tar.gz) = 240896b1c559a71ca6ca87136d8535edd25b1d65ebb80d46080ad41c09ed1cec9737828f9efe260782294d660cea66cf402f4e75bba3fed26f3a94de0ae2f89b
+Size (echo-nginx-module-0.62.tar.gz) = 53329 bytes
+SHA1 (encrypted-session-nginx-module-0.08.tar.gz) = 0e36e7ae2553f1ac5566e60021c535efa065c8ab
+RMD160 (encrypted-session-nginx-module-0.08.tar.gz) = becf8617c53c463f49ad853532ce5e4a3b35e073
+SHA512 (encrypted-session-nginx-module-0.08.tar.gz) = 80651951edd69d202e991a66f531bbe0398b4f062e822bb7748411f5f597eb1d5827102ba477bb6cd2793274adf6f6d60dd89fde7645174b091143251197af69
+Size (encrypted-session-nginx-module-0.08.tar.gz) = 11802 bytes
+SHA1 (form-input-nginx-module-0.12.tar.gz) = 03d3befb5ecc6aba5f4f871d18c490e206906022
+RMD160 (form-input-nginx-module-0.12.tar.gz) = 954f13e7ef7afe0d859b543a57482c3dbdf33ced
+SHA512 (form-input-nginx-module-0.12.tar.gz) = 1c5c5ab74156cac09da44a2dcdd84f7c03c9919a23a847e63613e00e3781ecd73d5ad12446174b4fdef9d064257a31570a8dbcccc00d8266f7048e3dcde0362e
+Size (form-input-nginx-module-0.12.tar.gz) = 11090 bytes
+SHA1 (headers-more-nginx-module-0.33.tar.gz) = 7d6af910dae98f0dbc67bf77e82eab8b7da5d0b1
+RMD160 (headers-more-nginx-module-0.33.tar.gz) = fb27195a722e81f533016e693b5a6616fd6b4f72
+SHA512 (headers-more-nginx-module-0.33.tar.gz) = 13165b1b8d4be281b8bd2404fa48d456013d560bace094c81da08a35dc6a4f025a809a3ae3a42be6bbf67abbcbe41e0730aba06f905220f3baeb01e1192a7d37
+Size (headers-more-nginx-module-0.33.tar.gz) = 28130 bytes
+SHA1 (lua-nginx-module-0.10.19.tar.gz) = 1fa72fe33f6aa9884e5baf4724f112ac0a157da2
+RMD160 (lua-nginx-module-0.10.19.tar.gz) = cd8171fcadbd8f77692ab63b35d7ec66ca66983b
+SHA512 (lua-nginx-module-0.10.19.tar.gz) = 6b258bdcb45f99f9cec3df14fa6747704ab1f0005f8a2ccd4440f8ec477e3dcbf6026e1acffc9d5fecb79605248168a77bd2a26d67c98c7d5cc336f9474ef68c
+Size (lua-nginx-module-0.10.19.tar.gz) = 666942 bytes
+SHA1 (naxsi-1.3.tar.gz) = 53b347687ade9a54f19c0bf41f6c63ae56901789
+RMD160 (naxsi-1.3.tar.gz) = c8c9190fcf4e93c504e8815a813c30ee697daded
+SHA512 (naxsi-1.3.tar.gz) = d7aac69b5eceeb1b0db4741201159ade1e0e7f6f7c3e8c4afa2f8959c6c00c3b5285d5185747c2fb0b1400efda02e96799836315e7e492bb4a059b14acb2142d
+Size (naxsi-1.3.tar.gz) = 235626 bytes
+SHA1 (nginx-1.21.3.tar.gz) = 682f592180cdd91ae866a8b40c3d8762659248d7
+RMD160 (nginx-1.21.3.tar.gz) = 851ed2d5fa94048ef9937b64ce53fe18154e0b8e
+SHA512 (nginx-1.21.3.tar.gz) = 173d6d5c1471df1f5fbcf43fab19699ac509faee44a6c603f5e96ba59ac58774bbd84be5b45f5922a12b4037e4b32f875ce71c28e3e6adb70f306a2d25b40736
+Size (nginx-1.21.3.tar.gz) = 1066609 bytes
+SHA1 (nginx-dav-ext-module-3.0.0.tar.gz) = 524407402df7e73df9def85345c8bea324dceede
+RMD160 (nginx-dav-ext-module-3.0.0.tar.gz) = 8d099215bde79492565a39c3c8feb7695138138e
+SHA512 (nginx-dav-ext-module-3.0.0.tar.gz) = d0193ba90f1ef46c4e470630c4394bdf99d94fd2e3bd8be6cb2ba1655ec59944b1269025f032b79dc2c6dad366e54389ef6a6da2ddeb91d535a4027f2162fbde
+Size (nginx-dav-ext-module-3.0.0.tar.gz) = 14558 bytes
+SHA1 (nginx-rtmp-module-1.2.2.tar.gz) = fb5cf748d87dd448576d73b057855fc12cad9896
+RMD160 (nginx-rtmp-module-1.2.2.tar.gz) = a19f42e4f15214fd11ac8f334468dc400b86b5bd
+SHA512 (nginx-rtmp-module-1.2.2.tar.gz) = 3f8c803221854c4b1a06aadc6313fbfec74bd7179c0ee51d4365b26ffa8875881a6e1e48f777a9c9efbb9170ab7478a82920d5448a2c2df485503d37bb03ab81
+Size (nginx-rtmp-module-1.2.2.tar.gz) = 519934 bytes
+SHA1 (nginx_http_push_module-1.2.10.tar.gz) = 8dd32bfbccae58d0e40d2d10b183c1479ea3a5bc
+RMD160 (nginx_http_push_module-1.2.10.tar.gz) = 00601ab439d983687b3c30796c86227fdb43069c
+SHA512 (nginx_http_push_module-1.2.10.tar.gz) = f902641cab1c4c0d95d4ac59769c46512f7b9af9e1c49fea85a724d9eb7c3cb4ec2a4fbd9df196d8e0d250b73c9b352305e4e0cbbdcc310143a85e0f7d42c6a2
+Size (nginx_http_push_module-1.2.10.tar.gz) = 713615 bytes
+SHA1 (ngx_cache_purge-2.5.1.tar.gz) = 12069184d255a99a5039a7e9b1299945c6767acc
+RMD160 (ngx_cache_purge-2.5.1.tar.gz) = 35848113b920593bc99d34b1dfffd4292ce02c58
+SHA512 (ngx_cache_purge-2.5.1.tar.gz) = 3ad37b4a251fb85a9a384f87fea5ca640166e3d7173c6ed9a857b191ae5f2e93819483b5d423fcafe8a10239b571677b342cc2d2d5d62315816f1316d7d5bb76
+Size (ngx_cache_purge-2.5.1.tar.gz) = 16614 bytes
+SHA1 (ngx_devel_kit-0.3.1.tar.gz) = e15316e13a7b19a3d2502becbb26043a464a135a
+RMD160 (ngx_devel_kit-0.3.1.tar.gz) = 5c52a463544294096611aa9dec1c76e937a1aa23
+SHA512 (ngx_devel_kit-0.3.1.tar.gz) = de1e3349d8dd08e5982279b2219dc8a8006739f0409b8e0f5c50d93434beff1fbafba43e9c5ac85a5fab90afc5c0a7244a340610339c36f82f2cba7233e72de9
+Size (ngx_devel_kit-0.3.1.tar.gz) = 66542 bytes
+SHA1 (ngx_http_geoip2_module-3.3.tar.gz) = 6970ae247494c3890e166747752927c6450d0b32
+RMD160 (ngx_http_geoip2_module-3.3.tar.gz) = 7b272aad1a402ae6ca8fac873d4555afbeab7b75
+SHA512 (ngx_http_geoip2_module-3.3.tar.gz) = 06963b598c54e22d75ce837fb222f5aa6c9494c29e558ff46f1205d7159fc305414bfac4ed3288c836dcbf7628d92f26458e1992d34fc2f4b73275a32847bdc0
+Size (ngx_http_geoip2_module-3.3.tar.gz) = 8509 bytes
+SHA1 (njs-0.5.0.tar.gz) = a9cb186dbbfad7901a83f9b267cdf9eee84af374
+RMD160 (njs-0.5.0.tar.gz) = 0cb82b7930bf500e81471b9d44d87924a6043e57
+SHA512 (njs-0.5.0.tar.gz) = 182a64ba519b1a1d29ac71ffe2c9ef8e5a6f9aaf3db9f327ac926114db73b339a424801b558068fc7ae06ae88a4dea0a601c749db4b6f2b579e427181e41d11b
+Size (njs-0.5.0.tar.gz) = 505568 bytes
+SHA1 (set-misc-nginx-module-0.32.tar.gz) = 2433bb7a138c3b13812ec2af7070cdc67435918f
+RMD160 (set-misc-nginx-module-0.32.tar.gz) = eff9be78f884f7c3e09e88af6bdf4cdd9aaea05d
+SHA512 (set-misc-nginx-module-0.32.tar.gz) = 5590526f60c99630f99a49bfa9e3455baee6d58cd2a1419eab1367a838dafb87a50f5e2607aa8ac557b90dbf633dcf61069c997b3526cddc8f2fc45820a7bc3b
+Size (set-misc-nginx-module-0.32.tar.gz) = 29329 bytes
+SHA1 (patch-auto_install) = 3b3a0f9f4c005b707664554fa57a58c9e3b7de60
+SHA1 (patch-conf_nginx.conf) = ee9fbc3838cc006f6e1cddddadf6603f4941d171
+SHA1 (patch-src_event_modules_ngx__eventport__module.c) = c8e919f48d68bd5bffc4ad11d9c79dc6da3a0de2
+SHA1 (patch-src_os_unix_ngx__udp__sendmsg__chain.c) = d00e0f8bf7ff967e56e2b0d299f0e75f8cbdb3cb
diff --git a/nginx-devel/files/nginx.sh b/nginx-devel/files/nginx.sh
new file mode 100644
index 0000000000..cfaee259f8
--- /dev/null
+++ b/nginx-devel/files/nginx.sh
@@ -0,0 +1,19 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: nginx.sh,v 1.1 2013/02/22 17:06:54 imil Exp $
+#
+# PROVIDE: nginx
+# REQUIRE: DAEMON
+
+. /etc/rc.subr
+
+name="nginx"
+rcvar=${name}
+command="@PREFIX@/sbin/${name}"
+required_files="@PKG_SYSCONFDIR@/${name}.conf"
+pidfile="@VARBASE@/run/${name}.pid"
+start_precmd="ulimit -n 2048"
+extra_commands="reload"
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/nginx-devel/files/smf/manifest.xml b/nginx-devel/files/smf/manifest.xml
new file mode 100644
index 0000000000..a3ea8eced5
--- /dev/null
+++ b/nginx-devel/files/smf/manifest.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<service_bundle type="manifest" name="export">
+  <service name="@SMF_PREFIX@/@SMF_NAME@" type="service" version="1">
+    <create_default_instance enabled="false" />
+    <single_instance />
+    <dependency name='network' grouping='require_all' restart_on='error' type='service'>
+      <service_fmri value='svc:/milestone/network:default' />
+    </dependency>
+    <dependency name='filesystem-local' grouping='require_all' restart_on='none' type='service'>
+      <service_fmri value='svc:/system/filesystem/local:default' />
+    </dependency>
+    <method_context>
+      <method_environment>
+        <envvar name="LD_PRELOAD_32" value="/usr/lib/extendedFILE.so.1" />
+      </method_environment>
+    </method_context>
+    <exec_method type="method" name="start" exec="@PREFIX@/sbin/nginx -c %{config_file}" timeout_seconds="60" />
+    <exec_method type="method" name="stop" exec=":kill" timeout_seconds="60" />
+    <exec_method type="method" name="refresh" exec=":kill -HUP" timeout_seconds="60" />
+    <property_group name="startd" type="framework">
+      <propval name="duration" type="astring" value="contract" />
+      <propval name="ignore_error" type="astring" value="core,signal" />
+    </property_group>
+    <property_group name="application" type="application">
+      <propval name="config_file" type="astring" value="@PKG_SYSCONFDIR@/nginx.conf" />
+    </property_group>
+    <template>
+      <common_name>
+        <loctext xml:lang="C">Nginx HTTP daemon</loctext>
+      </common_name>
+    </template>
+  </service>
+</service_bundle>
diff --git a/nginx-devel/patches/patch-auto_install b/nginx-devel/patches/patch-auto_install
new file mode 100644
index 0000000000..5221fd42eb
--- /dev/null
+++ b/nginx-devel/patches/patch-auto_install
@@ -0,0 +1,16 @@
+$NetBSD: patch-auto_install,v 1.2 2016/06/15 14:53:48 fhajny Exp $
+
+Do not create PID directory.
+
+--- auto/install.orig	2016-05-31 13:43:50.000000000 +0000
++++ auto/install
+@@ -148,9 +148,6 @@ install:	build $NGX_INSTALL_PERL_MODULES
+ 		|| cp conf/nginx.conf '\$(DESTDIR)$NGX_CONF_PATH'
+ 	cp conf/nginx.conf '\$(DESTDIR)$NGX_CONF_PREFIX/nginx.conf.default'
+ 
+-	test -d '\$(DESTDIR)`dirname "$NGX_PID_PATH"`' \\
+-		|| mkdir -p '\$(DESTDIR)`dirname "$NGX_PID_PATH"`'
+-
+ 	test -d '\$(DESTDIR)`dirname "$NGX_HTTP_LOG_PATH"`' \\
+ 		|| mkdir -p '\$(DESTDIR)`dirname "$NGX_HTTP_LOG_PATH"`'
+ 
diff --git a/nginx-devel/patches/patch-conf_nginx.conf b/nginx-devel/patches/patch-conf_nginx.conf
new file mode 100644
index 0000000000..f51b9ee0d7
--- /dev/null
+++ b/nginx-devel/patches/patch-conf_nginx.conf
@@ -0,0 +1,89 @@
+$NetBSD: patch-conf_nginx.conf,v 1.1 2013/12/05 15:04:06 imil Exp $
+
+This patch provides config file adapted to pkgsrc settings.
+
+--- conf/nginx.conf.orig	2013-11-19 10:03:47.000000000 +0000
++++ conf/nginx.conf
+@@ -1,28 +1,23 @@
+ 
+-#user  nobody;
++user   %%NGINX_USER%%  %%NGINX_GROUP%%;
+ worker_processes  1;
+ 
+-#error_log  logs/error.log;
+-#error_log  logs/error.log  notice;
+-#error_log  logs/error.log  info;
+-
+-#pid        logs/nginx.pid;
+-
+-
+ events {
++    # After increasing this value You probably should increase limit
++    # of file descriptors (for example in start_precmd in startup script)
+     worker_connections  1024;
+ }
+ 
+ 
+ http {
+-    include       mime.types;
++    include       %%PKG_SYSCONFDIR%%/mime.types;
+     default_type  application/octet-stream;
+ 
+     #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
+     #                  '$status $body_bytes_sent "$http_referer" '
+     #                  '"$http_user_agent" "$http_x_forwarded_for"';
+ 
+-    #access_log  logs/access.log  main;
++    #access_log  %%NGINX_LOGDIR%%/access.log  main;
+ 
+     sendfile        on;
+     #tcp_nopush     on;
+@@ -38,10 +33,10 @@ http {
+ 
+         #charset koi8-r;
+ 
+-        #access_log  logs/host.access.log  main;
++        #access_log  %%NGINX_LOGDIR%%/host.access.log  main;
+ 
+         location / {
+-            root   html;
++            root   share/examples/nginx/html;
+             index  index.html index.htm;
+         }
+ 
+@@ -51,7 +46,7 @@ http {
+         #
+         error_page   500 502 503 504  /50x.html;
+         location = /50x.html {
+-            root   html;
++            root   share/examples/nginx/html;
+         }
+ 
+         # proxy the PHP scripts to Apache listening on 127.0.0.1:80
+@@ -67,7 +62,7 @@ http {
+         #    fastcgi_pass   127.0.0.1:9000;
+         #    fastcgi_index  index.php;
+         #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
+-        #    include        fastcgi_params;
++        #    include        %%PKG_SYSCONFDIR%%/fastcgi_params;
+         #}
+ 
+         # deny access to .htaccess files, if Apache's document root
+@@ -87,7 +82,7 @@ http {
+     #    server_name  somename  alias  another.alias;
+ 
+     #    location / {
+-    #        root   html;
++    #        root   share/examples/nginx/html;
+     #        index  index.html index.htm;
+     #    }
+     #}
+@@ -109,7 +104,7 @@ http {
+     #    ssl_prefer_server_ciphers  on;
+ 
+     #    location / {
+-    #        root   html;
++    #        root   share/examples/nginx/html;
+     #        index  index.html index.htm;
+     #    }
+     #}
diff --git a/nginx-devel/patches/patch-src_event_modules_ngx__eventport__module.c b/nginx-devel/patches/patch-src_event_modules_ngx__eventport__module.c
new file mode 100644
index 0000000000..2293ab5d92
--- /dev/null
+++ b/nginx-devel/patches/patch-src_event_modules_ngx__eventport__module.c
@@ -0,0 +1,25 @@
+$NetBSD: patch-src_event_modules_ngx__eventport__module.c,v 1.1 2017/02/14 10:10:55 fhajny Exp $
+
+Fix a situation where Nginx can stop servicing events when port_getn() returns a timeout.
+
+https://github.com/joyent/nginx/commit/bdd0c625236bc25799bd6f81dcf5d774928e8cb0
+
+--- src/event/modules/ngx_eventport_module.c.orig	2017-01-24 14:02:19.000000000 +0000
++++ src/event/modules/ngx_eventport_module.c
+@@ -468,6 +468,16 @@ ngx_eventport_process_events(ngx_cycle_t
+         ngx_time_update();
+     }
+ 
++    /*
++     * There's a long standing condition with event ports that port_getn() may
++     * return ETIME even when events are available. This would happen if we have
++     * specified a timeout to port_getn() without reaching the number of
++     * requested events.
++     */
++    if (n == -1 && err == ETIME && events > 0) {
++	    n = 0;
++    }
++
+     if (n == -1) {
+         if (err == ETIME) {
+             if (timer != NGX_TIMER_INFINITE) {
diff --git a/nginx-devel/patches/patch-src_os_unix_ngx__udp__sendmsg__chain.c b/nginx-devel/patches/patch-src_os_unix_ngx__udp__sendmsg__chain.c
new file mode 100644
index 0000000000..4e0f0c0354
--- /dev/null
+++ b/nginx-devel/patches/patch-src_os_unix_ngx__udp__sendmsg__chain.c
@@ -0,0 +1,16 @@
+$NetBSD: patch-src_os_unix_ngx__udp__sendmsg__chain.c,v 1.2 2018/04/12 06:49:39 adam Exp $
+
+Fix building on NetBSD.
+
+--- src/os/unix/ngx_udp_sendmsg_chain.c.orig	2017-06-16 13:11:29.459922906 +0000
++++ src/os/unix/ngx_udp_sendmsg_chain.c
+@@ -271,7 +271,9 @@ ngx_sendmsg(ngx_connection_t *c, ngx_iov
+ 
+             pkt = (struct in_pktinfo *) CMSG_DATA(cmsg);
+             ngx_memzero(pkt, sizeof(struct in_pktinfo));
++#ifndef __NetBSD__
+             pkt->ipi_spec_dst = sin->sin_addr;
++#endif
+         }
+ 
+ #endif


Home | Main Index | Thread Index | Old Index