Changeset 32183 in vbox
- Timestamp:
- Sep 1, 2010 3:53:42 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 2 deleted
- 30 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/debian/postinst.in
r31999 r32183 93 93 fi 94 94 95 # try to build a kernel module (disable with INSTALL_NO_VBOXDRV=1 in /etc/default/virtualbox)96 REGISTER_DKMS=197 if [ ! -f /lib/modules/`uname -r`/misc/vboxdrv.ko -a "$INSTALL_NO_VBOXDRV" != "1" ]; then98 db_get virtualbox/module-compilation-allowed99 if [ "$RET" = "false" ]; then100 cat << EOF101 Unable to find a precompiled module for the current kernel102 though module compilation denied by debconf setting.103 EOF104 else105 db_input low virtualbox/module-compilation-allowed || true106 db_go || true107 db_get virtualbox/module-compilation-allowed108 if [ "$RET" = "true" ]; then109 # Compile module. Don't show a message box here if everything works well.110 cat << EOF111 Messages emitted during module compilation will be logged to $LOG.112 EOF113 rm -f /etc/vbox/module_not_compiled114 echo "** Compiling vboxdrv" > /var/log/vbox-install.log115 if ! /usr/share/virtualbox/src/vboxdrv/build_in_tmp \116 --save-module-symvers /tmp/vboxdrv-Module.symvers \117 --no-print-directory KBUILD_VERBOSE= \118 install >> /var/log/vbox-install.log 2>&1; then119 db_fset virtualbox/module-compilation-failed seen false120 db_input critical virtualbox/module-compilation-failed || true121 db_go || true122 touch /etc/vbox/module_not_compiled123 # don't abort the installation!124 else125 echo "** Compiling vboxnetflt" >> /var/log/vbox-install.log126 if ! /usr/share/virtualbox/src/vboxnetflt/build_in_tmp \127 --use-module-symvers /tmp/vboxdrv-Module.symvers \128 --no-print-directory KBUILD_VERBOSE= \129 install >> /var/log/vbox-install.log 2>&1; then130 db_fset virtualbox/module-compilation-failed seen false131 db_input critical virtualbox/module-compilation-failed || true132 db_go || true133 touch /etc/vbox/module_not_compiled134 # don't abort the installation!135 else136 echo "** Compiling vboxnetadp" >> /var/log/vbox-install.log137 if ! /usr/share/virtualbox/src/vboxnetadp/build_in_tmp \138 --use-module-symvers /tmp/vboxdrv-Module.symvers \139 --no-print-directory KBUILD_VERBOSE= \140 install >> /var/log/vbox-install.log 2>&1; then141 db_fset virtualbox/module-compilation-failed seen false142 db_input critical virtualbox/module-compilation-failed || true143 db_go || true144 touch /etc/vbox/module_not_compiled145 # don't abort the installation!146 fi147 fi148 fi149 # cleanup150 rm -f /tmp/vboxdrv-Module.symvers151 if [ ! -f /etc/vbox/module_not_compiled ]; then152 # success153 cat << EOF154 Success!155 EOF156 REGISTER_DKMS=157 fi158 fi159 fi160 fi161 162 # Register at DKMS. If the modules were built above, they are already registered163 if [ -n "$REGISTER_DKMS" ]; then164 DKMS=`which dkms 2>/dev/null`165 if [ -n "$DKMS" ]; then166 for m in vboxdrv vboxnetflt vboxnetadp; do167 $DKMS status -m $m | while read line; do168 if echo "$line" | grep -q added > /dev/null ||169 echo "$line" | grep -q built > /dev/null ||170 echo "$line" | grep -q installed > /dev/null; then171 v=`echo "$line" | sed "s/$m,\([^,]*\)[,:].*/\1/;t;d"`172 $DKMS remove -m $m -v $v --all > /dev/null 2>&1173 fi174 done175 $DKMS add -m $m -v %VER% > /dev/null 2>&1176 done177 fi178 fi179 180 # There might be an old module active (e.g. manually loaded)181 if lsmod | grep -q "vboxdrv[^_-]"; then182 /etc/init.d/vboxdrv stop || true183 fi184 185 95 # The starters need to be Suid root. They drop the privileges before starting 186 96 # the real frontend. … … 212 122 #DEBHELPER# 213 123 124 if [ "$1" = "configure" ]; then 125 # Start vboxdrv/vboxweb-service manually as we use our own error handling in postrm 126 if [ -x "/etc/init.d/vboxdrv" ]; then 127 update-rc.d vboxdrv defaults >/dev/null 128 129 # There might be an old module active (e.g. manually loaded) 130 if lsmod | grep -q "vboxdrv[^_-]"; then 131 /etc/init.d/vboxdrv stop || true 132 fi 133 134 BUILD_MODULES=0 135 # Disable module compilation with INSTALL_NO_VBOXDRV=1 in /etc/default/virtualbox 136 if [ ! -f /lib/modules/`uname -r`/misc/vboxdrv.ko -a "$INSTALL_NO_VBOXDRV" != "1" ]; then 137 db_get virtualbox/module-compilation-allowed 138 if [ "$RET" = "false" ]; then 139 cat << EOF 140 Unable to find a precompiled module for the current kernel 141 though module compilation denied by debconf setting. 142 EOF 143 else 144 db_input low virtualbox/module-compilation-allowed || true 145 db_go || true 146 db_get virtualbox/module-compilation-allowed 147 if [ "$RET" = "true" ]; then 148 BUILD_MODULES=1 149 fi 150 fi 151 fi 152 153 if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then 154 if [ $BUILD_MODULES -eq 1 ]; then 155 invoke-rc.d vboxdrv setup || true 156 else 157 invoke-rc.d vboxdrv start || exit $? 158 fi 159 else 160 if [ $BUILD_MODULES -eq 1 ]; then 161 /etc/init.d/vboxdrv setup || true 162 else 163 /etc/init.d/vboxdrv start || exit $? 164 fi 165 fi 166 fi 167 if [ -x "/etc/init.d/vboxweb-service" ]; then 168 update-rc.d vboxweb-service defaults >/dev/null 169 # if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then 170 # invoke-rc.d vboxweb-service start || exit $? 171 # else 172 # /etc/init.d/vboxweb-service start || exit $? 173 # fi 174 fi 175 176 fi # $1 = "configure" 177 214 178 exit 0 -
trunk/debian/prerm.in
r32030 r32183 44 44 45 45 # make sure we de-register the DMKS modules before the files get removed 46 DKMS=`which dkms 2>/dev/null` 47 if [ -n "$DKMS" ]; then 48 $DKMS remove -m vboxnetadp -v %VER% --all > /dev/null 2>&1 || true49 $DKMS remove -m vboxnetflt -v %VER% --all > /dev/null 2>&1 || true50 $DKMS remove -m vboxdrv -v %VER% --all > /dev/null 2>&1 || true46 if [ "$1" = "upgrade" -o "$1" = "remove" -o "$1" = "deconfigure" ]; then 47 DKMS=`which dkms 2>/dev/null` 48 if [ -n "$DKMS" ]; then 49 $DKMS remove -m vboxhost -v %VER% --all > /dev/null 2>&1 || true 50 fi 51 51 fi 52 52 -
trunk/debian/rules
r32045 r32183 250 250 usr/bin/VBox usr/bin/VBoxHeadless \ 251 251 $(if $(NOWEBSVC),,usr/bin/VBox usr/bin/vboxwebsrv) \ 252 usr/share/virtualbox/src/vboxdrv usr/src/vboxdrv-$(ver) \ 253 usr/share/virtualbox/src/vboxnetflt usr/src/vboxnetflt-$(ver) \ 254 usr/share/virtualbox/src/vboxnetadp usr/src/vboxnetadp-$(ver) 252 usr/share/virtualbox/src/vboxhost usr/src/vboxhost-$(ver) 255 253 dh_desktop 256 254 dh_installmenu -
trunk/src/VBox/Additions/common/VBoxGuest/Makefile.kmk
r31900 r32183 98 98 vboxguest-src_MODE = a+r,u+w 99 99 vboxguest-src_SOURCES = $(subst ",,$(FILES_VBOXGUEST_NOBIN)) 100 vboxguest-src_SOURCES += $(vboxguest-sh_0_OUTDIR)/dkms.conf 101 vboxguest-src_CLEAN = $(vboxguest-sh_0_OUTDIR)/dkms.conf 100 101 INSTALLS += vboxguest-dkms-conf 102 vboxguest-dkms-conf_INST = $(INST_ADDITIONS)src/ 103 vboxguest-dkms-conf_MODE = a+r,u+w 104 vboxguest-dkms-conf_SOURCES = $(vboxguest-sh_0_OUTDIR)/dkms.conf 105 vboxguest-dkms-conf_CLEAN = $(vboxguest-sh_0_OUTDIR)/dkms.conf 106 107 INSTALLS += vboxguest-dkms-sh 108 vboxguest-dkms-sh_INST = $(INST_ADDITIONS)src/ 109 vboxguest-dkms-sh_MODE = a+rx,u+w 110 vboxguest-dkms-sh_SOURCES = $(vboxguest-sh_0_OUTDIR)/do_dkms 111 vboxguest-dkms-sh_CLEAN = $(vboxguest-sh_0_OUTDIR)/do_dkms 102 112 103 113 $$(vboxguest-sh_0_OUTDIR)/dkms.conf: \ … … 106 116 | $$(dir $$@) 107 117 $(call MSG_TOOL,Creating,,$@) 108 $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g" --output $@ $< 118 $(QUIET)$(SED) \ 119 -e "s;_VERSION_;${VBOX_VERSION_STRING};g" \ 120 --output $@ $< 121 122 $$(vboxguest-sh_0_OUTDIR)/do_dkms: \ 123 $(PATH_ROOT)/src/VBox/HostDrivers/linux/do_dkms \ 124 $(VBOX_VERSION_STAMP) \ 125 | $$(dir $$@) 126 $(call MSG_TOOL,Creating,,$@) 127 $(QUIET)$(SED) \ 128 -e "s;_VERSION_;${VBOX_VERSION_STRING};g" \ 129 -e "s;_MODULE_;vboxguest;g" \ 130 -e "s;_OLDMODULES_;vboxguest vboxadd vboxsf vboxvfs vboxvideo;g" \ 131 --output $@ $< 109 132 110 133 # scripts. -
trunk/src/VBox/Additions/common/VBoxGuest/linux/Makefile
r31518 r32183 5 5 6 6 # 7 # Copyright (C) 2006-20 09Oracle Corporation7 # Copyright (C) 2006-2010 Oracle Corporation 8 8 # 9 9 # This file is part of VirtualBox Open Source Edition (OSE), as … … 222 222 endif 223 223 INCL += $(addprefix -I$(KBUILD_EXTMOD),/ /include /r0drv/linux) 224 INCL += $(addprefix -I$(KBUILD_EXTMOD)/vboxguest,/ /include /r0drv/linux) 224 225 export INCL 225 226 endif -
trunk/src/VBox/Additions/common/VBoxGuest/linux/dkms.conf
r21118 r32183 1 BUILT_MODULE_NAME=vboxguest 2 DEST_MODULE_LOCATION=/kernel/misc 3 PACKAGE_NAME=vboxguest 1 ## @file 2 # Linux DKMS config script for the VirtualBox guest kernel modules 3 # 4 5 # 6 # Copyright (C) 2006-2010 Oracle Corporation 7 # 8 # This file is part of VirtualBox Open Source Edition (OSE), as 9 # available from http://www.virtualbox.org. This file is free software; 10 # you can redistribute it and/or modify it under the terms of the GNU 11 # General Public License (GPL) as published by the Free Software 12 # Foundation, in version 2 as it comes in the "COPYING" file of the 13 # VirtualBox OSE distribution. VirtualBox OSE is distributed in the 14 # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. 15 # 16 17 PACKAGE_NAME="vboxguest" 4 18 PACKAGE_VERSION=_VERSION_ 5 19 AUTOINSTALL=yes 6 POST_BUILD="do_Module.symvers vboxguest save $dkms_tree/$module/$module_version/build/Module.symvers" 20 21 BUILT_MODULE_NAME[0]="vboxguest" 22 BUILT_MODULE_LOCATION[0]="vboxguest" 23 DEST_MODULE_LOCATION[0]="/kernel/misc" 24 25 BUILT_MODULE_NAME[1]="vboxsf" 26 BUILT_MODULE_LOCATION[1]="vboxsf" 27 DEST_MODULE_LOCATION[1]="/kernel/misc" 28 29 BUILT_MODULE_NAME[2]="vboxvideo" 30 BUILT_MODULE_LOCATION[2]="vboxvideo" 31 DEST_MODULE_LOCATION[2]="/kernel/misc" -
trunk/src/VBox/Additions/linux/Makefile
r28999 r32183 5 5 # 6 6 # 7 # Copyright (C) 2009 Oracle Corporation7 # Copyright (C) 2009-2010 Oracle Corporation 8 8 # 9 9 # This file is part of VirtualBox Open Source Edition (OSE), as … … 15 15 # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. 16 16 # 17 18 ifneq ($(KBUILD_EXTMOD),) 19 20 # DKMS 21 22 obj-m = vboxguest/ vboxsf/ vboxvideo/ 23 24 else # ! KBUILD_EXTMOD 17 25 18 26 KBUILD_VERBOSE = … … 60 68 @/sbin/insmod vboxguest.ko 61 69 @if [ -f vboxsf.ko ]; then /sbin/insmod vboxsf.ko; fi 70 71 endif # ! KBUILD_EXTMOD -
trunk/src/VBox/Additions/linux/Makefile.kmk
r32166 r32183 42 42 VBOX_LNX_ADD_INST_MOD_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)lib/$(VBOX_LNX_ADD_PACKAGE_NAME)/ 43 43 VBOX_LNX_ADD_INST_KMOD_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)src/ 44 VBOX_LNX_ADD_INST_KMOD_DIR_MOD := $(VBOX_LNX_ADD_INST_OUT_DIR)src/vboxguest-$(VBOX_VERSION_STRING)/ 44 45 VBOX_LNX_ADD_INST_INIT_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)init/ 45 46 … … 82 83 $(VBOX_LNX_ADD_INST_MOD_DIR) \ 83 84 $(VBOX_LNX_ADD_INST_KMOD_DIR) \ 85 $(VBOX_LNX_ADD_INST_KMOD_DIR_MOD) \ 84 86 $(VBOX_LNX_ADD_INST_INIT_DIR) \ 85 87 $(VBOX_LNX_ADD_INST_DBG_DIR) \ … … 155 157 156 158 VBOX_ADD_KMOD = \ 157 vboxguest 158 159 VBOX_ADD_KMOD.linux = \ 160 vboxsf \ 161 vboxvideo 159 $(addprefix vboxguest-$(VBOX_VERSION_STRING)/,\ 160 vboxguest vboxsf vboxvideo Makefile dkms.conf do_dkms) 162 161 163 162 VBOX_ADD_INIT.linux = \ … … 173 172 VBOX_LNX_ADD_MOD = $(VBOX_ADD_MOD) $(VBOX_ADD_MOD.linux) 174 173 VBOX_LNX_ADD_STRIP_OBJ = $(VBOX_ADD_STRIP_OBJ) $(VBOX_ADD_STRIP_OBJ.linux) 175 VBOX_LNX_ADD_KMOD = $(VBOX_ADD_KMOD) $(VBOX_ADD_KMOD.linux)174 VBOX_LNX_ADD_KMOD = $(VBOX_ADD_KMOD) 176 175 VBOX_LNX_ADD_INIT = $(VBOX_ADD_INIT) $(VBOX_ADD_INIT.linux) 177 178 VBOX_LNX_ADD_KMOD_VERSIONED := $(addsuffix -$(VBOX_VERSION_STRING),$(VBOX_LNX_ADD_KMOD))179 176 180 177 # … … 189 186 $(addprefix $(VBOX_LNX_ADD_INST_MOD_DIR),$(VBOX_LNX_ADD_MOD)) \ 190 187 $(addprefix $(VBOX_LNX_ADD_INST_MOD_DIR),$(VBOX_LNX_ADD_STRIP_OBJ)) \ 191 $(addprefix $(VBOX_LNX_ADD_INST_KMOD_DIR),$(VBOX_LNX_ADD_KMOD _VERSIONED)) \188 $(addprefix $(VBOX_LNX_ADD_INST_KMOD_DIR),$(VBOX_LNX_ADD_KMOD)) \ 192 189 $(addprefix $(VBOX_LNX_ADD_INST_INIT_DIR),$(VBOX_LNX_ADD_INIT)) \ 193 190 $(addprefix $(VBOX_LNX_ADD_INST_MOD_DIR),$(VBOX_LNX_ADD_INIT)) … … 272 269 273 270 # pattern rule for copying the VBOX_LNX_ADD_KMOD files to the installation directory 274 $(addprefix $(VBOX_LNX_ADD_INST_KMOD_DIR),$(VBOX_LNX_ADD_KMOD _VERSIONED)): \275 $(VBOX_LNX_ADD_INST_KMOD_DIR )%-$(VBOX_VERSION_STRING) : $(PATH_BIN)/additions/src/% | $(VBOX_LNX_ADD_INST_KMOD_DIR)271 $(addprefix $(VBOX_LNX_ADD_INST_KMOD_DIR),$(VBOX_LNX_ADD_KMOD)): \ 272 $(VBOX_LNX_ADD_INST_KMOD_DIR_MOD)% : $(PATH_BIN)/additions/src/% | $$(dir $$@) 276 273 $(call MSG_INST_DIR,$<,$@) 277 # Remove target directories first, otherwise the behaviour of cp will not be278 # what we want if it already exists. See the cp manual page for more details.279 274 $(QUIET)$(RM) -Rf $@ 280 275 $(QUIET)cp -af $< $@ -
trunk/src/VBox/Additions/linux/drm/Makefile.kmk
r31900 r32183 5 5 6 6 # 7 # Copyright (C) 2006-20 07Oracle Corporation7 # Copyright (C) 2006-2010 Oracle Corporation 8 8 # 9 9 # This file is part of VirtualBox Open Source Edition (OSE), as … … 34 34 vboxvideo_drm-mod_MODE = a+r,u+w 35 35 vboxvideo_drm-mod_SOURCES = $(subst ",,$(FILES_VBOXVIDEO_DRM_NOBIN)) 36 vboxvideo_drm-mod_SOURCES += $(PATH_vboxvideo_drm-mod)/dkms.conf37 vboxvideo_drm-mod_CLEAN += $(PATH_vboxvideo_drm-mod)/dkms.conf38 36 39 37 vboxvideo_drm-sh_INST = $(INST_ADDITIONS)src/vboxvideo/ … … 82 80 $(QUIET)chmod 0755 $@ 83 81 84 $$(PATH_vboxvideo_drm-mod)/dkms.conf: \85 $(PATH_SUB_CURRENT)/dkms.conf \86 $(VBOX_VERSION_STAMP) \87 | $$(dir $$@)88 $(call MSG_TOOL,Creating,,$@)89 $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g" < $< > $@90 91 82 include $(KBUILD_PATH)/subfooter.kmk 92 83 -
trunk/src/VBox/Additions/linux/drm/Makefile.module
r28800 r32183 4 4 # (For 2.6.x this file must be 'Makefile'!) 5 5 # 6 # Copyright (C) 2006-20 07Oracle Corporation6 # Copyright (C) 2006-2010 Oracle Corporation 7 7 # 8 8 # This file is part of VirtualBox Open Source Edition (OSE), as … … 150 150 endif 151 151 INCL += $(addprefix -I$(KBUILD_EXTMOD),/ /include /r0drv/linux) 152 INCL += $(addprefix -I$(KBUILD_EXTMOD)/vboxvideo,/ /include /r0drv/linux) 152 153 export INCL 153 154 endif -
trunk/src/VBox/Additions/linux/installer/vboxadd.sh
r31315 r32183 5 5 6 6 # 7 # Copyright (C) 2006-20 09Oracle Corporation7 # Copyright (C) 2006-2010 Oracle Corporation 8 8 # 9 9 # This file is part of VirtualBox Open Source Edition (OSE), as … … 31 31 PATH=$PATH:/bin:/sbin:/usr/sbin 32 32 PACKAGE=VBoxGuestAdditions 33 BUILDVBOXGUEST=`/bin/ls /usr/src/vboxguest*/build_in_tmp 2>/dev/null|cut -d' ' -f1` 34 BUILDVBOXSF=`/bin/ls /usr/src/vboxsf*/build_in_tmp 2>/dev/null|cut -d' ' -f1` 35 BUILDVBOXVIDEO=`/bin/ls /usr/src/vboxvideo*/build_in_tmp 2>/dev/null|cut -d' ' -f1` 33 BUILDVBOXGUEST=`/bin/ls /usr/src/vboxguest*/vboxguest/build_in_tmp 2>/dev/null|cut -d' ' -f1` 34 BUILDVBOXSF=`/bin/ls /usr/src/vboxguest*/vboxsf/build_in_tmp 2>/dev/null|cut -d' ' -f1` 35 BUILDVBOXVIDEO=`/bin/ls /usr/src/vboxvideo*/vboxvideo/build_in_tmp 2>/dev/null|cut -d' ' -f1` 36 DODKMS=`/bin/ls /usr/src/vboxguest*/do_dkms 2>/dev/null|cut -d' ' -f1` 36 37 LOG="/var/log/vboxadd-install.log" 37 38 MODPROBE=/sbin/modprobe … … 329 330 { 330 331 # don't stop the old modules here -- they might be in use 332 begin "Uninstalling old VirtualBox DKMS kernel modules" 333 $DODKMS uninstall > $LOG 334 succ_msg 331 335 if find /lib/modules/`uname -r` -name "vboxvideo\.*" 2>/dev/null|grep -q vboxvideo; then 332 336 begin "Removing old VirtualBox vboxvideo kernel module" … … 346 350 begin "Building the VirtualBox Guest Additions kernel modules" 347 351 test_sane_kernel_dir 352 348 353 if ! sh /usr/share/$PACKAGE/test/build_in_tmp \ 349 --no- dkms --no-print-directory> $LOG 2>&1; then354 --no-print-directory >> $LOG 2>&1; then 350 355 fail_msg 351 356 printf "Your system does not seem to be set up to build kernel modules.\nLook at $LOG to find out what went wrong. Once you have corrected it, you can\nrun\n\n /etc/init.d/vboxadd setup\n\nto build them." … … 355 360 else 356 361 if ! sh /usr/share/$PACKAGE/test_drm/build_in_tmp \ 357 --no- dkms --no-print-directory >> $LOG 2>&1; then362 --no-print-directory >> $LOG 2>&1; then 358 363 printf "\nYour guest system does not seem to have sufficient OpenGL support to enable\naccelerated 3D effects (this requires Linux 2.6.27 or later in the guest\nsystem). This Guest Additions feature will be disabled.\n\n" 359 364 BUILDVBOXVIDEO="" … … 361 366 fi 362 367 echo 363 if [ -n "$BUILDVBOXGUEST" ]; then 364 begin "Building the main Guest Additions module" 365 if ! $BUILDVBOXGUEST \ 366 --save-module-symvers /tmp/vboxguest-Module.symvers \ 367 --no-print-directory install >> $LOG 2>&1; then 368 fail "Look at $LOG to find out what went wrong" 369 fi 370 succ_msg 371 fi 372 if [ -n "$BUILDVBOXSF" ]; then 373 begin "Building the shared folder support module" 374 if ! $BUILDVBOXSF \ 375 --use-module-symvers /tmp/vboxguest-Module.symvers \ 376 --no-print-directory install >> $LOG 2>&1; then 377 fail "Look at $LOG to find out what went wrong" 378 fi 379 succ_msg 380 fi 381 if [ -n "$BUILDVBOXVIDEO" ]; then 382 begin "Building the OpenGL support module" 383 if ! $BUILDVBOXVIDEO \ 384 --use-module-symvers /tmp/vboxguest-Module.symvers \ 385 --no-print-directory install >> $LOG 2>&1; then 386 fail "Look at $LOG to find out what went wrong" 387 fi 388 succ_msg 389 fi 390 depmod 368 if ! $DODKMS install >> $LOG 2>&1; then 369 if [ -n "$BUILDVBOXGUEST" ]; then 370 begin "Building the main Guest Additions module" 371 if ! $BUILDVBOXGUEST \ 372 --save-module-symvers /tmp/vboxguest-Module.symvers \ 373 --no-print-directory install >> $LOG 2>&1; then 374 fail "Look at $LOG to find out what went wrong" 375 fi 376 succ_msg 377 fi 378 if [ -n "$BUILDVBOXSF" ]; then 379 begin "Building the shared folder support module" 380 if ! $BUILDVBOXSF \ 381 --use-module-symvers /tmp/vboxguest-Module.symvers \ 382 --no-print-directory install >> $LOG 2>&1; then 383 fail "Look at $LOG to find out what went wrong" 384 fi 385 succ_msg 386 fi 387 if [ -n "$BUILDVBOXVIDEO" ]; then 388 begin "Building the OpenGL support module" 389 if ! $BUILDVBOXVIDEO \ 390 --use-module-symvers /tmp/vboxguest-Module.symvers \ 391 --no-print-directory install >> $LOG 2>&1; then 392 fail "Look at $LOG to find out what went wrong" 393 fi 394 succ_msg 395 fi 396 depmod 397 fi 391 398 392 399 begin "Doing non-kernel setup of the Guest Additions" -
trunk/src/VBox/Additions/linux/sharedfolders/Makefile.kmk
r31900 r32183 5 5 6 6 # 7 # Copyright (C) 2006-20 07Oracle Corporation7 # Copyright (C) 2006-2010 Oracle Corporation 8 8 # 9 9 # This file is part of VirtualBox Open Source Edition (OSE), as … … 33 33 vboxsf-mod_MODE = a+r,u+w 34 34 vboxsf-mod_SOURCES = $(subst ",,$(FILES_VBOXSF_NOBIN)) 35 vboxsf-mod_SOURCES += $(PATH_vboxsf-mod)/dkms.conf36 vboxsf-mod_CLEAN += $(PATH_vboxsf-mod)/dkms.conf37 35 38 36 vboxsf-sh_INST = $(INST_ADDITIONS)src/vboxsf/ … … 99 97 $(QUIET)chmod 0755 $@ 100 98 101 $$(PATH_vboxsf-mod)/dkms.conf: \102 $(PATH_SUB_CURRENT)/dkms.conf \103 $(VBOX_VERSION_STAMP) \104 | $$(dir $$@)105 $(call MSG_TOOL,Creating,,$@)106 $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g" --output $@ $<107 108 99 include $(KBUILD_PATH)/subfooter.kmk 109 100 -
trunk/src/VBox/Additions/linux/sharedfolders/Makefile.module
r31006 r32183 173 173 endif 174 174 INCL += $(addprefix -I$(KBUILD_EXTMOD),/ /include /r0drv/linux) 175 INCL += $(addprefix -I$(KBUILD_EXTMOD)/vboxsf,/ /include /r0drv/linux) 175 176 export INCL 176 177 endif -
trunk/src/VBox/HostDrivers/Makefile.kmk
r28800 r32183 5 5 6 6 # 7 # Copyright (C) 2006-20 07Oracle Corporation7 # Copyright (C) 2006-2010 Oracle Corporation 8 8 # 9 9 # This file is part of VirtualBox Open Source Edition (OSE), as … … 45 45 # 46 46 INSTALLS += HostDrivers-src 47 HostDrivers-src_INST = bin/src/48 HostDrivers-src_MODE = a+r,u+w49 HostDrivers-src_SOURCES.linux = linux/Makefile47 HostDrivers-src_INST = bin/src/ 48 HostDrivers-src_MODE = a+r,u+w 49 HostDrivers-src_SOURCES.linux = linux/Makefile 50 50 HostDrivers-src_SOURCES.freebsd = freebsd/Makefile 51 endif 52 53 if1of ($(KBUILD_TARGET),linux) 54 INSTALLS += HostDrivers-dkms-sh 55 HostDrivers-dkms-sh_INST = bin/src/ 56 HostDrivers-dkms-sh_MODE = a+rx,u+w 57 HostDrivers-dkms-sh_SOURCES = $(PATH_HostDrivers-dkms-sh)/do_dkms 58 HostDrivers-dkms-sh_CLEAN = $(PATH_HostDrviers-dkms-sh)/do_dkms 59 60 INSTALLS += HostDrivers-dkms-src 61 HostDrivers-dkms-src_INST = bin/src/ 62 HostDrivers-dkms-src_MODE = a+r,u+w 63 HostDrivers-dkms-src_SOURCES = $(PATH_HostDrivers-dkms-src)/dkms.conf 64 HostDrivers-dkms-src_CLEAN = $(PATH_HostDrivers-dkms-src)/dkms.conf 51 65 endif 52 66 … … 62 76 endif # !defined(VBOX_ONLY_DOCS) && !defined(VBOX_ONLY_TESTSUITE) 63 77 78 # Scripts needed for building the kernel modules 79 80 $$(PATH_HostDrivers-dkms-src)/dkms.conf: \ 81 $(PATH_SUB_CURRENT)/linux/dkms.conf \ 82 $(VBOX_VERSION_STAMP) \ 83 | $$(dir $$@) 84 $(call MSG_TOOL,Creating,,$@) 85 $(QUIET)$(SED) \ 86 -e "s;_VERSION_;${VBOX_VERSION_STRING};g" \ 87 -e "s;_OMIT_VBOXNETFLT_;$(if $(VBOX_WITH_NETFLT),,#);g" \ 88 -e "s;_OMIT_VBOXNETADP_;$(if $(VBOX_WITH_NETADP),,#);g" \ 89 --output $@ $< 90 91 $$(PATH_HostDrivers-dkms-sh)/do_dkms: \ 92 $(PATH_SUB_CURRENT)/linux/do_dkms \ 93 $(VBOX_VERSION_STAMP) \ 94 | $$(dir $$@) 95 $(call MSG_TOOL,Creating,,$@) 96 $(QUIET)$(SED) \ 97 -e "s;_VERSION_;${VBOX_VERSION_STRING};g" \ 98 -e "s;_MODULE_;vboxhost;g" \ 99 -e "s;_OLDMODULES_;vboxhost vboxdrv vboxnetflt vboxnetadp;g" \ 100 --output $@ $< 101 64 102 # Let kBuild generate the rules. 65 103 include $(KBUILD_PATH)/subfooter.kmk -
trunk/src/VBox/HostDrivers/Support/Makefile.kmk
r31900 r32183 49 49 SYSMODS.solaris += vboxdrv 50 50 endif 51 INSTALLS.linux += vboxdrv-mod vboxdrv-sh 51 INSTALLS.linux += vboxdrv-mod vboxdrv-sh vboxdrv-dkms 52 52 INSTALLS.freebsd += vboxdrv-mod vboxdrv-sh 53 53 … … 260 260 vboxdrv-mod_SOURCES = $(subst ",,$(FILES_VBOXDRV_NOBIN)) #" 261 261 vboxdrv-mod_SOURCES += \ 262 $(PATH_vboxdrv-mod)/dkms.conf \263 262 $(PATH_vboxdrv-mod)/Makefile 264 263 vboxdrv-mod_CLEAN = \ 265 $(PATH_vboxdrv-mod)/dkms.conf \266 264 $(PATH_vboxdrv-mod)/Makefile 267 265 … … 276 274 $(PATH_vboxdrv-sh)/build_in_tmp 277 275 278 279 276 # Scripts needed for building the kernel modules 280 277 … … 284 281 | $$(dir $$@) 285 282 $(call MSG_TOOL,Creating,,$@) 286 $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g; s;_MODULE_;vboxdrv;g; s;_BUILDTYPE_;${KBUILD_TYPE};g" --output $@ $< 283 $(QUIET)$(SED) \ 284 -e "s;_VERSION_;${VBOX_VERSION_STRING};g" \ 285 -e "s;_MODULE_;vboxdrv;g" \ 286 -e "s;_BUILDTYPE_;${KBUILD_TYPE};g" --output $@ $< 287 287 $(QUIET)chmod 0755 $@ 288 289 $$(PATH_vboxdrv-mod)/dkms.conf: \290 $(PATH_SUB_CURRENT)/linux/dkms.conf \291 $(VBOX_VERSION_STAMP) \292 | $$(dir $$@)293 $(call MSG_TOOL,Creating,,$@)294 $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g" --output $@ $<295 288 296 289 includedep $(PATH_TARGET)/vboxdrv-sh-1.dep … … 309 302 310 303 endif # real linux 311 312 304 313 305 -
trunk/src/VBox/HostDrivers/Support/linux/Makefile
r31829 r32183 228 228 endif 229 229 INCL += $(addprefix -I$(KBUILD_EXTMOD),/ /include /r0drv/linux) 230 INCL += $(addprefix -I$(KBUILD_EXTMOD)/vboxdrv,/ /include /r0drv/linux) 230 231 export INCL 231 232 endif -
trunk/src/VBox/HostDrivers/VBoxNetAdp/Makefile.kmk
r31900 r32183 5 5 6 6 # 7 # Copyright (C) 2009 Oracle Corporation7 # Copyright (C) 2009-2010 Oracle Corporation 8 8 # 9 9 # This file is part of VirtualBox Open Source Edition (OSE), as … … 103 103 VBoxNetAdp-src_SOURCES = $(subst ",,$(VBOX_VBOXNETADP_SOURCES)) #" 104 104 VBoxNetAdp-src_SOURCES+= \ 105 $(PATH_VBoxNetAdp-src)/dkms.conf \106 105 $(PATH_VBoxNetAdp-src)/Makefile 107 106 VBoxNetAdp-src_CLEAN = \ 108 $(PATH_VBoxNetAdp-src)/dkms.conf \109 107 $(PATH_VBoxNetAdp-src)/Makefile \ 110 108 $(PATH_TARGET)/VBoxNetAdp-src-1.dep … … 141 139 $(QUIET)chmod 0755 $@ 142 140 143 $$(PATH_VBoxNetAdp-src)/dkms.conf: \144 $(PATH_SUB_CURRENT)/linux/dkms.conf \145 $(VBOX_VERSION_STAMP) \146 | $$(dir $$@)147 $(call MSG_TOOL,Creating,,$@)148 $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g" --output $@ $<149 150 141 endif # linux 151 142 -
trunk/src/VBox/HostDrivers/VBoxNetAdp/linux/Makefile
r31245 r32183 6 6 # 7 7 # 8 # Copyright (C) 2006-20 07Oracle Corporation8 # Copyright (C) 2006-2010 Oracle Corporation 9 9 # 10 10 # This file is part of VirtualBox Open Source Edition (OSE), as … … 157 157 endif 158 158 INCL += $(addprefix -I$(KBUILD_EXTMOD),/ /include /r0drv/linux) 159 INCL += $(addprefix -I$(KBUILD_EXTMOD)/vboxnetadp,/ /include /r0drv/linux) 159 160 export INCL 160 161 endif -
trunk/src/VBox/HostDrivers/VBoxNetFlt/Makefile.kmk
r31900 r32183 5 5 6 6 # 7 # Copyright (C) 2008 Oracle Corporation7 # Copyright (C) 2008-2010 Oracle Corporation 8 8 # 9 9 # This file is part of VirtualBox Open Source Edition (OSE), as … … 367 367 VBoxNetFlt-src_SOURCES = $(subst ",,$(VBOX_VBOXNETFLT_SOURCES)) #" 368 368 VBoxNetFlt-src_SOURCES+= \ 369 $(PATH_VBoxNetFlt-src)/dkms.conf \370 369 $(PATH_VBoxNetFlt-src)/Makefile 371 370 VBoxNetFlt-src_CLEAN = \ 372 $(PATH_VBoxNetFlt-src)/dkms.conf \373 371 $(PATH_VBoxNetFlt-src)/Makefile \ 374 372 $(PATH_TARGET)/VBoxNetFlt-src-1.dep … … 403 401 $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g; s;_MODULE_;vboxnetflt;g; s;_BUILDTYPE_;${KBUILD_TYPE};g" --output $@ $< 404 402 $(QUIET)chmod 0755 $@ 405 406 # Script needed for building the kernel module407 $$(PATH_VBoxNetFlt-src)/dkms.conf: \408 $(PATH_SUB_CURRENT)/linux/dkms.conf \409 $(VBOX_VERSION_STAMP) \410 | $$(dir $$@)411 $(call MSG_TOOL,Creating,,$@)412 $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g" --output $@ $<413 403 414 404 endif # linux -
trunk/src/VBox/HostDrivers/VBoxNetFlt/linux/Makefile
r31245 r32183 6 6 # 7 7 # 8 # Copyright (C) 2006-20 07Oracle Corporation8 # Copyright (C) 2006-2010 Oracle Corporation 9 9 # 10 10 # This file is part of VirtualBox Open Source Edition (OSE), as … … 161 161 endif 162 162 INCL += $(addprefix -I$(KBUILD_EXTMOD),/ /include /r0drv/linux) 163 INCL += $(addprefix -I$(KBUILD_EXTMOD)/vboxnetflt,/ /include /r0drv/linux) 163 164 export INCL 164 165 endif -
trunk/src/VBox/HostDrivers/linux/Makefile
r28800 r32183 5 5 # 6 6 # 7 # Copyright (C) 2008-20 09Oracle Corporation7 # Copyright (C) 2008-2010 Oracle Corporation 8 8 # 9 9 # This file is part of VirtualBox Open Source Edition (OSE), as … … 15 15 # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. 16 16 # 17 18 ifneq ($(KBUILD_EXTMOD),) 19 20 # DKMS 21 22 obj-m = vboxdrv/ 23 ifneq ($(wildcard $(KBUILD_EXTMOD)/vboxnetflt/Makefile),) 24 obj-m += vboxnetflt/ 25 endif 26 ifneq ($(wildcard $(KBUILD_EXTMOD)/vboxnetadp/Makefile),) 27 obj-m += vboxnetadp/ 28 endif 29 30 else # ! KBUILD_EXTMOD 31 32 # convenience Makefile without DKMS 17 33 18 34 KBUILD_VERBOSE = … … 75 91 fi; \ 76 92 done 93 94 endif # ! KBUILD_EXTMOD -
trunk/src/VBox/HostDrivers/linux/build_in_tmp
r28800 r32183 3 3 # 4 4 # Script to build a kernel module in /tmp. Useful if the module sources 5 # are installed in read-only directory. 5 # are installed in read-only directory. Not for DKMS! 6 6 # 7 # Copyright (C) 2007 Oracle Corporation7 # Copyright (C) 2007-2010 Oracle Corporation 8 8 # 9 9 # This file is part of VirtualBox Open Source Edition (OSE), as … … 18 18 # Set the build type 19 19 export BUILD_TYPE=_BUILDTYPE_ 20 21 # Attempt to build using DKMS first22 DKMS=`which dkms 2>/dev/null`23 if [ "$1" = "--no-dkms" ]; then24 shift25 DKMS=""26 fi27 if [ -n "$DKMS" ]28 then29 echo "Attempting to install using DKMS"30 $DKMS status -m _MODULE_ | while read line31 # first, remove _any_ old module32 do33 if echo "$line" | grep -q added > /dev/null ||34 echo "$line" | grep -q built > /dev/null ||35 echo "$line" | grep -q installed > /dev/null; then36 # either 'vboxvideo, <version>: added' or 'vboxvideo, <version>, ...: installed'37 version=`echo "$line" | sed "s/_MODULE_,\([^,]*\)[,:].*/\1/;t;d"`38 echo " removing old DKMS module _MODULE_ version $version"39 $DKMS remove -m _MODULE_ -v $version --all40 fi41 done42 # there should not be any more matches43 status=`$DKMS status -m _MODULE_ -v _VERSION_`44 if echo $status | grep added > /dev/null ||45 echo $status | grep built > /dev/null ||46 echo $status | grep installed > /dev/null47 then48 $DKMS remove -m _MODULE_ -v _VERSION_ --all49 fi50 # finally install the module51 if $DKMS add -m _MODULE_ -v _VERSION_ &&52 $DKMS build -m _MODULE_ -v _VERSION_ &&53 $DKMS install -m _MODULE_ -v _VERSION_ --force54 then55 exit 056 fi57 echo "Failed to install using DKMS, attempting to install without"58 fi59 20 60 21 # find a unique temp directory -
trunk/src/VBox/Installer/linux/Makefile.kmk
r31768 r32183 5 5 6 6 # 7 # Copyright (C) 2006-20 07Oracle Corporation7 # Copyright (C) 2006-2010 Oracle Corporation 8 8 # 9 9 # This file is part of VirtualBox Open Source Edition (OSE), as … … 146 146 VBoxSysInfo.sh \ 147 147 VBox.sh \ 148 VBox.png \ 149 src 148 VBox.png 150 149 151 150 # Qt4 GUI … … 254 253 # All the bin files that goes into the archives. 255 254 # 256 VBOX_LNX_ARCH_FILES := $(VBOX_LNX_STRIP_BIN) $(VBOX_LNX_STRIP_OBJ) $(VBOX_LNX_NO_STRIP) 255 VBOX_LNX_ARCH_FILES := $(VBOX_LNX_STRIP_BIN) $(VBOX_LNX_STRIP_OBJ) $(VBOX_LNX_NO_STRIP) src 257 256 258 257 # Cleanup of the files we copy/symlink from bin. … … 382 381 endif 383 382 383 # special rule for the kernel modules 384 $(VBOX_LNX_INST_OUT_DIR)/archive/src: $(PATH_BIN)/src | $(dir $@) 385 $(call MSG_INST_SYM,$<,$@) 386 $(QUIET)$(RM) -Rf $@ 387 $(QUIET)$(MKDIR) $@ 388 $(QUIET)$(LN_SYMLINK) $< $@/vboxhost 389 384 390 # pattern rule for linking the VBOX_LNX_NO_STRIP into archive/ 385 391 $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/,$(VBOX_LNX_NO_STRIP)): \ -
trunk/src/VBox/Installer/linux/debian/postinst.in
r32008 r32183 93 93 fi 94 94 95 # try to build a kernel module (disable with INSTALL_NO_VBOXDRV=1 in /etc/default/virtualbox)96 REGISTER_DKMS=197 if [ ! -f /lib/modules/`uname -r`/misc/vboxdrv.ko -a "$INSTALL_NO_VBOXDRV" != "1" ]; then98 db_get virtualbox/module-compilation-allowed99 if [ "$RET" = "false" ]; then100 cat << EOF101 Unable to find a precompiled module for the current kernel102 though module compilation denied by debconf setting.103 EOF104 else105 db_input low virtualbox/module-compilation-allowed || true106 db_go || true107 db_get virtualbox/module-compilation-allowed108 if [ "$RET" = "true" ]; then109 # Compile module. Don't show a message box here if everything works well.110 cat << EOF111 Messages emitted during module compilation will be logged to $LOG.112 EOF113 rm -f /etc/vbox/module_not_compiled114 echo "** Compiling vboxdrv" > /var/log/vbox-install.log115 if ! /usr/share/virtualbox/src/vboxdrv/build_in_tmp \116 --save-module-symvers /tmp/vboxdrv-Module.symvers \117 --no-print-directory KBUILD_VERBOSE= \118 install >> /var/log/vbox-install.log 2>&1; then119 db_fset virtualbox/module-compilation-failed seen false120 db_input critical virtualbox/module-compilation-failed || true121 db_go || true122 touch /etc/vbox/module_not_compiled123 # don't abort the installation!124 else125 echo "** Compiling vboxnetflt" >> /var/log/vbox-install.log126 if ! /usr/share/virtualbox/src/vboxnetflt/build_in_tmp \127 --use-module-symvers /tmp/vboxdrv-Module.symvers \128 --no-print-directory KBUILD_VERBOSE= \129 install >> /var/log/vbox-install.log 2>&1; then130 db_fset virtualbox/module-compilation-failed seen false131 db_input critical virtualbox/module-compilation-failed || true132 db_go || true133 touch /etc/vbox/module_not_compiled134 # don't abort the installation!135 else136 echo "** Compiling vboxnetadp" >> /var/log/vbox-install.log137 if ! /usr/share/virtualbox/src/vboxnetadp/build_in_tmp \138 --use-module-symvers /tmp/vboxdrv-Module.symvers \139 --no-print-directory KBUILD_VERBOSE= \140 install >> /var/log/vbox-install.log 2>&1; then141 db_fset virtualbox/module-compilation-failed seen false142 db_input critical virtualbox/module-compilation-failed || true143 db_go || true144 touch /etc/vbox/module_not_compiled145 # don't abort the installation!146 fi147 fi148 fi149 # cleanup150 rm -f /tmp/vboxdrv-Module.symvers151 if [ ! -f /etc/vbox/module_not_compiled ]; then152 # success153 cat << EOF154 Success!155 EOF156 REGISTER_DKMS=157 fi158 fi159 fi160 fi161 162 # Register at DKMS. If the modules were built above, they are already registered163 if [ -n "$REGISTER_DKMS" ]; then164 DKMS=`which dkms 2>/dev/null`165 if [ -n "$DKMS" ]; then166 for m in vboxdrv vboxnetflt vboxnetadp; do167 $DKMS status -m $m | while read line; do168 if echo "$line" | grep -q added > /dev/null ||169 echo "$line" | grep -q built > /dev/null ||170 echo "$line" | grep -q installed > /dev/null; then171 v=`echo "$line" | sed "s/$m,\([^,]*\)[,:].*/\1/;t;d"`172 $DKMS remove -m $m -v $v --all > /dev/null 2>&1173 fi174 done175 $DKMS add -m $m -v %VER% > /dev/null 2>&1176 done177 fi178 fi179 180 # There might be an old module active (e.g. manually loaded)181 if lsmod | grep -q "vboxdrv[^_-]"; then182 /etc/init.d/vboxdrv stop || true183 fi184 185 95 # The starters need to be Suid root. They drop the privileges before starting 186 96 # the real frontend. … … 216 126 if [ -x "/etc/init.d/vboxdrv" ]; then 217 127 update-rc.d vboxdrv defaults >/dev/null 128 129 # There might be an old module active (e.g. manually loaded) 130 if lsmod | grep -q "vboxdrv[^_-]"; then 131 /etc/init.d/vboxdrv stop || true 132 fi 133 134 BUILD_MODULES=0 135 # Disable module compilation with INSTALL_NO_VBOXDRV=1 in /etc/default/virtualbox 136 if [ ! -f /lib/modules/`uname -r`/misc/vboxdrv.ko -a "$INSTALL_NO_VBOXDRV" != "1" ]; then 137 db_get virtualbox/module-compilation-allowed 138 if [ "$RET" = "false" ]; then 139 cat << EOF 140 Unable to find a precompiled module for the current kernel 141 though module compilation denied by debconf setting. 142 EOF 143 else 144 db_input low virtualbox/module-compilation-allowed || true 145 db_go || true 146 db_get virtualbox/module-compilation-allowed 147 if [ "$RET" = "true" ]; then 148 BUILD_MODULES=1 149 fi 150 fi 151 fi 152 218 153 if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then 154 if [ $BUILD_MODULES -eq 1 ]; then 155 invoke-rc.d vboxdrv setup || true 156 else 219 157 invoke-rc.d vboxdrv start || exit $? 158 fi 220 159 else 160 if [ $BUILD_MODULES -eq 1 ]; then 161 /etc/init.d/vboxdrv setup || true 162 else 221 163 /etc/init.d/vboxdrv start || exit $? 164 fi 222 165 fi 223 166 fi … … 230 173 # fi 231 174 fi 232 fi 175 176 fi # $1 = "configure" 233 177 234 178 exit 0 -
trunk/src/VBox/Installer/linux/debian/prerm.in
r32008 r32183 44 44 45 45 # make sure we de-register the DMKS modules before the files get removed 46 DKMS=`which dkms 2>/dev/null` 47 if [ -n "$DKMS" ]; then 48 $DKMS remove -m vboxnetadp -v %VER% --all > /dev/null 2>&1 || true49 $DKMS remove -m vboxnetflt -v %VER% --all > /dev/null 2>&1 || true50 $DKMS remove -m vboxdrv -v %VER% --all > /dev/null 2>&1 || true46 if [ "$1" = "upgrade" -o "$1" = "remove" -o "$1" = "deconfigure" ]; then 47 DKMS=`which dkms 2>/dev/null` 48 if [ -n "$DKMS" ]; then 49 $DKMS remove -m vboxhost -v %VER% --all > /dev/null 2>&1 || true 50 fi 51 51 fi 52 52 -
trunk/src/VBox/Installer/linux/debian/rules
r32044 r32183 278 278 usr/bin/VBox usr/bin/VBoxHeadless \ 279 279 $(if $(NOWEBSVC),,usr/bin/VBox usr/bin/vboxwebsrv) \ 280 usr/share/virtualbox/src/vboxdrv usr/src/vboxdrv-$(ver) \ 281 usr/share/virtualbox/src/vboxnetflt usr/src/vboxnetflt-$(ver) \ 282 usr/share/virtualbox/src/vboxnetadp usr/src/vboxnetadp-$(ver) 280 usr/share/virtualbox/src/vboxhost usr/src/vboxhost-$(ver) 283 281 dh_desktop 284 282 dh_installmenu -
trunk/src/VBox/Installer/linux/install.sh
r31768 r32183 65 65 66 66 module_loaded() { 67 lsmod | grep -q vboxdrv67 lsmod | grep -q "vboxdrv[^_-]" 68 68 } 69 69 … … 268 268 if [ -n "$DKMS" ] 269 269 then 270 $DKMS remove -m vboxhost -v $INSTALL_VER --all > /dev/null 2>&1 270 271 $DKMS remove -m vboxdrv -v $INSTALL_VER --all > /dev/null 2>&1 271 272 $DKMS remove -m vboxnetflt -v $INSTALL_VER --all > /dev/null 2>&1 … … 382 383 ln -sf $INSTALLATION_DIR/virtualbox.desktop /usr/share/applications/virtualbox.desktop 383 384 ln -sf $INSTALLATION_DIR/rdesktop-vrdp /usr/bin/rdesktop-vrdp 384 ln -sf $INSTALLATION_DIR/src/vboxdrv /usr/src/vboxdrv-_VERSION_ 385 ln -sf $INSTALLATION_DIR/src/vboxnetflt /usr/src/vboxnetflt-_VERSION_ 386 ln -sf $INSTALLATION_DIR/src/vboxnetadp /usr/src/vboxnetadp-_VERSION_ 385 ln -sf $INSTALLATION_DIR/src/vboxhost /usr/src/vboxhost-_VERSION_ 387 386 388 387 # If Python is available, install Python bindings … … 432 431 udevplug -Busb > /dev/null 2>&1 433 432 433 # Write the configuration. Do this before we call /etc/init.d/vboxdrv setup! 434 echo "# VirtualBox installation directory" > $CONFIG_DIR/$CONFIG 435 echo "INSTALL_DIR='$INSTALLATION_DIR'" >> $CONFIG_DIR/$CONFIG 436 echo "# VirtualBox version" >> $CONFIG_DIR/$CONFIG 437 echo "INSTALL_VER='$VERSION'" >> $CONFIG_DIR/$CONFIG 438 echo "INSTALL_REV='$SVNREV'" >> $CONFIG_DIR/$CONFIG 439 434 440 # Make kernel module 435 441 MODULE_FAILED="false" 436 442 if [ "$BUILD_MODULE" = "true" ] 437 443 then 438 info "Building the VirtualBox vboxdrv kernel module"444 info "Building the VirtualBox kernel modules" 439 445 log "Output from the module build process (the Linux kernel build system) follows:" 440 446 cur=`pwd` 441 447 log "" 442 cd $INSTALLATION_DIR/src/vboxdrv 443 ./build_in_tmp \ 444 --save-module-symvers /tmp/vboxdrv-Module.symvers \ 445 --no-print-directory install >> $LOG 2>&1 446 RETVAL=$? 447 if [ $RETVAL -ne 0 ] 448 then 449 info "Failed to build the vboxdrv kernel module." 450 info "Please check the log file $LOG for more information." 451 MODULE_FAILED="true" 452 RC_SCRIPT=1 453 else 454 info "Building the VirtualBox netflt kernel module" 455 log "Output from the module build process (the Linux kernel build system) follows:" 456 cd $INSTALLATION_DIR/src/vboxnetflt 457 ./build_in_tmp \ 458 --use-module-symvers /tmp/vboxdrv-Module.symvers \ 459 --no-print-directory install >> $LOG 2>&1 460 RETVAL=$? 461 if [ $RETVAL -ne 0 ] 462 then 463 info "Failed to build the vboxnetflt kernel module." 464 info "Please check the log file $LOG for more information." 465 MODULE_FAILED="true" 466 RC_SCRIPT=1 467 else 468 info "Building the VirtualBox netadp kernel module" 469 log "Output from the module build process (the Linux kernel build system) follows:" 470 cd $INSTALLATION_DIR/src/vboxnetadp 471 ./build_in_tmp \ 472 --use-module-symvers /tmp/vboxdrv-Module.symvers \ 473 --no-print-directory install >> $LOG 2>&1 474 RETVAL=$? 475 if [ $RETVAL -ne 0 ] 476 then 477 info "Failed to build the vboxnetadp kernel module." 478 info "Please check the log file $LOG for more information." 479 MODULE_FAILED="true" 480 RC_SCRIPT=1 481 fi 482 fi 483 fi 484 # cleanup 485 rm -f /tmp/vboxdrv-Module.symvers 448 setup_init_script vboxdrv 486 449 # Start VirtualBox kernel module 487 450 if [ $RETVAL -eq 0 ] && ! start_init_script vboxdrv; then … … 495 458 fi 496 459 497 echo "# VirtualBox installation directory" > $CONFIG_DIR/$CONFIG498 echo "INSTALL_DIR='$INSTALLATION_DIR'" >> $CONFIG_DIR/$CONFIG499 echo "# VirtualBox version" >> $CONFIG_DIR/$CONFIG500 echo "INSTALL_VER='$VERSION'" >> $CONFIG_DIR/$CONFIG501 echo "INSTALL_REV='$SVNREV'" >> $CONFIG_DIR/$CONFIG502 460 info "" 503 461 if [ ! "$MODULE_FAILED" = "true" ] -
trunk/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec
r32008 r32183 135 135 ln -s VBox $RPM_BUILD_ROOT/usr/bin/VBoxHeadless 136 136 ln -s VBox $RPM_BUILD_ROOT/usr/bin/vboxwebsrv 137 ln -s /usr/share/virtualbox/src/vboxdrv $RPM_BUILD_ROOT/usr/src/vboxdrv-%VER% 138 ln -s /usr/share/virtualbox/src/vboxnetflt $RPM_BUILD_ROOT/usr/src/vboxnetflt-%VER% 139 ln -s /usr/share/virtualbox/src/vboxnetadp $RPM_BUILD_ROOT/usr/src/vboxnetadp-%VER% 137 ln -s /usr/share/virtualbox/src/vboxhost $RPM_BUILD_ROOT/usr/src/vboxhost-%VER% 140 138 mv virtualbox.desktop $RPM_BUILD_ROOT/usr/share/applications/virtualbox.desktop 141 139 mv VBox.png $RPM_BUILD_ROOT/usr/share/pixmaps/VBox.png … … 267 265 %endif 268 266 269 # try to build a kernel module (disable with INSTALL_NO_VBOXDRV=1 in /etc/default/virtualbox)270 REGISTER_DKMS=1 267 # Disable module compilation with INSTALL_NO_VBOXDRV=1 in /etc/default/virtualbox 268 BUILD_MODULES=0 271 269 if [ ! -f /lib/modules/`uname -r`/misc/vboxdrv.ko -a "$INSTALL_NO_VBOXDRV" != "1" ]; then 272 270 # compile problem … … 276 274 277 275 EOF 278 rm -f /etc/vbox/module_not_compiled 279 echo "** Compiling vboxdrv" > /var/log/vbox-install.log 280 if ! /usr/share/virtualbox/src/vboxdrv/build_in_tmp \ 281 --save-module-symvers /tmp/vboxdrv-Module.symvers \ 282 --no-print-directory KBUILD_VERBOSE= \ 283 install >> /var/log/vbox-install.log 2>&1; then 284 cat << EOF 285 Compilation of the kernel module FAILED! VirtualBox will not start until this 286 problem is fixed. Please consult $LOG to find out why the 287 kernel module does not compile. Most probably the kernel sources are not found. 288 Install them and execute 289 290 /etc/init.d/vboxdrv setup 291 292 as root. 293 294 EOF 295 touch /etc/vbox/module_not_compiled 296 else 297 echo "** Compiling vboxnetflt" >> /var/log/vbox-install.log 298 if ! /usr/share/virtualbox/src/vboxnetflt/build_in_tmp \ 299 --use-module-symvers /tmp/vboxdrv-Module.symvers \ 300 --no-print-directory KBUILD_VERBOSE= \ 301 install >> /var/log/vbox-install.log 2>&1; then 302 cat << EOF 303 Compilation of the kernel module FAILED! VirtualBox will not start until this 304 problem is fixed. Please consult $LOG to find out why the 305 kernel module does not compile. Most probably the kernel sources are not found. 306 Install them and execute 307 308 /etc/init.d/vboxdrv setup 309 310 as root. 311 312 EOF 313 touch /etc/vbox/module_not_compiled 314 else 315 echo "** Compiling vboxnetadp" >> /var/log/vbox-install.log 316 if ! /usr/share/virtualbox/src/vboxnetadp/build_in_tmp \ 317 --use-module-symvers /tmp/vboxdrv-Module.symvers \ 318 --no-print-directory KBUILD_VERBOSE= \ 319 install >> /var/log/vbox-install.log 2>&1; then 320 cat << EOF 321 Compilation of the kernel module FAILED! VirtualBox will not start until this 322 problem is fixed. Please consult $LOG to find out why the 323 kernel module does not compile. Most probably the kernel sources are not found. 324 Install them and execute 325 326 /etc/init.d/vboxdrv setup 327 328 as root. 329 330 EOF 331 touch /etc/vbox/module_not_compiled 332 fi 333 fi 334 fi 335 rm -f /tmp/vboxdrv-Module.symvers 336 if [ ! -f /etc/vbox/module_not_compiled ]; then 337 cat << EOF 338 Success! 339 340 EOF 341 REGISTER_DKMS= 342 fi 343 fi 344 # Register at DKMS. If the modules were built above, they are already registered 345 if [ -n "$REGISTER_DKMS" ]; then 346 DKMS=`which dkms 2>/dev/null` 347 if [ -n "$DKMS" ]; then 348 for m in vboxdrv vboxnetflt vboxnetadp; do 349 $DKMS status -m $m | while read line; do 350 if echo "$line" | grep -q added > /dev/null || 351 echo "$line" | grep -q built > /dev/null || 352 echo "$line" | grep -q installed > /dev/null; then 353 v=`echo "$line" | sed "s/$m,\([^,]*\)[,:].*/\1/;t;d"` 354 $DKMS remove -m $m -v $v --all > /dev/null 2>&1 355 fi 356 done 357 $DKMS add -m $m -v %VER% > /dev/null 2>&1 358 done 359 fi 276 BUILD_MODULES=1 360 277 fi 361 278 # if INSTALL_NO_VBOXDRV is set to 1, remove all shipped modules … … 368 285 /etc/init.d/vboxdrv stop || true 369 286 fi 370 if [ ! -f /etc/vbox/module_not_compiled ]; then 371 depmod -a 287 if [ $BUILD_MODULES -eq 1 ]; then 288 /etc/init.d/vboxdrv setup || true 289 else 372 290 /etc/init.d/vboxdrv start > /dev/null 373 /etc/init.d/vboxweb-service start > /dev/null 374 fi 291 fi 292 /etc/init.d/vboxweb-service start > /dev/null 375 293 376 294 … … 405 323 DKMS=`which dkms 2>/dev/null` 406 324 if [ -n "$DKMS" ]; then 407 $DKMS remove -m vboxnetadp -v %VER% --all > /dev/null 2>&1 || true 408 $DKMS remove -m vboxnetflt -v %VER% --all > /dev/null 2>&1 || true 409 $DKMS remove -m vboxdrv -v %VER% --all > /dev/null 2>&1 || true 325 $DKMS remove -m vboxhost -v %VER% --all > /dev/null 2>&1 || true 410 326 fi 411 327 -
trunk/src/VBox/Installer/linux/uninstall.sh
r31768 r32183 1 1 #!/bin/sh 2 # 3 # Oracle VM VirtualBox 4 # VirtualBox linux uninstallation script 5 6 # 7 # Copyright (C) 2009-2010 Oracle Corporation 8 # 9 # This file is part of VirtualBox Open Source Edition (OSE), as 10 # available from http://www.virtualbox.org. This file is free software; 11 # you can redistribute it and/or modify it under the terms of the GNU 12 # General Public License (GPL) as published by the Free Software 13 # Foundation, in version 2 as it comes in the "COPYING" file of the 14 # VirtualBox OSE distribution. VirtualBox OSE is distributed in the 15 # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. 16 # 2 17 3 18 . `dirname $0`/routines.sh … … 49 64 # Remove kernel module installed 50 65 if [ -n "$DKMS" ]; then 51 $DKMS remove -m vbox drv-v $INSTALL_VER --all > /dev/null 2>&166 $DKMS remove -m vboxhost -v $INSTALL_VER --all > /dev/null 2>&1 52 67 fi 53 68 if [ -z "$VBOX_DONT_REMOVE_OLD_MODULES" ]; then … … 58 73 find /lib/modules/`uname -r` -name vbox\* 2>/dev/null|xargs rmdir -p 2> /dev/null 59 74 find /lib/modules/`uname -r` -name misc\* 2>/dev/null|xargs rmdir -p 2> /dev/null 75 rm -f /usr/src/vboxhost-$INSTALL_VER 2> /dev/null 60 76 rm -f /usr/src/vboxdrv-$INSTALL_VER 2> /dev/null 61 77 rm -f /usr/src/vboxnetflt-$INSTALL_VER 2> /dev/null -
trunk/src/VBox/Installer/linux/vboxdrv.sh.in
r29657 r32183 44 44 if [ -n "$INSTALL_DIR" ]; then 45 45 VBOXMANAGE="$INSTALL_DIR/VBoxManage" 46 BUILDVBOXDRV="$INSTALL_DIR/src/vboxdrv/build_in_tmp" 47 BUILDVBOXNETFLT="$INSTALL_DIR/src/vboxnetflt/build_in_tmp" 48 BUILDVBOXNETADP="$INSTALL_DIR/src/vboxnetadp/build_in_tmp" 46 DODKMS="$INSTALL_DIR/src/vboxhost/do_dkms" 47 BUILDVBOXDRV="$INSTALL_DIR/src/vboxhost/vboxdrv/build_in_tmp" 48 BUILDVBOXNETFLT="$INSTALL_DIR/src/vboxhost/vboxnetflt/build_in_tmp" 49 BUILDVBOXNETADP="$INSTALL_DIR/src/vboxhost/vboxnetadp/build_in_tmp" 49 50 else 50 51 VBOXMANAGE="/usr/lib/%PACKAGE%/VBoxManage" 51 BUILDVBOXDRV="/usr/share/%PACKAGE%/src/vboxdrv/build_in_tmp" 52 BUILDVBOXNETFLT="/usr/share/%PACKAGE%/src/vboxnetflt/build_in_tmp" 53 BUILDVBOXNETADP="/usr/share/%PACKAGE%/src/vboxnetadp/build_in_tmp" 52 DODKMS="/usr/share/%PACKAGE%/src/vboxhost/do_dkms" 53 BUILDVBOXDRV="/usr/share/%PACKAGE%/src/vboxhost/vboxdrv/build_in_tmp" 54 BUILDVBOXNETFLT="/usr/share/%PACKAGE%/src/vboxhost/vboxnetflt/build_in_tmp" 55 BUILDVBOXNETADP="/usr/share/%PACKAGE%/src/vboxhost/vboxnetadp/build_in_tmp" 54 56 fi 55 57 … … 280 282 } 281 283 284 # setup_script 282 285 setup() 283 286 { 284 287 stop 288 begin_msg "Uninstalling old VirtualBox DKMS kernel modules" 289 $DODKMS uninstall > $LOG 290 succ_msg 285 291 if find /lib/modules/`uname -r` -name "vboxnetadp\.*" 2>/dev/null|grep -q vboxnetadp; then 286 292 begin_msg "Removing old VirtualBox netadp kernel module" … … 298 304 succ_msg 299 305 fi 300 begin_msg "Recompiling VirtualBox kernel module" 301 if ! $BUILDVBOXDRV \ 302 --save-module-symvers /tmp/vboxdrv-Module.symvers \ 303 --no-print-directory install > $LOG 2>&1; then 304 failure "Look at $LOG to find out what went wrong" 305 fi 306 if ! $BUILDVBOXNETFLT \ 307 --use-module-symvers /tmp/vboxdrv-Module.symvers \ 306 begin_msg "Trying to register the VirtualBox kernel modules using DKMS" 307 if ! $DODKMS install >> $LOG; then 308 fail_msg "Failed, trying without DKMS" 309 begin_msg "Recompiling VirtualBox kernel module" 310 if ! $BUILDVBOXDRV \ 311 --save-module-symvers /tmp/vboxdrv-Module.symvers \ 312 --no-print-directory install >> $LOG 2>&1; then 313 failure "Look at $LOG to find out what went wrong" 314 fi 315 if ! $BUILDVBOXNETFLT \ 316 --use-module-symvers /tmp/vboxdrv-Module.symvers \ 317 --no-print-directory install >> $LOG 2>&1; then 318 failure "Look at $LOG to find out what went wrong" 319 fi 320 if ! $BUILDVBOXNETADP \ 321 --use-module-symvers /tmp/vboxdrv-Module.symvers \ 308 322 --no-print-directory install >> $LOG 2>&1; then 309 failure "Look at $LOG to find out what went wrong" 310 fi 311 if ! $BUILDVBOXNETADP \ 312 --use-module-symvers /tmp/vboxdrv-Module.symvers \ 313 --no-print-directory install >> $LOG 2>&1; then 314 failure "Look at $LOG to find out what went wrong" 323 failure "Look at $LOG to find out what went wrong" 324 fi 315 325 fi 316 326 rm -f /etc/vbox/module_not_compiled
Note:
See TracChangeset
for help on using the changeset viewer.