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