wok-current rev 14054
virtualbox-ose: splitted in virtualbox-ose for slitaz hosts and virtualbox-ose-guestutils for slitaz guests, can't get it to work without reboot
author | ernia <monghitri@aruba.it> |
---|---|
date | Tue Feb 19 20:23:53 2013 +0000 (2013-02-19) |
parents | 6107d922d4f6 |
children | 957a43e24682 |
files | virtualbox-ose-guestutils/receipt virtualbox-ose-guestutils/stuff/60-vboxguest.rules virtualbox-ose-guestutils/stuff/VBoxService virtualbox-ose/receipt |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/virtualbox-ose-guestutils/receipt Tue Feb 19 20:23:53 2013 +0000 1.3 @@ -0,0 +1,105 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="virtualbox-ose-guestutils" 1.7 +VERSION="4.2.6" 1.8 +CATEGORY="misc" 1.9 +SHORT_DESC="VirtualBox Guest userspace utilities, useful for running Slitaz inside a virtual machine" 1.10 +MAINTAINER="slaxemulator@gmail.com" 1.11 +WANTED="virtualbox-ose" 1.12 +WEB_SITE="https://www.virtualbox.org/" 1.13 +DEPENDS="xorg-libXfixes xorg-libXmu xorg-xrandr" 1.14 +BUILD_DEPENDS="" 1.15 + 1.16 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.17 +genpkg_rules() 1.18 +{ 1.19 + # virtualbox-ose-additions 1.20 + source $src/env.sh 1.21 + cd "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions" 1.22 + mkdir -p $fs/usr/bin 1.23 + mkdir -p $fs/sbin 1.24 + mkdir -p $fs/etc/X11/xorg.conf.d 1.25 + mkdir -p $fs/etc/init.d 1.26 + 1.27 + install -m755 VBoxClient VBoxControl VBoxService "$fs/usr/bin" 1.28 + install -m755 mount.vboxsf "$fs/sbin" 1.29 + 1.30 + install -m755 -D $src/src/VBox/Additions/x11/Installer/98vboxadd-xclient \ 1.31 + $fs/usr/bin/VBoxClient-all 1.32 + install -m755 -D $src/src/VBox/Additions/x11/Installer/vboxclient.desktop \ 1.33 + $fs/etc/xdg/autostart/vboxclient.desktop 1.34 + 1.35 + install -D vboxmouse_drv_16.so \ 1.36 + "$fs/usr/lib/X11/modules/input/vboxmouse.so" 1.37 + install -D vboxvideo_drv_112.so \ 1.38 + "$fs/usr/lib/X11/modules/drivers/vboxvideo.so" 1.39 + install -d "$fs/usr/lib/dri" 1.40 + install -m755 VBoxOGL*.so "$fs/usr/lib" 1.41 + ln -s /usr/lib/VBoxOGL.so "$fs/usr/lib/dri/vboxvideo_dri.so" 1.42 + install -m755 -D pam_vbox.so "$fs/lib/security/pam_vbox.so" 1.43 + 1.44 + # virtualbox-ose-additions-modules 1.45 + 1.46 + KERNEL_VERSION=$(grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g') 1.47 + #cooking installs modules in linux major version dir 1.48 + KBASEVER="${KERNEL_VERSION:0:3}" 1.49 + 1.50 + 1.51 + cd "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src" 1.52 + 1.53 + cd vboxguest 1.54 + install -D -m644 vboxguest.ko \ 1.55 + "$fs/lib/modules/$KBASEVER-slitaz/misc/vboxguest.ko" 1.56 + 1.57 + cd ../vboxsf 1.58 + install -D -m644 vboxsf.ko \ 1.59 + "$fs/lib/modules/$KBASEVER-slitaz/misc/vboxsf.ko" 1.60 + 1.61 + cd ../vboxvideo 1.62 + install -D -m644 vboxvideo.ko \ 1.63 + "$fs/lib/modules/$KBASEVER-slitaz/misc/vboxvideo.ko" 1.64 + 1.65 + install -D -m 0644 "$stuff/60-vboxguest.rules" \ 1.66 + "$fs/etc/udev/rules.d/60-vboxguest.rules" 1.67 + 1.68 + install -D -m 0755 "$stuff/VBoxService" \ 1.69 + "$fs/etc/init.d/VBoxService" 1.70 + 1.71 +} 1.72 + 1.73 +pre_remove() 1.74 +{ 1.75 + sed -i "s/vboxguest vboxsf vboxvideo //" $1/etc/rcS.conf 1.76 + chroot $1/ /etc/init.d/VBoxService stop 1.77 + sed -i '/# VBoxService daemon options./{N;N;N;d}' $1/etc/daemons.conf 1.78 + sed -i 's/VBoxService //' $1/etc/rcS.conf 1.79 + chroot $1/ delgroup vboxsf 1.80 + sed -i 's/^\tDriver.*$/\tDriver "vesa"/' $1/etc/X11/xorg.conf.d/60-Device.conf 1.81 +} 1.82 + 1.83 +post_install() 1.84 +{ 1.85 + chroot $1/ udevadm control --reload 1.86 + chroot $1/ udevadm trigger 1.87 + grep -qs VBOXSERVICE_OPTIONS $1/etc/daemons.conf || 1.88 + cat >> $1/etc/daemons.conf << "EOT" 1.89 +# VBoxService daemon options. 1.90 +VBOXSERVICE_OPTIONS="" 1.91 + 1.92 +EOT 1.93 + KERNEL_VERSION=$( chroot $1/ uname -r) 1.94 + chroot $1/ depmod -a $KERNEL_VERSION 1.95 + #chroot $1/ modprobe -a vboxguest vboxsf vboxvideo 1.96 + sed -i 's/^\tDriver.*$/\tDriver "vboxvideo"/' $1/etc/X11/xorg.conf.d/60-Device.conf 1.97 + grep -qs vboxguest $1/etc/rcS.conf || 1.98 + sed -i 's/LOAD_MODULES="/&vboxguest vboxsf vboxvideo /' $1/etc/rcS.conf 1.99 + grep -qs VBoxService $1/etc/rcS.conf || 1.100 + sed -i 's/RUN_DAEMONS="/&VBoxService /' $1/etc/rcS.conf 1.101 + grep -qs vboxsf $1/etc/group || chroot $1/ addgroup -g 109 vboxsf 1.102 + echo "add yourself to vboxsf group if you want to access" 1.103 + echo "host shared folder: addgroup $USER vboxsf" 1.104 + echo "then reboot" 1.105 + #i can't get udev to do its work 1.106 + #echo "then logout and login again" 1.107 + #chroot $1/ /etc/init.d/VBoxService start &> /dev/null 1.108 +}
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/virtualbox-ose-guestutils/stuff/60-vboxguest.rules Tue Feb 19 20:23:53 2013 +0000 2.3 @@ -0,0 +1,2 @@ 2.4 +ACTION=="add", KERNEL=="vboxguest", SUBSYSTEM=="misc", OWNER="root", MODE="0600" 2.5 +ACTION=="add", KERNEL=="vboxuser", SUBSYSTEM=="misc", OWNER="root", MODE="0666"
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/virtualbox-ose-guestutils/stuff/VBoxService Tue Feb 19 20:23:53 2013 +0000 3.3 @@ -0,0 +1,52 @@ 3.4 +#!/bin/sh 3.5 +# /etc/init.d/VBoxService: Start, stop and restart VBoxService daemon on SliTaz, 3.6 +# at boot time or with the command line. Daemons options are configured 3.7 +# with /etc/daemons.conf 3.8 +# 3.9 +. /etc/init.d/rc.functions 3.10 +. /etc/daemons.conf 3.11 + 3.12 +NAME=VBoxService 3.13 +DESC="VirtualBox Guest Service" 3.14 +DAEMON=/usr/bin/VBoxService 3.15 +OPTIONS=$VBOXSERVICE_OPTIONS 3.16 +PIDFILE=/var/run/VBoxService.pid 3.17 + 3.18 +case "$1" in 3.19 + start) 3.20 + if active_pidfile $PIDFILE VBoxService ; then 3.21 + echo "$NAME already running." 3.22 + exit 1 3.23 + fi 3.24 + echo -n "Starting $DESC: $NAME... " 3.25 + mkdir -p $(dirname $PIDFILE) 3.26 + $DAEMON $OPTIONS 3.27 + status ;; 3.28 + stop) 3.29 + if ! active_pidfile $PIDFILE VBoxService ; then 3.30 + echo "$NAME is not running." 3.31 + exit 1 3.32 + fi 3.33 + echo -n "Stopping $DESC: $NAME... " 3.34 + kill $(cat $PIDFILE) 3.35 + rm $PIDFILE 3.36 + status ;; 3.37 + restart) 3.38 + if ! active_pidfile $PIDFILE VBoxService ; then 3.39 + echo "$NAME is not running." 3.40 + exit 1 3.41 + fi 3.42 + echo -n "Restarting $DESC: $NAME... " 3.43 + kill $(cat $PIDFILE) 3.44 + rm $PIDFILE 3.45 + sleep 2 3.46 + $DAEMON $OPTIONS 3.47 + status ;; 3.48 + *) 3.49 + echo "" 3.50 + echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]" 3.51 + echo "" 3.52 + exit 1 ;; 3.53 +esac 3.54 + 3.55 +exit 0
4.1 --- a/virtualbox-ose/receipt Tue Feb 19 18:35:30 2013 +0100 4.2 +++ b/virtualbox-ose/receipt Tue Feb 19 20:23:53 2013 +0000 4.3 @@ -7,7 +7,7 @@ 4.4 MAINTAINER="slaxemulator@gmail.com" 4.5 SOURCE="VirtualBox" 4.6 TARBALL="$SOURCE-$VERSION.tar.bz2" 4.7 -WEB_SITE="http://virtualbox.org/" 4.8 +WEB_SITE="https://www.virtualbox.org/" 4.9 WGET_URL="http://download.virtualbox.org/virtualbox/$VERSION/$TARBALL" 4.10 PROVIDE="virtualbox" 4.11 4.12 @@ -38,20 +38,20 @@ 4.13 kmk all 4.14 4.15 # build modules. NOTE: we gor ERROR even if it build and cook will exit 4.16 - # sed ERROR to error. 4.17 + # so we redirect some output to avoid cooker thinking something is wrong 4.18 #cd 4.19 KERN_DIR=/usr/src/linux make -C "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/src" 4.20 # build guest additions modules 4.21 KERN_DIR=/usr/src/linux make -C "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src" 4.22 KERN_DIR=/usr/src/linux make -C \ 4.23 "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src/vboxvideo" \ 4.24 - 2>&1 | sed s'/ERROR/error/' 4.25 + 2>&1 /dev/null 4.26 } 4.27 4.28 # Rules to gen a SliTaz package suitable for Tazpkg. 4.29 genpkg_rules() 4.30 { 4.31 - fs=$WOK/$PACKAGE/taz/$PACKAGE-$VERSION/fs 4.32 + #fs=$WOK/$PACKAGE/taz/$PACKAGE-$VERSION/fs 4.33 4.34 source $src/env.sh 4.35 cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin 4.36 @@ -134,54 +134,53 @@ 4.37 install -D -m644 vboxdrv.ko "$fs/lib/modules/$KBASEVER-slitaz/misc/vboxdrv.ko" 4.38 install -D -m644 vboxnetflt.ko "$fs/lib/modules/$KBASEVER-slitaz/misc/vboxnetflt.ko" 4.39 install -D -m644 vboxnetadp.ko "$fs/lib/modules/$KBASEVER-slitaz/misc/vboxnetadp.ko" 4.40 - #install -D -m644 vboxpci.ko "$fs/lib/modules/$KBASEVER-slitaz/misc/vboxpci.ko" 4.41 4.42 - # virtualbox-ose-additions 4.43 + ## virtualbox-ose-additions 4.44 4.45 - cd "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions" 4.46 - mkdir -p $fs/usr/bin 4.47 - mkdir -p $fs/sbin 4.48 - mkdir -p $fs/etc/X11/xorg.conf.d 4.49 + #cd "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions" 4.50 + #mkdir -p $fs/usr/bin 4.51 + #mkdir -p $fs/sbin 4.52 + #mkdir -p $fs/etc/X11/xorg.conf.d 4.53 4.54 - install -m755 VBoxClient VBoxControl VBoxService "$fs/usr/bin" 4.55 - install -m755 mount.vboxsf "$fs/sbin" 4.56 + #install -m755 VBoxClient VBoxControl VBoxService "$fs/usr/bin" 4.57 + #install -m755 mount.vboxsf "$fs/sbin" 4.58 4.59 - [ -f $src/src/VBox/Additions/x11/Installer/50-vboxmouse.conf ] && 4.60 - install -m644 $src/src/VBox/Additions/x11/Installer/50-vboxmouse.conf \ 4.61 - $fs/etc/X11/xorg.conf.d/50-vboxmouse.conf 4.62 + #[ -f $src/src/VBox/Additions/x11/Installer/50-vboxmouse.conf ] && 4.63 + #install -m644 $src/src/VBox/Additions/x11/Installer/50-vboxmouse.conf \ 4.64 + #$fs/etc/X11/xorg.conf.d/50-vboxmouse.conf 4.65 4.66 - install -m755 -D $src/src/VBox/Additions/x11/Installer/98vboxadd-xclient \ 4.67 - $fs/usr/bin/VBoxClient-all 4.68 - install -m755 -D $src/src/VBox/Additions/x11/Installer/vboxclient.desktop \ 4.69 - $fs/etc/xdg/autostart/vboxclient.desktop 4.70 + #install -m755 -D $src/src/VBox/Additions/x11/Installer/98vboxadd-xclient \ 4.71 + #$fs/usr/bin/VBoxClient-all 4.72 + #install -m755 -D $src/src/VBox/Additions/x11/Installer/vboxclient.desktop \ 4.73 + #$fs/etc/xdg/autostart/vboxclient.desktop 4.74 4.75 - #install -D vboxmouse_drv_19.so \ 4.76 - # "$fs/usr/lib/X11/modules/input/vboxmouse.so" 4.77 - [ -f vboxvideo_drv_19.so ] && 4.78 - install -D vboxvideo_drv_19.so \ 4.79 - "$fs/usr/lib/X11/modules/drivers/vboxvideo.so" 4.80 - install -d "$fs/usr/lib/dri" 4.81 - install -m755 VBoxOGL*.so "$fs/usr/lib" 4.82 - ln -s /usr/lib/VBoxOGL.so "$fs/usr/lib/dri/vboxvideo_dri.so" 4.83 - install -m755 -D pam_vbox.so "$fs/lib/security/pam_vbox.so" 4.84 + ##install -D vboxmouse_drv_19.so \ 4.85 + ## "$fs/usr/lib/X11/modules/input/vboxmouse.so" 4.86 + #[ -f vboxvideo_drv_19.so ] && 4.87 + #install -D vboxvideo_drv_19.so \ 4.88 + #"$fs/usr/lib/X11/modules/drivers/vboxvideo.so" 4.89 + #install -d "$fs/usr/lib/dri" 4.90 + #install -m755 VBoxOGL*.so "$fs/usr/lib" 4.91 + #ln -s /usr/lib/VBoxOGL.so "$fs/usr/lib/dri/vboxvideo_dri.so" 4.92 + #install -m755 -D pam_vbox.so "$fs/lib/security/pam_vbox.so" 4.93 4.94 - # virtualbox-ose-additions-modules 4.95 - cd "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src" 4.96 + ## virtualbox-ose-additions-modules 4.97 + #cd "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src" 4.98 4.99 - cd vboxguest 4.100 - install -D -m644 vboxguest.ko \ 4.101 - "$fs/lib/modules/$KBASEVER-slitaz/misc/vboxguest.ko" 4.102 + #cd vboxguest 4.103 + #install -D -m644 vboxguest.ko \ 4.104 + #"$fs/lib/modules/$KBASEVER-slitaz/misc/vboxguest.ko" 4.105 4.106 - cd ../vboxsf 4.107 - install -D -m644 vboxsf.ko \ 4.108 - "$fs/lib/modules/$KBASEVER-slitaz/misc/vboxsf.ko" 4.109 + #cd ../vboxsf 4.110 + #install -D -m644 vboxsf.ko \ 4.111 + #"$fs/lib/modules/$KBASEVER-slitaz/misc/vboxsf.ko" 4.112 4.113 - cd ../vboxvideo 4.114 - install -D -m644 vboxvideo.ko \ 4.115 - "$fs/lib/modules/$KBASEVER-slitaz/misc/vboxvideo.ko" 4.116 + #cd ../vboxvideo 4.117 + #install -D -m644 vboxvideo.ko \ 4.118 + #"$fs/lib/modules/$KBASEVER-slitaz/misc/vboxvideo.ko" 4.119 4.120 - install -D -m 0644 "$stuff/60-vboxguest.rules" \ 4.121 - "$fs/etc/udev/rules.d/60-vboxguest.rules" 4.122 + #install -D -m 0644 "$stuff/60-vboxguest.rules" \ 4.123 + #"$fs/etc/udev/rules.d/60-vboxguest.rules" 4.124 4.125 } 4.126 4.127 @@ -189,25 +188,22 @@ 4.128 { 4.129 #sed -i "s/vboxdrv vboxnetadp vboxnetflt vboxpci //" $1/etc/rcS.conf 4.130 sed -i "s/vboxdrv vboxnetadp vboxnetflt //" $1/etc/rcS.conf 4.131 - delgroup vboxusers 4.132 + chroot $1/ delgroup vboxusers 4.133 } 4.134 4.135 post_install() 4.136 { 4.137 - #chroot "$1/" 4.138 - KERNEL_VERSION=$(uname -r) 4.139 - depmod -a $KERNEL_VERSION 4.140 - #modprobe -a vboxdrv vboxnetadp vboxnetflt vboxpci 4.141 - modprobe -a vboxdrv vboxnetadp vboxnetflt 4.142 - grep -qs vboxdrv $1/etc/rcS.conf || 4.143 - #sed -i 's/LOAD_MODULES="/&vboxdrv vboxnetadp vboxnetflt vboxpci /' /etc/rcS.conf 4.144 - sed -i 's/LOAD_MODULES="/&vboxdrv vboxnetadp vboxnetflt /' /etc/rcS.conf 4.145 - grep -qs vboxuser /etc/group || addgroup -g 199 vboxusers 4.146 - echo "add yourself to vboxusers group if you want to access host" 4.147 - echo "usb devices: addgroup $USER vboxusers" 4.148 + chroot $1/ udevadm control --reload 4.149 + chroot $1/ udevadm trigger 4.150 + KERNEL_VERSION=$( chroot $1/ uname -r) 4.151 + chroot $1/ depmod -a $KERNEL_VERSION 4.152 + chroot $1/ modprobe -a vboxdrv vboxnetadp vboxnetflt 4.153 + grep -qs vboxdrv $1/etc/rcS.conf || 4.154 + sed -i 's/LOAD_MODULES="/&vboxdrv vboxnetadp vboxnetflt /' $1/etc/rcS.conf 4.155 + grep -qs vboxuser $1/etc/group || chroot $1/ addgroup -g 199 vboxusers 4.156 + echo "add yourself to vboxusers group if you want to access" 4.157 + echo "host usb devices: addgroup $USER vboxusers" 4.158 + echo "then reboot" 4.159 + #i can't get udev to do its work 4.160 #echo "then logout and login again" 4.161 - echo "then reboot, until i find how to make udev do what it should without reboot..." 4.162 - #addgroup $USER vboxusers 4.163 - udevadm control --reload 4.164 - udevadm trigger 4.165 }