From a0685eb211fa3f5f09fa49f7f31903df20cae155 Mon Sep 17 00:00:00 2001 From: Bohuslav Kabrda Date: Wed, 18 Apr 2012 11:00:17 +0200 Subject: Add the bigdecimal dependency to gemspec. --- activesupport-add-bigdecimal-dependency.patch | 16 ++++++++++++++++ rubygem-activesupport.spec | 14 +++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 activesupport-add-bigdecimal-dependency.patch diff --git a/activesupport-add-bigdecimal-dependency.patch b/activesupport-add-bigdecimal-dependency.patch new file mode 100644 index 0000000..55b0cb4 --- /dev/null +++ b/activesupport-add-bigdecimal-dependency.patch @@ -0,0 +1,16 @@ +diff --git a/specifications/activesupport-3.0.11.gemspec.orig b/specifications/activesupport-3.0.11.gemspec +index 0277593..ef9b71d 100644 +--- a/specifications/activesupport-3.0.11.gemspec.orig ++++ b/specifications/activesupport-3.0.11.gemspec +@@ -20,8 +20,11 @@ Gem::Specification.new do |s| + s.specification_version = 3 + + if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then ++ s.add_runtime_dependency("bigdecimal", ">= 0") + else ++ s.add_dependency("bigdecimal", ">= 0") + end + else ++ s.add_dependency("bigdecimal", ">= 0") + end + end diff --git a/rubygem-activesupport.spec b/rubygem-activesupport.spec index 2a57f67..b13b66d 100644 --- a/rubygem-activesupport.spec +++ b/rubygem-activesupport.spec @@ -7,7 +7,7 @@ Summary: Support and utility classes used by the Rails framework Name: rubygem-%{gem_name} Epoch: 1 Version: 3.0.11 -Release: 4%{?dist} +Release: 5%{?dist} Group: Development/Languages License: MIT URL: http://www.rubyonrails.org @@ -34,6 +34,11 @@ Patch2: activesupport-remove-memcache-build-dep.patch # https://bugzilla.redhat.com/show_bug.cgi?id=799275 Patch3: activesupport-CVE-2012-1098-safe-buffer-slice.patch +# We need to add the bigdecimal dependency to gemspec, otherwise it won't be +# loaded. The reason for this is unbundling it from ruby libdir and moving +# it under %%{gem_dir} (therefore if not in Gemfile, it won't be found). +Patch4: activesupport-add-bigdecimal-dependency.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: ruby(rubygems) Requires: ruby(abi) = %{rubyabi} @@ -71,6 +76,10 @@ pushd .%{gem_instdir} %patch3 -p2 popd +pushd .%{gem_dir} +%patch4 -p1 +popd + %build %install @@ -96,6 +105,9 @@ popd %changelog +* Wed Apr 18 2012 Bohuslav Kabrda - 1:3.0.11-5 +- Add the bigdecimal dependency to gemspec. + * Fri Mar 16 2012 Bohuslav Kabrda - 1:3.0.11-4 - The CVE patch name now contains the CVE id. -- cgit