diff --git a/0001-Fix-maximum_connections-limiting-test.patch b/0001-Fix-maximum_connections-limiting-test.patch new file mode 100644 index 0000000000000000000000000000000000000000..23ad3d7ed4f13329bcc2db1764a53774df5d4ea9 --- /dev/null +++ b/0001-Fix-maximum_connections-limiting-test.patch @@ -0,0 +1,37 @@ +From b7876b29c46fccd711638073a66d9c2ea76af4fe Mon Sep 17 00:00:00 2001 +From: maminjie +Date: Fri, 19 Mar 2021 14:15:32 +0800 +Subject: [PATCH] Fix maximum_connections limiting test + +reference to: https://github.com/macournoyer/thin/pull/360 +--- + spec/server_spec.rb | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/spec/server_spec.rb b/spec/server_spec.rb +index 40747cc..25fb48a 100644 +--- a/spec/server_spec.rb ++++ b/spec/server_spec.rb +@@ -16,9 +16,10 @@ describe Server do + # connections, so we cannot really run this test under that + # condition. + pending("only for non-root users") if Process.euid == 0 +- @server.maximum_connections = 100_000 ++ maximum_connnections = 1_000_000 ++ @server.maximum_connections = maximum_connnections + @server.config +- @server.maximum_connections.should < 100_000 ++ @server.maximum_connections.should <= maximum_connnections + end + + it "should default to non-threaded" do +@@ -102,4 +103,4 @@ describe Server, "initialization" do + Server.should_not_receive(:setup_signals) + Server.new(:signals => false) + end +-end +\ No newline at end of file ++end +-- +2.23.0 + diff --git a/rubygem-thin.spec b/rubygem-thin.spec index 3217bb105f509cddfd85a2775be5a6db6f48ede4..5a4573115b90b1852150cd6f708b5f006ad0e18d 100644 --- a/rubygem-thin.spec +++ b/rubygem-thin.spec @@ -1,7 +1,7 @@ %global gem_name thin Name: rubygem-%{gem_name} Version: 1.7.2 -Release: 1 +Release: 2 Summary: A thin and fast web server License: (GPLv2+ or Ruby) and BSD and MIT URL: https://rubygems.org/gems/%{gem_name}/versions/%{version} @@ -10,6 +10,7 @@ Source1: https://github.com/macournoyer/thin/archive/v%{version}.tar # Fix the test suite error due to way Ruby 2.5 reports warnings. # https://github.com/macournoyer/thin/pull/346 Patch0: rubygem-thin-1.7.2-Mock-Kernel.warn-in-Ruby-2.5-compatible-way.patch +Patch1: 0001-Fix-maximum_connections-limiting-test.patch BuildRequires: ruby(release) rubygems-devel ruby-devel gcc rubygem(rspec2) BuildRequires: rubygem(eventmachine) >= 1.0.4 rubygem(daemons) >= 1.0.9 rubygem(rack) >= 1.0.0 %description @@ -54,6 +55,7 @@ pushd .%{gem_instdir} tar xzvf %{SOURCE1} cp -r thin-%{version}/spec spec cat %{PATCH0} | patch -p1 +cat %{PATCH1} | patch -p1 find spec/perf -name "*_spec.rb" -exec \ sed -i '/be_faster_then/ i \ pending' {} \; sed -i -r "/'should (force )?kill process in pid file'/a \ pending" \ @@ -82,5 +84,8 @@ popd %{gem_instdir}/Rakefile %changelog +* Fri Mar 19 2021 maminjie - 1.7.2-2 +- Fix maximum_connections limiting test + * Sat Aug 22 2020 tuShenmei - 1.7.2-1 - package init