[PC-BSD Commits] r19626 - in pbi/modules/emulators/virtualbox-ose: . scripts
svn at pcbsd.org
svn at pcbsd.org
Wed Oct 10 08:34:05 PDT 2012
Author: kris
Date: 2012-10-10 15:34:04 +0000 (Wed, 10 Oct 2012)
New Revision: 19626
Modified:
pbi/modules/emulators/virtualbox-ose/pbi.conf
pbi/modules/emulators/virtualbox-ose/scripts/post-install.sh
pbi/modules/emulators/virtualbox-ose/scripts/post-portmake.sh
Log:
Update VirtualBox PBI. Add some kung-fu which creates modules for
other FreeBSD versions, such as 9.0, 9.1, 9.2, etc.
Then during install, we check which release user is on, and install
those kernel modules specifically. This fixes issues with bridged mode
not working on 9.1
Modified: pbi/modules/emulators/virtualbox-ose/pbi.conf
===================================================================
--- pbi/modules/emulators/virtualbox-ose/pbi.conf 2012-10-10 14:47:20 UTC (rev 19625)
+++ pbi/modules/emulators/virtualbox-ose/pbi.conf 2012-10-10 15:34:04 UTC (rev 19626)
@@ -31,7 +31,7 @@
PBI_MKPORTAFTER="devel/qt4"
# Set the build key
-PBI_BUILDKEY="21"
+PBI_BUILDKEY="22"
# 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-10-10 14:47:20 UTC (rev 19625)
+++ pbi/modules/emulators/virtualbox-ose/scripts/post-install.sh 2012-10-10 15:34:04 UTC (rev 19626)
@@ -1,6 +1,8 @@
#!/bin/sh
-cp ${PBI_PROGDIRPATH}/modules/* /boot/modules/
+# Copy over the modules specific to this release
+FBSDVER=`uname -r | cut -d '-' -f 1`
+cp ${PBI_PROGDIRPATH}/modules${FBSDVER}/* /boot/modules/
cp /boot/loader.conf /boot/loader.conf.orig
cat /boot/loader.conf | grep -v "vboxdrv_load" > /tmp/loader.conf
@@ -18,10 +20,3 @@
echo "vboxnet_enable=\"YES\"" >> /etc/rc.conf
fi
/usr/local/etc/rc.d/vboxnet start
-
-uname -r | grep -e '8\.' -e '9\.' >/dev/null 2>/dev/null
-if [ "$?" = "0" ]
-then
- # If on 8.x / 9.x, load the module now
- #kldload /boot/modules/vboxdrv.ko
-fi
Modified: pbi/modules/emulators/virtualbox-ose/scripts/post-portmake.sh
===================================================================
--- pbi/modules/emulators/virtualbox-ose/scripts/post-portmake.sh 2012-10-10 14:47:20 UTC (rev 19625)
+++ pbi/modules/emulators/virtualbox-ose/scripts/post-portmake.sh 2012-10-10 15:34:04 UTC (rev 19626)
@@ -1,7 +1,32 @@
#!/bin/sh
-# Copy over the virtualbox modules we need
-cp -R /boot/modules ${PBI_PROGDIRPATH}/modules
+FBSDVER=`uname -r | cut -d '-' -f 1`
+# Copy over the virtualbox X.0 modules we need
+cp -R /boot/modules ${PBI_PROGDIRPATH}/modules$FBSDVER
+
+# Install subversion
+cd /usr/ports/devel/subversion && make install
+
+# We can add other releases here eventually, like 9.2
+case $FBSDVER in
+ 9.0) bREL="releng/9.1" ;;
+ 10.0) bREL="" ;;
+ *) bREL="releng/9.1" ;;
+esac
+
+# Now the tricky part, we need to rebuild -kmod with sources from 9.1
+for relpath in $bREL
+do
+ rel=`echo $relpath | cut -d '/' -f 2`
+ /usr/local/bin/svn co svn://svn.freebsd.org/base/${relpath} /usr/src
+ if [ $? -ne 0 ] ; then echo "Failed getting FreeBSD sources..." exit 1 ; fi
+ cd /usr/ports/emulators/virtualbox-ose-kmod
+ make deinstall
+ make install
+ if [ $? -ne 0 ] ; then echo "Failed building kmod..." exit 1 ; fi
+ cp -R /boot/modules ${PBI_PROGDIRPATH}/modules${rel}
+done
+
# Remove built-in virtualbox desktop file
rm ${PBI_PROGDIRPATH}/share/applications/virtualbox.desktop
More information about the Commits
mailing list