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