[rubygem-boxgrinder-build/f15] Added patch that fixes one test failing when executed on a system with HW virt support, removed unne
Marek Goldmann
goldmann at fedoraproject.org
Tue Jun 28 17:56:30 UTC 2011
commit 6570f9db0f1d11ba1a7a34bb8f9c5989e2182eaa
Author: Marek Goldmann <marek.goldmann at gmail.com>
Date: Tue Jun 28 19:47:35 2011 +0200
Added patch that fixes one test failing when executed on a system with HW virt support, removed unnecessary dependencies.
rubygem-boxgrinder-build-0.9.3-tests.patch | 11 ++
rubygem-boxgrinder-build.spec | 37 +++--
spec_rubygems_require.patch | 231 ----------------------------
3 files changed, 33 insertions(+), 246 deletions(-)
---
diff --git a/rubygem-boxgrinder-build-0.9.3-tests.patch b/rubygem-boxgrinder-build-0.9.3-tests.patch
new file mode 100644
index 0000000..93750fa
--- /dev/null
+++ b/rubygem-boxgrinder-build-0.9.3-tests.patch
@@ -0,0 +1,11 @@
+diff -Naur boxgrinder-boxgrinder-build-7ac5151/spec/helpers/guestfs-helper-spec.rb boxgrinder-boxgrinder-build-7ac5151-work/spec/helpers/guestfs-helper-spec.rb
+--- boxgrinder-boxgrinder-build-7ac5151/spec/helpers/guestfs-helper-spec.rb 2011-06-28 19:27:41.000000000 +0200
++++ boxgrinder-boxgrinder-build-7ac5151-work/spec/helpers/guestfs-helper-spec.rb 2011-06-28 18:46:58.000000000 +0200
+@@ -269,6 +269,7 @@
+ it "should return false if we're NOT on EC2 and AMI id retrieval raised an exception" do
+ URI.should_receive(:parse).with('http://169.254.169.254/latest/meta-data/ami-id').and_return('parsed')
+ Net::HTTP.should_receive(:get_response).with("parsed").and_raise "Boom"
++ @helper.should_receive(:`).with("egrep '^flags.*(vmx|svm)' /proc/cpuinfo | wc -l").and_return("0")
+ @helper.hw_virtualization_available?.should == false
+ end
+ end
diff --git a/rubygem-boxgrinder-build.spec b/rubygem-boxgrinder-build.spec
index dea8604..135fd76 100644
--- a/rubygem-boxgrinder-build.spec
+++ b/rubygem-boxgrinder-build.spec
@@ -6,18 +6,17 @@
Summary: A tool for creating appliances from simple plain text files
Name: rubygem-%{gemname}
Version: 0.9.3
-Release: 1%{?dist}
+Release: 2%{?dist}
Group: Development/Languages
License: LGPLv3+
URL: http://boxgrinder.org/
Source0: http://rubygems.org/gems/%{gemname}-%{version}.gem
+Patch0: %{name}-%{version}-tests.patch
Requires: ruby(abi) = %{rubyabi}
Requires: rubygem(boxgrinder-core) >= 0.3.0
Requires: rubygem(boxgrinder-core) < 0.4.0
Requires: ruby-libguestfs
-Requires: parted
-Requires: e2fsprogs
# Fix for rubygem-aws package
Requires: rubygem(activesupport)
@@ -59,11 +58,6 @@ BuildRequires: rubygem(progressbar)
Requires: appliance-tools
Requires: yum-utils
-# EC2
-Requires: rsync
-Requires: wget
-Requires: util-linux
-
# ElasticHosts
Requires: rubygem(rest-client)
@@ -102,6 +96,18 @@ Requires:%{name} = %{version}-%{release}
Documentation for %{name}
%prep
+%setup -q -c -T
+rm -rf .%{gemdir}
+mkdir -p .%{gemdir}
+gem install --local --install-dir .%{gemdir} \
+ --force --rdoc %{SOURCE0}
+
+pushd .%{geminstdir}
+rm -rf integ/packages/*.rpm
+
+# Test fix
+%patch0 -p1
+popd
%build
@@ -113,15 +119,12 @@ mkdir -p %{_builddir}%{gemdir}
mkdir -p %{buildroot}/%{_bindir}
mkdir -p %{buildroot}/%{gemdir}
-/usr/bin/gem install --local --install-dir %{_builddir}%{gemdir} \
- --force --rdoc %{SOURCE0}
-mv %{_builddir}%{gemdir}/bin/* %{buildroot}/%{_bindir}
-find %{_builddir}%{geminstdir}/bin -type f | xargs chmod a+x
-rm -rf %{_builddir}/%{geminstdir}/integ/packages/*.rpm
-cp -r %{_builddir}%{gemdir}/* %{buildroot}/%{gemdir}
+mv .%{gemdir}/bin/* %{buildroot}/%{_bindir}
+find %{buildroot}/%{_bindir} -type f | xargs chmod a+x
+cp -r .%{gemdir}/* %{buildroot}/%{gemdir}
%check
-pushd %{_builddir}/%{geminstdir}
+pushd .%{geminstdir}
rake spec
popd
@@ -149,6 +152,10 @@ popd
%{gemdir}/doc/%{gemname}-%{version}
%changelog
+* Tue Jun 28 2011 Marek Goldmann <mgoldman at redhat.com> - 0.9.3-2
+- Added patch for one test
+- Removed unnecessary dependencies
+
* Tue Jun 28 2011 Marc Savy <msavy at redhat.com> - 0.9.3-1
- Upstream release: 0.9.3
- [BGBUILD-232] boxgrinder doesn't validate config early enough
More information about the scm-commits
mailing list