Skip to content

Commit

Permalink
Patch REE install with better net/http lib.
Browse files Browse the repository at this point in the history
  • Loading branch information
h3h committed May 6, 2010
1 parent ae3b529 commit 7c9ef21
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.markdown
Expand Up @@ -20,6 +20,7 @@ Perform the following on a build box as root.
## Get Necessary System-specific Configs

git clone git://github.com/causes/ree-centos.git
cp ree-centos/patches/* ~/rpmbuild/SOURCES/
cp ree-centos/spec/ruby-enterprise.spec ~/rpmbuild/SPECS/

## Build the RPM
Expand Down
13 changes: 13 additions & 0 deletions patches/net_http_socket_close.patch
@@ -0,0 +1,13 @@
Index: lib/net/http.rb
===================================================================
--- lib/net/http.rb (revision 26550)
+++ lib/net/http.rb (working copy)
@@ -1057,7 +1057,7 @@
res
rescue => exception
D "Conn close because of error #{exception}"
- @socket.close unless @socket.closed?
+ @socket.close if @socket and not @socket.closed?
raise exception
end

4 changes: 4 additions & 0 deletions spec/ruby-enterprise.spec
Expand Up @@ -8,13 +8,17 @@ Source: ruby-enterprise-%{version}-%{release}.tar.gz

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n)

Patch0: net_http_socket_close.patch

%description
Ruby Enterprise Edition is a copy-on-right friendly version of ruby that also
includes several performance patches.

%prep
%setup -q -n ruby-enterprise-%{version}-%{release}/source

%patch0 -p0

%build
./configure --prefix=/opt/ruby

Expand Down

0 comments on commit 7c9ef21

Please sign in to comment.