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