/[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.2 by trevorb, Tue Oct 18 09:20:00 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 1
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    
23  %description  %description
24  smserver rpm to install virtualbox  smserver rpm to install VirtualBox-5.2
25    
26  %changelog  %changelog
27  * Wed Aug 07 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 5.0.0-3  * Tue Oct 11 2022 Trevor Batley <trevor@batley.id.au> 5.2-0
28    - first import to sme10
29    - requires VirtualBox-5.2
30    - create vbox user and run vboxweb-service as vbox user
31    - create vbousers group and add admin,vbox as members
32    - add vbox & vboxusers as full sme accounts so tha they are in ldap (for ldap authentication)
33    - use systemd for vboxdrv
34    - move fix_vboxdrv_kerenel_module.sh script into /usr/lib/virtualbox and include as pre step in vboxdrv service start
35    
36    * Fri Aug 07 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 5.0.0-3
37  - vboxweb-service start now at S99  - vboxweb-service start now at S99
38    
39  * 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 52  smserver rpm to install virtualbox
52  - Initial release  - Initial release
53    
54  %prep  %prep
55    
56  %setup  %setup
57  #%patch0 -p1  
58  %build  %build
59  #perl createlinks  perl createlinks
60    
61  %install  %install
62  rm -rf $RPM_BUILD_ROOT  rm -rf $RPM_BUILD_ROOT
# Line 59  cd .. Line 70  cd ..
70  rm -rf %{name}-%{version}  rm -rf %{name}-%{version}
71    
72  %pre  %pre
73  /etc/init.d/vboxdrv stop >/dev/null 2>&1  /usr/lib/virtualbox/vboxdrv.sh stop >/dev/null 2>&1
74    if /sbin/e-smith/db accounts get vbox >/dev/null
75    then
76        echo "the vbox user already exists - we'll use this"
77    else
78        /sbin/e-smith/db accounts set vbox user PasswordSet yes
79        /sbin/e-smith/signal-event user-create vbox
80        usermod -s /bin/bash vbox
81        /sbin/e-smith/db accounts set vboxusers group Description "VBox users" Members "admin,vbox"
82        /sbin/e-smith/signal-event group-create vboxusers
83        mkdir /home/e-smith/files/users/vbox/.virtualbox
84        cat /dev/urandom | tr -dc 'a-zA-Z0-9' | head -c 32 > /home/e-smith/files/users/vbox/.virtualbox/vbox.passwd
85        cat /home/e-smith/files/users/vbox/.virtualbox/vbox.passwd  | passwd --stdin vbox
86    fi
87    
88  %preun  %preun
89    /sbin-e-smith/systemctl stop vboxweb-service
90    /sbin/e-smith/systemctl stop vboxdrv
91    
92  %post  %post
93  if [ $1 > 1 ] ; then  /usr/lib/virtualbox/vboxdrv.sh start >/dev/null 2>&1
 /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  
94  /usr/bin/vboxmanage setproperty websrvauthlibrary null  /usr/bin/vboxmanage setproperty websrvauthlibrary null
95    
96  %postun  %postun
97  #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  
98  %files -f %{name}-%{version}-filelist  %files -f %{name}-%{version}-filelist
99  %defattr(-,root,root)  %defattr(-,root,root)
100  %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
101    


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