package/nginx: fix mail modules not building
PATCH v2 1/6 package/nginx: fix mail modules not building
Add the missing --with-mail configure option
---
Changes v1 -> v2
- new in v2. split from the patch to bump nginx to 1.10.0 (suggested by Thomas Petazzoni)
--- package/nginx/nginx.mk | 1 + 1 file changed, 1 insertion(+)
package/nginx/nginx.mk +1 -0
@@ -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
PATCH v2 2/6 package/nginx: fix error is nginx.service
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 or the use of multiple ExecStartPre.
This commit splits the multiple commands into two ExecStartPre lines which fixes the error and improves readability.
---
Changes v1 -> v2
- Split single ExecStartPre into two ExecStartPre lines (suggested by Thomas Petazzoni)
- Reorder before bump to 1.10.0 as this happens in 1.8.1 too
--- package/nginx/nginx.service | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
package/nginx/nginx.service +2 -1
@@ -5,7 +5,8 @@ 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 +ExecStartPre=/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
PATCH v2 3/6 package/nginx: bump version to 1.10.0
In reply to Martin BarkThe 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
---
Changes v1 -> v2
- split setting --with-mail into separate patch
(suggested by Thomas Petazzoni)
--- 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 | 6 +++--- 5 files changed, 18 insertions(+), 14 deletions(-)
Config.in.legacy +9 -0
@@ -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
@@ -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
@@ -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
@@ -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 +3 -3
@@ -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)
Signature · 1 line
2.7.4
PATCH v2 4/6 package/nginx: add support for stream proxy modules
In reply to Martin Bark---
Changes v1 -> v2
- no changes
--- package/nginx/Config.in | 43 +++++++++++++++++++++++++++++++++++++++++++ package/nginx/nginx.mk | 18 ++++++++++++++++++ 2 files changed, 61 insertions(+)
package/nginx/Config.in +43 -0
@@ -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
@@ -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
PATCH v2 5/6 package/nginx: add thread pool support
In reply to Martin Bark---
Changes v1 -> v2
- Added depends on BR2_TOOLCHAIN_HAS_THREADS
--- package/nginx/Config.in | 7 +++++++ package/nginx/nginx.mk | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-)
package/nginx/Config.in +7 -0
@@ -18,6 +18,13 @@ config BR2_PACKAGE_NGINX_FILE_AIO depends on !BR2_aarch64 depends on !BR2_arc +config BR2_PACKAGE_NGINX_THREADS + bool "thread pool support" + depends on BR2_TOOLCHAIN_HAS_THREADS + +comment "thread pool support needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + config BR2_PACKAGE_NGINX_HTTP bool "http server" default y
package/nginx/nginx.mk +2 -1
@@ -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
PATCH v2 6/6 package/nginx: add debug logging support
In reply to Martin Bark---
Changes v1 -> v2
- no changes
--- package/nginx/Config.in | 8 ++++++++ package/nginx/nginx.mk | 3 +++ 2 files changed, 11 insertions(+)
package/nginx/Config.in +8 -0
@@ -354,6 +354,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
@@ -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
PATCH v2 1/6 package/nginx: fix mail modules not building
In reply to Martin BarkHello,
Quoted 11 lines · Martin Bark
Add the missing --with-mail configure option
Signed-off-by Martin Bark <[email protected]>---
Changes v1 -> v2
- new in v2. split from the patch to bump nginx to 1.10.0 (suggested by Thomas Petazzoni)--- package/nginx/nginx.mk | 1 + 1 file changed, 1 insertion(+)
Thanks, I've applied the entire series. On a few patches, I had to rewrap the Config.in help text so that it fits in 72 characters before applying.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com