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