[rubygem-net-ldap] Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0

Bohuslav Kabrda bkabrda at fedoraproject.org
Thu Mar 7 14:02:26 UTC 2013


commit 7dae855e08c5f86af8f76849046985d3aad0ef2a
Author: Bohuslav Kabrda <bkabrda at redhat.com>
Date:   Thu Mar 7 13:43:57 2013 +0100

    Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0

 rubygem-net-ldap-0.3.1-fix-test-encoding.patch |   17 +++++++++++++++++
 rubygem-net-ldap.spec                          |   22 +++++++++++-----------
 2 files changed, 28 insertions(+), 11 deletions(-)
---
diff --git a/rubygem-net-ldap-0.3.1-fix-test-encoding.patch b/rubygem-net-ldap-0.3.1-fix-test-encoding.patch
new file mode 100644
index 0000000..b10d8d9
--- /dev/null
+++ b/rubygem-net-ldap-0.3.1-fix-test-encoding.patch
@@ -0,0 +1,17 @@
+commit 578d1bc2ec7ed18b06a9dc39ebeb7a41b4bf25cd
+Author: Bohuslav Kabrda <bkabrda at redhat.com>
+Date:   Thu Mar 7 14:39:43 2013 +0100
+
+    Update test_snmp.rb
+    
+    In Ruby 2.0, all files are in UTF8 by default, so the SnmpGetRequest* variables get transformed into Unicode sequences and tests fail. This PR simply fixes this by using us-ascii coding for this file.
+
+diff --git a/test/test_snmp.rb b/test/test_snmp.rb
+index 88a619d..b21ec66 100644
+--- a/test/test_snmp.rb
++++ b/test/test_snmp.rb
+@@ -1,3 +1,4 @@
++# coding: us-ascii
+ # $Id: testsnmp.rb 231 2006-12-21 15:09:29Z blackhedd $
+ 
+ require 'common'
diff --git a/rubygem-net-ldap.spec b/rubygem-net-ldap.spec
index c0ccc3e..93ab052 100644
--- a/rubygem-net-ldap.spec
+++ b/rubygem-net-ldap.spec
@@ -1,16 +1,16 @@
 # Generated from net-ldap-0.2.2.gem by gem2rpm -*- rpm-spec -*-
 %global gem_name net-ldap
-%global rubyabi 1.9.1
 
 Summary: Net::LDAP for Ruby implements client access LDAP protocol
 Name: rubygem-%{gem_name}
 Version: 0.3.1
-Release: 3%{?dist}
+Release: 4%{?dist}
 Group: Development/Languages
 License: MIT
 URL: http://net-ldap.rubyforge.org/
 Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
-Requires: ruby(abi) = %{rubyabi}
+Patch0: %{name}-0.3.1-fix-test-encoding.patch
+Requires: ruby(release)
 Requires: ruby(rubygems) 
 BuildRequires: rubygems-devel
 # specs need metaid gem that is not in Fedora yet
@@ -50,16 +50,13 @@ Documentation for %{name}
 
 %prep
 %setup -q -c -T
+%gem_install -n %{SOURCE0}
+
+pushd .%{gem_instdir}
+%patch0 -p1
+popd
 
 %build
-mkdir -p .%{gem_dir}
-gem install -V \
-        --local \
-        --install-dir ./%{gem_dir} \
-        --bindir ./%{_bindir} \
-        --force \
-        --rdoc \
-        %{SOURCE0}
 
 %install
 mkdir -p %{buildroot}%{gem_dir}
@@ -96,6 +93,9 @@ popd
 %{gem_instdir}/testserver
 
 %changelog
+* Thu Mar 07 2013 Bohuslav Kabrda <bkabrda at redhat.com> - 0.3.1-4
+- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
+
 * Thu Feb 14 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.3.1-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
 


More information about the scm-commits mailing list