-
Notifications
You must be signed in to change notification settings - Fork 6
lib-nginx: upgrade to nginx 1.28.0 with stubbed Huffman support #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: staging
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| diff --git a/Config.uk b/Config.uk | ||
| index 3b907e8..2719b5d 100644 | ||
| --- a/Config.uk | ||
| +++ b/Config.uk | ||
| @@ -1,6 +1,6 @@ | ||
| menuconfig LIBNGINX | ||
| bool "libnginx - a HTTP and reverse proxy, a mail proxy, and a generic TCP/UDP proxy server" | ||
| - default n | ||
| + default y | ||
| select LIBUKSCHEDCOOP | ||
| select LIBPOSIX_LIBDL | ||
| select LIBPOSIX_PROCESS | ||
| diff --git a/Library.uk b/Library.uk | ||
| index fc1f309..c3a9d5d 100644 | ||
| --- a/Library.uk | ||
| +++ b/Library.uk | ||
| @@ -1,5 +1,5 @@ | ||
| name := "nginx" | ||
| description := "A HTTP and reverse proxy, a mail proxy, and a generic TCP/UDP proxy server." | ||
| homepage := "https://nginx.org/" | ||
| -version := 1.15.6 sha256:a3d8c67c2035808c7c0d475fffe263db8c353b11521aa7ade468b780ed826cc6 http://nginx.org/download/nginx-1.15.6.tar.gz | ||
| +version := 1.28.0 c6b5c6b086c0df9d3ca3ff5e084c1d0ef909e6038279c71c1c3e985f576ff76a http://nginx.org/download/nginx-1.28.0.tar.gz | ||
| license := "BSD-2-Clause" | ||
| diff --git a/Makefile.uk b/Makefile.uk | ||
| index 29db863..dfe367a 100644 | ||
| --- a/Makefile.uk | ||
| +++ b/Makefile.uk | ||
| @@ -42,7 +42,7 @@ $(eval $(call addlib_s,libnginx,$(CONFIG_LIBNGINX))) | ||
| ################################################################################ | ||
| # Sources | ||
| ################################################################################ | ||
| -LIBNGINX_VERSION = 1.15.6 | ||
| +LIBNGINX_VERSION = 1.28.0 | ||
| LIBNGINX_BASENAME = nginx-$(LIBNGINX_VERSION) | ||
| LIBNGINX_URL = http://nginx.org/download/$(LIBNGINX_BASENAME).tar.gz | ||
| LIBNGINX_PATCHDIR = $(LIBNGINX_BASE)/patches | ||
| @@ -180,8 +180,10 @@ LIBNGINX_SRCS-$(CONFIG_LIBNGINX_HTTP) += $(LIBNGINX_SRC)/http/modules/ngx_http_l | ||
| LIBNGINX_SRCS-$(CONFIG_LIBNGINX_HTTP) += $(LIBNGINX_SRC)/http/ngx_http_header_filter_module.c | ||
| LIBNGINX_SRCS-$(CONFIG_LIBNGINX_HTTP) += $(LIBNGINX_SRC)/http/modules/ngx_http_chunked_filter_module.c | ||
| LIBNGINX_SRCS-$(CONFIG_LIBNGINX_HTTP_V2) += $(LIBNGINX_SRC)/http/v2/ngx_http_v2_encode.c | ||
| -# Huffman encode/decode not supported | ||
| -LIBNGINX_SRCS-$(CONFIG_LIBNGINX_HTTP_V2) += $(LIBNGINX_SRC)/http/v2/ngx_http_v2_huff_decode.c | ||
| -LIBNGINX_SRCS-$(CONFIG_LIBNGINX_HTTP_V2) += $(LIBNGINX_SRC)/http/v2/ngx_http_v2_huff_encode.c | ||
| +# LIBNGINX_SRCS-$(CONFIG_LIBNGINX_HTTP_V2) += $(LIBNGINX_SRC)/http/v2/ngx_http_v2_huff_decode.c | ||
| +# LIBNGINX_SRCS-$(CONFIG_LIBNGINX_HTTP_V2) += $(LIBNGINX_SRC)/http/v2/ngx_http_v2_huff_encode.c | ||
| LIBNGINX_SRCS-$(CONFIG_LIBNGINX_HTTP_V2) += $(LIBNGINX_SRC)/http/v2/ngx_http_v2_table.c | ||
| LIBNGINX_SRCS-$(CONFIG_LIBNGINX_HTTP_V2) += $(LIBNGINX_SRC)/http/v2/ngx_http_v2.c | ||
| LIBNGINX_SRCS-$(CONFIG_LIBNGINX_HTTP_V2) += $(LIBNGINX_SRC)/http/v2/ngx_http_v2_filter_module.c | ||
| + | ||
| +# Stub replacements for huffman functions | ||
| +LIBNGINX_SRCS-y += $(LIBNGINX_BASE)/src/nginx_huff_stubs.cx | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| From 30557083a93221ea1e5817c60bad16d4bd13a16c Mon Sep 17 00:00:00 2001 | ||
| From: Mihai Pogonaru <[email protected]> | ||
| Date: Fri, 14 Jun 2019 01:31:43 +0300 | ||
| Subject: [PATCH] pthread-embedded does not allow semaphores shared between | ||
| processes | ||
|
|
||
| Signed-off-by: Mihai Pogonaru <[email protected]> | ||
| --- | ||
| src/core/ngx_shmtx.c | 2 +- | ||
| 1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
|
||
| diff --git a/src/core/ngx_shmtx.c b/src/core/ngx_shmtx.c | ||
| index a255903..6da5cab 100644 | ||
| --- a/src/core/ngx_shmtx.c | ||
| +++ b/src/core/ngx_shmtx.c | ||
| @@ -30,7 +30,7 @@ ngx_shmtx_create(ngx_shmtx_t *mtx, ngx_shmtx_sh_t *addr, u_char *name) | ||
|
|
||
| mtx->wait = &addr->wait; | ||
|
|
||
| - if (sem_init(&mtx->sem, 1, 0) == -1) { | ||
| + if (sem_init(&mtx->sem, 0, 0) == -1) { | ||
| ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, ngx_errno, | ||
| "sem_init() failed"); | ||
| } else { | ||
| -- | ||
| 2.11.0 | ||
|
|
||
|
Comment on lines
+1
to
+27
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you can just delete this if it is not needed anymore? |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| From 0c3c7ca3fec1f1e2b4d6c3b2739ece484ce4cb92 Mon Sep 17 00:00:00 2001 | ||
| From: Razvan Virtan <[email protected]> | ||
| Date: Tue, 20 Jul 2021 19:52:48 +0300 | ||
| Subject: [PATCH] Initialize nginx cached time structures | ||
|
|
||
| --- | ||
| src/core/ngx_times.c | 6 ++++++ | ||
| 1 file changed, 6 insertions(+) | ||
|
|
||
| diff --git a/src/core/ngx_times.c b/src/core/ngx_times.c | ||
| index 7964b00..ffb317f 100644 | ||
| --- a/src/core/ngx_times.c | ||
| +++ b/src/core/ngx_times.c | ||
| @@ -73,6 +73,12 @@ ngx_time_init(void) | ||
|
|
||
| ngx_cached_time = &cached_time[0]; | ||
|
|
||
| + ngx_cached_http_time.data = &cached_http_time[0][0]; | ||
| + ngx_cached_err_log_time.data = &cached_err_log_time[0][0]; | ||
| + ngx_cached_http_log_time.data = &cached_http_log_time[0][0]; | ||
| + ngx_cached_http_log_iso8601.data = &cached_http_log_iso8601[0][0]; | ||
| + ngx_cached_syslog_time.data = &cached_syslog_time[0][0]; | ||
| + | ||
| ngx_time_update(); | ||
| } | ||
|
|
||
| -- | ||
| 2.17.1 | ||
|
Comment on lines
+1
to
+28
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same with this |
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| --- a/src/http/v2/ngx_http_v2.c | ||
| +++ b/src/http/v2/ngx_http_v2.c | ||
| @@ -19,6 +19,9 @@ | ||
| #include <ngx_http_v2_module.h> | ||
| #include <ngx_http_request.h> | ||
|
|
||
| +// Forward declaration of stub | ||
| +extern ngx_int_t ngx_http_huff_decode_stub(u_char *, u_char *, size_t, u_char, ngx_uint_t, ngx_log_t *); | ||
| + | ||
| static ngx_http_v2_handler_pt ngx_http_v2_state[] = { | ||
| ngx_http_v2_state_head, | ||
| ngx_http_v2_state_head, | ||
| @@ -1583,7 +1586,7 @@ ngx_http_v2_state_field_huff(ngx_http_v2_connection_t *h2c, | ||
| u_char ch; | ||
| ngx_uint_t state = 0; | ||
|
|
||
| - rc = ngx_http_huff_decode(&state, pos, len, ch, lower, h2c->connection->log); | ||
| + rc = ngx_http_huff_decode_stub(&state, pos, len, ch, lower, h2c->connection->log); | ||
|
|
||
| if (rc != NGX_OK) { | ||
| return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_COMP_ERROR); | ||
| --- a/src/http/modules/ngx_http_grpc_module.c | ||
| +++ b/src/http/modules/ngx_http_grpc_module.c | ||
| @@ -10,6 +10,9 @@ | ||
| #include <ngx_http.h> | ||
| #include <ngx_http_grpc_module.h> | ||
|
|
||
| +// Forward declaration of stub | ||
| +extern ngx_int_t ngx_http_huff_decode_stub(u_char *, u_char *, size_t, u_char, ngx_uint_t, ngx_log_t *); | ||
| + | ||
| @@ -3201,7 +3204,7 @@ ngx_http_grpc_parse_fragment(ngx_http_request_t *r, ngx_http_grpc_ctx_t *ctx, ngx_buf_t *b) | ||
| // original call | ||
| - rc = ngx_http_huff_decode(&ctx->state, p, end - p, ch, 0, r->connection->log); | ||
| + rc = ngx_http_huff_decode_stub(&ctx->state, p, end - p, ch, 0, r->connection->log); | ||
| @@ -3310,7 +3313,7 @@ ngx_http_grpc_parse_fragment(ngx_http_request_t *r, ngx_http_grpc_ctx_t *ctx, ngx_buf_t *b) | ||
| // original call | ||
| - rc = ngx_http_huff_decode(&ctx->state, p, end - p, ch, 0, r->connection->log); | ||
| + rc = ngx_http_huff_decode_stub(&ctx->state, p, end - p, ch, 0, r->connection->log); | ||
|
Comment on lines
+1
to
+38
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will not work. You are declaring the stub to use instead, but you never defined them. Did you forget to commit a file? |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file doesn't really make sense. You created a patch for things already in the repository. Why not just change those?, why do a patch? How would this even apply.