- Update to 5.2-0

Submitted by:	Derek Schrock (dereks_lifeofadishwasher.com)
Differential Revision:	https://reviews.freebsd.org/D14430
This commit is contained in:
Li-Wen Hsu 2018-02-19 07:17:08 +00:00
parent 1ce64c50e1
commit cbea043600
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=462281
8 changed files with 10 additions and 2909 deletions

View file

@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= phpvirtualbox
DISTVERSION= 5.1-1
DISTVERSION= 5.2-0
PORTREVISION= 1
CATEGORIES= www
@ -17,14 +17,12 @@ USES= dos2unix php
USE_PHP= json session simplexml soap xml
USE_GITHUB= yes
GH_TAGNAME= 65ebced
DOS2UNIX_REGEX= .*\.(php|txt|js|css|html)
ETCDIR= ${WWWDIR}
post-patch:
@${MV} ${WRKSRC}/endpoints/lib/vboxweb-5.0.wsdl ${WRKSRC}/endpoints/lib/vboxweb-5.1.wsdl
@${MV} ${WRKSRC}/endpoints/lib/vboxwebService-5.0.wsdl ${WRKSRC}/endpoints/lib/vboxwebService-5.1.wsdl
@${REINPLACE_CMD} -e 's#/usr/share/phpvirtualbox#${WWWDIR}#g' ${WRKSRC}/phpvirtualbox.conf
do-install:
${MKDIR} ${STAGEDIR}${WWWDIR}

View file

@ -1,3 +1,3 @@
TIMESTAMP = 1501174865
SHA256 (phpvirtualbox-phpvirtualbox-5.1-1-65ebced_GH0.tar.gz) = d7b36c84aa2cf8be650f6da74860a4af4abf17bd878590e31fd948f45ed51753
SIZE (phpvirtualbox-phpvirtualbox-5.1-1-65ebced_GH0.tar.gz) = 3716806
TIMESTAMP = 1518995447
SHA256 (phpvirtualbox-phpvirtualbox-5.2-0_GH0.tar.gz) = 4fc5900a63276a96a6c2e1ce169b630dc5ca78432bd73655d790a624241aad2e
SIZE (phpvirtualbox-phpvirtualbox-5.2-0_GH0.tar.gz) = 3897622

View file

@ -1,11 +0,0 @@
--- endpoints/lib/config.php.orig 2017-07-27 16:54:58 UTC
+++ endpoints/lib/config.php
@@ -14,7 +14,7 @@
/*
* This version of phpVirtualBox
*/
-define('PHPVBOX_VER', '5.0-6');
+define('PHPVBOX_VER', '5.1-1');
class phpVBoxConfigClass {

View file

@ -1,13 +0,0 @@
--- endpoints/lib/vboxServiceWrappers.php.orig 2017-07-27 16:54:58 UTC
+++ endpoints/lib/vboxServiceWrappers.php
@@ -7889,6 +7889,10 @@ class IMedium extends VBox_ManagedObject
public function changeEncryption($arg_currentPassword, $arg_cipher, $arg_newPassword, $arg_newPasswordId)
{
+ // No password ID in case of decryption and de-/encryption are both handled here.
+ $isDecryption = ($arg_cipher == '') && ($arg_newPassword == '');
+ $arg_newPasswordId = $isDecryption ? '' : $arg_newPasswordId;
+
$request = new stdClass();
$request->_this = $this->handle;
$request->currentPassword = $arg_currentPassword;

View file

@ -1,218 +0,0 @@
--- endpoints/lib/vboxconnector.php.orig 2017-07-27 16:54:58 UTC
+++ endpoints/lib/vboxconnector.php
@@ -1126,7 +1126,7 @@ class vboxconnector {
// Try to register medium.
foreach($checks as $iso) {
try {
- $gem = $this->vbox->openMedium($iso,'DVD','ReadOnly');
+ $gem = $this->vbox->openMedium($iso,'DVD','ReadOnly',false);
break;
} catch (Exception $e) {
// Ignore
@@ -1358,7 +1358,7 @@ class vboxconnector {
$src = $nsrc->machine;
}
/* @var $m IMachine */
- $m = $this->vbox->createMachine($this->vbox->composeMachineFilename($args['name'],null,null),$args['name'],null,null,null,false);
+ $m = $this->vbox->createMachine($this->vbox->composeMachineFilename($args['name'],null,null,null),$args['name'],null,null,null,false);
$sfpath = $m->settingsFilePath;
/* @var $cm CloneMode */
@@ -1522,7 +1522,7 @@ class vboxconnector {
$md->releaseRemote();
}
} else {
- $med = $this->vbox->openMedium($ma['medium']['location'],$ma['type']);
+ $med = $this->vbox->openMedium($ma['medium']['location'],$ma['type'],'ReadWrite',false);
}
} else {
$med = null;
@@ -1591,7 +1591,7 @@ class vboxconnector {
if($state != 'Saved') {
// Network properties
- $eprops = $n->getProperties();
+ $eprops = $n->getProperties(null);
$eprops = array_combine($eprops[1],$eprops[0]);
$iprops = array_map(create_function('$a','$b=explode("=",$a); return array($b[0]=>$b[1]);'),preg_split('/[\r|\n]+/',$args['networkAdapters'][$i]['properties']));
$inprops = array();
@@ -1942,7 +1942,7 @@ class vboxconnector {
if($args['bootOrder'][$i]) {
$m->setBootOrder(($i + 1),$args['bootOrder'][$i]);
} else {
- $m->setBootOrder(($i + 1),null);
+ $m->setBootOrder(($i + 1),'Null');
}
}
@@ -2028,7 +2028,7 @@ class vboxconnector {
}
} else {
/* @var $med IMedium */
- $med = $this->vbox->openMedium($ma['medium']['location'],$ma['type']);
+ $med = $this->vbox->openMedium($ma['medium']['location'],$ma['type'],'ReadWrite',false);
}
} else {
$med = null;
@@ -2111,7 +2111,7 @@ class vboxconnector {
*/
// Network properties
- $eprops = $n->getProperties();
+ $eprops = $n->getProperties(null);
$eprops = array_combine($eprops[1],$eprops[0]);
$iprops = array_map(create_function('$a','$b=explode("=",$a); return array($b[0]=>$b[1]);'),preg_split('/[\r|\n]+/',$args['networkAdapters'][$i]['properties']));
$inprops = array();
@@ -2519,7 +2519,7 @@ class vboxconnector {
*/
public function remote_vboxGetEnumerationMap($args) {
- $c = new $args['class'];
+ $c = new $args['class'](null,null);
return (@isset($args['ValueMap']) ? $c->ValueMap : $c->NameMap);
}
@@ -3697,7 +3697,7 @@ class vboxconnector {
$hds = array();
$delete = $machine->unregister('DetachAllReturnHardDisksOnly');
foreach($delete as $hd) {
- $hds[] = $this->vbox->openMedium($hd->location,'HardDisk')->handle;
+ $hds[] = $this->vbox->openMedium($hd->location,'HardDisk','ReadWrite',false)->handle;
}
/* @var $progress IProgress */
@@ -3772,7 +3772,7 @@ class vboxconnector {
$args['name'] = $_SESSION['user'] . '_' . $args['name'];
/* Check if file exists */
- $filename = $this->vbox->composeMachineFilename($args['name'],($this->settings->phpVboxGroups ? '' : $args['group']),$this->vbox->systemProperties->defaultMachineFolder);
+ $filename = $this->vbox->composeMachineFilename($args['name'],($this->settings->phpVboxGroups ? '' : $args['group']),$this->vbox->systemProperties->defaultMachineFolder,null);
if($this->remote_fileExists(array('file'=>$filename))) {
return array('exists' => $filename);
@@ -3874,7 +3874,7 @@ class vboxconnector {
$sc->releaseRemote();
- $m = $this->vbox->openMedium($args['disk'],'HardDisk');
+ $m = $this->vbox->openMedium($args['disk'],'HardDisk','ReadWrite',false);
$this->session->machine->attachDevice(trans($HDbusType,'UIMachineSettingsStorage'),0,0,'HardDisk',$m->handle);
@@ -3941,7 +3941,7 @@ class vboxconnector {
if($at == 'NAT') $nd = $n->NATEngine; /* @var $nd INATEngine */
else $nd = null;
- $props = $n->getProperties();
+ $props = $n->getProperties(null);
$props = implode("\n",array_map(create_function('$a,$b','return "$a=$b";'),$props[1],$props[0]));
$adapters[] = array(
@@ -4381,7 +4381,7 @@ class vboxconnector {
}
try {
- $this->session->console->addDiskEncryptionPassword($creds['id'], $creds['password'], (bool)@$args['clearOnSuspend']);
+ $this->session->console->addDiskEncryptionPassword($creds['id'], $creds['password'], (bool)$creds['clearOnSuspend']);
$response['accepted'][] = $creds['id'];
} catch (Exception $e) {
$response['failed'][] = $creds['id'];
@@ -4690,7 +4690,7 @@ class vboxconnector {
$machine->lockMachine($this->session->handle, ((string)$machine->sessionState == 'Unlocked' ? 'Write' : 'Shared'));
/* @var $progress IProgress */
- list($progress, $snapshotId) = $this->session->machine->takeSnapshot($args['name'], $args['description']);
+ list($progress, $snapshotId) = $this->session->machine->takeSnapshot($args['name'], $args['description'], null);
// Does an exception exist?
try {
@@ -4853,7 +4853,7 @@ class vboxconnector {
// Connect to vboxwebsrv
$this->connect();
- $m = $this->vbox->openMedium($args['medium'],'HardDisk');
+ $m = $this->vbox->openMedium($args['medium'],'HardDisk','ReadWrite',false);
$retval = $m->checkEncryptionPassword($args['password']);
@@ -4874,7 +4874,7 @@ class vboxconnector {
// Connect to vboxwebsrv
$this->connect();
- $m = $this->vbox->openMedium($args['medium'], 'HardDisk', 'ReadWrite');
+ $m = $this->vbox->openMedium($args['medium'], 'HardDisk', 'ReadWrite', false);
/* @var $progress IProgress */
$progress = $m->changeEncryption($args['old_password'],
@@ -4915,7 +4915,7 @@ class vboxconnector {
// Connect to vboxwebsrv
$this->connect();
- $m = $this->vbox->openMedium($args['medium'], 'HardDisk');
+ $m = $this->vbox->openMedium($args['medium'], 'HardDisk', 'ReadWrite', false);
/* @var $progress IProgress */
$progress = $m->resize($args['bytes']);
@@ -4953,7 +4953,7 @@ class vboxconnector {
$mid = $target->id;
/* @var $src IMedium */
- $src = $this->vbox->openMedium($args['src'], 'HardDisk');
+ $src = $this->vbox->openMedium($args['src'], 'HardDisk', 'ReadWrite', false);
$type = array(($args['type'] == 'fixed' ? 'Fixed' : 'Standard'));
if($args['split']) $type[] = 'VmdkSplit2G';
@@ -4991,7 +4991,7 @@ class vboxconnector {
$this->connect();
/* @var $m IMedium */
- $m = $this->vbox->openMedium($args['medium'], 'HardDisk');
+ $m = $this->vbox->openMedium($args['medium'], 'HardDisk', 'ReadWrite', false);
$m->type = $args['type'];
$m->releaseRemote();
@@ -5074,7 +5074,7 @@ class vboxconnector {
// Connect to vboxwebsrv
$this->connect();
- return $this->vbox->composeMachineFilename($args['name'],($this->settings->phpVboxGroups ? '' : $args['group']),$this->vbox->systemProperties->defaultMachineFolder);
+ return $this->vbox->composeMachineFilename($args['name'],($this->settings->phpVboxGroups ? '' : $args['group']),$this->vbox->systemProperties->defaultMachineFolder,null);
}
@@ -5129,7 +5129,7 @@ class vboxconnector {
$this->connect();
/* @var $m IMedium */
- $m = $this->vbox->openMedium($args['medium'],$args['type']);
+ $m = $this->vbox->openMedium($args['medium'],$args['type'],'ReadWrite',false);
$mediumid = $m->id;
// connected to...
@@ -5211,7 +5211,7 @@ class vboxconnector {
if(!$args['type']) $args['type'] = 'HardDisk';
/* @var $m IMedium */
- $m = $this->vbox->openMedium($args['medium'],$args['type']);
+ $m = $this->vbox->openMedium($args['medium'],$args['type'],'ReadWrite',false);
if($args['delete'] && @$this->settings->deleteOnRemove && (string)$m->deviceType == 'HardDisk') {
@@ -5380,7 +5380,7 @@ class vboxconnector {
// Normal medium
} else {
/* @var $med IMedium */
- $med = $this->vbox->openMedium($args['medium']['location'],$args['medium']['deviceType']);
+ $med = $this->vbox->openMedium($args['medium']['location'],$args['medium']['deviceType'],'ReadWrite',false);
}
}
@@ -5445,7 +5445,7 @@ class vboxconnector {
}
// For $fixed value
- $mvenum = new MediumVariant();
+ $mvenum = new MediumVariant(null,null);
$variant = 0;
foreach($m->variant as $mv) {

File diff suppressed because it is too large Load diff

View file

@ -1,11 +0,0 @@
--- endpoints/lib/vboxwebService-5.0.wsdl 2017-07-10 13:31:02 UTC
+++ endpoints/lib/vboxwebService-5.1.wsdl
@@ -5,7 +5,7 @@
Generator: src/VBox/Main/webservice/websrv-wsdl-service.xsl
-->
<definitions xmlns:interface="urn:vbox" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:vbox="http://www.virtualbox.org/" xmlns="http://schemas.xmlsoap.org/wsdl/" name="VirtualBox" targetNamespace="http://www.virtualbox.org/Service">
- <import location="vboxweb-5.0.wsdl" namespace="http://www.virtualbox.org/"/>
+ <import location="vboxweb-5.1.wsdl" namespace="http://www.virtualbox.org/"/>
<service name="vboxService">
<port binding="vbox:vboxBinding" name="vboxServicePort">
<soap:address location="http://localhost:18083/"/>

View file

@ -30,8 +30,8 @@
%%WWWDIR%%/endpoints/lib/utils.php
%%WWWDIR%%/endpoints/lib/vboxServiceWrappers.php
%%WWWDIR%%/endpoints/lib/vboxconnector.php
%%WWWDIR%%/endpoints/lib/vboxweb-5.1.wsdl
%%WWWDIR%%/endpoints/lib/vboxwebService-5.1.wsdl
%%WWWDIR%%/endpoints/lib/vboxweb-5.2.wsdl
%%WWWDIR%%/endpoints/lib/vboxwebService-5.2.wsdl
%%WWWDIR%%/endpoints/rdp.php
%%WWWDIR%%/endpoints/screen.php
%%WWWDIR%%/images/30white.png
@ -489,6 +489,7 @@
%%WWWDIR%%/js/jquery.tipped-2.1b.min.js
%%WWWDIR%%/js/phpvirtualbox.js
%%WWWDIR%%/js/utils.js
%%WWWDIR%%/languages/cs.xml
%%WWWDIR%%/languages/de.xml
%%WWWDIR%%/languages/en.xml
%%WWWDIR%%/languages/es.xml
@ -501,6 +502,7 @@
%%WWWDIR%%/languages/pt_br.xml
%%WWWDIR%%/languages/ro.xml
%%WWWDIR%%/languages/ru.xml
%%WWWDIR%%/languages/source/cs.dat
%%WWWDIR%%/languages/source/de.dat
%%WWWDIR%%/languages/source/en.dat
%%WWWDIR%%/languages/source/es.dat
@ -564,6 +566,7 @@
%%WWWDIR%%/panes/wizardNewHDAdvanced.html
%%WWWDIR%%/panes/wizardNewVM.html
%%WWWDIR%%/panes/wizardNewVMAdvanced.html
%%WWWDIR%%/phpvirtualbox.conf
%%WWWDIR%%/rdpweb/RDPClientUI.swf
%%WWWDIR%%/rdpweb/license_3rd.txt
%%WWWDIR%%/rdpweb/swfobject.js