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