Changeset 37088 in vbox for trunk/src/VBox/Installer/linux
- Timestamp:
- May 13, 2011 9:17:29 PM (14 years ago)
- Location:
- trunk/src/VBox/Installer/linux
- Files:
-
- 5 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/linux/Makefile.kmk
r36747 r37088 18 18 SUB_DEPTH = ../../../.. 19 19 include $(KBUILD_PATH)/subheader.kmk 20 21 # Include sub-makefile. 22 ifdef VBOX_WITH_TESTCASES 23 include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk 24 endif 20 25 21 26 ifneq ($(KBUILD_HOST),linux) … … 310 315 $(VBOX_LNX_INST_OUT_DIR)/vboxweb-service.sh \ 311 316 $(VBOX_LNX_INST_OUT_DIR)/install.sh \ 317 $(VBOX_PATH_LNX_INST_SRC)/installer-utils.sh \ 312 318 $(VBOX_PATH_LNX_INST_SRC)/vboxdrv-pardus.py \ 313 319 $(VBOX_PATH_LNX_INST_SRC)/uninstall.sh \ … … 357 363 $< 358 364 359 $(VBOX_LNX_INST_OUT_DIR)/install.sh: $(VBOX_PATH_LNX_INST_SRC)/install.sh $(VBOX_ VERSION_STAMP) $(VBOX_SVN_REV_KMK).ts | $$(dir $$@)365 $(VBOX_LNX_INST_OUT_DIR)/install.sh: $(VBOX_PATH_LNX_INST_SRC)/install.sh $(VBOX_PATH_LNX_INST_SRC)/installer-utils.sh $(VBOX_VERSION_STAMP) $(VBOX_SVN_REV_KMK).ts | $$(dir $$@) 360 366 $(QUIET)$(SED) \ 361 367 -e "s;_VERSION_;$(VBOX_VERSION_STRING);g" \ … … 365 371 -e "s;_HARDENED_;$(VBOX_WITH_HARDENING);g" \ 366 372 -e "s;_PYTHON_;$(VBOX_WITH_PYTHON);g" \ 373 -e '/#include installer-utils.sh/ {' \ 374 -e "r $(PATH_ROOT)/src/VBox/Installer/linux/installer-utils.sh" \ 375 -e 'd' \ 376 -e '}' \ 367 377 --output $@ \ 368 378 $< -
trunk/src/VBox/Installer/linux/debian/postinst.in
r37087 r37088 17 17 # abort-remove: (our version): removing this package failed 18 18 # abort-deconfigure: (our version): error during resolving conflicts 19 20 #include installer-utils.sh 19 21 20 22 LOG="/var/log/vbox-install.log" … … 41 43 42 44 # install udev rule (disable with INSTALL_NO_UDEV=1 in /etc/default/virtualbox) 43 if [ -d /etc/udev/rules.d -a "$INSTALL_NO_UDEV" != "1" ]; then 44 udev_call="" 45 udev_app=`which udevadm 2> /dev/null` 46 if [ $? -eq 0 ]; then 47 udev_call="${udev_app} version 2> /dev/null" 48 else 49 udev_app=`which udevinfo 2> /dev/null` 50 if [ $? -eq 0 ]; then 51 udev_call="${udev_app} -V 2> /dev/null" 52 fi 53 fi 54 udev_fix="=" 55 if [ "${udev_call}" != "" ]; then 56 udev_out=`${udev_call}` 57 udev_ver=`expr "$udev_out" : '[^0-9]*\([0-9]*\)'` 58 if [ "$udev_ver" = "" -o "$udev_ver" -lt 55 ]; then 59 udev_fix="" 60 fi 61 fi 62 echo "KERNEL=${udev_fix}\"vboxdrv\", NAME=\"vboxdrv\", OWNER=\"root\", GROUP=\"root\", MODE=\"0600\"" \ 63 > /etc/udev/rules.d/10-vboxdrv.rules 64 if [ "$INSTALL_NO_GROUP" != "1" ]; then 65 usb_group=vboxusers 66 else 67 usb_group=root 68 fi 69 usb_createnode="/usr/share/virtualbox/VBoxCreateUSBNode.sh" 70 echo "SUBSYSTEM=${udev_fix}\"usb_device\", ACTION=${udev_fix}\"add\", RUN=\"${usb_createnode} \$major \$minor \$attr{bDeviceClass} ${usb_group}\"" \ 71 >> /etc/udev/rules.d/10-vboxdrv.rules 72 echo "SUBSYSTEM=${udev_fix}\"usb\", ACTION=${udev_fix}\"add\", ENV{DEVTYPE}==\"usb_device\", RUN=\"${usb_createnode} \$major \$minor \$attr{bDeviceClass} ${usb_group}\"" \ 73 >> /etc/udev/rules.d/10-vboxdrv.rules 74 echo "SUBSYSTEM=${udev_fix}\"usb_device\", ACTION=${udev_fix}\"remove\", RUN=\"${usb_createnode} --remove \$major \$minor\"" \ 75 >> /etc/udev/rules.d/10-vboxdrv.rules 76 echo "SUBSYSTEM=${udev_fix}\"usb\", ACTION=${udev_fix}\"remove\", ENV{DEVTYPE}==\"usb_device\", RUN=\"${usb_createnode} --remove \$major \$minor\"" \ 77 >> /etc/udev/rules.d/10-vboxdrv.rules 45 if [ "$INSTALL_NO_GROUP" != "1" ]; then 46 usb_group=vboxusers 47 else 48 usb_group=root 78 49 fi 79 # Remove old udev description file 80 if [ -f /etc/udev/rules.d/60-vboxdrv.rules ]; then 81 rm -f /etc/udev/rules.d/60-vboxdrv.rules 2> /dev/null 82 fi 50 install_udev_package ${usb_group} > /etc/udev/rules.d/10-vboxdrv.rules 83 51 # Build our device tree 84 52 for i in /sys/bus/usb/devices/*; do -
trunk/src/VBox/Installer/linux/debian/rules
r36895 r37088 340 340 cat debian/preinst.in | sed -e 's|%VER%|$(ver)|g' > debian/preinst 341 341 cat debian/prerm.in | sed -e 's|%VER%|$(ver)|g' > debian/prerm 342 cat debian/postinst.in | sed -e 's|%VER%|$(ver)|g' > debian/postinst 342 cat debian/postinst.in | \ 343 sed -e 's|%VER%|$(ver)|g' \ 344 -e '/#include installer-utils.sh/ {' \ 345 -e "r $(vboxroot)/src/VBox/Installer/linux/installer-utils.sh" \ 346 -e 'd' \ 347 -e '}' \ 348 > debian/postinst 343 349 dh_installdebconf 344 350 dh_installchangelogs -
trunk/src/VBox/Installer/linux/install.sh
r37087 r37088 18 18 PATH=$PATH:/bin:/sbin:/usr/sbin 19 19 20 # Source functions needed by the installer20 # Include routines and utilities needed by the installer 21 21 . ./routines.sh 22 #include installer-utils.sh 22 23 23 24 LOG="/var/log/vbox-install.log" … … 442 443 443 444 # Create udev description file 444 if [ -d /etc/udev/rules.d ]; then 445 udev_call="" 446 udev_app=`which udevadm 2> /dev/null` 447 if [ $? -eq 0 ]; then 448 udev_call="${udev_app} version 2> /dev/null" 449 else 450 udev_app=`which udevinfo 2> /dev/null` 451 if [ $? -eq 0 ]; then 452 udev_call="${udev_app} -V 2> /dev/null" 453 fi 454 fi 455 udev_fix="=" 456 if [ "${udev_call}" != "" ]; then 457 udev_out=`${udev_call}` 458 udev_ver=`expr "$udev_out" : '[^0-9]*\([0-9]*\)'` 459 if [ "$udev_ver" = "" -o "$udev_ver" -lt 55 ]; then 460 udev_fix="" 461 fi 462 fi 463 # Write udev rules 464 echo "KERNEL=${udev_fix}\"vboxdrv\", NAME=\"vboxdrv\", OWNER=\"root\", GROUP=\"$VBOXDRV_GRP\", MODE=\"$VBOXDRV_MODE\"" \ 465 > /etc/udev/rules.d/10-vboxdrv.rules 466 echo "SUBSYSTEM=${udev_fix}\"usb_device\", ACTION=${udev_fix}\"add\", RUN=\"$INSTALLATION_DIR/VBoxCreateUSBNode.sh \$major \$minor \$attr{bDeviceClass}\"" \ 467 >> /etc/udev/rules.d/10-vboxdrv.rules 468 echo "SUBSYSTEM=${udev_fix}\"usb\", ACTION=${udev_fix}\"add\", ENV{DEVTYPE}==\"usb_device\", RUN=\"$INSTALLATION_DIR/VBoxCreateUSBNode.sh \$major \$minor \$attr{bDeviceClass}\"" \ 469 >> /etc/udev/rules.d/10-vboxdrv.rules 470 echo "SUBSYSTEM=${udev_fix}\"usb_device\", ACTION=${udev_fix}\"remove\", RUN=\"$INSTALLATION_DIR/VBoxCreateUSBNode.sh --remove \$major \$minor\"" \ 471 >> /etc/udev/rules.d/10-vboxdrv.rules 472 echo "SUBSYSTEM=${udev_fix}\"usb\", ACTION=${udev_fix}\"remove\", ENV{DEVTYPE}==\"usb_device\", RUN=\"$INSTALLATION_DIR/VBoxCreateUSBNode.sh --remove \$major \$minor\"" \ 473 >> /etc/udev/rules.d/10-vboxdrv.rules 474 fi 475 # Remove old udev description file 476 if [ -f /etc/udev/rules.d/60-vboxdrv.rules ]; then 477 rm -f /etc/udev/rules.d/60-vboxdrv.rules 2> /dev/null 478 fi 445 install_udev_run "$VBOXDRV_GRP" "$VBOXDRV_MODE" "$INSTALLATION_DIR" \ 446 > /etc/udev/rules.d/10-vboxdrv.rules 479 447 480 448 # Build our device tree -
trunk/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec
r37087 r37088 219 219 220 220 %post 221 #include installer-utils.sh 222 221 223 LOG="/var/log/vbox-install.log" 222 224 … … 236 238 237 239 # install udev rule (disable with INSTALL_NO_UDEV=1 in /etc/default/virtualbox) 238 if [ -d /etc/udev/rules.d -a "$INSTALL_NO_UDEV" != "1" ]; then 239 udev_call="" 240 udev_app=`which udevadm 2> /dev/null` 241 if [ $? -eq 0 ]; then 242 udev_call="${udev_app} version 2> /dev/null" 243 else 244 udev_app=`which udevinfo 2> /dev/null` 245 if [ $? -eq 0 ]; then 246 udev_call="${udev_app} -V 2> /dev/null" 247 fi 248 fi 249 udev_fix="=" 250 if [ "${udev_call}" != "" ]; then 251 udev_out=`${udev_call}` 252 udev_ver=`expr "$udev_out" : '[^0-9]*\([0-9]*\)'` 253 if [ "$udev_ver" = "" -o "$udev_ver" -lt 55 ]; then 254 udev_fix="" 255 fi 256 fi 257 usb_createnode="/usr/share/virtualbox/VBoxCreateUSBNode.sh" 258 echo "KERNEL=${udev_fix}\"vboxdrv\", NAME=\"vboxdrv\", OWNER=\"root\", GROUP=\"root\", MODE=\"0600\"" \ 259 > /etc/udev/rules.d/10-vboxdrv.rules 260 echo "SUBSYSTEM=${udev_fix}\"usb_device\", ACTION=${udev_fix}\"add\", RUN=\"${usb_createnode} \$major \$minor \$attr{bDeviceClass}\"" \ 261 >> /etc/udev/rules.d/10-vboxdrv.rules 262 echo "SUBSYSTEM=${udev_fix}\"usb\", ACTION=${udev_fix}\"add\", ENV{DEVTYPE}==\"usb_device\", RUN=\"${usb_createnode} \$major \$minor \$attr{bDeviceClass}\"" \ 263 >> /etc/udev/rules.d/10-vboxdrv.rules 264 echo "SUBSYSTEM=${udev_fix}\"usb_device\", ACTION=${udev_fix}\"remove\", RUN=\"${usb_createnode} --remove \$major \$minor\"" \ 265 >> /etc/udev/rules.d/10-vboxdrv.rules 266 echo "SUBSYSTEM=${udev_fix}\"usb\", ACTION=${udev_fix}\"remove\", ENV{DEVTYPE}==\"usb_device\", RUN=\"${usb_createnode} --remove \$major \$minor\"" \ 267 >> /etc/udev/rules.d/10-vboxdrv.rules 268 fi 269 # Remove old udev description file 270 if [ -f /etc/udev/rules.d/60-vboxdrv.rules ]; then 271 rm -f /etc/udev/rules.d/60-vboxdrv.rules 2> /dev/null 272 fi 240 install_udev_package vboxusers > /etc/udev/rules.d/10-vboxdrv.rules 241 273 242 # Build our device tree 274 243 for i in /sys/bus/usb/devices/*; do -
trunk/src/VBox/Installer/linux/rpm/rules
r36782 r37088 171 171 -e 's|%INSTMOD%|$(instmod)|g' \ 172 172 -e 's|%LIBASOUND%|$(if $(filter lib64,$(rpmlib)),libasound.so.2()(64bit),libasound.so.2)|g' \ 173 -e '/#include installer-utils.sh/ {' \ 174 -e "r $(vboxroot)/src/VBox/Installer/linux/installer-utils.sh" \ 175 -e 'd' \ 176 -e '}' \ 173 177 rpm/VirtualBox.tmpl.spec > $(archdir)/VirtualBox.spec 174 178 sed \
Note:
See TracChangeset
for help on using the changeset viewer.