/[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.4 by trevorb, Wed Oct 19 02:12:56 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 2
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  * 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    * Tue Oct 11 2022 Trevor Batley <trevor@batley.id.au> 5.2-1.sme
32    - 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  - vboxweb-service start now at S99  - vboxweb-service start now at S99
42    
43  * 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 56  smserver rpm to install virtualbox
56  - Initial release  - Initial release
57    
58  %prep  %prep
59    
60  %setup  %setup
61  #%patch0 -p1  %patch0 -p1
62    
63  %build  %build
64  #perl createlinks  perl createlinks
65    
66  %install  %install
67  rm -rf $RPM_BUILD_ROOT  rm -rf $RPM_BUILD_ROOT
# Line 59  cd .. Line 75  cd ..
75  rm -rf %{name}-%{version}  rm -rf %{name}-%{version}
76    
77  %pre  %pre
78  /etc/init.d/vboxdrv stop >/dev/null 2>&1  /sbin/e-smith/systemctl stop vboxdrv >/dev/null 2>&1
79    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        /sbin/e-smith/db accounts set vboxusers group Description "VBox users" Members "admin"
84        /sbin/e-smith/signal-event group-create vboxusers
85        /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    fi
91    
92  %preun  %preun
93    /sbin-e-smith/systemctl stop vboxweb-service
94    /sbin/e-smith/systemctl stop vboxdrv
95    
96  %post  %post
97  if [ $1 > 1 ] ; then  /sbin/e-smith/systemctl start vboxdrv
98  /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  
99    
100  %postun  %postun
101  #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  
102  %files -f %{name}-%{version}-filelist  %files -f %{name}-%{version}-filelist
103  %defattr(-,root,root)  %defattr(-,root,root)
104  %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
105    


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