]> git.pld-linux.org Git - packages/vagrant.git/blame - vagrant.spec
uses bsdtar somewhy
[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
3b3c2b02 6Release: 0.31
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
7aa78a1a 22Requires: curl
1539a824
ER
23Requires: ruby-childprocess >= 0.3.7
24Requires: ruby-erubis >= 2.7.0
25Requires: ruby-i18n >= 0.6.0
3b3c2b02 26Requires: bsdtar
1539a824
ER
27Requires: ruby-json < 1.8.0
28Requires: ruby-json >= 1.5.1
29Requires: ruby-log4r >= 1.1.9
30Requires: ruby-net-scp >= 1.1.0
31Requires: ruby-net-ssh >= 2.6.6
32Requires: ruby-rubygems
33BuildArch: noarch
32f7fb06
ER
34BuildRoot: %{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
42Vagrant offers scripted provisioning and deployment of virtual
43instances. While VirtualBox is the main target, future versions may
44support other hypervizors as well.
45
46The vision of the project is to create a tool to transparently manage
47all the complex parts of modern development within a virtual
48environment without affecting the everyday workflow of the developer
49too much. A long term goal is moving all development into virtualized
50environments by making it easier to do so than not to. Additionally,
51work is ongoing to have Vagrant run identically on every major
52consumer OS platform (Linux, Mac OS X, and Windows).
53
ff67adbf
ER
54%package -n bash-completion-%{name}
55Summary: bash-completion for %{name}
56Group: Applications/Shells
57Requires: %{name}
58Requires: bash-completion
59%if "%{_rpmversion}" >= "5"
60BuildArch: noarch
61%endif
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
062cfa5f 78Requires: sudo
cee8b635 79Requires: which
d9278297
ER
80Provides: group(vagrant)
81Provides: user(vagrant)
82%if "%{_rpmversion}" >= "5"
83BuildArch: noarch
84%endif
85
86%description guest
87This is the package to be installed in Vagrant guest.
88
89WARNING: This package installs insecure keypair to vagant user. Do not
90install this package in a box that is accessible others but you.
91
92These keys are the "insecure" public/private keypair we offer to base
93box creators for use in their base boxes so that vagrant installations
94can automatically SSH into the boxes.
95
96See: <https://github.com/mitchellh/vagrant/tree/master/keys/>.
97
2f2a2f85
ER
98%package doc
99Summary: Documentation for %{name}
100Group: Documentation
101Requires: %{name} = %{version}-%{release}
102%if "%{_rpmversion}" >= "5"
103BuildArch: noarch
104%endif
105
106%description doc
107Ruby 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
116rm -rf $RPM_BUILD_ROOT
1539a824
ER
117install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{_bindir},%{_appdir}}
118cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
119cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
7aa78a1a 120cp -a config keys plugins templates $RPM_BUILD_ROOT%{_appdir}
062cfa5f 121
ff67adbf 122install -d $RPM_BUILD_ROOT/etc/bash_completion.d
062cfa5f 123mv contrib/bash/completion.sh $RPM_BUILD_ROOT/etc/bash_completion.d/%{name}.sh
ff67adbf 124
d9278297 125# guest
cc40b6fa
ER
126install -d $RPM_BUILD_ROOT/etc/sudoers.d
127echo 'vagrant ALL=(ALL) NOPASSWD: ALL' > $RPM_BUILD_ROOT/etc/sudoers.d/%{name}
128
289fa4b8 129install -d $RPM_BUILD_ROOT{%{vg_root},%{vg_home}/.ssh}
d9278297 130cp -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 135cp -p keys/vagrant.pub $RPM_BUILD_ROOT%{vg_home}/.ssh/authorized_keys
062cfa5f 136
2f2a2f85
ER
137%clean
138rm -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
145if [ "$1" = "0" ]; then
146 %userremove vagrant
147 %groupremove vagrant
148fi
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
This page took 0.101295 seconds and 4 git commands to generate.