From nobody Sun Jan 5 01:54:10 2025 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 4YQgN25Jrcz5k8M2; Sun, 05 Jan 2025 01:54:10 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YQgN24h4Nz4nyV; Sun, 5 Jan 2025 01:54:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736042050; 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=9yVu4XmTluLjeB1801zvd6dtx8VirONty/WWhxMnQ58=; b=hDcjmlDVdH9d5QEqglbL+PH1X4xwYg5T/5MjsPBMYLNAdC85Ytp9fjNSrC/Bpfv3BpHDyi S30/BYORK0XQxTs3JGLy2+W1qw4NKVGuyDNqZdaO8TjTKZ2sSe+qWJhbO/W0U27gXLwku3 AEKply4gE5CruYwu5FEHopJFS+jxrc5tfAWOh8c6cDWQVRxyF8iU4iTWii7ey6oZhKcrmB m9ySR5cBtvMeH2K337WJye0iZB9wJxApDjvsDnYJY2kQ+2jQSn4GkHejMDHGk/MoKruRp7 7M05BZmqP1RLLdae8QAv6YV8OrBRAU/mA4ht1qEsf8o2g74TzUOGt+mb1UhIKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736042050; 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=9yVu4XmTluLjeB1801zvd6dtx8VirONty/WWhxMnQ58=; b=F+xX3O6J2ZcwBcvBf5zmmVoXRg3N73xPBRcEwCbh1/4HCjJTuAyl5b6FDO4FB010Q2Bh+E jJAgoUuOnon2V7W41bL8aXliT/Aobd24Eh434V0L3hmc2+MKjEte5RvovSr6NP7wTT9Kaw k9bk8InaxRvdwOWn9rvCgDUcU3t8Nt+HMhV6hKtj2JJxrbRz3psoFFlPQ70eqdOoEp5bRD QaMlNfD8LW4xX2LyRBtqtyoO13i7nTTkRtEbKBu6NGHoOF7jUDoxnUZPz/jhGZx9wIlWe7 SkuVD2xsh8YhLFIJpUe1MzHXKnoMEPwB9hjKpszEnL0Y41+gnWsdD97XXRq3Jg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1736042050; a=rsa-sha256; cv=none; b=QWvCAYE0EvbtGAtsnWNTuOUX9pZzb4+qblOj6OOALVh05m8sXfTSmHW/QBBcTo48Bwv+nD o7zpCaP8rSmIkw9UEbrFHPW/3qA6RCDpLPHy+CO849O8evyh1fYfURt6tdJdrs5+wg6xvv HsnYUKRBpyQdNP/7UARueOba9DXR6NaLVQCJARfw43OlhR/TjvPXN6DTPk3jpz1XaRnj8D rEPH5g5ZE1OVckBnKLGJBQ42HIMHTNb3oPiljCzsDTm8Bva2kCI+t+keCPoyThYJLkvzvU TLxZfqlu+A5AwUKiJCc9zAOyAf7IdF28Dd59ykXGIdXl2RCa4wWZYBMSO0gfBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4YQgN244fqz3XH; Sun, 05 Jan 2025 01:54:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5051sAf1096139; Sun, 5 Jan 2025 01:54:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5051sAQI096136; Sun, 5 Jan 2025 01:54:10 GMT (envelope-from git) Date: Sun, 5 Jan 2025 01:54:10 GMT Message-Id: <202501050154.5051sAQI096136@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: ed48632461bd - main - emulators/virtualbox-ose{,-nox11}{,-legacy}: Fix listen VNC on TCP port on IPv6 address 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: ed48632461bd9b3c095333c34040fe921673ab48 Auto-Submitted: auto-generated The branch main has been updated by vvd: URL: https://cgit.FreeBSD.org/ports/commit/?id=ed48632461bd9b3c095333c34040fe921673ab48 commit ed48632461bd9b3c095333c34040fe921673ab48 Author: Vladimir Druzenko AuthorDate: 2025-01-05 01:43:43 +0000 Commit: Vladimir Druzenko CommitDate: 2025-01-05 01:43:43 +0000 emulators/virtualbox-ose{,-nox11}{,-legacy}: Fix listen VNC on TCP port on IPv6 address Four new options are available: - "VNCAddress4" -> IPv4 address to use - "VNCPort4" -> IPv4 Port to use - "VNCAddress6" -> IPv6 address to use - "VNCPort6" -> IPv6 port to use "TCP/Ports" is used for backward compatibility as IPv4 and IPv6 ports if "VNCPort4" or "VNCPort6" is not defined. Detailed description is here: https://www.virtualbox.org/browser/vbox/trunk/src/VBox/ExtPacks/VNC/VBoxVNC.cpp#L361 PR: 193778 --- emulators/virtualbox-ose-legacy/Makefile | 2 +- .../files/patch-src_VBox_ExtPacks_VNC_VBoxVNC.cpp | 67 ++++++++++++++++++++++ emulators/virtualbox-ose-nox11-legacy/Makefile | 2 +- emulators/virtualbox-ose-nox11/Makefile | 2 +- emulators/virtualbox-ose/Makefile | 2 +- .../files/patch-src_VBox_ExtPacks_VNC_VBoxVNC.cpp | 58 +++++++++++++++++++ 6 files changed, 129 insertions(+), 4 deletions(-) diff --git a/emulators/virtualbox-ose-legacy/Makefile b/emulators/virtualbox-ose-legacy/Makefile index eb9e45783125..6c0563b2759c 100644 --- a/emulators/virtualbox-ose-legacy/Makefile +++ b/emulators/virtualbox-ose-legacy/Makefile @@ -1,6 +1,6 @@ PORTNAME= virtualbox-ose DISTVERSION= 5.2.44 -PORTREVISION?= 23 +PORTREVISION?= 24 CATEGORIES= emulators MASTER_SITES= https://download.virtualbox.org/virtualbox/${DISTVERSION}/:src \ LOCAL/bofh/emulators/virtualbox-ose-legacy:docs diff --git a/emulators/virtualbox-ose-legacy/files/patch-src_VBox_ExtPacks_VNC_VBoxVNC.cpp b/emulators/virtualbox-ose-legacy/files/patch-src_VBox_ExtPacks_VNC_VBoxVNC.cpp new file mode 100644 index 000000000000..2039707a7fec --- /dev/null +++ b/emulators/virtualbox-ose-legacy/files/patch-src_VBox_ExtPacks_VNC_VBoxVNC.cpp @@ -0,0 +1,67 @@ +--- src/VBox/ExtPacks/VNC/VBoxVNC.cpp.orig 2020-07-09 16:56:32 UTC ++++ src/VBox/ExtPacks/VNC/VBoxVNC.cpp +@@ -45,7 +45,7 @@ + + #ifdef LIBVNCSERVER_IPv6 + // enable manually! +-// #define VBOX_USE_IPV6 ++#define VBOX_USE_IPV6 + #endif + + +@@ -312,7 +312,7 @@ DECLCALLBACK(int) VNCServerImpl::VRDEEnableConnections + else + { + const char szFeatName[] = "Property/TCP/Ports"; +- const uint32_t featLen = sizeof(VRDEFEATURE) + RT_MAX(sizeof(VNC_PORTSSIZE), sizeof(szFeatName)) - 1; ++ const uint32_t featLen = sizeof(VRDEFEATURE) + RT_MAX(VNC_PORTSSIZE, sizeof(szFeatName)) - 1; + VRDEFEATURE *feature = (VRDEFEATURE *)RTMemTmpAlloc(featLen); + feature->u32ClientId = 0; + RTStrCopy(feature->achInfo, featLen - sizeof(VRDEFEATURE) + 1, szFeatName); +@@ -421,7 +421,7 @@ DECLCALLBACK(int) VNCServerImpl::VRDEEnableConnections + + // get address + char *pszTCPAddress = (char *)RTMemTmpAllocZ(VNC_ADDRESS_OPTION_MAX); +- rc = instance->mCallbacks->VRDECallbackProperty(instance->mCallback, ++ int rc = instance->mCallbacks->VRDECallbackProperty(instance->mCallback, + VRDE_QP_NETWORK_ADDRESS, + pszTCPAddress, + VNC_ADDRESS_OPTION_MAX, +@@ -582,19 +582,35 @@ DECLCALLBACK(int) VNCServerImpl::VRDEEnableConnections + pszServerAddress6 = szIPv6ListenAll; + } + +- if (pszVNCPort4 && uServerPort4 == 0) ++ if (strlen(pszVNCPort4) > 0 && uServerPort4 == 0) + { + rc = RTStrToUInt32Ex(pszVNCPort4, NULL, 10, &uServerPort4); + if (!RT_SUCCESS(rc) || uServerPort4 > 65535) + uServerPort4 = 0; + } + +- if (pszVNCPort6 && uServerPort6 == 0) ++ if (strlen(pszVNCPort6) > 0 && uServerPort6 == 0) + { + rc = RTStrToUInt32Ex(pszVNCPort6, NULL, 10, &uServerPort6); + if (!RT_SUCCESS(rc) || uServerPort6 > 65535) + uServerPort6 = 0; + } ++ ++/* Backward compatibility with set port in "TCP/Ports" only { */ ++ if (uServerPort4 == 0 && strlen(pszTCPPort) > 0) ++ { ++ rc = RTStrToUInt32Ex(pszTCPPort, NULL, 10, &uServerPort4); ++ if (!RT_SUCCESS(rc) || uServerPort4 > 65535) ++ uServerPort4 = 0; ++ } ++ ++ if (uServerPort6 == 0 && strlen(pszTCPPort) > 0) ++ { ++ rc = RTStrToUInt32Ex(pszTCPPort, NULL, 10, &uServerPort6); ++ if (!RT_SUCCESS(rc) || uServerPort6 > 65535) ++ uServerPort6 = 0; ++ } ++/* } */ + + if (uServerPort4 == 0 || uServerPort6 == 0) + vncServer->autoPort = 1; diff --git a/emulators/virtualbox-ose-nox11-legacy/Makefile b/emulators/virtualbox-ose-nox11-legacy/Makefile index 5cc4fc68f34a..21b9fee09903 100644 --- a/emulators/virtualbox-ose-nox11-legacy/Makefile +++ b/emulators/virtualbox-ose-nox11-legacy/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 19 +PORTREVISION= 24 PKGNAMESUFFIX= -nox11-legacy MASTERDIR= ${.CURDIR}/../virtualbox-ose-legacy diff --git a/emulators/virtualbox-ose-nox11/Makefile b/emulators/virtualbox-ose-nox11/Makefile index d4a66aac1642..c396083ebf7c 100644 --- a/emulators/virtualbox-ose-nox11/Makefile +++ b/emulators/virtualbox-ose-nox11/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 8 PKGNAMESUFFIX= -nox11 MASTERDIR= ${.CURDIR}/../virtualbox-ose diff --git a/emulators/virtualbox-ose/Makefile b/emulators/virtualbox-ose/Makefile index a7c9299b7351..77500e1e992a 100644 --- a/emulators/virtualbox-ose/Makefile +++ b/emulators/virtualbox-ose/Makefile @@ -1,6 +1,6 @@ PORTNAME= virtualbox-ose DISTVERSION= 6.1.50 -PORTREVISION?= 7 +PORTREVISION?= 8 CATEGORIES= emulators MASTER_SITES= https://download.virtualbox.org/virtualbox/${DISTVERSION}/:src \ LOCAL/bofh/emulators/virtualbox-ose:docs diff --git a/emulators/virtualbox-ose/files/patch-src_VBox_ExtPacks_VNC_VBoxVNC.cpp b/emulators/virtualbox-ose/files/patch-src_VBox_ExtPacks_VNC_VBoxVNC.cpp new file mode 100644 index 000000000000..f364e261f40b --- /dev/null +++ b/emulators/virtualbox-ose/files/patch-src_VBox_ExtPacks_VNC_VBoxVNC.cpp @@ -0,0 +1,58 @@ +--- src/VBox/ExtPacks/VNC/VBoxVNC.cpp.orig 2024-01-11 12:24:04 UTC ++++ src/VBox/ExtPacks/VNC/VBoxVNC.cpp +@@ -45,7 +45,7 @@ + + #ifdef LIBVNCSERVER_IPv6 + // enable manually! +-// #define VBOX_USE_IPV6 ++#define VBOX_USE_IPV6 + #endif + + +@@ -421,7 +421,7 @@ DECLCALLBACK(int) VNCServerImpl::VRDEEnableConnections + + // get address + char *pszTCPAddress = (char *)RTMemTmpAllocZ(VNC_ADDRESS_OPTION_MAX); +- rc = instance->mCallbacks->VRDECallbackProperty(instance->mCallback, ++ int rc = instance->mCallbacks->VRDECallbackProperty(instance->mCallback, + VRDE_QP_NETWORK_ADDRESS, + pszTCPAddress, + VNC_ADDRESS_OPTION_MAX, +@@ -582,19 +582,35 @@ DECLCALLBACK(int) VNCServerImpl::VRDEEnableConnections + pszServerAddress6 = szIPv6ListenAll; + } + +- if (pszVNCPort4 && uServerPort4 == 0) ++ if (strlen(pszVNCPort4) > 0 && uServerPort4 == 0) + { + rc = RTStrToUInt32Ex(pszVNCPort4, NULL, 10, &uServerPort4); + if (!RT_SUCCESS(rc) || uServerPort4 > 65535) + uServerPort4 = 0; + } + +- if (pszVNCPort6 && uServerPort6 == 0) ++ if (strlen(pszVNCPort6) > 0 && uServerPort6 == 0) + { + rc = RTStrToUInt32Ex(pszVNCPort6, NULL, 10, &uServerPort6); + if (!RT_SUCCESS(rc) || uServerPort6 > 65535) + uServerPort6 = 0; + } ++ ++/* Backward compatibility with set port in "TCP/Ports" only { */ ++ if (uServerPort4 == 0 && strlen(pszTCPPort) > 0) ++ { ++ rc = RTStrToUInt32Ex(pszTCPPort, NULL, 10, &uServerPort4); ++ if (!RT_SUCCESS(rc) || uServerPort4 > 65535) ++ uServerPort4 = 0; ++ } ++ ++ if (uServerPort6 == 0 && strlen(pszTCPPort) > 0) ++ { ++ rc = RTStrToUInt32Ex(pszTCPPort, NULL, 10, &uServerPort6); ++ if (!RT_SUCCESS(rc) || uServerPort6 > 65535) ++ uServerPort6 = 0; ++ } ++/* } */ + + if (uServerPort4 == 0 || uServerPort6 == 0) + vncServer->autoPort = 1;