Page MenuHomeFreeBSD

Update virtualbox to 5.2.44 and make it use python 3 (undeprecate)
ClosedPublic

Authored by madpilot on Jun 28 2020, 2:05 PM.

Details

Summary

This patch is based on the one posted by Mario Lobo in bug 244212.

I have tested patches and regenerated them, two patches were also generating warnings which I cleaned up.

This also migrates the port to python3. Tested on my machine and it works, but further testing is required, especially by people using the python interface.

Since 5.2.44 is fixing some vulnerabilities, patch includes new entry in vuxml.

Please if I'm mistaken regarding vulnerabilities please point me in the right direction.

Test Plan

This builds fine in poudriere with default options, also tested with all options enabled and all options disabled.

Works as well as 5.2.32 used to work for my virtual machines.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

I'm testing this on my machine now.

emulators/virtualbox-ose-additions/Makefile
6 ↗(On Diff #73804)

I think this line can be removed.

emulators/virtualbox-ose/Makefile
6 ↗(On Diff #73804)

So as this line.

144 ↗(On Diff #73804)

Python 3.7 is the default version, maybe just use USE+=python ?

149 ↗(On Diff #73804)

Same here.

Allow any python version.

Suggested by: VVD in bug 244212

I noticed also your suggestion now, I have changed it to python without any specification.

madpilot added inline comments.
emulators/virtualbox-ose-additions/Makefile
6 ↗(On Diff #73804)

Right, I forgot about that.

Removed commented out PORTREVISION lines.

DEVELOPER=yes in /etc/make.conf gives these after build:

Warning: 'lib/virtualbox/VBoxAuth.so' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}
Warning: 'lib/virtualbox/VBoxGuestControlSvc.so' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}
Warning: 'lib/virtualbox/VBoxRT.so' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}
Warning: 'lib/virtualbox/VBoxSharedClipboard.so' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}
Warning: 'lib/virtualbox/VBoxXPCOM.so' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}
Warning: 'lib/virtualbox/VBoxHostChannel.so' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}
Warning: 'lib/virtualbox/components/VBoxSVCM.so' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}
Warning: 'lib/virtualbox/components/VBoxC.so' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}
Warning: 'lib/virtualbox/components/VBoxXPCOMIPCC.so' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}
Warning: 'lib/virtualbox/VBoxNetDHCP.so' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}
Warning: 'lib/virtualbox/VBoxDD.so' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}
Warning: 'lib/virtualbox/VBoxXPCOMC.so' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}
Warning: 'lib/virtualbox/VBoxVMM.so' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}
Warning: 'lib/virtualbox/DbgPlugInDiggers.so' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}
Warning: 'lib/virtualbox/VBoxDragAndDropSvc.so' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}
Warning: 'lib/virtualbox/VBoxSharedCrOpenGL.so' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}
Warning: 'lib/virtualbox/VBoxDDU.so' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}
Warning: 'lib/virtualbox/VBoxHeadless.so' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}
Warning: 'lib/virtualbox/VBoxAuthSimple.so' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}
Warning: 'lib/virtualbox/VBoxGuestPropSvc.so' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}
Warning: 'lib/virtualbox/VBoxNetNAT.so' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}
Warning: 'lib/virtualbox/VBoxDD2.so' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}
Warning: 'lib/virtualbox/VBoxDbg.so' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}
Warning: 'lib/virtualbox/VBoxREM.so' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}
Warning: 'lib/virtualbox/VBoxVMMPreload.so' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}
Warning: 'lib/virtualbox/VirtualBox.so' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}
Warning: 'lib/virtualbox/VBoxSharedFolders.so' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}
Warning: 'lib/virtualbox/VBoxSDL.so' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}
Warning: 'lib/virtualbox/VBoxKeyboard.so' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}
Warning: Possible REINPLACE_CMD issues
sed failed: file content unchanged from backup: Config.kmk
sed failed: file content unchanged from backup: configure
sed failed: file content unchanged from backup: kBuild/header.kmk
sed failed: file content unchanged from backup: kBuild/units/qt4.kmk
sed failed: file content unchanged from backup: kBuild/units/qt5.kmk
sed failed: file content unchanged from backup: kBuild/sdks/LIBSDL.kmk
sed failed: file content unchanged from backup: src/libs/xpcom18a4/python/gen_python_deps.py
sed failed: file content unchanged from backup: src/VBox/Installer/freebsd/VBox.sh

Other than those, it works fine for me.

DEVELOPER=yes in /etc/make.conf gives these after build:

Looking at these they all look like issues already existing in the port before my patch.

Warning: 'lib/virtualbox/VBoxAuth.so' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}

[...]

Warning: 'lib/virtualbox/VBoxKeyboard.so' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}

I am testing stripping them with STRIP_CMD in post-install target. If it works well I'll update the patch set.

Warning: Possible REINPLACE_CMD issues
sed failed: file content unchanged from backup: Config.kmk
sed failed: file content unchanged from backup: configure
sed failed: file content unchanged from backup: kBuild/header.kmk
sed failed: file content unchanged from backup: kBuild/units/qt4.kmk
sed failed: file content unchanged from backup: kBuild/units/qt5.kmk
sed failed: file content unchanged from backup: kBuild/sdks/LIBSDL.kmk
sed failed: file content unchanged from backup: src/libs/xpcom18a4/python/gen_python_deps.py
sed failed: file content unchanged from backup: src/VBox/Installer/freebsd/VBox.sh

Some of these files are being modified with REINPLACE_CMD multiple times in post-patch, also because, depending on the options, different changes are needed.
Such multiple patching causes the backup to be overwritten, triggering false positives.

Some files are also targeted by a generic 's|/usr/local|${LOCALBASE}', and may actually not get modified if such lines have been removed from upstream sources in the while, but I'd leave the patch as is, since this is unharmful.

Other than those, it works fine for me.

Great!

Add post-install command to strip internal binaries installed by this port.

Requires fixes with recent tree due to erroneously removed patches.

I also noticed I erroneously removed a failing patch which requires adapting.

Add back and update patches erroneously removed.

madpilot retitled this revision from Update virtualbox to 5.2.42 to Update virtualbox to 5.2.42 and make it use python 3 (undeprecate).Jul 10 2020, 10:38 AM

Tested this yesterday with packer and vagrant, works fine for me.
BTW, 5.2.44 released today.

Tested this yesterday with packer and vagrant, works fine for me.

Great!

BTW, 5.2.44 released today.

Just noticed. I plan to update the patch. With a bit of luck it should be easy.

On bug 244212 a list of CVEs has been posted. I also plan to update vuln.xml with those.

New patch to update to version 5.2.44.

I also added patch to vuxml including recently released security advisories.

I resumed the advisories content, since they give only an outline, in one paragraph. I'm accepting suggestions for wording or changes about this.

I'd relaly like to commit all of this ASAP anyway I'm going to commit the vuxml changes in a few days.

madpilot retitled this revision from Update virtualbox to 5.2.42 and make it use python 3 (undeprecate) to Update virtualbox to 5.2.44 and make it use python 3 (undeprecate).Jul 16 2020, 1:37 PM
madpilot edited the summary of this revision. (Show Details)
kevans added inline comments.
emulators/virtualbox-ose/files/patch-src_VBox_Devices_PC_vbox-cpuhotplug.dsl
8 ↗(On Diff #74519)

For this update, can you fix this patch entirely (not your fault)? The GENERATE_CPU_OBJECT #define line can be left alone, keep the below sckuid -> id change in this same hunk, then drop all the other hunks in this patch. I can't see any reason at all that we need to explicitly drop the sckuid argument; it can simply remain unused if it's going to reduce the chance of a collision in the other hunks.

Cleanup cpuhotplug.dsl patch.

While here I also changed the vuxml entry URL and discovery date.

emulators/virtualbox-ose/files/patch-src_VBox_Devices_PC_vbox-cpuhotplug.dsl
22 ↗(On Diff #74567)

I have also removed this. I'm not completely sure if this is correct though.

I suspect I should have kept this change too.

Can someone confirm this so I can fix the patch?

So I think this patch is now ready.

emulators/virtualbox-ose/files/patch-src_VBox_Devices_PC_vbox-cpuhotplug.dsl
22 ↗(On Diff #74567)

Replying to myself, this code is not present anymore, so my question was wrong.

This revision was not accepted when it landed; it landed in state Needs Review.Jul 19 2020, 9:19 AM
This revision was automatically updated to reflect the committed changes.