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