[ruby-qpid/f17] BZ #769259 - update ruby-qpid to be compatible w/ ruby 1.9.3
Mo Morsi
mmorsi at fedoraproject.org
Mon Feb 13 17:55:46 UTC 2012
commit 1b6cc52fcc6d11a386c7ca4c00507ebf8c0628b5
Author: Mo Morsi <mmorsi at redhat.com>
Date: Mon Feb 13 12:48:16 2012 -0500
BZ #769259 - update ruby-qpid to be compatible w/ ruby 1.9.3
qpid-ruby-1.9-compat.patch | 29 +++++++++++++++++++++++++++++
ruby-qpid.spec | 14 ++++++++++----
2 files changed, 39 insertions(+), 4 deletions(-)
---
diff --git a/qpid-ruby-1.9-compat.patch b/qpid-ruby-1.9-compat.patch
new file mode 100644
index 0000000..b72cd37
--- /dev/null
+++ b/qpid-ruby-1.9-compat.patch
@@ -0,0 +1,29 @@
+--- ruby/ext/sasl/sasl.c.orig 2012-02-13 12:07:15.264625270 -0500
++++ ruby/ext/sasl/sasl.c 2012-02-13 12:08:05.071788382 -0500
+@@ -361,7 +361,7 @@ static VALUE qsasl_client_step(int argc,
+
+ do {
+ result = sasl_client_step(context->conn,
+- RSTRING(challenge)->ptr, RSTRING(challenge)->len,
++ RSTRING_PTR(challenge), RSTRING_LEN(challenge),
+ &interact, &response, &len);
+ if (result == SASL_INTERACT) {
+ qsasl_prompt(context, interact);
+@@ -417,7 +417,7 @@ static VALUE qsasl_encode(int argc, VALU
+ rb_raise(rb_eRuntimeError, "Wrong Number of Arguments");
+
+ result = sasl_encode(context->conn,
+- RSTRING(clearText)->ptr, RSTRING(clearText)->len,
++ RSTRING_PTR(clearText), RSTRING_LEN(clearText),
+ &outBuffer, &outSize);
+ if (result != SASL_OK)
+ rb_raise(rb_eRuntimeError, "sasl_encode failed: %d - %s",
+@@ -445,7 +445,7 @@ static VALUE qsasl_decode(int argc, VALU
+ rb_raise(rb_eRuntimeError, "Wrong Number of Arguments");
+
+ result = sasl_decode(context->conn,
+- RSTRING(cipherText)->ptr, RSTRING(cipherText)->len,
++ RSTRING_PTR(cipherText), RSTRING_LEN(cipherText),
+ &outBuffer, &outSize);
+ if (result != SASL_OK)
+ rb_raise(rb_eRuntimeError, "sasl_decode failed: %d - %s",
diff --git a/ruby-qpid.spec b/ruby-qpid.spec
index d259b36..74df159 100644
--- a/ruby-qpid.spec
+++ b/ruby-qpid.spec
@@ -1,6 +1,6 @@
Name: ruby-qpid
-Version: 0.8
-Release: 4%{?dist}
+Version: 0.8
+Release: 5%{?dist}
Summary: Ruby language client for AMQP
Group: Development/Ruby
@@ -9,6 +9,9 @@ URL: http://qpid.apache.org/
Source0: qpid-ruby-%{version}.tar.gz
# http://archive.apache.org/dist/qpid/0.8/qpid-ruby-0.8.tar.gz
+# updates ruby-qpid to be compatible w/ ruby 1.9
+Patch0: qpid-ruby-1.9-compat.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%{!?ruby_sitelib: %define ruby_sitelib %(ruby -rrbconfig -e 'puts Config::CONFIG["sitelibdir"]')}
@@ -22,7 +25,7 @@ BuildRequires: rubygem-rake
BuildRequires: cyrus-sasl-devel
Requires: ruby
-Requires: ruby(abi) = 1.8
+Requires: ruby(abi) = 1.9
Requires: cyrus-sasl
Provides: ruby(qpid) = %{version}
@@ -32,6 +35,7 @@ The Apache Qpid project's Ruby language client for AMQP.
%prep
%setup -q -n qpid-%{version}/ruby
+%patch0 -p1
%build
rake build
@@ -42,7 +46,6 @@ install -dm 755 $RPM_BUILD_ROOT%{ruby_sitelib}/qpid
install -pm 644 lib/qpid/*.rb $RPM_BUILD_ROOT%{ruby_sitelib}/qpid
install -dm 755 $RPM_BUILD_ROOT%{ruby_sitearch}
install -dm 755 $RPM_BUILD_ROOT%{ruby_sitelib}/qpid/spec_cache
-install -pm 644 lib/qpid/spec_cache/*.rb_marshal $RPM_BUILD_ROOT%{ruby_sitelib}/qpid/spec_cache
install -pm 644 lib/qpid.rb $RPM_BUILD_ROOT%{ruby_sitelib}
install -pm 755 ext/sasl/sasl.so $RPM_BUILD_ROOT%{ruby_sitearch}
# to quiet rpmlint warning
@@ -59,6 +62,9 @@ rm -rf $RPM_BUILD_ROOT
%doc LICENSE.txt NOTICE.txt RELEASE_NOTES
%changelog
+* Mon Feb 13 2012 Mo Morsi <mo at morsi.org> - 0.8-5
+- ruby 1.9.3 compatability (added patch)
+
* Mon Feb 13 2012 Mo Morsi <mo at morsi.org> - 0.8-4
- BZ #783845 specs dir should not be removed as it is needed by the runtime
More information about the scm-commits
mailing list