summaryrefslogtreecommitdiff
path: root/emulators/virtualbox-ose
diff options
context:
space:
mode:
Diffstat (limited to 'emulators/virtualbox-ose')
-rw-r--r--emulators/virtualbox-ose/Makefile6
-rw-r--r--emulators/virtualbox-ose/files/patch-src_VBox_Runtime_r3_xml.cpp53
-rw-r--r--emulators/virtualbox-ose/files/vboxinit.in6
3 files changed, 60 insertions, 5 deletions
diff --git a/emulators/virtualbox-ose/Makefile b/emulators/virtualbox-ose/Makefile
index d868733954cb..3bb9bd477162 100644
--- a/emulators/virtualbox-ose/Makefile
+++ b/emulators/virtualbox-ose/Makefile
@@ -1,6 +1,6 @@
PORTNAME= virtualbox-ose
DISTVERSION= 6.1.50
-PORTREVISION?= 14
+PORTREVISION?= 16
CATEGORIES= emulators
MASTER_SITES= https://download.virtualbox.org/virtualbox/${DISTVERSION}/:src \
LOCAL/bofh/emulators/virtualbox-ose:docs
@@ -42,7 +42,9 @@ CONFLICTS_INSTALL= virtualbox-ose-legacy \
virtualbox-ose-70 \
virtualbox-ose-nox11-70 \
virtualbox-ose-71 \
- virtualbox-ose-nox11-71
+ virtualbox-ose-nox11-71 \
+ virtualbox-ose-72 \
+ virtualbox-ose-nox11-72
PORTSCOUT= limit:^6\.
SUB_FILES= pkg-message
diff --git a/emulators/virtualbox-ose/files/patch-src_VBox_Runtime_r3_xml.cpp b/emulators/virtualbox-ose/files/patch-src_VBox_Runtime_r3_xml.cpp
new file mode 100644
index 000000000000..9f17777fdc2a
--- /dev/null
+++ b/emulators/virtualbox-ose/files/patch-src_VBox_Runtime_r3_xml.cpp
@@ -0,0 +1,53 @@
+--- src/VBox/Runtime/r3/xml.cpp.orig 2024-01-11 12:26:05 UTC
++++ src/VBox/Runtime/r3/xml.cpp
+@@ -1837,12 +1837,20 @@ static void xmlParserBaseGenericError(void *pCtx, cons
+ va_end(args);
+ }
+
++#if LIBXML_VERSION >= 21206
++static void xmlStructuredErrorFunc(void *userData, const xmlError *error)
++{
++ NOREF(userData);
++ NOREF(error);
++}
++#else
+ static void xmlParserBaseStructuredError(void *pCtx, xmlErrorPtr error)
+ {
+ NOREF(pCtx);
+ /* we expect that there is always a trailing NL */
+ LogRel(("XML error at '%s' line %d: %s", error->file, error->line, error->message));
+ }
++#endif
+
+ XmlParserBase::XmlParserBase()
+ {
+@@ -1851,7 +1859,11 @@ XmlParserBase::XmlParserBase()
+ throw std::bad_alloc();
+ /* per-thread so it must be here */
+ xmlSetGenericErrorFunc(NULL, xmlParserBaseGenericError);
++#if LIBXML_VERSION >= 21206
++ xmlSetStructuredErrorFunc(NULL, xmlStructuredErrorFunc);
++#else
+ xmlSetStructuredErrorFunc(NULL, xmlParserBaseStructuredError);
++#endif
+ }
+
+ XmlParserBase::~XmlParserBase()
+@@ -1912,7 +1924,7 @@ void XmlMemParser::read(const void *pvBuf, size_t cbSi
+ pcszFilename,
+ NULL, // encoding = auto
+ options)))
+- throw XmlError(xmlCtxtGetLastError(m_ctxt));
++ throw XmlError((xmlErrorPtr)xmlCtxtGetLastError(m_ctxt));
+
+ doc.refreshInternals();
+ }
+@@ -2172,7 +2184,7 @@ void XmlFileParser::read(const RTCString &strFilename,
+ pcszFilename,
+ NULL, // encoding = auto
+ options)))
+- throw XmlError(xmlCtxtGetLastError(m_ctxt));
++ throw XmlError((xmlErrorPtr)xmlCtxtGetLastError(m_ctxt));
+
+ doc.refreshInternals();
+ }
diff --git a/emulators/virtualbox-ose/files/vboxinit.in b/emulators/virtualbox-ose/files/vboxinit.in
index 13ec9614827d..9895da9e362e 100644
--- a/emulators/virtualbox-ose/files/vboxinit.in
+++ b/emulators/virtualbox-ose/files/vboxinit.in
@@ -37,7 +37,7 @@ restart_cmd="${name}_restart"
vboxinit_start()
{
# Get a list of all machines with autorun enabled in phpvirtualbox
- ${su_command} "${command} list vms | /usr/bin/tr -d '{}\"'" | while read VMNAME UUID; do
+ ${su_command} "${command} list vms | /usr/bin/tr -d '{}\"'" | /usr/bin/sort | while read VMNAME UUID; do
STARTUP=$(${su_command} "${command} getextradata ${UUID} 'pvbx/startupMode'" | /usr/bin/cut -d' ' -f2)
if [ "${STARTUP}" == "auto" ]; then
echo "${name}: starting machine ${VMNAME} ..."
@@ -50,7 +50,7 @@ vboxinit_start()
vboxinit_stop()
{
# Get all running machines
- ${su_command} "${command} list runningvms | /usr/bin/tr -d '{}\"'" | while read VMNAME UUID; do
+ ${su_command} "${command} list runningvms | /usr/bin/tr -d '{}\"'" | /usr/bin/sort -r | while read VMNAME UUID; do
echo "${name}: stopping machine ${VMNAME} with action '${vboxinit_stop}' ..."
${su_command} "${command} controlvm ${UUID} ${vboxinit_stop}"
sleep "${vboxinit_stop_delay}"
@@ -75,7 +75,7 @@ load_rc_config $name
: ${vboxinit_user="%%VBOXUSER%%"}
: ${vboxinit_home=$(/usr/sbin/pw usershow -7 -n "${vboxinit_user}" | /usr/bin/cut -d: -f6)}
: ${vboxinit_stop="savestate"}
-: ${vboxinit_start_delay="0"}
+: ${vboxinit_start_delay="1"}
: ${vboxinit_stop_delay="0"}
HOME=${vboxinit_home}
USER=${vboxinit_user}