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