94e6c85
%global bashcompletion_dir %(pkg-config --variable=completionsdir bash-completion 2> /dev/null || :)
da831a8
Josef Stribny 107fa56
%global vagrant_spec_commit f1a18fd3e5387328ca83e016e48373aadb67112a
4bc2b64
94e6c85
Name: vagrant
Josef Stribny 107fa56
Version: 1.7.4
9c79a2b
Release: 4%{?dist}
da831a8
Summary: Build and distribute virtualized development environments
da831a8
Group: Development/Languages
da831a8
License: MIT
da831a8
URL: http://vagrantup.com
Josef Stribny 107fa56
# wget https://github.com/mitchellh/vagrant/archive/v1.7.4/vagrant-1.7.4.tar.gz
94e6c85
Source0: https://github.com/mitchellh/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
da831a8
# Upstream binstub with adjusted paths, the offical way how to run vagrant
da831a8
Source1: binstub
4bc2b64
# The library has no official release yet. But since it is just test
4bc2b64
# dependency, it should be fine to include the source right here.
Josef Stribny 107fa56
# wget https://github.com/mitchellh/vagrant-spec/archive/f1a18fd3e5387328ca83e016e48373aadb67112a/vagrant-spec-f1a18fd3e5387328ca83e016e48373aadb67112a.tar.gz
4bc2b64
Source2: https://github.com/mitchellh/%{name}-spec/archive/%{vagrant_spec_commit}/%{name}-spec-%{vagrant_spec_commit}.tar.gz
c11853f
# Monkey-patching needed for Vagrant to work until the respective patches
c11853f
# for RubyGems and Bundler are in place
c11853f
Source3: patches.rb
e30c952
Source4: macros.vagrant
126c957
a0e92dc
# The load directive is supported since RPM 4.12, i.e. F21+. The build process
a0e92dc
# fails on older Fedoras.
a0e92dc
%{?load:%{SOURCE4}}
a0e92dc
Josef Stribny 107fa56
Patch0: vagrant-1.7.4-fix-dependencies.patch
cc85749
Josef Stribny 107fa56
# Install plugins in isolation
Josef Stribny 107fa56
# https://github.com/mitchellh/vagrant/pull/5877
Josef Stribny 107fa56
Patch1: vagrant-1.7.4-install-plugins-in-isolation.patch
6c7285a
386d4c8
# Fix Bundler 1.10.6 compatibility.
386d4c8
# https://github.com/mitchellh/vagrant/commit/3b3de6e2e510227e47a0b1bf46cba10c553a2152
386d4c8
Patch2: vagrant-1.7.4-Support-Bundler-1.10.6.patch
386d4c8
Josef Stribny 63cd41b
# Don't use biosdevname if missing in Fedora guest
Josef Stribny 63cd41b
Patch3: vagrant-1.7.4-dont-require-biosdevname-fedora.patch
Josef Stribny 63cd41b
da831a8
Requires: ruby(release)
da831a8
Requires: ruby(rubygems) >= 1.3.6
7dc35cc
# Explicitly specify MRI, since Vagrant does not work with JRuby ATM.
94e6c85
Requires: ruby
eaf8b60
# rb-inotify should be installed by listen, but this dependency was removed
eaf8b60
# in Fedora's package.
eaf8b60
Requires: rubygem(rb-inotify)
da831a8
Requires: rubygem(bundler) >= 1.5.2
386d4c8
Requires: rubygem(bundler) <= 1.10.6
da831a8
Requires: rubygem(hashicorp-checkpoint) >= 0.1.1
Josef Stribny 107fa56
Requires: rubygem(hashicorp-checkpoint) < 0.2
da831a8
Requires: rubygem(childprocess) >= 0.5.0
Josef Stribny 107fa56
Requires: rubygem(childprocess) < 0.6
da831a8
Requires: rubygem(erubis) >= 2.7.0
Josef Stribny 107fa56
Requires: rubygem(erubis) < 2.8
da831a8
Requires: rubygem(i18n) >= 0.6.0
Josef Stribny 107fa56
Requires: rubygem(listen) >= 3.0.2
Josef Stribny 107fa56
Requires: rubygem(listen) < 3.1
Josef Stribny 107fa56
Requires: rubygem(log4r) >= 1.1.9
Josef Stribny 107fa56
Requires: rubygem(log4r) < 1.1.11
da831a8
Requires: rubygem(net-ssh) >= 2.6.6
Josef Stribny 107fa56
Requires: rubygem(net-ssh) < 2.10
da831a8
Requires: rubygem(net-scp) >= 1.1.0
23151d9
Requires: rubygem(nokogiri) >= 1.6
Josef Stribny 107fa56
Requires: rubygem(net-sftp) >= 2.1
Josef Stribny 107fa56
Requires: rubygem(net-sftp) < 2.2
Josef Stribny 107fa56
Requires: rubygem(rest-client) < 2.0
94e6c85
Requires: bsdtar
ff40c83
Requires: curl
da831a8
241e0dc
Recommends: vagrant(vagrant-libvirt)
241e0dc
e9f28ac
Requires(pre): shadow-utils
da831a8
0c8a413
BuildRequires: bsdtar
9889749
BuildRequires: ruby
b06fc4b
BuildRequires: rubygem(listen)
b06fc4b
BuildRequires: rubygem(childprocess)
b06fc4b
BuildRequires: rubygem(hashicorp-checkpoint)
b06fc4b
BuildRequires: rubygem(log4r)
b06fc4b
BuildRequires: rubygem(net-ssh)
b06fc4b
BuildRequires: rubygem(net-scp)
b06fc4b
BuildRequires: rubygem(nokogiri)
b06fc4b
BuildRequires: rubygem(i18n)
b06fc4b
BuildRequires: rubygem(erubis)
0c8a413
BuildRequires: rubygem(rb-inotify)
a977236
BuildRequires: rubygem(rspec) < 3
b06fc4b
BuildRequires: rubygem(bundler)
7ed4ada
BuildRequires: rubygem(net-sftp)
7ed4ada
BuildRequires: rubygem(rest-client)
386d4c8
BuildRequires: rubygem(thor)
7ed4ada
BuildRequires: rubygem(webmock)
7ca98ed
BuildRequires: rubygem(fake_ftp)
94e6c85
BuildRequires: pkgconfig(bash-completion)
da831a8
BuildArch: noarch
da831a8
da831a8
%description
da831a8
Vagrant is a tool for building and distributing virtualized development
da831a8
environments.
da831a8
da831a8
%package doc
da831a8
Summary: Documentation for %{name}
da831a8
Group: Documentation
da831a8
Requires: %{name} = %{version}-%{release}
da831a8
BuildArch: noarch
da831a8
da831a8
%description doc
da831a8
Documentation for %{name}.
da831a8
da831a8
%prep
da831a8
%setup -q
cc85749
94e6c85
%patch0 -p1
2b3ea01
%patch1 -p1
386d4c8
%patch2 -p1
Josef Stribny 63cd41b
%patch3 -p1
da831a8
da831a8
%build
da831a8
da831a8
%install
94e6c85
mkdir -p %{buildroot}%{vagrant_dir}
da831a8
cp -pa ./* \
94e6c85
        %{buildroot}%{vagrant_dir}/
da831a8
94e6c85
find %{buildroot}%{vagrant_dir}/bin -type f | xargs chmod a+x
cc85749
420d9e2
rm %{buildroot}%{vagrant_dir}/{CHANGELOG,CONTRIBUTING,README}.md
420d9e2
rm %{buildroot}%{vagrant_dir}/LICENSE
da831a8
94e6c85
# Provide executable similar to upstream:
94e6c85
# https://github.com/mitchellh/vagrant-installers/blob/master/substrate/modules/vagrant_installer/templates/vagrant.erb
94e6c85
install -D -m 755 %{SOURCE1} %{buildroot}%{_bindir}/vagrant
94e6c85
sed -i 's|@vagrant_dir@|%{vagrant_dir}|' %{buildroot}%{_bindir}/vagrant
a0e92dc
sed -i 's|@vagrant_plugin_conf_dir@|%{vagrant_plugin_conf_dir}|' %{buildroot}%{_bindir}/vagrant
da831a8
da831a8
# auto-completion
94e6c85
install -D -m 0644 %{buildroot}%{vagrant_dir}/contrib/bash/completion.sh \
94e6c85
  %{buildroot}%{bashcompletion_dir}/%{name}
9889749
sed -i '/#!\// d' %{buildroot}%{bashcompletion_dir}/%{name}
da831a8
da831a8
# create the global home dir
a0e92dc
install -d -m 755 %{buildroot}%{vagrant_plugin_conf_dir}
da831a8
c11853f
# Install the monkey-patch file and load it from Vagrant after loading RubyGems
c11853f
cp %{SOURCE3}  %{buildroot}%{vagrant_dir}/lib/vagrant
c11853f
sed -i -e "11irequire 'vagrant/patches'" %{buildroot}%{vagrant_dir}/lib/vagrant.rb
c11853f
126c957
# Install Vagrant macros
126c957
mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d/
126c957
cp %{SOURCE4} %{buildroot}%{_rpmconfigdir}/macros.d/
a0e92dc
sed -i "s/%%{name}/%{name}/" %{buildroot}%{_rpmconfigdir}/macros.d/macros.%{name}
126c957
9889749
# Make sure the plugins.json exists when we define
9889749
# it as a ghost file further down - will not be packaged.
9889749
touch %{buildroot}%{_sharedstatedir}/%{name}/plugins.json
9889749
96d7878
# Prepare vagrant plugins directory structure.
96d7878
for i in \
96d7878
  %{vagrant_plugin_instdir} \
96d7878
  %{vagrant_plugin_cache} \
96d7878
  %{vagrant_plugin_spec} \
96d7878
  %{vagrant_plugin_docdir}
96d7878
do
96d7878
  mkdir -p `dirname %{buildroot}$i`
96d7878
done
96d7878
9889749
c11853f
0c8a413
%check
b2e913a
# Unpack the vagrant-spec and adjust the directory name.
cce3ed1
rm -rf ../vagrant-spec
0c8a413
tar xvzf %{S:2} -C ..
4bc2b64
mv ../vagrant-spec{-%{vagrant_spec_commit},}
0c8a413
0c8a413
# Remove the git reference, which is useless in our case.
0c8a413
sed -i '/git/ s/^/#/' ../vagrant-spec/vagrant-spec.gemspec
0c8a413
9e86321
# Relax the thor dependency, since Fedora ships with newer version.
9e86321
sed -i '/thor/ s/~>/>=/' ../vagrant-spec/vagrant-spec.gemspec
9e86321
7ed4ada
#Insert new test dependencies
7ed4ada
sed -i '25 i\  spec.add_dependency "webmock"' ../vagrant-spec/vagrant-spec.gemspec
7ed4ada
sed -i '26 i\  spec.add_dependency "fake_ftp"' ../vagrant-spec/vagrant-spec.gemspec
7ed4ada
0c8a413
# TODO: winrm is not in Fedora yet.
0c8a413
rm -rf test/unit/plugins/communicators/winrm
0c8a413
sed -i '/it "eager loads WinRM" do/,/^      end$/ s/^/#/' test/unit/vagrant/machine_test.rb
0c8a413
sed -i '/it "should return the specified communicator if given" do/,/^    end$/ s/^/#/' test/unit/vagrant/machine_test.rb
0c8a413
0c8a413
bundle --local
0c8a413
0c8a413
# Test suite must be executed in order.
0c8a413
ruby -rbundler/setup -I.:lib -e 'Dir.glob("test/unit/**/*_test.rb").sort.each &method(:require)'
da831a8
da831a8
%pre
da831a8
getent group vagrant >/dev/null || groupadd -r vagrant
da831a8
 
da831a8
%files
420d9e2
%license LICENSE
9889749
%doc README.md
94e6c85
%{_bindir}/%{name}
420d9e2
%dir %{vagrant_dir}
420d9e2
%exclude %{vagrant_dir}/.*
420d9e2
%exclude %{vagrant_dir}/Vagrantfile
420d9e2
%{vagrant_dir}/bin
420d9e2
# TODO: Make more use of contribs.
420d9e2
%{vagrant_dir}/contrib
420d9e2
%exclude %{vagrant_dir}/contrib/bash
420d9e2
%{vagrant_dir}/vagrant.gemspec
420d9e2
%{vagrant_dir}/keys
420d9e2
%{vagrant_dir}/lib
420d9e2
%{vagrant_dir}/plugins
420d9e2
%exclude %{vagrant_dir}/scripts
420d9e2
%{vagrant_dir}/templates
420d9e2
%{vagrant_dir}/version.txt
420d9e2
%exclude %{vagrant_dir}/website
9889749
# TODO: This is suboptimal and may break, but can't see much better way ...
9889749
%dir %{dirname:%{bashcompletion_dir}}
9889749
%dir %{bashcompletion_dir}
94e6c85
%{bashcompletion_dir}/%{name}
94e6c85
%dir %{_sharedstatedir}/%{name}
94e6c85
%ghost %{_sharedstatedir}/%{name}/plugins.json
e30c952
%{_rpmconfigdir}/macros.d/macros.%{name}
da831a8
96d7878
# Explicitly include Vagrant plugins directory strucure to avoid accidentally
96d7878
# packaged content.
96d7878
%dir %{vagrant_plugin_dir}
96d7878
%dir %{dirname:%{vagrant_plugin_instdir}}
96d7878
%dir %{dirname:%{vagrant_plugin_cache}}
96d7878
%dir %{dirname:%{vagrant_plugin_spec}}
96d7878
%dir %{dirname:%{vagrant_plugin_docdir}}
96d7878
da831a8
%files doc
9889749
%doc CONTRIBUTING.md CHANGELOG.md
420d9e2
%{vagrant_dir}/Gemfile
420d9e2
%{vagrant_dir}/Rakefile
420d9e2
%{vagrant_dir}/tasks
420d9e2
%{vagrant_dir}/test
420d9e2
%{vagrant_dir}/vagrant-spec.config.example.rb
420d9e2
da831a8
da831a8
%changelog
9c79a2b
* Mon Feb 01 2016 Vít Ondruch <vondruch@redhat.com> - 1.7.4-4
9c79a2b
- Update the macros to keep them in sync with rubygems package.
9c79a2b
Josef Stribny 63cd41b
* Wed Oct 14 2015 Josef Stribny <jstribny@redhat.com> - 1.7.4-3
Josef Stribny 63cd41b
- Fix: Don't use biosdevname if missing in Fedora guest
Josef Stribny 63cd41b
386d4c8
* Tue Oct 13 2015 Vít Ondruch <vondruch@redhat.com> - 1.7.4-2
386d4c8
- Fix Bundler 1.10.6 compatibility.
241e0dc
- Recommends vagrant-libvirt installation by default.
386d4c8
Josef Stribny 107fa56
* Thu Aug 20 2015 Josef Stribny <jstribny@redhat.com> - 1.7.4-1
Josef Stribny 107fa56
- Update to 1.7.4
Josef Stribny 107fa56
- Patch: install plugins in isolation
Josef Stribny 107fa56
6c7285a
* Fri Jul 10 2015 Dan Williams <dcbw@redhat.com> - 1.7.2-9
6c7285a
- Allow matching interfaces on MAC address
6c7285a
Josef Stribny b9fa7a0
* Tue Jun 30 2015 Josef Stribny <jstribny@redhat.com> - 1.7.2-8
Josef Stribny b9fa7a0
- Fix NFS on Fedora
Josef Stribny b9fa7a0
Josef Stribny e9e992d
* Tue Jun 16 2015 Josef Stribny <jstribny@redhat.com> - 1.7.2-7
Josef Stribny e9e992d
- Fix: Remove docker0 from guest network interface enumeration
Josef Stribny e9e992d
Josef Stribny 56e7016
* Thu May 21 2015 Josef Stribny <jstribny@redhat.com> - 1.7.2-6
Josef Stribny 56e7016
- Fix: Support new Fedora releases
Josef Stribny 56e7016
- Fix: Don't try to use biosdevname if it's not installed
Josef Stribny 56e7016
Josef Stribny 72a2b9d
* Wed May 06 2015 Josef Stribny <jstribny@redhat.com> - 1.7.2-5
Josef Stribny 72a2b9d
- Export GEM_HOME based on VAGRANT_HOME
Josef Stribny 72a2b9d
Josef Stribny acfd0c3
* Tue May 05 2015 Josef Stribny <jstribny@redhat.com> - 1.7.2-4
Josef Stribny acfd0c3
- Include $USER path in binstub
Josef Stribny acfd0c3
2b3ea01
* Fri Feb 20 2015 Vít Ondruch <vondruch@redhat.com> - 1.7.2-3
2b3ea01
- Fix Puppet provisioning error available in 1.7.2 re-release.
2b3ea01
f0f8a70
* Fri Feb 20 2015 Michael Adam <madam@redhat.com> - 1.7.2-2
Michael Adam eec1243
- Add missing dependencies.
f0f8a70
7ed4ada
* Thu Feb 12 2015 Tomas Hrcka <thrcka@redhat.com> - 1.7.2-1
7ed4ada
- Update to latest upstream version 1.7.2
7ed4ada
- Backport dependencies fix patch
7ed4ada
- Remove permissions fix on mkdir.rb
7ed4ada
96d7878
* Mon Jan 26 2015 Vít Ondruch <vondruch@redhat.com> - 1.6.5-18
96d7878
- Prepare and own plugin directory structure.
96d7878
cce3ed1
* Thu Jan 22 2015 Michael Adam <madam@redhat.com> - 1.6.5-17
cce3ed1
- Fix %check in an unclean build environment.
b2e913a
- Fix typo.
cce3ed1
9889749
* Tue Jan 20 2015 Vít Ondruch <vondruch@redhat.com> - 1.6.5-16
9889749
- Minor review fixes.
9889749
9e86321
* Tue Dec 23 2014 Vít Ondruch <vondruch@redhat.com> - 1.6.5-15
9e86321
- Relax thor dependency to keep up with Fedora.
9e86321
e30c952
* Wed Nov 26 2014 Vít Ondruch <vondruch@redhat.com> - 1.6.5-14
e30c952
- Drop -devel sub-package.
e30c952
126c957
* Tue Nov 25 2014 Josef Stribny <jstribny@redhat.com> - 1.6.5-13
126c957
- Create -devel sub-package
126c957
c11853f
* Mon Nov 24 2014 Josef Stribny <jstribny@redhat.com> - 1.6.5-12
c11853f
- Include monkey-patching for RubyGems and Bundler for now
c11853f
94e6c85
* Wed Oct 22 2014 Vít Ondruch <vondruch@redhat.com> - 1.6.5-11
94e6c85
- Make vagrant non-rubygem package.
94e6c85
da831a8
* Tue Oct 14 2014 Josef Stribny <jstribny@redhat.com> - 1.6.5-10
da831a8
- rebuilt
da831a8
da831a8
* Tue Oct 07 2014 Josef Stribny <jstribny@redhat.com> - 1.6.5-9
da831a8
- Register vagrant-libvirt automatically
da831a8
da831a8
* Tue Sep 30 2014 Josef Stribny <jstribny@redhat.com> - 1.6.5-8
da831a8
- Set libvirt as a default provider
da831a8
da831a8
* Tue Sep 23 2014 Josef Stribny <jstribny@redhat.com> - 1.6.5-7
da831a8
- Require core dependencies for vagrant-libvirt beforehand
da831a8
da831a8
* Mon Sep 22 2014 Josef Stribny <jstribny@redhat.com> - 1.6.5-6
da831a8
- Fix SSL cert path for the downloader
da831a8
da831a8
* Tue Sep 16 2014 Josef Stribny <jstribny@redhat.com> - 1.6.5-5
da831a8
- rebuilt
da831a8
da831a8
* Tue Sep 16 2014 Josef Stribny <jstribny@redhat.com> - 1.6.5-4
da831a8
- rebuilt
da831a8
da831a8
* Sat Sep 13 2014 Josef Stribny <jstribny@redhat.com> - 1.6.5-3
da831a8
- Include libvirt requires for now
da831a8
da831a8
* Wed Sep 10 2014 Josef Stribny <jstribny@redhat.com> - 1.6.5-2
da831a8
- Add missing deps on Bundler and hashicorp-checkpoint
da831a8
da831a8
* Mon Sep 08 2014 Josef Stribny <jstribny@redhat.com> - 1.6.5-1
da831a8
* Update to 1.6.5
da831a8
da831a8
* Mon Sep 08 2014 Josef Stribny <jstribny@redhat.com> - 1.6.3-2
da831a8
- Clean up
da831a8
- Update to 1.6.3
da831a8
da831a8
* Fri Oct 18 2013  <adrahon@redhat.com> - 1.3.3-1.1
da831a8
- Misc bug fixes, no separate package for docs, /etc/vagrant management
da831a8
da831a8
* Tue Sep 24 2013  <adrahon@redhat.com> - 1.3.3-1
da831a8
- Initial package