[PC-BSD Commits] r17202 - in pbi/modules/emulators/virtualbox-ose: . resources/bin scripts xdg-desktop xdg-menu

svn at pcbsd.org svn at pcbsd.org
Tue Jun 5 06:56:55 PDT 2012


Author: kris
Date: 2012-06-05 13:56:53 +0000 (Tue, 05 Jun 2012)
New Revision: 17202

Added:
   pbi/modules/emulators/virtualbox-ose/xdg-desktop/VirtualBox.desktop
   pbi/modules/emulators/virtualbox-ose/xdg-menu/VirtualBox.desktop
Removed:
   pbi/modules/emulators/virtualbox-ose/resources/bin/VirtualBox-wrapper
   pbi/modules/emulators/virtualbox-ose/xdg-desktop/VirtualBox-wrapper.desktop
   pbi/modules/emulators/virtualbox-ose/xdg-menu/VirtualBox-wrapper.desktop
Modified:
   pbi/modules/emulators/virtualbox-ose/external-links
   pbi/modules/emulators/virtualbox-ose/pbi.conf
   pbi/modules/emulators/virtualbox-ose/scripts/post-install.sh
Log:

Fix the VB PBI. Now we dont need to run pc-su to execute virtualbox, since
the setuid stuff works. Also make sure we set user files to correct ownership
as a result of this change. 



Modified: pbi/modules/emulators/virtualbox-ose/external-links
===================================================================
--- pbi/modules/emulators/virtualbox-ose/external-links	2012-06-05 11:42:47 UTC (rev 17201)
+++ pbi/modules/emulators/virtualbox-ose/external-links	2012-06-05 13:56:53 UTC (rev 17202)
@@ -8,5 +8,3 @@
 #include/libfoo.h       include/libfoo.h        replace
 #bin/appfoo             bin/appfoo              binary,nocrash
 #bin/appfoo2            bin/appfoo-test         binary
-bin/VirtualBox-wrapper	bin/VirtualBox-wrapper	binary,nocrash
-

Modified: pbi/modules/emulators/virtualbox-ose/pbi.conf
===================================================================
--- pbi/modules/emulators/virtualbox-ose/pbi.conf	2012-06-05 11:42:47 UTC (rev 17201)
+++ pbi/modules/emulators/virtualbox-ose/pbi.conf	2012-06-05 13:56:53 UTC (rev 17202)
@@ -31,7 +31,7 @@
 PBI_MKPORTAFTER="devel/qt4"
 
 # Set the build key
-PBI_BUILDKEY="15"
+PBI_BUILDKEY="16"
 
 # This app needs to install as root
 PBI_REQUIRESROOT="YES"

Modified: pbi/modules/emulators/virtualbox-ose/scripts/post-install.sh
===================================================================
--- pbi/modules/emulators/virtualbox-ose/scripts/post-install.sh	2012-06-05 11:42:47 UTC (rev 17201)
+++ pbi/modules/emulators/virtualbox-ose/scripts/post-install.sh	2012-06-05 13:56:53 UTC (rev 17202)
@@ -2,11 +2,6 @@
 
 cp ${PBI_PROGDIRPATH}/modules/* /boot/modules/
 
-sed -i.bak "s,CHANGEME,${PBI_PROGDIRPATH},g" ${PBI_PROGDIRPATH}/bin/VirtualBox-wrapper
-chmod 755 ${PBI_PROGDIRPATH}/bin/VirtualBox-wrapper
-rm ${PBI_PROGDIRPATH}/bin/VirtualBox-wrapper.bak
-
-
 cp /boot/loader.conf /boot/loader.conf.orig
 cat /boot/loader.conf | grep -v "vboxdrv_load"  > /tmp/loader.conf
 echo 'vboxdrv_load="YES"' >> /tmp/loader.conf
@@ -27,25 +22,38 @@
 fi
 
 
-cd ${PBI_PROGDIRPATH}/lib/virtualbox
-chmod 4511 VBoxNetAdpCtl
-chmod 4511 VBoxNetDHCP
-chmod 4511 VBoxSDL
-chmod 4511 VBoxHeadless
-chmod 4511 VBoxTestOGL
-chmod 4511 VirtualBox
-chmod 0711 VBoxManage
-chmod 0711 VBoxSVC
-chmod 0711 VBoxXPCOMIPCD
-chown root:vboxusers VBoxManage
-chown root:vboxusers VBoxNetDHCP
-chown root:vboxusers VBoxSVC
-chown root:vboxusers VBoxXPCOMIPCD
-chown root:vboxusers VirtualBox
-chown root:vboxusers VBoxSDL
-chown root:vboxusers VBoxHeadless
-chown root:vboxusers VBoxTestOGL
+# Set permissions on VB files
+for dir in lib/virtualbox .sbin
+do
+  cd ${PBI_PROGDIRPATH}/${dir}
+  chmod 4511 VBoxNetAdpCtl
+  chmod 4511 VBoxNetDHCP
+  chmod 4511 VBoxSDL
+  chmod 4511 VBoxHeadless
+  chmod 4511 VBoxTestOGL
+  chmod 4511 VirtualBox
+  chmod 0711 VBoxManage
+  chmod 0711 VBoxSVC
+  chmod 0711 VBoxXPCOMIPCD
+  chown root:vboxusers VBoxManage
+  chown root:vboxusers VBoxNetDHCP
+  chown root:vboxusers VBoxSVC
+  chown root:vboxusers VBoxXPCOMIPCD
+  chown root:vboxusers VirtualBox
+  chown root:vboxusers VBoxSDL
+  chown root:vboxusers VBoxHeadless
+  chown root:vboxusers VBoxTestOGL
+done
 
+# Fix for old root:<usr> files
+cd /home
+for usr in `ls`
+do
+  if [ ! -e "${usr}/.VirtualBox" ] ; then continue ; fi
+  chown -R ${usr}:${usr} "${usr}/.VirtualBox"
+  chown -R ${usr}:${usr} "${usr}/VirtualBox VMs/"
+done
+
 ln -fs ${PBI_PROGDIRPATH}/etc/rc.d/vboxnet /usr/local/etc/rc.d/vboxnet
 
 grep '^vboxnet_enable="YES"' /etc/rc.conf >/dev/null 2>/dev/null



More information about the Commits mailing list