]> git.pld-linux.org Git - packages/vagrant.git/blame - vagrant.spec
- relax net-ssh dependency (5.0.0 has just a bunch of new features)
[packages/vagrant.git] / vagrant.spec
CommitLineData
289fa4b8
ER
1# NOTE:
2# - release notes: https://github.com/mitchellh/vagrant/blob/master/CHANGELOG.md
2f2a2f85
ER
3Summary: Provisioning and deployment of virtual instances
4Name: vagrant
58e22970 5Version: 2.1.2
2ca22dfa 6Release: 2
2f2a2f85
ER
7License: MIT
8Group: Applications/Emulators
739d81cd 9Source0: https://github.com/mitchellh/vagrant/archive/v%{version}/%{name}-%{version}.tar.gz
58e22970 10# Source0-md5: 20b7a4a7b3e1bb4a57c8cac65a547ce7
2fe4e4ef 11Source1: %{name}.sh
1539a824
ER
12Patch1: rubygems.patch
13Patch2: no-warning.patch
3ab7a71b 14Patch3: Vagrantfile.patch
423e25f8 15Patch4: version.patch
a1db8c22 16Patch5: no-gems.patch
af8dd7b7 17Patch7: insert-key.patch
86f0f949 18Patch8: listen.patch
28281fb4 19Patch9: pld-chef-installed.patch
2ca22dfa 20Patch10: net-ssh.patch
30485291 21URL: http://www.vagrantup.com/
844c04d1 22BuildRequires: bash
ccb4e738 23BuildRequires: rpm-rubyprov
4619d17a 24BuildRequires: ruby > 1:2.0
0876e579 25%if %{with tests}
1539a824
ER
26BuildRequires: ruby-contest >= 0.1.2
27BuildRequires: ruby-minitest >= 2.5.1
28BuildRequires: ruby-mocha
29BuildRequires: ruby-rake
0876e579
ER
30BuildRequires: ruby-rspec >= 2.14.0
31%endif
91fbc1b0 32Requires: bsdtar
7aa78a1a 33Requires: curl
37fd54cc 34Requires: ruby-json
1539a824 35Requires: ruby-rubygems
89ea5f16 36Suggests: VirtualBox
89565a92
ER
37Suggests: VirtualBox-gui
38Suggests: rdesktop
a668c701 39Suggests: rsync
1539a824 40BuildArch: noarch
32f7fb06
ER
41BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
1539a824 43%define _appdir %{_datadir}/%{name}
196c9fce 44%define bash_compdir %{_datadir}/bash-completion/completions
32f7fb06 45
d9278297 46%define vg_home /home/vagrant
289fa4b8 47%define vg_root /vagrant
d9278297 48
2f2a2f85
ER
49%description
50Vagrant offers scripted provisioning and deployment of virtual
51instances. While VirtualBox is the main target, future versions may
52support other hypervizors as well.
53
54The vision of the project is to create a tool to transparently manage
55all the complex parts of modern development within a virtual
56environment without affecting the everyday workflow of the developer
57too much. A long term goal is moving all development into virtualized
58environments by making it easier to do so than not to. Additionally,
59work is ongoing to have Vagrant run identically on every major
60consumer OS platform (Linux, Mac OS X, and Windows).
61
ff67adbf
ER
62%package -n bash-completion-%{name}
63Summary: bash-completion for %{name}
64Group: Applications/Shells
65Requires: %{name}
196c9fce 66Requires: bash-completion >= 2.0
ff67adbf
ER
67
68%description -n bash-completion-%{name}
69bash-completion for %{name}.
70
d9278297
ER
71%package guest
72Summary: Vagrant guest
73Group: Development/Building
062cfa5f 74URL: http://docs-v1.vagrantup.com/v1/docs/base_boxes.html
d9278297
ER
75Requires(postun): /usr/sbin/userdel
76Requires(pre): /bin/id
77Requires(pre): /usr/bin/getgid
78Requires(pre): /usr/sbin/groupadd
79Requires(pre): /usr/sbin/useradd
bf59fba0 80Requires: /etc/pld-release
d9278297 81Requires: openssh-server
30485291 82Requires: sudo >= 1.7.4p3-2
cee8b635 83Requires: which
051d9c6a 84Suggests: kernel(vboxsf)
d9278297
ER
85Provides: group(vagrant)
86Provides: user(vagrant)
d9278297
ER
87
88%description guest
89This is the package to be installed in Vagrant guest.
90
91WARNING: This package installs insecure keypair to vagant user. Do not
92install this package in a box that is accessible others but you.
93
94These keys are the "insecure" public/private keypair we offer to base
95box creators for use in their base boxes so that vagrant installations
96can automatically SSH into the boxes.
97
98See: <https://github.com/mitchellh/vagrant/tree/master/keys/>.
99
2f2a2f85
ER
100%package doc
101Summary: Documentation for %{name}
102Group: Documentation
103Requires: %{name} = %{version}-%{release}
2f2a2f85
ER
104
105%description doc
106Ruby documentation for %{gem_name}
107
108%prep
1539a824 109%setup -q
1539a824
ER
110%patch1 -p1
111%patch2 -p1
ca9ac262 112%patch3 -p1
423e25f8 113%patch4 -p1
a1db8c22 114%patch5 -p1
af8dd7b7 115%patch7 -p1
86f0f949 116%patch8 -p1
28281fb4 117%patch9 -p1
2ca22dfa 118%patch10 -p1
423e25f8
ER
119
120VERSION=$(cat version.txt)
121sed -i -e "s/__VERSION__/$VERSION/" lib/vagrant/version.rb
a08aa0c6 122
196c9fce
ER
123# cleanup backups after patching
124find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
125
6773f50c
ER
126%build
127# make gemspec self-contained
128ruby -r rubygems -e 'spec = eval(File.read("%{name}.gemspec"))
129 File.open("%{name}-%{version}.gemspec", "w") do |file|
130 file.puts spec.to_ruby_for_cache
131end'
132
2f2a2f85
ER
133%install
134rm -rf $RPM_BUILD_ROOT
be655f4d
ER
135install -d $RPM_BUILD_ROOT{%{ruby_gemdir}/gems/%{name}-%{version},%{ruby_specdir},%{_bindir}}
136cp -a lib bin keys plugins templates $RPM_BUILD_ROOT%{ruby_gemdir}/gems/%{name}-%{version}
6773f50c 137cp -p %{name}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
2fe4e4ef 138install -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/%{name}
062cfa5f 139
196c9fce 140install -d $RPM_BUILD_ROOT%{bash_compdir}
844c04d1 141cp -p contrib/bash/completion.sh $RPM_BUILD_ROOT%{bash_compdir}/%{name}
ff67adbf 142
d9278297 143# guest
cc40b6fa
ER
144install -d $RPM_BUILD_ROOT/etc/sudoers.d
145echo 'vagrant ALL=(ALL) NOPASSWD: ALL' > $RPM_BUILD_ROOT/etc/sudoers.d/%{name}
146
289fa4b8 147install -d $RPM_BUILD_ROOT{%{vg_root},%{vg_home}/.ssh}
844c04d1 148cp -p /etc/skel/.bash* $RPM_BUILD_ROOT%{vg_home}
2f2a2f85 149
062cfa5f
ER
150# Since Vagrant only supports key-based authentication for SSH, we must
151# set up the vagrant user to use key-based authentication. We can get the
152# public key used by the Vagrant gem directly from its Github repository.
1539a824 153cp -p keys/vagrant.pub $RPM_BUILD_ROOT%{vg_home}/.ssh/authorized_keys
062cfa5f 154
2f2a2f85
ER
155%clean
156rm -rf $RPM_BUILD_ROOT
157
d9278297 158%pre guest
42a30f36
ER
159%groupadd -g 291 vagrant
160%useradd -u 291 -g vagrant -G wheel -c "Vagrant user" -s /bin/bash -d %{vg_home} vagrant
d9278297
ER
161
162%postun guest
163if [ "$1" = "0" ]; then
164 %userremove vagrant
165 %groupremove vagrant
166fi
167
2f2a2f85
ER
168%files
169%defattr(644,root,root,755)
170%attr(755,root,root) %{_bindir}/vagrant
be655f4d
ER
171#%{ruby_vendorlibdir}/vagrant.rb
172#%{ruby_vendorlibdir}/vagrant
173#%{_appdir}
174
175%dir %{ruby_gemdir}/gems/%{name}-%{version}
176%dir %{ruby_gemdir}/gems/%{name}-%{version}/bin
177%attr(755,root,root) %{ruby_gemdir}/gems/%{name}-%{version}/bin/*
178%{ruby_gemdir}/gems/%{name}-%{version}/keys
179%{ruby_gemdir}/gems/%{name}-%{version}/lib
180%{ruby_gemdir}/gems/%{name}-%{version}/plugins
181%{ruby_gemdir}/gems/%{name}-%{version}/templates
182
6773f50c 183%{ruby_specdir}/%{name}-%{version}.gemspec
d9278297 184
ff67adbf
ER
185%files -n bash-completion-%{name}
186%defattr(644,root,root,755)
196c9fce 187%{bash_compdir}/%{name}
ff67adbf 188
d9278297
ER
189%files guest
190%defattr(644,root,root,755)
cc40b6fa 191%attr(440,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sudoers.d/%{name}
d9278297
ER
192%dir %attr(750,vagrant,vagrant) %{vg_home}
193%dir %attr(700,vagrant,vagrant) %{vg_home}/.ssh
062cfa5f 194%attr(600,vagrant,vagrant) %config(noreplace) %verify(not md5 mtime size) %{vg_home}/.ssh/authorized_keys
d9278297 195%dir %attr(640,vagrant,vagrant) %{vg_home}/.bash*
289fa4b8 196%dir %attr(700,root,root) %{vg_root}
32f7fb06
ER
197
198%if 0
2f2a2f85
ER
199%files doc
200%defattr(644,root,root,755)
201%doc %{gem_docdir}
32f7fb06 202%endif
This page took 0.090855 seconds and 4 git commands to generate.