Sisyphus repository
Last update: 21 march 2019 | SRPMs: 17651 | Visits: 13246532
en ru br
ALT Linux repos
S:5.2.26-alt2
5.0: 3.0.4-alt0.M50.1
4.1: 2.1.4-alt0.M41.5
4.0:
+backports:1.6.6-alt0.M40.2

Group :: Emulators
RPM: virtualbox

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: virtualbox-4.2.16-alt4.patch
Download


 Config.kmk                                         | 18 +++++++++---
 configure                                          | 27 ++++++++++++-----
 include/VBox/ostypes.h                             |  2 ++
 .../Additions/common/VBoxGuestLib/Makefile.kmk     |  4 +--
 src/VBox/Additions/common/crOpenGL/Makefile.kmk    | 34 ++++++++++++----------
 src/VBox/Additions/common/crOpenGL/fakedri_drv.c   |  8 ++---
 src/VBox/Additions/x11/Installer/98vboxadd-xclient |  8 ++---
 src/VBox/Additions/x11/Makefile.kmk                |  4 +++
 src/VBox/Devices/Makefile.kmk                      |  6 ++--
 src/VBox/Devices/PC/Etherboot-src/core/nic.c       |  1 +
 src/VBox/Devices/PC/Etherboot-src/core/osloader.c  |  1 +
 src/VBox/Devices/testcase/Makefile.kmk             |  4 +++
 src/VBox/Frontends/VBoxBFE/Makefile.kmk            |  1 +
 src/VBox/Frontends/VBoxFB/Makefile.kmk             |  1 +
 src/VBox/Frontends/VBoxManage/Makefile.kmk         |  1 +
 src/VBox/Frontends/VBoxSDL/Makefile.kmk            |  1 +
 src/VBox/Frontends/VirtualBox/Makefile.kmk         |  1 +
 src/VBox/Frontends/VirtualBox/VirtualBox2.qrc      |  2 ++
 .../VirtualBox/src/globals/VBoxGlobal.cpp          |  2 ++
 src/VBox/GuestHost/OpenGL/Makefile.kmk             |  4 +++
 src/VBox/HostDrivers/VBoxPci/Makefile.kmk          |  2 +-
 src/VBox/Installer/common/virtualbox.desktop.in    |  2 ++
 src/VBox/Installer/linux/VBoxCreateUSBNode.sh      | 14 ++++++---
 src/VBox/Main/Makefile.kmk                         |  5 ++++
 src/VBox/Main/src-all/Global.cpp                   |  8 +++++
 src/VBox/Main/src-server/ApplianceImpl.cpp         |  2 ++
 src/VBox/Main/webservice/Makefile.kmk              |  1 +
 src/VBox/Main/xml/Settings.cpp                     |  1 +
 src/VBox/Main/xml/SettingsConverter.xsl            |  1 +
 src/VBox/Main/xml/VirtualBox-settings-common.xsd   |  2 ++
 src/VBox/Runtime/Makefile.kmk                      | 10 +++++--
 src/VBox/Runtime/r0drv/linux/the-linux-kernel.h    | 16 ++++++++--
 src/VBox/Runtime/r3/linux/semevent-linux.cpp       |  2 +-
 src/VBox/VMM/Makefile.kmk                          |  2 +-
 src/VBox/VMM/testcase/Makefile.kmk                 | 10 +++++--
 src/libs/xpcom18a4/Makefile.kmk                    |  4 +++
 src/libs/xpcom18a4/python/__init__.py              |  2 +-
 src/libs/xpcom18a4/python/components.py            |  2 +-
 38 files changed, 159 insertions(+), 57 deletions(-)
diff --git a/Config.kmk b/Config.kmk
index 429dfc8..9cc0691 100644
--- a/Config.kmk
+++ b/Config.kmk
@@ -56,6 +56,9 @@ PROPS_DLLS_ACCUMULATE_L      += INTERMEDIATES
 PROPS_SYSMODS_ACCUMULATE_L   += INTERMEDIATES
 PROPS_MISCBINS_ACCUMULATE_L  += INTERMEDIATES
 
+# path to the units
+KBUILD_UNIT_PATHS = $(PWD)/kBuild/units
+
 # Misc names used bye the install paths below.
 VBOX_PUEL_MANGLED_NAME := Oracle_VM_VirtualBox_Extension_Pack
 
@@ -1810,7 +1813,7 @@ VBOX_PATH_MAKECAB   ?= $(VBOX_PATH_CABSDK)/BIN/MAKECAB.EXE
 
 # We need to export YASM for OSE, but since it was converted to .zip we need to
 # allow for the location used by the zip to be properly cleaned up first.
-if1of ($(KBUILD_HOST).$(KBUILD_HOST_ARCH), linux.x86 solaris.x86 win.x86)
+if1of ($(KBUILD_HOST).$(KBUILD_HOST_ARCH), linux.x86 linux.amd64 solaris.x86 win.x86)
  PATH_TOOL_YASM ?= $(PATH_DEVTOOLS_BLD)/bin
 endif
 
@@ -2738,7 +2741,14 @@ if1of ($(KBUILD_TARGET), linux)
    ifneq ($(kernelpath),)
     VBOX_LINUX_INCS += $(VBOX_LINUX_SRC)/include2 $(kernelpath)/include
    else
-    kernelpath := $(VBOX_LINUX_SRC)
+    # 2.6.25 format for splitted sources
+    kernelsrc := $(shell $(SED_EXT) -ne 's+^MAKEARGS := -C++p' $(VBOX_LINUX_SRC)/Makefile)
+    ifneq ($(kernelsrc),)
+     kernelpath := $(realpath $(VBOX_LINUX_SRC)/$(kernelsrc))
+     VBOX_LINUX_INCS                 += $(VBOX_LINUX_SRC)/include2 $(kernelpath)/include
+    else
+     kernelpath := $(VBOX_LINUX_SRC)
+    endif
    endif
    #
    VBOX_LINUX_INCS  += $(kernelpath)/include/asm-i386/mach-default \
@@ -4523,7 +4533,7 @@ TEMPLATE_VBOXBLDPROG_LDFLAGS.sparc32     = -m32
 TEMPLATE_VBOXBLDPROG_LDFLAGS.amd64       = -m64
 TEMPLATE_VBOXBLDPROG_LDFLAGS.sparc64     = -m64
  ifeq ($(KBUILD_HOST),linux)
-TEMPLATE_VBOXBLDPROG_LIBS                = pthread m rt dl
+TEMPLATE_VBOXBLDPROG_LIBS                = pthread m rt dl crypt
  else ifeq ($(KBUILD_HOST),os2)
 TEMPLATE_VBOXBLDPROG_TOOL                = GXX3OMF
 TEMPLATE_VBOXBLDPROG_LIBS                = socket iconv
@@ -5301,7 +5311,7 @@ else
 	/usr/lib/jvm/java \
 	\
 	/usr/lib/jvm/sun-jdk-1.6 \
-	) /usr/lib/jvm/java-6-sun)
+	) /usr/lib/jvm/java-1.6.0-sun)
   endif
  endif
 
diff --git a/configure b/configure
index b06069e..1e03354 100755
--- a/configure
+++ b/configure
@@ -93,6 +93,8 @@ WITH_VDE=0
 WITH_VNC=0
 WITH_EXTPACK=1
 WITH_DOCS=1
+WITH_ISO=0
+WITH_RUNINST=0
 BUILD_LIBXML2=
 BUILD_LIBCURL=
 BUILD_LIBSSL=
@@ -120,7 +122,7 @@ LIBXCURSOR="-lXcursor"
 LIBXMU="-lXmu"
 LIBXINERAMA="-lXinerama"
 LIBXRANDR="-lXrandr"
-MAKESELF="makeself"
+MAKESELF="makeself.sh"
 MESA="-lGL"
 INCZ=""
 LIBZ="-lz"
@@ -1826,10 +1828,8 @@ EOF
   echo "$CC -m32 -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.c" >> $LOG
   $CC -m32 -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.c >> $LOG 2>&1
   if [ $? -ne 0 ]; then
-    echo
-    echo "  Cannot compile 32-bit applications (missing headers and/or libraries)!"
-    echo "  Check the file $LOG for detailed error information."
-    fail
+    cnf_append "VBOX_WITHOUT_BIARCH" "1"
+    log_success "no"
   else
     echo "executing the binary" >> $LOG
     $ODIR.tmp_out 2> $ODIR.test_execute.log
@@ -1843,7 +1843,6 @@ EOF
       return 1
     fi
   fi
-  log_success ""
 }
 
 
@@ -2177,6 +2176,8 @@ EOF
 [ $OSE          -eq 1 ] && echo "  --enable-vnc             enable the VNC server"
 [ $OSE          -eq 0 ] && echo "  --disable-extpack        don't build the extpack"
 [ $WITH_DOCS    -eq 1 ] && echo "  --disable-docs           don't build the documentation"
+[ $WITH_ISO     -eq 0 ] && echo "  --enable-addtitions-iso  generate guest additions iso image"
+[ $WITH_RUNINST -eq 0 ] && echo "  --enable-run-installer   generate guest additions run installer"
 [ "$OS" = "linux" -o "$OS" = "freebsd" ] && echo "  --enable-vde             enable VDE networking"
 cat << EOF
   --disable-udptunnel      disable UDP tunnel networking
@@ -2359,6 +2360,12 @@ for option in $*; do
     --disable-docs)
       WITH_DOCS=0
       ;;
+    --enable-addtitions-iso)
+      WITH_ISO=1
+      ;;
+    --enable-run-installer)
+      WITH_RUNINST=1
+      ;;
     --enable-hardening)
       WITH_HARDENING=2
       ;;
@@ -2542,6 +2549,10 @@ fi
 [ $WITH_HARDENING -eq 0 ] && cnf_append "VBOX_WITHOUT_HARDENING" "1"
 [ $WITH_HARDENING -eq 2 ] && cnf_append "VBOX_WITH_HARDENING" "2"
 [ $WITH_VMMRAW    -eq 0 ] && cnf_append "VBOX_WITH_RAW_MODE" ""
+[ $WITH_ISO       -eq 0 ] && cnf_append "VBOX_WITHOUT_ADDITIONS_ISO" "1"
+[ $WITH_ISO       -eq 1 ] && cnf_append "VBOX_WITHOUT_ADDITIONS_ISO" ""
+[ $WITH_RUNINST   -eq 0 ] && cnf_append "VBOX_NO_LINUX_RUN_INSTALLER" "1"
+[ $WITH_RUNINST   -eq 1 ] && cnf_append "VBOX_NO_LINUX_RUN_INSTALLER" ""
 
 # Darwin-specific
 if [ "$OS" = "darwin" ]; then
@@ -2554,7 +2565,7 @@ check_open_watcom
 # don't check for yasm for the time beeing as 0.40 and 0.50 both have known bugs
 # [ "$OS" != "darwin" ] && check_yasm
 [ "$OS" != "darwin"  ] && check_xsltproc
-[ "$OS" != "darwin"  ] && check_mkisofs
+[ "$OS" != "darwin" -a "$WITH_ISO" -eq 1 ] && check_mkisofs
 
 # the libraries
 [ "$OS" != "darwin"  ] && check_pthread
@@ -2616,7 +2627,7 @@ if [ "$OS" = "linux" ]; then
   check_compiler_h
   [ "$BUILD_MACHINE" = "amd64" -a $WITH_VMMRAW -eq 1 ] && check_32bit
   # tools/common/makeself*
-  [ $OSE -ge 1 ] && check_makeself
+  [ $OSE -ge 1 -a $WITH_RUNINST -eq 1 ] && check_makeself
 fi
 
 [ -n "$SETUP_WINE" ] && setup_wine
diff --git a/include/VBox/ostypes.h b/include/VBox/ostypes.h
index 6d64c41..aa04690 100644
--- a/include/VBox/ostypes.h
+++ b/include/VBox/ostypes.h
@@ -101,6 +101,8 @@ typedef enum VBOXOSTYPE
     VBOXOSTYPE_Xandros_x64      = 0x5D100,
     VBOXOSTYPE_Oracle           = 0x5E000,
     VBOXOSTYPE_Oracle_x64       = 0x5E100,
+    VBOXOSTYPE_ALTLinux         = 0x5F000,
+    VBOXOSTYPE_ALTLinux_x64     = 0x5F100,
     VBOXOSTYPE_FreeBSD          = 0x60000,
     VBOXOSTYPE_FreeBSD_x64      = 0x60100,
     VBOXOSTYPE_OpenBSD          = 0x61000,
diff --git a/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk b/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk
index ed8c689..98c1aa5 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk
+++ b/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk
@@ -40,8 +40,8 @@ LIBRARIES += \
 	VBoxGuestR3LibShared
 ifndef VBOX_ONLY_TESTSUITE
  if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd)
-  LIBRARIES += \
-  	VBoxGuestR3LibXFree86
+#  LIBRARIES += \
+#  	VBoxGuestR3LibXFree86
  endif
 endif
 LIBRARIES.win.amd64 += VBoxGuestR3Lib-x86 VBoxGuestR3LibShared-x86
diff --git a/src/VBox/Additions/common/crOpenGL/Makefile.kmk b/src/VBox/Additions/common/crOpenGL/Makefile.kmk
index 4f3b925..ff3db25 100644
--- a/src/VBox/Additions/common/crOpenGL/Makefile.kmk
+++ b/src/VBox/Additions/common/crOpenGL/Makefile.kmk
@@ -63,18 +63,11 @@ VBoxOGL_TEMPLATE       = VBOXCROGLR3GUESTDLL
 VBoxOGL_INCS           = .
 if1of ($(KBUILD_TARGET), linux solaris freebsd)
  VBoxOGL_INCS     += \
-	$(VBOX_PATH_X11_ROOT)/libXdamage-1.1 \
-	$(VBOX_PATH_X11_ROOT)/libXcomposite-0.4.0 \
-	$(VBOX_PATH_X11_ROOT)/libXext-1.3.1 \
-	$(VBOX_PATH_X11_ROOT)/libXfixes-4.0.3 \
-	$(VBOX_PATH_X11_ROOT)/damageproto-1.1.0 \
-	$(VBOX_PATH_X11_ROOT)/compositeproto-0.4 \
-	$(VBOX_PATH_X11_ROOT)/fixesproto-4.0 \
-	$(VBOX_PATH_X11_ROOT)/libx11-1.1.5-other \
-	$(VBOX_PATH_X11_ROOT)/xextproto-7.1.1 \
-	$(VBOX_PATH_X11_ROOT)/xproto-7.0.18 \
+	/usr/include/X11 \
+	/usr/include/xorg \
+	/usr/include/pixman-1 \
 	$(VBOX_MESA_INCS) \
-	$(PATH_ROOT)/src/VBox/Additions/x11/x11include/libdrm-2.4.13
+	/usr/include/libdrm
  VBoxOGL_DEFS     += VBOX_NO_NATIVEGL
 endif
 
@@ -197,6 +190,8 @@ if1of ($(KBUILD_TARGET), linux solaris)
  	$(VBOX_PATH_CROGL_GENFILES)/solaris_glxapi_exports.asm
  endif
 endif
+VBoxOGL_LDFLAGS.linux = \
+	-Wl,-rpath,$(VBOXDIR)/additions
 VBoxOGL_LIBS = \
 	$(VBOX_LIB_IPRT_GUEST_R3_SHARED) \
 	$(VBOX_LIB_VBGL_R3_SHARED) \
@@ -204,10 +199,11 @@ VBoxOGL_LIBS = \
 	$(PATH_STAGE_LIB)/additions/VBoxOGLspuload$(VBOX_SUFF_LIB)
 if1of ($(KBUILD_TARGET), linux solaris freebsd)
  VBoxOGL_LIBS += \
- 	$(PATH_STAGE_LIB)/libXcomposite.so \
- 	$(PATH_STAGE_LIB)/libXdamage.so \
- 	$(PATH_STAGE_LIB)/libXfixes.so \
- 	$(PATH_STAGE_LIB)/libXext.so
+ 	GL \
+ 	Xcomposite \
+ 	Xdamage \
+ 	Xfixes \
+ 	Xext
  ifdef VBoxOGL_FAKEDRI
   VBoxOGL_LIBS += \
   	dl
@@ -405,6 +401,8 @@ VBoxOGLarrayspu_SOURCES       = \
 VBoxOGLarrayspu_SOURCES.win   = \
 	array/arrayspu.def \
 	array/arrayspu.rc
+VBoxOGLarrayspu_LDFLAGS.linux = \
+	-Wl,-rpath,$(VBOXDIR)/additions
 VBoxOGLarrayspu_LIBS          = \
 	$(VBOX_LIB_OGL_CRUTIL) \
 	$(PATH_STAGE_LIB)/additions/VBoxOGLspuload$(VBOX_SUFF_LIB) \
@@ -451,6 +449,8 @@ VBoxOGLpassthroughspu_SOURCES.win = \
 	passthrough/passthroughspu.rc
 VBoxOGLpassthroughspu_CLEAN       = \
 	$(VBOX_PATH_CROGL_GENFILES)/passthroughspu.c
+VBoxOGLpassthroughspu_LDFLAGS.linux = \
+	-Wl,-rpath,$(VBOXDIR)/additions
 VBoxOGLpassthroughspu_LIBS        = \
 	$(VBOX_LIB_OGL_CRUTIL)
 ifdef VBOX_WITH_CRHGSMI
@@ -524,6 +524,8 @@ VBoxOGLpackspu_CLEAN       = \
 	$(VBOX_PATH_CROGL_GENFILES)/packspu_get.c \
 	$(VBOX_PATH_CROGL_GENFILES)/packspu_flush.c \
 	$(VBOX_PATH_CROGL_GENFILES)/packspu_beginend.c
+VBoxOGLpackspu_LDFLAGS.linux = \
+	-Wl,-rpath,$(VBOXDIR)/additions
 VBoxOGLpackspu_LIBS        = \
 	$(VBOX_LIB_OGL_CRUTIL) \
 	$(PATH_STAGE_LIB)/additions/VBoxOGLspuload$(VBOX_SUFF_LIB) \
@@ -602,6 +604,8 @@ VBoxOGLfeedbackspu_CLEAN       = \
 	$(VBOX_PATH_CROGL_GENFILES)/feedbackspu_proto.h \
 	$(VBOX_PATH_CROGL_GENFILES)/feedbackspu.c \
 	$(VBOX_PATH_CROGL_GENFILES)/feedbackspu_state.c
+VBoxOGLfeedbackspu_LDFLAGS.linux = \
+	-Wl,-rpath,$(VBOXDIR)/additions
 VBoxOGLfeedbackspu_LIBS        = \
 	$(VBOX_LIB_OGL_CRUTIL) \
 	$(PATH_STAGE_LIB)/additions/VBoxOGLspuload$(VBOX_SUFF_LIB) \
diff --git a/src/VBox/Additions/common/crOpenGL/fakedri_drv.c b/src/VBox/Additions/common/crOpenGL/fakedri_drv.c
index 0a5ef23..7730226 100644
--- a/src/VBox/Additions/common/crOpenGL/fakedri_drv.c
+++ b/src/VBox/Additions/common/crOpenGL/fakedri_drv.c
@@ -50,11 +50,11 @@ typedef enum {
 
 //@todo this could be different...
 #ifdef RT_ARCH_AMD64
-# define DRI_DEFAULT_DRIVER_DIR "/usr/lib64/dri:/usr/lib/dri:/usr/lib/x86_64-linux-gnu/dri"
-# define DRI_XORG_DRV_DIR "/usr/lib/xorg/modules/drivers/"
+# define DRI_DEFAULT_DRIVER_DIR "/usr/lib64/X11/modules/dri:/usr/lib64/dri:/usr/lib/dri:/usr/lib/x86_64-linux-gnu/dri"
+# define DRI_XORG_DRV_DIR "/usr/lib64/X11/modules/drivers/"
 #else
-# define DRI_DEFAULT_DRIVER_DIR "/usr/lib/dri:/usr/lib/i386-linux-gnu/dri"
-# define DRI_XORG_DRV_DIR "/usr/lib/xorg/modules/drivers/"
+# define DRI_DEFAULT_DRIVER_DIR "/usr/lib/X11/modules/dri:/usr/lib/dri:/usr/lib/i386-linux-gnu/dri"
+# define DRI_XORG_DRV_DIR "/usr/lib/X11/modules/drivers/"
 #endif
 
 #ifdef DEBUG_DRI_CALLS
diff --git a/src/VBox/Additions/x11/Installer/98vboxadd-xclient b/src/VBox/Additions/x11/Installer/98vboxadd-xclient
index 03b38b4..f048c70 100755
--- a/src/VBox/Additions/x11/Installer/98vboxadd-xclient
+++ b/src/VBox/Additions/x11/Installer/98vboxadd-xclient
@@ -42,11 +42,11 @@ then
     no_display=1
 fi
 
-/usr/bin/VBoxClient --clipboard
-/usr/bin/VBoxClient --checkhostversion
+/usr/bin/VBoxClient --clipboard || true
+/usr/bin/VBoxClient --checkhostversion || true
 test -z "$no_display" &&
-    /usr/bin/VBoxClient --display
+    /usr/bin/VBoxClient --display || true
 test -z "$no_display" &&
-    /usr/bin/VBoxClient --seamless
+    /usr/bin/VBoxClient --seamless || true
 test -z "$no_display" &&
     /usr/bin/VBoxClient --draganddrop
diff --git a/src/VBox/Additions/x11/Makefile.kmk b/src/VBox/Additions/x11/Makefile.kmk
index 4413783..c9dd0c0 100644
--- a/src/VBox/Additions/x11/Makefile.kmk
+++ b/src/VBox/Additions/x11/Makefile.kmk
@@ -17,6 +17,10 @@
 SUB_DEPTH = ../../../..
 include $(KBUILD_PATH)/subheader.kmk
 
+ifn1of ($(XSERVER_VERSION), 13 14 15 16 17 18 19 110 111 112)
+ XSERVER_VERSION := 112
+endif
+
 # Include sub-makefiles.
 if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris)
  include $(PATH_SUB_CURRENT)/VBoxClient/Makefile.kmk
diff --git a/src/VBox/Devices/Makefile.kmk b/src/VBox/Devices/Makefile.kmk
index 8933584..e93b37f 100644
--- a/src/VBox/Devices/Makefile.kmk
+++ b/src/VBox/Devices/Makefile.kmk
@@ -110,7 +110,7 @@ if !defined(VBOX_ONLY_EXTPACKS)         # Goes on almost to the end of the file.
   endif
  endif
 
- VBoxDDU_LDFLAGS.linux    = -Wl,--no-undefined
+ VBoxDDU_LDFLAGS.linux    = -Wl,-rpath,$(VBOXDIR)
  VBoxDDU_LDFLAGS.l4       = -Wl,--no-undefined
 
  #
@@ -212,7 +212,7 @@ if !defined(VBOX_ONLY_EXTPACKS)         # Goes on almost to the end of the file.
  	-framework IOKit \
  	-framework Carbon \
  	-framework DiskArbitration
- VBoxDD_LDFLAGS.linux    = -Wl,--no-undefined
+ VBoxDD_LDFLAGS.linux    = -Wl,-rpath,$(VBOXDIR)
  VBoxDD_LDFLAGS.l4       = -Wl,--no-undefined
 
  # --- Tracing bits. ---
@@ -928,7 +928,7 @@ if !defined(VBOX_ONLY_EXTPACKS)         # Goes on almost to the end of the file.
  endif
  VBoxDD2_LIBS.darwin    += $(LIB_REM)
  VBoxDD2_LDFLAGS.darwin  = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDD2.dylib
- VBoxDD2_LDFLAGS.linux   = -Wl,--no-undefined
+ VBoxDD2_LDFLAGS.linux   = -Wl,-rpath,$(VBOXDIR)
  VBoxDD2_LDFLAGS.l4      = -Wl,--no-undefined
 
  ifdef VBOX_WITH_PXE_ROM
diff --git a/src/VBox/Devices/PC/Etherboot-src/core/nic.c b/src/VBox/Devices/PC/Etherboot-src/core/nic.c
index 4844eed..7cf668b 100644
--- a/src/VBox/Devices/PC/Etherboot-src/core/nic.c
+++ b/src/VBox/Devices/PC/Etherboot-src/core/nic.c
@@ -478,6 +478,7 @@ int eth_load(struct dev *dev __unused)
 	}
 	interruptible_sleep(2);		/* lay off the server for a while */
 	longjmp(restart_etherboot, -1);
+	return 0;
 }
 
 
diff --git a/src/VBox/Devices/PC/Etherboot-src/core/osloader.c b/src/VBox/Devices/PC/Etherboot-src/core/osloader.c
index 3e067eb..28e36b0 100644
--- a/src/VBox/Devices/PC/Etherboot-src/core/osloader.c
+++ b/src/VBox/Devices/PC/Etherboot-src/core/osloader.c
@@ -81,6 +81,7 @@ dead_download - Restart etherboot if probe image fails
 **************************************************************************/
 static sector_t dead_download ( unsigned char *data __unused, unsigned int len __unused, int eof __unused) {
         longjmp(restart_etherboot, -2);
+		return 0;
 }
 
 #ifdef	IMAGE_MULTIBOOT
diff --git a/src/VBox/Devices/testcase/Makefile.kmk b/src/VBox/Devices/testcase/Makefile.kmk
index 58f5e99..7050aa4 100644
--- a/src/VBox/Devices/testcase/Makefile.kmk
+++ b/src/VBox/Devices/testcase/Makefile.kmk
@@ -62,9 +62,11 @@ ifdef VBOX_WITH_RAW_MODE
  #
  # The testcase generator.
  #
+ifndef VBOX_WITHOUT_BIARCH
  PROGRAMS += tstDeviceStructSizeRC
  tstDeviceStructSizeRC_TEMPLATE  = VBoxRcExe
  tstDeviceStructSizeRC_DEFS      = $(VBOX_DEVICES_TESTS_FEATURES)
+endif
  tstDeviceStructSizeRC_SOURCES   = tstDeviceStructSizeRC.cpp
  tstDeviceStructSizeRC_INCS      = \
  	$(VBOX_PATH_DEVICES_SRC)/build \
@@ -75,7 +77,9 @@ endif # VBOX_WITH_RAW_MODE
 #
 # The testcase it self.
 #
+ifndef VBOX_WITHOUT_BIARCH
 PROGRAMS += tstDeviceStructSize
+endif
 tstDeviceStructSize_TEMPLATE = VBOXR3AUTOTST
 tstDeviceStructSize_DEFS     = $(VBOX_DEVICES_TESTS_FEATURES)
 tstDeviceStructSize_INCS     = \
diff --git a/src/VBox/Frontends/VBoxBFE/Makefile.kmk b/src/VBox/Frontends/VBoxBFE/Makefile.kmk
index 9348c16..3128c86 100644
--- a/src/VBox/Frontends/VBoxBFE/Makefile.kmk
+++ b/src/VBox/Frontends/VBoxBFE/Makefile.kmk
@@ -118,6 +118,7 @@ endif
 VBoxBFE_LIBS.darwin = \
 	$(LIB_SDK_LIBSDL_SDLMAIN)
 VBoxBFE_LDFLAGS.darwin = -framework Foundation -framework AppKit
+VBoxBFE_LDFLAGS.linux  = -Wl,-rpath,$(VBOXDIR)
 
 ## @todo why is it all this cool stuff here only for linux? If it's important, -fshort-wchar would apply to all GCC platforms.
 VBoxBFE_DEFS.linux = \
diff --git a/src/VBox/Frontends/VBoxFB/Makefile.kmk b/src/VBox/Frontends/VBoxFB/Makefile.kmk
index 65bbae8..69fd29a 100644
--- a/src/VBox/Frontends/VBoxFB/Makefile.kmk
+++ b/src/VBox/Frontends/VBoxFB/Makefile.kmk
@@ -36,6 +36,7 @@ VBoxFB_INCS     = $(VBOX_XPCOM_INCS) /usr/include/directfb
 VBoxFB_LIBPATH  = $(LIBPATH_XPCOM)
 VBoxFB_LIBS     = $(LIB_XPCOM) $(LIB_RUNTIME) directfb
 VBoxFB_DEPS     = $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
+VBoxFB_LDFLAGS.linux = -Wl,-rpath,$(VBOXDIR)
 
 # generate rules.
 include $(FILE_KBUILD_SUB_FOOTER)
diff --git a/src/VBox/Frontends/VBoxManage/Makefile.kmk b/src/VBox/Frontends/VBoxManage/Makefile.kmk
index 4f7c9e8..94bc7d2 100644
--- a/src/VBox/Frontends/VBoxManage/Makefile.kmk
+++ b/src/VBox/Frontends/VBoxManage/Makefile.kmk
@@ -90,5 +90,6 @@ ifneq ($(KBUILD_TARGET),win)
 	$(if $(VBOX_GCC_VERSION_CXX),$(if-expr $(VBOX_GCC_VERSION_CXX) < 40300 || $(VBOX_GCC_VERSION_CXX) > 40301,,--param max-fields-for-field-sensitive=0),)
  VBoxManageHelp_CXXFLAGS.release = $(VBoxManage_CXXFLAGS.release)
 endif
+VBoxManage_LDFLAGS.linux = -Wl,-rpath,$(VBOXDIR)
 
 include $(FILE_KBUILD_SUB_FOOTER)
diff --git a/src/VBox/Frontends/VBoxSDL/Makefile.kmk b/src/VBox/Frontends/VBoxSDL/Makefile.kmk
index 42cc2cd..648755f 100644
--- a/src/VBox/Frontends/VBoxSDL/Makefile.kmk
+++ b/src/VBox/Frontends/VBoxSDL/Makefile.kmk
@@ -93,6 +93,7 @@ endif
 
 VBoxSDL_LDFLAGS.darwin = \
 	-framework Foundation -framework AppKit
+VBoxSDL_LDFLAGS.linux  = -Wl,-rpath,$(VBOXDIR)
 
 VBoxSDL_CLEAN = $(VBoxSDL_0_OUTDIR)/Ico64x01.h
 VBoxSDL_INTERMEDIATES = $(VBoxSDL_0_OUTDIR)/Ico64x01.h
diff --git a/src/VBox/Frontends/VirtualBox/Makefile.kmk b/src/VBox/Frontends/VirtualBox/Makefile.kmk
index f9d5479..6a1fbf7 100644
--- a/src/VBox/Frontends/VirtualBox/Makefile.kmk
+++ b/src/VBox/Frontends/VirtualBox/Makefile.kmk
@@ -738,6 +738,7 @@ if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
 endif
 
 # Pull in the ui files
+VirtualBox_LDFLAGS.linux  = -Wl,-rpath,$(VBOXDIR)
 $(eval VirtualBox_SOURCES += $(FORMS))
 
 # Resource files with some OSE differences (VirtualBoxBrand.qrc is created further down).
diff --git a/src/VBox/Frontends/VirtualBox/VirtualBox2.qrc b/src/VBox/Frontends/VirtualBox/VirtualBox2.qrc
index 4523dad..c7928d7 100644
--- a/src/VBox/Frontends/VirtualBox/VirtualBox2.qrc
+++ b/src/VBox/Frontends/VirtualBox/VirtualBox2.qrc
@@ -1,5 +1,7 @@
 <RCC>
     <qresource prefix="/">
+    <file alias="os_altlinux.png">images/os_altlinux.png</file>
+    <file alias="os_altlinux_64.png">images/os_altlinux_64.png</file>
         <file alias="os_archlinux.png">images/os_archlinux.png</file>
         <file alias="os_archlinux_64.png">images/os_archlinux_64.png</file>
         <file alias="os_debian.png">images/os_debian.png</file>
diff --git a/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp b/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
index caa9eaa..42e2150 100644
--- a/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
@@ -4582,6 +4582,8 @@ void VBoxGlobal::init()
         {"Linux24_64",      ":/os_linux24_64.png"},
         {"Linux26",         ":/os_linux26.png"},
         {"Linux26_64",      ":/os_linux26_64.png"},
+        {"ALTLinux",        ":/os_altlinux.png"},
+        {"ALTLinux_64",     ":/os_altlinux_64.png"},
         {"ArchLinux",       ":/os_archlinux.png"},
         {"ArchLinux_64",    ":/os_archlinux_64.png"},
         {"Debian",          ":/os_debian.png"},
diff --git a/src/VBox/GuestHost/OpenGL/Makefile.kmk b/src/VBox/GuestHost/OpenGL/Makefile.kmk
index 4925a4d..aef8cff 100644
--- a/src/VBox/GuestHost/OpenGL/Makefile.kmk
+++ b/src/VBox/GuestHost/OpenGL/Makefile.kmk
@@ -86,6 +86,8 @@ VBoxOGLcrutil_LIBS.win = \
 	$(PATH_SDK_$(VBOX_WINDDK)_LIB)/ddraw.lib \
 	$(PATH_SDK_$(VBOX_WINDDK)_LIB)/dxguid.lib \
 	$(PATH_SDK_$(VBOX_WINDDK)_LIB)/shlwapi.lib
+VBoxOGLcrutil_LIBS.linux = \
+	dl
 VBoxOGLcrutil_LIBS = \
 	$(VBOX_LIB_IPRT_GUEST_R3_SHARED) \
 	$(VBOX_LIB_VBGL_R3_SHARED)
@@ -603,6 +605,8 @@ VBoxOGLerrorspu_SOURCES.win.x86 = \
 	error/errorspu.rc
 VBoxOGLerrorspu_CLEAN = \
 	$(VBOX_PATH_CROGL_GENFILES)/errorspu.c
+VBoxOGLerrorspu_LDFLAGS.linux = \
+	-Wl,-rpath,$(VBOXDIR)/additions
 VBoxOGLerrorspu_LIBS = \
 	$(VBOX_LIB_OGL_CRUTIL)
 ifdef VBOX_WITH_CRHGSMI
diff --git a/src/VBox/HostDrivers/VBoxPci/Makefile.kmk b/src/VBox/HostDrivers/VBoxPci/Makefile.kmk
index d0c580c..1e1c220 100644
--- a/src/VBox/HostDrivers/VBoxPci/Makefile.kmk
+++ b/src/VBox/HostDrivers/VBoxPci/Makefile.kmk
@@ -40,7 +40,7 @@ if1of ($(KBUILD_TARGET), linux)
  	VBoxPci.c
   VBoxPci_LIBS          += \
  	$(PATH_STAGE_LIB)/SUPR0IdcClient$(VBOX_SUFF_LIB)
- endif
+ endif # VBOX_WITH_VBOXDRV
 
  #
  # Install the sources.
diff --git a/src/VBox/Installer/common/virtualbox.desktop.in b/src/VBox/Installer/common/virtualbox.desktop.in
index e87bb7f..f85f3d2 100644
--- a/src/VBox/Installer/common/virtualbox.desktop.in
+++ b/src/VBox/Installer/common/virtualbox.desktop.in
@@ -2,6 +2,7 @@
 Encoding=UTF-8
 Version=1.0
 Name=@VBOX_PRODUCT@
+Name[ru]=Виртуализатор VirtualBox
 GenericName=Virtual Machine
 Type=Application
 Exec=VirtualBox %U
@@ -14,5 +15,6 @@ Comment=Run several virtual systems on a single host computer
 Comment[de]=Mehrere virtuelle Maschinen auf einem einzigen Rechner ausführen
 Comment[it]=Esegui più macchine virtuali su un singolo computer
 Comment[pl]=Uruchamianie wielu systemów wirtualnych na jednym komputerze gospodarza
+Comment[ru]=Позволяет запускать несколько виртуальных систем на одном компьютере
 Comment[sv]=Kör flera virtuella system på en enda värddator
 Comment[ko]=가상 머신
diff --git a/src/VBox/Installer/linux/VBoxCreateUSBNode.sh b/src/VBox/Installer/linux/VBoxCreateUSBNode.sh
index ebf6254..b291a0c 100755
--- a/src/VBox/Installer/linux/VBoxCreateUSBNode.sh
+++ b/src/VBox/Installer/linux/VBoxCreateUSBNode.sh
@@ -21,13 +21,16 @@
 usb_class_hub=09
 
 do_remove=0
+do_create=0
 case "$1" in "--remove")
   do_remove=1; shift;;
+  "--create")
+  do_create=1; shift;;
 esac
-bus=`expr "$2" '/' 128 + 1`
-device=`expr "$2" '%' 128 + 1`
-class="$3"
-group="$4"
+bus=`expr "${2-0}" '/' 128 + 1`
+device=`expr "${2-0}" '%' 128 + 1`
+class="${3-0}"
+group="${4-}"
 devdir="`printf "/dev/vboxusb/%.3d" $bus`"
 devpath="`printf "/dev/vboxusb/%.3d/%.3d" $bus $device`"
 case "$do_remove" in
@@ -39,6 +42,9 @@ case "$do_remove" in
   case "$group" in "") group="vboxusers";; esac
   mkdir /dev/vboxusb -m 0750 2>/dev/null
   chown root:$group /dev/vboxusb 2>/dev/null
+  if test "$do_create" = "1"; then
+      exit 0
+  fi
   mkdir "$devdir" -m 0750 2>/dev/null
   chown root:$group "$devdir" 2>/dev/null
   mknod "$devpath" c $1 $2 -m 0660 2>/dev/null
diff --git a/src/VBox/Main/Makefile.kmk b/src/VBox/Main/Makefile.kmk
index 095f136..421afe0 100644
--- a/src/VBox/Main/Makefile.kmk
+++ b/src/VBox/Main/Makefile.kmk
@@ -267,6 +267,7 @@ endif
 
 VBoxSVC_LIBS += \
 	$(PATH_STAGE_LIB)/SSMStandalone$(VBOX_SUFF_LIB) \
+	$(LIB_RUNTIME) \
 	$(LIB_DDU)
 VBoxSVC_SDKS = VBOX_LIBPNG VBOX_ZLIB
 VBoxSVC_LIBS.solaris = \
@@ -384,6 +385,7 @@ ifdef VBOX_WITH_NETFLT
 	$(PATH_SDK_$(VBOX_WINPSDK)_LIB)/WbemUuid.Lib
 endif
 VBoxSVC_LDFLAGS.darwin    = -framework IOKit -framework SystemConfiguration
+VBoxSVC_LDFLAGS.linux     = -Wl,-rpath,$(VBOXDIR)
 
 ifdef VBOX_WITH_CROGL
  VBoxSVC_LIBS += $(PATH_STAGE_LIB)/VBoxOGLTest$(VBOX_SUFF_LIB)
@@ -502,6 +504,7 @@ VBoxSVCM_SOURCES        = \
 VBoxSVCM_LDFLAGS.darwin = \
 	-install_name $(VBOX_DYLD_EXECUTABLE_PATH)/components/VBoxSVCM.dylib \
 	-exported_symbols_list $(VBoxSVCM_0_OUTDIR)/VBoxSVCM.def
+VBoxSVCM_LDFLAGS.linux  = -Wl,-rpath,$(VBOXDIR)
  ifeq ($(KBUILD_TARGET),darwin)
 VBoxSVCM_ORDERDEPS     += $(VBoxSVCM_0_OUTDIR)/VBoxSVCM.def
 VBoxSVCM_CLEAN         += $(VBoxSVCM_0_OUTDIR)/VBoxSVCM.def
@@ -674,6 +677,8 @@ VBoxC_SOURCES += \
 	src-client/RemoteUSBBackend.cpp
 endif
 
+VBoxC_LDFLAGS.linux = -Wl,-rpath,$(VBOXDIR)
+
 ifdef VBOX_WITH_VPX
 VBoxC_SOURCES += \
 	src-client/EbmlWriter.cpp \
diff --git a/src/VBox/Main/src-all/Global.cpp b/src/VBox/Main/src-all/Global.cpp
index 2cd5a81..aff96c1 100644
--- a/src/VBox/Main/src-all/Global.cpp
+++ b/src/VBox/Main/src-all/Global.cpp
@@ -141,6 +141,14 @@ const Global::OSType Global::sOSTypes[] =
       VBOXOSTYPE_Linux26_x64,     VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
        256,   4,  8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
         StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97  },
+    { "Linux",   "Linux",             "ALTLinux",       "ALT Linux",
+      VBOXOSTYPE_ALTLinux,        VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
+       512,  12,  8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+        StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97  },
+    { "Linux",   "Linux",             "ALTLinux_64",    "ALT Linux (64 bit)",
+      VBOXOSTYPE_ALTLinux_x64,    VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
+       512,  12,  8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+        StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97  },
     { "Linux",   "Linux",             "ArchLinux",          "Arch Linux",
       VBOXOSTYPE_ArchLinux,       VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
        256,  12,  8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
diff --git a/src/VBox/Main/src-server/ApplianceImpl.cpp b/src/VBox/Main/src-server/ApplianceImpl.cpp
index 05fc3b6..c578853 100644
--- a/src/VBox/Main/src-server/ApplianceImpl.cpp
+++ b/src/VBox/Main/src-server/ApplianceImpl.cpp
@@ -111,6 +111,8 @@ g_osTypes[] =
     { ovf::CIMOSType_CIMOS_Linux_64,                             VBOXOSTYPE_Linux26_x64 },
 
     // types that we have support for but CIM doesn't
+    { ovf::CIMOSType_CIMOS_Linux_2_6_x,                          VBOXOSTYPE_ALTLinux },
+    { ovf::CIMOSType_CIMOS_Linux_2_6_x_64,                       VBOXOSTYPE_ALTLinux_x64 },
     { ovf::CIMOSType_CIMOS_Linux_2_6_x,                          VBOXOSTYPE_ArchLinux },
     { ovf::CIMOSType_CIMOS_Linux_2_6_x_64,                       VBOXOSTYPE_ArchLinux_x64 },
     { ovf::CIMOSType_CIMOS_Linux_2_6_x,                          VBOXOSTYPE_FedoraCore },
diff --git a/src/VBox/Main/webservice/Makefile.kmk b/src/VBox/Main/webservice/Makefile.kmk
index 7bc5bd5..1e60022 100644
--- a/src/VBox/Main/webservice/Makefile.kmk
+++ b/src/VBox/Main/webservice/Makefile.kmk
@@ -653,6 +653,7 @@ $(VBOXWEB_OUT_DIR)/gsoap_generate_all_ts \
 	$(call MSG_GENERATE,,lots of files,$(GSOAPH_RELEVANT))
 	$(RM) -f $@
 	$(REDIRECT) -C $(VBOXWEB_OUT_DIR) -- $(VBOX_SOAPCPP2) $(VBOXWEB_SOAPCPP2_SKIP_FILES) -L -2 -w -I$(VBOX_PATH_GSOAP_IMPORT) $(GSOAPH_RELEVANT)
+	sed -i.orig "s/cp->ptr = (void\*)new (\(.*\)\[n\])/cp->ptr = (void\*)new \1\[n\]/g" $(VBOXWEB_OUT_DIR)/soapC.cpp
 	$(APPEND) $@ done
 
 # copy the generated headers and stuff. This has to be a separate rule if we
diff --git a/src/VBox/Main/xml/Settings.cpp b/src/VBox/Main/xml/Settings.cpp
index 36eb327..c95b2e2 100644
--- a/src/VBox/Main/xml/Settings.cpp
+++ b/src/VBox/Main/xml/Settings.cpp
@@ -3407,6 +3407,7 @@ const struct {
     { "linux22", "Linux22" },
     { "linux24", "Linux24" },
     { "linux26", "Linux26" },
+    { "altlinux", "ALTLinux" },
     { "archlinux", "ArchLinux" },
     { "debian", "Debian" },
     { "opensuse", "OpenSUSE" },
diff --git a/src/VBox/Main/xml/SettingsConverter.xsl b/src/VBox/Main/xml/SettingsConverter.xsl
index 6043708..09912d8 100644
--- a/src/VBox/Main/xml/SettingsConverter.xsl
+++ b/src/VBox/Main/xml/SettingsConverter.xsl
@@ -747,6 +747,7 @@ Value '<xsl:value-of select="@type"/>' of 'HardDisk::type' attribute is invalid.
         <xsl:when test="@OSType='linux22'">Linux22</xsl:when>
         <xsl:when test="@OSType='linux24'">Linux24</xsl:when>
         <xsl:when test="@OSType='linux26'">Linux26</xsl:when>
+        <xsl:when test="@OSType='altlinux'">ALTLinux</xsl:when>
         <xsl:when test="@OSType='archlinux'">ArchLinux</xsl:when>
         <xsl:when test="@OSType='debian'">Debian</xsl:when>
         <xsl:when test="@OSType='opensuse'">OpenSUSE</xsl:when>
diff --git a/src/VBox/Main/xml/VirtualBox-settings-common.xsd b/src/VBox/Main/xml/VirtualBox-settings-common.xsd
index c960afa..c5faf04 100644
--- a/src/VBox/Main/xml/VirtualBox-settings-common.xsd
+++ b/src/VBox/Main/xml/VirtualBox-settings-common.xsd
@@ -134,6 +134,8 @@
   </xsd:restriction>
 </xsd:simpleType>
 
+    <xsd:enumeration value="ALTLinux"/>
+    <xsd:enumeration value="ALTLinux_64"/>
 
 <xsd:simpleType name="TAuthType">
   <xsd:restriction base="xsd:string">
diff --git a/src/VBox/Runtime/Makefile.kmk b/src/VBox/Runtime/Makefile.kmk
index 4259538..56ead7a 100644
--- a/src/VBox/Runtime/Makefile.kmk
+++ b/src/VBox/Runtime/Makefile.kmk
@@ -2021,8 +2021,7 @@ ifdef VBOX_WITH_RAW_MODE
   RuntimeRC_SOURCES += os2/sys0.asm
  endif
 
- if1of ($(KBUILD_TARGET), darwin solaris freebsd)
-  RuntimeRC_SOURCES += \
+ LIBGCC_MATH_SOURCES := \
  	common/math/gcc/adddi3.c \
  	common/math/gcc/anddi3.c \
  	common/math/gcc/ashldi3.c \
@@ -2042,6 +2041,13 @@ ifdef VBOX_WITH_RAW_MODE
  	common/math/gcc/udivdi3.c \
  	common/math/gcc/umoddi3.c \
  	common/math/gcc/xordi3.c
+
+ if1of ($(KBUILD_TARGET), darwin solaris freebsd)
+  RuntimeRC_SOURCES += $(LIBGCC_MATH_SOURCES)
+ else
+  ifdef VBOX_WITHOUT_BIARCH
+   RuntimeRC_SOURCES += $(LIBGCC_MATH_SOURCES)
+  endif
  endif
 
 
diff --git a/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h b/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
index 14c4c56..8351fd2 100644
--- a/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
+++ b/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
@@ -317,11 +317,21 @@ DECLINLINE(unsigned long) msecs_to_jiffies(unsigned int cMillies)
 #undef bool
 
 /*
- * There are post-2.6.24 kernels (confusingly with unchanged version number)
- * which eliminate macros which were marked as deprecated.
+ * The 2.6.25 kernel eliminates macros that were marked as deprecated and eliminates
+ * routine change_page_attr() in favor of the set_pages_* API.
  */
-#ifndef __attribute_used__
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
 #define __attribute_used__ __used
+
+static inline int my_change_page_attr(struct page *page, int numpages, pgprot_t prot)
+{
+	/* use the set_pages_* API */
+	if (pgprot_val(prot) & _PAGE_NX)
+		set_pages_nx(page, numpages);
+	set_pages_uc(page, numpages);
+	return 0;
+}
+#define change_page_attr(a,b,c) my_change_page_attr((a), (b), (c))
 #endif
 
 /**
diff --git a/src/VBox/Runtime/r3/linux/semevent-linux.cpp b/src/VBox/Runtime/r3/linux/semevent-linux.cpp
index 9982d3e..4e64bdb 100644
--- a/src/VBox/Runtime/r3/linux/semevent-linux.cpp
+++ b/src/VBox/Runtime/r3/linux/semevent-linux.cpp
@@ -104,7 +104,7 @@ struct RTSEMEVENTINTERNAL
 static long sys_futex(uint32_t volatile *uaddr, int op, int val, struct timespec *utime, int32_t *uaddr2, int val3)
 {
     errno = 0;
-    long rc = syscall(__NR_futex, uaddr, op, val, utime, uaddr2, val3);
+    long rc = syscall(SYS_futex, uaddr, op, val, utime, uaddr2, val3);
     if (rc < 0)
     {
         Assert(rc == -1);
diff --git a/src/VBox/VMM/Makefile.kmk b/src/VBox/VMM/Makefile.kmk
index af83b0e..2875531 100644
--- a/src/VBox/VMM/Makefile.kmk
+++ b/src/VBox/VMM/Makefile.kmk
@@ -250,7 +250,7 @@ VBoxVMM_LIBS += \
 
 VBoxVMM_LIBS.win = $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib
 VBoxVMM_LDFLAGS.win = /DELAYLOAD:dbghelp.dll
-VBoxVMM_LDFLAGS.linux = -Wl,--no-undefined
+VBoxVMM_LDFLAGS.linux = -Wl,-rpath,$(VBOXDIR)
 VBoxVMM_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxVMM.dylib
 VBoxVMM_LDFLAGS.solaris = -mimpure-text
 
diff --git a/src/VBox/VMM/testcase/Makefile.kmk b/src/VBox/VMM/testcase/Makefile.kmk
index 050728b..c0031be 100644
--- a/src/VBox/VMM/testcase/Makefile.kmk
+++ b/src/VBox/VMM/testcase/Makefile.kmk
@@ -21,9 +21,11 @@ include $(KBUILD_PATH)/subheader.kmk
 #
 # Target lists.
 #
-PROGRAMS   += tstVMStructSize tstAsmStructs
-ifdef VBOX_WITH_RAW_MODE
- PROGRAMS  += tstVMStructRC tstAsmStructsRC
+ifndef VBOX_WITHOUT_BIARCH
+ PROGRAMS   += tstVMStructSize tstAsmStructs
+ ifdef VBOX_WITH_RAW_MODE
+  PROGRAMS  += tstVMStructRC tstAsmStructsRC
+ endif
 endif
 if !defined(VBOX_ONLY_EXTPACKS) \
  && (   defined(VBOX_WITH_DTRACE_R3) \
@@ -77,9 +79,11 @@ BLDDIRS += $(VBOX_VMM_TESTCASE_OUT_DIR)
 #
 ifeq ($(KBUILD_TARGET),$(KBUILD_HOST))
  ifeq ($(filter-out x86.x86 amd64.amd64 x86.amd64, $(KBUILD_TARGET_ARCH).$(KBUILD_HOST_ARCH)),)
+  ifndef VBOX_WITHOUT_BIARCH
   OTHERS += \
 	$(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructs.run \
 	$(VBOX_VMM_TESTCASE_OUT_DIR)/tstVMStructSize.run
+  endif
  endif
 endif
 
diff --git a/src/libs/xpcom18a4/Makefile.kmk b/src/libs/xpcom18a4/Makefile.kmk
index ce0079f..a319300 100644
--- a/src/libs/xpcom18a4/Makefile.kmk
+++ b/src/libs/xpcom18a4/Makefile.kmk
@@ -1039,6 +1039,7 @@ VBoxXPCOM_LDFLAGS.solaris += -Wl,-z,allextract \
 #VBoxXPCOM_LIBS += $(LIB_RUNTIME_EF)
 #VBoxXPCOM_LDFLAGS = -Wl,--whole-archive $(VBoxXPCOM_LIBS) -Wl,--no-whole-archive $(LIB_RUNTIME)
 VBoxXPCOM_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxXPCOM.dylib
+VBoxXPCOM_LDFLAGS.linux  = -Wl,-rpath,$(VBOXDIR)
 
 ifdef VBOX_IPC_RELEASE_LOG
 IPC_LOGGING = 1
@@ -1119,7 +1120,9 @@ VBoxXPCOMIPCC_SOURCES += \
 	ipc/ipcd/client/src/ipcConnectionUnix.cpp
 endif
 VBoxXPCOMIPCC_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/components/VBoxXPCOMIPCC.dylib
+VBoxXPCOMIPCC_LDFLAGS.linux  = -Wl,-rpath,$(VBOXDIR)
 VBoxXPCOMIPCC_LIBS = \
+	$(TARGET_VBoxXPCOM) \
 	$(VBox-xpcom-ipcutils_1_TARGET) \
 	$(VBox-xpcom-ipcshared_1_TARGET) \
 	$(VBox-xpcom-ipcdlock_1_TARGET) \
@@ -1145,6 +1148,7 @@ else
  VBoxXPCOMIPCD_SOURCES += \
 	ipc/ipcd/daemon/src/ipcdUnix.cpp
 endif
+VBoxXPCOMIPCD_LDFLAGS.linux = -Wl,-rpath,$(VBOXDIR)
 
 
 #
diff --git a/src/libs/xpcom18a4/python/__init__.py b/src/libs/xpcom18a4/python/__init__.py
index 6d03b9c..f6cf204 100644
--- a/src/libs/xpcom18a4/python/__init__.py
+++ b/src/libs/xpcom18a4/python/__init__.py
@@ -97,7 +97,7 @@ class ConsoleServiceStream:
     def flush(self):
         pass
     def write(self, msg):
-        import _xpcom
+        from xpcom import _xpcom
         _xpcom.LogConsoleMessage(msg)
     def close(self):
         pass
diff --git a/src/libs/xpcom18a4/python/components.py b/src/libs/xpcom18a4/python/components.py
index 9ea64fc..f6ddd87 100644
--- a/src/libs/xpcom18a4/python/components.py
+++ b/src/libs/xpcom18a4/python/components.py
@@ -37,7 +37,7 @@
 
 # This module provides the JavaScript "components" interface
 import xpt
-import xpcom, _xpcom
+import xpcom, xpcom._xpcom as _xpcom
 import xpcom.client
 import xpcom.server
 import types
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin