summaryrefslogtreecommitdiff
path: root/www-servers/puma
diff options
context:
space:
mode:
Diffstat (limited to 'www-servers/puma')
-rw-r--r--www-servers/puma/Manifest2
-rw-r--r--www-servers/puma/files/puma-3.12.1-ruby26-waitpid.patch47
-rw-r--r--www-servers/puma/files/puma-3.12.5-cve-2020-11077.patch114
3 files changed, 0 insertions, 163 deletions
diff --git a/www-servers/puma/Manifest b/www-servers/puma/Manifest
index becef025f34e..daf73c5f430d 100644
--- a/www-servers/puma/Manifest
+++ b/www-servers/puma/Manifest
@@ -1,5 +1,3 @@
-AUX puma-3.12.1-ruby26-waitpid.patch 1722 BLAKE2B cee9b9e89cf098a387481d754732f54274ce0f9580568e62496513d58d46578f81c13df2aa98d2da218bf9d8ad581e8728ff60be488905493e9acc6b88012a88 SHA512 86f826d7f9ac8a50d62f8cf2b87b0df5f7ce55c1a5e4ac7b928b756ece809e30750bb2a7c3c50dc95f9edcb463e9c453b5d3eb84ffe44952904200b5337351ad
-AUX puma-3.12.5-cve-2020-11077.patch 3490 BLAKE2B 08f103ed5a5cf9878404f04c139476c730f7a663681aa6cc0107c033317826ed803b72b384034b08b361ed7c99683fe3d90d51c5f97708647750db9edf59e15c SHA512 25f26889e74c98e5ee45dbdb2dad356099d15c70027f32fa2500e0f5b40d742d376b7f29560dde985c3652064f6bdec8dd411154301f6c89b1ef356632570c29
DIST puma-5.3.2.tar.gz 297673 BLAKE2B e3bfa38347526063587db966d20ea68f32cd88616d89b5f2d9152228d5d420b50c2918e24304c1bc8119af5790a2464f0a055ab92862a56262013ddbba006a1f SHA512 32e80b413184d371d451a35985a371a7655df0f7e81624f2a05e3cf65c2e1b035275a8e25ab03d13c9c1f921ec30cdeb3659e1201baae5940dcb3edcb525ff25
EBUILD puma-5.3.2-r1.ebuild 1844 BLAKE2B 50310a07c3e6556f5037dd3d4fdff779b4e4ebe62cff105dc5f916af588eda62d8b2cd302747ac6e528a4ccbc41a22392ef43757608a2feadd3f53241a3c818f SHA512 320ff5bca4e37ced62da5f8ce0c42aa1ac2cb6aa76e8ede8405762871e04ea785cc15786e2d9d424df08a7f8531cf76d2776bb6a7210affc8d2967d7567887d6
MISC metadata.xml 709 BLAKE2B f0a69d0e7f4c5e593ff5648b51de393610f579fd9fff372749fca4491e8dd57b7e853f87104e8b86f8e90013fe54f8c3141e28ae87d17432e60f329f51a67db6 SHA512 dd872907d8e164d0b63f1b4db076d9407c33581ae80ecafb119904ceebe4c05eb74d01d51c3217cf475faf02d3732e9854553fc980c1b054c42b95af58ee1c0e
diff --git a/www-servers/puma/files/puma-3.12.1-ruby26-waitpid.patch b/www-servers/puma/files/puma-3.12.1-ruby26-waitpid.patch
deleted file mode 100644
index b28c69fa4d4b..000000000000
--- a/www-servers/puma/files/puma-3.12.1-ruby26-waitpid.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From b94c3e34faff024a5b1930af36e4d64bd6dde57f Mon Sep 17 00:00:00 2001
-From: MSP-Greg <MSP-Greg@users.noreply.github.com>
-Date: Fri, 15 Mar 2019 17:26:20 -0500
-Subject: [PATCH] Puma::Cluster#stop_workers - use WNOHANG with nil return
- tests
-
-Ruby 2.6 introduced a bug that affects worker shutdown (waitpid).
-
-Added code using Process::WNOHANG along with needed logic. Adds worker status (via $?) and total shutdown time to log.
-
-Co-authored-by: MSP-Greg <greg.mpls@gmail.com>
-Co-authored-by: guilleiguaran <guilleiguaran@gmail.com>
----
- lib/puma/cluster.rb | 20 +++++++++++++++++++-
- 1 file changed, 19 insertions(+), 1 deletion(-)
-
-diff --git a/lib/puma/cluster.rb b/lib/puma/cluster.rb
-index 93d65131..0879c96c 100644
---- a/lib/puma/cluster.rb
-+++ b/lib/puma/cluster.rb
-@@ -37,7 +37,25 @@ def stop_workers
- @workers.each { |x| x.term }
-
- begin
-- @workers.each { |w| Process.waitpid(w.pid) }
-+ if RUBY_VERSION < '2.6'
-+ @workers.each { |w| Process.waitpid(w.pid) }
-+ else
-+ # below code is for a bug in Ruby 2.6+, above waitpid call hangs
-+ t_st = Process.clock_gettime(Process::CLOCK_MONOTONIC)
-+ pids = @workers.map(&:pid)
-+ loop do
-+ pids.reject! do |w_pid|
-+ if Process.waitpid(w_pid, Process::WNOHANG)
-+ log " worker status: #{$?}"
-+ true
-+ end
-+ end
-+ break if pids.empty?
-+ sleep 0.5
-+ end
-+ t_end = Process.clock_gettime(Process::CLOCK_MONOTONIC)
-+ log format(" worker shutdown time: %6.2f", t_end - t_st)
-+ end
- rescue Interrupt
- log "! Cancelled waiting for workers"
- end
diff --git a/www-servers/puma/files/puma-3.12.5-cve-2020-11077.patch b/www-servers/puma/files/puma-3.12.5-cve-2020-11077.patch
deleted file mode 100644
index 4d26da28eee8..000000000000
--- a/www-servers/puma/files/puma-3.12.5-cve-2020-11077.patch
+++ /dev/null
@@ -1,114 +0,0 @@
-From 089df0727ffab1b3b69f2e6da40597c52e346013 Mon Sep 17 00:00:00 2001
-From: Evan Phoenix <evan@phx.io>
-Date: Tue, 19 May 2020 15:20:10 -0700
-Subject: [PATCH] Reduce ambiguity of headers
-
----
- ext/puma_http11/http11_parser.c | 4 +++-
- ext/puma_http11/http11_parser.rl | 4 +++-
- lib/puma/server.rb | 31 +++++++++++++++++++++++++++++++
- 3 files changed, 37 insertions(+), 2 deletions(-)
-
-diff --git a/ext/puma_http11/http11_parser.c b/ext/puma_http11/http11_parser.c
-index 453f8cd40..e8844a37e 100644
---- a/ext/puma_http11/http11_parser.c
-+++ b/ext/puma_http11/http11_parser.c
-@@ -14,12 +14,14 @@
-
- /*
- * capitalizes all lower-case ASCII characters,
-- * converts dashes to underscores.
-+ * converts dashes to underscores, and underscores to commas.
- */
- static void snake_upcase_char(char *c)
- {
- if (*c >= 'a' && *c <= 'z')
- *c &= ~0x20;
-+ else if (*c == '_')
-+ *c = ',';
- else if (*c == '-')
- *c = '_';
- }
-diff --git a/ext/puma_http11/http11_parser.rl b/ext/puma_http11/http11_parser.rl
-index 880c1d40b..62452ba7c 100644
---- a/ext/puma_http11/http11_parser.rl
-+++ b/ext/puma_http11/http11_parser.rl
-@@ -12,12 +12,14 @@
-
- /*
- * capitalizes all lower-case ASCII characters,
-- * converts dashes to underscores.
-+ * converts dashes to underscores, and underscores to commas.
- */
- static void snake_upcase_char(char *c)
- {
- if (*c >= 'a' && *c <= 'z')
- *c &= ~0x20;
-+ else if (*c == '_')
-+ *c = ',';
- else if (*c == '-')
- *c = '_';
- }
-diff --git a/lib/puma/server.rb b/lib/puma/server.rb
-index d870b383f..5b2cd94df 100644
---- a/lib/puma/server.rb
-+++ b/lib/puma/server.rb
-@@ -665,6 +665,37 @@ def handle_request(req, lines)
- }
- end
-
-+ # Fixup any headers with , in the name to have _ now. We emit
-+ # headers with , in them during the parse phase to avoid ambiguity
-+ # with the - to _ conversion for critical headers. But here for
-+ # compatibility, we'll convert them back. This code is written to
-+ # avoid allocation in the common case (ie there are no headers
-+ # with , in their names), that's why it has the extra conditionals.
-+
-+ to_delete = nil
-+ to_add = nil
-+
-+ env.each do |k,v|
-+ if k.start_with?("HTTP_") and k.include?(",") and k != "HTTP_TRANSFER,ENCODING"
-+ if to_delete
-+ to_delete << k
-+ else
-+ to_delete = [k]
-+ end
-+
-+ unless to_add
-+ to_add = {}
-+ end
-+
-+ to_add[k.gsub(",", "_")] = v
-+ end
-+ end
-+
-+ if to_delete
-+ to_delete.each { |k| env.delete(k) }
-+ env.merge! to_add
-+ end
-+
- # A rack extension. If the app writes #call'ables to this
- # array, we will invoke them when the request is done.
- #
-From 0a3c09a0603857f088571d0eb69e0b9adee0fed1 Mon Sep 17 00:00:00 2001
-From: Evan Phoenix <evan@phx.io>
-Date: Tue, 19 May 2020 15:34:06 -0700
-Subject: [PATCH] Adjust test to match real world value
-
----
- test/test_puma_server.rb | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/test/test_puma_server.rb b/test/test_puma_server.rb
-index 9d40cd5f3..375eca399 100644
---- a/test/test_puma_server.rb
-+++ b/test/test_puma_server.rb
-@@ -137,6 +137,7 @@ def test_default_server_port
-
- req = Net::HTTP::Get.new("/")
- req['HOST'] = "example.com"
-+ req['X-FORWARDED-PROTO'] = "https,http"
-
- res = Net::HTTP.start @host, @server.connected_port do |http|
- http.request(req)