Skip to contentSkip to conversation

package/nginx: bump version to 1.10.0

PATCH New Martin Bark 3 participants 13 messages May 1, 2016 – May 4, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/5 package/nginx: bump version to 1.10.0

The ngx_http_spdy_module has been superseded by the ngx_http_v2_module so BR2_PACKAGE_NGINX_HTTP_SPDY_MODULE has changed to BR2_PACKAGE_NGINX_HTTP_V2_MODULE

---
 Config.in.legacy                                              |  9 +++++++++
 ...auto-type-sizeof-rework-autotest-to-be-cross-compila.patch | 11 +++--------
 package/nginx/Config.in                                       |  4 ++--
 package/nginx/nginx.hash                                      |  2 +-
 package/nginx/nginx.mk                                        |  7 ++++---
 5 files changed, 19 insertions(+), 14 deletions(-)
Config.in.legacy +9 -0
index 9f694f8..fd1c5bc 100644
@@ -145,6 +145,15 @@ endif
 ###############################################################################
 comment "Legacy options removed in 2016.05"
 
+config BR2_PACKAGE_NGINX_HTTP_SPDY_MODULE
+	bool "nginx http spdy module removed"
+	select BR2_LEGACY
+	select BR2_PACKAGE_NGINX_HTTP_V2_MODULE
+	help
+	  The ngx_http_spdy_module has been superseded by the ngx_http_v2_module
+	  since nginx v1.9.5.  The ngx_http_v2_module modules has been automatically
+	  selected in your configuration.
+
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC
 	bool "PowerPC Sourcery toolchain has been removed"
 	select BR2_LEGACY
package/nginx/0001-auto-type-sizeof-rework-autotest-to-be-cross-compila.patch +3 -8
index 496459e..829a435 100644
@@ -13,6 +13,8 @@ Signed-off-by: Samuel Martin <[email protected]>
 Refresh for 1.8.0.
 
 Signed-off-by: Danomi Manchego <[email protected]>
+[martin at barkynet.com: Updated for 1.10.0]
+Signed-off-by: Martin Bark <[email protected]>
 ---
  auto/types/sizeof | 42 ++++++++++++++++++++++++++++--------------
  1 file changed, 28 insertions(+), 14 deletions(-)
@@ -30,7 +32,7 @@ index a5f66bb..c6f31ec 100644
  
  #include <sys/types.h>
  #include <sys/time.h>
-@@ -25,29 +25,43 @@ $NGX_INCLUDE_UNISTD_H
+@@ -25,22 +25,40 @@ $NGX_INCLUDE_UNISTD_H
  $NGX_INCLUDE_INTTYPES_H
  $NGX_INCLUDE_AUTO_CONFIG_H
  
@@ -80,13 +82,6 @@ index a5f66bb..c6f31ec 100644
      echo " $ngx_size bytes"
  fi
  
--
--rm -rf $NGX_AUTOTEST*
--
--
- case $ngx_size in
-     4)
-         ngx_max_value=2147483647
 -- 
 1.9.1
 
package/nginx/Config.in +2 -2
index be445f4..0c39a63 100644
@@ -36,8 +36,8 @@ config BR2_PACKAGE_NGINX_HTTP_SSL_MODULE
 	help
 	  Enable ngx_http_ssl_module
 
-config BR2_PACKAGE_NGINX_HTTP_SPDY_MODULE
-	bool "ngx_http_spdy_module"
+config BR2_PACKAGE_NGINX_HTTP_V2_MODULE
+	bool "ngx_http_v2_module"
 	select BR2_PACKAGE_ZLIB
 	help
 	  Enable ngx_http_spdy_module
package/nginx/nginx.hash +1 -1
index fe4d6b2..394f4d2 100644
@@ -1,2 +1,2 @@
 # Locally calculated after checking pgp signature
-sha256	8f4b3c630966c044ec72715754334d1fdf741caa1d5795fb4646c27d09f797b7	nginx-1.8.1.tar.gz
+sha256	8ed647c3dd65bc4ced03b0e0f6bf9e633eff6b01bac772bcf97077d58bc2be4d	nginx-1.10.0.tar.gz
package/nginx/nginx.mk +4 -3
index 7348e48..25fb9a8 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-NGINX_VERSION = 1.8.1
+NGINX_VERSION = 1.10.0
 NGINX_SITE = http://nginx.org/download
 NGINX_LICENSE = BSD-2c
 NGINX_LICENSE_FILES = LICENSE
@@ -104,9 +104,9 @@ else
 NGINX_CONF_OPTS += --without-http-cache
 endif
 
-ifeq ($(BR2_PACKAGE_NGINX_HTTP_SPDY_MODULE),y)
+ifeq ($(BR2_PACKAGE_NGINX_HTTP_V2_MODULE),y)
 NGINX_DEPENDENCIES += zlib
-NGINX_CONF_OPTS += --with-http_spdy_module
+NGINX_CONF_OPTS += --with-http_v2_module
 endif
 
 ifeq ($(BR2_PACKAGE_NGINX_HTTP_SSL_MODULE),y)
@@ -193,6 +193,7 @@ endif # BR2_PACKAGE_NGINX_HTTP
 
 # mail modules
 ifeq ($(BR2_PACKAGE_NGINX_MAIL),y)
+NGINX_CONF_OPTS += --with-mail
 
 ifeq ($(BR2_PACKAGE_NGINX_MAIL_SSL_MODULE),y)
 NGINX_DEPENDENCIES += openssl
Signature · 1 line
2.7.4
#1 lore raw

PATCH 2/5 package/nginx: add support for stream proxy modules

---
 package/nginx/Config.in | 43 +++++++++++++++++++++++++++++++++++++++++++
 package/nginx/nginx.mk  | 18 ++++++++++++++++++
 2 files changed, 61 insertions(+)
package/nginx/Config.in +43 -0
index 0c39a63..f925cc7 100644
@@ -304,6 +304,49 @@ config BR2_PACKAGE_NGINX_MAIL_SMTP_MODULE
 
 endif #BR2_PACKAGE_NGINX_MAIL
 
+config BR2_PACKAGE_NGINX_STREAM
+	bool "stream proxy modules"
+
+if BR2_PACKAGE_NGINX_STREAM
+
+config BR2_PACKAGE_NGINX_STREAM_SSL_MODULE
+	bool "ngx_stream_ssl_module"
+	select BR2_PACKAGE_OPENSSL
+	help
+	  Enable ngx_stream_ssl_module
+
+config BR2_PACKAGE_NGINX_STREAM_LIMIT_CONN_MODULE
+	bool "ngx_stream_limit_conn_module"
+	default y
+	help
+	  Enable ngx_stream_limit_conn_module
+
+config BR2_PACKAGE_NGINX_STREAM_ACCESS_MODULE
+	bool "ngx_stream_access_module"
+	default y
+	help
+	  Enable ngx_stream_access_module
+
+config BR2_PACKAGE_NGINX_STREAM_UPSTREAM_HASH_MODULE
+	bool "ngx_stream_upstream_hash_module"
+	default y
+	help
+	  Enable ngx_stream_upstream_hash_module
+
+config BR2_PACKAGE_NGINX_STREAM_UPSTREAM_LEAST_CONN_MODULE
+	bool "ngx_stream_upstream_least_conn_module"
+	default y
+	help
+	  Enable ngx_stream_upstream_least_conn_module
+
+config BR2_PACKAGE_NGINX_STREAM_UPSTREAM_ZONE_MODULE
+	bool "ngx_stream_upstream_zone_module"
+	default y
+	help
+	  Enable ngx_stream_upstream_zone_module
+
+endif #BR2_PACKAGE_NGINX_STREAM
+
 comment "misc. modules"
 
 config BR2_PACKAGE_NGINX_SELECT_MODULE
package/nginx/nginx.mk +18 -0
index 25fb9a8..7f3b075 100644
@@ -207,6 +207,24 @@ NGINX_CONF_OPTS += \
 
 endif # BR2_PACKAGE_NGINX_MAIL
 
+# stream modules
+ifeq ($(BR2_PACKAGE_NGINX_STREAM),y)
+NGINX_CONF_OPTS += --with-stream
+
+ifeq ($(BR2_PACKAGE_NGINX_STREAM_SSL_MODULE),y)
+NGINX_DEPENDENCIES += openssl
+NGINX_CONF_OPTS += --with-stream_ssl_module
+endif
+
+NGINX_CONF_OPTS += \
+	$(if $(BR2_PACKAGE_NGINX_STREAM_LIMIT_CONN_MODULE),,--without-stream_limit_conn_module) \
+	$(if $(BR2_PACKAGE_NGINX_STREAM_ACCESS_MODULE),,--without-stream_access_module) \
+	$(if $(BR2_PACKAGE_NGINX_STREAM_UPSTREAM_HASH_MODULE),,--without-stream_upstream_hash_module) \
+	$(if $(BR2_PACKAGE_NGINX_STREAM_UPSTREAM_LEAST_CONN_MODULE),,--without-stream_upstream_least_conn_module) \
+	$(if $(BR2_PACKAGE_NGINX_STREAM_UPSTREAM_ZONE_MODULE),,--without-stream_upstream_zone_module)
+
+endif # BR2_PACKAGE_NGINX_STREAM
+
 define NGINX_DISABLE_WERROR
 	$(SED) 's/-Werror//g' -i $(@D)/auto/cc/*
 endef
Signature · 1 line
2.7.4
#2 lore raw

PATCH 3/5 package/nginx: add thread pool support

In reply to Martin Bark
---
 package/nginx/Config.in | 3 +++
 package/nginx/nginx.mk  | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)
package/nginx/Config.in +3 -0
index f925cc7..bec83c3 100644
@@ -18,6 +18,9 @@ config BR2_PACKAGE_NGINX_FILE_AIO
 	depends on !BR2_aarch64
 	depends on !BR2_arc
 
+config BR2_PACKAGE_NGINX_THREADS
+    bool "thread pool support"
+
 config BR2_PACKAGE_NGINX_HTTP
 	bool "http server"
 	default y
package/nginx/nginx.mk +2 -1
index 7f3b075..91772b3 100644
@@ -64,7 +64,8 @@ NGINX_CONF_OPTS += \
 	--http-uwsgi-temp-path=/var/tmp/nginx/uwsgi
 
 NGINX_CONF_OPTS += \
-	$(if $(BR2_PACKAGE_NGINX_FILE_AIO),--with-file-aio)
+	$(if $(BR2_PACKAGE_NGINX_FILE_AIO),--with-file-aio) \
+	$(if $(BR2_PACKAGE_NGINX_THREADS),--with-threads)
 
 ifeq ($(BR2_PACKAGE_PCRE),y)
 NGINX_DEPENDENCIES += pcre
Signature · 1 line
2.7.4
#3 lore raw

PATCH 3/5 package/nginx: add thread pool support

Hello,

package/nginx/nginx.mk NGINX_CONF_OPTS += \ · line 68

Quoted 4 lines · Martin Bark

NGINX_CONF_OPTS += \

package/nginx/nginx.mk +2 -1
-	$(if $(BR2_PACKAGE_NGINX_FILE_AIO),--with-file-aio)
+	$(if $(BR2_PACKAGE_NGINX_FILE_AIO),--with-file-aio) \
+	$(if $(BR2_PACKAGE_NGINX_THREADS),--with-threads)

Just curious, any reason to not enable this as soon as BR2_TOOLCHAIN_HAS_THREADS=y ?

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#4 lore raw

PATCH 3/5 package/nginx: add thread pool support

Thomas,

Quoted 11 lines · Thomas Petazzoni

Hello,

package/nginx/nginx.mk NGINX_CONF_OPTS += \ · line 68

Quoted 4 lines · Martin Bark

NGINX_CONF_OPTS += \

package/nginx/nginx.mk +2 -1
-     $(if $(BR2_PACKAGE_NGINX_FILE_AIO),--with-file-aio)
+     $(if $(BR2_PACKAGE_NGINX_FILE_AIO),--with-file-aio) \
+     $(if $(BR2_PACKAGE_NGINX_THREADS),--with-threads)

Just curious, any reason to not enable this as soon as BR2_TOOLCHAIN_HAS_THREADS=y ?

Well it does add code so if you just want nginx as a static webserver on an embedded device you probably don't need this. Just for interest there is some info on nginx thread pools here
https://www.nginx.com/blog/thread-pools-boost-performance-9x/. I really just added the option for completeness.

What is missing is a dependency on BR2_TOOLCHAIN_HAS_THREADS for BR2_PACKAGE_NGINX_THREADS in the Config.in so I'll resubmit with that fixed.

Thanks

Martin

Quoted 6 lines

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

#5 lore raw

PATCH 4/5 package/nginx: add debug logging support

In reply to Martin Bark
---
 package/nginx/Config.in | 8 ++++++++
 package/nginx/nginx.mk  | 3 +++
 2 files changed, 11 insertions(+)
package/nginx/Config.in +8 -0
index bec83c3..bdbcbc6 100644
@@ -350,6 +350,14 @@ config BR2_PACKAGE_NGINX_STREAM_UPSTREAM_ZONE_MODULE
 
 endif #BR2_PACKAGE_NGINX_STREAM
 
+config BR2_PACKAGE_NGINX_DEBUG
+	bool "debug logging"
+	help
+	  Enable debug logging.  The debug level should be set with the error_log
+	  directive.  For example
+
+	  error_log /var/log/nginx/error.log debug;
+
 comment "misc. modules"
 
 config BR2_PACKAGE_NGINX_SELECT_MODULE
package/nginx/nginx.mk +3 -0
index 91772b3..c1e8367 100644
@@ -226,6 +226,9 @@ NGINX_CONF_OPTS += \
 
 endif # BR2_PACKAGE_NGINX_STREAM
 
+# Debug logging
+NGINX_CONF_OPTS += $(if $(BR2_PACKAGE_NGINX_DEBUG),--with-debug)
+
 define NGINX_DISABLE_WERROR
 	$(SED) 's/-Werror//g' -i $(@D)/auto/cc/*
 endef
Signature · 1 line
2.7.4
#6 lore raw

PATCH 5/5 package/nginx: fix error is nginx.service

In reply to Martin Bark

When using systemd nginx fails to start with the error

/usr/bin/mkdir: invalid option -- 't'

This is due to a missing space before the semicolon in nginx.service. For systemd to handle multiple commands in ExecStartPre it requires the semicolon to be a separate word. This commit adds the missing space.

---
 package/nginx/nginx.service | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/nginx/nginx.service +1 -1
index 619755f..2ea4ff7 100644
@@ -5,7 +5,7 @@ After=syslog.target network.target
 [Service]
 Type=forking
 PIDFile=/var/run/nginx.pid
-ExecStartPre=/usr/bin/mkdir -p /var/log/nginx /var/tmp/nginx; /usr/sbin/nginx -t -q -g 'pid /var/run/nginx.pid; daemon on; master_process on;'
+ExecStartPre=/usr/bin/mkdir -p /var/log/nginx /var/tmp/nginx ; /usr/sbin/nginx -t -q -g 'pid /var/run/nginx.pid; daemon on; master_process on;'
 ExecStart=/usr/sbin/nginx -g 'pid /var/run/nginx.pid; daemon on; master_process on;'
 ExecReload=/usr/sbin/nginx -g 'pid /var/run/nginx.pid; daemon on; master_process on;' -s reload
 ExecStop=/usr/sbin/nginx -g 'pid /var/run/nginx.pid;' -s quit
Signature · 1 line
2.7.4
#7 lore raw

PATCH 5/5 package/nginx: fix error is nginx.service

Hello,

package/nginx/nginx.service After=syslog.target network.target · line 8

Quoted 2 lines · Martin Bark
package/nginx/nginx.service +1 -1
-ExecStartPre=/usr/bin/mkdir -p /var/log/nginx /var/tmp/nginx; /usr/sbin/nginx -t -q -g 'pid /var/run/nginx.pid; daemon on; master_process on;'
+ExecStartPre=/usr/bin/mkdir -p /var/log/nginx /var/tmp/nginx ; /usr/sbin/nginx -t -q -g 'pid /var/run/nginx.pid; daemon on; master_process on;'

Isn't:

ExecStartPre=/usr/bin/mkdir -p /var/log/nginx /var/tmp/nginx ExecStartPre=/usr/sbin/nginx -t -q -g 'pid /var/run/nginx.pid; daemon on; master_process on;'

a better solution?

According to man systemd.service:

ExecStartPre=, ExecStartPost=
Additional commands that are executed before or after the command in ExecStart=, respectively. Syntax is the same as for ExecStart=, except that multiple command lines are allowed and the commands are executed one after the other, serially.

(To be tested, I don't know much about systemd).

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#8 lore raw

PATCH 5/5 package/nginx: fix error is nginx.service

Thomas,

Quoted 9 lines · Thomas Petazzoni

Hello,

package/nginx/nginx.service After=syslog.target network.target · line 8

Quoted 2 lines · Martin Bark
package/nginx/nginx.service +1 -1
-ExecStartPre=/usr/bin/mkdir -p /var/log/nginx /var/tmp/nginx; /usr/sbin/nginx -t -q -g 'pid /var/run/nginx.pid; daemon on; master_process on;'
+ExecStartPre=/usr/bin/mkdir -p /var/log/nginx /var/tmp/nginx ; /usr/sbin/nginx -t -q -g 'pid /var/run/nginx.pid; daemon on; master_process on;'

Isn't:

Quoted 4 lines

ExecStartPre=/usr/bin/mkdir -p /var/log/nginx /var/tmp/nginx ExecStartPre=/usr/sbin/nginx -t -q -g 'pid /var/run/nginx.pid; daemon on; master_process on;'

a better solution?

Yes you are right, that will work and i agree it looks neater. I'll update the patch and resubmit.

Thanks

Martin

Quoted 18 lines

According to man systemd.service:

ExecStartPre=, ExecStartPost=
Additional commands that are executed before or after the command in ExecStart=, respectively. Syntax is the same as for ExecStart=, except that multiple command lines are allowed and the commands are executed one after the other, serially.

(To be tested, I don't know much about systemd).

Thanks!

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

#9 lore raw

PATCH 1/5 package/nginx: bump version to 1.10.0

In reply to Martin Bark

Hello,

Quoted 3 lines · Martin Bark
 # mail modules
 ifeq ($(BR2_PACKAGE_NGINX_MAIL),y)
+NGINX_CONF_OPTS += --with-mail

Is this directly related to the bump?

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#10 lore raw

PATCH 1/5 package/nginx: bump version to 1.10.0

Thomas,

Quoted 9 lines · Thomas Petazzoni

Hello,

Quoted 3 lines · Martin Bark
 # mail modules
 ifeq ($(BR2_PACKAGE_NGINX_MAIL),y)
+NGINX_CONF_OPTS += --with-mail

Is this directly related to the bump?

I just tested 1.8.1 and it seems enabling BR2_PACKAGE_NGINX_MAIL does not cause the mail modules to get built. So --with-mail is missing from the existing 1.8.1 code too. Do you want me to split this into a separate patch and resubmit?

Thanks

Martin

Quoted 6 lines

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

#11 lore raw

PATCH 1/5 package/nginx: bump version to 1.10.0

In reply to Martin Bark

Hi Martin,
Martin Bark wrote,

Quoted 5 lines

The ngx_http_spdy_module has been superseded by the ngx_http_v2_module so BR2_PACKAGE_NGINX_HTTP_SPDY_MODULE has changed to BR2_PACKAGE_NGINX_HTTP_V2_MODULE

Could you check on sparc? I think nginx depends nowadays on some atomics which aren't available for sparc32.
Could you take care of it? There are autobuild failures...

best regards
Waldemar

#12 lore raw

PATCH 1/5 package/nginx: bump version to 1.10.0

Waldemar,

Quoted 7 lines · Waldemar Brodkorb

Hi Martin,
Martin Bark wrote,

Quoted 4 lines

The ngx_http_spdy_module has been superseded by the ngx_http_v2_module so BR2_PACKAGE_NGINX_HTTP_SPDY_MODULE has changed to BR2_PACKAGE_NGINX_HTTP_V2_MODULE

Quoted 5 lines
Quoted 1 line

Could you check on sparc? I think nginx depends nowadays on some atomics which aren't available for sparc32.
Could you take care of it? There are autobuild failures...

I just ran a quick test and 1.10.0 shows the same errors on sparc as 1.8.1 does. I'll have a look at fixing it.

Thanks

Martin

Quoted 3 lines

best regards
Waldemar