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