diff options
author | Bernhard Froehlich <decke@FreeBSD.org> | 2011-07-01 13:31:47 +0000 |
---|---|---|
committer | Bernhard Froehlich <decke@FreeBSD.org> | 2011-07-01 13:31:47 +0000 |
commit | 7c8c29d4d828a58609537d6598ed25ae170159f1 (patch) | |
tree | 3455133c1d917dff5c2ae11349786128b0e223ed /emulators/virtualbox-ose | |
parent | ea253ac9b97c9a9deb390467a9b5c82c2e5d6d4b (diff) | |
download | ports-7c8c29d4d828a58609537d6598ed25ae170159f1.tar.gz ports-7c8c29d4d828a58609537d6598ed25ae170159f1.zip |
Notes
Diffstat (limited to 'emulators/virtualbox-ose')
6 files changed, 54 insertions, 42 deletions
diff --git a/emulators/virtualbox-ose/Makefile b/emulators/virtualbox-ose/Makefile index a064829b5bd3..7a0974e06717 100644 --- a/emulators/virtualbox-ose/Makefile +++ b/emulators/virtualbox-ose/Makefile @@ -6,7 +6,7 @@ # PORTNAME= virtualbox-ose -DISTVERSION= 4.0.8 +DISTVERSION= 4.0.10 CATEGORIES= emulators MASTER_SITES= http://tmp.chruetertee.ch/ \ http://freebsd.unixfreunde.de/sources/ \ diff --git a/emulators/virtualbox-ose/distinfo b/emulators/virtualbox-ose/distinfo index a229bab0e81c..e5b2352a7a8b 100644 --- a/emulators/virtualbox-ose/distinfo +++ b/emulators/virtualbox-ose/distinfo @@ -1,4 +1,4 @@ -SHA256 (VirtualBox-4.0.8.tar.bz2) = 48961f0d6fe70c3887cbca5ea987767ac1bafd4b64dd3c4d25445682351e118e -SIZE (VirtualBox-4.0.8.tar.bz2) = 69593014 -SHA256 (VBoxGuestAdditions_4.0.8.iso) = f2cec4d8b176ce865cb93096e80045b1453da1504d3a084fc910b47615aa2be0 -SIZE (VBoxGuestAdditions_4.0.8.iso) = 40814592 +SHA256 (VirtualBox-4.0.10.tar.bz2) = 47fca441db321f7b9cfad9beb52dbeb9d52f5270e95e26f2c1ece13e100e474c +SIZE (VirtualBox-4.0.10.tar.bz2) = 69567366 +SHA256 (VBoxGuestAdditions_4.0.10.iso) = c39390661991e06f6ad3e2b2c23640431040ae80101df924bb3d5b3d28b8761d +SIZE (VBoxGuestAdditions_4.0.10.iso) = 40845312 diff --git a/emulators/virtualbox-ose/files/patch-src-VBox-HostDrivers-Support-SUPR3HardenedVerify.cpp b/emulators/virtualbox-ose/files/patch-src-VBox-HostDrivers-Support-SUPR3HardenedVerify.cpp deleted file mode 100644 index ffbbdbfaad16..000000000000 --- a/emulators/virtualbox-ose/files/patch-src-VBox-HostDrivers-Support-SUPR3HardenedVerify.cpp +++ /dev/null @@ -1,14 +0,0 @@ ---- src/VBox/HostDrivers/Support/SUPR3HardenedVerify.cpp.orig 2011-05-16 18:33:40.000000000 +0200 -+++ src/VBox/HostDrivers/Support/SUPR3HardenedVerify.cpp 2011-05-19 16:53:54.000000000 +0200 -@@ -1187,6 +1187,11 @@ - permit grand parents and beyond to be group writable by admin. */ - if (pFsObjState->Stat.st_gid != 80 /*admin*/) /** @todo dynamically resolve the admin group? */ - #endif -+#ifdef RT_OS_FREEBSD -+ /* PC-BSD 9 has group-writable application directory, similar to OSX and -+ their Applications directory */ -+ if (pFsObjState->Stat.st_gid != 5 /*operators*/) /* Allow operators group-writes */ -+#endif - return supR3HardenedSetError3(VERR_SUPLIB_WRITE_NON_SYS_GROUP, pErrInfo, - "The group is not a system group and it has write access to '", pszPath, "'"); - } diff --git a/emulators/virtualbox-ose/files/patch-src-VBox-Main-src-server-HostImpl.cpp b/emulators/virtualbox-ose/files/patch-src-VBox-Main-src-server-HostImpl.cpp deleted file mode 100644 index 83795f6779e7..000000000000 --- a/emulators/virtualbox-ose/files/patch-src-VBox-Main-src-server-HostImpl.cpp +++ /dev/null @@ -1,20 +0,0 @@ ---- src/VBox/Main/src-server/HostImpl.cpp.orig 2011-02-17 17:31:52.000000000 +0100 -+++ src/VBox/Main/src-server/HostImpl.cpp 2011-02-17 23:46:50.000000000 +0100 -@@ -249,6 +249,8 @@ - - m->pParent = aParent; - -+ HRESULT hrc = NULL; -+ - #ifdef VBOX_WITH_USB - /* - * Create and initialize the USB Proxy Service. -@@ -268,7 +270,7 @@ - # else - m->pUSBProxyService = new USBProxyService(this); - # endif -- HRESULT hrc = m->pUSBProxyService->init(); -+ hrc = m->pUSBProxyService->init(); - AssertComRCReturn(hrc, hrc); - #endif /* VBOX_WITH_USB */ - diff --git a/emulators/virtualbox-ose/files/patch-src-VBox-Main-src-server-freebsd-HostHardwareFreeBSD.cpp b/emulators/virtualbox-ose/files/patch-src-VBox-Main-src-server-freebsd-HostHardwareFreeBSD.cpp new file mode 100644 index 000000000000..69d6260ac6ff --- /dev/null +++ b/emulators/virtualbox-ose/files/patch-src-VBox-Main-src-server-freebsd-HostHardwareFreeBSD.cpp @@ -0,0 +1,33 @@ +--- src/VBox/Main/src-server/freebsd/HostHardwareFreeBSD.cpp.orig 2011-05-16 12:33:46.000000000 -0400 ++++ src/VBox/Main/src-server/freebsd/HostHardwareFreeBSD.cpp 2011-06-24 16:03:37.000000000 -0400 +@@ -35,6 +35,7 @@ + #include <iprt/string.h> + + #ifdef RT_OS_FREEBSD ++# include <sys/param.h> + # include <sys/types.h> + # include <sys/stat.h> + # include <unistd.h> +@@ -186,11 +187,17 @@ static int getDVDInfoFromCAM(DriveInfoLi + DeviceMatchPattern.pattern.device_pattern.target_id = CAM_TARGET_WILDCARD; + DeviceMatchPattern.pattern.device_pattern.target_lun = CAM_LUN_WILDCARD; + DeviceMatchPattern.pattern.device_pattern.flags = DEV_MATCH_INQUIRY; +- DeviceMatchPattern.pattern.device_pattern.inq_pat.type = T_CDROM; +- DeviceMatchPattern.pattern.device_pattern.inq_pat.media_type = SIP_MEDIA_REMOVABLE | SIP_MEDIA_FIXED; +- DeviceMatchPattern.pattern.device_pattern.inq_pat.vendor[0] = '*'; /* Matches anything */ +- DeviceMatchPattern.pattern.device_pattern.inq_pat.product[0] = '*'; /* Matches anything */ +- DeviceMatchPattern.pattern.device_pattern.inq_pat.revision[0] = '*'; /* Matches anything */ ++#if __FreeBSD_version >= 900000 ++#define INQ_PAT data.inq_pat ++#else ++#define INQ_PAT inq_pat ++#endif ++ DeviceMatchPattern.pattern.device_pattern.INQ_PAT.type = T_CDROM; ++ DeviceMatchPattern.pattern.device_pattern.INQ_PAT.media_type = SIP_MEDIA_REMOVABLE | SIP_MEDIA_FIXED; ++ DeviceMatchPattern.pattern.device_pattern.INQ_PAT.vendor[0] = '*'; /* Matches anything */ ++ DeviceMatchPattern.pattern.device_pattern.INQ_PAT.product[0] = '*'; /* Matches anything */ ++ DeviceMatchPattern.pattern.device_pattern.INQ_PAT.revision[0] = '*'; /* Matches anything */ ++#undef INQ_PAT + DeviceCCB.cdm.num_patterns = 1; + DeviceCCB.cdm.pattern_buf_len = sizeof(struct dev_match_result); + DeviceCCB.cdm.patterns = &DeviceMatchPattern; diff --git a/emulators/virtualbox-ose/files/vboxheadless.in b/emulators/virtualbox-ose/files/vboxheadless.in index f0a04a6b1aa1..8913f192ffb8 100644 --- a/emulators/virtualbox-ose/files/vboxheadless.in +++ b/emulators/virtualbox-ose/files/vboxheadless.in @@ -13,9 +13,15 @@ # vboxheadless_machines (str): Space separated list of machines # vboxheadless_user (str): Default user account to run with. # (default: %%VBOXUSER%%) +# vboxheadless_stop (str): Default stop cmd for VBoxManage controlvm. +# (default: savestate) +# vboxheadless_delay (int): Default startup/shutdown delay in seconds. +# (default: 0) # vboxheadless_<machine>_name (str): Virtualbox machine name or UUID. # vboxheadless_<machine>_user (str): User account to run with. # vboxheadless_<machine>_flags (str): Additional flags for VBoxHeadless. +# vboxheadless_<machine>_stop (str): Stop command for VBoxManage controlvm. +# vboxheadless_<machine>_delay (int): Startup and shutdown delay in seconds. . /etc/rc.subr @@ -31,7 +37,7 @@ status_cmd="${name}_status" vboxheadless_start() { - local machine mpidfile pid vmname vmuser vmflags + local machine mpidfile pid vmname vmuser vmflags vmdelay echo "Starting Virtual Machines:" for machine in ${vboxheadless_machines}; do @@ -40,6 +46,7 @@ vboxheadless_start() eval vmname="\${vboxheadless_${machine}_name:-${machine}}" eval vmuser="\${vboxheadless_${machine}_user:-${vboxheadless_user}}" eval vmflags="\${vboxheadless_${machine}_flags:-}" + eval vmdelay="\${vboxheadless_${machine}_delay:-${vboxheadless_delay}}" HOME=$(/usr/sbin/pw usershow -7 -n "${vmuser}" | /usr/bin/cut -d: -f6) @@ -57,6 +64,7 @@ vboxheadless_start() continue fi + /bin/sleep ${vmdelay} /usr/bin/install -o ${vmuser} -g wheel -m 644 /dev/null ${mpidfile} /usr/sbin/daemon -f -p ${mpidfile} -u ${vmuser} ${command} --startvm "${vmname}" ${vmflags} echo "Started" @@ -65,7 +73,7 @@ vboxheadless_start() vboxheadless_stop() { - local machine mpidfile pid vmname vmuser + local machine mpidfile pid vmname vmuser vmstop vmdelay echo "Saving states for Virtual Machines:" for machine in ${vboxheadless_machines}; do @@ -73,11 +81,14 @@ vboxheadless_stop() pid=$(check_pidfile $mpidfile $command) eval vmname="\${vboxheadless_${machine}_name:-${machine}}" eval vmuser="\${vboxheadless_${machine}_user:-${vboxheadless_user}}" + eval vmstop="\${vboxheadless_${machine}_stop:-${vboxheadless_stop}}" + eval vmdelay="\${vboxheadless_${machine}_delay:-${vboxheadless_delay}}" /usr/bin/printf "%25s " "${vmname}" if [ -n "${pid}" ]; then - /usr/bin/su ${vmuser} -c "%%PREFIX%%/bin/VBoxManage controlvm '${vmname}' savestate >/dev/null" 2>/dev/null + /bin/sleep ${vmdelay} + /usr/bin/su ${vmuser} -c "%%PREFIX%%/bin/VBoxManage controlvm '${vmname}' ${vmstop} >/dev/null" 2>/dev/null wait_for_pids $pid >/dev/null echo "Stopped" else @@ -115,6 +126,8 @@ load_rc_config $name : ${vboxheadless_enable="NO"} : ${vboxheadless_user="%%VBOXUSER%%"} +: ${vboxheadless_stop="savestate"} +: ${vboxheadless_delay="0"} cmd_arg="$1" ; shift |