2 # - release notes: https://github.com/mitchellh/vagrant/blob/master/CHANGELOG.md
3 Summary: Provisioning and deployment of virtual instances
8 Group: Applications/Emulators
9 Source0: https://github.com/mitchellh/vagrant/archive/v%{version}/%{name}-%{version}.tar.gz
10 # Source0-md5: 556b5e5594a327d46b63c4d8024db187
12 Patch1: rubygems.patch
13 Patch2: no-warning.patch
14 Patch3: Vagrantfile.patch
17 Patch6: checkpoint.patch
18 Patch7: insert-key.patch
20 Patch9: pld-chef-installed.patch
21 Patch10: pld-networking.patch
22 URL: http://www.vagrantup.com/
24 BuildRequires: rpm-rubyprov
25 BuildRequires: ruby > 1:2.0
27 BuildRequires: ruby-contest >= 0.1.2
28 BuildRequires: ruby-minitest >= 2.5.1
29 BuildRequires: ruby-mocha
30 BuildRequires: ruby-rake
31 BuildRequires: ruby-rspec >= 2.14.0
35 Requires: ruby-bundler >= 1.5.2
36 Requires: ruby-childprocess >= 0.5.0
37 Requires: ruby-erubis >= 2.7.0
38 Requires: ruby-i18n >= 0.6.0
40 Requires: ruby-listen >= 2.7.11
41 Requires: ruby-log4r < 1.1.11
42 Requires: ruby-log4r >= 1.1.9
43 Requires: ruby-net-scp >= 1.1.0
44 Requires: ruby-net-ssh < 2.9.0
45 Requires: ruby-net-ssh >= 2.6.6
46 Requires: ruby-rubygems
48 Suggests: VirtualBox-gui
52 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54 %define _appdir %{_datadir}/%{name}
55 %define bash_compdir %{_datadir}/bash-completion/completions
57 %define vg_home /home/vagrant
58 %define vg_root /vagrant
61 Vagrant offers scripted provisioning and deployment of virtual
62 instances. While VirtualBox is the main target, future versions may
63 support other hypervizors as well.
65 The vision of the project is to create a tool to transparently manage
66 all the complex parts of modern development within a virtual
67 environment without affecting the everyday workflow of the developer
68 too much. A long term goal is moving all development into virtualized
69 environments by making it easier to do so than not to. Additionally,
70 work is ongoing to have Vagrant run identically on every major
71 consumer OS platform (Linux, Mac OS X, and Windows).
73 %package -n bash-completion-%{name}
74 Summary: bash-completion for %{name}
75 Group: Applications/Shells
77 Requires: bash-completion >= 2.0
79 %description -n bash-completion-%{name}
80 bash-completion for %{name}.
83 Summary: Vagrant guest
84 Group: Development/Building
85 URL: http://docs-v1.vagrantup.com/v1/docs/base_boxes.html
86 Requires(postun): /usr/sbin/userdel
87 Requires(pre): /bin/id
88 Requires(pre): /usr/bin/getgid
89 Requires(pre): /usr/sbin/groupadd
90 Requires(pre): /usr/sbin/useradd
91 Requires: /etc/pld-release
92 Requires: kernel(vboxsf)
93 Requires: openssh-server
94 Requires: sudo >= 1.7.4p3-2
96 Provides: group(vagrant)
97 Provides: user(vagrant)
100 This is the package to be installed in Vagrant guest.
102 WARNING: This package installs insecure keypair to vagant user. Do not
103 install this package in a box that is accessible others but you.
105 These keys are the "insecure" public/private keypair we offer to base
106 box creators for use in their base boxes so that vagrant installations
107 can automatically SSH into the boxes.
109 See: <https://github.com/mitchellh/vagrant/tree/master/keys/>.
112 Summary: Documentation for %{name}
114 Requires: %{name} = %{version}-%{release}
117 Ruby documentation for %{gem_name}
132 VERSION=$(cat version.txt)
133 sed -i -e "s/__VERSION__/$VERSION/" lib/vagrant/version.rb
135 # cleanup backups after patching
136 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
139 # make gemspec self-contained
140 ruby -r rubygems -e 'spec = eval(File.read("%{name}.gemspec"))
141 File.open("%{name}-%{version}.gemspec", "w") do |file|
142 file.puts spec.to_ruby_for_cache
146 rm -rf $RPM_BUILD_ROOT
147 install -d $RPM_BUILD_ROOT{%{ruby_gemdir}/gems/%{name}-%{version},%{ruby_specdir},%{_bindir}}
148 cp -a lib bin keys plugins templates $RPM_BUILD_ROOT%{ruby_gemdir}/gems/%{name}-%{version}
149 cp -p %{name}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
150 install -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/%{name}
152 install -d $RPM_BUILD_ROOT%{bash_compdir}
153 cp -p contrib/bash/completion.sh $RPM_BUILD_ROOT%{bash_compdir}/%{name}
156 install -d $RPM_BUILD_ROOT/etc/sudoers.d
157 echo 'vagrant ALL=(ALL) NOPASSWD: ALL' > $RPM_BUILD_ROOT/etc/sudoers.d/%{name}
159 install -d $RPM_BUILD_ROOT{%{vg_root},%{vg_home}/.ssh}
160 cp -p /etc/skel/.bash* $RPM_BUILD_ROOT%{vg_home}
162 # Since Vagrant only supports key-based authentication for SSH, we must
163 # set up the vagrant user to use key-based authentication. We can get the
164 # public key used by the Vagrant gem directly from its Github repository.
165 cp -p keys/vagrant.pub $RPM_BUILD_ROOT%{vg_home}/.ssh/authorized_keys
168 rm -rf $RPM_BUILD_ROOT
171 %groupadd -g 291 vagrant
172 %useradd -u 291 -g vagrant -G wheel -c "Vagrant user" -s /bin/bash -d %{vg_home} vagrant
175 if [ "$1" = "0" ]; then
181 %defattr(644,root,root,755)
182 %attr(755,root,root) %{_bindir}/vagrant
183 #%{ruby_vendorlibdir}/vagrant.rb
184 #%{ruby_vendorlibdir}/vagrant
187 %dir %{ruby_gemdir}/gems/%{name}-%{version}
188 %dir %{ruby_gemdir}/gems/%{name}-%{version}/bin
189 %attr(755,root,root) %{ruby_gemdir}/gems/%{name}-%{version}/bin/*
190 %{ruby_gemdir}/gems/%{name}-%{version}/keys
191 %{ruby_gemdir}/gems/%{name}-%{version}/lib
192 %{ruby_gemdir}/gems/%{name}-%{version}/plugins
193 %{ruby_gemdir}/gems/%{name}-%{version}/templates
195 %{ruby_specdir}/%{name}-%{version}.gemspec
197 %files -n bash-completion-%{name}
198 %defattr(644,root,root,755)
199 %{bash_compdir}/%{name}
202 %defattr(644,root,root,755)
203 %attr(440,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sudoers.d/%{name}
204 %dir %attr(750,vagrant,vagrant) %{vg_home}
205 %dir %attr(700,vagrant,vagrant) %{vg_home}/.ssh
206 %attr(600,vagrant,vagrant) %config(noreplace) %verify(not md5 mtime size) %{vg_home}/.ssh/authorized_keys
207 %dir %attr(640,vagrant,vagrant) %{vg_home}/.bash*
208 %dir %attr(700,root,root) %{vg_root}
212 %defattr(644,root,root,755)