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