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