[rubygem-thin] Update to thin 1.5.0.

Vít Ondruch vondruch at fedoraproject.org
Fri Mar 1 14:41:24 UTC 2013


commit 5c5b69d08de45334931803225e510fb2faf6a7ad
Author: Vít Ondruch <vondruch at redhat.com>
Date:   Fri Mar 1 15:41:04 2013 +0100

    Update to thin 1.5.0.

 .gitignore                              |    2 +
 rubygem-thin-fix-parser-load-path.patch |   11 ----
 rubygem-thin-rspec2-null-object.patch   |    4 +-
 rubygem-thin.spec                       |   97 ++++++++++++------------------
 sources                                 |    3 +-
 5 files changed, 45 insertions(+), 72 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 680b2cc..106e4cf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,5 @@ thin-1.2.5.gem
 /thin-1.2.8.gem
 /thin-1.2.11.gem
 /thin-1.3.1.gem
+/thin-1.5.0-tests.tgz
+/thin-1.5.0.gem
diff --git a/rubygem-thin-rspec2-null-object.patch b/rubygem-thin-rspec2-null-object.patch
index fca3ef4..23f8201 100644
--- a/rubygem-thin-rspec2-null-object.patch
+++ b/rubygem-thin-rspec2-null-object.patch
@@ -20,10 +20,10 @@
    it do
 --- a/spec/connection_spec.rb
 +++ b/spec/connection_spec.rb
-@@ -2,7 +2,7 @@
- 
+@@ -3,7 +3,7 @@
  describe Connection do
    before do
+     EventMachine.stub(:send_data)
 -    @connection = Connection.new(mock('EM', :null_object => true))
 +    @connection = Connection.new(mock('EM').as_null_object)
      @connection.post_init
diff --git a/rubygem-thin.spec b/rubygem-thin.spec
index 30afc7f..a55d5e7 100644
--- a/rubygem-thin.spec
+++ b/rubygem-thin.spec
@@ -2,13 +2,15 @@
 
 Summary: A thin and fast web server
 Name: rubygem-%{gem_name}
-Version: 1.3.1
-Release: 6%{?dist}
+Version: 1.5.0
+Release: 1%{?dist}
 Group: Development/Languages
-License: (GPLv2 or Ruby) and BSD and MIT
+License: (GPLv2 or Ruby) and MIT
 URL: http://code.macournoyer.com/thin/
-Source0: http://gems.rubyforge.org/gems/%{gem_name}-%{version}.gem
-Patch0: rubygem-thin-fix-parser-load-path.patch
+Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
+# git clone https://github.com/macournoyer/thin.git && cd thin && git checkout v1.5.0
+# tar czvf thin-1.5.0-tests.tgz spec/
+Source1: %{gem_name}-%{version}-tests.tgz
 # https://github.com/macournoyer/thin/issues/77
 Patch1: rubygem-thin-remove-rspec1-require.patch
 Patch2: rubygem-thin-rspec2-null-object.patch
@@ -23,10 +25,7 @@ Requires: curl
 BuildRequires: ruby(release)
 BuildRequires: ruby-devel
 BuildRequires: rubygems-devel
-BuildRequires: curl
-BuildRequires: libcurl-devel
-BuildRequires: rubygem(rake-compiler)
-BuildRequires: rubygem(rspec-core)
+BuildRequires: rubygem(rspec)
 BuildRequires: rubygem(eventmachine) >= 0.12.6
 BuildRequires: rubygem(daemons) >= 1.0.9
 BuildRequires: rubygem(rack) >= 1.0.0
@@ -51,38 +50,29 @@ Documentation for %{name}
 %setup -q -c -T
 %gem_install -n %{SOURCE0}
 
-pushd .%{gem_instdir}
-%patch0
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-
 %build
 
 %install
-rm -rf %{buildroot}
-mkdir -p %{buildroot}%{ruby_vendorarchdir}/%{gem_name}
 mkdir -p %{buildroot}%{gem_dir}
-mkdir -p %{buildroot}%{_prefix}
-cp -a ./%{gem_dir}/* %{buildroot}%{gem_dir}
-mv -f %{buildroot}%{gem_libdir}/*.so %{buildroot}%{ruby_vendorarchdir}/
-mv -f %{buildroot}%{gem_dir}/bin %{buildroot}%{_prefix}
-for f in $(find %{buildroot}%{gem_instdir} -name \*.rb); do
-  sed -i -e '/^#!/d' $f
-  chmod 0644 $f
-done
-find %{buildroot}%{gem_instdir} -type f -exec sed -i 's/^#!\/usr\/local\/bin\/ruby/#!\/usr\/bin\/ruby/g' {} \;
-chmod +x %{buildroot}%{gem_libdir}/thin/controllers/service.sh.erb
-rm -rf %{buildroot}%{gem_instdir}/{ext,tmp}/
-rm -f %{buildroot}%{gem_instdir}/{.autotest,.require_paths}
+cp -pa .%{gem_dir}/* \
+        %{buildroot}%{gem_dir}/
+
+mkdir -p %{buildroot}%{gem_extdir_mri}/lib
+# TODO: move the extensions
+mv %{buildroot}%{gem_libdir}/*.so %{buildroot}%{gem_extdir_mri}/lib/
+
+mkdir -p %{buildroot}%{_bindir}
+cp -pa .%{_bindir}/* \
+        %{buildroot}%{_bindir}/
+
+find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
+
 
 %check
-# https://bugzilla.redhat.com/show_bug.cgi?id=566401
-%ifarch ppc64
-exit 0
-%endif
 pushd .%{gem_instdir}
 
+tar xzvf %{SOURCE1}
+
 # Depends on rubygem-benchmark_unit, not available in Fedora yet.
 rm -rf spec/perf
 # Test fails.
@@ -93,15 +83,19 @@ rm spec/server/pipelining_spec.rb
 # http://rubyforge.org/tracker/?func=detail&aid=29450&group_id=524&atid=2086
 ruby -ne "print unless (99..117).include? $." spec/daemonizing_spec.rb > spec/daemonizing_spec.rb
 
+cat %{PATCH1} | patch -p1
+cat %{PATCH2} | patch -p1
+cat %{PATCH3} | patch -p1
+
 rspec spec
 
 popd
 
 %files
+%{gem_instdir}/README.md
 %{_bindir}/%{gem_name}
-%{ruby_vendorarchdir}/thin_parser.so
-%dir %{gem_instdir}/
-%{gem_instdir}/bin/
+%dir %{gem_instdir}
+%{gem_instdir}/bin
 %dir %{gem_libdir}
 %{gem_libdir}/thin.rb
 %{gem_libdir}/rack/
@@ -109,36 +103,23 @@ popd
 %{gem_libdir}/thin/*.rb
 %{gem_libdir}/thin/backends/
 %{gem_libdir}/thin/controllers/
-%{gem_cache}
-%{gem_spec}
 # BSD
 %{gem_libdir}/thin/stats.html.erb
+%exclude %{gem_instdir}/ext
+%{gem_extdir_mri}
+%exclude %{gem_cache}
+%{gem_spec}
 
 %files doc
 %{gem_docdir}
-%{gem_instdir}/benchmark/
-%{gem_instdir}/tasks/
 %{gem_instdir}/example/
 %{gem_instdir}/CHANGELOG
-%{gem_instdir}/README
 %{gem_instdir}/Rakefile
-%dir %{gem_instdir}/spec/
-%{gem_instdir}/spec/backends/
-%{gem_instdir}/spec/*.rb
-%{gem_instdir}/spec/configs/
-%{gem_instdir}/spec/controllers/
-%{gem_instdir}/spec/perf/
-%{gem_instdir}/spec/rack/
-%{gem_instdir}/spec/request/
-%{gem_instdir}/spec/server/
-%dir %{gem_instdir}/spec/rails_app/
-%{gem_instdir}/spec/rails_app/app/
-%{gem_instdir}/spec/rails_app/config/
-%{gem_instdir}/spec/rails_app/script/
-# MIT
-%{gem_instdir}/spec/rails_app/public/
 
 %changelog
+* Thu Feb 28 2013 Vít Ondruch <vondruch at redhat.com> - 1.5.0-1
+- Update to thin 1.5.0.
+
 * Thu Feb 28 2013 Vít Ondruch <vondruch at redhat.com> - 1.3.1-6
 - Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
 
@@ -184,11 +165,11 @@ popd
 * Wed Sep 08 2010 Michal Fojtik <mfojtik at redhat.com> - 1.2.7-1
 - Updated to upstream version
 
-* Tue Feb 04 2010 Michal Fojtik <mfojtik at redhat.com> - 1.2.5-5
+* Thu Feb 04 2010 Michal Fojtik <mfojtik at redhat.com> - 1.2.5-5
 - Excluded ppc64 in tests (566401)
 - Fixed Licensing
 
-* Tue Feb 03 2010 Michal Fojtik <mfojtik at redhat.com> - 1.2.5-4
+* Wed Feb 03 2010 Michal Fojtik <mfojtik at redhat.com> - 1.2.5-4
 - Added rspec tests
 - Fixed unwanted recompilation
 - Fixed licensing
diff --git a/sources b/sources
index 726c20f..877a602 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
-cf179ba7e0b443eb1c82c38f6586b684  thin-1.3.1.gem
+d7ee25c7f947151b93501668c53e2d34  thin-1.5.0-tests.tgz
+2f011aba841da210e49d09b85130dfc0  thin-1.5.0.gem


More information about the scm-commits mailing list