/[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.3 by trevorb, Tue Oct 18 09:25:29 2022 UTC Revision 1.6 by trevorb, Fri Mar 10 00:33:00 2023 UTC
# Line 1  Line 1 
1  %define name smeserver-virtualbox  %define name smeserver-virtualbox
2  %define version 5.2  %define version 5.2
3  %define release 1  %define release 4
4  %define rpmver 5.2  %define rpmver 5.2
5  Summary: smserver rpm to install VirtualBox  Summary: smserver rpm to install VirtualBox
6  Name: %{name}  Name: %{name}
# Line 19  Requires: VirtualBox-5.2 Line 19  Requires: VirtualBox-5.2
19  Requires: kernel-devel  Requires: kernel-devel
20  Requires: gcc  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-5.2  smserver rpm to install VirtualBox-5.2
27    
28  %changelog  %changelog
29    * 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  * Tue Oct 11 2022 Trevor Batley <trevor@batley.id.au> 5.2-1.sme
43  - first import to sme10  - first import to sme10
44  - requires VirtualBox-5.2  - requires VirtualBox-5.2
# Line 54  smserver rpm to install VirtualBox-5.2 Line 69  smserver rpm to install VirtualBox-5.2
69  %prep  %prep
70    
71  %setup  %setup
72    %patch0 -p1
73    %patch1 -p1
74    
75  %build  %build
76  perl createlinks  perl createlinks
# Line 62  perl createlinks Line 79  perl createlinks
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  /sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
83    --dir /var/log/virtualbox 'attr(755,vbox,vboxusers)' \
84    --file /usr/lib/virtualbox/fix_vboxdrv_kernel_module.sh 'attr(755,root,root)' \
85    > %{name}-%{version}-filelist
86  echo "%doc COPYING"  >> %{name}-%{version}-filelist  echo "%doc COPYING"  >> %{name}-%{version}-filelist
87    
88  %clean  %clean
# Line 70  cd .. Line 90  cd ..
90  rm -rf %{name}-%{version}  rm -rf %{name}-%{version}
91    
92  %pre  %pre
93  /usr/lib/virtualbox/vboxdrv.sh stop >/dev/null 2>&1  if ! id "vbox"
 if /sbin/e-smith/db accounts get vbox >/dev/null  
94  then  then
95      echo "the vbox user already exists - we'll use this"  echo "Adding VBoxWeb runtime user (vbox)"
96  else  /usr/sbin/useradd -c "VBoxWeb runtime user" -m -N -s /bin/bash -g vboxusers vbox >/dev/null
     /sbin/e-smith/db accounts set vbox user PasswordSet yes  
     /sbin/e-smith/signal-event user-create vbox  
     usermod -s /bin/bash vbox  
     /sbin/e-smith/db accounts set vboxusers group Description "VBox users" Members "admin,vbox"  
     /sbin/e-smith/signal-event group-create vboxusers  
     mkdir /home/e-smith/files/users/vbox/.virtualbox  
     cat /dev/urandom | tr -dc 'a-zA-Z0-9' | head -c 32 > /home/e-smith/files/users/vbox/.virtualbox/vbox.passwd  
     cat /home/e-smith/files/users/vbox/.virtualbox/vbox.passwd  | passwd --stdin vbox  
97  fi  fi
98    
99  %preun  %preun
# Line 90  fi Line 101  fi
101  /sbin/e-smith/systemctl stop vboxdrv  /sbin/e-smith/systemctl stop vboxdrv
102    
103  %post  %post
104  /usr/lib/virtualbox/vboxdrv.sh start >/dev/null 2>&1  /sbin/e-smith/systemctl start vboxdrv
 /usr/bin/vboxmanage setproperty websrvauthlibrary null  
105    
106  %postun  %postun
107  #uninstall  #uninstall
108  %files -f %{name}-%{version}-filelist  %files -f %{name}-%{version}-filelist
109  %defattr(-,root,root)  %defattr(-,root,root)
 %attr(755,root,root) /usr/lib/virtualbox/fix_vboxdrv_kernel_module.sh  
110    


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