From nobody Fri Jun 7 16:30:29 2024 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vwms20mg5z5LK9d; Fri, 07 Jun 2024 16:30:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vwms20C8qz4s6n; Fri, 7 Jun 2024 16:30:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717777830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o6ZYFfF11fkjRg/4iQNue4XN/yrLGoFGQdj8rdU0ELo=; b=goVyiLiEXAZ39ea4cmI8x9/K7fT1AlnjyclXTWlf8WA4kxSj3y7gbHuGxFbYob6RVkU803 l5v81ZGv68cdmLj5kxzvfYEQzjumqm4LXkJjptbhhPfqNH0KZw/AQCn2jeEMiRtf0YL28z GWbtYHtPIG7XfkRUt2n3f1W9jVyZ3R74meTIgyCRME2WyPHSbVu1KP1Cdh3OkdcyPfS6Sr 4Dh0G34UNoWKUYx6y84iOZCRe5BcrUaFnl9AhnuszaM2YdP+ANxAgU185aeRyECO0g2aKE xYkBR4SLLZ0ZYjQEAUR3Pm228XRtxBj6ZxmYhkfwjljrqetnAiG3u0akpavHWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717777830; a=rsa-sha256; cv=none; b=fJQBT9nhrMdqFvogCh1+aCy7UMqpgUncVbe3EP/1Fsz0VFfuex0nPvV6tX8YhMB5gpgQd3 CcWv07d8jjPmbGA3poLXPSyLznpoGL+GtCLTjlEvz2j1Yh4xd7V8uO6030sn5dW/m+9/Cw YgIhF/V4q5Q4YxcAYnVHEHbNCKNmOZosYXZbCZX3SIc7nV3hwjt9UbwKdvkON/2GjJ9Sx6 mgWzYrG6e4aU6pEOYO8YnYBAneW7KQEI/52oij+PXhD856ForapUikv5+Hwce/GonUPKv2 kLmHFg40smtwvdzkHfNXM8UYxhAVe8A7Vi3HKcOhg+u7Bwn3HQwNrf+xDZHX/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717777830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o6ZYFfF11fkjRg/4iQNue4XN/yrLGoFGQdj8rdU0ELo=; b=TpDHSPGXAct3fbXgSSqijl7YjoC041SfEMU/xlTJXFykWHbhT5MAaDKWToaHxubGfkpt9n 3hO0N8aXepSfctLfnaRWGX0fP8pb9tKvEhhk9b+lF8SqhzKRt7JAByABBjtpO/M+lrHxsG 9LGP2RbIsyk89m6MPt/WGmHP8VTbcNloE1VAyz6sQTarAqnRsMtHDE9o61vJzueB6rLiUX Vx4ylcf8CSoaZ81xEcSoJmolRh3IU5A8Q3J+DRw0sQGOnSb27ZxET90E07+GOopNfGPSpl Q2Fa/Q8VALwWKJYHPEIdIooWMaZ/7RGZGeb5C3zbkuF7KC/IwnQdRVHST8i+FA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vwms16pMVzLtT; Fri, 7 Jun 2024 16:30:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 457GUTJo049444; Fri, 7 Jun 2024 16:30:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 457GUT9T049441; Fri, 7 Jun 2024 16:30:29 GMT (envelope-from git) Date: Fri, 7 Jun 2024 16:30:29 GMT Message-Id: <202406071630.457GUT9T049441@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Vladimir Druzenko Subject: git: c8ee98641064 - main - www/phpvirtualbox{,-legacy}: PHP 8.2 support - "utf8_encode()" List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-all@freebsd.org Sender: owner-dev-commits-ports-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vvd X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c8ee98641064dad1082c655e05c7a1f179322bfe Auto-Submitted: auto-generated The branch main has been updated by vvd: URL: https://cgit.FreeBSD.org/ports/commit/?id=c8ee98641064dad1082c655e05c7a1f179322bfe commit c8ee98641064dad1082c655e05c7a1f179322bfe Author: Vladimir Druzenko AuthorDate: 2024-06-07 16:17:07 +0000 Commit: Vladimir Druzenko CommitDate: 2024-06-07 16:17:07 +0000 www/phpvirtualbox{,-legacy}: PHP 8.2 support - "utf8_encode()" "Show Log" for a VM failed with error: "Function utf8_encode() is deprecated". It's deprecated since PHP 8.2 and will be removed in PHP 9. There is little sense in encoding logs - remove it. While here refresh my patches with make makepatch. PR: 261498 Approved by: portmgr (blanket, fix run) MFH: 2024Q2 --- www/phpvirtualbox-legacy/Makefile | 2 +- www/phpvirtualbox/Makefile | 2 +- www/phpvirtualbox/files/patch-php8 | 136 ++++++++++++++++++++----------------- 3 files changed, 76 insertions(+), 64 deletions(-) diff --git a/www/phpvirtualbox-legacy/Makefile b/www/phpvirtualbox-legacy/Makefile index be0c78bb5205..623174262c8e 100644 --- a/www/phpvirtualbox-legacy/Makefile +++ b/www/phpvirtualbox-legacy/Makefile @@ -1,6 +1,6 @@ PORTNAME= phpvirtualbox DISTVERSION= 5.2-1 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= www PKGNAMESUFFIX= -legacy diff --git a/www/phpvirtualbox/Makefile b/www/phpvirtualbox/Makefile index 7569c308c855..1b7443882cd5 100644 --- a/www/phpvirtualbox/Makefile +++ b/www/phpvirtualbox/Makefile @@ -1,6 +1,6 @@ PORTNAME= phpvirtualbox DISTVERSION= 6.1 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= www MAINTAINER= vbox@FreeBSD.org diff --git a/www/phpvirtualbox/files/patch-php8 b/www/phpvirtualbox/files/patch-php8 index 12783b19f800..318b3c4b5a58 100644 --- a/www/phpvirtualbox/files/patch-php8 +++ b/www/phpvirtualbox/files/patch-php8 @@ -1,7 +1,6 @@ -diff -ur endpoints/api.php.orig endpoints/api.php ---- endpoints/api.php.orig +--- endpoints/api.php.orig 2024-06-07 15:46:20 UTC +++ endpoints/api.php -@@ -334,6 +334,9 @@ +@@ -334,6 +334,9 @@ try { // Just append to $vbox->errors and let it get // taken care of below @@ -11,7 +10,7 @@ diff -ur endpoints/api.php.orig endpoints/api.php if(!$vbox || !$vbox->errors) { $vbox->errors = array(); } -@@ -342,7 +345,7 @@ +@@ -342,7 +345,7 @@ try { // Add any messages @@ -20,7 +19,7 @@ diff -ur endpoints/api.php.orig endpoints/api.php foreach($vbox->messages as $m) $response['messages'][] = 'vboxconnector('.$request['fn'] .'): ' . $m; } -@@ -360,7 +363,7 @@ +@@ -360,7 +363,7 @@ if($vbox && $vbox->errors) { if($e->getCode() == vboxconnector::PHPVB_ERRNO_CONNECT && isset($vbox->settings)) $d .= "\n\nLocation:" . $vbox->settings->location; @@ -29,10 +28,9 @@ diff -ur endpoints/api.php.orig endpoints/api.php $response['errors'][] = array( 'error'=> ($e->getCode() & vboxconnector::PHPVB_ERRNO_HTML ? $e->getMessage() : htmlentities($e->getMessage())), -diff -ur endpoints/jqueryFileTree.php.orig endpoints/jqueryFileTree.php ---- endpoints/jqueryFileTree.php.orig +--- endpoints/jqueryFileTree.php.orig 2024-06-07 15:46:20 UTC +++ endpoints/jqueryFileTree.php -@@ -223,6 +223,8 @@ +@@ -223,6 +223,8 @@ function getdir($dir, $dirsOnly=false, $recurse=array( */ function getdir($dir, $dirsOnly=false, $recurse=array()) { @@ -41,7 +39,7 @@ diff -ur endpoints/jqueryFileTree.php.orig endpoints/jqueryFileTree.php if(!$dir) $dir = DSEP; $entries = getDirEntries($dir, $dirsOnly); -@@ -251,9 +253,9 @@ +@@ -251,9 +253,9 @@ function getdir($dir, $dirsOnly=false, $recurse=array( // Push file on to stack } else { @@ -53,10 +51,22 @@ diff -ur endpoints/jqueryFileTree.php.orig endpoints/jqueryFileTree.php array_push($dirents, file_entry($path)); } -diff -ur endpoints/lib/language.php.orig endpoints/lib/language.php ---- endpoints/lib/language.php.orig +--- endpoints/lib/config.php.orig 2024-06-07 15:46:20 UTC ++++ endpoints/lib/config.php +@@ -141,6 +141,10 @@ class phpVBoxConfigClass { + */ + var $eventListenerTimeout = 20; + ++ var $enableHDFlushConfig = false; ++ ++ var $authMaster = false; ++ + /** + * Read user configuration, apply defaults, and do some sanity checking + * @see vboxconnector +--- endpoints/lib/language.php.orig 2024-06-07 15:46:20 UTC +++ endpoints/lib/language.php -@@ -73,6 +73,8 @@ +@@ -73,6 +73,8 @@ class __vbox_language { $xmlObj = simplexml_load_string(@file_get_contents(VBOX_BASE_LANG_DIR.'/'.$lang.'.xml')); $arrXml = $this->objectsIntoArray($xmlObj); @@ -65,10 +75,9 @@ diff -ur endpoints/lib/language.php.orig endpoints/lib/language.php $lang = array(); if(!@$arrXml['context'][0]) $arrXml['context'] = array($arrXml['context']); foreach($arrXml['context'] as $c) { -diff -ur endpoints/lib/vboxServiceWrappers.php.orig endpoints/lib/vboxServiceWrappers.php ---- endpoints/lib/vboxServiceWrappers.php.orig +--- endpoints/lib/vboxServiceWrappers.php.orig 2024-06-07 15:46:20 UTC +++ endpoints/lib/vboxServiceWrappers.php -@@ -108,7 +108,7 @@ +@@ -108,7 +108,7 @@ abstract class VBox_Collection implements ArrayAccess, } /** ArrayAccess Functions **/ @@ -77,7 +86,7 @@ diff -ur endpoints/lib/vboxServiceWrappers.php.orig endpoints/lib/vboxServiceWra { if ($value instanceof $this->_interfaceName) { -@@ -127,49 +127,50 @@ +@@ -127,49 +127,50 @@ abstract class VBox_Collection implements ArrayAccess, } } @@ -136,10 +145,49 @@ diff -ur endpoints/lib/vboxServiceWrappers.php.orig endpoints/lib/vboxServiceWra { return count($this->_objects); } -diff -ur endpoints/screen.php.orig endpoints/screen.php ---- endpoints/screen.php.orig +--- endpoints/lib/vboxconnector.php.orig 2024-06-07 15:46:20 UTC ++++ endpoints/lib/vboxconnector.php +@@ -112,6 +112,8 @@ class vboxconnector { + */ + var $dsep = null; + ++ var $client = null; ++ + /** + * Obtain configuration settings and set object vars + * @param boolean $useAuthMaster use the authentication master obtained from configuration class +@@ -387,7 +389,8 @@ class vboxconnector { + + // The amount of time we will wait for events is determined by + // the amount of listeners - at least half a second +- $listenerWait = max(100,intval(500/count($this->persistentRequest['vboxEventListeners']))); ++ $listenerCount = count($this->persistentRequest['vboxEventListeners']); ++ $listenerWait = max(100,intval(500/($listenerCount > 0 ? $listenerCount : 1))); + } + + // Get events from each configured event listener +@@ -5660,11 +5663,6 @@ class vboxconnector { + } + } catch (Exception $null) {} + $m->releaseRemote(); +- +- // Attempt to UTF-8 encode string or json_encode may choke +- // and return an empty string +- if(function_exists('utf8_encode')) +- return utf8_encode($log); + + return $log; + } +@@ -5855,4 +5853,4 @@ class vboxconnector { + + return @$rcodes['0x'.strtoupper(dechex($c))] . ' (0x'.strtoupper(dechex($c)).')'; + } +-} +\ No newline at end of file ++} +--- endpoints/screen.php.orig 2024-06-07 15:46:20 UTC +++ endpoints/screen.php -@@ -87,13 +87,13 @@ +@@ -87,13 +87,13 @@ try { // Let the browser cache images for 3 seconds $ctime = 0; @@ -158,8 +206,8 @@ diff -ur endpoints/screen.php.orig endpoints/screen.php + } else if(strpos($_ENV['HTTP_IF_MODIFIED_SINCE'] ?? '','GMT')) { $ctime = strtotime($_ENV['HTTP_IF_MODIFIED_SINCE']); } - -@@ -164,13 +164,13 @@ + +@@ -164,13 +164,13 @@ try { // Let the browser cache saved state images $ctime = 0; @@ -178,11 +226,10 @@ diff -ur endpoints/screen.php.orig endpoints/screen.php + } else if(strpos($_ENV['HTTP_IF_MODIFIED_SINCE'] ?? '','GMT')) { $ctime = strtotime($_ENV['HTTP_IF_MODIFIED_SINCE']); } - -diff -ur panes/settingsDisplay.html.orig panes/settingsDisplay.html ---- panes/settingsDisplay.html.orig + +--- panes/settingsDisplay.html.orig 2024-06-07 15:46:20 UTC +++ panes/settingsDisplay.html -@@ -77,9 +77,9 @@ +@@ -77,9 +77,9 @@ --> Authentication Method: -diff -ur panes/settingsNetwork.html.orig panes/settingsNetwork.html ---- panes/settingsNetwork.html.orig +--- panes/settingsNetwork.html.orig 2024-06-07 15:46:20 UTC +++ panes/settingsNetwork.html -@@ -320,7 +320,7 @@ +@@ -320,7 +320,7 @@ function vboxSettingsUpdateNetworkOptions(sel) { } // Special case for Internal, Generic, and VDE network selects @@ -207,37 +253,3 @@ diff -ur panes/settingsNetwork.html.orig panes/settingsNetwork.html $(nsel).jec(); } ---- endpoints/lib/config.php.orig -+++ endpoints/lib/config.php -@@ -141,6 +141,10 @@ - */ - var $eventListenerTimeout = 20; - -+ var $enableHDFlushConfig = false; -+ -+ var $authMaster = false; -+ - /** - * Read user configuration, apply defaults, and do some sanity checking - * @see vboxconnector ---- endpoints/lib/vboxconnector.php.orig -+++ endpoints/lib/vboxconnector.php -@@ -112,6 +112,8 @@ - */ - var $dsep = null; - -+ var $client = null; -+ - /** - * Obtain configuration settings and set object vars - * @param boolean $useAuthMaster use the authentication master obtained from configuration class -@@ -389,7 +389,8 @@ - - // The amount of time we will wait for events is determined by - // the amount of listeners - at least half a second -- $listenerWait = max(100,intval(500/count($this->persistentRequest['vboxEventListeners']))); -+ $listenerCount = count($this->persistentRequest['vboxEventListeners']); -+ $listenerWait = max(100,intval(500/($listenerCount > 0 ? $listenerCount : 1))); - } - - // Get events from each configured event listener