--- rpms/smeserver-phpvirtualbox/contribs10/smeserver-phpvirtualbox.spec 2022/10/18 09:07:10 1.2 +++ rpms/smeserver-phpvirtualbox/contribs10/smeserver-phpvirtualbox.spec 2023/03/10 02:37:14 1.9 @@ -1,6 +1,6 @@ %define name smeserver-phpvirtualbox %define version 5.2.1 -%define release 1 +%define release 4 %define rpmver 5.2.1 Summary: smserver rpm to install phpvirtualbox Name: %{name} @@ -18,6 +18,9 @@ Requires: e-smith-release >= 10.0 Requires: php-soap Requires: phpvirtualbox = 5.2.1 Requires: smeserver-virtualbox = 5.2 +Patch0: smeserver-phpvirtualbox-5.2.1-move_vbox_dir.patch +Patch1: smeserver-phpvirtualbox-5.2.1-remove_vbox_passwd.patch +Patch2: smeserver-phpvirtualbox-5.2.1-multiple_changes.patch AutoReqProv: no %description @@ -27,7 +30,27 @@ administer VirtualBox in a headless envi phpvirtualbox version MUST align with VirtualBox version (i.e. VirtualBox-6.1 requires phpvirtualbox-6.1) %changelog -* Tue Oct 11 2022 Trevor Batley 5.2-1 +* Fri Mar 10 2023 Trevor Batley 5.2.1-4 +- add vbox password back into config.php +- replace /etc/php-fpm.d/phpvirtualbox with /etc/php-fpm.d/www.conf fragment and expand during update +- remove webauth config db item and add authType, with multiple values +- add support for BuiltIn, WebAuth (default), LDAP and AD authentication +- rename config items User => Users, Group => userGroups and add adminUser +- remove defaults for User and Group config items +- add basic default values for config.php as config db items (with same name) and allow entry of other config items +- create /var/lib/php/phpvirtualbox directories (opcache, session, tmp) with www:www ownership and 0755 permissions +- correct permissions on log files +- add smb.conf fragment to allow vboxuser and any userGroups access to /opt/vbox (VMs & ISOs) directories +- add restart of httpd-e-smith and smbd services on update +- create template2expand directive for virtualbox update (which generates/saves new password) for /opt/phpvirtualbox/config.php + +* Thu Oct 20 2022 Trevor Batley 5.2.1-3 +- remove vbox passwd from config.php + +* Wed Oct 19 2022 Trevor Batley 5.2.1-2 +- vbox user home directory moved + +* Tue Oct 11 2022 Trevor Batley 5.2.1-1 - Initial import to sme10 - requires phpvirtualbox 5.2.1, smeserver-virtualbox 5.2 - upgrade to httpd 2.4 @@ -65,6 +88,10 @@ phpvirtualbox version MUST align with Vi %prep %setup +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 + %build perl createlinks @@ -72,8 +99,19 @@ perl createlinks rm -rf $RPM_BUILD_ROOT (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) rm -f %{name}-%{version}-filelist -/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist -echo "%doc COPYING" >> %{name}-%{version}-filelist +mkdir -p $RPM_BUILD_ROOT/opt/vbox/{ISOs,VMs} +mkdir -p $RPM_BUILD_ROOT/var/log/php/phpvirtualbox +mkdir -p $RPM_BUILD_ROOT/var/lib/php/phpvirtualbox/{opcache,tmp,session} +/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ + --dir /opt/vbox 'attr(0755,vbox,vboxusers)' \ + --dir /opt/vbox/ISOs 'attr(0774,vbox,vboxusers)' \ + --dir /opt/vbox/VMs 'attr(0774,vbox,vboxusers)' \ + --dir /var/log/php/phpvirtualbox 'attr(0755,www,www)' \ + --dir /var/lib/php/phpvirtualbox 'attr(0755,www,www)' \ + --dir /var/lib/php/phpvirtualbox/tmp 'attr(0755,www,www)' \ + --dir /var/lib/php/phpvirtualbox/opcache 'attr(0755,www,www)' \ + --dir /var/lib/php/phpvirtualbox/session 'attr(0755,www,www)' \ + > %{name}-%{version}-filelist %clean cd .. @@ -85,17 +123,6 @@ rm -rf %{name}-%{version} %post -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 "==============================================================" - - %postun #uninstall if [ $1 = 0 ] ; then