Fix compatiblity with Vagrant 1.9.1.
This commit is contained in:
parent
bc962f4758
commit
a700e9f2d1
@ -4,7 +4,7 @@
|
||||
|
||||
Name: %{vagrant_plugin_name}
|
||||
Version: 0.0.37
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: libvirt provider for Vagrant
|
||||
Group: Development/Languages
|
||||
License: MIT
|
||||
@ -16,17 +16,17 @@ Source0: https://rubygems.org/gems/%{vagrant_plugin_name}-%{version}.gem
|
||||
Source2: https://github.com/mitchellh/vagrant-spec/archive/%{vagrant_spec_commit}/vagrant-spec-%{vagrant_spec_commit}.tar.gz
|
||||
|
||||
|
||||
Requires(posttrans): vagrant
|
||||
Requires(preun): vagrant
|
||||
Requires: ruby(release)
|
||||
Requires: ruby(rubygems)
|
||||
Requires: rubygem(fog-libvirt) >= 0.3.0
|
||||
Requires: rubygem(nokogiri) >= 1.6
|
||||
Requires: rubygem(nokogiri) < 2
|
||||
Requires: vagrant
|
||||
# Vagrant changed packaging scriptlets in version 1.9.1.
|
||||
Requires: vagrant >= 1.9.1
|
||||
# Required by "vagrant package" command (rhbz#1292217).
|
||||
Recommends: %{_bindir}/virt-sysprep
|
||||
BuildRequires: vagrant
|
||||
BuildRequires: vagrant >= 1.9.1
|
||||
BuildRequires: rubygem(bundler)
|
||||
BuildRequires: rubygem(rdoc)
|
||||
BuildRequires: rubygem(rspec) < 3
|
||||
BuildRequires: rubygem(fog-libvirt)
|
||||
@ -50,7 +50,7 @@ Documentation for %{name}.
|
||||
%prep
|
||||
gem unpack %{SOURCE0}
|
||||
|
||||
%setup -q -D -T -n %{vagrant_plugin_name}-%{version}
|
||||
%setup -q -D -T -n %{vagrant_plugin_name}-%{version} -b2
|
||||
|
||||
gem spec %{SOURCE0} -l --ruby > %{vagrant_plugin_name}.gemspec
|
||||
|
||||
@ -68,8 +68,6 @@ cp -a .%{vagrant_plugin_dir}/* \
|
||||
%{buildroot}%{vagrant_plugin_dir}/
|
||||
|
||||
%check
|
||||
tar xvzf %{S:2} -C ..
|
||||
|
||||
# Remove the git reference, which is useless in our case.
|
||||
sed -i '/git/ s/^/#/' ../vagrant-spec-%{vagrant_spec_commit}/vagrant-spec.gemspec
|
||||
|
||||
@ -82,7 +80,7 @@ pushd .%{vagrant_plugin_instdir}
|
||||
# https://github.com/bundler/bundler/issues/5263
|
||||
sed -i '/gem.*vagrant-libvirt/ s/^/#/' Gemfile
|
||||
|
||||
sed -i "s|:git => '.*'$|:path => '%{vagrant_dir}'|" Gemfile
|
||||
sed -i "s|, :git => '.*'$||" Gemfile
|
||||
sed -i "s|:github => '.*',$|:path => '%{_builddir}/vagrant-spec-%{vagrant_spec_commit}',|" Gemfile
|
||||
sed -i '/pry/ s/^/#/' Gemfile
|
||||
|
||||
@ -90,15 +88,9 @@ sed -i '/pry/ s/^/#/' Gemfile
|
||||
sed -i '/coveralls/ s/^/#/' Gemfile
|
||||
sed -i '/[cC]overalls/ s/^/#/' spec/spec_helper.rb
|
||||
|
||||
bundle exec rspec2 spec
|
||||
GEM_PATH=%{vagrant_plugin_dir}:`ruby -e "print Gem.path.join(':')"` bundle exec rspec2 spec
|
||||
popd
|
||||
|
||||
%posttrans
|
||||
%vagrant_plugin_register %{vagrant_plugin_name}
|
||||
|
||||
%preun
|
||||
%vagrant_plugin_unregister %{vagrant_plugin_name}
|
||||
|
||||
%files
|
||||
%dir %{vagrant_plugin_instdir}
|
||||
%exclude %{vagrant_plugin_instdir}/.*
|
||||
@ -120,6 +112,9 @@ popd
|
||||
%{vagrant_plugin_instdir}/vagrant-libvirt.gemspec
|
||||
|
||||
%changelog
|
||||
* Mon Feb 13 2017 Vít Ondruch <vondruch@redhat.com> - 0.0.37-3
|
||||
- Fix compatiblity with Vagrant 1.9.1.
|
||||
|
||||
* Mon Feb 06 2017 Vít Ondruch <vondruch@redhat.com> - 0.0.37-2
|
||||
- Use file dependency rather then package dependency.
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user