Gentoo Archives: gentoo-commits

From: Hans de Graaff <graaff@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-servers/puma/, www-servers/puma/files/
Date: Thu, 31 Mar 2022 06:15:31
Message-Id: 1648707315.d124ed2d374838aef21c00ba42fc97d28db8e6ca.graaff@gentoo
1 commit: d124ed2d374838aef21c00ba42fc97d28db8e6ca
2 Author: Hans de Graaff <graaff <AT> gentoo <DOT> org>
3 AuthorDate: Thu Mar 31 06:15:15 2022 +0000
4 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
5 CommitDate: Thu Mar 31 06:15:15 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d124ed2d
7
8 www-servers/puma: add 5.6.4
9
10 Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>
11
12 www-servers/puma/Manifest | 1 +
13 .../puma/files/puma-5.6.4-logwriter-test.patch | 14 +++++
14 www-servers/puma/puma-5.6.4.ebuild | 61 ++++++++++++++++++++++
15 3 files changed, 76 insertions(+)
16
17 diff --git a/www-servers/puma/Manifest b/www-servers/puma/Manifest
18 index 7f1978fba022..31e207e4d223 100644
19 --- a/www-servers/puma/Manifest
20 +++ b/www-servers/puma/Manifest
21 @@ -1,2 +1,3 @@
22 DIST puma-5.5.2.tar.gz 302778 BLAKE2B 5911accde19aaed34cffecc71eb2db02f0d9f9ea7b57437ff7cf7580b0b51245ed68b254778cbdc11bea624b9f192aef0bfa7e24acde73b77290d780ab177933 SHA512 9887b465c6ed2a8e551b15fd161f19a9d2baa96b8eb8e247f13c98df9d34f6097bce81a52e8f88d69088d9b5f8477137af9110b7546afabc53767f337ad00ef8
23 DIST puma-5.6.2.tar.gz 309057 BLAKE2B 21a8c02f5fdfd23863a525987b55fbdb5c6b42d550cd8bb4580a78faf0206db42ee9b98409ce7b881dfad43bf5d31d202e228e3a62f0327083f043e22de32b3a SHA512 e08ebb968cb139136d11cfb12f7ebef7f4cafcbf3f26cf229c063aa0e55769ba8c4bc1df1dd9e04a4969d6f423cae1a09ce87e154315c9df80d61ec56b6f96e7
24 +DIST puma-5.6.4.tar.gz 310770 BLAKE2B 124190a0ca791352d055f833caec470be3be910ec4dbae5dc6860b79f5c678566f9bada3c6cf1066bc12f040ab891e9ea1a1da3188a9715db7643ef8d8f6b26f SHA512 6321a08e99be1023a1216466914416fbc91f5436ecccec4ea4cbfdc9c4ebc4979f93894ae12b72654269b0410d6a3053230806b860cb912c1abdf89766683a27
25
26 diff --git a/www-servers/puma/files/puma-5.6.4-logwriter-test.patch b/www-servers/puma/files/puma-5.6.4-logwriter-test.patch
27 new file mode 100644
28 index 000000000000..75086f76f027
29 --- /dev/null
30 +++ b/www-servers/puma/files/puma-5.6.4-logwriter-test.patch
31 @@ -0,0 +1,14 @@
32 +--- a/test/test_request_invalid.rb.orig 2022-03-31 08:02:24.833118111 +0200
33 ++++ b/test/test_request_invalid.rb 2022-03-31 08:02:41.897215442 +0200
34 +@@ -35,9 +35,8 @@
35 + [200, {}, [body]]
36 + }
37 +
38 +- @log_writer = Puma::LogWriter.strings
39 +- events = Puma::Events.new
40 +- @server = Puma::Server.new app, @log_writer, events
41 ++ events = Puma::Events.new($stdout, $stderr)
42 ++ @server = Puma::Server.new app, events
43 + @port = (@server.add_tcp_listener @host, 0).addr[1]
44 + @server.run
45 + sleep 0.15 if Puma.jruby?
46
47 diff --git a/www-servers/puma/puma-5.6.4.ebuild b/www-servers/puma/puma-5.6.4.ebuild
48 new file mode 100644
49 index 000000000000..97be04bd98eb
50 --- /dev/null
51 +++ b/www-servers/puma/puma-5.6.4.ebuild
52 @@ -0,0 +1,61 @@
53 +# Copyright 1999-2022 Gentoo Authors
54 +# Distributed under the terms of the GNU General Public License v2
55 +
56 +EAPI=8
57 +
58 +USE_RUBY="ruby26 ruby27 ruby30"
59 +
60 +RUBY_FAKEGEM_GEMSPEC="puma.gemspec"
61 +
62 +RUBY_FAKEGEM_EXTENSIONS=(ext/puma_http11/extconf.rb)
63 +RUBY_FAKEGEM_EXTENSION_LIBDIR=lib/puma
64 +
65 +inherit ruby-fakegem
66 +
67 +DESCRIPTION="a simple, fast, threaded, and highly concurrent HTTP 1.1 server for Ruby/Rack"
68 +HOMEPAGE="https://puma.io/"
69 +SRC_URI="https://github.com/puma/puma/archive/v${PV}.tar.gz -> ${P}.tar.gz"
70 +
71 +LICENSE="BSD"
72 +SLOT="3"
73 +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86"
74 +IUSE=""
75 +
76 +DEPEND+=" dev-libs/openssl:0 test? ( net-misc/curl )"
77 +RDEPEND+=" dev-libs/openssl:0="
78 +
79 +PATCHES=( "${FILESDIR}/${P}-logwriter-test.patch" )
80 +
81 +ruby_add_bdepend "virtual/ruby-ssl
82 + test? ( dev-ruby/localhost dev-ruby/rack >=dev-ruby/minitest-5.9:5 >=dev-ruby/test-unit-3.0:2 )"
83 +
84 +ruby_add_rdepend "dev-ruby/nio4r:2"
85 +
86 +all_ruby_prepare() {
87 + sed -e '/bundler/ s:^:#:' \
88 + -e '/prove/ s:^:#:' \
89 + -e '/stub_const/ s:^:#:' \
90 + -i test/helper.rb || die
91 +
92 + # Avoid tests failing inconsistently
93 + sed -i -e '/test_bad_client/askip "inconsistent results"' test/test_web_server.rb || die
94 +
95 + # Avoid launcher tests since they make assumptions about bundler use
96 + rm -f test/test_launcher.rb test/test_worker_gem_independence.rb || die
97 +
98 + # Skip integration tests since they make a lot of assumptions about
99 + # the environment
100 + rm -f test/test_integration_* test/test_preserve_bundler_env.rb|| die
101 +
102 + # Avoid test that uses unpackaged stub_const
103 + sed -i -e '/test_shutdown_with_grace/,/^ end/ s:^:#:' test/test_thread_pool.rb || die
104 +
105 + sed -e 's/git ls-files --/find/' \
106 + -e 's:_relative ": "./:' \
107 + -i ${RUBY_FAKEGEM_GEMSPEC} || die
108 +}
109 +
110 +each_ruby_test() {
111 + einfo "Running test suite"
112 + ${RUBY} -Ilib:.:test -e "gem 'minitest', '~>5.9'; gem 'test-unit', '~>3.0'; require 'minitest/autorun'; Dir['test/**/*test_*.rb'].each{|f| require f}" || die
113 +}