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