wok-current rev 14071

Virtualbox-ose: trying to fix
author ernia <monghitri@aruba.it>
date Thu Feb 21 13:40:21 2013 +0000 (2013-02-21)
parents fa5913a0fdf3
children 400979d11723
files virtualbox-ose-guestutils/receipt virtualbox-ose/receipt
line diff
     1.1 --- a/virtualbox-ose-guestutils/receipt	Thu Feb 21 11:14:44 2013 +0100
     1.2 +++ b/virtualbox-ose-guestutils/receipt	Thu Feb 21 13:40:21 2013 +0000
     1.3 @@ -29,9 +29,7 @@
     1.4  	install -m755 -D $src/src/VBox/Additions/x11/Installer/vboxclient.desktop \
     1.5  		$fs/etc/xdg/autostart/vboxclient.desktop
     1.6  
     1.7 -	install -D vboxmouse_drv_16.so \
     1.8 -		"$fs/usr/lib/X11/modules/input/vboxmouse.so"
     1.9 -		install -D vboxvideo_drv_112.so \
    1.10 +	install -D vboxvideo_drv_112.so \
    1.11  		"$fs/usr/lib/X11/modules/drivers/vboxvideo.so"
    1.12  	install -d "$fs/usr/lib/dri"
    1.13  	install -m755 VBoxOGL*.so "$fs/usr/lib"
    1.14 @@ -44,7 +42,6 @@
    1.15  	#cooking installs modules in linux major version dir
    1.16  	KBASEVER="${KERNEL_VERSION:0:3}"
    1.17  
    1.18 -
    1.19  	cd "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src"
    1.20  
    1.21  	cd vboxguest
    1.22 @@ -64,42 +61,47 @@
    1.23  		
    1.24  	install -D -m 0755 "$stuff/VBoxService" \
    1.25  		"$fs/etc/init.d/VBoxService"
    1.26 -
    1.27  }
    1.28  
    1.29  pre_remove()
    1.30  {
    1.31 -    sed -i "s/vboxguest vboxsf vboxvideo //" $1/etc/rcS.conf
    1.32 -    chroot $1/ /etc/init.d/VBoxService stop
    1.33 -    sed -i '/# VBoxService daemon options./{N;N;N;d}' $1/etc/daemons.conf
    1.34 -    sed -i 's/VBoxService //' $1/etc/rcS.conf
    1.35 -    chroot $1/ delgroup vboxsf
    1.36 -    sed -i 's/^\tDriver.*$/\tDriver      "vesa"/' $1/etc/X11/xorg.conf.d/60-Device.conf
    1.37 +    if chroot $1/ lspci | grep -qi virtualbox; then
    1.38 +		sed -i "s/vboxguest vboxsf vboxvideo //" $1/etc/rcS.conf
    1.39 +		sed -i '/# VBoxService daemon options./{N;N;N;d}' $1/etc/daemons.conf
    1.40 +		sed -i 's/VBoxService //' $1/etc/rcS.conf
    1.41 +		chroot $1/ delgroup vboxsf
    1.42 +		sed -i 's/^\tDriver.*$/\tDriver      "vesa"/' $1/etc/X11/xorg.conf.d/60-Device.conf
    1.43 +    fi
    1.44  }
    1.45  
    1.46  post_install()
    1.47  {
    1.48 -	chroot $1/ udevadm control --reload
    1.49 -	chroot $1/ udevadm trigger
    1.50 -	grep -qs VBOXSERVICE_OPTIONS $1/etc/daemons.conf || 
    1.51 -		cat >> $1/etc/daemons.conf << "EOT"
    1.52 +	if chroot $1/ lspci | grep -qi virtualbox; then
    1.53 +		#chroot $1/ udevadm control --reload
    1.54 +		grep -qs VBOXSERVICE_OPTIONS $1/etc/daemons.conf || 
    1.55 +			cat >> $1/etc/daemons.conf << "EOT"
    1.56  # VBoxService daemon options.
    1.57  VBOXSERVICE_OPTIONS=""
    1.58  
    1.59  EOT
    1.60 -	KERNEL_VERSION=$( chroot $1/ uname -r) 
    1.61 -	chroot $1/ depmod -a $KERNEL_VERSION 
    1.62 -	#chroot $1/ modprobe -a vboxguest vboxsf vboxvideo
    1.63 -	sed -i 's/^\tDriver.*$/\tDriver      "vboxvideo"/' $1/etc/X11/xorg.conf.d/60-Device.conf
    1.64 -	grep -qs vboxguest $1/etc/rcS.conf || 	
    1.65 -		sed -i 's/LOAD_MODULES="/&vboxguest vboxsf vboxvideo /' $1/etc/rcS.conf
    1.66 -	grep -qs VBoxService $1/etc/rcS.conf ||
    1.67 -		sed -i 's/RUN_DAEMONS="/&VBoxService /' $1/etc/rcS.conf
    1.68 -	grep -qs vboxsf $1/etc/group || chroot $1/ addgroup -g 109 vboxsf
    1.69 -	echo "add yourself to vboxsf group if you want to access"
    1.70 -	echo "host shared folder: addgroup $USER vboxsf"
    1.71 -	echo "then reboot"
    1.72 -	#i can't get udev to do its work
    1.73 -	#echo "then logout and login again"
    1.74 -	#chroot $1/ /etc/init.d/VBoxService start &> /dev/null
    1.75 +		KERNEL_VERSION=$( chroot $1/ uname -r) 
    1.76 +		chroot $1/ depmod -a $KERNEL_VERSION 
    1.77 +		#chroot $1/ modprobe -a vboxguest vboxsf vboxvideo
    1.78 +		sed -i 's/^\tDriver.*$/\tDriver      "vboxvideo"/' $1/etc/X11/xorg.conf.d/60-Device.conf
    1.79 +		grep -qs vboxguest $1/etc/rcS.conf || 	
    1.80 +			sed -i 's/LOAD_MODULES="/&vboxguest vboxsf vboxvideo /' $1/etc/rcS.conf
    1.81 +		grep -qs VBoxService $1/etc/rcS.conf ||
    1.82 +			sed -i 's/RUN_DAEMONS="/&VBoxService /' $1/etc/rcS.conf
    1.83 +		grep -qs vboxsf $1/etc/group || chroot $1/ addgroup -g 109 vboxsf
    1.84 +		echo "add yourself to vboxsf group if you want to access"
    1.85 +		echo "host shared folder: addgroup $USER vboxsf"
    1.86 +		#i can't get udev to do its work
    1.87 +		#echo "then logout and login again"
    1.88 +		#chroot $1/ /etc/init.d/VBoxService start &> /dev/null
    1.89 +		echo "then reboot"
    1.90 +	else
    1.91 +		echo "this is not a virtual machine," 
    1.92 +		echo "i'm useless here and you probably" 
    1.93 +		echo "may want to remove me." 
    1.94 +	fi
    1.95  }
     2.1 --- a/virtualbox-ose/receipt	Thu Feb 21 11:14:44 2013 +0100
     2.2 +++ b/virtualbox-ose/receipt	Thu Feb 21 13:40:21 2013 +0000
     2.3 @@ -24,8 +24,6 @@
     2.4  compile_rules()
     2.5  {
     2.6  	cd $src
     2.7 -	#patch -Np1 -i "$stuff/virtualbox-4-makeself-check.patch"
     2.8 -	#patch -Np1 -i "$stuff/virtualbox-4-mkisofs-check.patch"
     2.9  	cp $stuff/LocalConfig.kmk .
    2.10  	./configure \
    2.11  		--disable-pulse \
    2.12 @@ -37,22 +35,15 @@
    2.13  	source ./env.sh
    2.14  	kmk all
    2.15  
    2.16 -	# build modules. NOTE: we gor ERROR even if it build and cook will exit
    2.17 -	# so we redirect some output to avoid cooker thinking something is wrong
    2.18 -	#cd 
    2.19 +	# build modules.
    2.20  	KERN_DIR=/usr/src/linux make -C "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/src"
    2.21  	# build guest additions modules
    2.22  	KERN_DIR=/usr/src/linux make -C "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src"
    2.23 -	KERN_DIR=/usr/src/linux make -C \
    2.24 -		"$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src/vboxvideo" \
    2.25 -		2>&1 /dev/null
    2.26  }
    2.27  
    2.28  # Rules to gen a SliTaz package suitable for Tazpkg.
    2.29  genpkg_rules()
    2.30  {
    2.31 -	#fs=$WOK/$PACKAGE/taz/$PACKAGE-$VERSION/fs
    2.32 -
    2.33  	source $src/env.sh
    2.34  	cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin
    2.35  	mkdir -p $fs/usr/bin $fs/usr/lib/virtualbox/components \
    2.36 @@ -107,8 +98,6 @@
    2.37  	echo 'INSTALL_DIR=/usr/lib/virtualbox' >> "$fs/etc/vbox/vbox.cfg"
    2.38  
    2.39  	#udev
    2.40 -	#install -D -m 0644 "$stuff/60-virtualbox.rules" \
    2.41 -	#"$fs/etc/udev/rules.d/60-virtualbox.rules"
    2.42  	install -D -m 0644 "$stuff/10-vboxdrv.rules" \
    2.43  	"$fs/etc/udev/rules.d/10-vboxdrv.rules"
    2.44  
    2.45 @@ -123,78 +112,25 @@
    2.46  	chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/*.py
    2.47  	cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin
    2.48  
    2.49 -	
    2.50 -	
    2.51  	KERNEL_VERSION=$(grep  ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g')
    2.52  	#cooking installs modules in linux major version dir
    2.53  	KBASEVER="${KERNEL_VERSION:0:3}"
    2.54  	
    2.55 -
    2.56  	cd "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/src"
    2.57  	install -D -m644 vboxdrv.ko "$fs/lib/modules/$KBASEVER-slitaz/misc/vboxdrv.ko"
    2.58  	install -D -m644 vboxnetflt.ko "$fs/lib/modules/$KBASEVER-slitaz/misc/vboxnetflt.ko"
    2.59  	install -D -m644 vboxnetadp.ko "$fs/lib/modules/$KBASEVER-slitaz/misc/vboxnetadp.ko"
    2.60 -
    2.61 -	## virtualbox-ose-additions
    2.62 -
    2.63 -	#cd "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions"
    2.64 -	#mkdir -p $fs/usr/bin
    2.65 -	#mkdir -p $fs/sbin
    2.66 -	#mkdir -p $fs/etc/X11/xorg.conf.d
    2.67 -
    2.68 -	#install -m755 VBoxClient VBoxControl VBoxService "$fs/usr/bin"
    2.69 -	#install -m755 mount.vboxsf "$fs/sbin"
    2.70 -
    2.71 -	#[ -f $src/src/VBox/Additions/x11/Installer/50-vboxmouse.conf ] &&
    2.72 -	#install -m644 $src/src/VBox/Additions/x11/Installer/50-vboxmouse.conf \
    2.73 -		#$fs/etc/X11/xorg.conf.d/50-vboxmouse.conf
    2.74 -
    2.75 -	#install -m755 -D $src/src/VBox/Additions/x11/Installer/98vboxadd-xclient \
    2.76 -		#$fs/usr/bin/VBoxClient-all
    2.77 -	#install -m755 -D $src/src/VBox/Additions/x11/Installer/vboxclient.desktop \
    2.78 -		#$fs/etc/xdg/autostart/vboxclient.desktop
    2.79 -
    2.80 -	##install -D vboxmouse_drv_19.so \
    2.81 -	##	"$fs/usr/lib/X11/modules/input/vboxmouse.so"
    2.82 -	#[ -f vboxvideo_drv_19.so ] &&
    2.83 -	#install -D vboxvideo_drv_19.so \
    2.84 -		#"$fs/usr/lib/X11/modules/drivers/vboxvideo.so"
    2.85 -	#install -d "$fs/usr/lib/dri"
    2.86 -	#install -m755 VBoxOGL*.so "$fs/usr/lib"
    2.87 -	#ln -s /usr/lib/VBoxOGL.so "$fs/usr/lib/dri/vboxvideo_dri.so"
    2.88 -	#install -m755 -D pam_vbox.so "$fs/lib/security/pam_vbox.so"
    2.89 -
    2.90 -	## virtualbox-ose-additions-modules
    2.91 -	#cd "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src"
    2.92 -
    2.93 -	#cd vboxguest
    2.94 -	#install -D -m644 vboxguest.ko \
    2.95 -		#"$fs/lib/modules/$KBASEVER-slitaz/misc/vboxguest.ko"
    2.96 -
    2.97 -	#cd ../vboxsf
    2.98 -	#install -D -m644 vboxsf.ko \
    2.99 -		#"$fs/lib/modules/$KBASEVER-slitaz/misc/vboxsf.ko"
   2.100 -
   2.101 -	#cd ../vboxvideo
   2.102 -	#install -D -m644 vboxvideo.ko \
   2.103 -		#"$fs/lib/modules/$KBASEVER-slitaz/misc/vboxvideo.ko"
   2.104 -
   2.105 -	#install -D -m 0644 "$stuff/60-vboxguest.rules" \
   2.106 -		#"$fs/etc/udev/rules.d/60-vboxguest.rules"
   2.107 -
   2.108  }
   2.109  
   2.110  pre_remove()
   2.111  {
   2.112 -    #sed -i "s/vboxdrv vboxnetadp vboxnetflt vboxpci //" $1/etc/rcS.conf
   2.113      sed -i "s/vboxdrv vboxnetadp vboxnetflt //" $1/etc/rcS.conf
   2.114      chroot $1/ delgroup vboxusers
   2.115  }
   2.116  
   2.117  post_install()
   2.118  {
   2.119 -	chroot $1/ udevadm control --reload
   2.120 -	chroot $1/ udevadm trigger
   2.121 +	#chroot $1/ udevadm control --reload
   2.122  	KERNEL_VERSION=$( chroot $1/ uname -r) 
   2.123  	chroot $1/ depmod -a $KERNEL_VERSION 
   2.124  	chroot $1/ modprobe -a vboxdrv vboxnetadp vboxnetflt
   2.125 @@ -203,7 +139,7 @@
   2.126  	grep -qs vboxuser $1/etc/group || chroot $1/ addgroup -g 199 vboxusers
   2.127  	echo "add yourself to vboxusers group if you want to access"
   2.128  	echo "host usb devices: addgroup $USER vboxusers"
   2.129 -	echo "then reboot"
   2.130  	#i can't get udev to do its work
   2.131  	#echo "then logout and login again"
   2.132 +	echo "then reboot"
   2.133  }