/[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.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.2  %define version 5.2
3  %define release 1  %define release 3
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    
24  %description  %description
25  smserver rpm to install VirtualBox-5.2  smserver rpm to install VirtualBox-5.2
26    
27  %changelog  %changelog
28    * 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  * Tue Oct 11 2022 Trevor Batley <trevor@batley.id.au> 5.2-1.sme
35  - first import to sme10  - first import to sme10
36  - requires VirtualBox-5.2  - requires VirtualBox-5.2
# Line 54  smserver rpm to install VirtualBox-5.2 Line 61  smserver rpm to install VirtualBox-5.2
61  %prep  %prep
62    
63  %setup  %setup
64    %patch0 -p1
65    
66  %build  %build
67  perl createlinks  perl createlinks
# Line 70  cd .. Line 78  cd ..
78  rm -rf %{name}-%{version}  rm -rf %{name}-%{version}
79    
80  %pre  %pre
81  /usr/lib/virtualbox/vboxdrv.sh 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  if /sbin/e-smith/db accounts get vbox >/dev/null
83  then  then
84      echo "the vbox user already exists - we'll use this"      echo "the vbox user already exists - we'll use this"
85  else  else
86      /sbin/e-smith/db accounts set vbox user PasswordSet yes      /sbin/e-smith/db accounts set vboxusers group Description "VBox users" Members "admin"
     /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"  
87      /sbin/e-smith/signal-event group-create vboxusers      /sbin/e-smith/signal-event group-create vboxusers
88      mkdir /home/e-smith/files/users/vbox/.virtualbox      /sbin/e-smith/db accounts set vbox system Description "VBox runtime user"
89      cat /dev/urandom | tr -dc 'a-zA-Z0-9' | head -c 32 > /home/e-smith/files/users/vbox/.virtualbox/vbox.passwd      useradd -c "VBox runtime user" -d /home/vbox -m -N -s /bin/bash -g vboxusers vbox
90      cat /home/e-smith/files/users/vbox/.virtualbox/vbox.passwd  | passwd --stdin vbox      mkdir /home/vbox/.virtualbox
91  fi  fi
92    
93  %preun  %preun
# Line 90  fi Line 95  fi
95  /sbin/e-smith/systemctl stop vboxdrv  /sbin/e-smith/systemctl stop vboxdrv
96    
97  %post  %post
98  /usr/lib/virtualbox/vboxdrv.sh start >/dev/null 2>&1  /sbin/e-smith/systemctl start vboxdrv
99  /usr/bin/vboxmanage setproperty websrvauthlibrary null  su vbox -c "/usr/bin/vboxmanage setproperty websrvauthlibrary null"
100    
101  %postun  %postun
102  #uninstall  #uninstall


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