FreeBSD Bugzilla – Attachment 232367 Details for
Bug 261522
emulators/virtualbox-ose: Place vbox/networks.conf in the right place (hier(7))
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Updated patch to move networks.conf to LOCALBASE
0001-emulators-virtualbox-ose-Expect-networks.conf-in-LOC.patch (text/plain), 7.13 KB, created by
Michael Gmelin
on 2022-03-10 09:10:22 UTC
(
hide
)
Description:
Updated patch to move networks.conf to LOCALBASE
Filename:
MIME Type:
Creator:
Michael Gmelin
Created:
2022-03-10 09:10:22 UTC
Size:
7.13 KB
patch
obsolete
>From be33c10bc9a2c0912cd1f5cd1493dc7c4ae8f541 Mon Sep 17 00:00:00 2001 >From: Michael Gmelin <grembo@FreeBSD.org> >Date: Thu, 10 Mar 2022 09:54:46 +0100 >Subject: [PATCH] emulators/virtualbox-ose: Expect networks.conf in LOCALBASE > >VirtualBox OSE 6.1.28 introduced /etc/vbox/networks.conf to >configure allowed IP ranges in host-only mode. This patch >aligns this location with FreeBSD's conventions documented in >hier(7). > >PR: 261522 >Approved by: madpilot (vbox) >--- > UPDATING | 8 ++++++++ > emulators/virtualbox-ose/Makefile | 6 ++++++ > .../patch-src-VBox-Installer-freebsd-VBox.sh | 13 ++++++++++--- > ...-src_VBox_HostDrivers_adpctl_VBoxNetAdpCtl.cpp | 11 +++++++++++ > .../{pkg-message => files/pkg-message.in} | 15 +++++++++++++++ > 5 files changed, 50 insertions(+), 3 deletions(-) > create mode 100644 emulators/virtualbox-ose/files/patch-src_VBox_HostDrivers_adpctl_VBoxNetAdpCtl.cpp > rename emulators/virtualbox-ose/{pkg-message => files/pkg-message.in} (79%) > >diff --git a/UPDATING b/UPDATING >index 8144db70b5ef..5e0d1b4f8abe 100644 >--- a/UPDATING >+++ b/UPDATING >@@ -5,6 +5,14 @@ they are unavoidable. > You should get into the habit of checking this file for changes each time > you update your ports collection, before attempting any port upgrades. > >+20220309: >+ AFFECTS: users of emulators/virtualbox-ose >+ AUTHOR: grembo@FreeBSD.org >+ >+ In order to comply to hier(7), VirtualBox's configuration of non-default >+ IP ranges to be used in host-only mode moved from /etc/vbox/networks.conf >+ to ${LOCALBASE}/etc/vbox/networks.conf. >+ > 20220227: > AFFECTS: users of graphics/bmeps > AUTHOR: takefu@airport.fm >diff --git a/emulators/virtualbox-ose/Makefile b/emulators/virtualbox-ose/Makefile >index c308bb20cee7..b1c34f71bd68 100644 >--- a/emulators/virtualbox-ose/Makefile >+++ b/emulators/virtualbox-ose/Makefile >@@ -2,6 +2,7 @@ > > PORTNAME= virtualbox-ose > PORTVERSION= 6.1.32 >+PORTREVISION= 1 > CATEGORIES= emulators > MASTER_SITES= https://download.virtualbox.org/virtualbox/${PORTVERSION}/ > DISTFILES= VirtualBox-${PORTVERSION}${EXTRACT_SUFX} ${GUESTADDITIONS} >@@ -52,6 +53,8 @@ VBOX_PROGS= VBoxAutostart VBoxBalloonCtrl VBoxBugReport VBoxHeadless \ > VBOX_UTILS= VBoxExtPackHelperApp VBoxNetAdpCtl VBoxNetDHCP VBoxNetNAT \ > VBoxSVC VBoxXPCOMIPCD > >+SUB_FILES= pkg-message >+ > OPTIONS_DEFINE= AIO ALSA DBUS DEBUG GUESTADDITIONS MANUAL NLS OPUS PULSEAUDIO \ > PYTHON QT5 R0LOGGING UDPTUNNEL VDE VNC WEBSERVICE VPX X11 > OPTIONS_DEFAULT= AIO DBUS QT5 UDPTUNNEL VNC WEBSERVICE X11 >@@ -307,10 +310,12 @@ post-patch: > ${LOCALBASE}/share/kBuild/tools/GXX3.kmk > \ > ${WRKSRC}/tools/kBuildTools/VBoxGccFreeBSD.kmk > .endif >+ # Causes a "reinplace" QA warning with default LOCALBASE > @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \ > ${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' \ >@@ -321,6 +326,7 @@ 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}|' \ > ${WRKSRC}/src/VBox/Installer/freebsd/VBox.sh >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 deb51288deb1..6511a665a219 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 >@@ -1,6 +1,6 @@ > --- src/VBox/Installer/freebsd/VBox.sh.orig 2016-08-27 05:10:34 UTC > +++ src/VBox/Installer/freebsd/VBox.sh >-@@ -0,0 +1,67 @@ >+@@ -0,0 +1,74 @@ > +#!/bin/sh > +# > +# Oracle VM VirtualBox startup script, FreeBSD hosts. >@@ -26,10 +26,17 @@ > + test -f /usr/local/lib/virtualbox/VBoxRT.so; then > + INSTALL_DIR=/usr/local/lib/virtualbox > + else >-+ echo "Could not find VirtualBox installation. Please reinstall." >++ >&2 echo "Could not find VirtualBox installation. Please reinstall." > + exit 1 > + fi > + >++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/. >++ EOH >++fi >++ > +# workaround for the KDE dialog problem > +KDE_FORK_SLAVES=1; export KDE_FORK_SLAVES > + >@@ -63,7 +70,7 @@ > + exec "$INSTALL_DIR/vboxwebsrv" "$@" > + ;; > + *) >-+ echo "Unknown application - $APP" >++ >&2 echo "Unknown application - $APP" > + exit 1 > + ;; > +esac >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 >new file mode 100644 >index 000000000000..dfd9105f8390 >--- /dev/null >+++ b/emulators/virtualbox-ose/files/patch-src_VBox_HostDrivers_adpctl_VBoxNetAdpCtl.cpp >@@ -0,0 +1,11 @@ >+--- src/VBox/HostDrivers/adpctl/VBoxNetAdpCtl.cpp.orig 2022-01-13 18:57:40 UTC >++++ src/VBox/HostDrivers/adpctl/VBoxNetAdpCtl.cpp >+@@ -737,7 +737,7 @@ int Adapter::doIOCtl(unsigned long iCmd, VBOXNETADPREQ >+ * Global config file implementation * >+ *********************************************************************************************************************************/ >+ >+-#define VBOX_GLOBAL_NETWORK_CONFIG_PATH "/etc/vbox/networks.conf" >++#define VBOX_GLOBAL_NETWORK_CONFIG_PATH "/usr/local/etc/vbox/networks.conf" >+ #define VBOXNET_DEFAULT_IPV4MASK "255.255.255.0" >+ >+ class NetworkAddress >diff --git a/emulators/virtualbox-ose/pkg-message b/emulators/virtualbox-ose/files/pkg-message.in >similarity index 79% >rename from emulators/virtualbox-ose/pkg-message >rename to emulators/virtualbox-ose/files/pkg-message.in >index 20fa96d594fa..8df5a0a47ffd 100644 >--- a/emulators/virtualbox-ose/pkg-message >+++ b/emulators/virtualbox-ose/files/pkg-message.in >@@ -60,6 +60,10 @@ vfs.aio.max_aio_per_proc=8192 > vfs.aio.max_aio_queue=65536 > 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). >+ > Check wiki page for known issues and troubleshooting: > http://wiki.freebsd.org/VirtualBox > >@@ -78,4 +82,15 @@ machines using the Pulseaudio host audio driver to use another > supported one. > EOM > } >+{ type: upgrade >+ minimum_version: 6.1.26 >+ 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. >+ >+In case /etc/vbox/networks.conf exists, it needs to be moved to >+%%LOCALBASE%%/etc/vbox and /etc/vbox should be deleted. >+EOM >+} > ] >-- >2.34.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
grembo
:
maintainer-approval?
Actions:
View
|
Diff
Attachments on
bug 261522
:
231393
|
231490
| 232367