git: 8b9f42573ed3 - main - emulators/virtualbox-ose[-legacy]: VM VirtualBox Manager: Help menu: unable to open external browser
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 18 May 2023 19:48:54 UTC
The branch main has been updated by vvd: URL: https://cgit.FreeBSD.org/ports/commit/?id=8b9f42573ed3ebcd6a84f7ccd1ba2ef000357332 commit 8b9f42573ed3ebcd6a84f7ccd1ba2ef000357332 Author: Vladimir Druzenko <vvd@FreeBSD.org> AuthorDate: 2023-05-18 19:41:30 +0000 Commit: Vladimir Druzenko <vvd@FreeBSD.org> CommitDate: 2023-05-18 19:48:47 +0000 emulators/virtualbox-ose[-legacy]: VM VirtualBox Manager: Help menu: unable to open external browser While here sort out LOCALBASE, PREFIX, VBOX_DIR, VBOX_ETC PR: 266778 Approved by: arrowd (mentor) Differential Revision: https://reviews.freebsd.org/D40119 --- emulators/virtualbox-ose-legacy/Makefile | 6 ++++-- .../files/patch-src-VBox-Installer-freebsd-VBox.sh | 10 +++++----- emulators/virtualbox-ose/Makefile | 10 ++++++---- .../files/patch-src-VBox-Installer-freebsd-VBox.sh | 12 ++++++------ .../patch-src_VBox_HostDrivers_adpctl_VBoxNetAdpCtl.cpp | 2 +- emulators/virtualbox-ose/files/pkg-message.in | 6 +++--- 6 files changed, 25 insertions(+), 21 deletions(-) diff --git a/emulators/virtualbox-ose-legacy/Makefile b/emulators/virtualbox-ose-legacy/Makefile index 1c22e2fed732..fe7e00fe1be7 100644 --- a/emulators/virtualbox-ose-legacy/Makefile +++ b/emulators/virtualbox-ose-legacy/Makefile @@ -52,6 +52,7 @@ USERS= ${VBOXUSER} GROUPS= ${VBOXGROUP} VBOX_DIR= ${PREFIX}/${VBOX_DIR_REL} VBOX_DIR_REL= lib/virtualbox +VBOX_ETC= ${PREFIX}/etc/vbox VBOX_LINKS= VBoxVRDP VBOX_PROGS= VBoxAutostart VBoxBalloonCtrl VBoxBugReport VBoxHeadless \ VBoxManage @@ -323,8 +324,9 @@ post-patch: ${WRKSRC}/src/VBox/Runtime/Makefile.kmk @${ECHO_CMD} 'VBOX_ICONV_DEFS = LIBICONV_PLUG' >> ${WRKSRC}/LocalConfig.kmk .endif - @${REINPLACE_CMD} -e 's|/usr/local/lib/virtualbox|${VBOX_DIR}|' \ - -e 's|/usr/local|${PREFIX}|' \ + @${REINPLACE_CMD} -e 's|%%VBOX_DIR%%|${VBOX_DIR}|g' \ + -e 's|%%VBOX_ETC%%|${VBOX_ETC}|g' \ + -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ ${WRKSRC}/src/VBox/Installer/freebsd/VBox.sh @${REINPLACE_CMD} \ -e 's|^versions =.*|versions = ["${PYTHON_VER}${PYTHON_ABIVER}"]|' \ diff --git a/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Installer-freebsd-VBox.sh b/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Installer-freebsd-VBox.sh index cebabd64d010..08b833613af2 100644 --- a/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Installer-freebsd-VBox.sh +++ b/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Installer-freebsd-VBox.sh @@ -16,15 +16,15 @@ +# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. +# + -+PATH="/usr/bin:/bin:/usr/sbin:/sbin" -+CONFIG="/usr/local/etc/vbox/vbox.cfg" ++PATH="/sbin:/bin:/usr/sbin:/usr/bin:%%LOCALBASE%%/sbin:%%LOCALBASE%%/bin" ++CONFIG="%%VBOX_ETC%%/vbox.cfg" + +test -r "${CONFIG}" && + . "${CONFIG}" +test -z "${INSTALL_DIR}" && -+ if test -d /usr/local/lib/virtualbox && -+ test -f /usr/local/lib/virtualbox/VBoxRT.so; then -+ INSTALL_DIR=/usr/local/lib/virtualbox ++ if test -d %%VBOX_DIR%% && ++ test -f %%VBOX_DIR%%/VBoxRT.so; then ++ INSTALL_DIR=%%VBOX_DIR%% + else + echo "Could not find VirtualBox installation. Please reinstall." + exit 1 diff --git a/emulators/virtualbox-ose/Makefile b/emulators/virtualbox-ose/Makefile index 541d4c63ae38..fd0219c7b2e7 100644 --- a/emulators/virtualbox-ose/Makefile +++ b/emulators/virtualbox-ose/Makefile @@ -45,6 +45,7 @@ USERS= ${VBOXUSER} GROUPS= ${VBOXGROUP} VBOX_DIR= ${PREFIX}/${VBOX_DIR_REL} VBOX_DIR_REL= lib/virtualbox +VBOX_ETC= ${PREFIX}/etc/vbox VBOX_LINKS= VBoxVRDP VBOX_PROGS= VBoxAutostart VBoxBalloonCtrl VBoxBugReport VBoxHeadless \ VBoxManage @@ -314,7 +315,6 @@ post-patch: ${WRKSRC}/Config.kmk ${WRKSRC}/configure \ ${WRKSRC}/kBuild/header.kmk ${WRKSRC}/kBuild/units/qt4.kmk \ ${WRKSRC}/kBuild/units/qt5.kmk ${WRKSRC}/kBuild/sdks/LIBSDL.kmk \ - ${WRKSRC}/src/VBox/HostDrivers/adpctl/VBoxNetAdpCtl.cpp \ ${WRKSRC}/src/libs/xpcom18a4/python/gen_python_deps.py @${REINPLACE_CMD} \ -e 's|\$$KBUILDDIR_BIN/kmk_sed|${LOCALBASE}/bin/kmk_sed|g' \ @@ -325,10 +325,12 @@ post-patch: ${WRKSRC}/src/VBox/Runtime/Makefile.kmk @${ECHO_CMD} 'VBOX_ICONV_DEFS = LIBICONV_PLUG' >> ${WRKSRC}/LocalConfig.kmk .endif - # Causes a "reinplace" QA warning with default PREFIX/VBOX_DIR - @${REINPLACE_CMD} -e 's|/usr/local/lib/virtualbox|${VBOX_DIR}|' \ - -e 's|/usr/local|${PREFIX}|' \ + @${REINPLACE_CMD} -e 's|%%VBOX_DIR%%|${VBOX_DIR}|g' \ + -e 's|%%VBOX_ETC%%|${VBOX_ETC}|g' \ + -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ ${WRKSRC}/src/VBox/Installer/freebsd/VBox.sh + @${REINPLACE_CMD} -e 's|%%VBOX_ETC%%|${VBOX_ETC}|g' \ + ${WRKSRC}/src/VBox/HostDrivers/adpctl/VBoxNetAdpCtl.cpp @${REINPLACE_CMD} \ -e 's|^versions =.*|versions = ["${PYTHON_VER}${PYTHON_ABIVER}"]|' \ ${WRKSRC}/src/libs/xpcom18a4/python/gen_python_deps.py diff --git a/emulators/virtualbox-ose/files/patch-src-VBox-Installer-freebsd-VBox.sh b/emulators/virtualbox-ose/files/patch-src-VBox-Installer-freebsd-VBox.sh index 6511a665a219..b4c177a54d1c 100644 --- a/emulators/virtualbox-ose/files/patch-src-VBox-Installer-freebsd-VBox.sh +++ b/emulators/virtualbox-ose/files/patch-src-VBox-Installer-freebsd-VBox.sh @@ -16,15 +16,15 @@ +# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. +# + -+PATH="/usr/bin:/bin:/usr/sbin:/sbin" -+CONFIG="/usr/local/etc/vbox/vbox.cfg" ++PATH="/sbin:/bin:/usr/sbin:/usr/bin:%%LOCALBASE%%/sbin:%%LOCALBASE%%/bin" ++CONFIG="%%VBOX_ETC%%/vbox.cfg" + +test -r "${CONFIG}" && + . "${CONFIG}" +test -z "${INSTALL_DIR}" && -+ if test -d /usr/local/lib/virtualbox && -+ test -f /usr/local/lib/virtualbox/VBoxRT.so; then -+ INSTALL_DIR=/usr/local/lib/virtualbox ++ if test -d %%VBOX_DIR%% && ++ test -f %%VBOX_DIR%%/VBoxRT.so; then ++ INSTALL_DIR=%%VBOX_DIR%% + else + >&2 echo "Could not find VirtualBox installation. Please reinstall." + exit 1 @@ -33,7 +33,7 @@ +if [ -d /etc/vbox ]; then + >&2 cat <<-EOH + WARNING: Directory /etc/vbox found, but ignored. VirtualBox -+ configuration files are stored in /usr/local/etc/vbox/. ++ configuration files are stored in %%VBOX_ETC%%/. + EOH +fi + diff --git a/emulators/virtualbox-ose/files/patch-src_VBox_HostDrivers_adpctl_VBoxNetAdpCtl.cpp b/emulators/virtualbox-ose/files/patch-src_VBox_HostDrivers_adpctl_VBoxNetAdpCtl.cpp index dfd9105f8390..67573dc080a4 100644 --- a/emulators/virtualbox-ose/files/patch-src_VBox_HostDrivers_adpctl_VBoxNetAdpCtl.cpp +++ b/emulators/virtualbox-ose/files/patch-src_VBox_HostDrivers_adpctl_VBoxNetAdpCtl.cpp @@ -5,7 +5,7 @@ *********************************************************************************************************************************/ -#define VBOX_GLOBAL_NETWORK_CONFIG_PATH "/etc/vbox/networks.conf" -+#define VBOX_GLOBAL_NETWORK_CONFIG_PATH "/usr/local/etc/vbox/networks.conf" ++#define VBOX_GLOBAL_NETWORK_CONFIG_PATH "%%VBOX_ETC%%/networks.conf" #define VBOXNET_DEFAULT_IPV4MASK "255.255.255.0" class NetworkAddress diff --git a/emulators/virtualbox-ose/files/pkg-message.in b/emulators/virtualbox-ose/files/pkg-message.in index 8df5a0a47ffd..8fd6062977da 100644 --- a/emulators/virtualbox-ose/files/pkg-message.in +++ b/emulators/virtualbox-ose/files/pkg-message.in @@ -62,7 +62,7 @@ To check if AIO is used use: kldstat -v | grep aio When assigning IP addresses in host-only mode from ranges outside of VirtualBox's defaults, the respective ranges need to be listed -in %%LOCALBASE%%/etc/vbox/networks.conf (PR#259399). +in %%VBOX_ETC%%/networks.conf (PR#259399). Check wiki page for known issues and troubleshooting: http://wiki.freebsd.org/VirtualBox @@ -87,10 +87,10 @@ EOM maximum_version: 6.1.32_1 message: <<EOM To comply to hier(7) requirements, networks.conf's location changed -to %%LOCALBASE%%/etc/vbox/networks.conf. +to %%VBOX_ETC%%/networks.conf. In case /etc/vbox/networks.conf exists, it needs to be moved to -%%LOCALBASE%%/etc/vbox and /etc/vbox should be deleted. +%%VBOX_ETC%% and /etc/vbox should be deleted. EOM } ]