1 |
%define name smeserver-virtualbox |
%define name smeserver-virtualbox |
2 |
%define version 5.0.0 |
%define version 5.2 |
3 |
%define release 3 |
%define release 4 |
4 |
%define rpmver 5.0.0 |
%define rpmver 5.2 |
5 |
Summary: smserver rpm to install virtualbox |
Summary: smserver rpm to install VirtualBox |
6 |
Name: %{name} |
Name: %{name} |
7 |
Version: %{version} |
Version: %{version} |
8 |
Release: %{release}%{?dist} |
Release: %{release}%{?dist} |
15 |
BuildArchitectures: noarch |
BuildArchitectures: noarch |
16 |
BuildRequires: e-smith-devtools |
BuildRequires: e-smith-devtools |
17 |
Requires: e-smith-release >= 10.0 |
Requires: e-smith-release >= 10.0 |
18 |
Requires: VirtualBox-5.0 |
Requires: VirtualBox-5.2 |
19 |
#Patch0: smeserver-virtualbox-4.3.1_fix_vboxdrv_kernel_module.patch |
Requires: kernel-devel |
20 |
|
Requires: gcc |
21 |
AutoReqProv: no |
AutoReqProv: no |
22 |
|
Patch0: smeserver-virtualbox-5.2-move_vbox_dir.patch |
23 |
|
Patch1: smeserver-virtualbox-5.2-multiple_changes.patch |
24 |
|
|
25 |
%description |
%description |
26 |
smserver rpm to install virtualbox |
smserver rpm to install VirtualBox-5.2 |
27 |
|
|
28 |
%changelog |
%changelog |
29 |
* Wed Aug 07 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 5.0.0-3 |
* Fri Mar 10 2023 Trevor Batley <trevor@batley.id.au> 5.2-4.sme |
30 |
|
- change log directory to /var/log/virtualbox and give correct permissions |
31 |
|
- add password generation and storage for vboxweb runtime user (for use by phpvirtualbox) |
32 |
|
- template /etc/default/virtualbox.conf |
33 |
|
- add 50koozali.conf for vboxweb-service |
34 |
|
- include migrate fragment for vbox user password |
35 |
|
|
36 |
|
* Thu Oct 20 2022 Trevor Batley <trevor@batley.id.au> 5.2-3.sme |
37 |
|
- remove storage of vbox password |
38 |
|
|
39 |
|
* Wed Oct 19 2022 Trevor Batley <trevor@batley.id.au> 5.2-2.sme |
40 |
|
- change vbox user to system user and change the home directory |
41 |
|
|
42 |
|
* Tue Oct 11 2022 Trevor Batley <trevor@batley.id.au> 5.2-1.sme |
43 |
|
- first import to sme10 |
44 |
|
- requires VirtualBox-5.2 |
45 |
|
- create vbox user and run vboxweb-service as vbox user |
46 |
|
- create vbousers group and add admin,vbox as members |
47 |
|
- add vbox & vboxusers as full sme accounts so tha they are in ldap (for ldap authentication) |
48 |
|
- use systemd for vboxdrv |
49 |
|
- move fix_vboxdrv_kerenel_module.sh script into /usr/lib/virtualbox and include as pre step in vboxdrv service start |
50 |
|
|
51 |
|
* Fri Aug 07 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 5.0.0-3 |
52 |
- vboxweb-service start now at S99 |
- vboxweb-service start now at S99 |
53 |
|
|
54 |
* Thu Aug 06 2015 stephane de labrusse <stephdl@de-labrusse.fr> 5.0.0-2 |
* Thu Aug 06 2015 stephane de labrusse <stephdl@de-labrusse.fr> 5.0.0-2 |
67 |
- Initial release |
- Initial release |
68 |
|
|
69 |
%prep |
%prep |
70 |
|
|
71 |
%setup |
%setup |
72 |
#%patch0 -p1 |
%patch0 -p1 |
73 |
|
%patch1 -p1 |
74 |
|
|
75 |
%build |
%build |
76 |
#perl createlinks |
perl createlinks |
77 |
|
|
78 |
%install |
%install |
79 |
rm -rf $RPM_BUILD_ROOT |
rm -rf $RPM_BUILD_ROOT |
80 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
81 |
rm -f %{name}-%{version}-filelist |
rm -f %{name}-%{version}-filelist |
82 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist |
mkdir -p $RPM_BUILD_ROOT/var/log/virtualbox |
83 |
|
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
84 |
|
--dir /var/log/virtualbox 'attr(755,vbox,vboxusers)' \ |
85 |
|
--file /usr/lib/virtualbox/fix_vboxdrv_kernel_module.sh 'attr(755,root,root)' \ |
86 |
|
> %{name}-%{version}-filelist |
87 |
echo "%doc COPYING" >> %{name}-%{version}-filelist |
echo "%doc COPYING" >> %{name}-%{version}-filelist |
88 |
|
|
89 |
%clean |
%clean |
91 |
rm -rf %{name}-%{version} |
rm -rf %{name}-%{version} |
92 |
|
|
93 |
%pre |
%pre |
94 |
/etc/init.d/vboxdrv stop >/dev/null 2>&1 |
if ! id "vbox" |
95 |
|
then |
96 |
|
echo "Adding VBoxWeb runtime user (vbox)" |
97 |
|
/usr/sbin/useradd -c "VBoxWeb runtime user" -m -N -s /bin/bash -g vboxusers vbox >/dev/null |
98 |
|
fi |
99 |
|
|
100 |
%preun |
%preun |
101 |
|
/sbin-e-smith/systemctl stop vboxweb-service |
102 |
|
/sbin/e-smith/systemctl stop vboxdrv |
103 |
|
|
104 |
%post |
%post |
105 |
if [ $1 > 1 ] ; then |
/sbin/e-smith/systemctl start vboxdrv |
|
/bin/ln -fs /etc/rc.d/init.d/vboxdrv /etc/rc7.d/S20vboxdrv >/dev/null 2>&1 |
|
|
/bin/ln -fs /etc/rc.d/init.d/vboxautostart-service /etc/rc7.d/S35vboxautostart-service >/dev/null 2>&1 |
|
|
/bin/ln -fs /etc/rc.d/init.d/vboxballoonctrl-service /etc/rc7.d/S35vboxballoonctrl-service >/dev/null 2>&1 |
|
|
/bin/ln -fs /etc/rc.d/init.d/vboxweb-service /etc/rc7.d/S99vboxweb-service >/dev/null 2>&1 |
|
|
/bin/ln -fs /etc/rc.d/init.d/fix_vboxdrv_kernel_module /etc/rc7.d/S19fix_vboxdrv_kernel_module >/dev/null 2>&1 |
|
|
fi |
|
|
/etc/init.d/vboxdrv start >/dev/null 2>&1 |
|
|
/usr/bin/vboxmanage setproperty websrvauthlibrary null |
|
106 |
|
|
107 |
%postun |
%postun |
108 |
#uninstall |
#uninstall |
|
if [ $1 = 0 ] ; then |
|
|
/bin/rm -rf /etc/rc7.d/S20vboxdrv |
|
|
/bin/rm -rf /etc/rc7.d/S35vboxautostart-service |
|
|
/bin/rm -rf /etc/rc7.d/S35vboxballoonctrl-service |
|
|
/bin/rm -rf /etc/rc7.d/S99vboxweb-service |
|
|
/bin/rm -rf /etc/rc7.d/S19fix_vboxdrv_kernel_module |
|
|
fi |
|
109 |
%files -f %{name}-%{version}-filelist |
%files -f %{name}-%{version}-filelist |
110 |
%defattr(-,root,root) |
%defattr(-,root,root) |
|
%attr(755,root,root) /etc/rc.d/init.d/fix_vboxdrv_kernel_module |
|
111 |
|
|