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