1 |
%define name smeserver-virtualbox |
2 |
%define version 5.2 |
3 |
%define release 3 |
4 |
%define rpmver 5.2 |
5 |
Summary: smserver rpm to install VirtualBox |
6 |
Name: %{name} |
7 |
Version: %{version} |
8 |
Release: %{release}%{?dist} |
9 |
Source: %{name}-%{version}.tar.gz |
10 |
License: GNU GPL version 2 |
11 |
URL: http://mirror.de-labrusse.fr |
12 |
Group: SMEserver/addon |
13 |
BuildRoot: %{_tmppath}/%{name}-buildroot |
14 |
Prefix: %{_prefix} |
15 |
BuildArchitectures: noarch |
16 |
BuildRequires: e-smith-devtools |
17 |
Requires: e-smith-release >= 10.0 |
18 |
Requires: VirtualBox-5.2 |
19 |
Requires: kernel-devel |
20 |
Requires: gcc |
21 |
AutoReqProv: no |
22 |
Patch0: smeserver-virtualbox-5.2-move_vbox_dir.patch |
23 |
|
24 |
%description |
25 |
smserver rpm to install VirtualBox-5.2 |
26 |
|
27 |
%changelog |
28 |
* Thu Oct 20 2022 Trevor Batley <trevor@batley.id.au> 5.2-3.sme |
29 |
- remove storage of vbox password |
30 |
|
31 |
* Wed Oct 19 2022 Trevor Batley <trevor@batley.id.au> 5.2-2.sme |
32 |
- change vbox user to system user and change the home directory |
33 |
|
34 |
* Tue Oct 11 2022 Trevor Batley <trevor@batley.id.au> 5.2-1.sme |
35 |
- first import to sme10 |
36 |
- requires VirtualBox-5.2 |
37 |
- create vbox user and run vboxweb-service as vbox user |
38 |
- create vbousers group and add admin,vbox as members |
39 |
- add vbox & vboxusers as full sme accounts so tha they are in ldap (for ldap authentication) |
40 |
- use systemd for vboxdrv |
41 |
- move fix_vboxdrv_kerenel_module.sh script into /usr/lib/virtualbox and include as pre step in vboxdrv service start |
42 |
|
43 |
* Fri Aug 07 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 5.0.0-3 |
44 |
- vboxweb-service start now at S99 |
45 |
|
46 |
* Thu Aug 06 2015 stephane de labrusse <stephdl@de-labrusse.fr> 5.0.0-2 |
47 |
- require virtualbox-5.0 |
48 |
|
49 |
* Wed Mar 19 2014 stephane de labrusse <stephdl@de-labrusse.fr> 4.3.1-1 |
50 |
- added a script to verify if the vboxdrv module is compiled for the kernel used by the system |
51 |
|
52 |
* Mon Dec 30 2013 JP Pialasse <tests@pialasse.com> 4.3.0-5 |
53 |
- changing naming of contrib for import into buildsys |
54 |
|
55 |
* Tue Nov 05 2013 stephane de labrusse <stephdl@de-labrusse.fr> 4.3.0-4 |
56 |
- change name to match the virtualbox version |
57 |
|
58 |
* Sat Oct 19 2013 stephane de labrusse <stephdl@de-labrusse.fr> 4.3.0-3 |
59 |
- Initial release |
60 |
|
61 |
%prep |
62 |
|
63 |
%setup |
64 |
%patch0 -p1 |
65 |
|
66 |
%build |
67 |
perl createlinks |
68 |
|
69 |
%install |
70 |
rm -rf $RPM_BUILD_ROOT |
71 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
72 |
rm -f %{name}-%{version}-filelist |
73 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist |
74 |
echo "%doc COPYING" >> %{name}-%{version}-filelist |
75 |
|
76 |
%clean |
77 |
cd .. |
78 |
rm -rf %{name}-%{version} |
79 |
|
80 |
%pre |
81 |
/sbin/e-smith/systemctl stop vboxdrv >/dev/null 2>&1 |
82 |
if /sbin/e-smith/db accounts get vbox >/dev/null |
83 |
then |
84 |
echo "the vbox user already exists - we'll use this" |
85 |
else |
86 |
/sbin/e-smith/db accounts set vboxusers group Description "VBox users" Members "admin" |
87 |
/sbin/e-smith/signal-event group-create vboxusers |
88 |
/sbin/e-smith/db accounts set vbox system Description "VBox runtime user" |
89 |
useradd -c "VBox runtime user" -d /home/vbox -m -N -s /bin/bash -g vboxusers vbox |
90 |
mkdir /home/vbox/.virtualbox |
91 |
fi |
92 |
|
93 |
%preun |
94 |
/sbin-e-smith/systemctl stop vboxweb-service |
95 |
/sbin/e-smith/systemctl stop vboxdrv |
96 |
|
97 |
%post |
98 |
/sbin/e-smith/systemctl start vboxdrv |
99 |
su vbox -c "/usr/bin/vboxmanage setproperty websrvauthlibrary null" |
100 |
|
101 |
%postun |
102 |
#uninstall |
103 |
%files -f %{name}-%{version}-filelist |
104 |
%defattr(-,root,root) |
105 |
%attr(755,root,root) /usr/lib/virtualbox/fix_vboxdrv_kernel_module.sh |
106 |
|