[Pkg-virtualbox-commits] r104 - in trunk/debian: . patches
meskes at alioth.debian.org
meskes at alioth.debian.org
Wed Nov 7 09:27:48 UTC 2007
Author: meskes
Date: 2007-11-07 09:27:48 +0000 (Wed, 07 Nov 2007)
New Revision: 104
Added:
trunk/debian/patches/06-vboxadd-udev.dpatch
trunk/debian/patches/07-xsession.dpatch
trunk/debian/virtualbox-ose-guest-source.udev
trunk/debian/virtualbox-ose-guest-utils.init
trunk/debian/virtualbox-ose-guest-utils.postrm
Modified:
trunk/debian/changelog
trunk/debian/patches/00list
trunk/debian/rules
trunk/debian/virtualbox-ose-guest-source.postinst.modules.in
trunk/debian/virtualbox-ose-guest-source.rules
trunk/debian/virtualbox-ose-guest-utils.dirs
trunk/debian/virtualbox-ose-guest-utils.postinst
Log:
Guest additions should be fully functional now.
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2007-11-04 18:59:41 UTC (rev 103)
+++ trunk/debian/changelog 2007-11-07 09:27:48 UTC (rev 104)
@@ -10,16 +10,11 @@
* Moved architecture independant files from /usr/lib to /usr/share, closes: #448951
* Checked license of linux installer and additions.
* Repackaged dfsg orig tarball accordingly.
- * Added linux installer, closes: #448749
+ * Added linux installer tools, closes: #448749
* Provide programs with upstream upper/lower case mix as used by upstream.
- * Added linux additions in two seperate packages, closes: #440517
- TODO: - guests-utils need an init script
- - device creation in guest-modules postinst is a hack and
- won't last over a reboot the way it is now
- - add vboxnet initscript for network config?
- - test vboxvfs
+ * Added linux additions in two seperate packages, closes: #440517, #449315
- -- Michael Meskes <meskes at debian.org> Sun, 04 Nov 2007 19:58:39 +0100
+ -- Michael Meskes <meskes at debian.org> Tue, 06 Nov 2007 20:26:35 +0100
virtualbox-ose (1.5.2-dfsg-2) unstable; urgency=low
Modified: trunk/debian/patches/00list
===================================================================
--- trunk/debian/patches/00list 2007-11-04 18:59:41 UTC (rev 103)
+++ trunk/debian/patches/00list 2007-11-07 09:27:48 UTC (rev 104)
@@ -3,3 +3,6 @@
03-config-kmk.dpatch
04-localconf-kmk.dpatch
05-vboxdrv-references.dpatch
+06-vboxadd-udev.dpatch
+07-xsession.dpatch
+
Added: trunk/debian/patches/06-vboxadd-udev.dpatch
===================================================================
--- trunk/debian/patches/06-vboxadd-udev.dpatch (rev 0)
+++ trunk/debian/patches/06-vboxadd-udev.dpatch 2007-11-07 09:27:48 UTC (rev 104)
@@ -0,0 +1,89 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 06-vboxadd-udev.dpatch by <meskes at debian.org>
+## basic idea taken from http://blino.org/blog/mandriva/kernel
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Make vboxadd module register /dev/vboxadd correctly
+
+ at DPATCH@
+
+--- virtualbox-ose-1.5.2-dfsg2/src/VBox/Additions/linux/module/vboxmod.c.orig 2007-11-06 16:13:36.000000000 +0100
++++ virtualbox-ose-1.5.2-dfsg2/src/VBox/Additions/linux/module/vboxmod.c 2007-11-06 16:15:00.000000000 +0100
+@@ -23,6 +23,7 @@
+ #include "vboxmod.h"
+ #include "waitcompat.h"
+ #include <VBox/log.h>
++#include <linux/miscdevice.h>
+
+ #define VERSION "0.5"
+
+@@ -411,6 +412,13 @@
+ .llseek = no_llseek
+ };
+
++static struct miscdevice vbox_dev =
++{
++ minor: MISC_DYNAMIC_MINOR,
++ name: "vboxadd",
++ fops: &vbox_fops,
++};
++
+ #ifndef IRQ_RETVAL
+ /* interrupt handlers in 2.4 kernels don't return anything */
+ # define irqreturn_t void
+@@ -685,17 +693,22 @@
+ }
+
+ /* register a character device */
+- err = register_chrdev(vbox_major, "vboxadd", &vbox_fops);
+- if (err < 0 || ((vbox_major & err) || (!vbox_major && !err)))
++ if (vbox_major > 0)
+ {
+- printk(KERN_ERR "vboxadd: register_chrdev failed: vbox_major: %d, err = %d\n",
+- vbox_major, err);
+- PCI_DEV_PUT(pcidev);
+- return -ENODEV;
++ err = register_chrdev(vbox_major, "vboxadd", &vbox_fops);
++ if (err < 0 || ((vbox_major & err) || (!vbox_major && !err)))
++ {
++ printk(KERN_ERR "vboxadd: register_chrdev failed: vbox_major: %d, err = %d\n",
++ vbox_major, err);
++ PCI_DEV_PUT(pcidev);
++ return -ENODEV;
++ }
++ /* if no major code was set, take the return value */
++ if (!vbox_major)
++ vbox_major = err;
+ }
+- /* if no major code was set, take the return value */
+- if (!vbox_major)
+- vbox_major = err;
++ else
++ err = misc_register(&vbox_dev);
+
+ /* allocate and initialize device extension */
+ vboxDev = kmalloc(sizeof(*vboxDev), GFP_KERNEL);
+@@ -829,7 +842,10 @@
+ fail:
+ PCI_DEV_PUT(pcidev);
+ free_resources();
+- unregister_chrdev(vbox_major, "vboxadd");
++ if (vbox_major > 0)
++ unregister_chrdev(vbox_major, "vboxadd");
++ else
++ misc_deregister(&vbox_dev);
+ return err;
+ }
+
+@@ -841,7 +857,10 @@
+ {
+ printk(KERN_DEBUG "vboxadd: unloading...\n");
+
+- unregister_chrdev(vbox_major, "vboxadd");
++ if (vbox_major > 0)
++ unregister_chrdev(vbox_major, "vboxadd");
++ else
++ misc_deregister(&vbox_dev);
+ free_resources();
+ vboxadd_cmc_fini ();
+ printk(KERN_DEBUG "vboxadd: unloaded\n");
Added: trunk/debian/patches/07-xsession.dpatch
===================================================================
--- trunk/debian/patches/07-xsession.dpatch (rev 0)
+++ trunk/debian/patches/07-xsession.dpatch 2007-11-07 09:27:48 UTC (rev 104)
@@ -0,0 +1,17 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 07-Xsession.dpatch by <meskes at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Create a start script in Xsession.d
+
+ at DPATCH@
+
+--- virtualbox-ose-1.5.2-dfsg2/src/VBox/Additions/linux/installer/98vboxadd-xclient.orig 2007-11-06 16:29:23.000000000 +0100
++++ virtualbox-ose-1.5.2-dfsg2/src/VBox/Additions/linux/installer/98vboxadd-xclient 2007-11-06 16:28:15.000000000 +0100
+@@ -0,0 +1,6 @@
++# (C) 2007
++# Michael Meskes <meskes at debian.org>
++# Placed under GPL
++# I had to rewrite this simple file because of some license restrictions
++
++/usr/bin/vboxadd-xclient || true
Modified: trunk/debian/rules
===================================================================
--- trunk/debian/rules 2007-11-04 18:59:41 UTC (rev 103)
+++ trunk/debian/rules 2007-11-07 09:27:48 UTC (rev 104)
@@ -72,6 +72,7 @@
dh_testroot
dh_clean -k
dh_installdirs
+ dh_installinit
install -D -m 0644 $(CURDIR)/debian/lintian/$(sname) \
$(CURDIR)/debian/$(sname)/usr/share/lintian/overrides/$(sname)
@@ -116,7 +117,7 @@
cp debian/control debian/changelog debian/copyright debian/compat debian/$(psource)/usr/src/modules/$(sname)/debian
cp debian/$(psource).control.modules.in debian/$(psource)/usr/src/modules/$(sname)/debian/control.modules.in
cp debian/$(psource).postinst.modules.in debian/$(psource)/usr/src/modules/$(sname)/debian/postinst.modules.in
- cp debian/$(psource).rules debian/$(psource)/usr/src/modules/$(sname)/debian/rules
+ install -m 755 debian/$(psource).rules debian/$(psource)/usr/src/modules/$(sname)/debian/rules
cd debian/$(psource)/usr/src && tar c modules | bzip2 -9 > $(sname).tar.bz2 && rm -rf modules
@@ -124,7 +125,8 @@
cp debian/control debian/changelog debian/copyright debian/compat debian/$(gsource)/usr/src/modules/$(gname)/debian
cp debian/$(gsource).control.modules.in debian/$(gsource)/usr/src/modules/$(gname)/debian/control.modules.in
cp debian/$(gsource).postinst.modules.in debian/$(gsource)/usr/src/modules/$(gname)/debian/postinst.modules.in
- cp debian/$(gsource).rules debian/$(gsource)/usr/src/modules/$(gname)/debian/rules
+ cp debian/$(gsource).udev debian/$(gsource)/usr/src/modules/$(gname)/debian/udev
+ install -m 755 debian/$(gsource).rules debian/$(gsource)/usr/src/modules/$(gname)/debian/rules
cd debian/$(gsource)/usr/src && tar c modules | bzip2 -9 > $(gname).tar.bz2 && rm -rf modules
@@ -134,8 +136,9 @@
mv debian/$(sname)/usr/lib/virtualbox/additions/vboxmouse_drv_14.so debian/$(uname)/usr/lib/xorg/modules/input/vboxmouse_drv.so
mv debian/$(sname)/usr/lib/virtualbox/additions/mountvboxsf debian/$(uname)/sbin/mount.vboxsf
mv debian/$(sname)/usr/lib/virtualbox/additions/vboxadd-timesync debian/$(uname)/usr/sbin/vboxadd-timesync
- mv debian/$(sname)/usr/lib/virtualbox/additions/vboxadd-xclient debian/$(uname)/usr/sbin/vboxadd-xclient
+ mv debian/$(sname)/usr/lib/virtualbox/additions/vboxadd-xclient debian/$(uname)/usr/bin/vboxadd-xclient
install -m 755 src/VBox/Additions/linux/installer/x11config.pl debian/$(uname)/usr/lib/virtualbox/
+ install -m 644 src/VBox/Additions/linux/installer/98vboxadd-xclient debian/$(uname)/etc/X11/Xsession.d
rm -r debian/$(sname)/usr/lib/virtualbox/additions
dh_install
@@ -149,6 +152,7 @@
dh_installmenu -a
dh_link -a
dh_strip -a --dbg-package=$(sname)-dbg
+ rm -r debian/$(sname)-dbg/usr/lib/debug/usr/sbin debian/$(sname)-dbg/usr/lib/debug/sbin
dh_compress -a
dh_fixperms -X=/usr/lib/virtualbox/VBox.sh -a
dh_installudev -a
Modified: trunk/debian/virtualbox-ose-guest-source.postinst.modules.in
===================================================================
--- trunk/debian/virtualbox-ose-guest-source.postinst.modules.in 2007-11-04 18:59:41 UTC (rev 103)
+++ trunk/debian/virtualbox-ose-guest-source.postinst.modules.in 2007-11-07 09:27:48 UTC (rev 104)
@@ -11,30 +11,6 @@
modprobe vboxadd || true
modprobe vboxvfs || true
invoke-rc.d udev reload
- if [ ! -c $dev ]; then
- maj=`sed -n 's;\([0-9]\+\) vboxadd;\1;p' /proc/devices`
- if [ ! -z "$maj" ]; then
- min=0
- else
- min=`sed -n 's;\([0-9]\+\) vboxadd;\1;p' /proc/misc`
- if [ ! -z "$min" ]; then
- maj=10
- fi
- fi
- test -z "$maj" && {
- rmmod vboxvfs
- rmmod vboxadd
- echo "Cannot locate the VirtualBox device"
- exit 1
- }
-
- mknod -m 0664 $dev c $maj $min || {
- rmmod vboxvfs
- rmmod vboxadd
- echo "Cannot create device $dev with major $maj and minor $min"
- exit 1
- }
- fi
;;
abort-upgrade|abort-deconfigure|abort-remove)
Modified: trunk/debian/virtualbox-ose-guest-source.rules
===================================================================
--- trunk/debian/virtualbox-ose-guest-source.rules 2007-11-04 18:59:41 UTC (rev 103)
+++ trunk/debian/virtualbox-ose-guest-source.rules 2007-11-07 09:27:48 UTC (rev 104)
@@ -44,6 +44,11 @@
MAKE:=kmk
+clean:
+ (cd vboxadd; $(MAKE) clean)
+ (cd vboxvfs; $(MAKE) clean)
+ dh_clean
+
binary-modules: prep-deb-files
dh_testroot
dh_clean -k
@@ -58,6 +63,7 @@
dh_installdocs
dh_installchangelogs
+ dh_installudev
dh_compress
dh_fixperms
dh_installmodules
Added: trunk/debian/virtualbox-ose-guest-source.udev
===================================================================
--- trunk/debian/virtualbox-ose-guest-source.udev (rev 0)
+++ trunk/debian/virtualbox-ose-guest-source.udev 2007-11-07 09:27:48 UTC (rev 104)
@@ -0,0 +1 @@
+KERNEL=="vboxadd", NAME="vboxadd", OWNER="root", MODE="0666"
Modified: trunk/debian/virtualbox-ose-guest-utils.dirs
===================================================================
--- trunk/debian/virtualbox-ose-guest-utils.dirs 2007-11-04 18:59:41 UTC (rev 103)
+++ trunk/debian/virtualbox-ose-guest-utils.dirs 2007-11-07 09:27:48 UTC (rev 104)
@@ -1,5 +1,7 @@
/usr/lib/xorg/modules/drivers
/usr/lib/xorg/modules/input
/usr/sbin
+/usr/bin
/sbin
+/etc/X11/Xsession.d
Added: trunk/debian/virtualbox-ose-guest-utils.init
===================================================================
--- trunk/debian/virtualbox-ose-guest-utils.init (rev 0)
+++ trunk/debian/virtualbox-ose-guest-utils.init 2007-11-07 09:27:48 UTC (rev 104)
@@ -0,0 +1,48 @@
+#!/bin/sh
+# (C) 2007 Michael Meskes <meskes at debian.org>
+
+### BEGIN INIT INFO
+# Provides: vboxadd
+# Short-Description: VirtualBox Linux Additions
+# Required-Start:
+# Required-Stop:
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+### END INIT INFO
+
+PATH=$PATH:/bin:/sbin:/usr/sbin
+
+. /lib/lsb/init-functions
+
+set -e
+
+case "$1" in
+ start)
+ log_action_begin_msg 'Starting VirtualBox Additions';
+ # this may already be loaded, but let's play it safe
+ modprobe vboxadd
+
+ start-stop-daemon --start --quiet --exec /usr/sbin/vboxadd-timesync -- --daemonize
+ log_end_msg 0
+ ;;
+ stop)
+ log_action_begin_msg 'Stopping VirtualBox Additions';
+ start-stop-daemon --stop --quiet --oknodo --exec /usr/sbin/vboxadd-timesync
+ log_end_msg 0
+ ;;
+ restart|force-reload)
+ #
+ # If the "reload" option is implemented, move the "force-reload"
+ # option to the "reload" entry. If not, "force-reload" is
+ # just the same as "restart".
+ #
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
Modified: trunk/debian/virtualbox-ose-guest-utils.postinst
===================================================================
--- trunk/debian/virtualbox-ose-guest-utils.postinst 2007-11-04 18:59:41 UTC (rev 103)
+++ trunk/debian/virtualbox-ose-guest-utils.postinst 2007-11-07 09:27:48 UTC (rev 104)
@@ -17,4 +17,6 @@
;;
esac
+#DEBHELPER#
+
exit 0
Added: trunk/debian/virtualbox-ose-guest-utils.postrm
===================================================================
--- trunk/debian/virtualbox-ose-guest-utils.postrm (rev 0)
+++ trunk/debian/virtualbox-ose-guest-utils.postrm 2007-11-07 09:27:48 UTC (rev 104)
@@ -0,0 +1,4 @@
+#!/bin/sh -e
+
+#DEBHELPER#
+
More information about the Pkg-virtualbox-commits
mailing list