/[smecontribs]/rpms/smeserver-virtualbox/contribs10/smeserver-virtualbox.spec
ViewVC logotype

Diff of /rpms/smeserver-virtualbox/contribs10/smeserver-virtualbox.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.1 by jpp, Tue Aug 16 03:47:20 2022 UTC Revision 1.5 by trevorb, Thu Oct 20 04:48:36 2022 UTC
# Line 1  Line 1 
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 3
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}
# Line 15  Prefix: %{_prefix} Line 15  Prefix: %{_prefix}
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    
24  %description  %description
25  smserver rpm to install virtualbox  smserver rpm to install VirtualBox-5.2
26    
27  %changelog  %changelog
28  * Wed Aug 07 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 5.0.0-3  * 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  - vboxweb-service start now at S99
45    
46  * 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
# Line 42  smserver rpm to install virtualbox Line 59  smserver rpm to install virtualbox
59  - Initial release  - Initial release
60    
61  %prep  %prep
62    
63  %setup  %setup
64  #%patch0 -p1  %patch0 -p1
65    
66  %build  %build
67  #perl createlinks  perl createlinks
68    
69  %install  %install
70  rm -rf $RPM_BUILD_ROOT  rm -rf $RPM_BUILD_ROOT
# Line 59  cd .. Line 78  cd ..
78  rm -rf %{name}-%{version}  rm -rf %{name}-%{version}
79    
80  %pre  %pre
81  /etc/init.d/vboxdrv stop >/dev/null 2>&1  /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  %preun
94    /sbin-e-smith/systemctl stop vboxweb-service
95    /sbin/e-smith/systemctl stop vboxdrv
96    
97  %post  %post
98  if [ $1 > 1 ] ; then  /sbin/e-smith/systemctl start vboxdrv
99  /bin/ln -fs /etc/rc.d/init.d/vboxdrv /etc/rc7.d/S20vboxdrv >/dev/null 2>&1  su vbox -c "/usr/bin/vboxmanage setproperty websrvauthlibrary null"
 /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  
100    
101  %postun  %postun
102  #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  
103  %files -f %{name}-%{version}-filelist  %files -f %{name}-%{version}-filelist
104  %defattr(-,root,root)  %defattr(-,root,root)
105  %attr(755,root,root) /etc/rc.d/init.d/fix_vboxdrv_kernel_module  %attr(755,root,root) /usr/lib/virtualbox/fix_vboxdrv_kernel_module.sh
106    


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed