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