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