1 |
%define name smeserver-phpvirtualbox |
%define name smeserver-phpvirtualbox |
2 |
%define version 5.2.1 |
%define version 5.2.1 |
3 |
%define release 1 |
%define release 4 |
4 |
%define rpmver 5.2.1 |
%define rpmver 5.2.1 |
5 |
Summary: smserver rpm to install phpvirtualbox |
Summary: smserver rpm to install phpvirtualbox |
6 |
Name: %{name} |
Name: %{name} |
18 |
Requires: php-soap |
Requires: php-soap |
19 |
Requires: phpvirtualbox = 5.2.1 |
Requires: phpvirtualbox = 5.2.1 |
20 |
Requires: smeserver-virtualbox = 5.2 |
Requires: smeserver-virtualbox = 5.2 |
21 |
|
Patch0: smeserver-phpvirtualbox-5.2.1-move_vbox_dir.patch |
22 |
|
Patch1: smeserver-phpvirtualbox-5.2.1-remove_vbox_passwd.patch |
23 |
|
Patch2: smeserver-phpvirtualbox-5.2.1-multiple_changes.patch |
24 |
|
Patch3: smeserver-phpvirtualbox-5.2.1-remove_defaults.patch |
25 |
|
|
26 |
AutoReqProv: no |
AutoReqProv: no |
27 |
%description |
%description |
31 |
phpvirtualbox version MUST align with VirtualBox version (i.e. VirtualBox-6.1 requires phpvirtualbox-6.1) |
phpvirtualbox version MUST align with VirtualBox version (i.e. VirtualBox-6.1 requires phpvirtualbox-6.1) |
32 |
|
|
33 |
%changelog |
%changelog |
34 |
* Tue Oct 11 2022 Trevor Batley <trevor@batley.id.au> 5.2-1 |
* Fri Mar 10 2023 Trevor Batley <trevor@batley.id.au> 5.2.1-4 |
35 |
|
- add vbox password back into config.php |
36 |
|
- replace /etc/php-fpm.d/phpvirtualbox with /etc/php-fpm.d/www.conf fragment and expand during update |
37 |
|
- remove webauth config db item and add authType, with multiple values |
38 |
|
- add support for BuiltIn, WebAuth (default), LDAP and AD authentication |
39 |
|
- rename config items User => Users, Group => userGroups and add adminUser |
40 |
|
- remove defaults for User and Group config items |
41 |
|
- add basic default values for config.php as config db items (with same name) and allow entry of other config items |
42 |
|
- create /var/lib/php/phpvirtualbox directories (opcache, session, tmp) with www:www ownership and 0755 permissions |
43 |
|
- correct permissions on log files |
44 |
|
- add smb.conf fragment to allow vboxuser and any userGroups access to /opt/vbox (VMs & ISOs) directories |
45 |
|
- add restart of httpd-e-smith and smbd services on update |
46 |
|
- create template2expand directive for virtualbox update (which generates/saves new password) for /opt/phpvirtualbox/config.php |
47 |
|
|
48 |
|
* Thu Oct 20 2022 Trevor Batley <trevor@batley.id.au> 5.2.1-3 |
49 |
|
- remove vbox passwd from config.php |
50 |
|
|
51 |
|
* Wed Oct 19 2022 Trevor Batley <trevor@batley.id.au> 5.2.1-2 |
52 |
|
- vbox user home directory moved |
53 |
|
|
54 |
|
* Tue Oct 11 2022 Trevor Batley <trevor@batley.id.au> 5.2.1-1 |
55 |
- Initial import to sme10 |
- Initial import to sme10 |
56 |
- requires phpvirtualbox 5.2.1, smeserver-virtualbox 5.2 |
- requires phpvirtualbox 5.2.1, smeserver-virtualbox 5.2 |
57 |
- upgrade to httpd 2.4 |
- upgrade to httpd 2.4 |
89 |
|
|
90 |
%prep |
%prep |
91 |
%setup |
%setup |
92 |
|
%patch0 -p1 |
93 |
|
%patch1 -p1 |
94 |
|
%patch2 -p1 |
95 |
|
%patch3 -p1 |
96 |
|
|
97 |
%build |
%build |
98 |
perl createlinks |
perl createlinks |
99 |
|
|
101 |
rm -rf $RPM_BUILD_ROOT |
rm -rf $RPM_BUILD_ROOT |
102 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
103 |
rm -f %{name}-%{version}-filelist |
rm -f %{name}-%{version}-filelist |
104 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist |
mkdir -p /opt/vbox/{ISOs,VMs} |
105 |
echo "%doc COPYING" >> %{name}-%{version}-filelist |
mkdir -p /var/log/php/phpvirtualbox |
106 |
|
mkdir -p /var/lib/php/phpvirtualbox/{opcache,tmp,session} |
107 |
|
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
108 |
|
--dir /opt/vbox 'attr(0755,vbox,vboxusers)' \ |
109 |
|
--dir /opt/vbox/ISOs 'attr(0774,vbox,vboxusers)' \ |
110 |
|
--dir /opt/vbox/VMs 'attr(0774,vbox,vboxusers)' \ |
111 |
|
--dir /var/log/php/phpvirtualbox 'attr(0755,www,www)' \ |
112 |
|
--dir /var/lib/php/phpvirtualbox 'attr(0755,www,www)' \ |
113 |
|
--dir /var/lib/php/phpvirtualbox/tmp 'attr(0755,www,www)' \ |
114 |
|
--dir /var/lib/php/phpvirtualbox/opcache 'attr(0755,www,www)' \ |
115 |
|
--dir /var/lib/php/phpvirtualbox/session 'attr(0755,www,www)' \ |
116 |
|
> %{name}-%{version}-filelist |
117 |
|
|
118 |
%clean |
%clean |
119 |
cd .. |
cd .. |
125 |
|
|
126 |
%post |
%post |
127 |
|
|
|
echo "==============================================================" |
|
|
echo " Please do not forget to install the extension pack " |
|
|
echo " You need it to activate the virtualbox RDP server" |
|
|
echo " And many features, see this page to manage it by CL" |
|
|
echo " " |
|
|
echo " https://www.virtualbox.org/manual/ch08.html#vboxmanage-extpack" |
|
|
echo " " |
|
|
echo " The download page : https://www.virtualbox.org/wiki/Downloads" |
|
|
echo "==============================================================" |
|
|
|
|
|
|
|
128 |
%postun |
%postun |
129 |
#uninstall |
#uninstall |
130 |
if [ $1 = 0 ] ; then |
if [ $1 = 0 ] ; then |