summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@kiwwwi.com.ar>2012-07-27 20:23:53 -0300
committerNicolás Reynolds <fauno@kiwwwi.com.ar>2012-07-27 20:23:53 -0300
commit3a3f329b736af639fdd3c9621816bad627b96903 (patch)
treea0935f38e21136a3b7eeb93d0ec5c449c12de5b0
parent4d788e769855cbef2539d7cf7049dc2b4d9ac2e0 (diff)
parent2c30604c9ff749660a4b8507eec99e679cf19508 (diff)
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts: community-staging/kdenlive/PKGBUILD community-staging/openscenegraph/PKGBUILD community-staging/schroot/PKGBUILD community-staging/wt/PKGBUILD community-testing/cdfs/PKGBUILD community-testing/pingus/PKGBUILD community-testing/tagpy/PKGBUILD community-testing/vhba-module/PKGBUILD community-testing/vhba-module/vhba-module.install community/surf/PKGBUILD community/unpaper/PKGBUILD core/flex/PKGBUILD core/gcc/PKGBUILD extra/boost/PKGBUILD extra/cups/PKGBUILD extra/gnutls/PKGBUILD extra/gtk2/PKGBUILD extra/llvm/PKGBUILD extra/mesa/PKGBUILD extra/qt/PKGBUILD kde-unstable/akonadi/PKGBUILD kde-unstable/kdeplasma-addons/PKGBUILD libre/virtualbox-libre/PKGBUILD multilib/gcc-multilib/PKGBUILD multilib/lib32-libpng/PKGBUILD testing/bind/PKGBUILD testing/dnsutils/PKGBUILD testing/iptables/PKGBUILD testing/nouveau-dri/PKGBUILD
-rw-r--r--community-staging/cdfs/PKGBUILD35
-rw-r--r--community-staging/cdfs/cdfs-3.0.patch274
-rw-r--r--community-staging/cdfs/cdfs-3.2.patch12
-rw-r--r--community-staging/cdfs/cdfs-3.4.patch12
-rw-r--r--community-staging/cdfs/cdfs.install14
-rw-r--r--community-staging/couchdb/PKGBUILD45
-rw-r--r--community-staging/couchdb/couchdb.install22
-rw-r--r--community-staging/couchdb/rc-script.patch57
-rw-r--r--community-staging/freemat/ChangeLog3
-rw-r--r--community-staging/freemat/PKGBUILD44
-rw-r--r--community-staging/freemat/build-fix.patch11
-rw-r--r--community-staging/freemat/freemat.install7
-rw-r--r--community-staging/hedgewars/PKGBUILD48
-rw-r--r--community-staging/hedgewars/hedgewars.desktop8
-rw-r--r--community-staging/hedgewars/hedgewars.pngbin0 -> 7329 bytes
-rw-r--r--community-testing/mashup/PKGBUILD30
-rw-r--r--community-testing/sage-mathematics/PKGBUILD103
-rw-r--r--community-testing/sage-mathematics/SAGE-notebook.desktop19
-rw-r--r--community-testing/sage-mathematics/sage-mathematics.install56
-rw-r--r--community-testing/tp_smapi/PKGBUILD58
-rw-r--r--community-testing/tp_smapi/tp_smapi.install13
-rw-r--r--community/apper/PKGBUILD4
-rw-r--r--community/aria2/PKGBUILD4
-rw-r--r--community/assimp/PKGBUILD13
-rw-r--r--community/cdfs/PKGBUILD2
-rw-r--r--community/cellwriter/PKGBUILD34
-rw-r--r--community/cellwriter/cellwriter.install14
-rw-r--r--community/darktable/PKGBUILD6
-rw-r--r--community/deadbeef/PKGBUILD8
-rw-r--r--community/easystroke/PKGBUILD31
-rw-r--r--community/easystroke/easystroke.install13
-rw-r--r--community/fb-client/PKGBUILD6
-rw-r--r--community/freerdp/PKGBUILD12
-rw-r--r--community/fwbuilder/PKGBUILD5
-rw-r--r--community/gambas3/PKGBUILD20
-rw-r--r--community/gambas3/gambas3-runtime.install2
-rw-r--r--community/kadu/PKGBUILD4
-rw-r--r--community/kpartsplugin/PKGBUILD6
-rw-r--r--community/libcec/PKGBUILD4
-rw-r--r--community/libdaq/PKGBUILD11
-rw-r--r--community/libmicrohttpd/PKGBUILD6
-rw-r--r--community/libtorrent/PKGBUILD2
-rw-r--r--community/libwebp/PKGBUILD6
-rw-r--r--community/linuxdoc-tools/PKGBUILD23
-rw-r--r--community/mariadb/PKGBUILD4
-rwxr-xr-xcommunity/mathomatic/PKGBUILD6
-rw-r--r--community/moreutils/PKGBUILD6
-rw-r--r--community/nbd/PKGBUILD6
-rw-r--r--community/ncmpcpp/PKGBUILD4
-rw-r--r--community/netsurf/PKGBUILD8
-rw-r--r--community/nginx/PKGBUILD45
-rw-r--r--community/nginx/service1
-rw-r--r--community/nodejs/PKGBUILD8
-rw-r--r--community/parrot/PKGBUILD10
-rw-r--r--community/pkgfile/PKGBUILD6
-rw-r--r--community/polipo/PKGBUILD6
-rw-r--r--community/polipo/polipo.rc.d2
-rw-r--r--community/pptpd/PKGBUILD11
-rw-r--r--community/python-pyopencl/LICENSE.txt20
-rw-r--r--community/python-pyopencl/PKGBUILD48
-rw-r--r--community/qt4pas/PKGBUILD4
-rw-r--r--community/qtcreator/PKGBUILD10
-rw-r--r--community/r8168-lts/PKGBUILD6
-rw-r--r--community/rtorrent/PKGBUILD2
-rw-r--r--community/snort/PKGBUILD9
-rw-r--r--community/spacefm/PKGBUILD20
-rw-r--r--community/spacefm/spacefm.install2
-rw-r--r--community/surf/PKGBUILD22
-rw-r--r--community/surf/config.h25
-rw-r--r--community/tea/PKGBUILD6
-rw-r--r--community/udevil/PKGBUILD6
-rw-r--r--community/ulogd/PKGBUILD16
-rw-r--r--community/unpaper/PKGBUILD27
-rw-r--r--community/wxgtk2.9/PKGBUILD4
-rw-r--r--community/xapian-core/PKGBUILD6
-rw-r--r--community/xmlrpc-c/PKGBUILD6
-rw-r--r--core/dbus-core/PKGBUILD10
-rw-r--r--core/flex/PKGBUILD37
-rw-r--r--core/gcc/PKGBUILD25
-rw-r--r--extra/boost/PKGBUILD4
-rw-r--r--extra/clucene/PKGBUILD6
-rw-r--r--extra/cups/PKGBUILD4
-rw-r--r--extra/dbus/PKGBUILD8
-rw-r--r--extra/ddrescue/PKGBUILD4
-rw-r--r--extra/dovecot/PKGBUILD4
-rw-r--r--extra/git/PKGBUILD12
-rw-r--r--extra/gnutls/PKGBUILD6
-rw-r--r--extra/gpsd/PKGBUILD4
-rw-r--r--extra/gtk2/PKGBUILD19
-rw-r--r--extra/gtk2/fix-stuck-grabs.patch47
-rw-r--r--extra/icu/PKGBUILD6
-rw-r--r--extra/imagemagick/PKGBUILD8
-rw-r--r--extra/libmp4v2/PKGBUILD4
-rw-r--r--extra/libpng/PKGBUILD10
-rw-r--r--extra/llvm/PKGBUILD4
-rw-r--r--extra/mesa/PKGBUILD6
-rw-r--r--extra/nouveau-dri/PKGBUILD4
-rw-r--r--extra/qjackctl/PKGBUILD4
-rw-r--r--extra/qt-gstreamer/PKGBUILD4
-rw-r--r--extra/qt/PKGBUILD4
-rw-r--r--extra/rosegarden/PKGBUILD4
-rw-r--r--extra/taglib/PKGBUILD4
-rw-r--r--extra/transmission/PKGBUILD6
-rw-r--r--extra/whois/PKGBUILD6
-rw-r--r--extra/xf86-input-evdev/PKGBUILD13
-rw-r--r--extra/xf86-input-keyboard/PKGBUILD8
-rw-r--r--extra/xf86-video-intel/PKGBUILD17
-rw-r--r--extra/xf86-video-intel/gmux_backlight.diff10
-rw-r--r--extra/xf86-video-intel/sna_backlight_fixes.diff54
-rw-r--r--extra/xf86-video-openchrome/PKGBUILD10
-rw-r--r--extra/xfce4-weather-plugin/PKGBUILD22
-rw-r--r--extra/zsh/PKGBUILD10
-rw-r--r--kde-unstable/kdeplasma-addons/fix-twitter-auth.patch40
-rw-r--r--libre/audacious-plugins-libre/PKGBUILD8
-rw-r--r--libre/h-client/PKGBUILD9
-rw-r--r--libre/iceweasel-libre/PKGBUILD2
-rw-r--r--libre/linux-libre/PKGBUILD23
-rw-r--r--libre/linux-libre/config.i686245
-rw-r--r--libre/linux-libre/config.x86_64242
-rw-r--r--libre/linux-libre/linux-libre.install2
-rw-r--r--libre/lirc-libre/PKGBUILD6
-rw-r--r--libre/lirc-libre/lirc.install2
-rw-r--r--libre/virtualbox-libre-modules-lts/60-vboxguest.rules2
-rw-r--r--libre/virtualbox-libre-modules-lts/LocalConfig.kmk19
-rw-r--r--libre/virtualbox-libre-modules-lts/PKGBUILD153
-rw-r--r--libre/virtualbox-libre-modules-lts/free-distros.patch1383
-rw-r--r--libre/virtualbox-libre-modules-lts/libre.patch5765
-rw-r--r--libre/virtualbox-libre-modules-lts/os_blag.pngbin0 -> 1411 bytes
-rw-r--r--libre/virtualbox-libre-modules-lts/os_blag_64.pngbin0 -> 1549 bytes
-rw-r--r--libre/virtualbox-libre-modules-lts/os_dragora.pngbin0 -> 2375 bytes
-rw-r--r--libre/virtualbox-libre-modules-lts/os_dragora_64.pngbin0 -> 2430 bytes
-rw-r--r--libre/virtualbox-libre-modules-lts/os_dynebolic.pngbin0 -> 1621 bytes
-rw-r--r--libre/virtualbox-libre-modules-lts/os_gnewsense.pngbin0 -> 2315 bytes
-rw-r--r--libre/virtualbox-libre-modules-lts/os_gnewsense_64.pngbin0 -> 2470 bytes
-rw-r--r--libre/virtualbox-libre-modules-lts/os_gnu.pngbin0 -> 2728 bytes
-rw-r--r--libre/virtualbox-libre-modules-lts/os_gnu_64.pngbin0 -> 2705 bytes
-rw-r--r--libre/virtualbox-libre-modules-lts/os_gnuhurd.pngbin0 -> 2728 bytes
-rw-r--r--libre/virtualbox-libre-modules-lts/os_gnulinux.pngbin0 -> 2728 bytes
-rw-r--r--libre/virtualbox-libre-modules-lts/os_gnulinux_64.pngbin0 -> 2705 bytes
-rw-r--r--libre/virtualbox-libre-modules-lts/os_musix.pngbin0 -> 2451 bytes
-rw-r--r--libre/virtualbox-libre-modules-lts/os_musix_64.pngbin0 -> 2581 bytes
-rw-r--r--libre/virtualbox-libre-modules-lts/os_os64base.pngbin0 -> 1300 bytes
-rw-r--r--libre/virtualbox-libre-modules-lts/os_os64base.xcfbin0 -> 2844 bytes
-rw-r--r--libre/virtualbox-libre-modules-lts/os_osbase.pngbin0 -> 1042 bytes
-rw-r--r--libre/virtualbox-libre-modules-lts/os_osbase.xcfbin0 -> 2748 bytes
-rw-r--r--libre/virtualbox-libre-modules-lts/os_parabola.pngbin0 -> 1931 bytes
-rw-r--r--libre/virtualbox-libre-modules-lts/os_parabola_64.pngbin0 -> 2096 bytes
-rw-r--r--libre/virtualbox-libre-modules-lts/os_trisquel.pngbin0 -> 2451 bytes
-rw-r--r--libre/virtualbox-libre-modules-lts/os_trisquel_64.pngbin0 -> 2592 bytes
-rw-r--r--libre/virtualbox-libre-modules-lts/os_ututo.pngbin0 -> 2615 bytes
-rw-r--r--libre/virtualbox-libre-modules-lts/os_ututo_64.pngbin0 -> 2751 bytes
-rw-r--r--libre/virtualbox-libre-modules-lts/os_venenux.pngbin0 -> 1653 bytes
-rw-r--r--libre/virtualbox-libre-modules-lts/virtualbox-libre-modules-lts.install18
-rw-r--r--libre/virtualbox-libre-modules-lts/virtualbox-libre-parabola-modules-lts.install16
-rw-r--r--libre/virtualbox-libre-modules/.directory2
-rw-r--r--libre/virtualbox-libre-modules/60-vboxguest.rules2
-rw-r--r--libre/virtualbox-libre-modules/LocalConfig.kmk19
-rw-r--r--libre/virtualbox-libre-modules/PKGBUILD157
-rw-r--r--libre/virtualbox-libre-modules/free-distros.patch1383
-rw-r--r--libre/virtualbox-libre-modules/libre.patch5765
-rw-r--r--libre/virtualbox-libre-modules/linux34.patch12
-rw-r--r--libre/virtualbox-libre-modules/os_blag.pngbin0 -> 1411 bytes
-rw-r--r--libre/virtualbox-libre-modules/os_blag_64.pngbin0 -> 1549 bytes
-rw-r--r--libre/virtualbox-libre-modules/os_dragora.pngbin0 -> 2375 bytes
-rw-r--r--libre/virtualbox-libre-modules/os_dragora_64.pngbin0 -> 2430 bytes
-rw-r--r--libre/virtualbox-libre-modules/os_dynebolic.pngbin0 -> 1621 bytes
-rw-r--r--libre/virtualbox-libre-modules/os_gnewsense.pngbin0 -> 2315 bytes
-rw-r--r--libre/virtualbox-libre-modules/os_gnewsense_64.pngbin0 -> 2470 bytes
-rw-r--r--libre/virtualbox-libre-modules/os_gnu.pngbin0 -> 2728 bytes
-rw-r--r--libre/virtualbox-libre-modules/os_gnu_64.pngbin0 -> 2705 bytes
-rw-r--r--libre/virtualbox-libre-modules/os_gnuhurd.pngbin0 -> 2728 bytes
-rw-r--r--libre/virtualbox-libre-modules/os_gnulinux.pngbin0 -> 2728 bytes
-rw-r--r--libre/virtualbox-libre-modules/os_gnulinux_64.pngbin0 -> 2705 bytes
-rw-r--r--libre/virtualbox-libre-modules/os_musix.pngbin0 -> 2451 bytes
-rw-r--r--libre/virtualbox-libre-modules/os_musix_64.pngbin0 -> 2581 bytes
-rw-r--r--libre/virtualbox-libre-modules/os_os64base.pngbin0 -> 1300 bytes
-rw-r--r--libre/virtualbox-libre-modules/os_os64base.xcfbin0 -> 2844 bytes
-rw-r--r--libre/virtualbox-libre-modules/os_osbase.pngbin0 -> 1042 bytes
-rw-r--r--libre/virtualbox-libre-modules/os_osbase.xcfbin0 -> 2748 bytes
-rw-r--r--libre/virtualbox-libre-modules/os_parabola.pngbin0 -> 1931 bytes
-rw-r--r--libre/virtualbox-libre-modules/os_parabola_64.pngbin0 -> 2096 bytes
-rw-r--r--libre/virtualbox-libre-modules/os_trisquel.pngbin0 -> 2451 bytes
-rw-r--r--libre/virtualbox-libre-modules/os_trisquel_64.pngbin0 -> 2592 bytes
-rw-r--r--libre/virtualbox-libre-modules/os_ututo.pngbin0 -> 2615 bytes
-rw-r--r--libre/virtualbox-libre-modules/os_ututo_64.pngbin0 -> 2751 bytes
-rw-r--r--libre/virtualbox-libre-modules/os_venenux.pngbin0 -> 1653 bytes
-rw-r--r--libre/virtualbox-libre-modules/virtualbox-libre-modules.install19
-rw-r--r--libre/virtualbox-libre-modules/virtualbox-libre-parabola-modules.install17
-rw-r--r--libre/virtualbox-libre/.directory3
-rw-r--r--libre/virtualbox-libre/PKGBUILD162
-rw-r--r--libre/virtualbox-libre/free-distros.patch1383
-rw-r--r--libre/virtualbox-libre/ipv6_vnc.patch20
-rw-r--r--libre/virtualbox-libre/libre.patch5765
-rw-r--r--libre/virtualbox-libre/os_blag.pngbin0 -> 1411 bytes
-rw-r--r--libre/virtualbox-libre/os_blag_64.pngbin0 -> 1549 bytes
-rw-r--r--libre/virtualbox-libre/os_dragora.pngbin0 -> 2375 bytes
-rw-r--r--libre/virtualbox-libre/os_dragora_64.pngbin0 -> 2430 bytes
-rw-r--r--libre/virtualbox-libre/os_dynebolic.pngbin0 -> 1621 bytes
-rw-r--r--libre/virtualbox-libre/os_gnewsense.pngbin0 -> 2315 bytes
-rw-r--r--libre/virtualbox-libre/os_gnewsense_64.pngbin0 -> 2470 bytes
-rw-r--r--libre/virtualbox-libre/os_gnu.pngbin0 -> 2728 bytes
-rw-r--r--libre/virtualbox-libre/os_gnu_64.pngbin0 -> 2705 bytes
-rw-r--r--libre/virtualbox-libre/os_gnuhurd.pngbin0 -> 2728 bytes
-rw-r--r--libre/virtualbox-libre/os_gnulinux.pngbin0 -> 2728 bytes
-rw-r--r--libre/virtualbox-libre/os_gnulinux_64.pngbin0 -> 2705 bytes
-rw-r--r--libre/virtualbox-libre/os_musix.pngbin0 -> 2451 bytes
-rw-r--r--libre/virtualbox-libre/os_musix_64.pngbin0 -> 2581 bytes
-rw-r--r--libre/virtualbox-libre/os_os64base.pngbin0 -> 1300 bytes
-rw-r--r--libre/virtualbox-libre/os_os64base.xcfbin0 -> 2844 bytes
-rw-r--r--libre/virtualbox-libre/os_osbase.pngbin0 -> 1042 bytes
-rw-r--r--libre/virtualbox-libre/os_osbase.xcfbin0 -> 2748 bytes
-rw-r--r--libre/virtualbox-libre/os_parabola.pngbin0 -> 1931 bytes
-rw-r--r--libre/virtualbox-libre/os_parabola_64.pngbin0 -> 2096 bytes
-rw-r--r--libre/virtualbox-libre/os_trisquel.pngbin0 -> 2451 bytes
-rw-r--r--libre/virtualbox-libre/os_trisquel_64.pngbin0 -> 2592 bytes
-rw-r--r--libre/virtualbox-libre/os_ututo.pngbin0 -> 2615 bytes
-rw-r--r--libre/virtualbox-libre/os_ututo_64.pngbin0 -> 2751 bytes
-rw-r--r--libre/virtualbox-libre/os_venenux.pngbin0 -> 1653 bytes
-rw-r--r--libre/virtualbox-libre/vboxservice.conf2
-rw-r--r--libre/virtualbox-libre/vboxservice.rc39
-rw-r--r--libre/virtualbox-libre/vboxservice.service9
-rw-r--r--libre/virtualbox-libre/vboxweb.service11
-rw-r--r--libre/virtualbox-libre/virtualbox-libre-parabola-additions.install31
-rw-r--r--libre/virtualbox-libre/virtualbox-libre-parabola-source.install29
-rw-r--r--libre/virtualbox-libre/virtualbox-libre-source.install29
-rw-r--r--libre/virtualbox-libre/virtualbox-libre.install45
-rw-r--r--libre/virtualbox-modules/PKGBUILD8
-rw-r--r--libre/virtualbox-modules/virtualbox-modules.install6
-rw-r--r--libre/virtualbox-modules/virtualbox-parabola-modules.install6
-rw-r--r--libre/xulrunner-libre/Bug-756390-Make-the-Reset-Firefox-feature-more-gener.patch215
-rw-r--r--libre/xulrunner-libre/PKGBUILD59
-rw-r--r--pcr/kervalasquish-hg/PKGBUILD72
-rw-r--r--pcr/ryzom-client/PKGBUILD7
-rw-r--r--pcr/ryzom-nel/PKGBUILD7
-rw-r--r--testing/btrfs-progs/70-btrfs.rules1
-rw-r--r--testing/btrfs-progs/PKGBUILD46
-rw-r--r--testing/btrfs-progs/initcpio-hook-btrfs10
-rw-r--r--testing/btrfs-progs/initcpio-install-btrfs17
-rw-r--r--testing/ddrescue/PKGBUILD30
-rw-r--r--testing/ddrescue/ddrescue.install22
-rw-r--r--testing/iptables/0503-extension_cppflags.patch13
-rw-r--r--testing/iptables/ip6tables.service11
-rw-r--r--testing/iptables/iptables-1.4.12-fixresore.patch28
-rwxr-xr-xtesting/iptables/iptables-flush18
-rw-r--r--testing/iptables/iptables.service11
-rw-r--r--testing/libwacom/PKGBUILD31
-rw-r--r--testing/qjackctl/PKGBUILD31
-rw-r--r--testing/rosegarden/PKGBUILD43
-rw-r--r--testing/rosegarden/rosegarden.install14
249 files changed, 24725 insertions, 697 deletions
diff --git a/community-staging/cdfs/PKGBUILD b/community-staging/cdfs/PKGBUILD
new file mode 100644
index 000000000..4ac07ebdd
--- /dev/null
+++ b/community-staging/cdfs/PKGBUILD
@@ -0,0 +1,35 @@
+# $Id: PKGBUILD 74197 2012-07-22 19:49:11Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: J. Santiago Hirschfeld <jsantiagoh@yahoo.com.ar>
+
+pkgname=cdfs
+pkgver=2.6.27
+pkgrel=25
+pkgdesc="File system module that 'exports' all tracks and boot images on a CD as normal files."
+arch=(i686 x86_64)
+url="http://www.elis.UGent.be/~ronsse/cdfs/"
+license=('GPL')
+makedepends=('linux-headers')
+install=cdfs.install
+source=("http://www.elis.UGent.be/~ronsse/cdfs/download/$pkgname-$pkgver.tar.bz2"
+ "cdfs-3.0.patch"
+ "cdfs-3.2.patch"
+ "cdfs-3.4.patch")
+md5sums=('ac64c014a90e3c488394832ea29605b3'
+ 'aba7da94a9dcbb8a93ea423cb6958fef'
+ 'e934407b3460257a301822ffc4ab3933'
+ '9215e7bdac728bd2f889fb525e543454')
+
+build() {
+ _kernver=`pacman -Q linux | cut -d . -f 2 | cut -f 1 -d -`
+ depends=("linux>=3.${_kernver}" "linux<3.`expr ${_kernver} + 1`")
+ _kernverfull=`cat /usr/lib/modules/extramodules-3.${_kernver}-ARCH/version`
+
+ cd $srcdir/$pkgname-$pkgver
+ patch -p1 <$srcdir/cdfs-3.0.patch
+ patch -p1 <$srcdir/cdfs-3.2.patch
+ patch -p1 <$srcdir/cdfs-3.4.patch
+ make KDIR=/usr/lib/modules/${_kernverfull}/build
+ install -Dm0644 cdfs.ko $pkgdir/usr/lib/modules/extramodules-3.${_kernver}-ARCH/cdfs.ko
+ sed -i "s|extramodules-.*-ARCH|extramodules-3.${_kernver}-ARCH|" $startdir/cdfs.install
+}
diff --git a/community-staging/cdfs/cdfs-3.0.patch b/community-staging/cdfs/cdfs-3.0.patch
new file mode 100644
index 000000000..20194b848
--- /dev/null
+++ b/community-staging/cdfs/cdfs-3.0.patch
@@ -0,0 +1,274 @@
+diff -wbBur cdfs-2.6.27/cddata.c cdfs-2.6.27.my/cddata.c
+--- cdfs-2.6.27/cddata.c 2009-12-21 17:04:03.000000000 +0300
++++ cdfs-2.6.27.my/cddata.c 2011-07-24 21:18:44.000000000 +0400
+@@ -83,7 +83,7 @@
+ #else
+ .mmap = generic_file_readonly_mmap,
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
+- .sendfile = generic_file_sendfile
++// .sendfile = generic_file_sendfile
+ #else
+ .splice_read = generic_file_splice_read
+ #endif
+diff -wbBur cdfs-2.6.27/root.c cdfs-2.6.27.my/root.c
+--- cdfs-2.6.27/root.c 2009-12-21 16:38:31.000000000 +0300
++++ cdfs-2.6.27.my/root.c 2011-07-25 13:16:59.000000000 +0400
+@@ -32,19 +30,14 @@
+ * Added code to transform /proc/cdfs into a sequential synthetic file. *
+ *++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+
+-
+ #include <linux/seq_file.h>
+-
+-#ifndef OLD_KERNEL
+ #include <linux/statfs.h>
+-#endif
++#include <linux/sched.h>
+
+ extern struct seq_operations cdfs_operations;
+ extern struct _track_info *dummy_track_p;
+
+-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,24)
+ struct inode *cdfs_iget(struct super_block *sp, unsigned long ino);
+-#endif
+ /*============================================================================*
+ * cdfs_open() *
+ * Description: *
+@@ -115,15 +108,8 @@
+
+ /********************************************************************/
+
+-#ifdef OLD_KERNEL
+-static struct super_block * cdfs_mount(struct super_block *sb, void *data, int silent){
+- kdev_t dev = sb->s_dev;
+- int i, j, t;
+- struct cdrom_tochdr hdr;
+-#else
+ static int cdfs_fill_super(struct super_block *sb, void *data, int silent){
+ int i, t;
+-#endif
+ struct cdrom_tocentry entry;
+ int no_audio=0, no_data=0;
+ cd * this_cd;
+@@ -131,24 +117,13 @@
+
+ PRINT("cdfs_mount\n");
+
+-#ifdef OLD_KERNEL
+- MOD_INC_USE_COUNT;
+-
+- set_blocksize(dev, CD_FRAMESIZE); // voor bread met ide-cd
+-#else
+ sb_set_blocksize(sb, CD_FRAMESIZE); // voor bread met ide-cd
+-#endif
+
+ sb->s_blocksize = CD_FRAMESIZE;
+ sb->s_blocksize_bits = 11;
+
+ if (!(this_cd = cdfs_info(sb) = kmalloc(sizeof(cd), GFP_KERNEL))){
+-#ifdef OLD_KERNEL
+- MOD_DEC_USE_COUNT;
+- return NULL;
+-#else
+ return -ENOMEM;
+-#endif
+ }
+
+ this_cd->mode = MODE;
+@@ -160,13 +135,8 @@
+
+ // Initialize cache for maximum sector size
+ if (!(this_cd->cache = kmalloc(CD_FRAMESIZE_RAWER*CACHE_SIZE, GFP_KERNEL))) {
+-#ifdef OLD_KERNEL
+- MOD_DEC_USE_COUNT;
+- return NULL;
+-#else
+ kfree(cdfs_info(sb));
+ return -ENOMEM;
+-#endif
+ }
+
+ // Cache is still invalid
+@@ -183,23 +153,13 @@
+ if (this_cd->toc_scsi){
+ if (cdfs_toc_read_full(sb)){
+ printk("TOC read failed\n");
+-#ifdef OLD_KERNEL
+- MOD_DEC_USE_COUNT;
+- return NULL;
+-#else
+ goto invalid;
+-#endif
+ }
+ } else {
+ //if (cdfs_ioctl(sb, CDROMREADTOCHDR, (unsigned long)&hdr)){
+ if (cdfs_toc_read(sb)){
+ printk("cdfs_toc_read failed\n");
+-#ifdef OLD_KERNEL
+- MOD_DEC_USE_COUNT;
+- return NULL;
+-#else
+ goto invalid;
+-#endif
+ }
+ }
+
+@@ -365,11 +325,7 @@
+ sb->s_flags |= MS_RDONLY;
+ sb->s_op = &cdfs_ops;
+ /* always get inode status */
+-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,24)
+ retinode=cdfs_iget(sb, 0);
+-#else
+- retinode=iget(sb, 0);
+-#endif
+ if ( IS_ERR(retinode) )
+ return PTR_ERR(retinode);
+
+@@ -379,16 +335,12 @@
+
+ cdfs_proc_cd = this_cd;
+
+-#ifdef OLD_KERNEL
+- return sb;
+-#else
+ return 0;
+
+ invalid:
+ kfree(this_cd->cache);
+ kfree(cdfs_info(sb));
+ return -EINVAL;
+-#endif
+ }
+
+ /************************************************************************/
+@@ -410,27 +362,12 @@
+ // Remove /proc entry
+ cdfs_proc_cd = NULL;
+ kfree(cdfs_info(sb));
+-
+-#ifdef OLD_KERNEL
+- MOD_DEC_USE_COUNT;
+-#endif
+-
+ }
+
+ /************************************************************************/
+
+-#ifdef OLD_KERNEL
+-static int cdfs_statfs(struct super_block *sb, struct statfs *buf) {
+- cd * this_cd = cdfs_info(sb);
+-#else
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
+ static int cdfs_statfs(struct dentry *d, struct kstatfs *buf) {
+ cd * this_cd = cdfs_info(d->d_sb);
+-#else
+-static int cdfs_statfs(struct super_block *sb, struct kstatfs *buf) {
+- cd * this_cd = cdfs_info(sb);
+-#endif
+-#endif
+ PRINT("rmfs_statfs\n");
+
+ buf->f_type = CDFS_MAGIC;
+@@ -460,11 +397,7 @@
+
+ /************************************************************************/
+
+-#ifdef OLD_KERNEL
+-static struct dentry * cdfs_lookup(struct inode *dir, struct dentry *dentry){
+-#else
+ static struct dentry * cdfs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd){
+-#endif
+ struct inode * inode;
+ int i;
+ cd * this_cd = cdfs_info(dir->i_sb);
+@@ -480,15 +413,9 @@
+ /* Use goto and read inode with iget()/cdfs_iget() */
+ /* Thanks to David Howells for patch and Master class in his mail */
+ found:
+-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,24)
+ inode = cdfs_iget(dir->i_sb, i);
+ if (IS_ERR(inode))
+ return ERR_CAST(inode);
+-#else
+- inode = iget(dir->i_sb, i);
+- if (!inode)
+- return ERR_PTR(-ENOMEM);
+-#endif
+ d_add(dentry, inode);
+ return NULL;
+ }
+@@ -529,12 +456,8 @@
+ i->i_fop = &cdfs_dir_operations;
+ } else { /* file */
+ i->i_size = this_cd->track[i->i_ino].size;
+-#ifdef OLD_KERNEL
+- i->i_mtime = i->i_atime = i->i_ctime = this_cd->track[i->i_ino].time;
+-#else
+ i->i_mtime.tv_sec = i->i_atime.tv_sec = i->i_ctime.tv_sec = this_cd->track[i->i_ino].time;
+ i->i_mtime.tv_nsec = i->i_atime.tv_nsec = i->i_ctime.tv_nsec = 0;
+-#endif
+ i->i_mode = this_cd->mode;
+ if ((this_cd->track[i->i_ino].type==DATA) && this_cd->track[i->i_ino].iso_size) {
+ i->i_fop = &cdfs_cddata_file_operations;
+@@ -587,33 +510,21 @@
+ /******************************************************************/
+
+ static struct super_operations cdfs_ops = {
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)
+- .read_inode = cdfs_read_inode,
+-#endif
+ .put_super = cdfs_umount,
+ .statfs = cdfs_statfs
+ };
+
+-#ifdef OLD_KERNEL
+-static DECLARE_FSTYPE_DEV(cdfs_fs_type, FSNAME, cdfs_mount);
+-#else
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
+-static int cdfs_get_sb(struct file_system_type *fs_type, int flags, const char *dev_name, void *data, struct vfsmount *mnt) {
+- return get_sb_bdev(fs_type, flags, dev_name, data, cdfs_fill_super, mnt);
+-#else
+-static struct super_block *cdfs_get_sb(struct file_system_type *fs_type, int flags, const char *dev_name, void *data) {
+- return get_sb_bdev(fs_type, flags, dev_name, data, cdfs_fill_super);
+-#endif
+-}
++//static int cdfs_get_sb(struct file_system_type *fs_type, int flags, const char *dev_name, void *data, struct vfsmount *mnt) {
++// return get_sb_bdev(fs_type, flags, dev_name, data, cdfs_fill_super, mnt);
++//}
+
+ static struct file_system_type cdfs_fs_type = {
+ .owner = THIS_MODULE,
+ .name = "cdfs",
+- .get_sb = cdfs_get_sb,
++// .get_sb = cdfs_get_sb,
+ .kill_sb = kill_block_super,
+ .fs_flags = FS_REQUIRES_DEV
+ };
+-#endif
+
+ /******************************************************/
+
+@@ -621,10 +532,6 @@
+ MODULE_DESCRIPTION("CDfs: a CD filesystem");
+ MODULE_LICENSE("GPL");
+
+-#ifdef OLD_KERNEL
+-EXPORT_NO_SYMBOLS;
+-#endif
+-
+ /******************************************************************/
+
+ static int __init cdfs_init(void) {
+@@ -676,11 +583,7 @@
+
+ if (!options) return;
+
+-#ifdef OLD_KERNEL
+- for (this_char = strtok(options,","); this_char; this_char = strtok(NULL,",")) {
+-#else
+ while ((this_char = strsep(&options,",")) != NULL) {
+-#endif
+
+ if (!strcmp(this_char,"single"))
+ this_cd->single=TRUE;
diff --git a/community-staging/cdfs/cdfs-3.2.patch b/community-staging/cdfs/cdfs-3.2.patch
new file mode 100644
index 000000000..d3300bdbc
--- /dev/null
+++ b/community-staging/cdfs/cdfs-3.2.patch
@@ -0,0 +1,12 @@
+diff -wbBur cdfs-2.6.27/root.c cdfs-2.6.27.my/root.c
+--- cdfs-2.6.27/root.c 2009-12-21 16:38:31.000000000 +0300
++++ cdfs-2.6.27.my/root.c 2012-01-18 11:23:03.000000000 +0400
+@@ -517,7 +517,7 @@
+
+ i->i_uid = this_cd->uid;
+ i->i_gid = this_cd->gid;
+- i->i_nlink = 1;
++ i->__i_nlink = 1;
+ i->i_op = &cdfs_inode_operations;
+ i->i_fop = NULL;
+ i->i_data.a_ops = NULL;
diff --git a/community-staging/cdfs/cdfs-3.4.patch b/community-staging/cdfs/cdfs-3.4.patch
new file mode 100644
index 000000000..5c2cb9b24
--- /dev/null
+++ b/community-staging/cdfs/cdfs-3.4.patch
@@ -0,0 +1,12 @@
+diff -wbBur cdfs-2.6.27/root.c cdfs-2.6.27.my/root.c
+--- cdfs-2.6.27/root.c 2009-12-21 16:38:31.000000000 +0300
++++ cdfs-2.6.27.my/root.c 2012-06-15 17:09:27.000000000 +0400
+@@ -375,7 +375,7 @@
+
+ PRINT("retinode = %ld\n", retinode->i_ino);
+
+- sb->s_root = d_alloc_root(retinode);
++ sb->s_root = d_make_root(retinode);
+
+ cdfs_proc_cd = this_cd;
+
diff --git a/community-staging/cdfs/cdfs.install b/community-staging/cdfs/cdfs.install
new file mode 100644
index 000000000..6be46f6d5
--- /dev/null
+++ b/community-staging/cdfs/cdfs.install
@@ -0,0 +1,14 @@
+post_install() {
+ EXTRAMODULES='extramodules-3.4-ARCH'
+ depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+}
+
+post_upgrade() {
+ EXTRAMODULES='extramodules-3.4-ARCH'
+ depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+}
+
+post_remove() {
+ EXTRAMODULES='extramodules-3.4-ARCH'
+ depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+}
diff --git a/community-staging/couchdb/PKGBUILD b/community-staging/couchdb/PKGBUILD
new file mode 100644
index 000000000..abd01c86d
--- /dev/null
+++ b/community-staging/couchdb/PKGBUILD
@@ -0,0 +1,45 @@
+# $Id: PKGBUILD 74205 2012-07-22 21:09:13Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Vitaliy Berdinskikh ur6lad[at]i.ua
+# Contributor: Michael Fellinger <m.fellinger@gmail.com>
+
+pkgname=couchdb
+pkgver=1.2.0
+pkgrel=4
+pkgdesc="A document-oriented database that can be queried and indexed in a MapReduce fashion using JSON"
+arch=('i686' 'x86_64')
+url="http://couchdb.apache.org"
+license=('APACHE')
+depends=('icu' 'erlang' 'js' 'openssl' 'curl')
+install=couchdb.install
+options=('!libtool')
+backup=('etc/couchdb/local.ini'
+ 'etc/conf.d/couchdb'
+ 'etc/logrotate.d/couchdb')
+source=("http://www.apache.org/dist/couchdb/releases/${pkgver}/apache-${pkgname}-${pkgver}.tar.gz"{,.asc}
+ "rc-script.patch")
+md5sums=('a5cbbcaac288831b3d8a08b725657f10'
+ '890a85b22219ea113a4901a289c442f8'
+ '8a3b1a1ff98a6411827ad991db7a355b')
+
+build() {
+ cd "$srcdir/apache-$pkgname-$pkgver"
+
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var
+ make
+
+ patch -R etc/init/couchdb <$srcdir/rc-script.patch
+}
+
+package() {
+ cd "$srcdir/apache-$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
+
+ install -Dm644 etc/default/couchdb $pkgdir/etc/conf.d/couchdb
+ sed -i 's|\(CONFIGURATION_FILE=/etc/\)default\(/couchdb\)|\1conf.d\2|' $pkgdir/etc/rc.d/couchdb
+ sed -i 's|\(COUCHDB_OPTIONS=\)|\1"-p /var/run/couchdb/couchdb.pid"|' $pkgdir/etc/conf.d/couchdb
+
+ rm -rf $pkgdir/etc/default/ $pkgdir/var/run
+}
diff --git a/community-staging/couchdb/couchdb.install b/community-staging/couchdb/couchdb.install
new file mode 100644
index 000000000..5eff459c7
--- /dev/null
+++ b/community-staging/couchdb/couchdb.install
@@ -0,0 +1,22 @@
+post_install() {
+ id couchdb &>/dev/null || \
+ useradd -r -c "CouchDB daemon" -g daemon -d /var/lib/couchdb -s /bin/false couchdb
+ mkdir -p /var/run/couchdb
+ chown -R couchdb.daemon /etc/couchdb
+ chown -R couchdb.daemon /var/{lib,log,run}/couchdb
+}
+
+pre_upgrade() {
+ id couchdb &>/dev/null || \
+ useradd -r -c "CouchDB daemon" -g daemon -d /var/lib/couchdb -s /bin/false couchdb
+}
+
+post_upgrade() {
+ mkdir -p $pkgdir/var/run/couchdb
+ chown -R couchdb.daemon /etc/couchdb
+ chown -R couchdb.daemon /var/{lib,log,run}/couchdb
+}
+
+post_remove() {
+ userdel couchdb &>/dev/null
+}
diff --git a/community-staging/couchdb/rc-script.patch b/community-staging/couchdb/rc-script.patch
new file mode 100644
index 000000000..1dd723ffc
--- /dev/null
+++ b/community-staging/couchdb/rc-script.patch
@@ -0,0 +1,57 @@
+--- couchdb 2011-12-27 01:21:59.000000000 +0400
++++ couchdb.my 2011-12-27 01:21:18.000000000 +0400
+@@ -1,6 +1,4 @@
+-#!/bin/bash
+-. /etc/rc.conf
+-. /etc/rc.d/functions
++#!/bin/sh -e
+
+ # Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ # use this file except in compliance with the License. You may obtain a copy of
+@@ -31,7 +29,7 @@
+ NAME=couchdb
+ SCRIPT_NAME=`basename $0`
+ COUCHDB=/usr/bin/couchdb
+-CONFIGURATION_FILE=/etc/conf.d/couchdb
++CONFIGURATION_FILE=/etc/default/couchdb
+ RUN_DIR=/var/run/couchdb
+ LSB_LIBRARY=/lib/lsb/init-functions
+
+@@ -44,14 +42,16 @@
+ fi
+
+ log_daemon_msg () {
+- stat_busy $@
++ # Dummy function to be replaced by LSB library.
++
++ echo $@
+ }
+
+ log_end_msg () {
++ # Dummy function to be replaced by LSB library.
++
+ if test "$1" != "0"; then
+- stat_fail
+- else
+- stat_done
++ echo "Error with $DESCRIPTION: $NAME"
+ fi
+ return $1
+ }
+@@ -66,7 +66,7 @@
+ command="$command $COUCHDB_OPTIONS"
+ fi
+ if test -n "$COUCHDB_USER"; then
+- if su $COUCHDB_USER -s /bin/bash -c "$command"; then
++ if su $COUCHDB_USER -c "$command"; then
+ return $SCRIPT_OK
+ else
+ return $SCRIPT_ERROR
+@@ -84,7 +84,6 @@
+ # Start Apache CouchDB as a background process.
+
+ mkdir -p "$RUN_DIR"
+- chown -R $COUCHDB_USER "$RUN_DIR"
+ command="$COUCHDB -b"
+ if test -n "$COUCHDB_STDOUT_FILE"; then
+ command="$command -o $COUCHDB_STDOUT_FILE"
diff --git a/community-staging/freemat/ChangeLog b/community-staging/freemat/ChangeLog
new file mode 100644
index 000000000..dba4cf7ec
--- /dev/null
+++ b/community-staging/freemat/ChangeLog
@@ -0,0 +1,3 @@
+2007-06-27 tardo <tardo@nagi-fanboi.net>
+* Built for x86_64
+
diff --git a/community-staging/freemat/PKGBUILD b/community-staging/freemat/PKGBUILD
new file mode 100644
index 000000000..75d39befd
--- /dev/null
+++ b/community-staging/freemat/PKGBUILD
@@ -0,0 +1,44 @@
+# $Id: PKGBUILD 74207 2012-07-22 21:10:13Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: William Rea <sillywilly@gmail.com>
+
+pkgname=freemat
+pkgver=4.1
+pkgrel=4
+pkgdesc="A free environment for rapid engineering, scientific prototyping and data processing"
+arch=('i686' 'x86_64')
+url="http://freemat.sourceforge.net"
+license=('GPL')
+depends=('qt' 'ffcall' 'fftw' 'mesa' 'portaudio' 'libffi')
+makedepends=('arpack' 'lapack' 'umfpack' 'blas' 'libmatio' 'cmake' 'python2')
+install=freemat.install
+source=(http://downloads.sourceforge.net/project/freemat/FreeMat4/FreeMat-$pkgver-Source.tar.gz
+ build-fix.patch)
+md5sums=('929d31e2310feaff5d380fc2f7b4d1a2'
+ '2d11a28aa2a7df89c4618ed1c4be5973')
+
+build() {
+ cd $srcdir/FreeMat-$pkgver-Source
+
+ rm -f CMakeCache.txt
+ find . -type f -name '*.moc.cpp' -exec rm -f {} \;
+ find . -type f -name 'add.so' -exec rm -f {} \;
+ patch -p1 <$srcdir/build-fix.patch
+ echo >libs/libMatC/CJitFuncClang.hpp
+ echo >libs/libMatC/CJitFuncClang.cpp
+
+ cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DUSE_LLVM=OFF \
+ -DFFI_INCLUDE_DIR=/usr/lib/libffi-`pacman -Q libffi | cut -f2 -d\ |cut -f1 -d-`/include/ \
+ -DPYTHON_EXECUTABLE=/usr/bin/python2 \
+ .
+ make
+}
+package() {
+ cd $srcdir/FreeMat-$pkgver-Source
+
+ make DESTDIR=$pkgdir install
+ sed -i "s|/FreeMat-.*/|/FreeMat-$pkgver/|g" $startdir/freemat.install
+ rm $pkgdir/usr/bin/blas.ini
+}
diff --git a/community-staging/freemat/build-fix.patch b/community-staging/freemat/build-fix.patch
new file mode 100644
index 000000000..c1ea63088
--- /dev/null
+++ b/community-staging/freemat/build-fix.patch
@@ -0,0 +1,11 @@
+diff -wbBur FreeMat-4.1-Source/libs/libGraphics/GLRenderEngine.cpp FreeMat-4.1-Source.my/libs/libGraphics/GLRenderEngine.cpp
+--- FreeMat-4.1-Source/libs/libGraphics/GLRenderEngine.cpp 2011-11-27 04:27:43.000000000 +0400
++++ FreeMat-4.1-Source.my/libs/libGraphics/GLRenderEngine.cpp 2012-01-20 19:07:48.000000000 +0400
+@@ -20,6 +20,7 @@
+ #include <qimage.h>
+ #include <qpainter.h>
+ #include <QtOpenGL>
++#include <GL/glu.h>
+ #include <math.h>
+ #include "IEEEFP.hpp"
+
diff --git a/community-staging/freemat/freemat.install b/community-staging/freemat/freemat.install
new file mode 100644
index 000000000..051cca866
--- /dev/null
+++ b/community-staging/freemat/freemat.install
@@ -0,0 +1,7 @@
+post_install() {
+ echo "-- Use FreeMat -i /usr/share/FreeMat-4.1/ to adjust docs location"
+}
+
+post_upgrade() {
+ echo "-- Use FreeMat -i /usr/share/FreeMat-4.1/ to adjust docs location"
+}
diff --git a/community-staging/hedgewars/PKGBUILD b/community-staging/hedgewars/PKGBUILD
new file mode 100644
index 000000000..5259b435e
--- /dev/null
+++ b/community-staging/hedgewars/PKGBUILD
@@ -0,0 +1,48 @@
+# $Id: PKGBUILD 74209 2012-07-22 21:11:50Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+
+pkgname=hedgewars
+pkgver=0.9.17
+pkgrel=4
+pkgdesc="Free Worms-like turn based strategy game"
+arch=('i686' 'x86_64')
+url="http://hedgewars.org"
+license=('GPL' 'custom')
+depends=('qt' 'sdl' 'sdl_mixer' 'sdl_image' 'sdl_net' 'sdl_ttf' 'lua')
+makedepends=('fpc' 'cmake'
+ # haskell specific
+ 'ghc=7.4.2-1'
+ 'haskell-network=2.3.0.14-1' 'haskell-bytestring-show=0.3.5.1-3'
+ 'haskell-utf8-string=0.3.7-2' 'haskell-dataenc=0.14.0.3-2'
+ 'haskell-hslogger=1.1.5-7')
+source=(http://download.gna.org/hedgewars/hedgewars-src-$pkgver.tar.bz2
+ hedgewars.desktop
+ hedgewars.png)
+md5sums=('77c0bc4bc664604adbba67fab606d8f1'
+ '48c66a3204d4fa0a69e9aa46f7c31e0c'
+ 'eeb14d50df39063549ac5eca9dbc65d1')
+
+build() {
+ cd $pkgname-src-$pkgver
+
+# sed -i 's|.*misc/liblua.*||' CMakeLists.txt
+
+ cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DDATA_INSTALL_DIR=/usr/share \
+ -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake \
+ -DQT_MOC_EXECUTABLE=/usr/bin/moc \
+ -DWITH_SERVER=1 .
+
+ make
+}
+
+package() {
+ cd $pkgname-src-$pkgver
+
+ make DESTDIR=$pkgdir install
+
+ install -D -m644 Fonts_LICENSE.txt $pkgdir/usr/share/licenses/$pkgname/Fonts_LICENSE.txt
+ install -D -m644 $srcdir/hedgewars.png $pkgdir/usr/share/pixmaps/hedgewars.png
+ install -D -m644 $srcdir/hedgewars.desktop $pkgdir/usr/share/applications/hedgewars.desktop
+}
diff --git a/community-staging/hedgewars/hedgewars.desktop b/community-staging/hedgewars/hedgewars.desktop
new file mode 100644
index 000000000..9d74ed3f1
--- /dev/null
+++ b/community-staging/hedgewars/hedgewars.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Type=Application
+Name=Hedgewars
+GenericName=Platform Game
+Comment=Worms style game
+Exec=hedgewars
+Icon=hedgewars
+Categories=Game;ArcadeGame; \ No newline at end of file
diff --git a/community-staging/hedgewars/hedgewars.png b/community-staging/hedgewars/hedgewars.png
new file mode 100644
index 000000000..60ae66199
--- /dev/null
+++ b/community-staging/hedgewars/hedgewars.png
Binary files differ
diff --git a/community-testing/mashup/PKGBUILD b/community-testing/mashup/PKGBUILD
new file mode 100644
index 000000000..d1d1bacd0
--- /dev/null
+++ b/community-testing/mashup/PKGBUILD
@@ -0,0 +1,30 @@
+# Contributor: Stefan Husmann <stefan-husmann@t-online.de>
+# Maintainer: Stefan Husmann <stefan-husmann@t-online.de>
+
+pkgname=mashup
+pkgver=3.5
+pkgrel=3
+pkgdesc="Adjusting images on a sheet of paper for printing"
+url="http://kornelix.squarespace.com/$pkgname"
+arch=('i686' 'x86_64')
+license=('GPL3')
+depends=('gtk3')
+replaces=('printoxx')
+source=("http://kornelix.squarespace.com/storage/downloads/$pkgname-$pkgver.tar.gz")
+md5sums=('454b08e5589f93b3bdd4577c2578ae36')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ sed -i 's+xdg-deskto+#xdg-deskto+' Makefile
+ sed -i 's/--libs gtk+-3.0/--libs gtk+-3.0 gthread-2.0/' Makefile
+ make PREFIX=/usr
+}
+
+package() {
+ cd $srcdir/$pkgname-$pkgver
+ install -Dm644 desktop $pkgdir/usr/share/applications/$pkgname.desktop
+ make DESTDIR=$pkgdir install
+ rm $pkgdir/usr/share/applications/kornelix-$pkgname.desktop
+ rm $pkgdir/usr/share/doc/$pkgname/$pkgname.man
+}
+
diff --git a/community-testing/sage-mathematics/PKGBUILD b/community-testing/sage-mathematics/PKGBUILD
new file mode 100644
index 000000000..24300f2e9
--- /dev/null
+++ b/community-testing/sage-mathematics/PKGBUILD
@@ -0,0 +1,103 @@
+# $Id: PKGBUILD 74291 2012-07-23 15:07:41Z dwallace $
+# Maintainer: Daniel Wallace <danielwallace at gtmanfred dot com>
+# Contributor: Antonio Rojas < nqn1976 @ gmail.com >
+# Contributor: Thomas Dziedzic < gostrc at gmail >
+# Contributor: Osman Ugus <ugus11@yahoo.com>
+# Contributor: Stefan Husmann <stefan-husmann@t-online.de>
+# Special thanks to Nareto for moving the compile from the .install to the PKGBUILD
+
+pkgname=sage-mathematics
+pkgver=5.1
+pkgrel=3
+pkgdesc='SAGE: Open Source Mathematics Software, a viable free alternative to Magma, Maple, Mathematica, and Matlab.'
+url='http://www.sagemath.org'
+arch=('i686' 'x86_64')
+license=('GPL')
+#depends=('readline')
+makedepends=('gcc-fortran' 'desktop-file-utils')
+optdepends=('imagemagick: some plotting functionality benefits from it'
+ 'texlive-core: some plotting functionality benefits from it, also to use SageTeX'
+ 'openssh: to use the notebook in secure mode'
+ 'ffmpeg: to show animations'
+ 'jsmath-fonts: native TeX fonts for the notebook')
+options=('!makeflags')
+install="${pkgname}.install"
+source=("http://sage.math.washington.edu/home/release/sage-${pkgver}/sage-${pkgver}.tar"
+ 'SAGE-notebook.desktop')
+
+build() {
+ cd sage-${pkgver}
+
+ # fix "missing sage.all error" during build
+ unset CFLAGS
+ unset CXXFLAGS
+
+ # fix build errors
+ unset LDFLAGS
+
+ # don't build GCC
+ export SAGE_INSTALL_GCC='no'
+
+ # enable multiple threads while building, is this really needed? check if uses MAKEFLAGS
+ export SAGE_BUILD_THREADS=$(lscpu | awk '/^CPU\(s\):/ { print $2 }')
+ export MAKE="make -j${SAGE_BUILD_THREADS}"
+
+ # use archlinux's fortran rather then the one that ships with sage to compile sage's fortran
+ export SAGE_FORTRAN='/usr/bin/gfortran'
+ export SAGE_FORTRAN_LIB='/usr/lib/libgfortran.so'
+
+ # disable building with debugging support
+ export SAGE_DEBUG='no'
+
+ # enable fat binaries (disables processor specific optimizations)
+ # comment out if you're only building it for yourself
+ export SAGE_FAT_BINARY='yes'
+
+ # can't write to root in a clean chroot
+ export DOT_SAGE='/build/src/'
+
+ # only build sage, no documents
+ #make build
+ make
+}
+
+<< COMMENT
+check() {
+ cd sage-${pkgver}
+
+ # uncomment if we want to run all the tests (warning: very long)
+ #make ptestlong
+}
+COMMENT
+
+package() {
+ cd sage-${pkgver}
+
+ # cp because make install is experimental and will corrupt the install
+ install -d ${pkgdir}/opt/sage
+ cp -dpr --no-preserve=ownership * ${pkgdir}/opt/sage
+
+ # move SageTeX files to more appropriate directory
+ install -d ${pkgdir}/usr/share
+ mv ${pkgdir}/opt/sage/local/share/texmf \
+ ${pkgdir}/usr/share
+
+ desktop-file-install ${srcdir}/SAGE-notebook.desktop \
+ --dir ${pkgdir}/usr/share/applications
+
+ # create link to main binary
+ install -d ${pkgdir}/usr/bin
+ ln -s /opt/sage/sage ${pkgdir}/usr/bin/sage
+
+ # remove build logs
+ rm -f ${pkgdir}/opt/sage/*.log
+ rm -rf ${pkgdir}/opt/sage/spkg/logs
+
+ # remove source packages, since they are rarely needed, they are 300mb in size (compressed)
+ rm -f ${pkgdir}/opt/sage/spkg/base/*spkg
+ rm -f ${pkgdir}/opt/sage/spkg/standard/*spkg
+}
+
+# vim :set ts=2 sw=2 et:
+md5sums=('fa612f36387218d07b84f76995914c93'
+ 'dc391f12b7d17dd37326343ec0e99bbd')
diff --git a/community-testing/sage-mathematics/SAGE-notebook.desktop b/community-testing/sage-mathematics/SAGE-notebook.desktop
new file mode 100644
index 000000000..26a35d3ac
--- /dev/null
+++ b/community-testing/sage-mathematics/SAGE-notebook.desktop
@@ -0,0 +1,19 @@
+[Desktop Entry]
+Version=1.0
+Name=SAGE
+Comment=SAGE NOTEBOOK
+Comment[en_US]=SAGE NOTEBOOK
+Exec=/opt/sage/sage -notebook
+GenericName=
+GenericName[de]=
+Icon=/opt/sage/data/extcode/notebook/images/sageicon.png
+MimeType=
+Name[de]=SAGE
+StartupNotify=true
+Terminal=true
+Type=Application
+Categories=Science;Math;
+X-DCOP-ServiceType=
+X-KDE-SubstituteUID=false
+X-KDE-Username=
+GenericName[en_US]=
diff --git a/community-testing/sage-mathematics/sage-mathematics.install b/community-testing/sage-mathematics/sage-mathematics.install
new file mode 100644
index 000000000..6caa5299e
--- /dev/null
+++ b/community-testing/sage-mathematics/sage-mathematics.install
@@ -0,0 +1,56 @@
+post_install() {
+ cd /opt/sage
+
+ # set HOME because when sage updates its sage_root (after being moved) it will write files to ~/.sage with root ownership
+ # the files it writes to ~/.sage can be safely ignored
+ HOME=/tmp ./sage -c
+
+ # add sagemath user for the daemon
+ useradd -r -c 'Sage daemon' -d /opt/sage -s /bin/false sagemath
+
+ # Update LaTeX db to point to SageTeX
+ if [ -f /usr/bin/texhash ]; then
+ /usr/bin/texhash /usr/share/texmf
+ else
+ echo 'Warning: could not find /usr/bin/texhash'
+ echo 'SageTeX has been installed but you need to run:'
+ echo '# texhash /usr/share/texmf'
+ echo 'So that LaTeX will be able to find it.'
+ fi
+
+echo '
+ ___
+/ (_) o |
+\__ _ _ __ |
+/ / |/ | | / \_| | |
+\___/ | |_/|/\__/ \_/|/o
+ /| /|
+ \| \|
+ ________________________________
+< sage-mathematics, I mean, MOO! >
+ --------------------------------
+ \ ^__^
+ \ (oo)\_______
+ (__)\ )\/\
+ ||----w |
+ || ||
+'
+
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ # Update LaTeX db to remove SageTeX entries
+ if [ -f /usr/bin/texhash ]; then
+ /usr/bin/texhash /usr/share/texmf
+ fi
+
+ # remove the sagemath daemon user
+ userdel sagemath
+
+ # clean up left overs
+ rm -rf /opt/sage
+}
diff --git a/community-testing/tp_smapi/PKGBUILD b/community-testing/tp_smapi/PKGBUILD
new file mode 100644
index 000000000..071d7edab
--- /dev/null
+++ b/community-testing/tp_smapi/PKGBUILD
@@ -0,0 +1,58 @@
+# Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de>
+# Contributor: xduugu
+# Contributor: nh2
+# Contributor: Steven Davidovitz <steviedizzle ð gmail đ com>
+# Contributor: Nick B <Shirakawasuna ð gmail đ com>
+# Contributor: Christof Musik <christof ð senfdax đ de>
+# Contributor: Stefan Rupp <archlinux ð stefanrupp đ de>
+# Contributor: Ignas Anikevicius <anikevicius ð gmail đ com>
+
+pkgname=tp_smapi
+pkgver=0.41
+pkgrel=4
+pkgdesc="Modules for ThinkPad's SMAPI functionality"
+arch=('i686' 'x86_64')
+url='https://github.com/evgeni/tp_smapi'
+license=('GPL')
+depends=('linux>=3.5' 'linux<3.6')
+makedepends=('linux-headers>=3.5' 'linux-headers<3.6')
+install="${pkgname}.install"
+source=("https://github.com/downloads/evgeni/${pkgname}/${pkgname}-${pkgver}.tar.gz")
+md5sums=('63c683415c764568f6bf17c7eabe4752')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ _kernver=${_kernver:-$(uname -r)}
+ _extramodules=$(readlink -f "/usr/lib/modules/${_kernver}/extramodules" || true)
+ _kernver=$(< "${_extramodules}/version")
+
+ sed -ri -e "s/^(KVER\s*:=).*$/\1 ${_kernver}/" \
+ -e "s#^(KBASE\s*:=).*\$#\1 ${_extramodules%/*}/${_kernver}#" Makefile
+
+ make HDAPS=1
+}
+
+package() {
+ _kernver=${_kernver:-$(uname -r)}
+ _extramodules=$(readlink -f "/usr/lib/modules/${_kernver}/extramodules" || true)
+ _kernver=$(< "${_extramodules}/version")
+
+ make -C "${_extramodules%/*}/${_kernver}/build" \
+ INSTALL_MOD_PATH="${pkgdir}/${_extramodules%%/lib/*}" \
+ M="${srcdir}/${pkgname}-${pkgver}" modules_install
+
+ cd "${pkgdir}/${_extramodules%/*}"
+ mv "${_kernver}/extra" "${_extramodules##*/}"
+ rmdir "${_kernver}"
+
+ # compress kernel modules
+ find "${pkgdir}" -name "*.ko" -exec gzip -9 {} +
+
+ # load module on startup
+ echo tp_smapi > "${srcdir}/${pkgname}.conf"
+ install -Dm644 "${srcdir}/${pkgname}.conf" "${pkgdir}/usr/lib/modules-load.d/${pkgname}.conf"
+
+ # update kernel version in install file
+ sed -ri "s#^(extramodules=).*\$#\1${_extramodules}#" "${startdir}/${pkgname}.install"
+}
diff --git a/community-testing/tp_smapi/tp_smapi.install b/community-testing/tp_smapi/tp_smapi.install
new file mode 100644
index 000000000..5fe1bab90
--- /dev/null
+++ b/community-testing/tp_smapi/tp_smapi.install
@@ -0,0 +1,13 @@
+extramodules=/usr/lib/modules/extramodules-3.5-ARCH
+
+post_install() {
+ depmod -v $(< "$extramodules/version") &>/dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/community/apper/PKGBUILD b/community/apper/PKGBUILD
index 1f5df85bb..5fa8a5cca 100644
--- a/community/apper/PKGBUILD
+++ b/community/apper/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 71050 2012-05-22 16:21:01Z idevolder $
+# $Id: PKGBUILD 74244 2012-07-23 06:20:32Z idevolder $
# Maintainer: BlackIkeEagle < ike DOT devolder AT gmail DOT com >
# Contributor: Valeriy Lyasotskiy <onestep@ukr.net>
# Contributor: Zom <zom@eevul.org>
@@ -6,7 +6,7 @@
pkgname=apper
_pkgmainver=0.7
pkgver=0.7.2
-pkgrel=1
+pkgrel=3
pkgdesc="KDE tools for PackageKit"
arch=('i686' 'x86_64')
url="http://kde-apps.org/content/show.php/Apper?content=84745"
diff --git a/community/aria2/PKGBUILD b/community/aria2/PKGBUILD
index b153822ac..bc4b19162 100644
--- a/community/aria2/PKGBUILD
+++ b/community/aria2/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 71517 2012-05-28 04:56:49Z bpiotrowski $
+# $Id: PKGBUILD 74226 2012-07-23 03:08:17Z allan $
# Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
# Contributor: Thomas Dziedzic < gostrc at gmail >
# Contributor: Angel Velasquez <angvp@archlinux.org>
@@ -7,7 +7,7 @@
pkgname=aria2
pkgver=1.15.1
-pkgrel=1
+pkgrel=2
pkgdesc='Download utility that supports HTTP(S), FTP, BitTorrent, and Metalink'
arch=('i686' 'x86_64' 'mips64el')
url='http://aria2.sourceforge.net/'
diff --git a/community/assimp/PKGBUILD b/community/assimp/PKGBUILD
index 8dc5bff69..215c165f5 100644
--- a/community/assimp/PKGBUILD
+++ b/community/assimp/PKGBUILD
@@ -2,21 +2,22 @@
# Contributor: jepaan <jepaan at hotmail dot com>
pkgname=assimp
-pkgver=2.0.863
+pkgver=3.0
pkgrel=1
pkgdesc="Portable Open Source library to import various well-known 3D model formats in an uniform manner"
arch=('i686' 'x86_64')
license=('BSD')
-makedepends=('cmake' 'boost')
+depends=('libxmu')
+makedepends=('cmake' 'boost' 'freeglut')
url=('http://assimp.sourceforge.net/index.html')
-source=("http://downloads.sourceforge.net/assimp/assimp--${pkgver}-sdk.zip")
-md5sums=('9f41662501bd9d9533c4cf03b7c25d5b')
+source=("http://downloads.sourceforge.net/assimp/assimp-${pkgver}-src.tar.gz")
+md5sums=('2cb57a3f9c9930dc3320a93670ec6fdf')
build() {
cd ${srcdir}
mkdir build
cd build
- cmake ../${pkgname}--${pkgver}-sdk \
+ cmake ../${pkgname}-${pkgver} \
-DCMAKE_INSTALL_PREFIX=/usr
make
}
@@ -25,5 +26,5 @@ package() {
cd ${srcdir}/build
make DESTDIR=$pkgdir install
- install -Dm644 ${srcdir}/${pkgname}--${pkgver}-sdk/LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ install -Dm644 ${srcdir}/${pkgname}-${pkgver}/LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
}
diff --git a/community/cdfs/PKGBUILD b/community/cdfs/PKGBUILD
index 71b7c99f3..b3d15d3ea 100644
--- a/community/cdfs/PKGBUILD
+++ b/community/cdfs/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 73696 2012-07-14 13:06:31Z allan $
+# $Id: PKGBUILD 74190 2012-07-22 19:39:07Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: J. Santiago Hirschfeld <jsantiagoh@yahoo.com.ar>
diff --git a/community/cellwriter/PKGBUILD b/community/cellwriter/PKGBUILD
new file mode 100644
index 000000000..ebac22ee5
--- /dev/null
+++ b/community/cellwriter/PKGBUILD
@@ -0,0 +1,34 @@
+# Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de>
+# Contributor: Cilyan Olowen <gaknar@gmail.com>
+# Contributor: Alexander Markov <apsheronets@gmail.com>
+# Contributor: Winston Weinert
+
+pkgname=cellwriter
+pkgver=1.3.4
+pkgrel=6
+pkgdesc='A grid-entry natural handwriting input panel.'
+arch=('i686' 'x86_64')
+license=('GPL')
+url='http://v1.risujin.org/cellwriter/'
+depends=('gtk2' 'libxtst' 'libgnome' 'hicolor-icon-theme')
+source=("http://v1.risujin.org/pub/cellwriter/${pkgname}-${pkgver}.tar.gz"
+ "http://launchpadlibrarian.net/18959127/${pkgname}-${pkgver}-cellwidget-dont-disable-xinput.diff")
+md5sums=('72b4e552a32d6acd888da0b88aeebbdd'
+ '5e8c61309c5ec8f67f0af7bb5ceb1aea')
+install="${pkgname}.install"
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}/src"
+
+ patch -p0 < "${srcdir}/${pkgname}-${pkgver}-cellwidget-dont-disable-xinput.diff"
+
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ env LDFLAGS='-lX11' ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/community/cellwriter/cellwriter.install b/community/cellwriter/cellwriter.install
new file mode 100644
index 000000000..db21d5f09
--- /dev/null
+++ b/community/cellwriter/cellwriter.install
@@ -0,0 +1,14 @@
+post_install() {
+ echo "Updating GTK icon cache ..."
+ /usr/bin/gtk-update-icon-cache -f -t /usr/share/icons/hicolor
+}
+
+post_upgrade() {
+ echo "Updating GTK icon cache ..."
+ /usr/bin/gtk-update-icon-cache -f -t /usr/share/icons/hicolor
+}
+
+post_remove() {
+ echo "Updating GTK icon cache ..."
+ /usr/bin/gtk-update-icon-cache -f -t /usr/share/icons/hicolor
+}
diff --git a/community/darktable/PKGBUILD b/community/darktable/PKGBUILD
index be10ff296..b69c05901 100644
--- a/community/darktable/PKGBUILD
+++ b/community/darktable/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 71958 2012-06-04 07:52:39Z spupykin $
+# $Id: PKGBUILD 74306 2012-07-24 11:06:47Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Christian Himpel <chressie at gmail dot com>
# Contributor: Johannes Hanika <hanatos at gmail dot com>
pkgname=darktable
-pkgver=1.0.4
+pkgver=1.0.5
_pkgver=1.0
pkgrel=1
pkgdesc="Utility to organize and develop raw images"
@@ -19,7 +19,7 @@ optdepends=('librsvg')
install=darktable.install
options=(!libtool)
source=(http://downloads.sourceforge.net/project/darktable/darktable/${_pkgver}/darktable-$pkgver.tar.gz)
-md5sums=('244b7e3e2eb907f1602225b1b36a8b0c')
+md5sums=('9ad88a1a6b9761fce28c8073d8f47941')
build() {
cd $srcdir/$pkgname-$pkgver
diff --git a/community/deadbeef/PKGBUILD b/community/deadbeef/PKGBUILD
index 43246142d..cd0c4a365 100644
--- a/community/deadbeef/PKGBUILD
+++ b/community/deadbeef/PKGBUILD
@@ -1,15 +1,15 @@
-# $Id: PKGBUILD 73469 2012-07-08 09:29:55Z ibiru $
+# $Id: PKGBUILD 74372 2012-07-25 22:55:20Z lfleischer $
# Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de>
# Contributor: Alexey Yakovenko <waker@users.sourceforge.net>
pkgname=deadbeef
pkgver=0.5.5
-pkgrel=1
+pkgrel=2
pkgdesc='An audio player for GNU/Linux based on GTK2.'
arch=('i686' 'x86_64' 'mips64el')
url='http://deadbeef.sourceforge.net'
license=('GPL2')
-depends=('gtk2' 'alsa-lib' 'hicolor-icon-theme' 'desktop-file-utils')
+depends=('gtk3' 'alsa-lib' 'hicolor-icon-theme' 'desktop-file-utils')
makedepends=('libvorbis' 'libmad' 'flac' 'curl' 'imlib2' 'wavpack' 'libsndfile' 'libcdio' 'libcddb'
'libx11' 'faad2' 'zlib' 'intltool' 'pkgconfig' 'libpulse' 'libzip' 'libsamplerate')
[ "$CARCH" != "mips64el" ] && makedepends+=('yasm')
@@ -37,7 +37,7 @@ md5sums=('7cc10cefda0f4044eea897893e4cc1a9')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
- ./configure --prefix=/usr --disable-ffmpeg
+ ./configure --prefix=/usr --disable-ffmpeg --enable-gtk3
make
}
diff --git a/community/easystroke/PKGBUILD b/community/easystroke/PKGBUILD
new file mode 100644
index 000000000..e07fc5c7d
--- /dev/null
+++ b/community/easystroke/PKGBUILD
@@ -0,0 +1,31 @@
+# Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de>
+# Contributor: Kevin Sullivan <ksullivan@archlinux.us>
+
+pkgname=easystroke
+pkgver=0.5.5.1
+pkgrel=2
+pkgdesc='Use mouse gestures to initiate commands and hotkeys.'
+arch=('i686' 'x86_64')
+url='http://easystroke.sourceforge.net/'
+license=('custom:ISC')
+depends=('gtkmm' 'boost' 'libxtst' 'dbus-glib' 'xorg-server')
+makedepends=('inputproto' 'intltool' 'gettext' 'xorg-server-devel' 'help2man')
+install=easystroke.install
+source=("http://downloads.sourceforge.net/easystroke/${pkgname}-${pkgver}.tar.gz")
+md5sums=('ba989d1745415be94afd567e33d124bb')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ make
+ make man
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ make PREFIX=/usr DESTDIR="${pkgdir}" install
+
+ install -Dm0644 "${pkgname}.1" "${pkgdir}/usr/share/man/man1/${pkgname}.1"
+ install -Dm0644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/community/easystroke/easystroke.install b/community/easystroke/easystroke.install
new file mode 100644
index 000000000..a64ba07ee
--- /dev/null
+++ b/community/easystroke/easystroke.install
@@ -0,0 +1,13 @@
+pkgname=easystroke
+
+post_install() {
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ post_install $1
+}
diff --git a/community/fb-client/PKGBUILD b/community/fb-client/PKGBUILD
index f5640d46d..5392e5b05 100644
--- a/community/fb-client/PKGBUILD
+++ b/community/fb-client/PKGBUILD
@@ -1,6 +1,6 @@
# Maintainer: Florian "Bluewind" Pritz <flo@xssn.at>
pkgname=fb-client
-pkgver=1.0.3
+pkgver=1.0.4
pkgrel=1
pkgdesc="Client for paste.xinu.at"
arch=('i686' 'x86_64' 'mips64el')
@@ -9,8 +9,8 @@ license=('GPL3')
depends=('curl')
optdepends=('xclip: for automatically copying the URL into the clipboard')
source=(http://paste.xinu.at/data/client/fb-$pkgver.tar.gz{,.sig})
-md5sums=('d228e2475eaf0141ecff7c7a18ef97a1'
- '69e60c7c20360262a5cf0b902c0219b2')
+md5sums=('5b96884795a568dd07d7af3856427ea0'
+ 'e42a87b7c564c127d528fb34d596eacb')
build() {
cd "$srcdir/fb-$pkgver"
diff --git a/community/freerdp/PKGBUILD b/community/freerdp/PKGBUILD
index 916b521f9..ea583a75a 100644
--- a/community/freerdp/PKGBUILD
+++ b/community/freerdp/PKGBUILD
@@ -1,16 +1,16 @@
-# $Id: PKGBUILD 73472 2012-07-08 09:30:06Z ibiru $
+# $Id: PKGBUILD 74308 2012-07-24 11:07:33Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Stijn Segers <francesco dot borromini at gmail dot com>
pkgname=freerdp
pkgver=1.0.1
-pkgrel=5
+pkgrel=6
pkgdesc="Free RDP client"
arch=('i686' 'x86_64' 'mips64el')
url="http://freerdp.sourceforge.net"
license=('GPL')
depends=('openssl' 'libxcursor' 'libcups' 'alsa-lib' 'libxext' 'libxdamage'
- 'ffmpeg' 'libxkbfile' 'libxinerama' 'libxv')
+ 'ffmpeg' 'libxkbfile' 'libxinerama' 'libxv' 'libpulse')
makedepends=('krb5' 'cmake' 'damageproto' 'xmlto' 'docbook-xsl')
conflicts=('freerdp-git')
changelog=${pkgname}.changelog
@@ -20,7 +20,11 @@ md5sums=('c843185e0ff22ce8409954651718f338')
build() {
cd `find ${srcdir}/ -type d -name freerdp-\*`
- cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib .
+ cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DWITH_PULSEAUDIO=ON \
+ .
make
}
diff --git a/community/fwbuilder/PKGBUILD b/community/fwbuilder/PKGBUILD
index f1cd6f800..ae7574fdf 100644
--- a/community/fwbuilder/PKGBUILD
+++ b/community/fwbuilder/PKGBUILD
@@ -1,10 +1,11 @@
# $Id
-# Maintainer: Kevin Piche <kevin@archlinux.org>
+# Maintainer: BlackIkeEagle <ike DOT devolder AT gmail DOT com>
+# Contributor: Kevin Piche <kevin@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
pkgname=fwbuilder
pkgver=5.1.0.3599
-pkgrel=1
+pkgrel=2
pkgdesc="Object-oriented GUI and set of compilers for various firewall platforms"
url="http://www.fwbuilder.org/"
arch=('i686' 'x86_64' 'mips64el')
diff --git a/community/gambas3/PKGBUILD b/community/gambas3/PKGBUILD
index 205266d43..5420497c6 100644
--- a/community/gambas3/PKGBUILD
+++ b/community/gambas3/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 73734 2012-07-14 22:35:52Z lcarlier $
+# $Id: PKGBUILD 74141 2012-07-22 09:16:14Z lcarlier $
# Maintainer: Laurent Carlier <lordheavym@gmail.com>
# Contributor : sebikul <sebikul@gmail.com>
@@ -14,8 +14,8 @@ pkgname=('gambas3-runtime' 'gambas3-devel' 'gambas3-ide' 'gambas3-script' 'gamba
'gambas3-gb-qt4-opengl' 'gambas3-gb-qt4-webkit' 'gambas3-gb-report' 'gambas3-gb-sdl' 'gambas3-gb-sdl-sound' 'gambas3-gb-settings'
'gambas3-gb-signal' 'gambas3-gb-v4l' 'gambas3-gb-vb' 'gambas3-gb-xml' 'gambas3-gb-xml-html' 'gambas3-gb-xml-rpc'
'gambas3-gb-xml-xslt' 'gambas3-gb-web')
-pkgver=3.2.0
-pkgrel=2
+pkgver=3.2.1
+pkgrel=1
pkgdesc="A free development environment based on a Basic interpreter."
arch=('i686' 'x86_64' 'mips64el')
url="http://gambas.sourceforge.net/"
@@ -29,18 +29,14 @@ makedepends=('intltool' 'mysql' 'postgresql' 'libffi' 'bzip2' 'glib2' 'v4l-utils
'gsl' 'gstreamer0.10' 'gstreamer0.10-base' 'gtkglext' 'ncurses' 'llvm')
options=('!emptydirs' '!makeflags')
source=("http://downloads.sourceforge.net/gambas/${pkgbase}-${pkgver}.tar.bz2"
- 'gambas3-script.install' 'gambas3-runtime.install' 'fix-typedef-structure.patch')
-md5sums=('3d1ee5bc2e1500a9b612be4c06d3d6a5'
+ 'gambas3-script.install' 'gambas3-runtime.install')
+md5sums=('e7aed820300ff8599e9f74029984f793'
'b284be39d147ec799f1116a6abc068b4'
- 'b5cc403990f31b8ea1c5cf37366d3d29'
- 'e4853f8aaeefefbabe714dc2e763dab6')
+ '6d9e080b66443e7246387b1716d24e31')
build() {
cd ${srcdir}/${pkgbase}-${pkgver}
- # fix redefinition of siginfo_t (merged upstream)
- patch -Np3 -i ${srcdir}/fix-typedef-structure.patch
-
./reconf-all
./configure --prefix=/usr -C
@@ -1174,10 +1170,8 @@ package_gambas3-gb-xml-rpc() {
##
- # BUG: rpc component need the xml gambas3 component to be built/installed before!
cd ${srcdir}/${pkgbase}-${pkgver}/gb.xml
make XDG_UTILS='' DESTDIR="${pkgdir}" install
- make XDG_UTILS='' DESTDIR="${pkgdir}" install
## cleanup the workaround
cd ${srcdir}/${pkgbase}-${pkgver}/gb.net
@@ -1186,12 +1180,10 @@ package_gambas3-gb-xml-rpc() {
make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
cd ${srcdir}/${pkgbase}-${pkgver}/main
make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
- # BUG: rpc component need the xml gambas3 component to be built/installed before!
rm ${pkgdir}/usr/lib/gambas3/gb.xml.[c-l]*
rm ${pkgdir}/usr/lib/gambas3/gb.xml.[s-x]*
rm ${pkgdir}/usr/share/gambas3/info/gb.xml.[h-l]*
rm ${pkgdir}/usr/share/gambas3/info/gb.xml.xslt.*
- # BUG
##
}
diff --git a/community/gambas3/gambas3-runtime.install b/community/gambas3/gambas3-runtime.install
index 6c8201a6a..cfb5812fe 100644
--- a/community/gambas3/gambas3-runtime.install
+++ b/community/gambas3/gambas3-runtime.install
@@ -1,6 +1,6 @@
post_install() {
xdg-icon-resource install --context mimetypes --size 64 \
- /usr/share/gambas3/mime/application-x-gambas.png application-x-gambas3
+ /usr/share/gambas3/mime/application-x-gambas3.png application-x-gambas3
xdg-mime install /usr/share/gambas3/mime/application-x-gambas3.xml
}
diff --git a/community/kadu/PKGBUILD b/community/kadu/PKGBUILD
index 6a40922d5..23783f2b9 100644
--- a/community/kadu/PKGBUILD
+++ b/community/kadu/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 72896 2012-06-24 16:12:42Z bpiotrowski $
+# $Id: PKGBUILD 74225 2012-07-23 03:08:13Z allan $
# Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
# Contributor: Mateusz Herych
# Contributor: Jaroslaw Swierczynski <swiergot@aur.archlinux.org>
pkgname=kadu
pkgver=0.12.0
-pkgrel=1
+pkgrel=2
pkgdesc="A Qt-based Jabber/XMPP and Gadu-Gadu client"
arch=('i686' 'x86_64' 'mips64el')
url="http://www.kadu.net/"
diff --git a/community/kpartsplugin/PKGBUILD b/community/kpartsplugin/PKGBUILD
index 6ba4139ed..20b315a19 100644
--- a/community/kpartsplugin/PKGBUILD
+++ b/community/kpartsplugin/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 72379 2012-06-13 10:58:19Z tredaelli $
+# $Id: PKGBUILD 74287 2012-07-23 14:13:38Z tredaelli $
# Maintainer: Timothy Redaelli <timothy.redaelli@gmail.com>
# Contributor: birdflesh <antkoul at gmail dot com>
# Contributor: Frikilinux <frikilinux at frikilinux.com.ar>
pkgname=kpartsplugin
-pkgver=20120605
+pkgver=20120723
pkgrel=1
pkgdesc="This plugin uses KDE's KParts to embed file viewers into non-KDE browsers"
arch=('i686' 'x86_64' 'mips64el')
@@ -12,7 +12,7 @@ license=('GPL3' 'BSD')
depends=('kdelibs')
makedepends=('automoc4' 'cmake')
source=("${url}${pkgname}-${pkgver}.tar.bz2" "LICENSE")
-md5sums=('c6deb7b58b0bac9e5ef89afee83ef17c'
+md5sums=('cf94ee866a934da97a04cd1619e16099'
'c4cc811349e40e9f34e77e27b902ad96')
build(){
diff --git a/community/libcec/PKGBUILD b/community/libcec/PKGBUILD
index 8bcffba76..923548cc8 100644
--- a/community/libcec/PKGBUILD
+++ b/community/libcec/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 73164 2012-07-02 16:36:19Z idevolder $
+# $Id: PKGBUILD 74248 2012-07-23 06:33:04Z idevolder $
# Maintainer: BlackIkeEagle <ike DOT devolder AT gmail DOT com>
# Contributor: Philippe Cherel <philippe.cherel@mayenne.org>
pkgname=libcec
pkgver=1.7.1
-pkgrel=1
+pkgrel=2
pkgdesc="Pulse-Eight's libcec for the Pulse-Eight USB-CEC adapter"
arch=('i686' 'x86_64')
url="https://github.com/Pulse-Eight/libcec"
diff --git a/community/libdaq/PKGBUILD b/community/libdaq/PKGBUILD
index ff67ab6ab..83cc6f1b7 100644
--- a/community/libdaq/PKGBUILD
+++ b/community/libdaq/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 66392 2012-02-24 12:43:11Z lfleischer $
+# $Id: PKGBUILD 74193 2012-07-22 19:47:13Z lfleischer $
# Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de>
pkgname=libdaq
-pkgver=0.6.2
-pkgrel=2
+pkgver=1.1.1
+pkgrel=1
pkgdesc='Data Acquisition library for packet I/O.'
arch=('i686' 'x86_64' 'mips64el')
url='http://www.snort.org/'
@@ -11,8 +11,9 @@ license=('GPL')
depends=('libpcap')
makedepends=('ca-certificates')
options=('!libtool')
-source=("http://www.snort.org/dl/snort-current/daq-${pkgver}.tar.gz")
-md5sums=('6ea8aaa6f067f8b8ef6de45b95d55875')
+source=("http://www.snort.org/dl/snort-current/daq-${pkgver}.tar.gz"{,.sig})
+md5sums=('bc204ea09165b4ecbb1bb49c7c1a2ad4'
+ '3ec4c252249b09adaf5c96e2626a1f74')
build() {
cd "${srcdir}/daq-${pkgver}"
diff --git a/community/libmicrohttpd/PKGBUILD b/community/libmicrohttpd/PKGBUILD
index 499eabe5a..43949e366 100644
--- a/community/libmicrohttpd/PKGBUILD
+++ b/community/libmicrohttpd/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 71678 2012-06-01 08:24:00Z spupykin $
+# $Id: PKGBUILD 74172 2012-07-22 18:30:33Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Norberto Lopes <shelika@mail.telepac.pt>
# Contributor: Kao Dome <kaodome@gmail.com>
@@ -6,7 +6,7 @@
# Contributor: Mathias Rohnstock <linksoft@gmx.de>
pkgname=libmicrohttpd
-pkgver=0.9.20
+pkgver=0.9.21
pkgrel=1
pkgdesc="a small C library that is supposed to make it easy to run an HTTP server as part of another application."
arch=('i686' 'x86_64' 'mips64el')
@@ -16,7 +16,7 @@ options=('!libtool')
depends=('gnutls' 'libgcrypt')
install=libmicrohttpd.install
source=(ftp://ftp.gnu.org/gnu/libmicrohttpd/$pkgname-$pkgver.tar.gz)
-md5sums=('ede6ad4a07a8a0794c42e4ef356ee27c')
+md5sums=('2bf97219d1137d26711ead48d11ebcdd')
build() {
cd ${pkgname}-${pkgver}
diff --git a/community/libtorrent/PKGBUILD b/community/libtorrent/PKGBUILD
index 26cc76268..69383dcda 100644
--- a/community/libtorrent/PKGBUILD
+++ b/community/libtorrent/PKGBUILD
@@ -5,7 +5,7 @@
pkgname=libtorrent
pkgver=0.13.2
-pkgrel=1
+pkgrel=2
pkgdesc='BitTorrent library with a focus on high performance and good code'
url='http://libtorrent.rakshasa.no/'
license=('GPL')
diff --git a/community/libwebp/PKGBUILD b/community/libwebp/PKGBUILD
index 3343279fe..4606413a0 100644
--- a/community/libwebp/PKGBUILD
+++ b/community/libwebp/PKGBUILD
@@ -3,8 +3,8 @@
# Contributor: Jon Nordby <jononor@gmail.com>
pkgname=libwebp
-pkgver=0.1.3
-pkgrel=2
+pkgver=0.1.99
+pkgrel=1
pkgdesc="WebP library and conversion tools"
arch=('x86_64' 'i686' 'mips64el')
url="http://code.google.com/intl/en/speed/webp/"
@@ -12,7 +12,7 @@ license=('BSD')
depends=('libpng' 'libjpeg')
options=('!libtool')
source=("http://webp.googlecode.com/files/$pkgname-$pkgver.tar.gz")
-sha256sums=('40b18456e39b2822311b0ea161d6f09507cf5e8e937b02b9be3ee994ded67aba')
+sha256sums=('5c98c4ad2af3649fa856ae44207aeb0ee559271e38cedfd10b25976c55cbea24')
build() {
cd "$srcdir/$pkgname-$pkgver"
diff --git a/community/linuxdoc-tools/PKGBUILD b/community/linuxdoc-tools/PKGBUILD
new file mode 100644
index 000000000..22c533374
--- /dev/null
+++ b/community/linuxdoc-tools/PKGBUILD
@@ -0,0 +1,23 @@
+# $Id$
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: David Ell <david at bytesizebits dot net>
+
+pkgname=linuxdoc-tools
+pkgver=0.9.68
+pkgrel=1
+pkgdesc="Convert LinuxDoc SGML source into other formats"
+arch=('i686' 'x86_64')
+url="http://packages.debian.org/sid/linuxdoc-tools"
+license=('GPL')
+depends=('jade')
+optdepends=('groff' 'texlive-bin')
+source=(http://ftp.de.debian.org/debian/pool/main/l/${pkgname}/${pkgname}_${pkgver}.tar.gz)
+md5sums=('68434f800ab3b68f44da790cc61cf766')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ sed -i '/extern int yyleng;/d' rtf-fix/rtf2rtf.l
+ ./configure --prefix=/usr --mandir=/usr/share/man
+ make
+ make DESTDIR="$pkgdir/" install
+}
diff --git a/community/mariadb/PKGBUILD b/community/mariadb/PKGBUILD
index 3376d8fc2..39a7feba4 100644
--- a/community/mariadb/PKGBUILD
+++ b/community/mariadb/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 72987 2012-06-26 14:18:03Z bpiotrowski $
+# $Id: PKGBUILD 74223 2012-07-23 03:08:05Z allan $
# Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
pkgbase=mariadb
pkgname=('libmariadbclient' 'mariadb-clients' 'mariadb')
pkgver=5.5.25
-pkgrel=1
+pkgrel=2
arch=('i686' 'x86_64')
license=('GPL')
url="http://mariadb.org/"
diff --git a/community/mathomatic/PKGBUILD b/community/mathomatic/PKGBUILD
index 96a7f0caa..8b5017bc1 100755
--- a/community/mathomatic/PKGBUILD
+++ b/community/mathomatic/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 73102 2012-07-01 10:04:33Z ttopper $
+# $Id: PKGBUILD 74240 2012-07-23 05:41:33Z ttopper $
# Contributor: G_Syme <demichan(at)mail(dot)upb(dot)de>
# Contributor: Stefan Husmann <stefan-husmann@t-online.de>
# Maintainer: Thorsten Töpper <atsutane-tu@freethoughts.de>
pkgname=mathomatic
-pkgver=16.0.0
+pkgver=16.0.1
pkgrel=1
pkgdesc="General purpose Computer Algebra System written in C"
arch=('i686' 'x86_64' 'mips64el')
@@ -17,7 +17,7 @@ optdepends=('python2: for running /usr/share/doc/mathomatic/factorial/factorial'
'm4: for complex operations using the matho script'
'gnuplot: for plotting')
source=(http://mathomatic.org/$pkgname-$pkgver.tar.bz2)
-md5sums=('a349471e997afcfa222964692780b567')
+md5sums=('550c4c27da68db1d3d62ed2888828548')
build() {
cd "$srcdir"/$pkgname-$pkgver
diff --git a/community/moreutils/PKGBUILD b/community/moreutils/PKGBUILD
index a67df55bf..f2996f957 100644
--- a/community/moreutils/PKGBUILD
+++ b/community/moreutils/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 72927 2012-06-25 09:00:21Z spupykin $
+# $Id: PKGBUILD 74174 2012-07-22 18:31:30Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Alessio 'mOLOk' Bolognino <themolok@gmail.com>
pkgname=moreutils
-pkgver=0.46
+pkgver=0.47
pkgrel=1
pkgdesc="A growing collection of the unix tools that nobody thought to write thirty years ago"
arch=('i686' 'x86_64' 'mips64el')
@@ -15,7 +15,7 @@ optdepends=('perl-timedate' 'perl-time-duration' 'perl-ipc-run')
options=('!emptydirs' 'zipman')
replaces=(moreutils-svn)
source=(http://ftp.de.debian.org/debian/pool/main/m/moreutils/moreutils_$pkgver.tar.gz)
-md5sums=('658f9cc6b6dcc0b50dcff714e13b22dc')
+md5sums=('4cd3b41a90d07166632942e173ac5ce2')
build() {
cd $srcdir/moreutils
diff --git a/community/nbd/PKGBUILD b/community/nbd/PKGBUILD
index 8714f8c41..62e927ec3 100644
--- a/community/nbd/PKGBUILD
+++ b/community/nbd/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 73924 2012-07-17 05:54:37Z svenstaro $
+# $Id: PKGBUILD 74302 2012-07-24 10:33:15Z svenstaro $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Christian Hesse <mail@eworm.de>
# Contributor: Ionut Biru <ibiru@archlinux.org>
@@ -6,7 +6,7 @@
pkgname=nbd
pkgver=3.2
-pkgrel=2
+pkgrel=3
pkgdesc="tools for network block devices, allowing you to use remote block devices over TCP/IP"
arch=('i686' 'x86_64' 'mips64el')
url="http://nbd.sourceforge.net"
@@ -24,7 +24,7 @@ md5sums=('9cafce4ecfb55e670d7ded4c8f4e6bc9'
build(){
cd "${srcdir}/${pkgname}-${pkgver}"
- ./configure --prefix=/usr --sysconfdir=/etc
+ ./configure --prefix=/usr --sysconfdir=/etc --enable-syslog
make
}
diff --git a/community/ncmpcpp/PKGBUILD b/community/ncmpcpp/PKGBUILD
index 0461a6b78..5891c13d4 100644
--- a/community/ncmpcpp/PKGBUILD
+++ b/community/ncmpcpp/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 69024 2012-04-08 09:31:15Z bpiotrowski $
+# $Id: PKGBUILD 74221 2012-07-23 03:07:58Z allan $
# Maintainer: Bartłomiej Piotrowski
# Contributor: Mateusz Herych <heniekk@gmail.com>
# Contributor: Army <uli[dot]armbruster[at]gmail[dot]com>
pkgname=ncmpcpp
pkgver=0.5.10
-pkgrel=1
+pkgrel=2
pkgdesc="An almost exact clone of ncmpc with some new features."
arch=('i686' 'x86_64' 'mips64el')
url="http://unkart.ovh.org/ncmpcpp/"
diff --git a/community/netsurf/PKGBUILD b/community/netsurf/PKGBUILD
index 4443c5d8d..ee86ab0fa 100644
--- a/community/netsurf/PKGBUILD
+++ b/community/netsurf/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 71025 2012-05-21 22:37:32Z arodseth $
+# $Id: PKGBUILD 74163 2012-07-22 14:44:23Z arodseth $
# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Paulo Matias <matiasΘarchlinux-br·org>
# Contributor: Georgij Kondratjev <smpuj@bk.ru>
@@ -6,18 +6,18 @@
pkgname=netsurf
pkgver=2.9
-pkgrel=2
+pkgrel=3
pkgdesc="Lightweight and fast web browser"
arch=('i686' 'x86_64' 'mips64el')
url="http://www.netsurf-browser.org/"
license=('GPL')
-depends=('libmng' 'curl' 'libglade' 'librsvg' 'desktop-file-utils' 'libnsbmp' 'libnsgif' 'libcss>=0.1.2' 'hubbub>=0.1.2' 'libwebp')
+depends=('libmng' 'curl' 'libglade' 'librsvg' 'desktop-file-utils' 'libnsbmp' 'libnsgif' 'libcss>=0.1.2' 'hubbub>=0.1.2' 'libwebp>=0.1.99')
makedepends=('re2c' 'lcms' 'gendesk>=0.4.2')
provides=('netsurf')
conflicts=('netsurf')
install=netsurf.install
source=("netsurf.png::http://ubuntu.allmyapps.com/data/n/e/netsurf-netsurf-web-browser/icon_48x48_netsurf.png"
- "http://www.netsurf-browser.org/downloads/releases/$pkgname-$pkgver-src.tar.gz")
+ "http://download.$pkgname-browser.org/$pkgname/releases/source/$pkgname-$pkgver-src.tar.gz")
sha256sums=('f0dbcc5d80bf03d706aa8b28a322aa7f169a40813848c2d1505691f6e2c7ef00'
'f74767161fd7f3186e483b438a183f2ea3cae160020ad5dd63c75a4d78f5c797')
_exec=('netsurf %U')
diff --git a/community/nginx/PKGBUILD b/community/nginx/PKGBUILD
index 92006eadf..a6c022eb0 100644
--- a/community/nginx/PKGBUILD
+++ b/community/nginx/PKGBUILD
@@ -1,11 +1,14 @@
-# $Id: PKGBUILD 73240 2012-07-04 07:09:22Z bpiotrowski $
+# $Id: PKGBUILD 74220 2012-07-23 03:07:53Z allan $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Bartłomiej Piotrowski <barthalion@gmal.com>
# Contributor: Miroslaw Szot <mss@czlug.icis.pcz.pl>
+_cfgdir=/etc/nginx
+_tmpdir=/var/tmp/nginx
+
pkgname=nginx
pkgver=1.2.2
-pkgrel=1
+pkgrel=2
pkgdesc="lightweight HTTP server and IMAP/POP3 proxy server"
arch=('i686' 'x86_64' 'mips64el')
depends=('pcre' 'zlib' 'openssl')
@@ -14,27 +17,25 @@ optdepends=('passenger')
url="http://nginx.org"
license=('custom')
install=nginx.install
-backup=('etc/nginx/fastcgi.conf'
- 'etc/nginx/fastcgi_params'
- 'etc/nginx/koi-win'
- 'etc/nginx/koi-utf'
- 'etc/nginx/mime.types'
- 'etc/nginx/nginx.conf'
- 'etc/nginx/scgi_params'
- 'etc/nginx/uwsgi_params'
- 'etc/nginx/win-utf'
- 'etc/logrotate.d/nginx')
+backup=("${_cfgdir:1}/fastcgi.conf"
+ "${_cfgdir:1}/fastcgi_params"
+ "${_cfgdir:1}/koi-win"
+ "${_cfgdir:1}/koi-utf"
+ "${_cfgdir:1}/mime.types"
+ "${_cfgdir:1}/nginx.conf"
+ "${_cfgdir:1}/scgi_params"
+ "${_cfgdir:1}/uwsgi_params"
+ "${_cfgdir:1}/win-utf"
+ "etc/logrotate.d/nginx")
source=(http://nginx.org/download/nginx-$pkgver.tar.gz
- rc.d service
- nginx.logrotate)
+ rc.d
+ service
+ nginx.logrotate)
md5sums=('53105bbe3ac9319db54d9eb46119695b'
'f62c7c9b5a53471d4666a4c49ad363fb'
- '16c6b4cbe24001a3f4f58b9d5f4e3d4c'
+ '62d494d23aef31d0b867161f9fffa6eb'
'b38744739022876554a0444d92e6603b')
-_cfgdir=/etc/nginx
-_tmpdir=/var/tmp/nginx
-
build() {
cd "$srcdir"/$pkgname-$pkgver
@@ -82,8 +83,8 @@ package() {
make DESTDIR="$pkgdir" install
install -d "$pkgdir"/etc/logrotate.d
- install -m644 $srcdir/nginx.logrotate $pkgdir/etc/logrotate.d/nginx
-
+ install -m644 $srcdir/nginx.logrotate $pkgdir/etc/logrotate.d/nginx
+
sed -e 's|\<user\s\+\w\+;|user html;|g' \
-e '44s|html|/usr/share/nginx/html|' \
-e '54s|html|/usr/share/nginx/html|' \
@@ -93,8 +94,8 @@ package() {
install -dm1777 $pkgdir/var/tmp
install -d $pkgdir/$_tmpdir
- install -d $pkgdir/usr/share/nginx
- mv $pkgdir/etc/nginx/html/ $pkgdir/usr/share/nginx
+ install -d $pkgdir/usr/share/nginx
+ mv $pkgdir/etc/nginx/html/ $pkgdir/usr/share/nginx
install -D -m755 $srcdir/rc.d $pkgdir/etc/rc.d/nginx
install -Dm644 $srcdir/service $pkgdir/usr/lib/systemd/system/nginx.service
diff --git a/community/nginx/service b/community/nginx/service
index 78d0a492c..8e28f0cde 100644
--- a/community/nginx/service
+++ b/community/nginx/service
@@ -1,5 +1,6 @@
[Unit]
Description=A high performance web server and a reverse proxy server
+After=syslog.target network.target
[Service]
Type=forking
diff --git a/community/nodejs/PKGBUILD b/community/nodejs/PKGBUILD
index 73c2a678c..35a80fe69 100644
--- a/community/nodejs/PKGBUILD
+++ b/community/nodejs/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 74092 2012-07-20 09:07:43Z bpiotrowski $
+# $Id: PKGBUILD 74366 2012-07-25 20:56:41Z bpiotrowski $
# Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
# Contributor: Thomas Dziedzic < gostrc at gmail >
# Contributor: James Campos <james.r.campos@gmail.com>
@@ -8,8 +8,8 @@
# Contributor: TIanyi Cui <tianyicui@gmail.com>
pkgname=nodejs
-pkgver=0.8.3
-pkgrel=2
+pkgver=0.8.4
+pkgrel=1
pkgdesc='Evented I/O for V8 javascript'
arch=('i686' 'x86_64' 'mips64el')
url='http://nodejs.org/'
@@ -19,7 +19,7 @@ checkdepends=('curl') # curl used for check()
optdepends=('openssl: TLS support')
options=('!emptydirs')
source=("http://nodejs.org/dist/v${pkgver}/node-v${pkgver}.tar.gz")
-md5sums=('53604d2e3773d62e90fa5a340a362e08')
+md5sums=('ea44c0fa7a5f268bedfbea0ae1884db5')
build() {
cd node-v${pkgver}
diff --git a/community/parrot/PKGBUILD b/community/parrot/PKGBUILD
index 35af52e37..531a0e16c 100644
--- a/community/parrot/PKGBUILD
+++ b/community/parrot/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 73261 2012-07-04 14:01:36Z spupykin $
+# $Id: PKGBUILD 74176 2012-07-22 18:32:23Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: mpie <michael.kyne-phillips1@ntlworld.com>
pkgname=parrot
-pkgver=4.5.0
-#_rel=stable
-_rel=devel
+pkgver=4.6.0
+_rel=stable
+#_rel=devel
pkgrel=1
pkgdesc="Standalone VM that can execute bytecode compiled dynamic languages"
arch=('x86_64' 'i686' 'mips64el')
@@ -16,7 +16,7 @@ makedepends=('perl-json')
optdepends=('freeglut')
options=('!makeflags')
source=(ftp://ftp.parrot.org/pub/parrot/releases/$_rel/$pkgver/$pkgname-$pkgver.tar.bz2)
-md5sums=('8deb517792652d8b44442ebb5d289e2c')
+md5sums=('2acdf1855baf04f07bac6d6e307dcd0d')
build() {
cd "$srcdir/$pkgname-$pkgver"
diff --git a/community/pkgfile/PKGBUILD b/community/pkgfile/PKGBUILD
index 294a6143a..69d2c1bbc 100644
--- a/community/pkgfile/PKGBUILD
+++ b/community/pkgfile/PKGBUILD
@@ -1,8 +1,8 @@
-# $Id: PKGBUILD 74102 2012-07-20 22:53:30Z dreisner $
+# $Id: PKGBUILD 74339 2012-07-24 17:40:11Z dreisner $
# Maintainer: Dave Reisner <dreisner@archlinux.org>
pkgname=pkgfile
-pkgver=2
+pkgver=3
pkgrel=1
pkgdesc="a pacman .files metadata explorer"
arch=('i686' 'x86_64')
@@ -13,7 +13,7 @@ conflicts=('pkgtools<24-2')
makedepends=('perl')
source=("https://github.com/downloads/falconindy/$pkgname/$pkgname-$pkgver.tar.xz")
install=pkgfile.install
-md5sums=('815ee5ad6ca3c1f6262389f423319fa9')
+md5sums=('9e90510580b00a12d750809f8c2f34cd')
build() {
cd "$pkgname-$pkgver"
diff --git a/community/polipo/PKGBUILD b/community/polipo/PKGBUILD
index af904a78a..64051b066 100644
--- a/community/polipo/PKGBUILD
+++ b/community/polipo/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 72964 2012-06-25 17:08:53Z ttopper $
+# $Id: PKGBUILD 74295 2012-07-23 16:25:48Z ttopper $
# Maintainer: Thorsten Töpper <atsutane-tu@freethoughts.de>
# Contributor: Jelle van der Waa <jelle vdwaa nl>
# Contributor: Thomas Holmquist <thomas@vorget.com>
@@ -7,7 +7,7 @@
pkgname=polipo
pkgver=1.0.4.1
-pkgrel=5
+pkgrel=6
pkgdesc="A small and fast caching web proxy."
arch=('i686' 'x86_64' 'mips64el')
url="http://www.pps.jussieu.fr/~jch/software/polipo/"
@@ -19,7 +19,7 @@ source=("http://freehaven.net/~chrisd/polipo/polipo-$pkgver.tar.gz"
"polipo.cron" "polipo.rc.d" "polipo.conf.d" "polipo.service")
md5sums=('bfc5c85289519658280e093a270d6703'
'bac0e1a871964c931eb5f7a369b3243c'
- '8f096b7d77a71e0772ce71a8c8b1b3e3'
+ '7406aad26807fb3a4e5f7b01ecb97a59'
'685aa0c6070dee11c701932d23afcc6a'
'109d0e8c15d669281ff14f8991ad0ed8')
diff --git a/community/polipo/polipo.rc.d b/community/polipo/polipo.rc.d
index 260fab050..0333ded57 100644
--- a/community/polipo/polipo.rc.d
+++ b/community/polipo/polipo.rc.d
@@ -19,7 +19,7 @@ case "$1" in
[[ -f /run/$daemon_name.pid ]] &&
rm -f /run/$daemon_name.pid
# RUN
- sudo -u nobody /usr/bin/$daemon_name ${POLIPO_ARGS}
+ su -c "/usr/bin/$daemon_name ${POLIPO_ARGS}" -s /bin/sh - nobody
#
if [[ $? -gt 0 ]]; then
stat_fail
diff --git a/community/pptpd/PKGBUILD b/community/pptpd/PKGBUILD
index 4626fb0ea..b6d9382da 100644
--- a/community/pptpd/PKGBUILD
+++ b/community/pptpd/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 72984 2012-06-26 13:10:02Z spupykin $
+# $Id: PKGBUILD 74350 2012-07-25 10:18:29Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
pkgname=pptpd
pkgver=1.3.4
-pkgrel=8
+pkgrel=10
pkgdesc="Poptop server"
arch=(i686 x86_64 'mips64el')
url="http://poptop.sourceforge.net/"
@@ -18,10 +18,15 @@ md5sums=('b38df9c431041922c997c1148bedf591'
'cfa02c86d0413eb94fac15599986f54c')
build() {
+ local _pppver=`pacman -Q ppp`
+ _pppver=${_pppver%-*}
+ _pppver=${_pppver#ppp }
+
cd $srcdir/$pkgname-$pkgver
patch -p1 <$srcdir/unrecognized-opt.patch
autoreconf -i
./configure --prefix=/usr --libdir=/usr/lib --exec-prefix=/usr --mandir=/usr/share/man
+ sed -i "s|#define VERSION.*|#define VERSION \"${_pppver}\"|" plugins/patchlevel.h
make
sed -i 's|install -o root|install|g' plugins/Makefile
sed -i 's|?=|=|g' plugins/Makefile
@@ -31,7 +36,7 @@ package() {
cd $srcdir/$pkgname-$pkgver
make DESTDIR=$pkgdir install
mkdir -p $pkgdir/etc/
- echo -e "# Read man pptpd.conf, see samples in /usr/share/doc/pptpd\nand write your pptpd configuration here" >$pkgdir/etc/pptpd.conf
+ echo -e "# Read man pptpd.conf, see samples in /usr/share/doc/pptpd\n# and write your pptpd configuration here" >$pkgdir/etc/pptpd.conf
install -Dm0755 ../pptpd $pkgdir/etc/rc.d/pptpd
mkdir -p $pkgdir/usr/share/doc/pptpd
cp -a samples $pkgdir/usr/share/doc/pptpd/
diff --git a/community/python-pyopencl/LICENSE.txt b/community/python-pyopencl/LICENSE.txt
new file mode 100644
index 000000000..3ce400f9d
--- /dev/null
+++ b/community/python-pyopencl/LICENSE.txt
@@ -0,0 +1,20 @@
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
diff --git a/community/python-pyopencl/PKGBUILD b/community/python-pyopencl/PKGBUILD
new file mode 100644
index 000000000..cb5cd4e25
--- /dev/null
+++ b/community/python-pyopencl/PKGBUILD
@@ -0,0 +1,48 @@
+# $Id: PKGBUILD 74334 2012-07-24 17:36:16Z stephane $
+# Maintainer: Stéphane Gaudreault <stephane@archlinux.org>
+
+pkgbase=python-pyopencl
+pkgname=('python2-pyopencl' 'python-pyopencl')
+pkgver=2012.1
+pkgrel=3
+pkgdesc="A complete, object-oriented language binding of OpenCL to Python"
+arch=('i686' 'x86_64')
+url="http://mathema.tician.de/software/pyopencl"
+license=('custom')
+makedepends=('ctags' 'python2-distribute' 'python-distribute' 'libcl' 'opencl-headers' 'mesa' 'boost' 'python2-mako' 'python-mako' 'python-numpy' 'python2-numpy')
+source=("http://pypi.python.org/packages/source/p/pyopencl/pyopencl-${pkgver}.tar.gz"
+ 'LICENSE.txt')
+sha1sums=('ef2460d5e9b883d8afe0ec47863a243b6f8ac7ff'
+ '2e6966b3d9b15603ce2c3ff79eeadd63c5d066b7')
+
+build() {
+ cd "$srcdir"
+
+ cp -a pyopencl-$pkgver{,-python2}
+
+ cd "${srcdir}/pyopencl-${pkgver}"
+ python ./configure.py --cl-enable-gl --no-use-shipped-boost
+ python setup.py build
+
+ cd "$srcdir/pyopencl-$pkgver-python2"
+ python2 ./configure.py --cl-enable-gl --no-use-shipped-boost
+ python2 setup.py build
+
+}
+
+package_python-pyopencl() {
+ depends=('libcl' 'opencl-headers' 'mesa' 'boost' 'python' 'python-numpy' 'python-mako' 'python-pytools')
+
+ cd "${srcdir}/pyopencl-${pkgver}"
+ python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build
+
+ install -D -m644 ../LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+}
+package_python2-pyopencl() {
+ depends=('libcl' 'opencl-headers' 'mesa' 'boost' 'python2' 'python2-numpy' 'python2-mako' 'python2-pytools')
+
+ cd "${srcdir}/pyopencl-${pkgver}-python2"
+ python2 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build
+
+ install -D -m644 ../LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+}
diff --git a/community/qt4pas/PKGBUILD b/community/qt4pas/PKGBUILD
index f8711f222..92a9bbfe4 100644
--- a/community/qt4pas/PKGBUILD
+++ b/community/qt4pas/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 70222 2012-05-02 13:40:13Z idevolder $
+# $Id: PKGBUILD 74250 2012-07-23 06:35:45Z idevolder $
# Maintainer: BlackIkeEagle <ike DOT devolder AT gmail DOT com>
# Contributor: Fabien Wang <fabien(dot)wang(at)gmail(dot)com>
pkgname=qt4pas
pkgver=2.5
-pkgrel=1
+pkgrel=2
pkgdesc="Free Pascal Qt4 Binding Library"
arch=('i686' 'x86_64')
url="http://users.telenet.be/Jan.Van.hijfte/qtforfpc/fpcqt4.html"
diff --git a/community/qtcreator/PKGBUILD b/community/qtcreator/PKGBUILD
index 7782b4c54..3bbf863e4 100644
--- a/community/qtcreator/PKGBUILD
+++ b/community/qtcreator/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 70483 2012-05-09 14:56:54Z svenstaro $
+# $Id: PKGBUILD 74355 2012-07-25 15:34:15Z svenstaro $
# Maintainer: Imanol Celaya <ornitorrincos@archlinux-es.org>
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Lukas Jirkovsky <l.jirkovsky@gmail.com>
@@ -7,8 +7,8 @@
# Contributor: delor <bartekpiech gmail com>
pkgname="qtcreator"
-pkgver=2.5.0
-_pkgver=2.5.0
+pkgver=2.5.1
+_pkgver=2.5.1
pkgrel=1
pkgdesc='Lightweight, cross-platform integrated development environment'
arch=('i686' 'x86_64' 'mips64el')
@@ -28,9 +28,9 @@ optdepends=('qt-doc: for the integrated Qt documentation'
install=qtcreator.install
source=("http://get.qt.nokia.com/qtcreator/qt-creator-${_pkgver}-src.tar.gz"
'qtcreator.desktop')
-md5sums=('31e26cdd1e3eeb8c406382ebe886dcc5'
+md5sums=('321e6ee4640cee8177cbb302fde2ce84'
'f1f4680b9838ff0b8f4cf11eb850d662')
-
+
build() {
cd ${srcdir}
diff --git a/community/r8168-lts/PKGBUILD b/community/r8168-lts/PKGBUILD
index df0540070..646527e32 100644
--- a/community/r8168-lts/PKGBUILD
+++ b/community/r8168-lts/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 73702 2012-07-14 13:07:16Z allan $
+# $Id: PKGBUILD 74289 2012-07-23 14:15:48Z mtorromeo $
# Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
pkgname=r8168-lts
_pkgname=r8168
pkgver=8.031.00
-pkgrel=2
+pkgrel=3
pkgdesc="A kernel module for Realtek 8168 network cards for linux-lts"
url="http://www.realtek.com.tw"
license=("GPL")
@@ -17,10 +17,10 @@ md5sums=('ec1654f02e2dad930bbeb0210ddab7e5')
sha256sums=('5c617b3c08aca18d1eb24d33f77df40020eb64fb32c8e4008265e08b7ffe5779')
_extramodules=extramodules-3.0-lts
-_kernver="$(cat /usr/lib/modules/$_extramodules/version || true)"
build() {
cd "$_pkgname-$pkgver"
+ local _kernver="$(cat /usr/lib/modules/$_extramodules/version)"
make -C /usr/lib/modules/$_kernver/build \
SUBDIRS="$srcdir/$_pkgname-$pkgver/src" \
EXTRA_CFLAGS="-DCONFIG_R8168_NAPI -DCONFIG_R8168_VLAN" \
diff --git a/community/rtorrent/PKGBUILD b/community/rtorrent/PKGBUILD
index 5da8eb3a5..7968cc713 100644
--- a/community/rtorrent/PKGBUILD
+++ b/community/rtorrent/PKGBUILD
@@ -5,7 +5,7 @@
pkgname=rtorrent
pkgver=0.9.2
-pkgrel=1
+pkgrel=2
pkgdesc='Ncurses BitTorrent client based on libTorrent'
url='http://libtorrent.rakshasa.no/'
license=('GPL')
diff --git a/community/snort/PKGBUILD b/community/snort/PKGBUILD
index 9a5e4bcc7..63477fdac 100644
--- a/community/snort/PKGBUILD
+++ b/community/snort/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 70868 2012-05-18 06:19:27Z lfleischer $
+# $Id: PKGBUILD 74195 2012-07-22 19:47:59Z lfleischer $
# Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de>
# Contributor: Hugo Doria <hugo@archlinux.org>
# Contributor: Kessia 'even' Pinheiro <kessiapinheiro at gmail.com>
@@ -6,7 +6,7 @@
# Contributor: Gregor Ibic <gregor.ibic@intelicom.si>
pkgname=snort
-pkgver=2.9.2.3
+pkgver=2.9.3
pkgrel=1
pkgdesc='A lightweight network intrusion detection system.'
arch=('i686' 'x86_64' 'mips64el')
@@ -21,10 +21,11 @@ backup=('etc/conf.d/snort'
'etc/snort/classification.config')
options=('!makeflags' '!libtool')
install='snort.install'
-source=("http://www.snort.org/dl/snort-current/${pkgname}-${pkgver}.tar.gz"
+source=("http://www.snort.org/dl/snort-current/${pkgname}-${pkgver}.tar.gz"{,.sig}
'snort'
'snort.conf.d')
-md5sums=('9ddb26005d864577fca66a9a1cdfdc8a'
+md5sums=('e128f5d5d14dad335dc0c549c7fe2e98'
+ '8f8689efad6338ca76c344366c97d4ea'
'361b8b9e40b9af0164f6b3e3da2e8277'
'b4fb8a68490589cd34df93de7609bfac')
diff --git a/community/spacefm/PKGBUILD b/community/spacefm/PKGBUILD
index e89183510..912d15ee2 100644
--- a/community/spacefm/PKGBUILD
+++ b/community/spacefm/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 73680 2012-07-13 19:18:42Z bpiotrowski $
+# $Id: PKGBUILD 74358 2012-07-25 19:18:50Z bpiotrowski $
# Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
# Contributor: IgnorantGuru http://igurublog.wordpress.com/contact-ignorantguru/
# Contributor: ridikulus_rat <the.ridikulus.rat@gmail.com>
pkgname=spacefm
-pkgver=0.7.9
+pkgver=0.7.10
pkgrel=1
pkgdesc="A multi-panel tabbed file manager"
arch=('i686' 'x86_64')
@@ -14,7 +14,7 @@ install=$pkgname.install
depends=('gtk2' 'shared-mime-info' 'desktop-file-utils' 'startup-notification' 'udev')
makedepends=('intltool' 'gettext')
optdepends=('lsof: device processes'
- 'eject: eject media'
+ 'eject: eject media'
'wget: plugin download'
'gksu: perform as root functionality'
'pmount: mount as non-root user'
@@ -22,16 +22,16 @@ optdepends=('lsof: device processes'
'udisks: mount as non-root user'
'udisks2: mount as non-root user')
source=(https://raw.github.com/IgnorantGuru/spacefm/master/packages/${pkgver}/spacefm-${pkgver}.tar.xz)
-md5sums=('428739bc310d7010eca3f64caf2e7c1e')
+md5sums=('16de3087b7225b89fad93a0710f2bbcf')
build() {
- cd $srcdir/$pkgname-$pkgver
- ./configure --prefix=/usr
- make
+ cd $srcdir/$pkgname-$pkgver
+ ./configure --prefix=/usr \
+ --disable-pixmaps
+ make
}
package() {
- cd $srcdir/$pkgname-$pkgver
- make DESTDIR=$pkgdir install
+ cd $srcdir/$pkgname-$pkgver
+ make DESTDIR=$pkgdir install
}
-
diff --git a/community/spacefm/spacefm.install b/community/spacefm/spacefm.install
index 1182e768f..f2954aa73 100644
--- a/community/spacefm/spacefm.install
+++ b/community/spacefm/spacefm.install
@@ -1,6 +1,8 @@
post_install() {
update-mime-database usr/share/mime > /dev/null
update-desktop-database -q
+ gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor
+ [ -d /usr/share/icons/Faenza ] && gtk-update-icon-cache -q -t -f /usr/share/icons/Faenza
}
post_upgrade() {
diff --git a/community/surf/PKGBUILD b/community/surf/PKGBUILD
index 97a2900b9..49087f052 100644
--- a/community/surf/PKGBUILD
+++ b/community/surf/PKGBUILD
@@ -1,36 +1,34 @@
-# $Id: PKGBUILD 66413 2012-02-24 15:52:35Z lfleischer $
+# $Id: PKGBUILD 74178 2012-07-22 18:33:06Z lfleischer $
# Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de>
# Contributor: Pierre Chapuis <catwell at archlinux dot us>
# Contributor: Ray Kohler <ataraxia937 at gmail dot com>
# Contributor: Michael Witten <mfwitten>
+# Contributor: Raphael Proust <raphlalou at gmail dot com>
pkgname=surf
-pkgver=0.4.1
-pkgrel=4
-pkgdesc="A simple web browser based on WebKit/GTK+."
+pkgver=0.5
+pkgrel=1
+pkgdesc='A simple web browser based on WebKit/GTK+.'
arch=('i686' 'x86_64' 'mips64el')
url='http://surf.suckless.org/'
license=('MIT')
depends=('libwebkit' 'xorg-xprop')
optdepends=('dmenu: URL-bar'
+ 'ca-certificates: SSL verification'
+ 'xterm: default download handler'
'wget: default download handler')
makedepends=('pkgconfig')
install='surf.install'
source=("http://dl.suckless.org/${pkgname}/${pkgname}-${pkgver}.tar.gz"
- 'config.h'
- 'surf-0.4.1-link-xlib.patch')
-md5sums=('28ac7a6d193d25844aa6b1db77fcbafa'
- 'a1d40e130189343a74f83166410f35d7'
- '475fe2b51802aba40ad9cd6b75d550ed')
+ 'config.h')
+md5sums=('dc735a380d01203861b987b5f4c3c59c'
+ 'd11435f6a67af46a0d19d18a95a1620b')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
cp "${srcdir}/config.h" config.h
- # build fix from upstream (http://hg.suckless.org/surf/rev/2ea243e2ca82)
- patch -p1 -i ../surf-0.4.1-link-xlib.patch
-
sed -i 's/CPPFLAGS =/CPPFLAGS +=/g' config.mk
sed -i 's/CFLAGS =/CFLAGS +=/g' config.mk
sed -i 's/LDFLAGS =/LDFLAGS +=/g' config.mk
diff --git a/community/surf/config.h b/community/surf/config.h
index c323a6239..8f8561a71 100644
--- a/community/surf/config.h
+++ b/community/surf/config.h
@@ -1,21 +1,26 @@
/* modifier 0 means no modifier */
static char *useragent = "Surf/"VERSION" (X11; U; Unix; en-US) AppleWebKit/531.2+ Compatible (Safari)";
-static char *progress = "#FF0000";
+static char *progress = "#0066FF";
+static char *progress_untrust = "#FF6600";
static char *progress_trust = "#00FF00";
static char *stylefile = ".surf/style.css";
static char *scriptfile = ".surf/script.js";
static char *cookiefile = ".surf/cookies.txt";
static time_t sessiontime = 3600;
-#define NOBACKGROUND 0
+static char *cafile = "/etc/ssl/certs/ca-certificates.crt";
+static char *strictssl = FALSE; /* Refuse untrusted SSL connections */
+#define HIDE_BACKGROUND FALSE
+#define SPATIAL_BROWSING TRUE
#define SETPROP(p, q) { .v = (char *[]){ "/bin/sh", "-c", \
"prop=\"`xprop -id $2 $0 | cut -d '\"' -f 2 | dmenu`\" &&" \
"xprop -id $2 -f $1 8s -set $1 \"$prop\"", \
p, q, winid, NULL } }
-#define DOWNLOAD(d) { \
+#define DOWNLOAD(d) { \
.v = (char *[]){ "/bin/sh", "-c", \
- "xterm -e \"wget --load-cookies ~/.surf/cookies.txt '$0';\"", \
- d, NULL } }
+ "xterm -e \"wget '$0' \
+--load-cookies ~/.surf/cookies.txt \
+--user-agent '$1' ; sleep 5\"", d, useragent, NULL } }
#define MODKEY GDK_CONTROL_MASK
static Key keys[] = {
/* modifier keyval function arg Focus */
@@ -29,12 +34,16 @@ static Key keys[] = {
{ MODKEY|GDK_SHIFT_MASK,GDK_i, zoom, { .i = 0 } },
{ MODKEY, GDK_l, navigate, { .i = +1 } },
{ MODKEY, GDK_h, navigate, { .i = -1 } },
- { MODKEY, GDK_j, scroll, { .i = +1 } },
- { MODKEY, GDK_k, scroll, { .i = -1 } },
+ { MODKEY, GDK_j, scroll_v, { .i = +1 } },
+ { MODKEY, GDK_k, scroll_v, { .i = -1 } },
+ { MODKEY, GDK_b, scroll_v, { .i = -10000 } },
+ { MODKEY, GDK_space, scroll_v, { .i = +10000 } },
+ { MODKEY, GDK_i, scroll_h, { .i = +1 } },
+ { MODKEY, GDK_u, scroll_h, { .i = -1 } },
{ 0, GDK_Escape, stop, { 0 } },
{ MODKEY, GDK_o, source, { 0 } },
{ MODKEY, GDK_g, spawn, SETPROP("_SURF_URI", "_SURF_GO") },
- { MODKEY, GDK_slash, spawn, SETPROP("_SURF_FIND", "_SURF_FIND") },
+ { MODKEY, GDK_f, spawn, SETPROP("_SURF_FIND", "_SURF_FIND") },
{ MODKEY, GDK_n, find, { .b = TRUE } },
{ MODKEY|GDK_SHIFT_MASK,GDK_n, find, { .b = FALSE } },
};
diff --git a/community/tea/PKGBUILD b/community/tea/PKGBUILD
index e2f2fe1da..0b52499f3 100644
--- a/community/tea/PKGBUILD
+++ b/community/tea/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 71527 2012-05-28 07:39:51Z spupykin $
+# $Id: PKGBUILD 74236 2012-07-23 05:26:38Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Roman Kyrylych <roman@archlinux.org>
@@ -6,7 +6,7 @@
# Contributor: Zsolt Varadi <sysop_xxl@fibermail.hu>
pkgname=tea
-pkgver=33.1.0
+pkgver=33.2.0
pkgrel=1
pkgdesc="A QT-based text editor for Linux and *BSD. With an ultimate small size TEA provides you hundreds of functions."
arch=('i686' 'x86_64' 'mips64el')
@@ -16,7 +16,7 @@ depends=('qt' 'aspell' 'hunspell')
install=tea.install
source=(http://downloads.sourceforge.net/project/tea-editor/tea-editor/$pkgver/tea-$pkgver.tar.bz2
tea.desktop)
-md5sums=('15593d59f6079f0114e390ec731a8527'
+md5sums=('2d612e48ef014477f86db4323c513b74'
'377ace3363124f4c086de0babb820761')
build() {
diff --git a/community/udevil/PKGBUILD b/community/udevil/PKGBUILD
index 1ac0804e2..afa986c0e 100644
--- a/community/udevil/PKGBUILD
+++ b/community/udevil/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 73683 2012-07-13 19:36:15Z bpiotrowski $
+# $Id: PKGBUILD 74360 2012-07-25 19:22:08Z bpiotrowski $
# Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
# Contributor: IgnorantGuru http://igurublog.wordpress.com/contact-ignorantguru/
pkgname=udevil
-pkgver=0.3.0
+pkgver=0.3.1
pkgrel=1
arch=('i686' 'x86_64' 'mips64el')
pkgdesc='Mount and unmount without password'
@@ -24,7 +24,7 @@ provides=('devmon')
backup=('etc/udevil/udevil.conf')
install=$pkgname.install
source=(https://raw.github.com/IgnorantGuru/$pkgname/master/packages/$pkgver/$pkgname-$pkgver.tar.xz)
-md5sums=('a2695eb0e9d1d2b5208f781710b1a286')
+md5sums=('f2541fe24c83cbc2cb63c5912fc417d9')
build() {
cd $srcdir/$pkgname-$pkgver
diff --git a/community/ulogd/PKGBUILD b/community/ulogd/PKGBUILD
index fbd8f3991..38cd230d9 100644
--- a/community/ulogd/PKGBUILD
+++ b/community/ulogd/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 73943 2012-07-17 09:54:26Z spupykin $
+# $Id: PKGBUILD 74257 2012-07-23 07:12:03Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Sebastien Luttringer <seblu+arch@seblu.net>
# Contributor: Dale Blount <dale@archlinux.org>
@@ -6,14 +6,15 @@
pkgname=ulogd
pkgver=2.0.0
-pkgrel=3
+pkgrel=4
pkgdesc='Userspace Packet Logging for netfilter'
arch=('i686' 'x86_64' 'mips64el')
url='http://www.netfilter.org/projects/ulogd/index.html'
license=('GPL2')
depends=('libmnl')
makedepends=('libmysqlclient' 'postgresql-libs' 'sqlite' 'libpcap' 'libdbi'
- 'libnetfilter_acct' 'libnetfilter_log' 'libnetfilter_conntrack')
+ 'libnetfilter_acct' 'libnetfilter_log' 'libnetfilter_conntrack'
+ 'linuxdoc-tools' 'groff' 'texlive-core')
optdepends=('postgresql-libs'
'sqlite'
'libpcap'
@@ -34,13 +35,20 @@ build() {
cd $pkgname-$pkgver
./configure --prefix=/usr --sysconfdir=/etc --with-mysql --with-pgsql --with-dbi
make
+ (cd doc && make)
}
package() {
cd $pkgname-$pkgver
make DESTDIR="$pkgdir" install
- install -Dm0644 ulogd.conf $pkgdir/usr/share/ulogd/ulogd.conf.sample
+
+ install -dm0755 "$pkgdir/usr/share/doc/ulogd"
+ install -Dm0644 ulogd.conf $pkgdir/usr/share/doc/ulogd/ulogd.conf.sample
+ install -Dm0644 doc/ulogd.{dvi,html,ps,sgml,txt} "$pkgdir/usr/share/doc/ulogd"
+
+ install -dm0755 "$pkgdir/usr/share/ulogd"
install -m644 doc/*.{table,sql} "$pkgdir/usr/share/ulogd"
+
install -D -m644 "$srcdir/logrotate" "$pkgdir/etc/logrotate.d/ulogd"
install -D -m755 "$srcdir/rc" "$pkgdir/etc/rc.d/ulogd"
}
diff --git a/community/unpaper/PKGBUILD b/community/unpaper/PKGBUILD
index dded7d5d5..80c070dc7 100644
--- a/community/unpaper/PKGBUILD
+++ b/community/unpaper/PKGBUILD
@@ -1,23 +1,26 @@
-# $Id: PKGBUILD 65349 2012-02-21 02:16:20Z spupykin $
+# $Id: PKGBUILD 74323 2012-07-24 16:20:43Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Andreas Hauser <andy-aur@splashground.de>
pkgname=unpaper
-pkgver=0.3
-pkgrel=3
+pkgver=0.4.2
+pkgrel=1
pkgdesc="post-processing tool for scanned sheets of paper"
arch=('i686' 'x86_64' 'mips64el')
-url="http://$pkgname.berlios.de/"
+#url="http://$pkgname.berlios.de/"
+url="https://github.com/Flameeyes/unpaper"
license="GPL"
-depends=()
+depends=('libxslt')
makedepends=('gcc')
-source=("http://download.berlios.de/unpaper/$pkgname-${pkgver}.tar.gz")
-md5sums=('be41eaf8556e7df39ab53939c99c4f7b')
+source=("$pkgname-${pkgver}.tar.gz::https://github.com/Flameeyes/unpaper/tarball/unpaper-$pkgver")
+md5sums=('7dcee730cdbeffbbd840cbe6f2bb9693')
build() {
- cd $srcdir/$pkgname-$pkgver/src
- gcc $CFLAGS -lm -funroll-all-loops -fomit-frame-pointer -ftree-vectorize -o unpaper unpaper.c
- install -D -m0755 unpaper $pkgdir/usr/bin/unpaper
- install -d -m0755 $pkgdir/usr/share/doc/unpaper
- cp -a ../doc/* $pkgdir/usr/share/doc/unpaper
+ cd $srcdir/Flameeyes-unpaper-*
+ aclocal
+ automake --add-missing
+ autoconf
+ [ -f Makefile ] || ./configure --prefix=/usr
+ make
+ make install DESTDIR=$pkgdir
}
diff --git a/community/wxgtk2.9/PKGBUILD b/community/wxgtk2.9/PKGBUILD
index 58690ab8a..ac345de52 100644
--- a/community/wxgtk2.9/PKGBUILD
+++ b/community/wxgtk2.9/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 74061 2012-07-19 05:01:32Z ebelanger $
+# $Id: PKGBUILD 74217 2012-07-23 03:07:35Z allan $
# Maintainer: Eric Bélanger <eric@archlinux.org>
pkgname=wxgtk2.9
pkgver=2.9.4
-pkgrel=1
+pkgrel=2
pkgdesc="GTK+ implementation of wxWidgets API for GUI"
arch=('i686' 'x86_64')
url="http://wxwidgets.org"
diff --git a/community/xapian-core/PKGBUILD b/community/xapian-core/PKGBUILD
index 56c0aba25..20ea6bc91 100644
--- a/community/xapian-core/PKGBUILD
+++ b/community/xapian-core/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 70569 2012-05-11 20:14:44Z spupykin $
+# $Id: PKGBUILD 74348 2012-07-25 06:16:56Z spupykin $
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Alexander Fehr <pizzapunk gmail com>
# Contributor: William Rea <sillywilly@gmail.com>
# Maintainer: Daniel J Griffiths <ghost1227@archlinux.us>
pkgname=xapian-core
-pkgver=1.2.10
+pkgver=1.2.12
pkgrel=1
pkgdesc='Open source search engine library.'
arch=('i686' 'x86_64' 'mips64el')
@@ -15,7 +15,7 @@ depends=('sh' 'gcc-libs' 'zlib' 'util-linux')
# xapian config requires libxapian.la
options=('libtool')
source=("http://oligarchy.co.uk/xapian/${pkgver}/${pkgname}-${pkgver}.tar.gz")
-md5sums=('c773df1aa9a84d3a056863532a7f6519')
+md5sums=('faf33a3945edbe4c848627750856cbeb')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
diff --git a/community/xmlrpc-c/PKGBUILD b/community/xmlrpc-c/PKGBUILD
index ce56be7ee..ba983b160 100644
--- a/community/xmlrpc-c/PKGBUILD
+++ b/community/xmlrpc-c/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 74066 2012-07-19 10:16:54Z arodseth $
+# $Id: PKGBUILD 74151 2012-07-22 12:17:46Z arodseth $
# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Daenyth <Daenyth+Arch [at] gmail [dot] com>
# Contributor: Pierre Schmitz <pierre@archlinux.de>
@@ -7,7 +7,7 @@
pkgname=xmlrpc-c
pkgver=1.31.02
epoch=1
-pkgrel=1
+pkgrel=2
pkgdesc='XML-RPC for C and C++'
arch=('i686' 'x86_64' 'mips64el')
url='http://xmlrpc-c.sourceforge.net/'
@@ -16,7 +16,7 @@ depends=('curl' 'libxml2' 'gcc-libs' 'zlib')
makedepends=('libtool' 'setconf')
options=('!makeflags' '!libtool')
source=("$pkgname-advanced-$pkgver.tar.gz::http://xmlrpc-c.svn.sourceforge.net/viewvc/xmlrpc-c/advanced.tar.gz")
-sha256sums=('658013f009f29bc8cbd9fd9ebef087a2f6691a123d3b17c68b2cd4a958f91c39')
+sha256sums=('8310eb35268150724daf8eecb8fb3a3421a01da8d30ed3e9cdd66cbc7ad93874')
build() {
cd "$srcdir/advanced"
diff --git a/core/dbus-core/PKGBUILD b/core/dbus-core/PKGBUILD
index 2f2b54c68..e4b13cc49 100644
--- a/core/dbus-core/PKGBUILD
+++ b/core/dbus-core/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 163027 2012-07-06 01:27:03Z ibiru $
+# $Id: PKGBUILD 163991 2012-07-23 14:58:38Z andyrtr $
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Link Dupont <link@subpop.net>
#
pkgname=dbus-core
-pkgver=1.6.2
-pkgrel=2
+pkgver=1.6.4
+pkgrel=1
pkgdesc="Freedesktop.org message bus system"
url="http://www.freedesktop.org/Software/dbus"
arch=(i686 x86_64 'mips64el')
@@ -15,8 +15,8 @@ options=(!libtool)
install=dbus.install
source=(http://dbus.freedesktop.org/releases/dbus/dbus-$pkgver.tar.gz{,.asc}
dbus)
-md5sums=('7fbf877ed6ff7da6df90f07158373829'
- '2cd74b6efca77e4e3aa2b7ccde770668'
+md5sums=('5ec43dc4554cba638917317b2b4f7640'
+ '3d4482ee39b49da334441c76f83bf1cb'
'f0364f3f5dc5f653bb05d39aa36e3264')
build() {
diff --git a/core/flex/PKGBUILD b/core/flex/PKGBUILD
index 62a73bbfc..967356836 100644
--- a/core/flex/PKGBUILD
+++ b/core/flex/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 142183 2011-11-05 22:42:53Z allan $
+# $Id: PKGBUILD 163938 2012-07-22 12:56:35Z allan $
# Maintainer: Allan McRae <allan@archlinux.org>
# Contributor: judd <jvinet@zeroflux.org>
pkgname=flex
-pkgver=2.5.35
-pkgrel=5.1
+pkgver=2.5.36
+pkgrel=1
pkgdesc="A tool for generating text-scanning programs"
arch=('i686' 'x86_64' 'mips64el')
url="http://flex.sourceforge.net"
@@ -12,48 +12,33 @@ license=('custom')
groups=('base-devel')
depends=('glibc' 'm4' 'sh')
install=flex.install
-source=(http://downloads.sourceforge.net/sourceforge/flex/flex-$pkgver.tar.bz2
- flex-2.5.35-gcc44.patch
- flex-2.5.35-hardening.patch
- flex-2.5.35-missing-prototypes.patch
- flex-2.5.35-sign.patch
+source=(http://downloads.sourceforge.net/sourceforge/flex/flex-$pkgver.tar.bz2
lex.sh)
-md5sums=('10714e50cea54dc7a227e3eddcd44d57'
- 'e4444ef5c07db71a43280be74139bdea'
- 'de952b3ed7cc074bc8c3e6ab73634048'
- '6b83f56b1b654c6a321cdc530a3ec68d'
- 'd87fd9e9762ba7e230d516bdcf1c8c6f'
+md5sums=('5e637290609fd3c2f1f2e75ac2bce1c5'
'f725259ec23a9e87ee29e2ef82eda9a5')
build() {
cd $srcdir/$pkgname-$pkgver
-
- patch -Np1 -i $srcdir/flex-2.5.35-gcc44.patch
- patch -Np1 -i $srcdir/flex-2.5.35-hardening.patch
- patch -Np1 -i $srcdir/flex-2.5.35-missing-prototypes.patch
- patch -Np1 -i $srcdir/flex-2.5.35-sign.patch
-
- ./configure --prefix=/usr \
- --mandir=/usr/share/man --infodir=/usr/share/info
+ ./configure --prefix=/usr
make
}
check() {
cd $srcdir/$pkgname-$pkgver
+
+ # these tests used features removed in bison-2.6
+ sed -i -e '/test-bison-yylloc/d' -e '/test-bison-yylval/d' tests/Makefile.in
+
make check
}
package() {
cd $srcdir/$pkgname-$pkgver
- make prefix=$pkgdir/usr \
- mandir=$pkgdir/usr/share/man \
- infodir=$pkgdir/usr/share/info \
- install
+ make DESTDIR=$pkgdir install
install -Dm755 $srcdir/lex.sh $pkgdir/usr/bin/lex
install -Dm644 COPYING \
$pkgdir/usr/share/licenses/$pkgname/license.txt
-
}
diff --git a/core/gcc/PKGBUILD b/core/gcc/PKGBUILD
index 3f7fbc1a1..f8f6f0a4b 100644
--- a/core/gcc/PKGBUILD
+++ b/core/gcc/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 163010 2012-07-05 13:48:46Z allan $
+# $Id: PKGBUILD 163961 2012-07-23 02:59:09Z allan $
# Maintainer: Allan McRae <allan@archlinux.org>
# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
@@ -10,9 +10,8 @@ else
pkgname=('gcc' 'gcc-libs' 'gcc-fortran' 'gcc-objc')
fi
pkgver=4.7.1
-pkgrel=4
-pkgrel=3 #holdver
-#_snapshot=4.7-20120505
+pkgrel=5
+_snapshot=4.7-20120721
_libstdcppmanver=20120605 # Note: check source directory name when updating this
pkgdesc="The GNU Compiler Collection"
arch=('i686' 'x86_64' 'mips64el')
@@ -25,21 +24,19 @@ else
fi
checkdepends=('dejagnu')
options=('!libtool' '!emptydirs')
-source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2
- #ftp://gcc.gnu.org/pub/gcc/snapshots/${_snapshot}/gcc-${_snapshot}.tar.bz2
+source=(#ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2
+ ftp://gcc.gnu.org/pub/gcc/snapshots/${_snapshot}/gcc-${_snapshot}.tar.bz2
ftp://gcc.gnu.org/pub/gcc/libstdc++/doxygen/libstdc++-api.${_libstdcppmanver}.man.tar.bz2
gcc_pure64.patch
gcc_mips64el_lib.patch
gcc-4.7.1-libada-pic.patch
- gcc-4.7.1-libgo-write.patch
- gcc-4.7.1-libgo-mksysinfo.patch)
-md5sums=('933e6f15f51c031060af64a9e14149ff'
+ gcc-4.7.1-libgo-write.patch)
+md5sums=('a1a53fda426bc6809cede8e85bbaf2a3'
'767c62f9a047c4434f2345decf1d0819'
'ced48436c1b3c981d721a829f1094de1'
'474b8f5a7dee6ddd96b95a7240bfb961'
'2acbc9d35cc9d72329dc71d6b1f162ef'
- 'df82dd175ac566c8a6d46b11ac21f14c'
- '8e847244dba042d0aa3297713edaf70c')
+ 'df82dd175ac566c8a6d46b11ac21f14c')
if [ -n "${_snapshot}" ]; then
_basedir="${srcdir}/gcc-${_snapshot}"
@@ -68,9 +65,6 @@ build() {
# bug to file...
patch -p1 -i ${srcdir}/gcc-4.7.1-libada-pic.patch
- # http://gcc.gnu.org/ml/gcc-patches/2012-06/msg01946.html
- patch -p0 -i ${srcdir}/gcc-4.7.1-libgo-mksysinfo.patch
-
echo ${pkgver} > gcc/BASE-VER
cd ${srcdir}
@@ -196,8 +190,7 @@ package_gcc()
rm -f $pkgdir/usr/share/man/man3/ffi*
# many packages require these symlinks
- #install -dm755 ${pkgdir}/lib
- #ln -s /usr/bin/cpp ${pkgdir}/lib/cpp
+ ln -s /usr/bin/cpp ${pkgdir}/usr/lib/cpp
ln -s gcc ${pkgdir}/usr/bin/cc
# POSIX conformance launcher scripts for c89 and c99
diff --git a/extra/boost/PKGBUILD b/extra/boost/PKGBUILD
index 493c54c31..76ecd2a33 100644
--- a/extra/boost/PKGBUILD
+++ b/extra/boost/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 163703 2012-07-18 01:05:09Z ibiru $
+# $Id: PKGBUILD 163962 2012-07-23 02:59:56Z allan $
# Maintainer: kevin <kevin@archlinux.org>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Kritoke <kritoke@gamebox.net>
@@ -8,7 +8,7 @@ pkgbase=boost
pkgname=('boost-libs' 'boost')
pkgver=1.50.0
_boostver=${pkgver//./_}
-pkgrel=1
+pkgrel=2
arch=('i686' 'x86_64' 'mips64el')
url="http://www.boost.org/"
makedepends=('icu' 'python' 'python2' 'bzip2' 'zlib' 'openmpi')
diff --git a/extra/clucene/PKGBUILD b/extra/clucene/PKGBUILD
index 495060879..88d792a93 100644
--- a/extra/clucene/PKGBUILD
+++ b/extra/clucene/PKGBUILD
@@ -1,16 +1,16 @@
-# $Id: PKGBUILD 162256 2012-06-24 14:30:07Z andyrtr $
+# $Id: PKGBUILD 163973 2012-07-23 03:04:22Z allan $
# Maintainer: AndyRTR <andyrtr@archlinux.org>
# Contributor: Alexander Rødseth
# Contributor: Alois Nespor <alois.nespor@gmail.com>
# Contributor: Tobias Powalowski <tpowa@archlinux.org>
pkgname=clucene
pkgver=2.3.3.4
-pkgrel=5
+pkgrel=6
pkgdesc="C++ port of the high-performance text search engine Lucene"
arch=('x86_64' 'i686' 'mips64el')
url="http://clucene.sourceforge.net/"
license=('APACHE' 'LGPL')
-depends=('gcc-libs' 'zlib' 'boost-libs')
+depends=('gcc-libs>=4.7.1-5' 'zlib' 'boost-libs')
makedepends=('cmake' 'boost')
source=(http://downloads.sourceforge.net/$pkgname/$pkgname-core-$pkgver.tar.gz
# Fedora patches
diff --git a/extra/cups/PKGBUILD b/extra/cups/PKGBUILD
index 409767b13..acb8b9998 100644
--- a/extra/cups/PKGBUILD
+++ b/extra/cups/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 161774 2012-06-13 17:38:37Z andyrtr $
+# $Id: PKGBUILD 163972 2012-07-23 03:04:02Z allan $
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
pkgbase="cups"
pkgname=('libcups' 'cups')
pkgver=1.5.3
-pkgrel=5
+pkgrel=6
arch=('i686' 'x86_64' 'mips64el')
license=('GPL')
url="http://www.cups.org/"
diff --git a/extra/dbus/PKGBUILD b/extra/dbus/PKGBUILD
index 6ca4a7a88..29d4bf3df 100644
--- a/extra/dbus/PKGBUILD
+++ b/extra/dbus/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 163028 2012-07-06 01:27:22Z ibiru $
+# $Id: PKGBUILD 163993 2012-07-23 14:58:54Z andyrtr $
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Link Dupont <link@subpop.net>
#
pkgname=dbus
-pkgver=1.6.2
+pkgver=1.6.4
pkgrel=1
pkgdesc="Freedesktop.org message bus system"
url="http://www.freedesktop.org/Software/dbus"
@@ -12,8 +12,8 @@ license=('GPL' 'custom')
depends=("dbus-core>=$pkgver" 'libx11')
source=(http://dbus.freedesktop.org/releases/$pkgname/$pkgname-$pkgver.tar.gz{,.asc}
30-dbus)
-md5sums=('7fbf877ed6ff7da6df90f07158373829'
- '2cd74b6efca77e4e3aa2b7ccde770668'
+md5sums=('5ec43dc4554cba638917317b2b4f7640'
+ '3d4482ee39b49da334441c76f83bf1cb'
'9fafe8b28460aeaa6054309ef4c5ed92')
build() {
diff --git a/extra/ddrescue/PKGBUILD b/extra/ddrescue/PKGBUILD
index 1ccd0ef68..1538b084b 100644
--- a/extra/ddrescue/PKGBUILD
+++ b/extra/ddrescue/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 162261 2012-06-24 16:23:55Z schiv $
+# $Id: PKGBUILD 164005 2012-07-23 18:42:21Z schiv $
# Maintainer: Ray Rashif <schiv@archlinux.org>
# Contributor: Pierre Schmitz <pierre@archlinux.de>
# Contributor: Paul Mattal <paul@archlinux.org>
pkgname=ddrescue
pkgver=1.16
-pkgrel=1
+pkgrel=2
pkgdesc="GNU data recovery tool"
arch=('i686' 'x86_64' 'mips64el')
url="http://www.gnu.org/software/ddrescue/ddrescue.html"
diff --git a/extra/dovecot/PKGBUILD b/extra/dovecot/PKGBUILD
index 4bbd7897f..f716f733e 100644
--- a/extra/dovecot/PKGBUILD
+++ b/extra/dovecot/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 162905 2012-07-03 15:00:02Z andyrtr $
+# $Id: PKGBUILD 163971 2012-07-23 03:03:28Z allan $
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
# Contributor: Paul Mattal <paul@mattal.com>
# Contributor: Federico Quagliata (quaqo) <quaqo@despammed.com>
@@ -6,7 +6,7 @@
pkgname=dovecot
pkgver=2.1.8
-pkgrel=1
+pkgrel=2
pkgdesc="An IMAP and POP3 server written with security primarily in mind"
arch=('i686' 'x86_64' 'mips64el')
url="http://dovecot.org/"
diff --git a/extra/git/PKGBUILD b/extra/git/PKGBUILD
index 47f7b8241..ed9488163 100644
--- a/extra/git/PKGBUILD
+++ b/extra/git/PKGBUILD
@@ -1,8 +1,8 @@
-# $Id: PKGBUILD 163497 2012-07-13 14:43:17Z dan $
+# $Id: PKGBUILD 163990 2012-07-23 13:53:11Z dan $
# Maintainer: Dan McGee <dan@archlinux.org>
pkgname=git
-pkgver=1.7.11.2
+pkgver=1.7.11.3
pkgrel=1
pkgdesc="the fast distributed version control system"
arch=(i686 x86_64 'mips64el')
@@ -100,7 +100,7 @@ package() {
install -D -m644 "$srcdir"/git-daemon.conf "$pkgdir"/etc/conf.d/git-daemon.conf
}
-sha1sums=('f67b4f6c0277250411c6872ae7b8a872ae11d313'
- '78b46ca7b5037c61a58086879869dadeac9eea3e'
- 'f2b41828bd912b72e2cb3e14677739c4f370de66'
- '149e2da1ecb48872ddb31c0945afeaad1f9653d7')
+md5sums=('23caacd9f3f421b6c05b40796df3505d'
+ 'f07bfe5a0f7e4165cab0091e710062dc'
+ '8e2648910fd5dd4f1c41d3c7fa9e9156'
+ '2e42bf97779a1c6411d89043334c9e78')
diff --git a/extra/gnutls/PKGBUILD b/extra/gnutls/PKGBUILD
index 77d6c8ba6..6ab346548 100644
--- a/extra/gnutls/PKGBUILD
+++ b/extra/gnutls/PKGBUILD
@@ -1,16 +1,16 @@
-# $Id: PKGBUILD 162907 2012-07-03 15:25:08Z andyrtr $
+# $Id: PKGBUILD 163970 2012-07-23 03:03:19Z allan $
# Maintainer: Jan de Groot <jgc@archlinux.org>
pkgname=gnutls
pkgver=3.0.21
-pkgrel=1
+pkgrel=2
pkgdesc="A library which provides a secure layer over a reliable transport layer"
arch=('i686' 'x86_64' 'mips64el')
license=('GPL3' 'LGPL')
url="http://www.gnu.org/software/gnutls/"
install=gnutls.install
options=('!libtool' '!zipman')
-depends=('gcc-libs' 'libtasn1' 'readline' 'zlib' 'nettle>=2.4' 'p11-kit>=0.12')
+depends=('gcc-libs>=4.7.1-5' 'libtasn1' 'readline' 'zlib' 'nettle>=2.4' 'p11-kit>=0.12')
makedepends=('strace')
[ "$CARCH" = "mips64el" ] || makedepends+=('valgrind')
source=(ftp://ftp.gnu.org/gnu/gnutls/${pkgname}-${pkgver}.tar.xz{,.sig})
diff --git a/extra/gpsd/PKGBUILD b/extra/gpsd/PKGBUILD
index d11fcc7f4..18c75f327 100644
--- a/extra/gpsd/PKGBUILD
+++ b/extra/gpsd/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 162159 2012-06-22 12:58:34Z dreisner $
+# $Id: PKGBUILD 163966 2012-07-23 03:02:55Z allan $
# Maintainer: Tom Gundersen <teg@jklm.no>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
@@ -6,7 +6,7 @@
pkgname=gpsd
pkgver=3.6
-pkgrel=1
+pkgrel=2
pkgdesc="GPS daemon and library to support USB/serial GPS devices"
arch=('i686' 'x86_64' 'mips64el')
url="http://catb.org/gpsd/"
diff --git a/extra/gtk2/PKGBUILD b/extra/gtk2/PKGBUILD
index 1f9c41919..bbec2f7f0 100644
--- a/extra/gtk2/PKGBUILD
+++ b/extra/gtk2/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 163898 2012-07-21 19:20:18Z ibiru $
+# $Id: PKGBUILD 163911 2012-07-22 09:08:14Z ibiru $
# Maintainer: Jan de Groot <jgc@archlinux.org>
pkgbase=gtk2
pkgname=('gtk2' 'gtk-update-icon-cache')
pkgver=2.24.11
-pkgrel=1
+pkgrel=2
arch=('i686' 'x86_64' 'mips64el')
url="http://www.gtk.org/"
makedepends=('atk' 'pango' 'libxcursor' 'libxinerama' 'libxrandr' 'libxi' 'libxcomposite' 'libxdamage'
@@ -12,13 +12,16 @@ makedepends=('atk' 'pango' 'libxcursor' 'libxinerama' 'libxrandr' 'libxi' 'libxc
options=('!libtool')
license=('LGPL')
source=(http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-$pkgver.tar.xz
- xid-collision-debug.patch)
+ xid-collision-debug.patch
+ fix-stuck-grabs.patch)
sha256sums=('328b4ea19a61040145e777e2ac49820968a382ac8581a380c9429897881812a9'
- 'd758bb93e59df15a4ea7732cf984d1c3c19dff67c94b957575efea132b8fe558')
+ 'd758bb93e59df15a4ea7732cf984d1c3c19dff67c94b957575efea132b8fe558'
+ '7739a1ab04aaf6e7f87987bad106062456e71933bc50acd948160cc03634dcd9')
build() {
- cd "$srcdir/gtk+-$pkgver"
- patch -Np1 -i "$srcdir/xid-collision-debug.patch"
+ cd gtk+-$pkgver
+ patch -Np1 -i ../xid-collision-debug.patch
+ patch -Np1 -i ../fix-stuck-grabs.patch
CXX=/bin/false ./configure --prefix=/usr \
--sysconfdir=/etc \
@@ -38,7 +41,7 @@ package_gtk2() {
backup=(etc/gtk-2.0/gtkrc)
replaces=('gtk2-docs')
- cd "$srcdir/gtk+-$pkgver"
+ cd gtk+-$pkgver
make DESTDIR="$pkgdir" install
sed -i "s#env python#env python2#" $pkgdir/usr/bin/gtk-builder-convert
@@ -50,7 +53,7 @@ package_gtk-update-icon-cache() {
pkgdesc="The GTK+ update icon cache tool"
depends=('gdk-pixbuf2>=2.24.1-3')
- cd "$srcdir/gtk+-$pkgver/gtk"
+ cd gtk+-$pkgver/gtk
install -D -m755 gtk-update-icon-cache $pkgdir/usr/bin/gtk-update-icon-cache
}
diff --git a/extra/gtk2/fix-stuck-grabs.patch b/extra/gtk2/fix-stuck-grabs.patch
new file mode 100644
index 000000000..accec431e
--- /dev/null
+++ b/extra/gtk2/fix-stuck-grabs.patch
@@ -0,0 +1,47 @@
+From a9fb816a3f64227936f4b25882e4f20ab5018c9c Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen@redhat.com>
+Date: Wed, 16 May 2012 21:18:51 +0000
+Subject: Fix a case of 'stuck grab'
+
+This was showing up when using a combo box in list mode. After popping
+up the list, the keyboard grab appeared stuck. What was stuck here is
+only the client-side grab, since we forgot to clean up our grabs
+when receiving an UnmapNotify.
+
+This bug was introduced in 3f6592f60fd15fb353fc84600caefba3054dc892.
+
+[ Alexandre Rostovtsev <tetromino@gentoo.org>: backport to 2.24 ]
+
+https://bugzilla.gnome.org/show_bug.cgi?id=680346
+---
+diff --git a/gdk/x11/gdkevents-x11.c b/gdk/x11/gdkevents-x11.c
+index 7cc1000..b96e9f5 100644
+--- a/gdk/x11/gdkevents-x11.c
++++ b/gdk/x11/gdkevents-x11.c
+@@ -1799,16 +1799,15 @@ gdk_event_translate (GdkDisplay *display,
+ * means we hid the window ourselves, so we will have already flipped
+ * the iconified bit off.
+ */
+- if (window)
+- {
+- if (GDK_WINDOW_IS_MAPPED (window))
+- gdk_synthesize_window_state (window,
+- 0,
+- GDK_WINDOW_STATE_ICONIFIED);
+-
+- _gdk_xgrab_check_unmap (window, xevent->xany.serial);
+- }
++ if (window && GDK_WINDOW_IS_MAPPED (window))
++ gdk_synthesize_window_state (window,
++ 0,
++ GDK_WINDOW_STATE_ICONIFIED);
+ }
++
++ if (window)
++ _gdk_xgrab_check_unmap (window, xevent->xany.serial);
++
+ break;
+
+ case MapNotify:
+--
+cgit v0.9.0.2
diff --git a/extra/icu/PKGBUILD b/extra/icu/PKGBUILD
index 862baee9f..4ea33a20d 100644
--- a/extra/icu/PKGBUILD
+++ b/extra/icu/PKGBUILD
@@ -1,15 +1,15 @@
-# $Id: PKGBUILD 160960 2012-06-07 13:35:03Z andyrtr $
+# $Id: PKGBUILD 163969 2012-07-23 03:03:14Z allan $
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
# Contributor: Art Gramlich <art@gramlich-net.com>
pkgname=icu
pkgver=49.1.2
-pkgrel=1
+pkgrel=2
pkgdesc="International Components for Unicode library"
arch=(i686 x86_64 'mips64el')
url="http://www.icu-project.org/"
license=('custom:"icu"')
-depends=('gcc-libs' 'sh')
+depends=('gcc-libs>=4.7.1-5' 'sh')
source=(#http://download.icu-project.org/files/${pkgname}4c/${pkgver}/${pkgname}4c-${pkgver/./_}-src.tgz
http://download.icu-project.org/files/${pkgname}4c/${pkgver}/${pkgname}4c-${pkgver//./_}-src.tgz
icu.8198.revert.icu5431.patch)
diff --git a/extra/imagemagick/PKGBUILD b/extra/imagemagick/PKGBUILD
index df520d619..ef9db324c 100644
--- a/extra/imagemagick/PKGBUILD
+++ b/extra/imagemagick/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 163750 2012-07-19 04:55:07Z eric $
+# $Id: PKGBUILD 164013 2012-07-23 22:32:35Z eric $
# Maintainer: Eric Bélanger <eric@archlinux.org>
pkgbase=imagemagick
pkgname=('imagemagick' 'imagemagick-doc')
-pkgver=6.7.8.4
+pkgver=6.7.8.6
pkgrel=1
arch=('i686' 'x86_64' 'mips64el')
url="http://www.imagemagick.org/"
@@ -12,14 +12,14 @@ makedepends=('libltdl' 'lcms2' 'libxt' 'fontconfig' 'libxext' 'ghostscript' \
'openexr' 'libwmf' 'librsvg' 'libxml2' 'jasper' 'liblqr')
source=(ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-${pkgver%.*}-${pkgver##*.}.tar.xz \
perlmagick.rpath.patch)
-sha1sums=('3cca01dad3596502a149229e28226b1b2a037915'
+sha1sums=('4965710cf4dca18583691d121e22b114c84e0643'
'23405f80904b1de94ebd7bd6fe2a332471b8c283')
build() {
cd "${srcdir}"/ImageMagick-${pkgver%.*}-${pkgver##*.}
sed '/AC_PATH_XTRA/d' -i configure.ac
- autoreconf --install
+ autoreconf --force --install
patch -p0 -i ../perlmagick.rpath.patch
./configure --prefix=/usr --sysconfdir=/etc --with-modules --disable-static \
diff --git a/extra/libmp4v2/PKGBUILD b/extra/libmp4v2/PKGBUILD
index 22a92c785..f3dbacfc9 100644
--- a/extra/libmp4v2/PKGBUILD
+++ b/extra/libmp4v2/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 159958 2012-05-27 10:22:24Z tomegun $
+# $Id: PKGBUILD 163965 2012-07-23 03:02:46Z allan $
# Maintainer: Tom Gundersen <teg@jklm.no>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>
pkgname=libmp4v2
pkgver=2.0.0
-pkgrel=1
+pkgrel=2
pkgdesc="MPEG-4 library"
arch=('i686' 'x86_64' 'mips64el')
license=('MPL')
diff --git a/extra/libpng/PKGBUILD b/extra/libpng/PKGBUILD
index cb29f066c..8bbad77b9 100644
--- a/extra/libpng/PKGBUILD
+++ b/extra/libpng/PKGBUILD
@@ -1,12 +1,12 @@
-# $Id: PKGBUILD 161912 2012-06-16 14:11:51Z ibiru $
+# $Id: PKGBUILD 164030 2012-07-24 16:52:28Z ibiru $
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: dorphell <dorphell@archlinux.org>
# Contributor: Travis Willard <travis@archlinux.org>
# Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
pkgname=libpng
-pkgver=1.5.11
-_apngver=1.5.11
+pkgver=1.5.12
+_apngver=1.5.12
pkgrel=1
pkgdesc="A collection of routines used to create PNG format graphics files"
arch=('i686' 'x86_64' 'mips64el')
@@ -16,8 +16,8 @@ depends=('zlib' 'sh')
options=('!libtool')
source=("http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.xz"
"http://downloads.sourceforge.net/sourceforge/libpng-apng/libpng-$_apngver-apng.patch.gz")
-md5sums=('57f838299e701b6db9e8389c5602dc18'
- 'e9ddf7670e78ad93f4cc189c884d4f26')
+md5sums=('0fd51add1da6a0e470e0c726c59171b9'
+ '7f2924b1fe0cca9080e18b8720443716')
build() {
cd $pkgname-$pkgver
diff --git a/extra/llvm/PKGBUILD b/extra/llvm/PKGBUILD
index 96b257a88..cae3d2931 100644
--- a/extra/llvm/PKGBUILD
+++ b/extra/llvm/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 159472 2012-05-24 20:02:15Z foutrelis $
+# $Id: PKGBUILD 163974 2012-07-23 03:57:55Z foutrelis $
# Maintainer: Evangelos Foutras <evangelos@foutrelis.com>
# Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com>
# Contributor: Sebastian Nowicki <sebnow@gmail.com>
@@ -11,7 +11,7 @@
pkgname=('llvm' 'llvm-ocaml' 'clang' 'clang-analyzer')
pkgver=3.1
-pkgrel=2
+pkgrel=3
arch=('i686' 'x86_64' 'mips64el')
url="http://llvm.org/"
license=('custom:University of Illinois/NCSA Open Source License')
diff --git a/extra/mesa/PKGBUILD b/extra/mesa/PKGBUILD
index 4073d4cc6..8f4d776aa 100644
--- a/extra/mesa/PKGBUILD
+++ b/extra/mesa/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 163468 2012-07-12 16:40:51Z andyrtr $
+# $Id: PKGBUILD 163968 2012-07-23 03:03:08Z allan $
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
@@ -16,10 +16,10 @@ if [ "${_git}" = "true" ]; then
else
pkgver=8.0.4
fi
-pkgrel=1
+pkgrel=2
arch=('i686' 'x86_64' 'mips64el')
makedepends=('glproto>=1.4.15' 'libdrm>=2.4.30' 'libxxf86vm>=1.1.1' 'libxdamage>=1.1.3' 'expat>=2.0.1' 'libx11>=1.4.99.1' 'libxt>=1.1.1'
- 'gcc-libs>=4.6.1' 'dri2proto>=2.6' 'python2' 'libxml2' 'imake' 'udev>=183')
+ 'gcc-libs>=4.7.1-5' 'dri2proto>=2.6' 'python2' 'libxml2' 'imake' 'udev>=183')
[[ "$CARCH" != "mips64el" ]] && makedepends+=('llvm')
url="http://mesa3d.sourceforge.net"
license=('custom')
diff --git a/extra/nouveau-dri/PKGBUILD b/extra/nouveau-dri/PKGBUILD
index ad1daa62a..2848f0bff 100644
--- a/extra/nouveau-dri/PKGBUILD
+++ b/extra/nouveau-dri/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 163472 2012-07-12 17:49:23Z ibiru $
+# $Id: PKGBUILD 163980 2012-07-23 08:35:29Z ibiru $
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
pkgname=nouveau-dri
pkgver=8.0.4
-pkgrel=1
+pkgrel=2
arch=('i686' 'x86_64')
makedepends=('glproto>=1.4.15' 'libdrm-old' 'libdrm-nouveau1' 'libxxf86vm>=1.1.1' 'libxdamage>=1.1.3' 'expat>=2.0.1' 'libx11>=1.4.99.1' 'libxt>=1.1.1'
'gcc-libs>=4.6.1' 'dri2proto>=2.6' 'python2' 'libxml2' 'imake' 'llvm' 'udev>=183')
diff --git a/extra/qjackctl/PKGBUILD b/extra/qjackctl/PKGBUILD
index 73bf3de67..7692ca6e7 100644
--- a/extra/qjackctl/PKGBUILD
+++ b/extra/qjackctl/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 159470 2012-05-24 18:44:02Z schiv $
+# $Id: PKGBUILD 164008 2012-07-23 18:45:37Z schiv $
# Maintainer: Ray Rashif <schiv@archlinux.org>
# Contributor: Tobias Kieslich <tobias@archlinux.org>
pkgname=qjackctl
pkgver=0.3.9
-pkgrel=1
+pkgrel=2
pkgdesc="A Qt front-end for the JACK low-latency audio server"
url="http://qjackctl.sourceforge.net/"
arch=('i686' 'x86_64' 'mips64el')
diff --git a/extra/qt-gstreamer/PKGBUILD b/extra/qt-gstreamer/PKGBUILD
index 782193830..b40cbdd56 100644
--- a/extra/qt-gstreamer/PKGBUILD
+++ b/extra/qt-gstreamer/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 161451 2012-06-11 17:44:06Z andrea $
+# $Id: PKGBUILD 163964 2012-07-23 03:00:17Z allan $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
# Contributor: laloch <laloch@atlas.cz>
pkgname=qt-gstreamer
pkgver=0.10.2
-pkgrel=1
+pkgrel=2
pkgdesc="Qt bindings for GStreamer"
arch=('i686' 'x86_64' 'mips64el')
url='http://gstreamer.freedesktop.org/modules/qt-gstreamer.html'
diff --git a/extra/qt/PKGBUILD b/extra/qt/PKGBUILD
index 8726234fa..47cd3a2c5 100644
--- a/extra/qt/PKGBUILD
+++ b/extra/qt/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 162529 2012-06-27 06:33:44Z andrea $
+# $Id: PKGBUILD 163963 2012-07-23 03:00:13Z allan $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Pierre Schmitz <pierre@archlinux.de>
pkgbase=qt
pkgname=('qt' 'qt-private-headers')
pkgver=4.8.2
-pkgrel=2
+pkgrel=3
arch=('i686' 'x86_64' 'mips64el')
url='http://qt-project.org/'
license=('GPL3' 'LGPL')
diff --git a/extra/rosegarden/PKGBUILD b/extra/rosegarden/PKGBUILD
index 0423c974b..5eb884c14 100644
--- a/extra/rosegarden/PKGBUILD
+++ b/extra/rosegarden/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 159220 2012-05-18 11:33:18Z schiv $
+# $Id: PKGBUILD 164009 2012-07-23 18:45:40Z schiv $
# Maintainer: Ray Rashif <schiv@archlinux.org>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: damir <damir@archlinux.org>
@@ -6,7 +6,7 @@
pkgname=rosegarden
pkgver=12.04
-pkgrel=1
+pkgrel=2
pkgdesc="MIDI/audio sequencer and notation editor"
arch=('i686' 'x86_64' 'mips64el')
url="http://www.rosegardenmusic.com/"
diff --git a/extra/taglib/PKGBUILD b/extra/taglib/PKGBUILD
index fa8a2da1a..aed74cccf 100644
--- a/extra/taglib/PKGBUILD
+++ b/extra/taglib/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 158844 2012-05-12 11:47:35Z tomegun $
+# $Id: PKGBUILD 163967 2012-07-23 03:03:00Z allan $
# Maintainer: Tom Gundersen <teg@jklm.no>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Tobias Powalowski <tpowa@archlinux.org>
pkgname=taglib
pkgver=1.7.2
-pkgrel=1
+pkgrel=2
pkgdesc="A Library for reading and editing the meta-data of several popular audio formats"
arch=('i686' 'x86_64' 'mips64el')
url="http://developer.kde.org/~wheeler/taglib.html"
diff --git a/extra/transmission/PKGBUILD b/extra/transmission/PKGBUILD
index d718c87c1..7369bf9c8 100644
--- a/extra/transmission/PKGBUILD
+++ b/extra/transmission/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 163181 2012-07-08 13:55:46Z ibiru $
+# $Id: PKGBUILD 164034 2012-07-24 18:37:58Z ibiru $
# Maintainer : Ionut Biru <ibiru@archlinux.org>
pkgbase=transmission
pkgname=('transmission-cli' 'transmission-gtk' 'transmission-qt')
-pkgver=2.60
+pkgver=2.61
pkgrel=1
arch=('i686' 'x86_64' 'mips64el')
url="http://www.transmissionbt.com/"
@@ -11,7 +11,7 @@ license=('MIT')
makedepends=('gtk3' 'intltool' 'curl' 'qt' 'libevent')
source=(http://mirrors.m0k.org/transmission/files/$pkgbase-$pkgver.tar.xz
transmissiond transmissiond.conf)
-md5sums=('2aff84c29a3c4b51ac5682a89d96bda5'
+md5sums=('2ed5b7815ebda65223bac6bdb09dec42'
'08875299e3fbb68fc546c1f350ac1f06'
'be39806c35b7544856fa4070b00fc960')
diff --git a/extra/whois/PKGBUILD b/extra/whois/PKGBUILD
index 4cba29cb9..fa4d21b40 100644
--- a/extra/whois/PKGBUILD
+++ b/extra/whois/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 162734 2012-06-29 09:39:59Z giovanni $
+# $Id: PKGBUILD 164051 2012-07-25 06:08:06Z giovanni $
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
pkgname=whois
-pkgver=5.0.17
+pkgver=5.0.18
pkgrel=1
pkgdesc="The whois client by Marco d'Itri"
arch=('i686' 'x86_64' 'mips64el')
@@ -12,7 +12,7 @@ license=('GPL')
depends=('libidn')
makedepends=('perl')
source=("http://ftp.debian.org/debian/pool/main/w/whois/${pkgname}_${pkgver}.tar.xz")
-md5sums=('754ff9a089913bf198400eb937e24055')
+md5sums=('15d777273d44a5b9a0814c1ea0d22b1a')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
diff --git a/extra/xf86-input-evdev/PKGBUILD b/extra/xf86-input-evdev/PKGBUILD
index f8cfb55cf..42cf2f3d5 100644
--- a/extra/xf86-input-evdev/PKGBUILD
+++ b/extra/xf86-input-evdev/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 153700 2012-03-18 08:50:36Z andyrtr $
+# $Id: PKGBUILD 164024 2012-07-24 15:40:48Z andyrtr $
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Alexander Baldeck <Alexander@archlinux.org
pkgname=xf86-input-evdev
-pkgver=2.7.0
-pkgrel=2
+pkgver=2.7.1
+pkgrel=1
pkgdesc="X.org evdev input driver"
arch=(i686 x86_64 'mips64el')
url="http://xorg.freedesktop.org/"
@@ -14,14 +14,11 @@ makedepends=('xorg-server-devel>=1.11.99.902')
conflicts=('xorg-server<1.11.99.902')
options=('!libtool' '!makeflags')
groups=('xorg-drivers' 'xorg')
-source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2
- Fix_inverted_horizontal_scroll.diff)
-sha1sums=('f0cb2d8400c33e8e83b538b53512e77ba73367fa'
- 'e959e710d9a0c60a3af967148b9d5e014544993c')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
+sha256sums=('1c128bbd34bc17d08cc723c2429cdfe7efc426cb753e38189ffd290002a3b598')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
- patch -Np1 -i ${srcdir}/Fix_inverted_horizontal_scroll.diff
./configure --prefix=/usr
make
}
diff --git a/extra/xf86-input-keyboard/PKGBUILD b/extra/xf86-input-keyboard/PKGBUILD
index a84212019..621262005 100644
--- a/extra/xf86-input-keyboard/PKGBUILD
+++ b/extra/xf86-input-keyboard/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 153307 2012-03-12 20:52:44Z andyrtr $
+# $Id: PKGBUILD 164026 2012-07-24 15:46:19Z andyrtr $
# Maintainer: Jan de Groot <jgc@archlinux.org>
pkgname=xf86-input-keyboard
-pkgver=1.6.1
-pkgrel=2
+pkgver=1.6.2
+pkgrel=1
pkgdesc="X.Org keyboard input driver"
arch=(i686 x86_64)
license=('custom')
@@ -14,7 +14,7 @@ conflicts=('xorg-server<1.11.99.902')
options=('!libtool')
groups=('xorg-drivers' 'xorg')
source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
-sha1sums=('ef30fecb9e846a5268ae339846401489a785e413')
+sha256sums=('76651a84f5031f7c6ecf075d55989c04a00689642579df6d1a1bee6d5c2e5f8a')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
diff --git a/extra/xf86-video-intel/PKGBUILD b/extra/xf86-video-intel/PKGBUILD
index d15b41d82..342454cfc 100644
--- a/extra/xf86-video-intel/PKGBUILD
+++ b/extra/xf86-video-intel/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 163776 2012-07-19 20:25:09Z andyrtr $
+# $Id: PKGBUILD 164055 2012-07-25 15:11:19Z andyrtr $
# Maintainer: AndyRTR <andyrtr@archlinux.org>
# Maintainer: Jan de Groot <jgc@archlinux.org>
pkgname=xf86-video-intel
-pkgver=2.20.0
-pkgrel=1
+pkgver=2.20.1
+pkgrel=3
arch=(i686 x86_64)
url="http://xorg.freedesktop.org/"
license=('custom')
@@ -17,11 +17,18 @@ provides=('xf86-video-intel-uxa' 'xf86-video-intel-sna')
conflicts=('xf86-video-intel-sna' 'xf86-video-intel-uxa' 'xorg-server<1.12.0' 'xf86-video-i810' 'xf86-video-intel-legacy')
options=('!libtool')
groups=('xorg-drivers' 'xorg')
-source=(${url}/archive/individual/driver/${pkgname}-${pkgver}.tar.bz2)
-sha256sums=('21949297220ceda32bba430f778c6409002079dc717c7190dbd1062ab4a56783')
+source=(${url}/archive/individual/driver/${pkgname}-${pkgver}.tar.bz2
+ gmux_backlight.diff
+ sna_backlight_fixes.diff)
+sha256sums=('de340a527dfa26bba6f79b423c2fe2b1d70657e46fa3fb468613c047443ff424'
+ '87383122dae69512f86039e9d72110bd6bf4cf717756a31b34862c200277b31b'
+ 'a4a6bc1c4a6b79c80c56764eed8ab318a587ed554d5d9a381cc7238ab884ec04')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
+ # https://bugs.freedesktop.org/show_bug.cgi?id=52423
+ patch -Np1 -i ${srcdir}/gmux_backlight.diff
+ patch -Np1 -i ${srcdir}/sna_backlight_fixes.diff
./configure --prefix=/usr \
--enable-dri
make
diff --git a/extra/xf86-video-intel/gmux_backlight.diff b/extra/xf86-video-intel/gmux_backlight.diff
new file mode 100644
index 000000000..a5522e82b
--- /dev/null
+++ b/extra/xf86-video-intel/gmux_backlight.diff
@@ -0,0 +1,10 @@
+--- xf86-video-intel-2.20.0.orig/src/intel_display.c 2012-07-15 21:02:49.000000000 +1000
++++ xf86-video-intel-2.20.0/src/intel_display.c 2012-07-24 11:53:42.762165514 +1000
+@@ -127,6 +127,7 @@
+ * List of available kernel interfaces in priority order
+ */
+ static const char *backlight_interfaces[] = {
++ "gmux_backlight",
+ "asus-laptop",
+ "asus-nb-wmi",
+ "eeepc",
diff --git a/extra/xf86-video-intel/sna_backlight_fixes.diff b/extra/xf86-video-intel/sna_backlight_fixes.diff
new file mode 100644
index 000000000..1511a8d79
--- /dev/null
+++ b/extra/xf86-video-intel/sna_backlight_fixes.diff
@@ -0,0 +1,54 @@
+From 0ab6d7a50d37cf4454577cb8c333d4b8683aa054 Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Wed, 25 Jul 2012 11:20:36 +0000
+Subject: sna: Prefer platform backlight devices over firmware
+
+This is in contrast to libbacklight but closer to our original code as
+we prefer a known custom backlight controller over the ACPI interfaces.
+As only the ACPI interfaces are marked as firmware, and the custom
+backlight controllers as platform, we therefore need to prefer platform
+backlight devices.
+
+Reported-by: Austin Lund <austin.lund@gmail.com>
+References: https://bugs.freedesktop.org/show_bug.cgi?id=52423
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+---
+diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
+index b31f08d..ebecd21 100644
+--- a/src/sna/sna_display.c
++++ b/src/sna/sna_display.c
+@@ -282,8 +282,8 @@ sna_output_backlight_get_max(xf86OutputPtr output)
+ }
+
+ enum {
+- FIRMWARE,
+ PLATFORM,
++ FIRMWARE,
+ RAW,
+ NAMED,
+ };
+--
+cgit v0.9.0.2-2-gbebe
+From 484b072072c8297a87940c9e32097923f0a77c8f Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Wed, 25 Jul 2012 11:22:47 +0000
+Subject: sna: Add 'gmux_backlight' to list of known devices for backwards compatability
+
+Reported-by: Austin Lund <austin.lund@gmail.com>
+References: https://bugs.freedesktop.org/show_bug.cgi?id=52423
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+---
+diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
+index ebecd21..a908596 100644
+--- a/src/sna/sna_display.c
++++ b/src/sna/sna_display.c
+@@ -292,6 +292,7 @@ static void
+ sna_output_backlight_init(xf86OutputPtr output)
+ {
+ static const char *known_interfaces[] = {
++ "gmux_backlight",
+ "asus-laptop",
+ "asus-nb-wmi",
+ "eeepc",
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/extra/xf86-video-openchrome/PKGBUILD b/extra/xf86-video-openchrome/PKGBUILD
index 7a494f861..62bbad9bc 100644
--- a/extra/xf86-video-openchrome/PKGBUILD
+++ b/extra/xf86-video-openchrome/PKGBUILD
@@ -1,25 +1,25 @@
-# $Id: PKGBUILD 159185 2012-05-17 13:29:35Z andyrtr $
+# $Id: PKGBUILD 164022 2012-07-24 15:38:49Z andyrtr $
# Contributor: Paul Mattal <paul@mattal.com>
# Maintainer: Juergen Hoetzel <juergen@hoetzel.info>
pkgname=xf86-video-openchrome
-pkgver=0.2.906
+pkgver=0.3.0
pkgrel=1
pkgdesc="X.Org Openchrome drivers"
arch=(i686 x86_64)
license=('custom')
url="http://www.openchrome.org"
depends=('libdrm' 'libxvmc')
-makedepends=('xorg-server-devel>=1.11.99.902' 'libx11' 'xf86driproto' 'mesa') #'glproto' 'libgl')
+makedepends=('xorg-server-devel>=1.11.99.902' 'libx11' 'xf86driproto' 'mesa')
replaces=('openchrome' 'xf86-video-via')
options=('!libtool' '!emptydirs' '!makeflags')
conflicts=('xf86-video-via' 'xf86-video-unichrome' 'openchrome' 'xorg-server<1.11.99.902' 'unichrome-dri')
source=(http://xorg.freedesktop.org/archive/individual/driver/${pkgname}-${pkgver}.tar.bz2)
-sha1sums=('1c49bf722326442393288db490ff48d437e337f9')
+sha1sums=('6916be0deaff4a07974590dcef1bc37a1a59e5df')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
- ./configure --prefix=/usr # --disable-dri
+ ./configure --prefix=/usr
make
}
diff --git a/extra/xfce4-weather-plugin/PKGBUILD b/extra/xfce4-weather-plugin/PKGBUILD
index 495505e25..1766a2430 100644
--- a/extra/xfce4-weather-plugin/PKGBUILD
+++ b/extra/xfce4-weather-plugin/PKGBUILD
@@ -1,33 +1,27 @@
-# $Id: PKGBUILD 157901 2012-04-30 04:21:38Z foutrelis $
+# $Id: PKGBUILD 163983 2012-07-23 10:32:47Z foutrelis $
# Maintainer: Evangelos Foutras <evangelos@foutrelis.com>
# Contributor: Suzy Williams <suzanne.williams3@verizon.net>
pkgname=xfce4-weather-plugin
-pkgver=0.7.4
-pkgrel=3
+pkgver=0.8.0
+pkgrel=1
pkgdesc="A weather plugin for the Xfce4 panel"
arch=('i686' 'x86_64' 'mips64el')
url="http://goodies.xfce.org/projects/panel-plugins/xfce4-weather-plugin"
license=('GPL2')
groups=('xfce4-goodies')
-depends=('xfce4-panel' 'libxfcegui4' 'libxml2' 'hicolor-icon-theme')
+depends=('xfce4-panel' 'libxml2' 'hicolor-icon-theme')
makedepends=('intltool')
options=('!libtool')
install=$pkgname.install
-source=(http://archive.xfce.org/src/panel-plugins/$pkgname/0.7/$pkgname-$pkgver.tar.bz2)
-sha256sums=('3f76207b8a845d15bfec6825bd5300aedd086c455259c4dd8670a89a3c8ab382')
+source=(http://archive.xfce.org/src/panel-plugins/$pkgname/0.8/$pkgname-$pkgver.tar.bz2)
+sha256sums=('37157456e41b1d6367ee3d785c92845d6b3d826cc1a3740282db5c3f6b0647b9')
build() {
cd "$srcdir/$pkgname-$pkgver"
- # Switch to a working license key
- # https://bugs.archlinux.org/task/26815
- sed -i \
- -e 's/^#define PARTNER_ID.*/#define PARTNER_ID "1003666583"/' \
- -e 's/^#define LICENSE_KEY.*/#define LICENSE_KEY "4128909340a9b2fc"/' \
- panel-plugin/weather.h
-
- ./configure --prefix=/usr \
+ ./configure \
+ --prefix=/usr \
--sysconfdir=/etc \
--libexecdir=/usr/lib \
--localstatedir=/var \
diff --git a/extra/zsh/PKGBUILD b/extra/zsh/PKGBUILD
index 1f12e4f3e..d594bcef6 100644
--- a/extra/zsh/PKGBUILD
+++ b/extra/zsh/PKGBUILD
@@ -1,8 +1,8 @@
-# $Id: PKGBUILD 157985 2012-04-30 15:21:56Z pierre $
+# $Id: PKGBUILD 164038 2012-07-24 20:46:25Z pierre $
# Maintainer: Pierre Schmitz <pierre@archlinux.de>
pkgname=zsh
-pkgver=4.3.17
+pkgver=5.0.0
pkgrel=2
pkgdesc='A very advanced and programmable command interpreter (shell) for UNIX'
arch=('i686' 'x86_64' 'mips64el')
@@ -13,17 +13,21 @@ install=zsh.install
source=("ftp://ftp.zsh.org/pub/${pkgname}-${pkgver}.tar.bz2"
'zprofile')
backup=('etc/zsh/zprofile')
-md5sums=('8258967060b2654f30001a011946ac6a'
+md5sums=('e8484468925cec8d9a84b8b04797e764'
'24a9335edf77252a7b5f52e079f7aef7')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
+
# FS#16360
sed -i 's/init.d/rc.d/g' Doc/Zsh/compsys.yo \
Doc/zsh.texi \
Completion/Unix/Type/_services \
Completion/Unix/Command/_init_d
+ # Set correct keymap path
+ sed -i 's#/usr/share/keymaps#/usr/share/kbd/keymaps#g' Completion/Unix/Command/_loadkeys
+
# Remove unneeded and conflicting completion scripts
rm -rf Completion/{AIX,BSD,Cygwin,Darwin,Debian,Mandriva,openSUSE,Redhat,Solaris}
rm -f Completion/Linux/Command/_{pkgtool,rpmbuild,yast}
diff --git a/kde-unstable/kdeplasma-addons/fix-twitter-auth.patch b/kde-unstable/kdeplasma-addons/fix-twitter-auth.patch
new file mode 100644
index 000000000..0a55ce6ce
--- /dev/null
+++ b/kde-unstable/kdeplasma-addons/fix-twitter-auth.patch
@@ -0,0 +1,40 @@
+commit edc7699f4f4b6d9fc0568b031143cb653ae4294e
+Author: Sebastian Kügler <sebas@kde.org>
+Date: Tue Jul 10 00:56:58 2012 +0200
+
+ fix authorization from twitter applet
+
+ user in authorize() can be empty when it's already set in d->user,
+ respect that and successfully authorize.
+
+ Thanks to phoenix_fbrd for finding this issue and the patch.
+
+ REVIEW:105498
+ BUG:302267
+
+ Please reopen the bug report if you still encounter crashes.
+
+ Cherry-picked from 28f6d7cee7e81fda9ba396cc6477370a8ed3ada7
+
+diff --git a/dataengines/microblog/koauth.cpp b/dataengines/microblog/koauth.cpp
+index 565d79f..7566b95 100644
+--- a/dataengines/microblog/koauth.cpp
++++ b/dataengines/microblog/koauth.cpp
+@@ -168,13 +168,15 @@ void KOAuth::run()
+
+ void KOAuth::authorize(const QString &serviceBaseUrl, const QString &user, const QString &password)
+ {
+- d->user = user;
++ if (!user.isEmpty()) {
++ d->user = user;
++ }
+ d->password = password;
+ d->serviceBaseUrl = serviceBaseUrl;
+ d->accessToken = QByteArray();
+ d->accessTokenSecret = QByteArray();
+
+- d->w->setUser(user);
++ d->w->setUser(d->user);
+ d->w->setServiceBaseUrl(serviceBaseUrl);
+ d->w->setPassword(password);
+
diff --git a/libre/audacious-plugins-libre/PKGBUILD b/libre/audacious-plugins-libre/PKGBUILD
index 51668c454..59011736c 100644
--- a/libre/audacious-plugins-libre/PKGBUILD
+++ b/libre/audacious-plugins-libre/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 162794 2012-06-30 14:17:02Z bisson $
+# $Id: PKGBUILD 164182 2012-07-27 00:15:41Z bisson $
# Contributor: Alexander Fehr <pizzapunk gmail com>
# Contributor: William Rea <sillywilly@gmail.com>
# Maintainer: Gaetan Bisson <bisson@archlinux.org>
@@ -7,8 +7,8 @@
_pkgname=audacious-plugins
pkgname=audacious-plugins-libre
-pkgver=3.2.4
-pkgrel=2
+pkgver=3.3
+pkgrel=1
pkgdesc='Plugins for Audacious without unfree plugins'
url='http://audacious-media-player.org/'
arch=('i686' 'x86_64')
@@ -60,7 +60,7 @@ optdepends=('oss: Open Sound System v4 output'
'libcue: CUE playlist format')
source=("http://distfiles.audacious-media-player.org/${_pkgname}-${pkgver}.tar.bz2")
-sha1sums=('7538a0391504ce4a92967dc7c5bd4948751efa91')
+sha1sums=('2ce65a9d9a2d5d5cbe41befa70c89f36fff43286')
build() {
# Retrieve upstream & remove plugin 'psf' due to issues mentioned above.
sed -i s/enable_psf=yes/enable_psf=no/ ${_pkgname}-$pkgver/configure
diff --git a/libre/h-client/PKGBUILD b/libre/h-client/PKGBUILD
index e77a2437e..821517397 100644
--- a/libre/h-client/PKGBUILD
+++ b/libre/h-client/PKGBUILD
@@ -1,10 +1,10 @@
# Maintainer: Michał Masłowski <mtjm@mtjm.eu>
pkgname=h-client
-_pkgver=0.0a0.dev-r107
+_pkgver=0.0a0.dev-r118
pkgver=${_pkgver/-/.}
pkgrel=1
-pkgdesc="A client for an h-source server (such as http://www.h-node.com)"
+pkgdesc="A client for an h-source server (such as http://www.h-node.org/)"
arch=('any')
url="https://savannah.nongnu.org/projects/h-client/"
license=('GPL3')
@@ -12,8 +12,9 @@ depends=('python2' 'python2-distribute' 'python-pycurl' 'pygtk')
options=(!emptydirs)
# Official source is in SVN, this is made by "python2 setup.py sdist"
# on a machine having Subversion 1.6.x (e.g. on Trisquel 4.0).
-source=("https://mtjm.eu/releases/hclient-${_pkgver}.tar.gz")
-sha512sums=('d820871fcf3f92e6e31aa02273ae413bf066524eaf245f1d4cf7dc8b0ba5799eb07bf86dd28861c8878c73147bbcae563668cb3a6fa9c3382c751e6717d85f0c')
+source=("https://mtjm.eu/releases/hclient-${_pkgver}.tar.gz"{,.sig})
+sha512sums=('af962c67b363435cfa74f7c420760b0254ba3e7c1e6611d5ff276e6595e30dadf1b5d588cd2469647efdbb0099f70a027b9f65d8aeefc70ea712c9ef5d7cbace'
+ '7d4746297c4a0bd328b1e57f596e827b4a12d2f703d074f7e87ea0c9e3f747c2cfd48da971e81fdaf27939d463b359fac4638820f08486ef28502e769168692d')
build() {
cd "$srcdir/hclient-${_pkgver}"
diff --git a/libre/iceweasel-libre/PKGBUILD b/libre/iceweasel-libre/PKGBUILD
index 23423e428..259413591 100644
--- a/libre/iceweasel-libre/PKGBUILD
+++ b/libre/iceweasel-libre/PKGBUILD
@@ -12,7 +12,7 @@
_pgo=false
-# We're getting this from Debian Sid
+# We're getting this from Debian Experimental
_debname=iceweasel
_debver=14.0.1
_debrel=2
diff --git a/libre/linux-libre/PKGBUILD b/libre/linux-libre/PKGBUILD
index df33e5f8c..d796efe65 100644
--- a/libre/linux-libre/PKGBUILD
+++ b/libre/linux-libre/PKGBUILD
@@ -11,9 +11,10 @@ pkgbase=linux-libre
pkgname=('linux-libre' 'linux-libre-headers' 'linux-libre-docs') # Build stock -LIBRE kernel
# pkgname=linux-custom # Build kernel with a different name
_kernelname=-LIBRE
-_basekernel=3.4
-_sublevel=6
-pkgver=${_basekernel}.${_sublevel}
+_basekernel=3.5
+#_sublevel=6
+#pkgver=${_basekernel}.${_sublevel}
+pkgver=${_basekernel}
_lxopkgver=${_basekernel}.6 # nearly always the same as pkgver
pkgrel=1
arch=('i686' 'x86_64' 'mips64el')
@@ -22,7 +23,7 @@ license=('GPL2')
makedepends=('xmlto' 'docbook-xsl')
options=('!strip')
source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-gnu/linux-libre-${_basekernel}-gnu.tar.xz"
- "http://linux-libre.fsfla.org/pub/linux-libre/releases/${pkgver}-gnu/patch-${_basekernel}-gnu-${pkgver}-gnu.xz"
+ #"http://linux-libre.fsfla.org/pub/linux-libre/releases/${pkgver}-gnu/patch-${_basekernel}-gnu-${pkgver}-gnu.xz"
# the main kernel config files
'config.i686' 'config.x86_64'
# standard config files for mkinitcpio ramdisk
@@ -32,19 +33,16 @@ source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-gn
'boot-logo.patch'
'change-default-console-loglevel.patch'
'i915-fix-ghost-tv-output.patch'
- '3.4.4-fix-backlight-regression.patch'
"http://www.linux-libre.fsfla.org/pub/linux-libre/lemote/gnewsense/pool/linux-patches-${_lxopkgver}-gnu_0loongsonlibre_mipsel.tar.bz2")
-md5sums=('a5e128ca059cceb8b69148b41ff4ac6f'
- 'fe16da96e942fcfc195fc53ff93e3864'
- '669c3f9d5c6a2109bad8e511287826c3'
- '454231e14419e56a5281eb7bc6fde83e'
+md5sums=('2407fc9563a74acaf38aa0c06516eb1c'
+ 'a89ff57fd3ce5833d51f7cdef17a9a3c'
+ '978a58bebbdfe04d6e91523e09da5ad5'
'e49ac236dfeef709f91a3d993ea7b62c'
'2967cecc3af9f954ccc822fd63dca6ff'
'8267264d9a8966e57fdacd1fa1fc65c4'
'04b21c79df0a952c22d681dd4f4562df'
'9d3c56a4b999c8bfbd4018089a62f662'
'263725f20c0b9eb9c353040792d644e5'
- '80a46681386bb87813989faeb92bdd9a'
'a9338d11a2b23fe0cd43cc4fee5aed42')
if [ "$CARCH" != "mips64el" ]; then
# Don't use the Loongson-specific patches on non-mips64el arches.
@@ -71,9 +69,6 @@ build() {
# needed.
patch -Np1 -i "${srcdir}/i915-fix-ghost-tv-output.patch"
- # Fix backlight control on some laptops:
- # https://bugzilla.kernel.org/show_bug.cgi?id=43168
- patch -Np1 -i "${srcdir}/3.4.4-fix-backlight-regression.patch"
# set DEFAULT_CONSOLE_LOGLEVEL to 4 (same value as the 'quiet' kernel param)
# remove this when a Kconfig knob is made available by upstream
@@ -286,7 +281,7 @@ package_linux-libre-headers() {
cp drivers/media/video/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/"
- for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102; do
+ for i in bt8xx cpia2 cx25840 cx88 em28xx pwc saa7134 sn9c102; do
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/${i}"
cp -a drivers/media/video/${i}/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/${i}"
done
diff --git a/libre/linux-libre/config.i686 b/libre/linux-libre/config.i686
index a6e1a6310..114841394 100644
--- a/libre/linux-libre/config.i686
+++ b/libre/linux-libre/config.i686
@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
-# Linux/i386 3.4.0-1 Kernel Configuration
+# Linux/i386 3.5.0-1 Kernel Configuration
#
# CONFIG_64BIT is not set
CONFIG_X86_32=y
@@ -9,10 +9,6 @@ CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT="elf32-i386"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/i386_defconfig"
-CONFIG_GENERIC_CMOS_UPDATE=y
-CONFIG_CLOCKSOURCE_WATCHDOG=y
-CONFIG_GENERIC_CLOCKEVENTS=y
-CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -26,9 +22,7 @@ CONFIG_GENERIC_GPIO=y
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
-# CONFIG_GENERIC_TIME_VSYSCALL is not set
CONFIG_ARCH_HAS_CPU_RELAX=y
CONFIG_ARCH_HAS_DEFAULT_IDLE=y
CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
@@ -46,11 +40,12 @@ CONFIG_HAVE_INTEL_TXT=y
CONFIG_X86_32_SMP=y
CONFIG_X86_HT=y
CONFIG_ARCH_HWEIGHT_CFLAGS="-fcall-saved-ecx -fcall-saved-edx"
-CONFIG_KTIME_SCALAR=y
CONFIG_ARCH_CPU_PROBE_RELEASE=y
+CONFIG_ARCH_SUPPORTS_UPROBES=y
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
CONFIG_HAVE_IRQ_WORK=y
CONFIG_IRQ_WORK=y
+CONFIG_BUILDTIME_EXTABLE_SORT=y
#
# General setup
@@ -101,6 +96,20 @@ CONFIG_IRQ_DOMAIN=y
# CONFIG_IRQ_DOMAIN_DEBUG is not set
CONFIG_IRQ_FORCED_THREADING=y
CONFIG_SPARSE_IRQ=y
+CONFIG_CLOCKSOURCE_WATCHDOG=y
+CONFIG_KTIME_SCALAR=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
+CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=y
+CONFIG_GENERIC_CMOS_UPDATE=y
+
+#
+# Timers subsystem
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
#
# RCU Subsystem
@@ -108,6 +117,7 @@ CONFIG_SPARSE_IRQ=y
CONFIG_TREE_PREEMPT_RCU=y
CONFIG_PREEMPT_RCU=y
CONFIG_RCU_FANOUT=32
+CONFIG_RCU_FANOUT_LEAF=16
# CONFIG_RCU_FANOUT_EXACT is not set
CONFIG_RCU_FAST_NO_HZ=y
# CONFIG_TREE_RCU_TRACE is not set
@@ -139,7 +149,6 @@ CONFIG_BLK_CGROUP=y
CONFIG_NAMESPACES=y
CONFIG_UTS_NS=y
CONFIG_IPC_NS=y
-CONFIG_USER_NS=y
CONFIG_PID_NS=y
CONFIG_NET_NS=y
CONFIG_SCHED_AUTOGROUP=y
@@ -182,7 +191,6 @@ CONFIG_HAVE_PERF_EVENTS=y
# Kernel Performance Events And Counters
#
CONFIG_PERF_EVENTS=y
-CONFIG_PERF_COUNTERS=y
# CONFIG_DEBUG_PERF_USE_VMALLOC is not set
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_PCI_QUIRKS=y
@@ -206,7 +214,9 @@ CONFIG_HAVE_KRETPROBES=y
CONFIG_HAVE_OPTPROBES=y
CONFIG_HAVE_ARCH_TRACEHOOK=y
CONFIG_HAVE_DMA_ATTRS=y
+CONFIG_HAVE_DMA_CONTIGUOUS=y
CONFIG_USE_GENERIC_SMP_HELPERS=y
+CONFIG_GENERIC_SMP_IDLE_THREAD=y
CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
CONFIG_HAVE_DMA_API_DEBUG=y
CONFIG_HAVE_HW_BREAKPOINT=y
@@ -218,6 +228,8 @@ CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y
CONFIG_HAVE_ALIGNED_STRUCT_PAGE=y
CONFIG_HAVE_CMPXCHG_LOCAL=y
CONFIG_HAVE_CMPXCHG_DOUBLE=y
+CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
+CONFIG_SECCOMP_FILTER=y
#
# GCOV-based kernel profiling
@@ -312,11 +324,6 @@ CONFIG_FREEZER=y
# Processor type and features
#
CONFIG_ZONE_DMA=y
-CONFIG_TICK_ONESHOT=y
-CONFIG_NO_HZ=y
-CONFIG_HIGH_RES_TIMERS=y
-CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
-CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=y
CONFIG_SMP=y
CONFIG_X86_MPPARSE=y
# CONFIG_X86_BIGSMP is not set
@@ -451,7 +458,9 @@ CONFIG_HWPOISON_INJECT=m
CONFIG_TRANSPARENT_HUGEPAGE=y
CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y
# CONFIG_TRANSPARENT_HUGEPAGE_MADVISE is not set
+CONFIG_CROSS_MEMORY_ATTACH=y
CONFIG_CLEANCACHE=y
+CONFIG_FRONTSWAP=y
# CONFIG_HIGHPTE is not set
CONFIG_X86_CHECK_BIOS_CORRUPTION=y
CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y
@@ -496,6 +505,10 @@ CONFIG_HIBERNATION=y
CONFIG_PM_STD_PARTITION=""
CONFIG_PM_SLEEP=y
CONFIG_PM_SLEEP_SMP=y
+CONFIG_PM_AUTOSLEEP=y
+CONFIG_PM_WAKELOCKS=y
+CONFIG_PM_WAKELOCKS_LIMIT=100
+CONFIG_PM_WAKELOCKS_GC=y
CONFIG_PM_RUNTIME=y
CONFIG_PM=y
CONFIG_PM_DEBUG=y
@@ -632,7 +645,6 @@ CONFIG_PCI_LABEL=y
CONFIG_ISA_DMA_API=y
CONFIG_ISA=y
# CONFIG_EISA is not set
-# CONFIG_MCA is not set
# CONFIG_SCx200 is not set
CONFIG_OLPC=y
CONFIG_OLPC_XO1_PM=y
@@ -678,6 +690,7 @@ CONFIG_RAPIDIO=y
CONFIG_RAPIDIO_TSI721=y
CONFIG_RAPIDIO_DISC_TIMEOUT=30
# CONFIG_RAPIDIO_ENABLE_RX_TX_PORTS is not set
+CONFIG_RAPIDIO_DMA_ENGINE=y
CONFIG_RAPIDIO_DEBUG=y
CONFIG_RAPIDIO_TSI57X=y
CONFIG_RAPIDIO_CPS_XX=y
@@ -705,6 +718,7 @@ CONFIG_PACKET=y
CONFIG_UNIX=y
CONFIG_UNIX_DIAG=m
CONFIG_XFRM=y
+CONFIG_XFRM_ALGO=m
CONFIG_XFRM_USER=m
# CONFIG_XFRM_SUB_POLICY is not set
# CONFIG_XFRM_MIGRATE is not set
@@ -843,6 +857,7 @@ CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
CONFIG_NETFILTER_XT_TARGET_CT=m
CONFIG_NETFILTER_XT_TARGET_DSCP=m
CONFIG_NETFILTER_XT_TARGET_HL=m
+CONFIG_NETFILTER_XT_TARGET_HMARK=m
CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m
CONFIG_NETFILTER_XT_TARGET_LED=m
CONFIG_NETFILTER_XT_TARGET_LOG=m
@@ -1003,7 +1018,6 @@ CONFIG_IP_NF_ARP_MANGLE=m
#
CONFIG_NF_DEFRAG_IPV6=m
CONFIG_NF_CONNTRACK_IPV6=m
-CONFIG_IP6_NF_QUEUE=m
CONFIG_IP6_NF_IPTABLES=m
CONFIG_IP6_NF_MATCH_AH=m
CONFIG_IP6_NF_MATCH_EUI64=m
@@ -1099,11 +1113,11 @@ CONFIG_IPDDP_ENCAP=y
CONFIG_IPDDP_DECAP=y
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
-# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
CONFIG_PHONET=m
CONFIG_IEEE802154=m
CONFIG_IEEE802154_6LOWPAN=m
+CONFIG_MAC802154=m
CONFIG_NET_SCHED=y
#
@@ -1127,6 +1141,8 @@ CONFIG_NET_SCH_DRR=m
CONFIG_NET_SCH_MQPRIO=m
CONFIG_NET_SCH_CHOKE=m
CONFIG_NET_SCH_QFQ=m
+CONFIG_NET_SCH_CODEL=m
+CONFIG_NET_SCH_FQ_CODEL=m
CONFIG_NET_SCH_INGRESS=m
CONFIG_NET_SCH_PLUG=m
@@ -1162,6 +1178,7 @@ CONFIG_NET_SCH_FIFO=y
# CONFIG_DCB is not set
CONFIG_DNS_RESOLVER=y
CONFIG_BATMAN_ADV=m
+CONFIG_BATMAN_ADV_BLA=y
# CONFIG_BATMAN_ADV_DEBUG is not set
CONFIG_OPENVSWITCH=m
CONFIG_RPS=y
@@ -1339,6 +1356,8 @@ CONFIG_CEPH_LIB=m
# CONFIG_CEPH_LIB_USE_DNS_RESOLVER is not set
CONFIG_NFC=m
CONFIG_NFC_NCI=m
+CONFIG_NFC_HCI=m
+# CONFIG_NFC_SHDLC is not set
# CONFIG_NFC_LLCP is not set
#
@@ -1370,6 +1389,7 @@ CONFIG_EXTRA_FIRMWARE=""
CONFIG_REGMAP=y
CONFIG_REGMAP_I2C=m
CONFIG_DMA_SHARED_BUFFER=y
+# CONFIG_CMA is not set
CONFIG_CONNECTOR=y
CONFIG_PROC_EVENTS=y
CONFIG_MTD=m
@@ -1500,7 +1520,6 @@ CONFIG_MTD_UBI=m
CONFIG_MTD_UBI_WL_THRESHOLD=4096
CONFIG_MTD_UBI_BEB_RESERVE=1
# CONFIG_MTD_UBI_GLUEBI is not set
-# CONFIG_MTD_UBI_DEBUG is not set
CONFIG_OF=y
#
@@ -1512,7 +1531,6 @@ CONFIG_OF_PROMTREE=y
CONFIG_OF_ADDRESS=y
CONFIG_OF_IRQ=y
CONFIG_OF_DEVICE=y
-CONFIG_OF_GPIO=y
CONFIG_OF_I2C=m
CONFIG_OF_NET=y
CONFIG_OF_MDIO=m
@@ -1599,7 +1617,8 @@ CONFIG_SENSORS_APDS990X=m
CONFIG_HMC6352=m
CONFIG_DS1682=m
CONFIG_VMWARE_BALLOON=m
-CONFIG_BMP085=m
+CONFIG_BMP085=y
+CONFIG_BMP085_I2C=m
# CONFIG_PCH_PHUB is not set
CONFIG_USB_SWITCH_FSA9480=m
CONFIG_C2PORT=m
@@ -1629,6 +1648,7 @@ CONFIG_SENSORS_LIS3_I2C=m
# Altera FPGA firmware download module
#
CONFIG_ALTERA_STAPL=m
+CONFIG_INTEL_MEI=m
CONFIG_HAVE_IDE=y
# CONFIG_IDE is not set
@@ -1764,6 +1784,7 @@ CONFIG_SCSI_PAS16=m
CONFIG_SCSI_QLOGIC_FAS=m
CONFIG_SCSI_QLOGIC_1280=m
CONFIG_SCSI_QLA_FC=m
+CONFIG_TCM_QLA2XXX=m
CONFIG_SCSI_QLA_ISCSI=m
CONFIG_SCSI_LPFC=m
# CONFIG_SCSI_LPFC_DEBUG_FS is not set
@@ -1936,6 +1957,7 @@ CONFIG_TCM_PSCSI=m
CONFIG_LOOPBACK_TARGET=m
CONFIG_TCM_FC=m
CONFIG_ISCSI_TARGET=m
+CONFIG_SBP_TARGET=m
CONFIG_FUSION=y
CONFIG_FUSION_SPI=m
CONFIG_FUSION_FC=m
@@ -1972,10 +1994,12 @@ CONFIG_EQUALIZER=m
CONFIG_MII=m
CONFIG_IEEE802154_DRIVERS=m
CONFIG_IEEE802154_FAKEHARD=m
+CONFIG_IEEE802154_FAKELB=m
CONFIG_IFB=m
CONFIG_NET_TEAM=m
CONFIG_NET_TEAM_MODE_ROUNDROBIN=m
CONFIG_NET_TEAM_MODE_ACTIVEBACKUP=m
+CONFIG_NET_TEAM_MODE_LOADBALANCE=m
CONFIG_MACVLAN=m
CONFIG_MACVTAP=m
CONFIG_NETCONSOLE=m
@@ -2118,10 +2142,13 @@ CONFIG_E1000=m
CONFIG_E1000E=m
CONFIG_IGB=m
CONFIG_IGB_DCA=y
+CONFIG_IGB_PTP=y
CONFIG_IGBVF=m
CONFIG_IXGB=m
CONFIG_IXGBE=m
+CONFIG_IXGBE_HWMON=y
CONFIG_IXGBE_DCA=y
+CONFIG_IXGBE_PTP=y
CONFIG_IXGBEVF=m
CONFIG_NET_VENDOR_I825XX=y
CONFIG_ELPLUS=m
@@ -2211,8 +2238,8 @@ CONFIG_EPIC100=m
CONFIG_SMSC9420=m
CONFIG_NET_VENDOR_STMICRO=y
CONFIG_STMMAC_ETH=m
-CONFIG_STMMAC_PLATFORM=m
-CONFIG_STMMAC_PCI=m
+# CONFIG_STMMAC_PLATFORM is not set
+CONFIG_STMMAC_PCI=y
# CONFIG_STMMAC_DEBUG_FS is not set
# CONFIG_STMMAC_DA is not set
CONFIG_STMMAC_RING=y
@@ -2230,6 +2257,12 @@ CONFIG_NET_VENDOR_VIA=y
CONFIG_VIA_RHINE=m
# CONFIG_VIA_RHINE_MMIO is not set
CONFIG_VIA_VELOCITY=m
+CONFIG_NET_VENDOR_WIZNET=y
+CONFIG_WIZNET_W5100=m
+CONFIG_WIZNET_W5300=m
+# CONFIG_WIZNET_BUS_DIRECT is not set
+# CONFIG_WIZNET_BUS_INDIRECT is not set
+CONFIG_WIZNET_BUS_ANY=y
CONFIG_NET_VENDOR_XIRCOM=y
CONFIG_PCMCIA_XIRC2PS=m
# CONFIG_FDDI is not set
@@ -2256,6 +2289,8 @@ CONFIG_STE10XP=m
CONFIG_LSI_ET1011C_PHY=m
CONFIG_MICREL_PHY=m
# CONFIG_MDIO_BITBANG is not set
+CONFIG_MDIO_BUS_MUX=m
+CONFIG_MDIO_BUS_MUX_GPIO=m
CONFIG_PLIP=m
CONFIG_PPP=m
CONFIG_PPP_BSDCOMP=m
@@ -2274,7 +2309,6 @@ CONFIG_SLHC=m
# CONFIG_SLIP_COMPRESSED is not set
# CONFIG_SLIP_SMART is not set
# CONFIG_SLIP_MODE_SLIP6 is not set
-# CONFIG_TR is not set
#
# USB Network Adapters
@@ -2389,6 +2423,7 @@ CONFIG_BRCMUTIL=m
CONFIG_BRCMSMAC=m
CONFIG_BRCMFMAC=m
CONFIG_BRCMFMAC_SDIO=y
+# CONFIG_BRCMFMAC_SDIO_OOB is not set
CONFIG_BRCMFMAC_USB=y
# CONFIG_BRCMDBG is not set
CONFIG_HOSTAP=m
@@ -2470,17 +2505,19 @@ CONFIG_RTL8192CU=m
CONFIG_RTLWIFI=m
# CONFIG_RTLWIFI_DEBUG is not set
CONFIG_RTL8192C_COMMON=m
+CONFIG_WL_TI=y
CONFIG_WL1251=m
CONFIG_WL1251_SDIO=m
-CONFIG_WL12XX_MENU=m
CONFIG_WL12XX=m
-CONFIG_WL12XX_SDIO=m
+CONFIG_WLCORE=m
+CONFIG_WLCORE_SDIO=m
CONFIG_WL12XX_PLATFORM_DATA=y
CONFIG_ZD1211RW=m
# CONFIG_ZD1211RW_DEBUG is not set
CONFIG_MWIFIEX=m
CONFIG_MWIFIEX_SDIO=m
CONFIG_MWIFIEX_PCIE=m
+CONFIG_MWIFIEX_USB=m
#
# WiMAX Wireless Broadband devices
@@ -2647,6 +2684,7 @@ CONFIG_INPUT=y
CONFIG_INPUT_FF_MEMLESS=m
CONFIG_INPUT_POLLDEV=m
CONFIG_INPUT_SPARSEKMAP=m
+CONFIG_INPUT_MATRIXKMAP=m
#
# Userland interfaces
@@ -2675,6 +2713,7 @@ CONFIG_KEYBOARD_TCA6416=m
CONFIG_KEYBOARD_TCA8418=m
CONFIG_KEYBOARD_MATRIX=m
# CONFIG_KEYBOARD_LM8323 is not set
+CONFIG_KEYBOARD_LM8333=m
# CONFIG_KEYBOARD_MAX7359 is not set
CONFIG_KEYBOARD_MCS=m
CONFIG_KEYBOARD_MPR121=m
@@ -2762,6 +2801,7 @@ CONFIG_TOUCHSCREEN_ILI210X=m
CONFIG_TOUCHSCREEN_GUNZE=m
CONFIG_TOUCHSCREEN_ELO=m
CONFIG_TOUCHSCREEN_WACOM_W8001=m
+CONFIG_TOUCHSCREEN_WACOM_I2C=m
CONFIG_TOUCHSCREEN_MAX11801=m
CONFIG_TOUCHSCREEN_MCS5000=m
CONFIG_TOUCHSCREEN_MTOUCH=m
@@ -2778,6 +2818,7 @@ CONFIG_TOUCHSCREEN_WM9705=y
CONFIG_TOUCHSCREEN_WM9712=y
CONFIG_TOUCHSCREEN_WM9713=y
CONFIG_TOUCHSCREEN_USB_COMPOSITE=m
+CONFIG_TOUCHSCREEN_MC13783=m
CONFIG_TOUCHSCREEN_USB_EGALAX=y
CONFIG_TOUCHSCREEN_USB_PANJIT=y
CONFIG_TOUCHSCREEN_USB_3M=y
@@ -2802,11 +2843,11 @@ CONFIG_TOUCHSCREEN_TSC2007=m
CONFIG_TOUCHSCREEN_ST1232=m
CONFIG_TOUCHSCREEN_TPS6507X=m
CONFIG_INPUT_MISC=y
-CONFIG_INPUT_AB8500_PONKEY=m
CONFIG_INPUT_AD714X=m
CONFIG_INPUT_AD714X_I2C=m
CONFIG_INPUT_BMA150=m
CONFIG_INPUT_PCSPKR=m
+CONFIG_INPUT_MC13783_PWRBUTTON=m
CONFIG_INPUT_MMA8450=m
CONFIG_INPUT_MPU3050=m
CONFIG_INPUT_APANEL=m
@@ -2953,7 +2994,6 @@ CONFIG_TCG_ATMEL=m
CONFIG_TCG_INFINEON=m
CONFIG_TELCLOCK=m
CONFIG_DEVPORT=y
-CONFIG_RAMOOPS=m
CONFIG_I2C=m
CONFIG_I2C_BOARDINFO=y
CONFIG_I2C_COMPAT=y
@@ -3054,6 +3094,7 @@ CONFIG_DP83640_PHY=m
CONFIG_PTP_1588_CLOCK_PCH=m
CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
CONFIG_GPIOLIB=y
+CONFIG_OF_GPIO=y
# CONFIG_DEBUG_GPIO is not set
CONFIG_GPIO_SYSFS=y
@@ -3063,6 +3104,7 @@ CONFIG_GPIO_SYSFS=y
# CONFIG_GPIO_GENERIC_PLATFORM is not set
# CONFIG_GPIO_IT8761E is not set
CONFIG_GPIO_SCH=m
+CONFIG_GPIO_ICH=m
# CONFIG_GPIO_VX855 is not set
#
@@ -3217,6 +3259,7 @@ CONFIG_SENSORS_SCH5636=m
CONFIG_SENSORS_ADS1015=m
CONFIG_SENSORS_ADS7828=m
CONFIG_SENSORS_AMC6821=m
+CONFIG_SENSORS_INA2XX=m
CONFIG_SENSORS_THMC50=m
CONFIG_SENSORS_TMP102=m
CONFIG_SENSORS_TMP401=m
@@ -3236,6 +3279,7 @@ CONFIG_SENSORS_W83L786NG=m
CONFIG_SENSORS_W83627HF=m
CONFIG_SENSORS_W83627EHF=m
CONFIG_SENSORS_APPLESMC=m
+CONFIG_SENSORS_MC13783_ADC=m
#
# ACPI drivers
@@ -3266,6 +3310,7 @@ CONFIG_IB700_WDT=m
CONFIG_IBMASR=m
CONFIG_WAFER_WDT=m
CONFIG_I6300ESB_WDT=m
+CONFIG_IE6XX_WDT=m
CONFIG_ITCO_WDT=m
CONFIG_ITCO_VENDOR_SUPPORT=y
CONFIG_IT8712F_WDT=m
@@ -3344,21 +3389,23 @@ CONFIG_MFD_SM501=m
CONFIG_MFD_SM501_GPIO=y
CONFIG_HTC_PASIC3=m
CONFIG_UCB1400_CORE=m
+CONFIG_MFD_LM3533=m
# CONFIG_TPS6105X is not set
CONFIG_TPS65010=m
CONFIG_TPS6507X=m
CONFIG_MFD_TPS65217=m
# CONFIG_MFD_TMIO is not set
-CONFIG_MFD_WM8400=m
CONFIG_MFD_PCF50633=m
CONFIG_PCF50633_ADC=m
CONFIG_PCF50633_GPIO=m
+CONFIG_MFD_MC13783=m
+CONFIG_MFD_MC13XXX=m
+CONFIG_MFD_MC13XXX_I2C=m
CONFIG_ABX500_CORE=y
-CONFIG_AB8500_CORE=y
-# CONFIG_AB8500_DEBUG is not set
CONFIG_MFD_CS5535=m
# CONFIG_MFD_TIMBERDALE is not set
CONFIG_LPC_SCH=m
+CONFIG_LPC_ICH=m
CONFIG_MFD_RDC321X=m
# CONFIG_MFD_JANZ_CMODIO is not set
CONFIG_MFD_VX855=m
@@ -3430,7 +3477,9 @@ CONFIG_MEDIA_TUNER_MXL5007T=m
CONFIG_MEDIA_TUNER_MC44S803=m
CONFIG_MEDIA_TUNER_MAX2165=m
CONFIG_MEDIA_TUNER_TDA18218=m
+CONFIG_MEDIA_TUNER_FC0011=m
CONFIG_MEDIA_TUNER_TDA18212=m
+CONFIG_MEDIA_TUNER_TUA9001=m
CONFIG_VIDEO_V4L2=m
CONFIG_VIDEOBUF_GEN=m
CONFIG_VIDEOBUF_DMA_SG=m
@@ -3549,6 +3598,7 @@ CONFIG_VIDEO_THS7303=m
CONFIG_VIDEO_M52790=m
CONFIG_VIDEO_VIVI=m
CONFIG_V4L_USB_DRIVERS=y
+CONFIG_VIDEO_AU0828=m
CONFIG_USB_VIDEO_CLASS=m
CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
CONFIG_USB_GSPCA=m
@@ -3606,7 +3656,7 @@ CONFIG_VIDEO_HDPVR=m
CONFIG_VIDEO_EM28XX=m
CONFIG_VIDEO_EM28XX_ALSA=m
CONFIG_VIDEO_EM28XX_DVB=m
-CONFIG_VIDEO_EM28XX_RC=y
+CONFIG_VIDEO_EM28XX_RC=m
CONFIG_VIDEO_TLG2300=m
CONFIG_VIDEO_CX231XX=m
CONFIG_VIDEO_CX231XX_RC=y
@@ -3616,7 +3666,6 @@ CONFIG_VIDEO_TM6000=m
CONFIG_VIDEO_TM6000_ALSA=m
CONFIG_VIDEO_TM6000_DVB=m
CONFIG_VIDEO_USBVISION=m
-CONFIG_USB_ET61X251=m
CONFIG_USB_SN9C102=m
CONFIG_USB_PWC=m
# CONFIG_USB_PWC_DEBUG is not set
@@ -3626,7 +3675,6 @@ CONFIG_USB_ZR364XX=m
CONFIG_USB_STKWEBCAM=m
CONFIG_USB_S2255=m
CONFIG_V4L_PCI_DRIVERS=y
-CONFIG_VIDEO_AU0828=m
CONFIG_VIDEO_BT848=m
CONFIG_VIDEO_BT848_DVB=y
CONFIG_VIDEO_CX18=m
@@ -3741,6 +3789,7 @@ CONFIG_DVB_USB_TECHNISAT_USB2=m
CONFIG_DVB_USB_IT913X=m
CONFIG_DVB_USB_MXL111SF=m
CONFIG_DVB_USB_RTL28XXU=m
+CONFIG_DVB_USB_AF9035=m
CONFIG_DVB_TTUSB_BUDGET=m
CONFIG_DVB_TTUSB_DEC=m
CONFIG_SMS_SIANO_MDTV=m
@@ -3890,8 +3939,11 @@ CONFIG_DVB_OR51132=m
CONFIG_DVB_BCM3510=m
CONFIG_DVB_LGDT330X=m
CONFIG_DVB_LGDT3305=m
+CONFIG_DVB_LG2160=m
CONFIG_DVB_S5H1409=m
CONFIG_DVB_AU8522=m
+CONFIG_DVB_AU8522_DTV=m
+CONFIG_DVB_AU8522_V4L=m
CONFIG_DVB_S5H1411=m
#
@@ -3923,6 +3975,7 @@ CONFIG_DVB_TDA665x=m
CONFIG_DVB_IX2505V=m
CONFIG_DVB_IT913X_FE=m
CONFIG_DVB_M88RS2000=m
+CONFIG_DVB_AF9033=m
#
# Tools to develop new frontends
@@ -3975,6 +4028,9 @@ CONFIG_DRM_GMA500=m
CONFIG_DRM_GMA600=y
CONFIG_DRM_GMA3600=y
CONFIG_DRM_UDL=m
+CONFIG_DRM_AST=m
+CONFIG_DRM_MGAG200=m
+CONFIG_DRM_CIRRUS_QEMU=m
# CONFIG_STUB_POULSBO is not set
CONFIG_VGASTATE=m
CONFIG_VIDEO_OUTPUT_CONTROL=m
@@ -4048,12 +4104,14 @@ CONFIG_FB_VIRTUAL=m
# CONFIG_FB_METRONOME is not set
# CONFIG_FB_MB862XX is not set
# CONFIG_FB_BROADSHEET is not set
+# CONFIG_FB_AUO_K190X is not set
# CONFIG_EXYNOS_VIDEO is not set
CONFIG_BACKLIGHT_LCD_SUPPORT=y
CONFIG_LCD_CLASS_DEVICE=m
CONFIG_LCD_PLATFORM=m
CONFIG_BACKLIGHT_CLASS_DEVICE=y
# CONFIG_BACKLIGHT_GENERIC is not set
+CONFIG_BACKLIGHT_LM3533=m
CONFIG_BACKLIGHT_PROGEAR=m
CONFIG_BACKLIGHT_APPLE=m
# CONFIG_BACKLIGHT_SAHARA is not set
@@ -4084,6 +4142,7 @@ CONFIG_FONT_8x16=y
# CONFIG_FONT_SUN8x16 is not set
# CONFIG_FONT_SUN12x22 is not set
# CONFIG_FONT_10x18 is not set
+CONFIG_FONT_AUTOSELECT=y
# CONFIG_LOGO is not set
CONFIG_SOUND=m
CONFIG_SOUND_OSS_CORE=y
@@ -4229,7 +4288,6 @@ CONFIG_SND_HDA_INPUT_BEEP_MODE=1
CONFIG_SND_HDA_INPUT_JACK=y
CONFIG_SND_HDA_PATCH_LOADER=y
CONFIG_SND_HDA_CODEC_REALTEK=y
-CONFIG_SND_HDA_ENABLE_REALTEK_QUIRKS=y
CONFIG_SND_HDA_CODEC_ANALOG=y
CONFIG_SND_HDA_CODEC_SIGMATEL=y
CONFIG_SND_HDA_CODEC_VIA=y
@@ -4287,16 +4345,13 @@ CONFIG_SND_PDAUDIOCF=m
# CONFIG_SND_SOC is not set
# CONFIG_SOUND_PRIME is not set
CONFIG_AC97_BUS=m
-CONFIG_HID_SUPPORT=y
-CONFIG_HID=m
-CONFIG_HIDRAW=y
#
-# USB Input Devices
+# HID support
#
-CONFIG_USB_HID=m
-CONFIG_HID_PID=y
-CONFIG_USB_HIDDEV=y
+CONFIG_HID=m
+CONFIG_HIDRAW=y
+CONFIG_HID_GENERIC=m
#
# Special HID drivers
@@ -4305,6 +4360,7 @@ CONFIG_HID_A4TECH=m
CONFIG_HID_ACRUX=m
CONFIG_HID_ACRUX_FF=y
CONFIG_HID_APPLE=m
+CONFIG_HID_AUREAL=m
CONFIG_HID_BELKIN=m
CONFIG_HID_CHERRY=m
CONFIG_HID_CHICONY=m
@@ -4362,12 +4418,18 @@ CONFIG_HID_TOPSEED=m
CONFIG_HID_THRUSTMASTER=m
CONFIG_THRUSTMASTER_FF=y
CONFIG_HID_WACOM=m
-CONFIG_HID_WACOM_POWER_SUPPLY=y
CONFIG_HID_WIIMOTE=m
CONFIG_HID_WIIMOTE_EXT=y
CONFIG_HID_ZEROPLUS=m
CONFIG_ZEROPLUS_FF=y
CONFIG_HID_ZYDACRON=m
+
+#
+# USB HID support
+#
+CONFIG_USB_HID=m
+CONFIG_HID_PID=y
+CONFIG_USB_HIDDEV=y
CONFIG_USB_ARCH_HAS_OHCI=y
CONFIG_USB_ARCH_HAS_EHCI=y
CONFIG_USB_ARCH_HAS_XHCI=y
@@ -4381,8 +4443,6 @@ CONFIG_USB=m
#
# Miscellaneous USB options
#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_DEVICE_CLASS is not set
CONFIG_USB_DYNAMIC_MINORS=y
CONFIG_USB_SUSPEND=y
# CONFIG_USB_OTG is not set
@@ -4421,9 +4481,15 @@ CONFIG_USB_R8A66597_HCD=m
CONFIG_USB_RENESAS_USBHS_HCD=m
CONFIG_USB_WHCI_HCD=m
CONFIG_USB_HWA_HCD=m
+# CONFIG_USB_HCD_BCMA is not set
+# CONFIG_USB_HCD_SSB is not set
CONFIG_USB_MUSB_HDRC=m
CONFIG_USB_MUSB_TUSB6010=m
CONFIG_MUSB_PIO_ONLY=y
+CONFIG_USB_CHIPIDEA=m
+CONFIG_USB_CHIPIDEA_UDC=y
+CONFIG_USB_CHIPIDEA_HOST=y
+# CONFIG_USB_CHIPIDEA_DEBUG is not set
CONFIG_USB_RENESAS_USBHS=m
#
@@ -4537,6 +4603,7 @@ CONFIG_USB_SERIAL_OPTICON=m
CONFIG_USB_SERIAL_VIVOPAY_SERIAL=m
CONFIG_USB_SERIAL_ZIO=m
CONFIG_USB_SERIAL_SSU100=m
+CONFIG_USB_SERIAL_QT2=m
# CONFIG_USB_SERIAL_DEBUG is not set
#
@@ -4563,6 +4630,11 @@ CONFIG_USB_IOWARRIOR=m
CONFIG_USB_TEST=m
CONFIG_USB_ISIGHTFW=m
CONFIG_USB_YUREX=m
+
+#
+# USB Physical Layer drivers
+#
+CONFIG_USB_ISP1301=m
CONFIG_USB_ATM=m
CONFIG_USB_SPEEDTOUCH=m
CONFIG_USB_CXACRU=m
@@ -4574,6 +4646,10 @@ CONFIG_USB_GADGET=m
# CONFIG_USB_GADGET_DEBUG_FS is not set
CONFIG_USB_GADGET_VBUS_DRAW=2
CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2
+
+#
+# USB Peripheral Controller
+#
CONFIG_USB_FUSB300=m
CONFIG_USB_R8A66597=m
CONFIG_USB_RENESAS_USBHS_UDC=m
@@ -4581,12 +4657,10 @@ CONFIG_USB_MV_UDC=m
CONFIG_USB_GADGET_MUSB_HDRC=m
CONFIG_USB_M66592=m
CONFIG_USB_AMD5536UDC=m
-CONFIG_USB_CI13XXX_PCI=m
CONFIG_USB_NET2272=m
CONFIG_USB_NET2272_DMA=y
CONFIG_USB_NET2280=m
CONFIG_USB_GOKU=m
-CONFIG_USB_LANGWELL=m
CONFIG_USB_EG20T=m
CONFIG_USB_DUMMY_HCD=m
CONFIG_USB_GADGET_DUALSPEED=y
@@ -4606,6 +4680,7 @@ CONFIG_USB_FUNCTIONFS_GENERIC=y
CONFIG_USB_FILE_STORAGE=m
# CONFIG_USB_FILE_STORAGE_TEST is not set
# CONFIG_USB_MASS_STORAGE is not set
+CONFIG_USB_GADGET_TARGET=m
CONFIG_USB_G_SERIAL=m
CONFIG_USB_MIDI_GADGET=m
CONFIG_USB_G_PRINTER=m
@@ -4625,7 +4700,6 @@ CONFIG_USB_G_WEBCAM=m
CONFIG_USB_OTG_UTILS=y
# CONFIG_USB_GPIO_VBUS is not set
CONFIG_NOP_USB_XCEIV=m
-# CONFIG_AB8500_USB is not set
CONFIG_UWB=m
CONFIG_UWB_HWA=m
CONFIG_UWB_WHCI=m
@@ -4680,6 +4754,7 @@ CONFIG_LEDS_CLASS=y
# LED drivers
#
CONFIG_LEDS_LM3530=m
+CONFIG_LEDS_LM3533=m
CONFIG_LEDS_PCA9532=m
# CONFIG_LEDS_PCA9532_GPIO is not set
# CONFIG_LEDS_GPIO is not set
@@ -4693,6 +4768,7 @@ CONFIG_LEDS_BD2802=m
CONFIG_LEDS_INTEL_SS4200=m
CONFIG_LEDS_LT3593=m
CONFIG_LEDS_DELL_NETBOOKS=m
+CONFIG_LEDS_MC13783=m
CONFIG_LEDS_TCA6507=m
CONFIG_LEDS_OT200=m
CONFIG_LEDS_TRIGGERS=y
@@ -4709,6 +4785,7 @@ CONFIG_LEDS_TRIGGER_DEFAULT_ON=m
#
# iptables trigger is under Netfilter config (LED target)
#
+CONFIG_LEDS_TRIGGER_TRANSIENT=m
CONFIG_ACCESSIBILITY=y
CONFIG_A11Y_BRAILLE_CONSOLE=y
# CONFIG_INFINIBAND is not set
@@ -4796,11 +4873,11 @@ CONFIG_RTC_DRV_BQ4802=m
CONFIG_RTC_DRV_RP5C01=m
CONFIG_RTC_DRV_V3020=m
CONFIG_RTC_DRV_PCF50633=m
-CONFIG_RTC_DRV_AB8500=m
#
# on-CPU RTC drivers
#
+CONFIG_RTC_DRV_MC13XXX=m
CONFIG_DMADEVICES=y
# CONFIG_DMADEVICES_DEBUG is not set
@@ -4843,6 +4920,7 @@ CONFIG_VIRTIO_RING=y
CONFIG_VIRTIO_PCI=m
CONFIG_VIRTIO_BALLOON=m
CONFIG_VIRTIO_MMIO=m
+CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y
#
# Microsoft Hyper-V guest support
@@ -4861,6 +4939,8 @@ CONFIG_PRISM2_USB=m
CONFIG_ECHO=m
CONFIG_COMEDI=m
# CONFIG_COMEDI_DEBUG is not set
+CONFIG_COMEDI_DEFAULT_BUF_SIZE_KB=2048
+CONFIG_COMEDI_DEFAULT_BUF_MAXSIZE_KB=20480
CONFIG_COMEDI_MISC_DRIVERS=m
CONFIG_COMEDI_KCOMEDILIB=m
CONFIG_COMEDI_BOND=m
@@ -4880,9 +4960,13 @@ CONFIG_COMEDI_PCL816=m
CONFIG_COMEDI_PCL818=m
CONFIG_COMEDI_PCM3724=m
CONFIG_COMEDI_PCM3730=m
+CONFIG_COMEDI_AMPLC_DIO200_ISA=m
+CONFIG_COMEDI_AMPLC_PC236_ISA=m
+CONFIG_COMEDI_AMPLC_PC263_ISA=m
CONFIG_COMEDI_RTI800=m
CONFIG_COMEDI_RTI802=m
CONFIG_COMEDI_DAS16M1=m
+CONFIG_COMEDI_DAS08_ISA=m
CONFIG_COMEDI_DAS16=m
CONFIG_COMEDI_DAS800=m
CONFIG_COMEDI_DAS1800=m
@@ -4934,12 +5018,13 @@ CONFIG_COMEDI_ADL_PCI9118=m
CONFIG_COMEDI_ADV_PCI1710=m
CONFIG_COMEDI_ADV_PCI1723=m
CONFIG_COMEDI_ADV_PCI_DIO=m
-CONFIG_COMEDI_AMPLC_DIO200=m
-CONFIG_COMEDI_AMPLC_PC236=m
-CONFIG_COMEDI_AMPLC_PC263=m
+CONFIG_COMEDI_AMPLC_DIO200_PCI=m
+CONFIG_COMEDI_AMPLC_PC236_PCI=m
+CONFIG_COMEDI_AMPLC_PC263_PCI=m
CONFIG_COMEDI_AMPLC_PCI224=m
CONFIG_COMEDI_AMPLC_PCI230=m
CONFIG_COMEDI_CONTEC_PCI_DIO=m
+CONFIG_COMEDI_DAS08_PCI=m
CONFIG_COMEDI_DT3000=m
CONFIG_COMEDI_DYNA_PCI10XX=m
CONFIG_COMEDI_UNIOXX5=m
@@ -4986,8 +5071,11 @@ CONFIG_COMEDI_MITE=m
CONFIG_COMEDI_NI_TIO=m
CONFIG_COMEDI_NI_LABPC=m
CONFIG_COMEDI_8255=m
-CONFIG_COMEDI_DAS08=m
CONFIG_COMEDI_FC=m
+CONFIG_COMEDI_AMPLC_DIO200=m
+CONFIG_COMEDI_AMPLC_PC236=m
+CONFIG_COMEDI_AMPLC_PC263=m
+CONFIG_COMEDI_DAS08=m
# CONFIG_FB_OLPC_DCON is not set
CONFIG_ASUS_OLED=m
# CONFIG_PANEL is not set
@@ -5013,12 +5101,9 @@ CONFIG_LINE6_USB=m
# CONFIG_LINE6_USB_RAW is not set
# CONFIG_LINE6_USB_IMPULSE_RESPONSE is not set
CONFIG_USB_SERIAL_QUATECH2=m
-CONFIG_USB_SERIAL_QUATECH_USB2=m
CONFIG_VT6655=m
CONFIG_VT6656=m
-# CONFIG_VME_BUS is not set
CONFIG_DX_SEP=m
-# CONFIG_IIO is not set
CONFIG_ZRAM=m
# CONFIG_ZRAM_DEBUG is not set
CONFIG_ZCACHE=y
@@ -5056,7 +5141,6 @@ CONFIG_SPEAKUP_SYNTH_TXPRT=m
CONFIG_SPEAKUP_SYNTH_DUMMY=m
CONFIG_TOUCHSCREEN_CLEARPAD_TM1217=m
CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4=m
-CONFIG_INTEL_MEI=m
CONFIG_STAGING_MEDIA=y
CONFIG_DVB_AS102=m
CONFIG_DVB_CXD2099=m
@@ -5094,6 +5178,16 @@ CONFIG_LIRC_ZILOG=m
# CONFIG_ANDROID is not set
# CONFIG_PHONE is not set
CONFIG_USB_WPAN_HCD=m
+CONFIG_IPACK_BUS=m
+CONFIG_BOARD_TPCI200=m
+CONFIG_SERIAL_IPOCTAL=m
+CONFIG_WIMAX_GDM72XX=m
+CONFIG_WIMAX_GDM72XX_QOS=y
+CONFIG_WIMAX_GDM72XX_K_MODE=y
+CONFIG_WIMAX_GDM72XX_WIMAX2=y
+CONFIG_WIMAX_GDM72XX_USB=y
+# CONFIG_WIMAX_GDM72XX_SDIO is not set
+CONFIG_WIMAX_GDM72XX_USB_PM=y
CONFIG_X86_PLATFORM_DEVICES=y
CONFIG_ACER_WMI=m
CONFIG_ACERHDF=m
@@ -5166,6 +5260,15 @@ CONFIG_INTEL_IOMMU_FLOPPY_WA=y
#
CONFIG_VIRT_DRIVERS=y
# CONFIG_PM_DEVFREQ is not set
+CONFIG_EXTCON=m
+
+#
+# Extcon Device Drivers
+#
+CONFIG_EXTCON_GPIO=m
+CONFIG_MEMORY=y
+# CONFIG_IIO is not set
+# CONFIG_VME_BUS is not set
#
# Firmware Drivers
@@ -5315,11 +5418,9 @@ CONFIG_JFFS2_ZLIB=y
CONFIG_JFFS2_RTIME=y
# CONFIG_JFFS2_RUBIN is not set
CONFIG_UBIFS_FS=m
-CONFIG_UBIFS_FS_XATTR=y
# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set
CONFIG_UBIFS_FS_LZO=y
CONFIG_UBIFS_FS_ZLIB=y
-# CONFIG_UBIFS_FS_DEBUG is not set
CONFIG_LOGFS=m
CONFIG_CRAMFS=m
CONFIG_SQUASHFS=m
@@ -5338,6 +5439,7 @@ CONFIG_OMFS_FS=m
# CONFIG_QNX6FS_FS is not set
# CONFIG_ROMFS_FS is not set
CONFIG_PSTORE=y
+CONFIG_PSTORE_RAM=m
# CONFIG_SYSV_FS is not set
CONFIG_UFS_FS=m
# CONFIG_UFS_FS_WRITE is not set
@@ -5347,6 +5449,7 @@ CONFIG_EXOFS_FS=m
CONFIG_ORE=m
CONFIG_NETWORK_FILESYSTEMS=y
CONFIG_NFS_FS=m
+CONFIG_NFS_V2=y
CONFIG_NFS_V3=y
CONFIG_NFS_V3_ACL=y
CONFIG_NFS_V4=y
@@ -5435,6 +5538,17 @@ CONFIG_NLS_ISO8859_14=m
CONFIG_NLS_ISO8859_15=m
CONFIG_NLS_KOI8_R=m
CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_MAC_ROMAN=m
+CONFIG_NLS_MAC_CELTIC=m
+CONFIG_NLS_MAC_CENTEURO=m
+CONFIG_NLS_MAC_CROATIAN=m
+CONFIG_NLS_MAC_CYRILLIC=m
+CONFIG_NLS_MAC_GAELIC=m
+CONFIG_NLS_MAC_GREEK=m
+CONFIG_NLS_MAC_ICELAND=m
+CONFIG_NLS_MAC_INUIT=m
+CONFIG_NLS_MAC_ROMANIAN=m
+CONFIG_NLS_MAC_TURKISH=m
CONFIG_NLS_UTF8=m
CONFIG_DLM=m
# CONFIG_DLM_DEBUG is not set
@@ -5450,6 +5564,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
CONFIG_FRAME_WARN=1024
CONFIG_MAGIC_SYSRQ=y
CONFIG_STRIP_ASM_SYMS=y
+# CONFIG_READABLE_ASM is not set
CONFIG_UNUSED_SYMBOLS=y
CONFIG_DEBUG_FS=y
# CONFIG_HEADERS_CHECK is not set
@@ -5462,6 +5577,8 @@ CONFIG_HARDLOCKUP_DETECTOR=y
CONFIG_BOOTPARAM_HARDLOCKUP_PANIC_VALUE=0
# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
+# CONFIG_PANIC_ON_OOPS is not set
+CONFIG_PANIC_ON_OOPS_VALUE=0
CONFIG_DETECT_HUNG_TASK=y
CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120
# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
@@ -5518,7 +5635,6 @@ CONFIG_CPU_NOTIFIER_ERROR_INJECT=m
# CONFIG_DEBUG_PAGEALLOC is not set
CONFIG_USER_STACKTRACE_SUPPORT=y
CONFIG_NOP_TRACER=y
-CONFIG_HAVE_FTRACE_NMI_ENTER=y
CONFIG_HAVE_FUNCTION_TRACER=y
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST=y
@@ -5529,7 +5645,6 @@ CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
CONFIG_HAVE_C_RECORDMCOUNT=y
CONFIG_TRACER_MAX_TRACE=y
CONFIG_RING_BUFFER=y
-CONFIG_FTRACE_NMI_ENTER=y
CONFIG_EVENT_TRACING=y
CONFIG_EVENT_POWER_TRACING_DEPRECATED=y
CONFIG_CONTEXT_SWITCH_TRACER=y
@@ -5549,6 +5664,8 @@ CONFIG_BRANCH_PROFILE_NONE=y
# CONFIG_PROFILE_ALL_BRANCHES is not set
CONFIG_STACK_TRACER=y
CONFIG_BLK_DEV_IO_TRACE=y
+# CONFIG_UPROBE_EVENT is not set
+# CONFIG_PROBE_EVENTS is not set
CONFIG_DYNAMIC_FTRACE=y
CONFIG_FUNCTION_PROFILER=y
CONFIG_FTRACE_MCOUNT_RECORD=y
@@ -5759,6 +5876,7 @@ CONFIG_HAVE_KVM_EVENTFD=y
CONFIG_KVM_APIC_ARCHITECTURE=y
CONFIG_KVM_MMIO=y
CONFIG_KVM_ASYNC_PF=y
+CONFIG_HAVE_KVM_MSI=y
CONFIG_VIRTUALIZATION=y
CONFIG_KVM=m
CONFIG_KVM_INTEL=m
@@ -5773,6 +5891,8 @@ CONFIG_BINARY_PRINTF=y
#
CONFIG_RAID6_PQ=m
CONFIG_BITREVERSE=y
+CONFIG_GENERIC_STRNCPY_FROM_USER=y
+CONFIG_GENERIC_STRNLEN_USER=y
CONFIG_GENERIC_FIND_FIRST_BIT=y
CONFIG_GENERIC_PCI_IOMAP=y
CONFIG_GENERIC_IOMAP=y
@@ -5811,6 +5931,8 @@ CONFIG_DECOMPRESS_XZ=y
CONFIG_DECOMPRESS_LZO=y
CONFIG_GENERIC_ALLOCATOR=y
CONFIG_REED_SOLOMON=m
+CONFIG_REED_SOLOMON_ENC8=y
+CONFIG_REED_SOLOMON_DEC8=y
CONFIG_REED_SOLOMON_DEC16=y
CONFIG_BCH=m
CONFIG_BCH_CONST_PARAMS=y
@@ -5829,3 +5951,4 @@ CONFIG_NLATTR=y
CONFIG_LRU_CACHE=m
CONFIG_AVERAGE=y
CONFIG_CORDIC=m
+CONFIG_DDR=y
diff --git a/libre/linux-libre/config.x86_64 b/libre/linux-libre/config.x86_64
index 9f3698ac2..fcc8b37dd 100644
--- a/libre/linux-libre/config.x86_64
+++ b/libre/linux-libre/config.x86_64
@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
-# Linux/x86_64 3.4.1-1 Kernel Configuration
+# Linux/x86_64 3.5.0-1 Kernel Configuration
#
CONFIG_64BIT=y
# CONFIG_X86_32 is not set
@@ -9,11 +9,6 @@ CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"
-CONFIG_GENERIC_CMOS_UPDATE=y
-CONFIG_CLOCKSOURCE_WATCHDOG=y
-CONFIG_GENERIC_CLOCKEVENTS=y
-CONFIG_ARCH_CLOCKSOURCE_DATA=y
-CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -28,9 +23,7 @@ CONFIG_GENERIC_GPIO=y
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
-CONFIG_GENERIC_TIME_VSYSCALL=y
CONFIG_ARCH_HAS_CPU_RELAX=y
CONFIG_ARCH_HAS_DEFAULT_IDLE=y
CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
@@ -48,11 +41,12 @@ CONFIG_HAVE_INTEL_TXT=y
CONFIG_X86_64_SMP=y
CONFIG_X86_HT=y
CONFIG_ARCH_HWEIGHT_CFLAGS="-fcall-saved-rdi -fcall-saved-rsi -fcall-saved-rdx -fcall-saved-rcx -fcall-saved-r8 -fcall-saved-r9 -fcall-saved-r10 -fcall-saved-r11"
-# CONFIG_KTIME_SCALAR is not set
CONFIG_ARCH_CPU_PROBE_RELEASE=y
+CONFIG_ARCH_SUPPORTS_UPROBES=y
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
CONFIG_HAVE_IRQ_WORK=y
CONFIG_IRQ_WORK=y
+CONFIG_BUILDTIME_EXTABLE_SORT=y
#
# General setup
@@ -99,8 +93,25 @@ CONFIG_GENERIC_HARDIRQS=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_GENERIC_IRQ_SHOW=y
CONFIG_GENERIC_PENDING_IRQ=y
+CONFIG_IRQ_DOMAIN=y
+# CONFIG_IRQ_DOMAIN_DEBUG is not set
CONFIG_IRQ_FORCED_THREADING=y
CONFIG_SPARSE_IRQ=y
+CONFIG_CLOCKSOURCE_WATCHDOG=y
+CONFIG_ARCH_CLOCKSOURCE_DATA=y
+CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
+CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=y
+CONFIG_GENERIC_CMOS_UPDATE=y
+
+#
+# Timers subsystem
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
#
# RCU Subsystem
@@ -108,6 +119,7 @@ CONFIG_SPARSE_IRQ=y
CONFIG_TREE_PREEMPT_RCU=y
CONFIG_PREEMPT_RCU=y
CONFIG_RCU_FANOUT=64
+CONFIG_RCU_FANOUT_LEAF=16
# CONFIG_RCU_FANOUT_EXACT is not set
CONFIG_RCU_FAST_NO_HZ=y
# CONFIG_TREE_RCU_TRACE is not set
@@ -139,7 +151,6 @@ CONFIG_BLK_CGROUP=y
CONFIG_NAMESPACES=y
CONFIG_UTS_NS=y
CONFIG_IPC_NS=y
-CONFIG_USER_NS=y
CONFIG_PID_NS=y
CONFIG_NET_NS=y
CONFIG_SCHED_AUTOGROUP=y
@@ -182,7 +193,6 @@ CONFIG_HAVE_PERF_EVENTS=y
# Kernel Performance Events And Counters
#
CONFIG_PERF_EVENTS=y
-CONFIG_PERF_COUNTERS=y
# CONFIG_DEBUG_PERF_USE_VMALLOC is not set
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_PCI_QUIRKS=y
@@ -207,6 +217,7 @@ CONFIG_HAVE_OPTPROBES=y
CONFIG_HAVE_ARCH_TRACEHOOK=y
CONFIG_HAVE_DMA_ATTRS=y
CONFIG_USE_GENERIC_SMP_HELPERS=y
+CONFIG_GENERIC_SMP_IDLE_THREAD=y
CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
CONFIG_HAVE_DMA_API_DEBUG=y
CONFIG_HAVE_HW_BREAKPOINT=y
@@ -219,6 +230,8 @@ CONFIG_HAVE_ALIGNED_STRUCT_PAGE=y
CONFIG_HAVE_CMPXCHG_LOCAL=y
CONFIG_HAVE_CMPXCHG_DOUBLE=y
CONFIG_ARCH_WANT_OLD_COMPAT_IPC=y
+CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
+CONFIG_SECCOMP_FILTER=y
#
# GCOV-based kernel profiling
@@ -313,11 +326,6 @@ CONFIG_FREEZER=y
# Processor type and features
#
CONFIG_ZONE_DMA=y
-CONFIG_TICK_ONESHOT=y
-CONFIG_NO_HZ=y
-CONFIG_HIGH_RES_TIMERS=y
-CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
-CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=y
CONFIG_SMP=y
CONFIG_X86_X2APIC=y
CONFIG_X86_MPPARSE=y
@@ -439,7 +447,9 @@ CONFIG_HWPOISON_INJECT=m
CONFIG_TRANSPARENT_HUGEPAGE=y
CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y
# CONFIG_TRANSPARENT_HUGEPAGE_MADVISE is not set
+CONFIG_CROSS_MEMORY_ATTACH=y
CONFIG_CLEANCACHE=y
+CONFIG_FRONTSWAP=y
CONFIG_X86_CHECK_BIOS_CORRUPTION=y
CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y
CONFIG_X86_RESERVE_LOW=64
@@ -484,6 +494,10 @@ CONFIG_HIBERNATION=y
CONFIG_PM_STD_PARTITION=""
CONFIG_PM_SLEEP=y
CONFIG_PM_SLEEP_SMP=y
+CONFIG_PM_AUTOSLEEP=y
+CONFIG_PM_WAKELOCKS=y
+CONFIG_PM_WAKELOCKS_LIMIT=100
+CONFIG_PM_WAKELOCKS_GC=y
CONFIG_PM_RUNTIME=y
CONFIG_PM=y
CONFIG_PM_DEBUG=y
@@ -633,6 +647,7 @@ CONFIG_RAPIDIO=y
CONFIG_RAPIDIO_TSI721=y
CONFIG_RAPIDIO_DISC_TIMEOUT=30
# CONFIG_RAPIDIO_ENABLE_RX_TX_PORTS is not set
+CONFIG_RAPIDIO_DMA_ENGINE=y
CONFIG_RAPIDIO_DEBUG=y
CONFIG_RAPIDIO_TSI57X=y
CONFIG_RAPIDIO_CPS_XX=y
@@ -657,6 +672,7 @@ CONFIG_COMPAT_FOR_U64_ALIGNMENT=y
CONFIG_SYSVIPC_COMPAT=y
CONFIG_KEYS_COMPAT=y
CONFIG_HAVE_TEXT_POKE_SMP=y
+CONFIG_X86_DEV_DMA_OPS=y
CONFIG_NET=y
CONFIG_COMPAT_NETLINK_MESSAGES=y
@@ -667,6 +683,7 @@ CONFIG_PACKET=y
CONFIG_UNIX=y
CONFIG_UNIX_DIAG=m
CONFIG_XFRM=y
+CONFIG_XFRM_ALGO=m
CONFIG_XFRM_USER=m
# CONFIG_XFRM_SUB_POLICY is not set
# CONFIG_XFRM_MIGRATE is not set
@@ -805,6 +822,7 @@ CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
CONFIG_NETFILTER_XT_TARGET_CT=m
CONFIG_NETFILTER_XT_TARGET_DSCP=m
CONFIG_NETFILTER_XT_TARGET_HL=m
+CONFIG_NETFILTER_XT_TARGET_HMARK=m
CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m
CONFIG_NETFILTER_XT_TARGET_LED=m
CONFIG_NETFILTER_XT_TARGET_LOG=m
@@ -965,7 +983,6 @@ CONFIG_IP_NF_ARP_MANGLE=m
#
CONFIG_NF_DEFRAG_IPV6=m
CONFIG_NF_CONNTRACK_IPV6=m
-CONFIG_IP6_NF_QUEUE=m
CONFIG_IP6_NF_IPTABLES=m
CONFIG_IP6_NF_MATCH_AH=m
CONFIG_IP6_NF_MATCH_EUI64=m
@@ -1057,11 +1074,11 @@ CONFIG_IPDDP_ENCAP=y
CONFIG_IPDDP_DECAP=y
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
-# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
CONFIG_PHONET=m
CONFIG_IEEE802154=m
CONFIG_IEEE802154_6LOWPAN=m
+CONFIG_MAC802154=m
CONFIG_NET_SCHED=y
#
@@ -1085,6 +1102,8 @@ CONFIG_NET_SCH_DRR=m
CONFIG_NET_SCH_MQPRIO=m
CONFIG_NET_SCH_CHOKE=m
CONFIG_NET_SCH_QFQ=m
+CONFIG_NET_SCH_CODEL=m
+CONFIG_NET_SCH_FQ_CODEL=m
CONFIG_NET_SCH_INGRESS=m
CONFIG_NET_SCH_PLUG=m
@@ -1120,6 +1139,7 @@ CONFIG_NET_SCH_FIFO=y
# CONFIG_DCB is not set
CONFIG_DNS_RESOLVER=y
CONFIG_BATMAN_ADV=m
+CONFIG_BATMAN_ADV_BLA=y
# CONFIG_BATMAN_ADV_DEBUG is not set
CONFIG_OPENVSWITCH=m
CONFIG_RPS=y
@@ -1127,7 +1147,6 @@ CONFIG_RFS_ACCEL=y
CONFIG_XPS=y
CONFIG_NETPRIO_CGROUP=m
CONFIG_BQL=y
-CONFIG_HAVE_BPF_JIT=y
CONFIG_BPF_JIT=y
#
@@ -1294,6 +1313,8 @@ CONFIG_CEPH_LIB=m
# CONFIG_CEPH_LIB_USE_DNS_RESOLVER is not set
CONFIG_NFC=m
CONFIG_NFC_NCI=m
+CONFIG_NFC_HCI=m
+# CONFIG_NFC_SHDLC is not set
# CONFIG_NFC_LLCP is not set
#
@@ -1302,6 +1323,7 @@ CONFIG_NFC_NCI=m
CONFIG_PN544_NFC=m
CONFIG_NFC_PN533=m
CONFIG_NFC_WILINK=m
+CONFIG_HAVE_BPF_JIT=y
#
# Device Drivers
@@ -1452,7 +1474,6 @@ CONFIG_MTD_UBI=m
CONFIG_MTD_UBI_WL_THRESHOLD=4096
CONFIG_MTD_UBI_BEB_RESERVE=1
# CONFIG_MTD_UBI_GLUEBI is not set
-# CONFIG_MTD_UBI_DEBUG is not set
CONFIG_PARPORT=m
CONFIG_PARPORT_PC=m
CONFIG_PARPORT_SERIAL=m
@@ -1532,7 +1553,8 @@ CONFIG_SENSORS_APDS990X=m
CONFIG_HMC6352=m
CONFIG_DS1682=m
CONFIG_VMWARE_BALLOON=m
-CONFIG_BMP085=m
+CONFIG_BMP085=y
+CONFIG_BMP085_I2C=m
CONFIG_PCH_PHUB=m
CONFIG_USB_SWITCH_FSA9480=m
CONFIG_C2PORT=m
@@ -1562,6 +1584,7 @@ CONFIG_SENSORS_LIS3_I2C=m
# Altera FPGA firmware download module
#
CONFIG_ALTERA_STAPL=m
+CONFIG_INTEL_MEI=m
CONFIG_HAVE_IDE=y
# CONFIG_IDE is not set
@@ -1685,6 +1708,7 @@ CONFIG_SCSI_IPR=m
# CONFIG_SCSI_IPR_DUMP is not set
CONFIG_SCSI_QLOGIC_1280=m
CONFIG_SCSI_QLA_FC=m
+CONFIG_TCM_QLA2XXX=m
CONFIG_SCSI_QLA_ISCSI=m
CONFIG_SCSI_LPFC=m
# CONFIG_SCSI_LPFC_DEBUG_FS is not set
@@ -1844,6 +1868,7 @@ CONFIG_TCM_PSCSI=m
CONFIG_LOOPBACK_TARGET=m
CONFIG_TCM_FC=m
CONFIG_ISCSI_TARGET=m
+CONFIG_SBP_TARGET=m
CONFIG_FUSION=y
CONFIG_FUSION_SPI=m
CONFIG_FUSION_FC=m
@@ -1881,10 +1906,12 @@ CONFIG_EQUALIZER=m
CONFIG_MII=m
CONFIG_IEEE802154_DRIVERS=m
CONFIG_IEEE802154_FAKEHARD=m
+CONFIG_IEEE802154_FAKELB=m
CONFIG_IFB=m
CONFIG_NET_TEAM=m
CONFIG_NET_TEAM_MODE_ROUNDROBIN=m
CONFIG_NET_TEAM_MODE_ACTIVEBACKUP=m
+CONFIG_NET_TEAM_MODE_LOADBALANCE=m
CONFIG_MACVLAN=m
CONFIG_MACVTAP=m
CONFIG_NETCONSOLE=m
@@ -2015,10 +2042,13 @@ CONFIG_E1000=m
CONFIG_E1000E=m
CONFIG_IGB=m
CONFIG_IGB_DCA=y
+CONFIG_IGB_PTP=y
CONFIG_IGBVF=m
CONFIG_IXGB=m
CONFIG_IXGBE=m
+CONFIG_IXGBE_HWMON=y
CONFIG_IXGBE_DCA=y
+CONFIG_IXGBE_PTP=y
CONFIG_IXGBEVF=m
CONFIG_NET_VENDOR_I825XX=y
CONFIG_ZNET=m
@@ -2091,8 +2121,8 @@ CONFIG_EPIC100=m
CONFIG_SMSC9420=m
CONFIG_NET_VENDOR_STMICRO=y
CONFIG_STMMAC_ETH=m
-CONFIG_STMMAC_PLATFORM=m
-CONFIG_STMMAC_PCI=m
+# CONFIG_STMMAC_PLATFORM is not set
+CONFIG_STMMAC_PCI=y
# CONFIG_STMMAC_DEBUG_FS is not set
# CONFIG_STMMAC_DA is not set
CONFIG_STMMAC_RING=y
@@ -2110,6 +2140,12 @@ CONFIG_NET_VENDOR_VIA=y
CONFIG_VIA_RHINE=m
# CONFIG_VIA_RHINE_MMIO is not set
CONFIG_VIA_VELOCITY=m
+CONFIG_NET_VENDOR_WIZNET=y
+CONFIG_WIZNET_W5100=m
+CONFIG_WIZNET_W5300=m
+# CONFIG_WIZNET_BUS_DIRECT is not set
+# CONFIG_WIZNET_BUS_INDIRECT is not set
+CONFIG_WIZNET_BUS_ANY=y
CONFIG_NET_VENDOR_XIRCOM=y
CONFIG_PCMCIA_XIRC2PS=m
# CONFIG_FDDI is not set
@@ -2154,7 +2190,6 @@ CONFIG_SLHC=m
# CONFIG_SLIP_COMPRESSED is not set
# CONFIG_SLIP_SMART is not set
# CONFIG_SLIP_MODE_SLIP6 is not set
-# CONFIG_TR is not set
#
# USB Network Adapters
@@ -2269,6 +2304,7 @@ CONFIG_BRCMUTIL=m
CONFIG_BRCMSMAC=m
CONFIG_BRCMFMAC=m
CONFIG_BRCMFMAC_SDIO=y
+# CONFIG_BRCMFMAC_SDIO_OOB is not set
CONFIG_BRCMFMAC_USB=y
# CONFIG_BRCMDBG is not set
CONFIG_HOSTAP=m
@@ -2350,17 +2386,19 @@ CONFIG_RTL8192CU=m
CONFIG_RTLWIFI=m
# CONFIG_RTLWIFI_DEBUG is not set
CONFIG_RTL8192C_COMMON=m
+CONFIG_WL_TI=y
CONFIG_WL1251=m
CONFIG_WL1251_SDIO=m
-CONFIG_WL12XX_MENU=m
CONFIG_WL12XX=m
-CONFIG_WL12XX_SDIO=m
+CONFIG_WLCORE=m
+CONFIG_WLCORE_SDIO=m
CONFIG_WL12XX_PLATFORM_DATA=y
CONFIG_ZD1211RW=m
# CONFIG_ZD1211RW_DEBUG is not set
CONFIG_MWIFIEX=m
CONFIG_MWIFIEX_SDIO=m
CONFIG_MWIFIEX_PCIE=m
+CONFIG_MWIFIEX_USB=m
#
# WiMAX Wireless Broadband devices
@@ -2513,6 +2551,7 @@ CONFIG_INPUT=y
CONFIG_INPUT_FF_MEMLESS=m
CONFIG_INPUT_POLLDEV=m
CONFIG_INPUT_SPARSEKMAP=m
+CONFIG_INPUT_MATRIXKMAP=m
#
# Userland interfaces
@@ -2541,6 +2580,7 @@ CONFIG_KEYBOARD_TCA6416=m
CONFIG_KEYBOARD_TCA8418=m
CONFIG_KEYBOARD_MATRIX=m
# CONFIG_KEYBOARD_LM8323 is not set
+CONFIG_KEYBOARD_LM8333=m
# CONFIG_KEYBOARD_MAX7359 is not set
CONFIG_KEYBOARD_MCS=m
CONFIG_KEYBOARD_MPR121=m
@@ -2623,6 +2663,7 @@ CONFIG_TOUCHSCREEN_ILI210X=m
CONFIG_TOUCHSCREEN_GUNZE=m
CONFIG_TOUCHSCREEN_ELO=m
CONFIG_TOUCHSCREEN_WACOM_W8001=m
+CONFIG_TOUCHSCREEN_WACOM_I2C=m
CONFIG_TOUCHSCREEN_MAX11801=m
CONFIG_TOUCHSCREEN_MCS5000=m
CONFIG_TOUCHSCREEN_MTOUCH=m
@@ -2638,6 +2679,7 @@ CONFIG_TOUCHSCREEN_WM9705=y
CONFIG_TOUCHSCREEN_WM9712=y
CONFIG_TOUCHSCREEN_WM9713=y
CONFIG_TOUCHSCREEN_USB_COMPOSITE=m
+CONFIG_TOUCHSCREEN_MC13783=m
CONFIG_TOUCHSCREEN_USB_EGALAX=y
CONFIG_TOUCHSCREEN_USB_PANJIT=y
CONFIG_TOUCHSCREEN_USB_3M=y
@@ -2662,11 +2704,11 @@ CONFIG_TOUCHSCREEN_TSC2007=m
CONFIG_TOUCHSCREEN_ST1232=m
CONFIG_TOUCHSCREEN_TPS6507X=m
CONFIG_INPUT_MISC=y
-CONFIG_INPUT_AB8500_PONKEY=m
CONFIG_INPUT_AD714X=m
CONFIG_INPUT_AD714X_I2C=m
CONFIG_INPUT_BMA150=m
CONFIG_INPUT_PCSPKR=m
+CONFIG_INPUT_MC13783_PWRBUTTON=m
CONFIG_INPUT_MMA8450=m
CONFIG_INPUT_MPU3050=m
CONFIG_INPUT_APANEL=m
@@ -2809,7 +2851,6 @@ CONFIG_TCG_ATMEL=m
CONFIG_TCG_INFINEON=m
CONFIG_TELCLOCK=m
CONFIG_DEVPORT=y
-CONFIG_RAMOOPS=m
CONFIG_I2C=m
CONFIG_I2C_BOARDINFO=y
CONFIG_I2C_COMPAT=y
@@ -2916,6 +2957,7 @@ CONFIG_GPIO_SYSFS=y
# CONFIG_GPIO_GENERIC_PLATFORM is not set
# CONFIG_GPIO_IT8761E is not set
CONFIG_GPIO_SCH=m
+CONFIG_GPIO_ICH=m
# CONFIG_GPIO_VX855 is not set
#
@@ -3068,6 +3110,7 @@ CONFIG_SENSORS_SCH5636=m
CONFIG_SENSORS_ADS1015=m
CONFIG_SENSORS_ADS7828=m
CONFIG_SENSORS_AMC6821=m
+CONFIG_SENSORS_INA2XX=m
CONFIG_SENSORS_THMC50=m
CONFIG_SENSORS_TMP102=m
CONFIG_SENSORS_TMP401=m
@@ -3087,6 +3130,7 @@ CONFIG_SENSORS_W83L786NG=m
CONFIG_SENSORS_W83627HF=m
CONFIG_SENSORS_W83627EHF=m
CONFIG_SENSORS_APPLESMC=m
+CONFIG_SENSORS_MC13783_ADC=m
#
# ACPI drivers
@@ -3117,6 +3161,7 @@ CONFIG_IB700_WDT=m
CONFIG_IBMASR=m
CONFIG_WAFER_WDT=m
CONFIG_I6300ESB_WDT=m
+CONFIG_IE6XX_WDT=m
CONFIG_ITCO_WDT=m
CONFIG_ITCO_VENDOR_SUPPORT=y
CONFIG_IT8712F_WDT=m
@@ -3183,26 +3228,28 @@ CONFIG_BCMA_HOST_PCI=y
#
# Multifunction device drivers
#
-CONFIG_MFD_CORE=y
+CONFIG_MFD_CORE=m
CONFIG_MFD_SM501=m
CONFIG_MFD_SM501_GPIO=y
CONFIG_HTC_PASIC3=m
CONFIG_UCB1400_CORE=m
+CONFIG_MFD_LM3533=m
# CONFIG_TPS6105X is not set
CONFIG_TPS65010=m
CONFIG_TPS6507X=m
CONFIG_MFD_TPS65217=m
# CONFIG_MFD_TMIO is not set
-CONFIG_MFD_WM8400=m
CONFIG_MFD_PCF50633=m
CONFIG_PCF50633_ADC=m
CONFIG_PCF50633_GPIO=m
+CONFIG_MFD_MC13783=m
+CONFIG_MFD_MC13XXX=m
+CONFIG_MFD_MC13XXX_I2C=m
CONFIG_ABX500_CORE=y
-CONFIG_AB8500_CORE=y
-# CONFIG_AB8500_DEBUG is not set
CONFIG_MFD_CS5535=m
# CONFIG_MFD_TIMBERDALE is not set
CONFIG_LPC_SCH=m
+CONFIG_LPC_ICH=m
CONFIG_MFD_RDC321X=m
# CONFIG_MFD_JANZ_CMODIO is not set
CONFIG_MFD_VX855=m
@@ -3274,7 +3321,9 @@ CONFIG_MEDIA_TUNER_MXL5007T=m
CONFIG_MEDIA_TUNER_MC44S803=m
CONFIG_MEDIA_TUNER_MAX2165=m
CONFIG_MEDIA_TUNER_TDA18218=m
+CONFIG_MEDIA_TUNER_FC0011=m
CONFIG_MEDIA_TUNER_TDA18212=m
+CONFIG_MEDIA_TUNER_TUA9001=m
CONFIG_VIDEO_V4L2=m
CONFIG_VIDEOBUF_GEN=m
CONFIG_VIDEOBUF_DMA_SG=m
@@ -3393,6 +3442,7 @@ CONFIG_VIDEO_THS7303=m
CONFIG_VIDEO_M52790=m
CONFIG_VIDEO_VIVI=m
CONFIG_V4L_USB_DRIVERS=y
+CONFIG_VIDEO_AU0828=m
CONFIG_USB_VIDEO_CLASS=m
CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
CONFIG_USB_GSPCA=m
@@ -3450,7 +3500,7 @@ CONFIG_VIDEO_HDPVR=m
CONFIG_VIDEO_EM28XX=m
CONFIG_VIDEO_EM28XX_ALSA=m
CONFIG_VIDEO_EM28XX_DVB=m
-CONFIG_VIDEO_EM28XX_RC=y
+CONFIG_VIDEO_EM28XX_RC=m
CONFIG_VIDEO_TLG2300=m
CONFIG_VIDEO_CX231XX=m
CONFIG_VIDEO_CX231XX_RC=y
@@ -3460,7 +3510,6 @@ CONFIG_VIDEO_TM6000=m
CONFIG_VIDEO_TM6000_ALSA=m
CONFIG_VIDEO_TM6000_DVB=m
CONFIG_VIDEO_USBVISION=m
-CONFIG_USB_ET61X251=m
CONFIG_USB_SN9C102=m
CONFIG_USB_PWC=m
# CONFIG_USB_PWC_DEBUG is not set
@@ -3470,7 +3519,6 @@ CONFIG_USB_ZR364XX=m
CONFIG_USB_STKWEBCAM=m
CONFIG_USB_S2255=m
CONFIG_V4L_PCI_DRIVERS=y
-CONFIG_VIDEO_AU0828=m
CONFIG_VIDEO_BT848=m
CONFIG_VIDEO_BT848_DVB=y
CONFIG_VIDEO_CX18=m
@@ -3584,6 +3632,7 @@ CONFIG_DVB_USB_TECHNISAT_USB2=m
CONFIG_DVB_USB_IT913X=m
CONFIG_DVB_USB_MXL111SF=m
CONFIG_DVB_USB_RTL28XXU=m
+CONFIG_DVB_USB_AF9035=m
CONFIG_DVB_TTUSB_BUDGET=m
CONFIG_DVB_TTUSB_DEC=m
CONFIG_SMS_SIANO_MDTV=m
@@ -3733,8 +3782,11 @@ CONFIG_DVB_OR51132=m
CONFIG_DVB_BCM3510=m
CONFIG_DVB_LGDT330X=m
CONFIG_DVB_LGDT3305=m
+CONFIG_DVB_LG2160=m
CONFIG_DVB_S5H1409=m
CONFIG_DVB_AU8522=m
+CONFIG_DVB_AU8522_DTV=m
+CONFIG_DVB_AU8522_V4L=m
CONFIG_DVB_S5H1411=m
#
@@ -3766,6 +3818,7 @@ CONFIG_DVB_TDA665x=m
CONFIG_DVB_IX2505V=m
CONFIG_DVB_IT913X_FE=m
CONFIG_DVB_M88RS2000=m
+CONFIG_DVB_AF9033=m
#
# Tools to develop new frontends
@@ -3812,6 +3865,9 @@ CONFIG_DRM_GMA500=m
CONFIG_DRM_GMA600=y
CONFIG_DRM_GMA3600=y
CONFIG_DRM_UDL=m
+CONFIG_DRM_AST=m
+CONFIG_DRM_MGAG200=m
+CONFIG_DRM_CIRRUS_QEMU=m
# CONFIG_STUB_POULSBO is not set
CONFIG_VGASTATE=m
CONFIG_VIDEO_OUTPUT_CONTROL=m
@@ -3883,12 +3939,14 @@ CONFIG_XEN_FBDEV_FRONTEND=m
# CONFIG_FB_METRONOME is not set
# CONFIG_FB_MB862XX is not set
# CONFIG_FB_BROADSHEET is not set
+# CONFIG_FB_AUO_K190X is not set
# CONFIG_EXYNOS_VIDEO is not set
CONFIG_BACKLIGHT_LCD_SUPPORT=y
CONFIG_LCD_CLASS_DEVICE=m
CONFIG_LCD_PLATFORM=m
CONFIG_BACKLIGHT_CLASS_DEVICE=y
# CONFIG_BACKLIGHT_GENERIC is not set
+CONFIG_BACKLIGHT_LM3533=m
CONFIG_BACKLIGHT_PROGEAR=m
CONFIG_BACKLIGHT_APPLE=m
# CONFIG_BACKLIGHT_SAHARA is not set
@@ -3918,6 +3976,7 @@ CONFIG_FONT_8x16=y
# CONFIG_FONT_SUN8x16 is not set
# CONFIG_FONT_SUN12x22 is not set
# CONFIG_FONT_10x18 is not set
+CONFIG_FONT_AUTOSELECT=y
# CONFIG_LOGO is not set
CONFIG_SOUND=m
CONFIG_SOUND_OSS_CORE=y
@@ -4027,7 +4086,6 @@ CONFIG_SND_HDA_INPUT_BEEP_MODE=1
CONFIG_SND_HDA_INPUT_JACK=y
CONFIG_SND_HDA_PATCH_LOADER=y
CONFIG_SND_HDA_CODEC_REALTEK=y
-CONFIG_SND_HDA_ENABLE_REALTEK_QUIRKS=y
CONFIG_SND_HDA_CODEC_ANALOG=y
CONFIG_SND_HDA_CODEC_SIGMATEL=y
CONFIG_SND_HDA_CODEC_VIA=y
@@ -4084,16 +4142,13 @@ CONFIG_SND_PDAUDIOCF=m
# CONFIG_SND_SOC is not set
# CONFIG_SOUND_PRIME is not set
CONFIG_AC97_BUS=m
-CONFIG_HID_SUPPORT=y
-CONFIG_HID=m
-CONFIG_HIDRAW=y
#
-# USB Input Devices
+# HID support
#
-CONFIG_USB_HID=m
-CONFIG_HID_PID=y
-CONFIG_USB_HIDDEV=y
+CONFIG_HID=m
+CONFIG_HIDRAW=y
+CONFIG_HID_GENERIC=m
#
# Special HID drivers
@@ -4102,6 +4157,7 @@ CONFIG_HID_A4TECH=m
CONFIG_HID_ACRUX=m
CONFIG_HID_ACRUX_FF=y
CONFIG_HID_APPLE=m
+CONFIG_HID_AUREAL=m
CONFIG_HID_BELKIN=m
CONFIG_HID_CHERRY=m
CONFIG_HID_CHICONY=m
@@ -4159,12 +4215,18 @@ CONFIG_HID_TOPSEED=m
CONFIG_HID_THRUSTMASTER=m
CONFIG_THRUSTMASTER_FF=y
CONFIG_HID_WACOM=m
-CONFIG_HID_WACOM_POWER_SUPPLY=y
CONFIG_HID_WIIMOTE=m
CONFIG_HID_WIIMOTE_EXT=y
CONFIG_HID_ZEROPLUS=m
CONFIG_ZEROPLUS_FF=y
CONFIG_HID_ZYDACRON=m
+
+#
+# USB HID support
+#
+CONFIG_USB_HID=m
+CONFIG_HID_PID=y
+CONFIG_USB_HIDDEV=y
CONFIG_USB_ARCH_HAS_OHCI=y
CONFIG_USB_ARCH_HAS_EHCI=y
CONFIG_USB_ARCH_HAS_XHCI=y
@@ -4178,8 +4240,6 @@ CONFIG_USB=m
#
# Miscellaneous USB options
#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_DEVICE_CLASS is not set
CONFIG_USB_DYNAMIC_MINORS=y
CONFIG_USB_SUSPEND=y
# CONFIG_USB_OTG is not set
@@ -4218,9 +4278,15 @@ CONFIG_USB_R8A66597_HCD=m
CONFIG_USB_RENESAS_USBHS_HCD=m
CONFIG_USB_WHCI_HCD=m
CONFIG_USB_HWA_HCD=m
+# CONFIG_USB_HCD_BCMA is not set
+# CONFIG_USB_HCD_SSB is not set
CONFIG_USB_MUSB_HDRC=m
CONFIG_USB_MUSB_TUSB6010=m
CONFIG_MUSB_PIO_ONLY=y
+CONFIG_USB_CHIPIDEA=m
+CONFIG_USB_CHIPIDEA_UDC=y
+CONFIG_USB_CHIPIDEA_HOST=y
+# CONFIG_USB_CHIPIDEA_DEBUG is not set
CONFIG_USB_RENESAS_USBHS=m
#
@@ -4334,6 +4400,7 @@ CONFIG_USB_SERIAL_OPTICON=m
CONFIG_USB_SERIAL_VIVOPAY_SERIAL=m
CONFIG_USB_SERIAL_ZIO=m
CONFIG_USB_SERIAL_SSU100=m
+CONFIG_USB_SERIAL_QT2=m
# CONFIG_USB_SERIAL_DEBUG is not set
#
@@ -4360,6 +4427,11 @@ CONFIG_USB_IOWARRIOR=m
CONFIG_USB_TEST=m
CONFIG_USB_ISIGHTFW=m
CONFIG_USB_YUREX=m
+
+#
+# USB Physical Layer drivers
+#
+CONFIG_USB_ISP1301=m
CONFIG_USB_ATM=m
CONFIG_USB_SPEEDTOUCH=m
CONFIG_USB_CXACRU=m
@@ -4371,13 +4443,16 @@ CONFIG_USB_GADGET=m
# CONFIG_USB_GADGET_DEBUG_FS is not set
CONFIG_USB_GADGET_VBUS_DRAW=2
CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2
+
+#
+# USB Peripheral Controller
+#
CONFIG_USB_R8A66597=m
CONFIG_USB_RENESAS_USBHS_UDC=m
CONFIG_USB_MV_UDC=m
CONFIG_USB_GADGET_MUSB_HDRC=m
CONFIG_USB_M66592=m
CONFIG_USB_AMD5536UDC=m
-CONFIG_USB_CI13XXX_PCI=m
CONFIG_USB_NET2272=m
CONFIG_USB_NET2272_DMA=y
CONFIG_USB_NET2280=m
@@ -4401,6 +4476,7 @@ CONFIG_USB_FUNCTIONFS_GENERIC=y
CONFIG_USB_FILE_STORAGE=m
# CONFIG_USB_FILE_STORAGE_TEST is not set
# CONFIG_USB_MASS_STORAGE is not set
+CONFIG_USB_GADGET_TARGET=m
CONFIG_USB_G_SERIAL=m
CONFIG_USB_MIDI_GADGET=m
CONFIG_USB_G_PRINTER=m
@@ -4420,7 +4496,6 @@ CONFIG_USB_G_WEBCAM=m
CONFIG_USB_OTG_UTILS=y
# CONFIG_USB_GPIO_VBUS is not set
CONFIG_NOP_USB_XCEIV=m
-# CONFIG_AB8500_USB is not set
CONFIG_UWB=m
CONFIG_UWB_HWA=m
CONFIG_UWB_WHCI=m
@@ -4475,6 +4550,7 @@ CONFIG_LEDS_CLASS=y
# LED drivers
#
CONFIG_LEDS_LM3530=m
+CONFIG_LEDS_LM3533=m
CONFIG_LEDS_PCA9532=m
# CONFIG_LEDS_PCA9532_GPIO is not set
# CONFIG_LEDS_GPIO is not set
@@ -4488,6 +4564,7 @@ CONFIG_LEDS_BD2802=m
CONFIG_LEDS_INTEL_SS4200=m
CONFIG_LEDS_LT3593=m
CONFIG_LEDS_DELL_NETBOOKS=m
+CONFIG_LEDS_MC13783=m
CONFIG_LEDS_TCA6507=m
CONFIG_LEDS_OT200=m
CONFIG_LEDS_TRIGGERS=y
@@ -4504,6 +4581,7 @@ CONFIG_LEDS_TRIGGER_DEFAULT_ON=m
#
# iptables trigger is under Netfilter config (LED target)
#
+CONFIG_LEDS_TRIGGER_TRANSIENT=m
CONFIG_ACCESSIBILITY=y
CONFIG_A11Y_BRAILLE_CONSOLE=y
# CONFIG_INFINIBAND is not set
@@ -4589,11 +4667,11 @@ CONFIG_RTC_DRV_BQ4802=m
CONFIG_RTC_DRV_RP5C01=m
CONFIG_RTC_DRV_V3020=m
CONFIG_RTC_DRV_PCF50633=m
-CONFIG_RTC_DRV_AB8500=m
#
# on-CPU RTC drivers
#
+CONFIG_RTC_DRV_MC13XXX=m
CONFIG_DMADEVICES=y
# CONFIG_DMADEVICES_DEBUG is not set
@@ -4636,6 +4714,7 @@ CONFIG_VIRTIO_RING=m
CONFIG_VIRTIO_PCI=m
CONFIG_VIRTIO_BALLOON=m
CONFIG_VIRTIO_MMIO=m
+CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y
#
# Microsoft Hyper-V guest support
@@ -4675,6 +4754,8 @@ CONFIG_PRISM2_USB=m
CONFIG_ECHO=m
CONFIG_COMEDI=m
# CONFIG_COMEDI_DEBUG is not set
+CONFIG_COMEDI_DEFAULT_BUF_SIZE_KB=2048
+CONFIG_COMEDI_DEFAULT_BUF_MAXSIZE_KB=20480
CONFIG_COMEDI_MISC_DRIVERS=m
CONFIG_COMEDI_KCOMEDILIB=m
CONFIG_COMEDI_BOND=m
@@ -4706,12 +4787,13 @@ CONFIG_COMEDI_ADL_PCI9118=m
CONFIG_COMEDI_ADV_PCI1710=m
CONFIG_COMEDI_ADV_PCI1723=m
CONFIG_COMEDI_ADV_PCI_DIO=m
-CONFIG_COMEDI_AMPLC_DIO200=m
-CONFIG_COMEDI_AMPLC_PC236=m
-CONFIG_COMEDI_AMPLC_PC263=m
+CONFIG_COMEDI_AMPLC_DIO200_PCI=m
+CONFIG_COMEDI_AMPLC_PC236_PCI=m
+CONFIG_COMEDI_AMPLC_PC263_PCI=m
CONFIG_COMEDI_AMPLC_PCI224=m
CONFIG_COMEDI_AMPLC_PCI230=m
CONFIG_COMEDI_CONTEC_PCI_DIO=m
+CONFIG_COMEDI_DAS08_PCI=m
CONFIG_COMEDI_DT3000=m
CONFIG_COMEDI_DYNA_PCI10XX=m
CONFIG_COMEDI_UNIOXX5=m
@@ -4758,8 +4840,11 @@ CONFIG_COMEDI_MITE=m
CONFIG_COMEDI_NI_TIO=m
CONFIG_COMEDI_NI_LABPC=m
CONFIG_COMEDI_8255=m
-CONFIG_COMEDI_DAS08=m
CONFIG_COMEDI_FC=m
+CONFIG_COMEDI_AMPLC_DIO200=m
+CONFIG_COMEDI_AMPLC_PC236=m
+CONFIG_COMEDI_AMPLC_PC263=m
+CONFIG_COMEDI_DAS08=m
CONFIG_ASUS_OLED=m
# CONFIG_PANEL is not set
CONFIG_R8187SE=m
@@ -4784,12 +4869,9 @@ CONFIG_LINE6_USB=m
# CONFIG_LINE6_USB_RAW is not set
# CONFIG_LINE6_USB_IMPULSE_RESPONSE is not set
CONFIG_USB_SERIAL_QUATECH2=m
-CONFIG_USB_SERIAL_QUATECH_USB2=m
CONFIG_VT6655=m
CONFIG_VT6656=m
-# CONFIG_VME_BUS is not set
CONFIG_DX_SEP=m
-# CONFIG_IIO is not set
CONFIG_ZRAM=m
# CONFIG_ZRAM_DEBUG is not set
CONFIG_ZCACHE=y
@@ -4827,7 +4909,6 @@ CONFIG_SPEAKUP_SYNTH_TXPRT=m
CONFIG_SPEAKUP_SYNTH_DUMMY=m
CONFIG_TOUCHSCREEN_CLEARPAD_TM1217=m
CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4=m
-CONFIG_INTEL_MEI=m
CONFIG_STAGING_MEDIA=y
CONFIG_DVB_AS102=m
CONFIG_DVB_CXD2099=m
@@ -4865,6 +4946,16 @@ CONFIG_LIRC_ZILOG=m
# CONFIG_ANDROID is not set
# CONFIG_PHONE is not set
CONFIG_USB_WPAN_HCD=m
+CONFIG_IPACK_BUS=m
+CONFIG_BOARD_TPCI200=m
+CONFIG_SERIAL_IPOCTAL=m
+CONFIG_WIMAX_GDM72XX=m
+CONFIG_WIMAX_GDM72XX_QOS=y
+CONFIG_WIMAX_GDM72XX_K_MODE=y
+CONFIG_WIMAX_GDM72XX_WIMAX2=y
+CONFIG_WIMAX_GDM72XX_USB=y
+# CONFIG_WIMAX_GDM72XX_SDIO is not set
+CONFIG_WIMAX_GDM72XX_USB_PM=y
CONFIG_X86_PLATFORM_DEVICES=y
CONFIG_ACER_WMI=m
CONFIG_ACERHDF=m
@@ -4938,6 +5029,15 @@ CONFIG_IRQ_REMAP=y
#
CONFIG_VIRT_DRIVERS=y
# CONFIG_PM_DEVFREQ is not set
+CONFIG_EXTCON=m
+
+#
+# Extcon Device Drivers
+#
+CONFIG_EXTCON_GPIO=m
+CONFIG_MEMORY=y
+# CONFIG_IIO is not set
+# CONFIG_VME_BUS is not set
#
# Firmware Drivers
@@ -5088,11 +5188,9 @@ CONFIG_JFFS2_ZLIB=y
CONFIG_JFFS2_RTIME=y
# CONFIG_JFFS2_RUBIN is not set
CONFIG_UBIFS_FS=m
-CONFIG_UBIFS_FS_XATTR=y
# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set
CONFIG_UBIFS_FS_LZO=y
CONFIG_UBIFS_FS_ZLIB=y
-# CONFIG_UBIFS_FS_DEBUG is not set
CONFIG_LOGFS=m
CONFIG_CRAMFS=m
CONFIG_SQUASHFS=m
@@ -5111,6 +5209,7 @@ CONFIG_OMFS_FS=m
# CONFIG_QNX6FS_FS is not set
# CONFIG_ROMFS_FS is not set
CONFIG_PSTORE=y
+CONFIG_PSTORE_RAM=m
# CONFIG_SYSV_FS is not set
CONFIG_UFS_FS=m
# CONFIG_UFS_FS_WRITE is not set
@@ -5120,6 +5219,7 @@ CONFIG_EXOFS_FS=m
CONFIG_ORE=m
CONFIG_NETWORK_FILESYSTEMS=y
CONFIG_NFS_FS=m
+CONFIG_NFS_V2=y
CONFIG_NFS_V3=y
CONFIG_NFS_V3_ACL=y
CONFIG_NFS_V4=y
@@ -5208,6 +5308,17 @@ CONFIG_NLS_ISO8859_14=m
CONFIG_NLS_ISO8859_15=m
CONFIG_NLS_KOI8_R=m
CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_MAC_ROMAN=m
+CONFIG_NLS_MAC_CELTIC=m
+CONFIG_NLS_MAC_CENTEURO=m
+CONFIG_NLS_MAC_CROATIAN=m
+CONFIG_NLS_MAC_CYRILLIC=m
+CONFIG_NLS_MAC_GAELIC=m
+CONFIG_NLS_MAC_GREEK=m
+CONFIG_NLS_MAC_ICELAND=m
+CONFIG_NLS_MAC_INUIT=m
+CONFIG_NLS_MAC_ROMANIAN=m
+CONFIG_NLS_MAC_TURKISH=m
CONFIG_NLS_UTF8=m
CONFIG_DLM=m
# CONFIG_DLM_DEBUG is not set
@@ -5223,6 +5334,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
CONFIG_FRAME_WARN=2048
CONFIG_MAGIC_SYSRQ=y
CONFIG_STRIP_ASM_SYMS=y
+# CONFIG_READABLE_ASM is not set
CONFIG_UNUSED_SYMBOLS=y
CONFIG_DEBUG_FS=y
# CONFIG_HEADERS_CHECK is not set
@@ -5235,6 +5347,8 @@ CONFIG_HARDLOCKUP_DETECTOR=y
CONFIG_BOOTPARAM_HARDLOCKUP_PANIC_VALUE=0
# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
+# CONFIG_PANIC_ON_OOPS is not set
+CONFIG_PANIC_ON_OOPS_VALUE=0
CONFIG_DETECT_HUNG_TASK=y
CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120
# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
@@ -5290,7 +5404,6 @@ CONFIG_CPU_NOTIFIER_ERROR_INJECT=m
# CONFIG_DEBUG_PAGEALLOC is not set
CONFIG_USER_STACKTRACE_SUPPORT=y
CONFIG_NOP_TRACER=y
-CONFIG_HAVE_FTRACE_NMI_ENTER=y
CONFIG_HAVE_FUNCTION_TRACER=y
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST=y
@@ -5301,7 +5414,6 @@ CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
CONFIG_HAVE_C_RECORDMCOUNT=y
CONFIG_TRACER_MAX_TRACE=y
CONFIG_RING_BUFFER=y
-CONFIG_FTRACE_NMI_ENTER=y
CONFIG_EVENT_TRACING=y
CONFIG_EVENT_POWER_TRACING_DEPRECATED=y
CONFIG_CONTEXT_SWITCH_TRACER=y
@@ -5321,6 +5433,8 @@ CONFIG_BRANCH_PROFILE_NONE=y
# CONFIG_PROFILE_ALL_BRANCHES is not set
CONFIG_STACK_TRACER=y
CONFIG_BLK_DEV_IO_TRACE=y
+# CONFIG_UPROBE_EVENT is not set
+# CONFIG_PROBE_EVENTS is not set
CONFIG_DYNAMIC_FTRACE=y
CONFIG_FUNCTION_PROFILER=y
CONFIG_FTRACE_MCOUNT_RECORD=y
@@ -5533,6 +5647,7 @@ CONFIG_HAVE_KVM_EVENTFD=y
CONFIG_KVM_APIC_ARCHITECTURE=y
CONFIG_KVM_MMIO=y
CONFIG_KVM_ASYNC_PF=y
+CONFIG_HAVE_KVM_MSI=y
CONFIG_VIRTUALIZATION=y
CONFIG_KVM=m
CONFIG_KVM_INTEL=m
@@ -5546,6 +5661,8 @@ CONFIG_BINARY_PRINTF=y
#
CONFIG_RAID6_PQ=m
CONFIG_BITREVERSE=y
+CONFIG_GENERIC_STRNCPY_FROM_USER=y
+CONFIG_GENERIC_STRNLEN_USER=y
CONFIG_GENERIC_FIND_FIRST_BIT=y
CONFIG_GENERIC_PCI_IOMAP=y
CONFIG_GENERIC_IOMAP=y
@@ -5583,6 +5700,8 @@ CONFIG_DECOMPRESS_XZ=y
CONFIG_DECOMPRESS_LZO=y
CONFIG_GENERIC_ALLOCATOR=y
CONFIG_REED_SOLOMON=m
+CONFIG_REED_SOLOMON_ENC8=y
+CONFIG_REED_SOLOMON_DEC8=y
CONFIG_REED_SOLOMON_DEC16=y
CONFIG_BCH=m
CONFIG_BCH_CONST_PARAMS=y
@@ -5601,3 +5720,4 @@ CONFIG_NLATTR=y
CONFIG_LRU_CACHE=m
CONFIG_AVERAGE=y
CONFIG_CORDIC=m
+CONFIG_DDR=y
diff --git a/libre/linux-libre/linux-libre.install b/libre/linux-libre/linux-libre.install
index 38394ad7b..87de3c8d5 100644
--- a/libre/linux-libre/linux-libre.install
+++ b/libre/linux-libre/linux-libre.install
@@ -2,7 +2,7 @@
# arg 2: the old package version
KERNEL_NAME=
-KERNEL_VERSION=3.4.6-1-LIBRE
+KERNEL_VERSION=3.5.0-1-LIBRE
# set a sane PATH to ensure that critical utils like depmod will be found
export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
diff --git a/libre/lirc-libre/PKGBUILD b/libre/lirc-libre/PKGBUILD
index 1738c0aae..4442712f0 100644
--- a/libre/lirc-libre/PKGBUILD
+++ b/libre/lirc-libre/PKGBUILD
@@ -6,14 +6,14 @@ _pkgbase=lirc
pkgbase=lirc-libre
pkgname=('lirc-libre' 'lirc-utils-libre')
pkgver=0.9.0
-pkgrel=22
+pkgrel=24
epoch=1
-_extramodules=extramodules-3.4-LIBRE
+_extramodules=extramodules-3.5-LIBRE
arch=('i686' 'x86_64' 'mips64el')
url="http://www.lirc.org/"
license=('GPL')
### NOTICE don't forget to bump version in depends in package_lirc
-makedepends=('help2man' 'linux-libre-headers>=3.4' 'linux-libre-headers<3.5' 'alsa-lib' 'libx11' 'libftdi' 'libirman' 'python2')
+makedepends=('help2man' 'linux-libre-headers>=3.5' 'linux-libre-headers<3.6' 'alsa-lib' 'libx11' 'libftdi' 'libirman' 'python2')
options=('!makeflags' '!strip')
source=(http://prdownloads.sourceforge.net/${_pkgbase}/${_pkgbase}-${pkgver}.tar.bz2
lirc_wpc8769l.patch
diff --git a/libre/lirc-libre/lirc.install b/libre/lirc-libre/lirc.install
index c50e384c8..b39282da6 100644
--- a/libre/lirc-libre/lirc.install
+++ b/libre/lirc-libre/lirc.install
@@ -1,4 +1,4 @@
-EXTRAMODULES=extramodules-3.4-LIBRE
+EXTRAMODULES=extramodules-3.5-LIBRE
post_install() {
# updating module dependencies
diff --git a/libre/virtualbox-libre-modules-lts/60-vboxguest.rules b/libre/virtualbox-libre-modules-lts/60-vboxguest.rules
new file mode 100644
index 000000000..6285f7249
--- /dev/null
+++ b/libre/virtualbox-libre-modules-lts/60-vboxguest.rules
@@ -0,0 +1,2 @@
+ACTION=="add", KERNEL=="vboxguest", SUBSYSTEM=="misc", OWNER="root", MODE="0600"
+ACTION=="add", KERNEL=="vboxuser", SUBSYSTEM=="misc", OWNER="root", MODE="0666"
diff --git a/libre/virtualbox-libre-modules-lts/LocalConfig.kmk b/libre/virtualbox-libre-modules-lts/LocalConfig.kmk
new file mode 100644
index 000000000..af79f90cd
--- /dev/null
+++ b/libre/virtualbox-libre-modules-lts/LocalConfig.kmk
@@ -0,0 +1,19 @@
+VBOX_WITH_ADDITION_DRIVERS =
+VBOX_WITH_INSTALLER = 1
+VBOX_WITH_LINUX_ADDITIONS = 1
+VBOX_WITH_X11_ADDITIONS =
+VBOX_WITH_TESTCASES =
+VBOX_WITH_TESTSUITE =
+VBOX_WITH_ORIGIN :=
+VBOX_PATH_APP_PRIVATE_ARCH := /usr/lib/virtualbox
+VBOX_PATH_SHARED_LIBS := $(VBOX_PATH_APP_PRIVATE_ARCH)
+VBOX_WITH_RUNPATH := $(VBOX_PATH_APP_PRIVATE_ARCH)
+VBOX_PATH_APP_PRIVATE := /usr/share/virtualbox
+VBOX_PATH_APP_DOCS := /usr/share/virtualbox
+VBOX_WITH_REGISTRATION_REQUEST =
+VBOX_WITH_UPDATE_REQUEST =
+VBOX_WITH_VNC := 1
+VBOX_BLD_PYTHON = python2
+VBOX_JAVA_HOME = /usr/lib/jvm/java-6-openjdk
+VBOX_GCC_WERR =
+VBOX_GCC_WARN =
diff --git a/libre/virtualbox-libre-modules-lts/PKGBUILD b/libre/virtualbox-libre-modules-lts/PKGBUILD
new file mode 100644
index 000000000..b3cabb285
--- /dev/null
+++ b/libre/virtualbox-libre-modules-lts/PKGBUILD
@@ -0,0 +1,153 @@
+# $Id$
+# Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
+# Maintainer (Parabola): Márcio Silva <coadde@lavabit.com>
+# Maintainer (Parabola): André Silva <emulatorman@lavabit.com>
+# Maintainer (Parabola): Jorge López <jorginho@lavabit.com>
+
+pkgbase=virtualbox-libre-modules-lts
+pkgname=('virtualbox-libre-modules-lts' 'virtualbox-libre-parabola-modules-lts')
+pkgver=4.1.18
+pkgrel=3
+arch=('i686' 'x86_64')
+url='http://virtualbox.org'
+license=('GPL')
+makedepends=('libstdc++5' 'bin86' 'dev86' 'iasl' 'libxslt' 'libxml2' 'libpng' 'libidl2' 'xalan-c' 'sdl' 'linux-libre-lts' 'linux-libre-lts-headers')
+[[ $CARCH == "x86_64" ]] && makedepends=("${makedepends[@]}" 'gcc-multilib' 'lib32-glibc')
+source=(http://download.virtualbox.org/virtualbox/${pkgver}/VirtualBox-${pkgver}.tar.bz2
+ LocalConfig.kmk 60-vboxguest.rules os_blag_64.png os_blag.png
+ os_dragora_64.png os_dragora.png os_dynebolic.png os_gnewsense_64.png os_gnewsense.png
+ os_gnu_64.png os_gnuhurd.png os_gnulinux_64.png os_gnulinux.png os_gnu.png
+ os_musix_64.png os_musix.png os_parabola_64.png os_parabola.png os_trisquel_64.png
+ os_trisquel.png os_ututo_64.png os_ututo.png os_venenux.png libre.patch
+ free-distros.patch)
+md5sums=('38db0a87cba659b484af868b0c2bd3ac'
+ '4c88bd122677a35f68abd76eb01b378b'
+ 'ed1341881437455d9735875ddf455fbe'
+ '8538dba8686d7449cb481c9bae9d722a'
+ '545c925b46f2ac95e5f8ae407fad101a'
+ 'f6416f509c2e5460e4dc624e0a57f3c1'
+ 'bbfb59dd517c020a23701b480187a355'
+ 'efacfdb61918286ea9bc89866b8fd239'
+ '7c3eb09995e8bafeef414374e44ad4ce'
+ 'a49ed3ab6bd0fb084de0ab3dd97ae93e'
+ '6b432b3305ed446125eef052c38355a6'
+ 'a70022a468bd3e9daf01818d2d74ac3c'
+ '6b432b3305ed446125eef052c38355a6'
+ 'a70022a468bd3e9daf01818d2d74ac3c'
+ 'a70022a468bd3e9daf01818d2d74ac3c'
+ '380eb2ab6cad3da198094585853c129c'
+ 'a60bb9a98abcc3c34156f9051d00df9a'
+ '3a908ef6952bcf987e63ef2fe4e98d24'
+ '02e87c39c353634cecacf98f1707fa15'
+ '0cf41a41e7a415d404d5584e047fd450'
+ '449cde3b58390284b59c5d663de3edc9'
+ 'c7951fe6888d939f3a7d0dafe477e82b'
+ '4da8eeb2ece7e475fc7a0d1003da26c6'
+ '5e4187af59726d71c5be48d0cd816c34'
+ 'a9e4724b56ddf99bb2e9a8fab8ad43ba'
+ 'f7d275fc52e5f3cfafd85646c2914063')
+
+_extramodules=extramodules-3.0-LIBRE-LTS
+_kernver=3.0.38-1-LIBRE-LTS
+
+export KERN_DIR=/usr/lib/modules/${_kernver}/build/
+export KERN_INCL=/usr/src/linux-${_kernver}/include/
+
+build() {
+ cd "$srcdir/VirtualBox-${pkgver}"
+
+ patch -Np1 -i "$srcdir/libre.patch"
+ patch -Np1 -i "$srcdir/free-distros.patch"
+
+ ## Removing Nonfree directories
+ rm -rv "./include/VBox/ExtPack"
+ rm -rv "./src/VBox/ExtPacks"
+ rm -rv "./src/VBox/Main/src-helper-apps"
+
+ ## Removing Oracle VM VirtualBox Extension Pack icons
+ rm -v "./src/VBox/Resources/darwin/virtualbox-vbox-extpack.icns"
+ rm -v "./src/VBox/Resources/other/virtualbox-vbox-extpack-"{16px,20px,24px,32px,40px,48px,64px,72px,80px,96px,128px,256px,512px}.png
+ rm -v "./src/VBox/Resources/win/OSE/virtualbox-vbox-extpack.ico"
+ rm -v "./src/VBox/Frontends/VirtualBox/images/extension_pack_"{16px,32px,disabled{_16px,_32px},install{_16px,_32px},install_disabled{_16px,_32px},uninstall{_16px,_32px},uninstall_disabled{_16px,_32px}}.png
+
+ ## Adding free distros icons
+ for i in {gnuhurd,dynebolic,venenux,{gnu{,linux},parabola,gnewsense,blag,dragora,ututo,musix,trisquel}{,_64}}; do
+ cp -v "$srcdir/os_${i}.png" "./src/VBox/Frontends/VirtualBox/images"
+ done
+
+ ## Removing non-free OS icons
+ rm -v "./src/VBox/Frontends/VirtualBox/images/os_"{{{arch,turbo}linux,debian,fedora,gentoo,linux{24,26},macosx,mandriva,{free,net,open}bsd,redhat,solaris,opensuse,oracle{,solaris},ubuntu,win{2k{3,8},7,8,vista,xp},xandros}{,_64},dos,jrockitve,l4,linux{,22,_other},netware,qnx,os2{_other,ecs,warp{3,4,45}},win{2k,31,95,98,_other,me,nt4}}.png
+
+ cp "$srcdir/LocalConfig.kmk" .
+
+ ./configure \
+ --with-linux=/usr/src/linux-${_kernver} \
+ --disable-java \
+ --disable-docs \
+ --disable-xpcom \
+ --disable-python \
+ --disable-sdl-ttf \
+ --disable-alsa \
+ --disable-pulse \
+ --disable-dbus \
+ --disable-opengl \
+ --build-headless \
+ --nofatal
+ source ./env.sh
+ kmk all
+
+ make -C "$srcdir/VirtualBox-${pkgver}/out/linux.$BUILD_PLATFORM_ARCH/release/bin/src"
+ make -C "$srcdir/VirtualBox-${pkgver}/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src"
+}
+
+package_virtualbox-libre-parabola-modules-lts(){
+ pkgdesc="Additions only for Parabola guests (long-term supported kernel modules)"
+ license=('GPL')
+ install=virtualbox-libre-parabola-modules-lts.install
+ depends=('linux-libre-lts>=3.0' 'linux-libre-lts<3.1')
+ replaces=('virtualbox-archlinux-modules-lts')
+ conflicts=('virtualbox-archlinux-modules-lts')
+ provides=("virtualbox-archlinux-modules=$pkgver" "virtualbox-archlinux-modules-lts=$pkgver" "virtualbox-libre-parabola-modules=$pkgver" )
+
+ source "$srcdir/VirtualBox-${pkgver}/env.sh"
+
+ cd "$srcdir/VirtualBox-${pkgver}/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src"
+
+ for module in vboxguest.ko vboxsf.ko vboxvideo.ko; do
+ install -D -m644 ${module} \
+ "$pkgdir/usr/lib/modules/${_extramodules}/${module}"
+ done
+
+ install -D -m 0644 "$srcdir/60-vboxguest.rules" \
+ "$pkgdir/usr/lib/udev/rules.d/60-vboxguest.rules"
+
+ find "${pkgdir}" -name '*.ko' -exec gzip -9 {} \;
+}
+
+package_virtualbox-libre-modules-lts(){
+ pkgdesc="Long-term supported kernel modules for VirtualBox"
+ license=('GPL')
+ install=virtualbox-libre-modules-lts.install
+ depends=('linux-libre-lts>=3.0' 'linux-libre-lts<3.1')
+ replaces=('virtualbox-modules-lts')
+ conflicts=('virtualbox-modules-lts')
+ provides=("virtualbox-modules=$pkgver" "virtualbox-modules-lts=$pkgver")
+
+ source "$srcdir/VirtualBox-${pkgver}/env.sh"
+
+ cd "$srcdir/VirtualBox-${pkgver}/out/linux.$BUILD_PLATFORM_ARCH/release/bin/src"
+
+ install -D -m644 vboxdrv.ko \
+ "$pkgdir/usr/lib/modules/${_extramodules}/vboxdrv.ko"
+
+ install -D -m644 vboxnetadp.ko \
+ "$pkgdir/usr/lib/modules/${_extramodules}/vboxnetadp.ko"
+
+ install -D -m644 vboxnetflt.ko \
+ "$pkgdir/usr/lib/modules/${_extramodules}/vboxnetflt.ko"
+
+ install -D -m644 vboxpci.ko \
+ "$pkgdir/usr/lib/modules/${_extramodules}/vboxpci.ko"
+
+ find "${pkgdir}" -name '*.ko' -exec gzip -9 {} +
+}
diff --git a/libre/virtualbox-libre-modules-lts/free-distros.patch b/libre/virtualbox-libre-modules-lts/free-distros.patch
new file mode 100644
index 000000000..7920fb6ab
--- /dev/null
+++ b/libre/virtualbox-libre-modules-lts/free-distros.patch
@@ -0,0 +1,1383 @@
+--- VirtualBox-4.1.18.orig/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UINewVMWzd.cpp 2012-07-25 14:51:03.569003667 -0300
++++ VirtualBox-4.1.18/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UINewVMWzd.cpp 2012-07-25 14:51:03.652333615 -0300
+@@ -44,94 +44,38 @@
+ * first matching string found, will be used. */
+ static const osTypePattern gs_OSTypePattern[] =
+ {
+- { QRegExp("DOS", Qt::CaseInsensitive), "DOS" },
+
+- /* Windows */
+- { QRegExp("Wi.*98", Qt::CaseInsensitive), "Windows98" },
+- { QRegExp("Wi.*95", Qt::CaseInsensitive), "Windows95" },
+- { QRegExp("Wi.*Me", Qt::CaseInsensitive), "WindowsMe" },
+- { QRegExp("(Wi.*NT)|(NT4)", Qt::CaseInsensitive), "WindowsNT4" },
+- { QRegExp("((Wi.*XP)|(\\bXP\\b)).*64", Qt::CaseInsensitive), "WindowsXP_64" },
+- { QRegExp("(Wi.*XP)|(\\bXP\\b)", Qt::CaseInsensitive), "WindowsXP" },
+- { QRegExp("((Wi.*2003)|(W2K3)).*64", Qt::CaseInsensitive), "Windows2003_64" },
+- { QRegExp("(Wi.*2003)|(W2K3)", Qt::CaseInsensitive), "Windows2003" },
+- { QRegExp("((Wi.*V)|(Vista)).*64", Qt::CaseInsensitive), "WindowsVista_64" },
+- { QRegExp("(Wi.*V)|(Vista)", Qt::CaseInsensitive), "WindowsVista" },
+- { QRegExp("((Wi.*2008)|(W2K8)).*64", Qt::CaseInsensitive), "Windows2008_64" },
+- { QRegExp("(Wi.*2008)|(W2K8)", Qt::CaseInsensitive), "Windows2008" },
+- { QRegExp("(Wi.*2000)|(W2K)", Qt::CaseInsensitive), "Windows2000" },
+- { QRegExp("(Wi.*7.*64)|(W7.*64)", Qt::CaseInsensitive), "Windows7_64" },
+- { QRegExp("(Wi.*7)|(W7)", Qt::CaseInsensitive), "Windows7" },
+- { QRegExp("(Wi.*8.*64)|(W8.*64)", Qt::CaseInsensitive), "Windows8_64" },
+- { QRegExp("(Wi.*8)|(W8)", Qt::CaseInsensitive), "Windows8" },
+- { QRegExp("Wi.*3", Qt::CaseInsensitive), "Windows31" },
+- { QRegExp("Wi", Qt::CaseInsensitive), "WindowsXP" },
+-
+- /* Solaris */
+- { QRegExp("((Op.*So)|(os20[01][0-9])|(So.*1[01])|(India)|(Neva)).*64", Qt::CaseInsensitive), "OpenSolaris_64" },
+- { QRegExp("(Op.*So)|(os20[01][0-9])|(So.*1[01])|(India)|(Neva)", Qt::CaseInsensitive), "OpenSolaris" },
+- { QRegExp("So.*64", Qt::CaseInsensitive), "Solaris_64" },
+- { QRegExp("So", Qt::CaseInsensitive), "Solaris" },
+-
+- /* OS/2 */
+- { QRegExp("OS[/|!-]{,1}2.*W.*4.?5", Qt::CaseInsensitive), "OS2Warp45" },
+- { QRegExp("OS[/|!-]{,1}2.*W.*4", Qt::CaseInsensitive), "OS2Warp4" },
+- { QRegExp("OS[/|!-]{,1}2.*W", Qt::CaseInsensitive), "OS2Warp3" },
+- { QRegExp("(OS[/|!-]{,1}2.*e)|(eCS.*)", Qt::CaseInsensitive), "OS2eCS" },
+- { QRegExp("OS[/|!-]{,1}2", Qt::CaseInsensitive), "OS2" },
+-
+- /* Code names for Linux distributions */
+- { QRegExp("((edgy)|(feisty)|(gutsy)|(hardy)|(intrepid)|(jaunty)|(karmic)|(lucid)|(maverick)|(natty)|(oneiric)|(precise)).*64", Qt::CaseInsensitive), "Ubuntu_64" },
+- { QRegExp("(edgy)|(feisty)|(gutsy)|(hardy)|(intrepid)|(jaunty)|(karmic)|(lucid)|(maverick)|(natty)|(oneiric)|(precise)", Qt::CaseInsensitive), "Ubuntu" },
+- { QRegExp("((sarge)|(etch)|(lenny)|(squeeze)|(wheezy)|(sid)).*64", Qt::CaseInsensitive), "Debian_64" },
+- { QRegExp("(sarge)|(etch)|(lenny)|(squeeze)|(wheezy)|(sid)", Qt::CaseInsensitive), "Debian" },
+- { QRegExp("((moonshine)|(werewolf)|(sulphur)|(cambridge)|(leonidas)|(constantine)|(goddard)|(laughlin)|(lovelock)|(verne)).*64", Qt::CaseInsensitive), "Fedora_64" },
+- { QRegExp("(moonshine)|(werewolf)|(sulphur)|(cambridge)|(leonidas)|(constantine)|(goddard)|(laughlin)|(lovelock)|(verne)", Qt::CaseInsensitive), "Fedora" },
+-
+- /* Regular names of Linux distributions */
+- { QRegExp("Arc.*64", Qt::CaseInsensitive), "ArchLinux_64" },
+- { QRegExp("Arc", Qt::CaseInsensitive), "ArchLinux" },
+- { QRegExp("Deb.*64", Qt::CaseInsensitive), "Debian_64" },
+- { QRegExp("Deb", Qt::CaseInsensitive), "Debian" },
+- { QRegExp("((SU)|(Nov)|(SLE)).*64", Qt::CaseInsensitive), "OpenSUSE_64" },
+- { QRegExp("(SU)|(Nov)|(SLE)", Qt::CaseInsensitive), "OpenSUSE" },
+- { QRegExp("Fe.*64", Qt::CaseInsensitive), "Fedora_64" },
+- { QRegExp("Fe", Qt::CaseInsensitive), "Fedora" },
+- { QRegExp("((Gen)|(Sab)).*64", Qt::CaseInsensitive), "Gentoo_64" },
+- { QRegExp("(Gen)|(Sab)", Qt::CaseInsensitive), "Gentoo" },
+- { QRegExp("Man.*64", Qt::CaseInsensitive), "Mandriva_64" },
+- { QRegExp("Man", Qt::CaseInsensitive), "Mandriva" },
+- { QRegExp("((Red)|(rhel)|(cen)).*64", Qt::CaseInsensitive), "RedHat_64" },
+- { QRegExp("(Red)|(rhel)|(cen)", Qt::CaseInsensitive), "RedHat" },
+- { QRegExp("Tur.*64", Qt::CaseInsensitive), "Turbolinux_64" },
+- { QRegExp("Tur", Qt::CaseInsensitive), "Turbolinux" },
+- { QRegExp("Ub.*64", Qt::CaseInsensitive), "Ubuntu_64" },
+- { QRegExp("Ub", Qt::CaseInsensitive), "Ubuntu" },
+- { QRegExp("Xa.*64", Qt::CaseInsensitive), "Xandros_64" },
+- { QRegExp("Xa", Qt::CaseInsensitive), "Xandros" },
+- { QRegExp("((Or)|(oel)).*64", Qt::CaseInsensitive), "Oracle_64" },
+- { QRegExp("(Or)|(oel)", Qt::CaseInsensitive), "Oracle" },
+- { QRegExp("((Li)|(lnx)).*2.?2", Qt::CaseInsensitive), "Linux22" },
+- { QRegExp("((Li)|(lnx)).*2.?4.*64", Qt::CaseInsensitive), "Linux24_64" },
+- { QRegExp("((Li)|(lnx)).*2.?4", Qt::CaseInsensitive), "Linux24" },
+- { QRegExp("((((Li)|(lnx)).*2.?6)|(LFS)).*64", Qt::CaseInsensitive), "Linux26_64" },
+- { QRegExp("(((Li)|(lnx)).*2.?6)|(LFS)", Qt::CaseInsensitive), "Linux26" },
+- { QRegExp("((Li)|(lnx)).*64", Qt::CaseInsensitive), "Linux26_64" },
+- { QRegExp("(Li)|(lnx)", Qt::CaseInsensitive), "Linux26" },
++ /* Code names for GNU/Linux distributions */
++ { QRegExp("((Taranis)|(Dagda)|(Brigantia)).*64", Qt::CaseInsensitive), "Trisquel_64" },
++ { QRegExp("(Taranis)|(Dagda)|(Brigantia)", Qt::CaseInsensitive), "Trisquel" },
++ { QRegExp("((metad)|(parkes)|(three)).*64", Qt::CaseInsensitive), "gNewSense_64" },
++ { QRegExp("(deltah)|(metad)|(parkes)|(three)", Qt::CaseInsensitive), "gNewSense" },
++ { QRegExp("((90k)|(119k)|(140k)|(160k)|(90000)|(119000)|(140000)|(160000)|(Spartakus)).*64", Qt::CaseInsensitive), "Blag_64" },
++ { QRegExp("(90k)|(119k)|(140k)|(160k)|(90000)|(119000)|(140000)|(160000)|(Spartakus)", Qt::CaseInsensitive), "Blag" },
++
++ /* Regular names of GNU/Linux distributions and GNU-Hurd */
++ { QRegExp("Pa.*64", Qt::CaseInsensitive), "Parabola_64" },
++ { QRegExp("Pa", Qt::CaseInsensitive), "Parabola" },
++ { QRegExp("((gNe)|(new)|(Sen)).*64", Qt::CaseInsensitive), "gNewSense_64" },
++ { QRegExp("(gNe)|(new)|(Sen)", Qt::CaseInsensitive), "gNewSense" },
++ { QRegExp("Bla.*64", Qt::CaseInsensitive), "Blag_64" },
++ { QRegExp("Bla", Qt::CaseInsensitive), "Blag" },
++ { QRegExp("Dra.*64", Qt::CaseInsensitive), "Dragora_64" },
++ { QRegExp("Dra", Qt::CaseInsensitive), "Dragora" },
++ { QRegExp("((Utu)|(XS)).*64", Qt::CaseInsensitive), "Ututo_64" },
++ { QRegExp("(Utu)|(XS)", Qt::CaseInsensitive), "Ututo" },
++ { QRegExp("Mus.*64", Qt::CaseInsensitive), "Musix_64" },
++ { QRegExp("Mus", Qt::CaseInsensitive), "Musix" },
++ { QRegExp("Tri.*64", Qt::CaseInsensitive), "Trisquel_64" },
++ { QRegExp("Tri", Qt::CaseInsensitive), "Trisquel" },
++ { QRegExp("Dyn", Qt::CaseInsensitive), "Dynebolic" },
++ { QRegExp("Ven", Qt::CaseInsensitive), "Venenux" },
++ { QRegExp("GNU", Qt::CaseInsensitive), "GNU" },
++ { QRegExp("Hu", Qt::CaseInsensitive), "GNUHurd" },
++ { QRegExp("((Li)|(lnx)).*64", Qt::CaseInsensitive), "GNULinux_64" },
++ { QRegExp("(Li)|(lnx)", Qt::CaseInsensitive), "GNULinux" },
+
+ /* Other */
+- { QRegExp("L4", Qt::CaseInsensitive), "L4" },
+- { QRegExp("((Fr.*B)|(fbsd)).*64", Qt::CaseInsensitive), "FreeBSD_64" },
+- { QRegExp("(Fr.*B)|(fbsd)", Qt::CaseInsensitive), "FreeBSD" },
+- { QRegExp("Op.*B.*64", Qt::CaseInsensitive), "OpenBSD_64" },
+- { QRegExp("Op.*B", Qt::CaseInsensitive), "OpenBSD" },
+- { QRegExp("Ne.*B.*64", Qt::CaseInsensitive), "NetBSD_64" },
+- { QRegExp("Ne.*B", Qt::CaseInsensitive), "NetBSD" },
+- { QRegExp("QN", Qt::CaseInsensitive), "QNX" },
+- { QRegExp("((Mac)|(Tig)|(Leop)|(osx)).*64", Qt::CaseInsensitive), "MacOS_64" },
+- { QRegExp("(Mac)|(Tig)|(Leop)|(osx)", Qt::CaseInsensitive), "MacOS" },
+- { QRegExp("Net", Qt::CaseInsensitive), "Netware" },
+- { QRegExp("Rocki", Qt::CaseInsensitive), "JRockitVE" },
+ { QRegExp("Ot", Qt::CaseInsensitive), "Other" },
+ };
+
+--- VirtualBox-4.1.18.orig/src/VBox/Main/xml/Settings.cpp 2012-07-25 15:14:50.498764160 -0300
++++ VirtualBox-4.1.18/src/VBox/Main/xml/Settings.cpp 2012-07-25 15:14:50.548761649 -0300
+@@ -3227,40 +3227,18 @@
+ } aConvertOSTypes[] =
+ {
+ { "unknown", "Other" },
+- { "dos", "DOS" },
+- { "win31", "Windows31" },
+- { "win95", "Windows95" },
+- { "win98", "Windows98" },
+- { "winme", "WindowsMe" },
+- { "winnt4", "WindowsNT4" },
+- { "win2k", "Windows2000" },
+- { "winxp", "WindowsXP" },
+- { "win2k3", "Windows2003" },
+- { "winvista", "WindowsVista" },
+- { "win2k8", "Windows2008" },
+- { "os2warp3", "OS2Warp3" },
+- { "os2warp4", "OS2Warp4" },
+- { "os2warp45", "OS2Warp45" },
+- { "ecs", "OS2eCS" },
+- { "linux22", "Linux22" },
+- { "linux24", "Linux24" },
+- { "linux26", "Linux26" },
+- { "archlinux", "ArchLinux" },
+- { "debian", "Debian" },
+- { "opensuse", "OpenSUSE" },
+- { "fedoracore", "Fedora" },
+- { "gentoo", "Gentoo" },
+- { "mandriva", "Mandriva" },
+- { "redhat", "RedHat" },
+- { "ubuntu", "Ubuntu" },
+- { "xandros", "Xandros" },
+- { "freebsd", "FreeBSD" },
+- { "openbsd", "OpenBSD" },
+- { "netbsd", "NetBSD" },
+- { "netware", "Netware" },
+- { "solaris", "Solaris" },
+- { "opensolaris", "OpenSolaris" },
+- { "l4", "L4" }
++ { "gnu", "GNU" },
++ { "gnuhurd", "GNUHurd" },
++ { "gnulinux", "GNULinux" },
++ { "parabola", "Parabola" },
++ { "gnewsense", "gNewSense" },
++ { "blag", "Blag" },
++ { "dragora", "Dragora" },
++ { "ututo", "Ututo" },
++ { "musix", "Musix" },
++ { "trisquel", "Trisquel" },
++ { "dynebolic", "Dynebolic" },
++ { "venenux", "Venenux" },
+ };
+
+ void MachineConfigFile::convertOldOSType_pre1_5(Utf8Str &str)
+--- VirtualBox-4.1.18.orig/src/VBox/Main/xml/SettingsConverter.xsl 2012-07-25 15:21:04.553581275 -0300
++++ VirtualBox-4.1.18/src/VBox/Main/xml/SettingsConverter.xsl 2012-07-25 15:21:04.593579427 -0300
+@@ -729,40 +729,18 @@
+ <xsl:attribute name="OSType">
+ <xsl:choose>
+ <xsl:when test="@OSType='unknown'">Other</xsl:when>
+- <xsl:when test="@OSType='dos'">DOS</xsl:when>
+- <xsl:when test="@OSType='win31'">Windows31</xsl:when>
+- <xsl:when test="@OSType='win95'">Windows95</xsl:when>
+- <xsl:when test="@OSType='win98'">Windows98</xsl:when>
+- <xsl:when test="@OSType='winme'">WindowsMe</xsl:when>
+- <xsl:when test="@OSType='winnt4'">WindowsNT4</xsl:when>
+- <xsl:when test="@OSType='win2k'">Windows2000</xsl:when>
+- <xsl:when test="@OSType='winxp'">WindowsXP</xsl:when>
+- <xsl:when test="@OSType='win2k3'">Windows2003</xsl:when>
+- <xsl:when test="@OSType='winvista'">WindowsVista</xsl:when>
+- <xsl:when test="@OSType='win2k8'">Windows2008</xsl:when>
+- <xsl:when test="@OSType='os2warp3'">OS2Warp3</xsl:when>
+- <xsl:when test="@OSType='os2warp4'">OS2Warp4</xsl:when>
+- <xsl:when test="@OSType='os2warp45'">OS2Warp45</xsl:when>
+- <xsl:when test="@OSType='ecs'">OS2eCS</xsl:when>
+- <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='archlinux'">ArchLinux</xsl:when>
+- <xsl:when test="@OSType='debian'">Debian</xsl:when>
+- <xsl:when test="@OSType='opensuse'">OpenSUSE</xsl:when>
+- <xsl:when test="@OSType='fedoracore'">Fedora</xsl:when>
+- <xsl:when test="@OSType='gentoo'">Gentoo</xsl:when>
+- <xsl:when test="@OSType='mandriva'">Mandriva</xsl:when>
+- <xsl:when test="@OSType='redhat'">RedHat</xsl:when>
+- <xsl:when test="@OSType='ubuntu'">Ubuntu</xsl:when>
+- <xsl:when test="@OSType='xandros'">Xandros</xsl:when>
+- <xsl:when test="@OSType='freebsd'">FreeBSD</xsl:when>
+- <xsl:when test="@OSType='openbsd'">OpenBSD</xsl:when>
+- <xsl:when test="@OSType='netbsd'">NetBSD</xsl:when>
+- <xsl:when test="@OSType='netware'">Netware</xsl:when>
+- <xsl:when test="@OSType='solaris'">Solaris</xsl:when>
+- <xsl:when test="@OSType='opensolaris'">OpenSolaris</xsl:when>
+- <xsl:when test="@OSType='l4'">L4</xsl:when>
++ <xsl:when test="@OSType='gnu'">GNU</xsl:when>
++ <xsl:when test="@OSType='gnuhurd'">GNUHurd</xsl:when>
++ <xsl:when test="@OSType='gnulinux'">GNULinux</xsl:when>
++ <xsl:when test="@OSType='parabola'">Parabola</xsl:when>
++ <xsl:when test="@OSType='gnewsense'">gNewSense</xsl:when>
++ <xsl:when test="@OSType='blag'">Blag</xsl:when>
++ <xsl:when test="@OSType='dragora'">Dragora</xsl:when>
++ <xsl:when test="@OSType='ututo'">Ututo</xsl:when>
++ <xsl:when test="@OSType='musix'">Musix</xsl:when>
++ <xsl:when test="@OSType='trisquel'">Trisquel</xsl:when>
++ <xsl:when test="@OSType='dynebolic'">Dynebolic</xsl:when>
++ <xsl:when test="@OSType='venenux'">Venenux</xsl:when>
+ </xsl:choose>
+ </xsl:attribute>
+ <xsl:apply-templates select="@*[name()!='OSType']" mode="v1.5"/>
+--- VirtualBox-4.1.18.orig/src/VBox/Main/xml/VirtualBox-settings-common.xsd 2012-07-25 15:04:37.856003691 -0300
++++ VirtualBox-4.1.18/src/VBox/Main/xml/VirtualBox-settings-common.xsd 2012-07-25 15:04:37.892668156 -0300
+@@ -137,75 +137,27 @@
+ <xsd:simpleType name="TGuestOSType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="Other"/>
+- <xsd:enumeration value="DOS"/>
+- <xsd:enumeration value="Netware"/>
+- <xsd:enumeration value="L4"/>
+- <xsd:enumeration value="Windows31"/>
+- <xsd:enumeration value="Windows95"/>
+- <xsd:enumeration value="Windows98"/>
+- <xsd:enumeration value="WindowsMe"/>
+- <xsd:enumeration value="WindowsNT4"/>
+- <xsd:enumeration value="Windows2000"/>
+- <xsd:enumeration value="WindowsXP"/>
+- <xsd:enumeration value="WindowsXP_64"/>
+- <xsd:enumeration value="Windows2003"/>
+- <xsd:enumeration value="Windows2003_64"/>
+- <xsd:enumeration value="WindowsVista"/>
+- <xsd:enumeration value="WindowsVista_64"/>
+- <xsd:enumeration value="Windows2008"/>
+- <xsd:enumeration value="Windows2008_64"/>
+- <xsd:enumeration value="Windows7"/>
+- <xsd:enumeration value="Windows7_64"/>
+- <xsd:enumeration value="Windows8"/>
+- <xsd:enumeration value="Windows8_64"/>
+- <xsd:enumeration value="WindowsNT"/>
+- <xsd:enumeration value="OS2Warp3"/>
+- <xsd:enumeration value="OS2Warp4"/>
+- <xsd:enumeration value="OS2Warp45"/>
+- <xsd:enumeration value="OS2eCS"/>
+- <xsd:enumeration value="OS2"/>
+- <xsd:enumeration value="Linux22"/>
+- <xsd:enumeration value="Linux24"/>
+- <xsd:enumeration value="Linux24_64"/>
+- <xsd:enumeration value="Linux26"/>
+- <xsd:enumeration value="Linux26_64"/>
+- <xsd:enumeration value="ArchLinux"/>
+- <xsd:enumeration value="ArchLinux_64"/>
+- <xsd:enumeration value="Debian"/>
+- <xsd:enumeration value="Debian_64"/>
+- <xsd:enumeration value="OpenSUSE"/>
+- <xsd:enumeration value="OpenSUSE_64"/>
+- <xsd:enumeration value="Fedora"/>
+- <xsd:enumeration value="Fedora_64"/>
+- <xsd:enumeration value="Gentoo"/>
+- <xsd:enumeration value="Gentoo_64"/>
+- <xsd:enumeration value="Mandriva"/>
+- <xsd:enumeration value="Mandriva_64"/>
+- <xsd:enumeration value="RedHat"/>
+- <xsd:enumeration value="RedHat_64"/>
+- <xsd:enumeration value="Turbolinux"/>
+- <xsd:enumeration value="Turbolinux_64"/>
+- <xsd:enumeration value="Ubuntu"/>
+- <xsd:enumeration value="Ubuntu_64"/>
+- <xsd:enumeration value="Xandros"/>
+- <xsd:enumeration value="Xandros_64"/>
+- <xsd:enumeration value="Oracle"/>
+- <xsd:enumeration value="Oracle_64"/>
+- <xsd:enumeration value="Linux"/>
+- <xsd:enumeration value="FreeBSD"/>
+- <xsd:enumeration value="FreeBSD_64"/>
+- <xsd:enumeration value="OpenBSD"/>
+- <xsd:enumeration value="OpenBSD_64"/>
+- <xsd:enumeration value="NetBSD"/>
+- <xsd:enumeration value="NetBSD_64"/>
+- <xsd:enumeration value="Solaris"/>
+- <xsd:enumeration value="Solaris_64"/>
+- <xsd:enumeration value="OpenSolaris"/>
+- <xsd:enumeration value="OpenSolaris_64"/>
+- <xsd:enumeration value="QNX"/>
+- <xsd:enumeration value="MacOS"/>
+- <xsd:enumeration value="MacOS_64"/>
+- <xsd:enumeration value="JRockitVE"/>
++ <xsd:enumeration value="GNU"/>
++ <xsd:enumeration value="GNU_64"/>
++ <xsd:enumeration value="GNUHurd"/>
++ <xsd:enumeration value="GNULinux"/>
++ <xsd:enumeration value="GNULinux_64"/>
++ <xsd:enumeration value="Parabola"/>
++ <xsd:enumeration value="Parabola_64"/>
++ <xsd:enumeration value="gNewSense"/>
++ <xsd:enumeration value="gNewSense_64"/>
++ <xsd:enumeration value="Blag"/>
++ <xsd:enumeration value="Blag_64"/>
++ <xsd:enumeration value="Dragora"/>
++ <xsd:enumeration value="Dragora_64"/>
++ <xsd:enumeration value="Ututo"/>
++ <xsd:enumeration value="Ututo_64"/>
++ <xsd:enumeration value="Musix"/>
++ <xsd:enumeration value="Musix_64"/>
++ <xsd:enumeration value="Trisquel"/>
++ <xsd:enumeration value="Trisquel_64"/>
++ <xsd:enumeration value="Dynebolic"/>
++ <xsd:enumeration value="Venenux"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+--- VirtualBox-4.1.18.orig/src/VBox/Frontends/VirtualBox/VirtualBox2.qrc 2012-07-25 15:40:56.733096866 -0300
++++ VirtualBox-4.1.18/src/VBox/Frontends/VirtualBox/VirtualBox2.qrc 2012-07-25 15:40:56.796426519 -0300
+@@ -1,75 +1,27 @@
+ <!DOCTYPE RCC><RCC version="1.0">
+ <qresource prefix="/">
+- <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>
+- <file alias="os_debian_64.png">images/os_debian_64.png</file>
+- <file alias="os_dos.png">images/os_dos.png</file>
+- <file alias="os_fedora.png">images/os_fedora.png</file>
+- <file alias="os_fedora_64.png">images/os_fedora_64.png</file>
+- <file alias="os_freebsd.png">images/os_freebsd.png</file>
+- <file alias="os_freebsd_64.png">images/os_freebsd_64.png</file>
+- <file alias="os_gentoo.png">images/os_gentoo.png</file>
+- <file alias="os_gentoo_64.png">images/os_gentoo_64.png</file>
+- <file alias="os_jrockitve.png">images/os_jrockitve.png</file>
+- <file alias="os_l4.png">images/os_l4.png</file>
+- <file alias="os_linux_other.png">images/os_linux_other.png</file>
+- <file alias="os_linux22.png">images/os_linux22.png</file>
+- <file alias="os_linux24.png">images/os_linux24.png</file>
+- <file alias="os_linux24_64.png">images/os_linux24_64.png</file>
+- <file alias="os_linux26.png">images/os_linux26.png</file>
+- <file alias="os_linux26_64.png">images/os_linux26_64.png</file>
+- <file alias="os_mandriva.png">images/os_mandriva.png</file>
+- <file alias="os_mandriva_64.png">images/os_mandriva_64.png</file>
+- <file alias="os_netbsd.png">images/os_netbsd.png</file>
+- <file alias="os_netbsd_64.png">images/os_netbsd_64.png</file>
+- <file alias="os_netware.png">images/os_netware.png</file>
+- <file alias="os_openbsd.png">images/os_openbsd.png</file>
+- <file alias="os_openbsd_64.png">images/os_openbsd_64.png</file>
+- <file alias="os_oraclesolaris.png">images/os_oraclesolaris.png</file>
+- <file alias="os_oraclesolaris_64.png">images/os_oraclesolaris_64.png</file>
+- <file alias="os_opensuse.png">images/os_opensuse.png</file>
+- <file alias="os_opensuse_64.png">images/os_opensuse_64.png</file>
+- <file alias="os_os2_other.png">images/os_os2_other.png</file>
+- <file alias="os_os2ecs.png">images/os_os2ecs.png</file>
+- <file alias="os_os2warp3.png">images/os_os2warp3.png</file>
+- <file alias="os_os2warp4.png">images/os_os2warp4.png</file>
+- <file alias="os_os2warp45.png">images/os_os2warp45.png</file>
++ <file alias="os_parabola.png">images/os_parabola.png</file>
++ <file alias="os_parabola_64.png">images/os_parabola_64.png</file>
++ <file alias="os_gnewsense.png">images/os_gnewsense.png</file>
++ <file alias="os_gnewsense_64.png">images/os_gnewsense_64.png</file>
++ <file alias="os_blag.png">images/os_blag.png</file>
++ <file alias="os_blag_64.png">images/os_blag_64.png</file>
++ <file alias="os_ututo.png">images/os_ututo.png</file>
++ <file alias="os_ututo_64.png">images/os_ututo_64.png</file>
++ <file alias="os_gnu.png">images/os_gnu.png</file>
++ <file alias="os_gnu_64.png">images/os_gnu_64.png</file>
++ <file alias="os_gnuhurd.png">images/os_gnuhurd.png</file>
++ <file alias="os_gnulinux.png">images/os_gnulinux.png</file>
++ <file alias="os_gnulinux_64.png">images/os_gnulinux_64.png</file>
++ <file alias="os_musix.png">images/os_musix.png</file>
++ <file alias="os_musix_64.png">images/os_musix_64.png</file>
++ <file alias="os_dragora.png">images/os_dragora.png</file>
++ <file alias="os_dragora_64.png">images/os_dragora_64.png</file>
+ <file alias="os_other.png">images/os_other.png</file>
+- <file alias="os_qnx.png">images/os_qnx.png</file>
+- <file alias="os_redhat.png">images/os_redhat.png</file>
+- <file alias="os_redhat_64.png">images/os_redhat_64.png</file>
+- <file alias="os_turbolinux.png">images/os_turbolinux.png</file>
+- <file alias="os_turbolinux_64.png">images/os_turbolinux_64.png</file>
+- <file alias="os_solaris.png">images/os_solaris.png</file>
+- <file alias="os_solaris_64.png">images/os_solaris_64.png</file>
+- <file alias="os_ubuntu.png">images/os_ubuntu.png</file>
+- <file alias="os_ubuntu_64.png">images/os_ubuntu_64.png</file>
+- <file alias="os_win_other.png">images/os_win_other.png</file>
+- <file alias="os_win2k.png">images/os_win2k.png</file>
+- <file alias="os_win2k3.png">images/os_win2k3.png</file>
+- <file alias="os_win2k3_64.png">images/os_win2k3_64.png</file>
+- <file alias="os_win2k8.png">images/os_win2k8.png</file>
+- <file alias="os_win2k8_64.png">images/os_win2k8_64.png</file>
+- <file alias="os_win31.png">images/os_win31.png</file>
+- <file alias="os_win7.png">images/os_win7.png</file>
+- <file alias="os_win7_64.png">images/os_win7_64.png</file>
+- <file alias="os_win8.png">images/os_win8.png</file>
+- <file alias="os_win8_64.png">images/os_win8_64.png</file>
+- <file alias="os_win95.png">images/os_win95.png</file>
+- <file alias="os_win98.png">images/os_win98.png</file>
+- <file alias="os_winme.png">images/os_winme.png</file>
+- <file alias="os_winnt4.png">images/os_winnt4.png</file>
+- <file alias="os_winvista.png">images/os_winvista.png</file>
+- <file alias="os_winvista_64.png">images/os_winvista_64.png</file>
+- <file alias="os_winxp.png">images/os_winxp.png</file>
+- <file alias="os_winxp_64.png">images/os_winxp_64.png</file>
+- <file alias="os_xandros.png">images/os_xandros.png</file>
+- <file alias="os_xandros_64.png">images/os_xandros_64.png</file>
+- <file alias="os_oracle.png">images/os_oracle.png</file>
+- <file alias="os_oracle_64.png">images/os_oracle_64.png</file>
+- <file alias="os_macosx.png">images/os_macosx.png</file>
+- <file alias="os_macosx_64.png">images/os_macosx_64.png</file>
++ <file alias="os_dynebolic.png">images/os_dynebolic.png</file>
++ <file alias="os_venenux.png">images/os_venenux.png</file>
++ <file alias="os_trisquel.png">images/os_trisquel.png</file>
++ <file alias="os_trisquel_64.png">images/os_trisquel_64.png</file>
+ <file alias="hd_16px.png">images/hd_16px.png</file>
+ <file alias="hd_disabled_16px.png">images/hd_disabled_16px.png</file>
+ <file alias="hd_32px.png">images/hd_32px.png</file>
+--- VirtualBox-4.1.18.orig/src/VBox/Main/src-all/Global.cpp 2012-06-20 10:17:34.000000000 -0300
++++ VirtualBox-4.1.18/src/VBox/Main/src-all/Global.cpp 2012-07-25 19:32:44.482993976 -0300
+@@ -35,284 +35,90 @@
+ VBOXOSTYPE_Unknown, VBOXOSHINT_NONE,
+ 64, 4, 2 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows31, "Windows 3.1",
+- VBOXOSTYPE_Win31, VBOXOSHINT_NONE,
+- 32, 4, 1 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_SB16 },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows95, "Windows 95",
+- VBOXOSTYPE_Win95, VBOXOSHINT_NONE,
+- 64, 4, 2 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows98, "Windows 98",
+- VBOXOSTYPE_Win98, VBOXOSHINT_NONE,
+- 64, 4, 2 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_WindowsMe, "Windows Me",
+- VBOXOSTYPE_WinMe, VBOXOSHINT_NONE,
+- 64, 4, 4 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_WindowsNT4, "Windows NT 4",
+- VBOXOSTYPE_WinNT4, VBOXOSHINT_NONE,
+- 128, 16, 2 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows2000, "Windows 2000",
+- VBOXOSTYPE_Win2k, VBOXOSHINT_USBTABLET,
+- 168, 16, 4 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_WindowsXP, "Windows XP",
+- VBOXOSTYPE_WinXP, VBOXOSHINT_USBTABLET,
+- 192, 16, 10 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_WindowsXP_64, "Windows XP (64 bit)",
+- VBOXOSTYPE_WinXP_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_USBTABLET,
+- 192, 16, 10 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows2003, "Windows 2003",
+- VBOXOSTYPE_Win2k3, VBOXOSHINT_USBTABLET,
+- 256, 16, 20 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows2003_64, "Windows 2003 (64 bit)",
+- VBOXOSTYPE_Win2k3_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_USBTABLET,
+- 256, 16, 20 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_HDA },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_WindowsVista, "Windows Vista",
+- VBOXOSTYPE_WinVista, VBOXOSHINT_USBTABLET,
+- 512, 16, 25 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_HDA },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_WindowsVista_64, "Windows Vista (64 bit)",
+- VBOXOSTYPE_WinVista_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_USBTABLET,
+- 512, 16, 25 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_HDA },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows2008, "Windows 2008",
+- VBOXOSTYPE_Win2k8, VBOXOSHINT_USBTABLET,
+- 512, 16, 25 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_HDA },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows2008_64, "Windows 2008 (64 bit)",
+- VBOXOSTYPE_Win2k8_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_USBTABLET,
+- 512, 16, 25 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_HDA },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows7, "Windows 7",
+- VBOXOSTYPE_Win7, VBOXOSHINT_USBTABLET,
+- 512, 16, 25 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_HDA },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows7_64, "Windows 7 (64 bit)",
+- VBOXOSTYPE_Win7_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_USBTABLET,
+- 512, 16, 25 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_HDA },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows8, "Windows 8",
+- VBOXOSTYPE_Win8, VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_USBTABLET | VBOXOSHINT_PAE,
+- 1024,128, 25 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_HDA },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows8_64, "Windows 8 (64 bit)",
+- VBOXOSTYPE_Win8_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_USBTABLET,
+- 1536,128, 25 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_HDA },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_WindowsNT, "Other Windows",
+- VBOXOSTYPE_WinNT, VBOXOSHINT_NONE,
+- 512, 16, 20 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Linux22, "Linux 2.2",
+- VBOXOSTYPE_Linux22, VBOXOSHINT_RTCUTC,
+- 64, 4, 2 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Linux24, "Linux 2.4",
+- VBOXOSTYPE_Linux24, VBOXOSHINT_RTCUTC,
+- 128, 4, 4 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Linux24_64, "Linux 2.4 (64 bit)",
+- VBOXOSTYPE_Linux24_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC,
+- 128, 4, 4 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
++ { "GNU", "GNU", SchemaDefs_OSTypeId_GNU, "GNU",
++ VBOXOSTYPE_GNU, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ 256, 4, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
++ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
++ { "GNU", "GNU", SchemaDefs_OSTypeId_GNU_64, "GNU (64 bit)",
++ VBOXOSTYPE_GNU_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 },
++ { "GNU-Hurd", "GNU-Hurd", SchemaDefs_OSTypeId_GNUHurd, "GNU-Hurd",
++ VBOXOSTYPE_GNUHurd, 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", SchemaDefs_OSTypeId_Linux26, "Linux 2.6",
+- VBOXOSTYPE_Linux26, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_GNULinux, "GNU/Linux",
++ VBOXOSTYPE_GNULinux, 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", SchemaDefs_OSTypeId_Linux26_64, "Linux 2.6 (64 bit)",
+- VBOXOSTYPE_Linux26_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_GNULinux_64, "GNU/Linux (64 bit)",
++ VBOXOSTYPE_GNULinux_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", SchemaDefs_OSTypeId_ArchLinux, "Arch Linux",
+- VBOXOSTYPE_ArchLinux, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Parabola, "Parabola GNU/Linux-libre",
++ VBOXOSTYPE_Parabola, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
+ 256, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_ArchLinux_64, "Arch Linux (64 bit)",
+- VBOXOSTYPE_ArchLinux_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Parabola_64, "Parabola GNU/Linux-libre (64 bit)",
++ VBOXOSTYPE_Parabola_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
+ 256, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Debian, "Debian",
+- VBOXOSTYPE_Debian, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_gNewSense, "gNewSense",
++ VBOXOSTYPE_gNewSense, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
+ 384, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Debian_64, "Debian (64 bit)",
+- VBOXOSTYPE_Debian_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_gNewSense_64, "gNewSense (64 bit)",
++ VBOXOSTYPE_gNewSense_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
+ 384, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97},
+- { "Linux", "Linux", SchemaDefs_OSTypeId_OpenSUSE, "openSUSE",
+- VBOXOSTYPE_OpenSUSE, 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", SchemaDefs_OSTypeId_OpenSUSE_64, "openSUSE (64 bit)",
+- VBOXOSTYPE_OpenSUSE_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", SchemaDefs_OSTypeId_Fedora, "Fedora",
+- VBOXOSTYPE_FedoraCore, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Blag, "Blag Linux and GNU",
++ VBOXOSTYPE_Blag, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
+ 768, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Fedora_64, "Fedora (64 bit)",
+- VBOXOSTYPE_FedoraCore_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Blag_64, "Blag Linux and GNU (64 bit)",
++ VBOXOSTYPE_Blag_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
+ 768, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Gentoo, "Gentoo",
+- VBOXOSTYPE_Gentoo, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Dragora, "Dragora",
++ VBOXOSTYPE_Dragora, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
+ 256, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Gentoo_64, "Gentoo (64 bit)",
+- VBOXOSTYPE_Gentoo_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Dragora_64, "Dragora (64 bit)",
++ VBOXOSTYPE_Dragora_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
+ 256, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Mandriva, "Mandriva",
+- VBOXOSTYPE_Mandriva, 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", SchemaDefs_OSTypeId_Mandriva_64, "Mandriva (64 bit)",
+- VBOXOSTYPE_Mandriva_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", SchemaDefs_OSTypeId_RedHat, "Red Hat",
+- VBOXOSTYPE_RedHat, VBOXOSHINT_RTCUTC | VBOXOSHINT_PAE,
+- 512, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Ututo, "Ututo XS",
++ VBOXOSTYPE_Ututo, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ 256, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_RedHat_64, "Red Hat (64 bit)",
+- VBOXOSTYPE_RedHat_x64, VBOXOSHINT_64BIT | VBOXOSHINT_PAE | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC,
+- 512, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Ututo_64, "Ututo XS (64 bit)",
++ VBOXOSTYPE_Ututo_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ 256, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Turbolinux, "Turbolinux",
+- VBOXOSTYPE_Turbolinux, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Musix, "Musix",
++ VBOXOSTYPE_Musix, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
+ 384, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Turbolinux, "Turbolinux (64 bit)",
+- VBOXOSTYPE_Turbolinux_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Musix_64, "Musix (64 bit)",
++ VBOXOSTYPE_Musix_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
+ 384, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Ubuntu, "Ubuntu",
+- VBOXOSTYPE_Ubuntu, VBOXOSHINT_RTCUTC | VBOXOSHINT_PAE | VBOXOSHINT_USBTABLET,
++ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97},
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Trisquel, "Trisquel",
++ VBOXOSTYPE_Trisquel, VBOXOSHINT_RTCUTC | VBOXOSHINT_PAE | VBOXOSHINT_USBTABLET,
+ 512, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Ubuntu_64, "Ubuntu (64 bit)",
+- VBOXOSTYPE_Ubuntu_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Trisquel_64, "Trisquel (64 bit)",
++ VBOXOSTYPE_Trisquel_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", SchemaDefs_OSTypeId_Xandros, "Xandros",
+- VBOXOSTYPE_Xandros, VBOXOSHINT_RTCUTC,
+- 256, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Xandros_64, "Xandros (64 bit)",
+- VBOXOSTYPE_Xandros_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC,
+- 256, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Oracle, "Oracle",
+- VBOXOSTYPE_Oracle, VBOXOSHINT_RTCUTC | VBOXOSHINT_PAE,
+- 512, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Dynebolic, "Dyne:bolic",
++ VBOXOSTYPE_Dynebolic, 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", SchemaDefs_OSTypeId_Oracle_64, "Oracle (64 bit)",
+- VBOXOSTYPE_Oracle_x64, VBOXOSHINT_64BIT | VBOXOSHINT_PAE | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC,
+- 512, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Venenux, "Venenux",
++ VBOXOSTYPE_Venenux, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ 384, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Linux, "Other Linux",
+- VBOXOSTYPE_Linux, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
+- 256, 12, 8 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Solaris", "Solaris", SchemaDefs_OSTypeId_Solaris, "Oracle Solaris 10 5/09 and earlier",
+- VBOXOSTYPE_Solaris, VBOXOSHINT_NONE,
+- 768, 12, 16 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Solaris", "Solaris", SchemaDefs_OSTypeId_Solaris_64, "Oracle Solaris 10 5/09 and earlier (64 bit)",
+- VBOXOSTYPE_Solaris_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC,
+- 1536, 12, 16 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Solaris", "Solaris", SchemaDefs_OSTypeId_OpenSolaris, "Oracle Solaris 10 10/09 and later",
+- VBOXOSTYPE_OpenSolaris, VBOXOSHINT_USBTABLET,
+- 768, 12, 16 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_IntelAhci, StorageBus_SATA,
+- StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Solaris", "Solaris", SchemaDefs_OSTypeId_OpenSolaris_64, "Oracle Solaris 10 10/09 and later (64 bit)",
+- VBOXOSTYPE_OpenSolaris_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_USBTABLET,
+- 1536, 12, 16 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_IntelAhci, StorageBus_SATA,
+- StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "BSD", "BSD", SchemaDefs_OSTypeId_FreeBSD, "FreeBSD",
+- VBOXOSTYPE_FreeBSD, VBOXOSHINT_NONE,
+- 128, 4, 2 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "BSD", "BSD", SchemaDefs_OSTypeId_FreeBSD_64, "FreeBSD (64 bit)",
+- VBOXOSTYPE_FreeBSD_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC,
+- 128, 4, 2 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "BSD", "BSD", SchemaDefs_OSTypeId_OpenBSD, "OpenBSD",
+- VBOXOSTYPE_OpenBSD, VBOXOSHINT_HWVIRTEX,
+- 64, 4, 2 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "BSD", "BSD", SchemaDefs_OSTypeId_OpenBSD_64, "OpenBSD (64 bit)",
+- VBOXOSTYPE_OpenBSD_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC,
+- 64, 4, 2 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "BSD", "BSD", SchemaDefs_OSTypeId_NetBSD, "NetBSD",
+- VBOXOSTYPE_NetBSD, VBOXOSHINT_NONE,
+- 64, 4, 2 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "BSD", "BSD", SchemaDefs_OSTypeId_NetBSD_64, "NetBSD (64 bit)",
+- VBOXOSTYPE_NetBSD_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC,
+- 64, 4, 2 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "OS2", "IBM OS/2", SchemaDefs_OSTypeId_OS2Warp3, "OS/2 Warp 3",
+- VBOXOSTYPE_OS2Warp3, VBOXOSHINT_HWVIRTEX,
+- 48, 4, 1 * _1G64, NetworkAdapterType_Am79C973, 1, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "OS2", "IBM OS/2", SchemaDefs_OSTypeId_OS2Warp4, "OS/2 Warp 4",
+- VBOXOSTYPE_OS2Warp4, VBOXOSHINT_HWVIRTEX,
+- 64, 4, 2 * _1G64, NetworkAdapterType_Am79C973, 1, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "OS2", "IBM OS/2", SchemaDefs_OSTypeId_OS2Warp45, "OS/2 Warp 4.5",
+- VBOXOSTYPE_OS2Warp45, VBOXOSHINT_HWVIRTEX,
+- 96, 4, 2 * _1G64, NetworkAdapterType_Am79C973, 1, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "OS2", "IBM OS/2", SchemaDefs_OSTypeId_OS2eCS, "eComStation",
+- VBOXOSTYPE_ECS, VBOXOSHINT_HWVIRTEX,
+- 96, 4, 2 * _1G64, NetworkAdapterType_Am79C973, 1, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "OS2", "IBM OS/2", SchemaDefs_OSTypeId_OS2, "Other OS/2",
+- VBOXOSTYPE_OS2, VBOXOSHINT_HWVIRTEX,
+- 96, 4, 2 * _1G64, NetworkAdapterType_Am79C973, 1, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "MacOS", "Mac OS X", SchemaDefs_OSTypeId_MacOS, "Mac OS X Server",
+- VBOXOSTYPE_MacOS, VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_EFI | VBOXOSHINT_PAE | VBOXOSHINT_USBHID | VBOXOSHINT_HPET | VBOXOSHINT_USBTABLET,
+- 1024, 4, 20 * _1G64, NetworkAdapterType_I82543GC, 0,
+- StorageControllerType_ICH6, StorageBus_IDE, StorageControllerType_IntelAhci, StorageBus_SATA,
+- ChipsetType_ICH9, AudioControllerType_HDA },
+- { "MacOS", "Mac OS X", SchemaDefs_OSTypeId_MacOS_64, "Mac OS X Server (64 bit)",
+- VBOXOSTYPE_MacOS_x64, VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_EFI | VBOXOSHINT_PAE | VBOXOSHINT_64BIT | VBOXOSHINT_USBHID | VBOXOSHINT_HPET | VBOXOSHINT_USBTABLET,
+- 1024, 4, 20 * _1G64, NetworkAdapterType_I82543GC, 0,
+- StorageControllerType_ICH6, StorageBus_IDE, StorageControllerType_IntelAhci, StorageBus_SATA,
+- ChipsetType_ICH9, AudioControllerType_HDA },
+- { "Other", "Other", SchemaDefs_OSTypeId_DOS, "DOS",
+- VBOXOSTYPE_DOS, VBOXOSHINT_NONE,
+- 32, 4, 500 * _1M, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_SB16 },
+- { "Other", "Other", SchemaDefs_OSTypeId_Netware, "Netware",
+- VBOXOSTYPE_Netware, VBOXOSHINT_HWVIRTEX,
+- 512, 4, 4 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Other", "Other", SchemaDefs_OSTypeId_L4, "L4",
+- VBOXOSTYPE_L4, VBOXOSHINT_NONE,
+- 64, 4, 2 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Other", "Other", SchemaDefs_OSTypeId_QNX, "QNX",
+- VBOXOSTYPE_QNX, VBOXOSHINT_HWVIRTEX,
+- 512, 4, 4 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Other", "Other", SchemaDefs_OSTypeId_JRockitVE, "JRockitVE",
+- VBOXOSTYPE_JRockitVE, VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_PAE,
+- 1024, 4, 8 * _1G64, NetworkAdapterType_I82545EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_BusLogic, StorageBus_SCSI, ChipsetType_PIIX3, AudioControllerType_AC97 },
+ };
+
+ /**
+--- VirtualBox-4.1.18.orig/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp 2012-07-25 21:44:01.290876720 -0300
++++ VirtualBox-4.1.18/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp 2012-07-25 22:00:57.819380802 -0300
+@@ -4875,75 +4875,27 @@
+ static const char *kOSTypeIcons [][2] =
+ {
+ {"Other", ":/os_other.png"},
+- {"DOS", ":/os_dos.png"},
+- {"Netware", ":/os_netware.png"},
+- {"L4", ":/os_l4.png"},
+- {"Windows31", ":/os_win31.png"},
+- {"Windows95", ":/os_win95.png"},
+- {"Windows98", ":/os_win98.png"},
+- {"WindowsMe", ":/os_winme.png"},
+- {"WindowsNT4", ":/os_winnt4.png"},
+- {"Windows2000", ":/os_win2k.png"},
+- {"WindowsXP", ":/os_winxp.png"},
+- {"WindowsXP_64", ":/os_winxp_64.png"},
+- {"Windows2003", ":/os_win2k3.png"},
+- {"Windows2003_64", ":/os_win2k3_64.png"},
+- {"WindowsVista", ":/os_winvista.png"},
+- {"WindowsVista_64", ":/os_winvista_64.png"},
+- {"Windows2008", ":/os_win2k8.png"},
+- {"Windows2008_64", ":/os_win2k8_64.png"},
+- {"Windows7", ":/os_win7.png"},
+- {"Windows7_64", ":/os_win7_64.png"},
+- {"Windows8", ":/os_win8.png"},
+- {"Windows8_64", ":/os_win8_64.png"},
+- {"WindowsNT", ":/os_win_other.png"},
+- {"OS2Warp3", ":/os_os2warp3.png"},
+- {"OS2Warp4", ":/os_os2warp4.png"},
+- {"OS2Warp45", ":/os_os2warp45.png"},
+- {"OS2eCS", ":/os_os2ecs.png"},
+- {"OS2", ":/os_os2_other.png"},
+- {"Linux22", ":/os_linux22.png"},
+- {"Linux24", ":/os_linux24.png"},
+- {"Linux24_64", ":/os_linux24_64.png"},
+- {"Linux26", ":/os_linux26.png"},
+- {"Linux26_64", ":/os_linux26_64.png"},
+- {"ArchLinux", ":/os_archlinux.png"},
+- {"ArchLinux_64", ":/os_archlinux_64.png"},
+- {"Debian", ":/os_debian.png"},
+- {"Debian_64", ":/os_debian_64.png"},
+- {"OpenSUSE", ":/os_opensuse.png"},
+- {"OpenSUSE_64", ":/os_opensuse_64.png"},
+- {"Fedora", ":/os_fedora.png"},
+- {"Fedora_64", ":/os_fedora_64.png"},
+- {"Gentoo", ":/os_gentoo.png"},
+- {"Gentoo_64", ":/os_gentoo_64.png"},
+- {"Mandriva", ":/os_mandriva.png"},
+- {"Mandriva_64", ":/os_mandriva_64.png"},
+- {"RedHat", ":/os_redhat.png"},
+- {"RedHat_64", ":/os_redhat_64.png"},
+- {"Turbolinux", ":/os_turbolinux.png"},
+- {"Turbolinux_64", ":/os_turbolinux_64.png"},
+- {"Ubuntu", ":/os_ubuntu.png"},
+- {"Ubuntu_64", ":/os_ubuntu_64.png"},
+- {"Xandros", ":/os_xandros.png"},
+- {"Xandros_64", ":/os_xandros_64.png"},
+- {"Oracle", ":/os_oracle.png"},
+- {"Oracle_64", ":/os_oracle_64.png"},
+- {"Linux", ":/os_linux_other.png"},
+- {"FreeBSD", ":/os_freebsd.png"},
+- {"FreeBSD_64", ":/os_freebsd_64.png"},
+- {"OpenBSD", ":/os_openbsd.png"},
+- {"OpenBSD_64", ":/os_openbsd_64.png"},
+- {"NetBSD", ":/os_netbsd.png"},
+- {"NetBSD_64", ":/os_netbsd_64.png"},
+- {"Solaris", ":/os_solaris.png"},
+- {"Solaris_64", ":/os_solaris_64.png"},
+- {"OpenSolaris", ":/os_oraclesolaris.png"},
+- {"OpenSolaris_64", ":/os_oraclesolaris_64.png"},
+- {"QNX", ":/os_qnx.png"},
+- {"MacOS", ":/os_macosx.png"},
+- {"MacOS_64", ":/os_macosx_64.png"},
+- {"JRockitVE", ":/os_jrockitve.png"},
++ {"GNU", ":/os_gnu.png"},
++ {"GNU_64", ":/os_gnu_64.png"},
++ {"GNUHurd", ":/os_gnuhurd.png"},
++ {"GNULinux", ":/os_gnulinux.png"},
++ {"GNULinux_64", ":/os_gnulinux_64.png"},
++ {"Parabola", ":/os_parabola.png"},
++ {"Parabola_64", ":/os_parabola_64.png"},
++ {"gNewSense", ":/os_gnewsense.png"},
++ {"gNewSense_64", ":/os_gnewsense_64.png"},
++ {"Blag", ":/os_blag.png"},
++ {"Blag_64", ":/os_blag_64.png"},
++ {"Dragora", ":/os_dragora.png"},
++ {"Dragora_64", ":/os_dragora_64.png"},
++ {"Ututo", ":/os_ututo.png"},
++ {"Ututo_64", ":/os_ututo_64.png"},
++ {"Musix", ":/os_musix.png"},
++ {"Musix_64", ":/os_musix_64.png"},
++ {"Trisquel", ":/os_trisquel.png"},
++ {"Trisquel_64", ":/os_trisquel_64.png"},
++ {"Dynebolic", ":/os_dynebolic.png"},
++ {"Venenux", ":/os_venenux.png"},
+ };
+ for (uint n = 0; n < SIZEOF_ARRAY (kOSTypeIcons); ++ n)
+ {
+--- VirtualBox-4.1.18.orig/src/VBox/Frontends/VirtualBox/src/widgets/VBoxOSTypeSelectorWidget.cpp.orig 2012-06-20 10:16:38.000000000 -0300
++++ VirtualBox-4.1.18/src/VBox/Frontends/VirtualBox/src/widgets/VBoxOSTypeSelectorWidget.cpp 2012-07-25 22:07:51.232436783 -0300
+@@ -192,17 +192,10 @@
+ if (typeIndex != -1)
+ mCbType->setCurrentIndex (typeIndex);
+ }
+- /* Or select WinXP item for Windows family as default */
+- else if (familyId == "Windows")
++ /* Or select Parabola GNU/Linux-libre item for GNU/Linux family as default */
++ else if (familyId == "GNU/Linux")
+ {
+- int xpIndex = mCbType->findData ("WindowsXP", RoleTypeID);
+- if (xpIndex != -1)
+- mCbType->setCurrentIndex (xpIndex);
+- }
+- /* Or select Ubuntu item for Linux family as default */
+- else if (familyId == "Linux")
+- {
+- int ubIndex = mCbType->findData ("Ubuntu", RoleTypeID);
++ int ubIndex = mCbType->findData ("Parabola", RoleTypeID);
+ if (ubIndex != -1)
+ mCbType->setCurrentIndex (ubIndex);
+ }
+--- VirtualBox-4.1.18.orig/include/VBox/ostypes.h 2012-06-20 10:07:51.000000000 -0300
++++ VirtualBox-4.1.18/include/VBox/ostypes.h 2012-07-25 23:20:57.322757456 -0300
+@@ -43,77 +43,27 @@
+ typedef enum VBOXOSTYPE
+ {
+ VBOXOSTYPE_Unknown = 0,
+- VBOXOSTYPE_DOS = 0x10000,
+- VBOXOSTYPE_Win31 = 0x15000,
+- VBOXOSTYPE_Win9x = 0x20000,
+- VBOXOSTYPE_Win95 = 0x21000,
+- VBOXOSTYPE_Win98 = 0x22000,
+- VBOXOSTYPE_WinMe = 0x23000,
+- VBOXOSTYPE_WinNT = 0x30000,
+- VBOXOSTYPE_WinNT4 = 0x31000,
+- VBOXOSTYPE_Win2k = 0x32000,
+- VBOXOSTYPE_WinXP = 0x33000,
+- VBOXOSTYPE_WinXP_x64 = 0x33100,
+- VBOXOSTYPE_Win2k3 = 0x34000,
+- VBOXOSTYPE_Win2k3_x64 = 0x34100,
+- VBOXOSTYPE_WinVista = 0x35000,
+- VBOXOSTYPE_WinVista_x64 = 0x35100,
+- VBOXOSTYPE_Win2k8 = 0x36000,
+- VBOXOSTYPE_Win2k8_x64 = 0x36100,
+- VBOXOSTYPE_Win7 = 0x37000,
+- VBOXOSTYPE_Win7_x64 = 0x37100,
+- VBOXOSTYPE_Win8 = 0x38000,
+- VBOXOSTYPE_Win8_x64 = 0x38100,
+- VBOXOSTYPE_OS2 = 0x40000,
+- VBOXOSTYPE_OS2Warp3 = 0x41000,
+- VBOXOSTYPE_OS2Warp4 = 0x42000,
+- VBOXOSTYPE_OS2Warp45 = 0x43000,
+- VBOXOSTYPE_ECS = 0x44000,
+- VBOXOSTYPE_Linux = 0x50000,
+- VBOXOSTYPE_Linux_x64 = 0x50100,
+- VBOXOSTYPE_Linux22 = 0x51000,
+- VBOXOSTYPE_Linux24 = 0x52000,
+- VBOXOSTYPE_Linux24_x64 = 0x52100,
+- VBOXOSTYPE_Linux26 = 0x53000,
+- VBOXOSTYPE_Linux26_x64 = 0x53100,
+- VBOXOSTYPE_ArchLinux = 0x54000,
+- VBOXOSTYPE_ArchLinux_x64 = 0x54100,
+- VBOXOSTYPE_Debian = 0x55000,
+- VBOXOSTYPE_Debian_x64 = 0x55100,
+- VBOXOSTYPE_OpenSUSE = 0x56000,
+- VBOXOSTYPE_OpenSUSE_x64 = 0x56100,
+- VBOXOSTYPE_FedoraCore = 0x57000,
+- VBOXOSTYPE_FedoraCore_x64 = 0x57100,
+- VBOXOSTYPE_Gentoo = 0x58000,
+- VBOXOSTYPE_Gentoo_x64 = 0x58100,
+- VBOXOSTYPE_Mandriva = 0x59000,
+- VBOXOSTYPE_Mandriva_x64 = 0x59100,
+- VBOXOSTYPE_RedHat = 0x5A000,
+- VBOXOSTYPE_RedHat_x64 = 0x5A100,
+- VBOXOSTYPE_Turbolinux = 0x5B000,
+- VBOXOSTYPE_Turbolinux_x64 = 0x5B100,
+- VBOXOSTYPE_Ubuntu = 0x5C000,
+- VBOXOSTYPE_Ubuntu_x64 = 0x5C100,
+- VBOXOSTYPE_Xandros = 0x5D000,
+- VBOXOSTYPE_Xandros_x64 = 0x5D100,
+- VBOXOSTYPE_Oracle = 0x5E000,
+- VBOXOSTYPE_Oracle_x64 = 0x5E100,
+- VBOXOSTYPE_FreeBSD = 0x60000,
+- VBOXOSTYPE_FreeBSD_x64 = 0x60100,
+- VBOXOSTYPE_OpenBSD = 0x61000,
+- VBOXOSTYPE_OpenBSD_x64 = 0x61100,
+- VBOXOSTYPE_NetBSD = 0x62000,
+- VBOXOSTYPE_NetBSD_x64 = 0x62100,
+- VBOXOSTYPE_Netware = 0x70000,
+- VBOXOSTYPE_Solaris = 0x80000,
+- VBOXOSTYPE_Solaris_x64 = 0x80100,
+- VBOXOSTYPE_OpenSolaris = 0x81000,
+- VBOXOSTYPE_OpenSolaris_x64 = 0x81100,
+- VBOXOSTYPE_L4 = 0x90000,
+- VBOXOSTYPE_QNX = 0xA0000,
+- VBOXOSTYPE_MacOS = 0xB0000,
+- VBOXOSTYPE_MacOS_x64 = 0xB0100,
+- VBOXOSTYPE_JRockitVE = 0xC0000,
++ VBOXOSTYPE_GNU = 0x10000,
++ VBOXOSTYPE_GNU_x64 = 0x10100,
++ VBOXOSTYPE_GNUHurd = 0x20000,
++ VBOXOSTYPE_GNULinux = 0x30000,
++ VBOXOSTYPE_GNULinux_x64 = 0x30100,
++ VBOXOSTYPE_Parabola = 0x31000,
++ VBOXOSTYPE_Parabola_x64 = 0x31100,
++ VBOXOSTYPE_gNewSense = 0x32000,
++ VBOXOSTYPE_gNewSense_x64 = 0x32100,
++ VBOXOSTYPE_Blag = 0x33000,
++ VBOXOSTYPE_Blag_x64 = 0x33100,
++ VBOXOSTYPE_Dragora = 0x34000,
++ VBOXOSTYPE_Dragora_x64 = 0x34100,
++ VBOXOSTYPE_Ututo = 0x35000,
++ VBOXOSTYPE_Ututo_x64 = 0x35100,
++ VBOXOSTYPE_Musix = 0x36000,
++ VBOXOSTYPE_Musix_x64 = 0x36100,
++ VBOXOSTYPE_Trisquel = 0x37000,
++ VBOXOSTYPE_Trisquel_x64 = 0x37100,
++ VBOXOSTYPE_Dynebolic = 0x38000,
++ VBOXOSTYPE_Venenux = 0x39000,
+ /** The bit number which indicates 64-bit or 32-bit. */
+ #define VBOXOSTYPE_x64_BIT 8
+ /** The mask which indicates 64-bit. */
+@@ -129,16 +79,11 @@
+ typedef enum VBOXOSFAMILY
+ {
+ VBOXOSFAMILY_Unknown = 0,
+- VBOXOSFAMILY_Windows32 = 1,
+- VBOXOSFAMILY_Windows64 = 2,
+- VBOXOSFAMILY_Linux32 = 3,
+- VBOXOSFAMILY_Linux64 = 4,
+- VBOXOSFAMILY_FreeBSD32 = 5,
+- VBOXOSFAMILY_FreeBSD64 = 6,
+- VBOXOSFAMILY_Solaris32 = 7,
+- VBOXOSFAMILY_Solaris64 = 8,
+- VBOXOSFAMILY_MacOSX32 = 9,
+- VBOXOSFAMILY_MacOSX64 = 10,
++ VBOXOSFAMILY_GNU32 = 1,
++ VBOXOSFAMILY_GNU64 = 2,
++ VBOXOSFAMILY_GNUHurd = 3,
++ VBOXOSFAMILY_GNULinux32 = 4,
++ VBOXOSFAMILY_GNULinux64 = 5,
+ /** The usual 32-bit hack. */
+ VBOXOSFAMILY_32BIT_HACK = 0x7fffffff
+ } VBOXOSFAMILY;
+--- VirtualBox-4.1.18.orig/src/VBox/Main/src-server/ApplianceImpl.cpp 2012-06-20 10:17:35.000000000 -0300
++++ VirtualBox-4.1.18/src/VBox/Main/src-server/ApplianceImpl.cpp 2012-07-26 01:28:50.033551279 -0300
+@@ -49,94 +49,33 @@
+ g_osTypes[] =
+ {
+ { ovf::CIMOSType_CIMOS_Unknown, SchemaDefs_OSTypeId_Other },
+- { ovf::CIMOSType_CIMOS_OS2, SchemaDefs_OSTypeId_OS2 },
+- { ovf::CIMOSType_CIMOS_OS2, SchemaDefs_OSTypeId_OS2Warp3 },
+- { ovf::CIMOSType_CIMOS_OS2, SchemaDefs_OSTypeId_OS2Warp4 },
+- { ovf::CIMOSType_CIMOS_OS2, SchemaDefs_OSTypeId_OS2Warp45 },
+- { ovf::CIMOSType_CIMOS_MSDOS, SchemaDefs_OSTypeId_DOS },
+- { ovf::CIMOSType_CIMOS_WIN3x, SchemaDefs_OSTypeId_Windows31 },
+- { ovf::CIMOSType_CIMOS_WIN95, SchemaDefs_OSTypeId_Windows95 },
+- { ovf::CIMOSType_CIMOS_WIN98, SchemaDefs_OSTypeId_Windows98 },
+- { ovf::CIMOSType_CIMOS_WINNT, SchemaDefs_OSTypeId_WindowsNT },
+- { ovf::CIMOSType_CIMOS_WINNT, SchemaDefs_OSTypeId_WindowsNT4 },
+- { ovf::CIMOSType_CIMOS_NetWare, SchemaDefs_OSTypeId_Netware },
+- { ovf::CIMOSType_CIMOS_NovellOES, SchemaDefs_OSTypeId_Netware },
+- { ovf::CIMOSType_CIMOS_Solaris, SchemaDefs_OSTypeId_Solaris },
+- { ovf::CIMOSType_CIMOS_SunOS, SchemaDefs_OSTypeId_Solaris },
+- { ovf::CIMOSType_CIMOS_FreeBSD, SchemaDefs_OSTypeId_FreeBSD },
+- { ovf::CIMOSType_CIMOS_NetBSD, SchemaDefs_OSTypeId_NetBSD },
+- { ovf::CIMOSType_CIMOS_QNX, SchemaDefs_OSTypeId_QNX },
+- { ovf::CIMOSType_CIMOS_Windows2000, SchemaDefs_OSTypeId_Windows2000 },
+- { ovf::CIMOSType_CIMOS_WindowsMe, SchemaDefs_OSTypeId_WindowsMe },
+- { ovf::CIMOSType_CIMOS_OpenBSD, SchemaDefs_OSTypeId_OpenBSD },
+- { ovf::CIMOSType_CIMOS_WindowsXP, SchemaDefs_OSTypeId_WindowsXP },
+- { ovf::CIMOSType_CIMOS_WindowsXPEmbedded, SchemaDefs_OSTypeId_WindowsXP },
+- { ovf::CIMOSType_CIMOS_WindowsEmbeddedforPointofService, SchemaDefs_OSTypeId_WindowsXP },
+- { ovf::CIMOSType_CIMOS_MicrosoftWindowsServer2003, SchemaDefs_OSTypeId_Windows2003 },
+- { ovf::CIMOSType_CIMOS_MicrosoftWindowsServer2003_64, SchemaDefs_OSTypeId_Windows2003_64 },
+- { ovf::CIMOSType_CIMOS_WindowsXP_64, SchemaDefs_OSTypeId_WindowsXP_64 },
+- { ovf::CIMOSType_CIMOS_WindowsVista, SchemaDefs_OSTypeId_WindowsVista },
+- { ovf::CIMOSType_CIMOS_WindowsVista_64, SchemaDefs_OSTypeId_WindowsVista_64 },
+- { ovf::CIMOSType_CIMOS_MicrosoftWindowsServer2008, SchemaDefs_OSTypeId_Windows2008 },
+- { ovf::CIMOSType_CIMOS_MicrosoftWindowsServer2008_64, SchemaDefs_OSTypeId_Windows2008_64 },
+- { ovf::CIMOSType_CIMOS_FreeBSD_64, SchemaDefs_OSTypeId_FreeBSD_64 },
+- { ovf::CIMOSType_CIMOS_MACOS, SchemaDefs_OSTypeId_MacOS },
+- { ovf::CIMOSType_CIMOS_MACOS, SchemaDefs_OSTypeId_MacOS_64 }, // there is no CIM 64-bit type for this
+-
+- // Linuxes
+- { ovf::CIMOSType_CIMOS_RedHatEnterpriseLinux, SchemaDefs_OSTypeId_RedHat },
+- { ovf::CIMOSType_CIMOS_RedHatEnterpriseLinux_64, SchemaDefs_OSTypeId_RedHat_64 },
+- { ovf::CIMOSType_CIMOS_Solaris_64, SchemaDefs_OSTypeId_Solaris_64 },
+- { ovf::CIMOSType_CIMOS_SUSE, SchemaDefs_OSTypeId_OpenSUSE },
+- { ovf::CIMOSType_CIMOS_SLES, SchemaDefs_OSTypeId_OpenSUSE },
+- { ovf::CIMOSType_CIMOS_NovellLinuxDesktop, SchemaDefs_OSTypeId_OpenSUSE },
+- { ovf::CIMOSType_CIMOS_SUSE_64, SchemaDefs_OSTypeId_OpenSUSE_64 },
+- { ovf::CIMOSType_CIMOS_SLES_64, SchemaDefs_OSTypeId_OpenSUSE_64 },
+- { ovf::CIMOSType_CIMOS_LINUX, SchemaDefs_OSTypeId_Linux },
+- { ovf::CIMOSType_CIMOS_LINUX, SchemaDefs_OSTypeId_Linux22 },
+- { ovf::CIMOSType_CIMOS_SunJavaDesktopSystem, SchemaDefs_OSTypeId_Linux },
+- { ovf::CIMOSType_CIMOS_TurboLinux, SchemaDefs_OSTypeId_Turbolinux },
+- { ovf::CIMOSType_CIMOS_TurboLinux_64, SchemaDefs_OSTypeId_Turbolinux_64 },
+- { ovf::CIMOSType_CIMOS_Mandriva, SchemaDefs_OSTypeId_Mandriva },
+- { ovf::CIMOSType_CIMOS_Mandriva_64, SchemaDefs_OSTypeId_Mandriva_64 },
+- { ovf::CIMOSType_CIMOS_Ubuntu, SchemaDefs_OSTypeId_Ubuntu },
+- { ovf::CIMOSType_CIMOS_Ubuntu_64, SchemaDefs_OSTypeId_Ubuntu_64 },
+- { ovf::CIMOSType_CIMOS_Debian, SchemaDefs_OSTypeId_Debian },
+- { ovf::CIMOSType_CIMOS_Debian_64, SchemaDefs_OSTypeId_Debian_64 },
+- { ovf::CIMOSType_CIMOS_Linux_2_4_x, SchemaDefs_OSTypeId_Linux24 },
+- { ovf::CIMOSType_CIMOS_Linux_2_4_x_64, SchemaDefs_OSTypeId_Linux24_64 },
+- { ovf::CIMOSType_CIMOS_Linux_2_6_x, SchemaDefs_OSTypeId_Linux26 },
+- { ovf::CIMOSType_CIMOS_Linux_2_6_x_64, SchemaDefs_OSTypeId_Linux26_64 },
+- { ovf::CIMOSType_CIMOS_Linux_64, SchemaDefs_OSTypeId_Linux26_64 },
+-
+- // types that we have support for but CIM doesn't
+- { ovf::CIMOSType_CIMOS_Linux_2_6_x, SchemaDefs_OSTypeId_ArchLinux },
+- { ovf::CIMOSType_CIMOS_Linux_2_6_x_64, SchemaDefs_OSTypeId_ArchLinux_64 },
+- { ovf::CIMOSType_CIMOS_Linux_2_6_x, SchemaDefs_OSTypeId_Fedora },
+- { ovf::CIMOSType_CIMOS_Linux_2_6_x_64, SchemaDefs_OSTypeId_Fedora_64 },
+- { ovf::CIMOSType_CIMOS_Linux_2_6_x, SchemaDefs_OSTypeId_Gentoo },
+- { ovf::CIMOSType_CIMOS_Linux_2_6_x_64, SchemaDefs_OSTypeId_Gentoo_64 },
+- { ovf::CIMOSType_CIMOS_Linux_2_6_x, SchemaDefs_OSTypeId_Xandros },
+- { ovf::CIMOSType_CIMOS_Linux_2_6_x_64, SchemaDefs_OSTypeId_Xandros_64 },
+- { ovf::CIMOSType_CIMOS_Solaris, SchemaDefs_OSTypeId_OpenSolaris },
+- { ovf::CIMOSType_CIMOS_Solaris_64, SchemaDefs_OSTypeId_OpenSolaris_64 },
+-
+- // types added with CIM 2.25.0 follow:
+- { ovf::CIMOSType_CIMOS_WindowsServer2008R2, SchemaDefs_OSTypeId_Windows2008 }, // duplicate, see above
+-// { ovf::CIMOSType_CIMOS_VMwareESXi = 104, // we can't run ESX in a VM
+- { ovf::CIMOSType_CIMOS_Windows7, SchemaDefs_OSTypeId_Windows7 },
+- { ovf::CIMOSType_CIMOS_Windows7, SchemaDefs_OSTypeId_Windows7_64 }, // there is no CIM 64-bit type for this
+- { ovf::CIMOSType_CIMOS_CentOS, SchemaDefs_OSTypeId_RedHat },
+- { ovf::CIMOSType_CIMOS_CentOS_64, SchemaDefs_OSTypeId_RedHat_64 },
+- { ovf::CIMOSType_CIMOS_OracleEnterpriseLinux, SchemaDefs_OSTypeId_Oracle },
+- { ovf::CIMOSType_CIMOS_OracleEnterpriseLinux_64, SchemaDefs_OSTypeId_Oracle_64 },
+- { ovf::CIMOSType_CIMOS_eComStation, SchemaDefs_OSTypeId_OS2eCS }
+-
+- // there are no CIM types for these, so these turn to "other" on export:
+- // SchemaDefs_OSTypeId_OpenBSD
+- // SchemaDefs_OSTypeId_OpenBSD_64
+- // SchemaDefs_OSTypeId_NetBSD
+- // SchemaDefs_OSTypeId_NetBSD_64
++
++ // Custom OS
++ { ovf::CIMOSType_CIMOS_GNU, SchemaDefs_OSTypeId_GNU },
++ { ovf::CIMOSType_CIMOS_GNU_64, SchemaDefs_OSTypeId_GNU_64 },
++ { ovf::CIMOSType_CIMOS_GNUHurd, SchemaDefs_OSTypeId_GNUHurd },
++ { ovf::CIMOSType_CIMOS_GNULinux, SchemaDefs_OSTypeId_GNULinux },
++ { ovf::CIMOSType_CIMOS_GNULinux_64, SchemaDefs_OSTypeId_GNULinux_64 },
++
++ // GNU/Linux free distros
++ { ovf::CIMOSType_CIMOS_gNewSense, SchemaDefs_OSTypeId_gNewSense },
++ { ovf::CIMOSType_CIMOS_gNewSense_64, SchemaDefs_OSTypeId_gNewSense_64 },
++ { ovf::CIMOSType_CIMOS_Dragora, SchemaDefs_OSTypeId_Dragora },
++ { ovf::CIMOSType_CIMOS_Dragora_64, SchemaDefs_OSTypeId_Dragora_64 },
++ { ovf::CIMOSType_CIMOS_Musix, SchemaDefs_OSTypeId_Musix },
++ { ovf::CIMOSType_CIMOS_Musix_64, SchemaDefs_OSTypeId_Musix_64 },
++ { ovf::CIMOSType_CIMOS_Trisquel, SchemaDefs_OSTypeId_Trisquel },
++ { ovf::CIMOSType_CIMOS_Trisquel_64, SchemaDefs_OSTypeId_Trisquel_64 },
++ { ovf::CIMOSType_CIMOS_Dynebolic, SchemaDefs_OSTypeId_Dynebolic },
++ { ovf::CIMOSType_CIMOS_Venenux, SchemaDefs_OSTypeId_Venenux },
++
++ // GNU/Linux free distros that we have support for but CIM doesn't
++ { ovf::CIMOSType_CIMOS_GNULinux, SchemaDefs_OSTypeId_Parabola },
++ { ovf::CIMOSType_CIMOS_GNULinux_64, SchemaDefs_OSTypeId_Parabola_64 },
++ { ovf::CIMOSType_CIMOS_GNULinux, SchemaDefs_OSTypeId_Blag },
++ { ovf::CIMOSType_CIMOS_GNULinux_64, SchemaDefs_OSTypeId_Blag_64 },
++ { ovf::CIMOSType_CIMOS_GNULinux, SchemaDefs_OSTypeId_Ututo },
++ { ovf::CIMOSType_CIMOS_GNULinux_64, SchemaDefs_OSTypeId_Ututo_64 },
+
+ };
+
+@@ -150,53 +89,34 @@
+ /* These are the 32-Bit ones. They are sorted by priority. */
+ static const osTypePattern g_osTypesPattern[] =
+ {
+- {"Windows NT", SchemaDefs_OSTypeId_WindowsNT4},
+- {"Windows XP", SchemaDefs_OSTypeId_WindowsXP},
+- {"Windows 2000", SchemaDefs_OSTypeId_Windows2000},
+- {"Windows 2003", SchemaDefs_OSTypeId_Windows2003},
+- {"Windows Vista", SchemaDefs_OSTypeId_WindowsVista},
+- {"Windows 2008", SchemaDefs_OSTypeId_Windows2008},
+- {"SUSE", SchemaDefs_OSTypeId_OpenSUSE},
+- {"Novell", SchemaDefs_OSTypeId_OpenSUSE},
+- {"Red Hat", SchemaDefs_OSTypeId_RedHat},
+- {"Mandriva", SchemaDefs_OSTypeId_Mandriva},
+- {"Ubuntu", SchemaDefs_OSTypeId_Ubuntu},
+- {"Debian", SchemaDefs_OSTypeId_Debian},
+- {"QNX", SchemaDefs_OSTypeId_QNX},
+- {"Linux 2.4", SchemaDefs_OSTypeId_Linux24},
+- {"Linux 2.6", SchemaDefs_OSTypeId_Linux26},
+- {"Linux", SchemaDefs_OSTypeId_Linux},
+- {"OpenSolaris", SchemaDefs_OSTypeId_OpenSolaris},
+- {"Solaris", SchemaDefs_OSTypeId_OpenSolaris},
+- {"FreeBSD", SchemaDefs_OSTypeId_FreeBSD},
+- {"NetBSD", SchemaDefs_OSTypeId_NetBSD},
+- {"Windows 95", SchemaDefs_OSTypeId_Windows95},
+- {"Windows 98", SchemaDefs_OSTypeId_Windows98},
+- {"Windows Me", SchemaDefs_OSTypeId_WindowsMe},
+- {"Windows 3.", SchemaDefs_OSTypeId_Windows31},
+- {"DOS", SchemaDefs_OSTypeId_DOS},
+- {"OS2", SchemaDefs_OSTypeId_OS2}
++
++ {"Parabola GNU/Linux-libre", SchemaDefs_OSTypeId_Parabola},
++ {"gNewSense", SchemaDefs_OSTypeId_gNewSense},
++ {"Blag Linux and GNU", SchemaDefs_OSTypeId_Blag},
++ {"Dragora", SchemaDefs_OSTypeId_Dragora},
++ {"Ututo XS", SchemaDefs_OSTypeId_Ututo},
++ {"Musix", SchemaDefs_OSTypeId_Musix},
++ {"Trisquel", SchemaDefs_OSTypeId_Trisquel},
++ {"Dyne:bolic", SchemaDefs_OSTypeId_Dynebolic},
++ {"Venenux", SchemaDefs_OSTypeId_Venenux},
++ {"GNU", SchemaDefs_OSTypeId_GNU},
++ {"GNU-Hurd", SchemaDefs_OSTypeId_GNUHurd},
++ {"GNU/Linux", SchemaDefs_OSTypeId_GNULinux},
++
+ };
+
+ /* These are the 64-Bit ones. They are sorted by priority. */
+ static const osTypePattern g_osTypesPattern64[] =
+ {
+- {"Windows XP", SchemaDefs_OSTypeId_WindowsXP_64},
+- {"Windows 2003", SchemaDefs_OSTypeId_Windows2003_64},
+- {"Windows Vista", SchemaDefs_OSTypeId_WindowsVista_64},
+- {"Windows 2008", SchemaDefs_OSTypeId_Windows2008_64},
+- {"SUSE", SchemaDefs_OSTypeId_OpenSUSE_64},
+- {"Novell", SchemaDefs_OSTypeId_OpenSUSE_64},
+- {"Red Hat", SchemaDefs_OSTypeId_RedHat_64},
+- {"Mandriva", SchemaDefs_OSTypeId_Mandriva_64},
+- {"Ubuntu", SchemaDefs_OSTypeId_Ubuntu_64},
+- {"Debian", SchemaDefs_OSTypeId_Debian_64},
+- {"Linux 2.4", SchemaDefs_OSTypeId_Linux24_64},
+- {"Linux 2.6", SchemaDefs_OSTypeId_Linux26_64},
+- {"Linux", SchemaDefs_OSTypeId_Linux26_64},
+- {"OpenSolaris", SchemaDefs_OSTypeId_OpenSolaris_64},
+- {"Solaris", SchemaDefs_OSTypeId_OpenSolaris_64},
+- {"FreeBSD", SchemaDefs_OSTypeId_FreeBSD_64},
++ {"Parabola GNU/Linux-libre", SchemaDefs_OSTypeId_Parabola_64},
++ {"gNewSense", SchemaDefs_OSTypeId_gNewSense_64},
++ {"Blag Linux and GNU", SchemaDefs_OSTypeId_Blag_64},
++ {"Dragora", SchemaDefs_OSTypeId_Dragora_64},
++ {"Ututo XS", SchemaDefs_OSTypeId_Ututo_64},
++ {"Musix", SchemaDefs_OSTypeId_Musix_64},
++ {"Trisquel", SchemaDefs_OSTypeId_Trisquel_64},
++ {"GNU", SchemaDefs_OSTypeId_GNU_64},
++ {"GNU/Linux", SchemaDefs_OSTypeId_GNULinux_64},
+ };
+
+ /**
+--- VirtualBox-4.1.18.orig/src/VBox/Main/include/ovfreader.h 2012-06-20 10:17:34.000000000 -0300
++++ VirtualBox-4.1.18/src/VBox/Main/include/ovfreader.h 2012-07-26 03:51:21.807619186 -0300
+@@ -34,119 +34,24 @@
+
+ enum CIMOSType_T
+ {
+- CIMOSType_CIMOS_Unknown = 0,
+- CIMOSType_CIMOS_Other = 1,
+- CIMOSType_CIMOS_MACOS = 2,
+- CIMOSType_CIMOS_ATTUNIX = 3,
+- CIMOSType_CIMOS_DGUX = 4,
+- CIMOSType_CIMOS_DECNT = 5,
+- CIMOSType_CIMOS_Tru64UNIX = 6,
+- CIMOSType_CIMOS_OpenVMS = 7,
+- CIMOSType_CIMOS_HPUX = 8,
+- CIMOSType_CIMOS_AIX = 9,
+- CIMOSType_CIMOS_MVS = 10,
+- CIMOSType_CIMOS_OS400 = 11,
+- CIMOSType_CIMOS_OS2 = 12,
+- CIMOSType_CIMOS_JavaVM = 13,
+- CIMOSType_CIMOS_MSDOS = 14,
+- CIMOSType_CIMOS_WIN3x = 15,
+- CIMOSType_CIMOS_WIN95 = 16,
+- CIMOSType_CIMOS_WIN98 = 17,
+- CIMOSType_CIMOS_WINNT = 18,
+- CIMOSType_CIMOS_WINCE = 19,
+- CIMOSType_CIMOS_NCR3000 = 20,
+- CIMOSType_CIMOS_NetWare = 21,
+- CIMOSType_CIMOS_OSF = 22,
+- CIMOSType_CIMOS_DCOS = 23,
+- CIMOSType_CIMOS_ReliantUNIX = 24,
+- CIMOSType_CIMOS_SCOUnixWare = 25,
+- CIMOSType_CIMOS_SCOOpenServer = 26,
+- CIMOSType_CIMOS_Sequent = 27,
+- CIMOSType_CIMOS_IRIX = 28,
+- CIMOSType_CIMOS_Solaris = 29,
+- CIMOSType_CIMOS_SunOS = 30,
+- CIMOSType_CIMOS_U6000 = 31,
+- CIMOSType_CIMOS_ASERIES = 32,
+- CIMOSType_CIMOS_HPNonStopOS = 33,
+- CIMOSType_CIMOS_HPNonStopOSS = 34,
+- CIMOSType_CIMOS_BS2000 = 35,
+- CIMOSType_CIMOS_LINUX = 36,
+- CIMOSType_CIMOS_Lynx = 37,
+- CIMOSType_CIMOS_XENIX = 38,
+- CIMOSType_CIMOS_VM = 39,
+- CIMOSType_CIMOS_InteractiveUNIX = 40,
+- CIMOSType_CIMOS_BSDUNIX = 41,
+- CIMOSType_CIMOS_FreeBSD = 42,
+- CIMOSType_CIMOS_NetBSD = 43,
+- CIMOSType_CIMOS_GNUHurd = 44,
+- CIMOSType_CIMOS_OS9 = 45,
+- CIMOSType_CIMOS_MACHKernel = 46,
+- CIMOSType_CIMOS_Inferno = 47,
+- CIMOSType_CIMOS_QNX = 48,
+- CIMOSType_CIMOS_EPOC = 49,
+- CIMOSType_CIMOS_IxWorks = 50,
+- CIMOSType_CIMOS_VxWorks = 51,
+- CIMOSType_CIMOS_MiNT = 52,
+- CIMOSType_CIMOS_BeOS = 53,
+- CIMOSType_CIMOS_HPMPE = 54,
+- CIMOSType_CIMOS_NextStep = 55,
+- CIMOSType_CIMOS_PalmPilot = 56,
+- CIMOSType_CIMOS_Rhapsody = 57,
+- CIMOSType_CIMOS_Windows2000 = 58,
+- CIMOSType_CIMOS_Dedicated = 59,
+- CIMOSType_CIMOS_OS390 = 60,
+- CIMOSType_CIMOS_VSE = 61,
+- CIMOSType_CIMOS_TPF = 62,
+- CIMOSType_CIMOS_WindowsMe = 63,
+- CIMOSType_CIMOS_CalderaOpenUNIX = 64,
+- CIMOSType_CIMOS_OpenBSD = 65,
+- CIMOSType_CIMOS_NotApplicable = 66,
+- CIMOSType_CIMOS_WindowsXP = 67,
+- CIMOSType_CIMOS_zOS = 68,
+- CIMOSType_CIMOS_MicrosoftWindowsServer2003 = 69,
+- CIMOSType_CIMOS_MicrosoftWindowsServer2003_64 = 70,
+- CIMOSType_CIMOS_WindowsXP_64 = 71,
+- CIMOSType_CIMOS_WindowsXPEmbedded = 72,
+- CIMOSType_CIMOS_WindowsVista = 73,
+- CIMOSType_CIMOS_WindowsVista_64 = 74,
+- CIMOSType_CIMOS_WindowsEmbeddedforPointofService = 75,
+- CIMOSType_CIMOS_MicrosoftWindowsServer2008 = 76,
+- CIMOSType_CIMOS_MicrosoftWindowsServer2008_64 = 77,
+- CIMOSType_CIMOS_FreeBSD_64 = 78,
+- CIMOSType_CIMOS_RedHatEnterpriseLinux = 79,
+- CIMOSType_CIMOS_RedHatEnterpriseLinux_64 = 80,
+- CIMOSType_CIMOS_Solaris_64 = 81,
+- CIMOSType_CIMOS_SUSE = 82,
+- CIMOSType_CIMOS_SUSE_64 = 83,
+- CIMOSType_CIMOS_SLES = 84,
+- CIMOSType_CIMOS_SLES_64 = 85,
+- CIMOSType_CIMOS_NovellOES = 86,
+- CIMOSType_CIMOS_NovellLinuxDesktop = 87,
+- CIMOSType_CIMOS_SunJavaDesktopSystem = 88,
+- CIMOSType_CIMOS_Mandriva = 89,
+- CIMOSType_CIMOS_Mandriva_64 = 90,
+- CIMOSType_CIMOS_TurboLinux = 91,
+- CIMOSType_CIMOS_TurboLinux_64 = 92,
+- CIMOSType_CIMOS_Ubuntu = 93,
+- CIMOSType_CIMOS_Ubuntu_64 = 94,
+- CIMOSType_CIMOS_Debian = 95,
+- CIMOSType_CIMOS_Debian_64 = 96,
+- CIMOSType_CIMOS_Linux_2_4_x = 97,
+- CIMOSType_CIMOS_Linux_2_4_x_64 = 98,
+- CIMOSType_CIMOS_Linux_2_6_x = 99,
+- CIMOSType_CIMOS_Linux_2_6_x_64 = 100,
+- CIMOSType_CIMOS_Linux_64 = 101,
+- CIMOSType_CIMOS_Other_64 = 102,
+- // types added with CIM 2.25.0 follow:
+- CIMOSType_CIMOS_WindowsServer2008R2 = 103,
+- CIMOSType_CIMOS_VMwareESXi = 104,
+- CIMOSType_CIMOS_Windows7 = 105,
+- CIMOSType_CIMOS_CentOS = 106,
+- CIMOSType_CIMOS_CentOS_64 = 107,
+- CIMOSType_CIMOS_OracleEnterpriseLinux = 108,
+- CIMOSType_CIMOS_OracleEnterpriseLinux_64 = 109,
+- CIMOSType_CIMOS_eComStation = 110
+- // no new types added with CIM 2.26.0
++ CIMOSType_CIMOS_Unknown = 0,
++ CIMOSType_CIMOS_Other = 1,
++ CIMOSType_CIMOS_Other_64 = 2,
++ CIMOSType_CIMOS_gNewSense = 3,
++ CIMOSType_CIMOS_gNewSense_64 = 4,
++ CIMOSType_CIMOS_Dragora = 5,
++ CIMOSType_CIMOS_Dragora_64 = 6,
++ CIMOSType_CIMOS_Musix = 7,
++ CIMOSType_CIMOS_Musix_64 = 8,
++ CIMOSType_CIMOS_Trisquel = 9,
++ CIMOSType_CIMOS_Trisquel_64 = 10,
++ CIMOSType_CIMOS_Dynebolic = 11,
++ CIMOSType_CIMOS_Venenux = 12,
++ CIMOSType_CIMOS_GNU = 13,
++ CIMOSType_CIMOS_GNU_64 = 14,
++ CIMOSType_CIMOS_GNUHurd = 15,
++ CIMOSType_CIMOS_GNULinux = 16,
++ CIMOSType_CIMOS_GNULinux_64 = 17
+ };
+
+
+--- VirtualBox-4.1.18.orig/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c 2012-06-20 10:09:01.000000000 -0300
++++ VirtualBox-4.1.18/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c 2012-07-26 15:32:55.309812685 -0300
+@@ -622,16 +622,16 @@
+ * Call the common device extension initializer.
+ */
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) && defined(RT_ARCH_X86)
+- VBOXOSTYPE enmOSType = VBOXOSTYPE_Linux26;
++ VBOXOSTYPE enmOSType = VBOXOSTYPE_GNULinux;
+ #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) && defined(RT_ARCH_AMD64)
+- VBOXOSTYPE enmOSType = VBOXOSTYPE_Linux26_x64;
++ VBOXOSTYPE enmOSType = VBOXOSTYPE_GNULinux_x64;
+ #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0) && defined(RT_ARCH_X86)
+- VBOXOSTYPE enmOSType = VBOXOSTYPE_Linux24;
++ VBOXOSTYPE enmOSType = VBOXOSTYPE_GNULinux;
+ #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0) && defined(RT_ARCH_AMD64)
+- VBOXOSTYPE enmOSType = VBOXOSTYPE_Linux24_x64;
++ VBOXOSTYPE enmOSType = VBOXOSTYPE_GNULinux_x64;
+ #else
+ # warning "huh? which arch + version is this?"
+- VBOXOSTYPE enmOsType = VBOXOSTYPE_Linux;
++ VBOXOSTYPE enmOsType = VBOXOSTYPE_GNULinux;
+ #endif
+ rc = VBoxGuestInitDevExt(&g_DevExt,
+ g_IOPortBase,
diff --git a/libre/virtualbox-libre-modules-lts/libre.patch b/libre/virtualbox-libre-modules-lts/libre.patch
new file mode 100644
index 000000000..e51d0c0a7
--- /dev/null
+++ b/libre/virtualbox-libre-modules-lts/libre.patch
@@ -0,0 +1,5765 @@
+--- VirtualBox-4.1.18.orig/Config.kmk 2012-07-24 16:38:43.981310996 -0300
++++ VirtualBox-4.1.18/Config.kmk 2012-07-24 16:38:44.001309865 -0300
+@@ -56,9 +56,6 @@
+ PROPS_SYSMODS_ACCUMULATE_L += INTERMEDIATES
+ PROPS_MISCBINS_ACCUMULATE_L += INTERMEDIATES
+
+-# Misc names used bye the install paths below.
+-VBOX_PUEL_MANGLED_NAME := Oracle_VM_VirtualBox_Extension_Pack
+-
+ # Install paths
+ ## @todo This will change after 4.1 is branched off!
+ # What is now 'bin' and 'lib' will be moved down under 'staged/', except on
+@@ -125,9 +122,6 @@
+ endif
+
+ INST_DOC = doc/
+-INST_EXTPACK = $(INST_BIN)ExtensionPacks/
+-INST_EXTPACK_CERTS = $(INST_BIN)ExtPackCertificates/
+-INST_EXTPACK_PUEL = $(INST_EXTPACK)$(VBOX_PUEL_MANGLED_NAME)/
+ INST_PACKAGES = packages/
+
+ VBOX_PATH_SDK = $(patsubst %/,%,$(PATH_STAGE)/$(INST_SDK))
+@@ -136,7 +130,6 @@
+ VBOX_PATH_ADDITIONS = $(patsubst %/,%,$(PATH_STAGE)/$(INST_ADDITIONS))
+ VBOX_PATH_ADDITIONS_ISO = $(patsubst %/,%,$(PATH_STAGE)/$(INST_ADDITIONS_ISO))
+ VBOX_PATH_ADDITIONS_LIB = $(patsubst %/,%,$(PATH_STAGE)/$(INST_ADDITIONS_LIB))
+-VBOX_PATH_EXTPACK_PUEL= $(patsubst %/,%,$(PATH_STAGE)/$(INST_EXTPACK_PUEL))
+ VBOX_PATH_PACKAGES = $(patsubst %/,%,$(PATH_STAGE)/$(INST_PACKAGES))
+
+
+@@ -208,7 +201,6 @@
+ export VBOX_ADDITIONS_SH_MODE = release
+ export VBOX_DOCUMENTATION_SH_MODE = release
+ export VBOX_EFI_SH_MODE = release
+- export VBOX_EXTPACKS_SH_MODE = release
+ endif
+
+ # Some info on the vendor
+@@ -361,8 +353,6 @@
+ VBOX_WITH_USB = 1
+ # Enable the USB 1.1 controller plus virtual USB HID devices.
+ VBOX_WITH_VUSB = 1
+-# Enable the USB 2.0 controller.
+-VBOX_WITH_EHCI = 1
+ # Enable the ISCSI feature.
+ VBOX_WITH_ISCSI = 1
+ # Enable INIP support in the ISCSI feature.
+@@ -430,9 +420,6 @@
+ ifdef VBOX_WITH_USB
+ VBOX_WITH_VUSB = 1
+ endif
+-ifdef VBOX_WITH_EHCI
+- VBOX_WITH_EHCI_IMPL = 1
+-endif
+ ifdef VBOX_WITH_PCI_PASSTHROUGH
+ VBOX_WITH_PCI_PASSTHROUGH_IMPL = 1
+ endif
+@@ -591,15 +578,6 @@
+ ## @}
+
+
+-## @name Extension pack
+-## @{
+-# Enables the extension pack feature.
+-VBOX_WITH_EXTPACK = 1
+-# Enables separating code into the Oracle VM VirtualBox Extension Pack, dubbed PUEL.
+-VBOX_WITH_EXTPACK_PUEL = 1
+-# Enables building+packing the Oracle VM VirtualBox Extension Pack, includes VBOX_WITH_EXTPACK_PUEL
+-VBOX_WITH_EXTPACK_PUEL_BUILD = 1
+-## @}
+
+ ## @name Misc
+ ## @{
+@@ -777,14 +755,6 @@
+ # Skip stuff.
+ #
+
+-ifdef VBOX_ONLY_EXTPACKS
+- # Clear some VBOX_WITH_XXX variables instead of adding ifdefs all over the place.
+- VBOX_WITH_DEBUGGER =
+- VBOX_WITH_ADDITIONS =
+- VBOX_WITH_VBOXDRV =
+- VBOX_WITH_TESTCASES =
+-endif
+-
+ # VBOX_QUICK can be used by core developers to speed to the build
+ ifdef VBOX_QUICK
+ # undefine variables by assigning blank.
+@@ -848,7 +818,6 @@
+ VBOX_WITH_TESTSUITE=
+ VBOX_WITH_QTGUI=
+ VBOX_WITH_USB=
+- VBOX_WITH_EHCI=
+ VBOX_WITH_DOCS=
+ VBOX_WITH_PDM_ASYNC_COMPLETION=
+ VBOX_WITH_KCHMVIEWER=
+@@ -870,7 +839,6 @@
+ VBOX_WITH_CROGL=
+ VBOX_WITH_DEBUGGER=
+ VBOX_WITH_DOCS=
+- VBOX_WITH_EHCI=
+ VBOX_WITH_HARDENING=
+ VBOX_WITH_HEADLESS=
+ VBOX_WITH_HGCM=
+@@ -952,9 +920,6 @@
+ #
+ ifdef VBOX_OSE
+ VBOX_WITH_VRDP=
+- VBOX_WITH_EHCI_IMPL=
+- VBOX_WITH_EXTPACK_PUEL=
+- VBOX_WITH_EXTPACK_PUEL_BUILD=
+ VBOX_WITH_PCI_PASSTHROUGH_IMPL=
+ VBOX_WITH_OS2_ADDITIONS_BIN=
+ VBOX_WITH_SECURELABEL=
+@@ -1082,10 +1047,6 @@
+ VBOX_WITH_KCHMVIEWER=
+ endif
+
+-ifdef VBOX_WITH_EXTPACK_PUEL_BUILD
+- VBOX_WITH_EXTPACK_PUEL = 1
+-endif
+-
+ #
+ # Mark OSE builds clearly, helps figuring out limitations more easily.
+ #
+@@ -1679,9 +1640,6 @@
+ # biossums (set BIOS checksums)
+ VBOX_BIOSSUMS ?= $(PATH_OBJ)/biossums/biossums$(HOSTSUFF_EXE)
+
+-# RTManifest (extension pack manifest utility)
+-VBOX_RTMANIFEST ?= $(PATH_OBJ)/bldRTManifest/bldRTManifest$(HOSTSUFF_EXE)
+-
+ # filesplitter (splits java files)
+ VBOX_FILESPLIT ?= $(PATH_OBJ)/filesplitter/filesplitter$(HOSTSUFF_EXE)
+
+@@ -2461,13 +2419,6 @@
+ SDK_VBOX_OPENSSL2_LIBS = $(NO_SUCH_VARIABLE)
+ endif
+
+-SDK_VBoxOpenSslExtPack = Internal use only.
+-SDK_VBoxOpenSslExtPack_INCS = $(SDK_VBOX_OPENSSL_VBOX_DEFAULT_INCS)
+-SDK_VBoxOpenSslExtPack_ORDERDEPS = $(crypto-headers_1_TARGET)
+-SDK_VBoxOpenSslExtPack_LIBS = \
+- $(PATH_STAGE_LIB)/VBoxExtPack-libssl$(VBOX_SUFF_LIB) \
+- $(PATH_STAGE_LIB)/VBoxExtPack-libcrypto$(VBOX_SUFF_LIB)
+-
+ SDK_VBOX_BLD_OPENSSL = .
+ SDK_VBOX_BLD_OPENSSL_EXTENDS = VBOX_OPENSSL
+ SDK_VBOX_BLD_OPENSSL_LIBS ?= \
+@@ -3817,100 +3768,6 @@
+ endif
+ TEMPLATE_VBOXMAINCLIENTDLL_LDFLAGS.darwin = $(filter-out -bind_at_load,$(TEMPLATE_VBOXMAINCLIENTEXE_LDFLAGS.darwin))
+
+-
+-
+-#
+-# Templates used for building the extension packs.
+-#
+-ifdef VBOX_WITH_EXTPACK
+- # Base templates (native or portable).
+- TEMPLATE_VBoxR3ExtPack = For the ring-3 context extension pack modules.
+- if 1 # Native for now.
+- TEMPLATE_VBoxR3ExtPack_EXTENDS = VBOXR3DLLNOXCPT
+- TEMPLATE_VBoxR3ExtPack_DEFS = $(TEMPLATE_VBOXR3DLLNOXCPT_DEFS) VBOX_IN_EXTPACK VBOX_IN_EXTPACK_R3
+- else
+- TEMPLATE_VBoxR3ExtPack_EXTENDS = VBOXNOCRTGCC
+- TEMPLATE_VBoxR3ExtPack_DEFS = $(TEMPLATE_VBOXNOCRTGCC_DEFS) VBOX_IN_EXTPACK VBOX_IN_EXTPACK_R3 IPRT_NO_CRT IN_RING3
+- TEMPLATE_VBoxR3ExtPack_INCS = $(PATH_ROOT)/include/iprt/nocrt $(TEMPLATE_VBOXR3DLLNOXCPT_INCS)
+- endif
+- ifneq ($(KBUILD_TARGET),win)
+- TEMPLATE_VBoxR3ExtPack_CXXFLAGS = $(TEMPLATE_VBOXR3DLLNOXCPT_CXXFLAGS) -fno-rtti
+- endif
+- TEMPLATE_VBoxR3ExtPack_INST = $(INST_EXTPACK)YouShallOverrideThis/
+- ifeq ($(KBUILD_TARGET),linux)
+- TEMPLATE_VBoxR3ExtPack_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RUNPATH)' '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)', $(TEMPLATE_VBOXR3DLLNOXCPT_LDFLAGS))
+- else
+- if !defined(VBOX_WITH_RUNPATH) && defined(VBOX_WITH_RELATIVE_RUNPATH)
+- TEMPLATE_VBoxR3ExtPack_LDFLAGS = '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)/../../..' $(filter-out '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)', $(TEMPLATE_VBOXR3DLLNOXCPT_LDFLAGS))
+- endif
+- endif
+- ifdef VBOX_ONLY_EXTPACKS_USE_IMPLIBS
+- if1of ($(KBUILD_TARGET), win os2)
+- TEMPLATE_VBoxR3ExtPack_LIBS = \
+- $(TEMPLATE_LIBS_VBOXR3) \
+- $(PATH_STAGE_LIB)/VMMR3Imp$(VBOX_SUFF_LIB) \
+- $(PATH_STAGE_LIB)/VBoxRTImp$(VBOX_SUFF_LIB)
+- else
+- TEMPLATE_VBoxR3ExtPack_LIBS = \
+- $(TEMPLATE_LIBS_VBOXR3) \
+- $(PATH_STAGE_LIB)/VMMR3Imp$(VBOX_SUFF_DLL) \
+- $(PATH_STAGE_LIB)/VBoxRTImp$(VBOX_SUFF_DLL)
+- endif
+- else
+- TEMPLATE_VBoxR3ExtPack_LIBS = \
+- $(TEMPLATE_LIBS_VBOXR3) \
+- $(LIB_RUNTIME) \
+- $(LIB_VMM)
+- endif
+-
+- TEMPLATE_VBoxR0ExtPack = For the ring-0 context extension pack modules.
+- TEMPLATE_VBoxR0ExtPack_EXTENDS = VBoxR0
+- TEMPLATE_VBoxR0ExtPack_EXTENDS_BY = appending
+- TEMPLATE_VBoxR0ExtPack_INST = $(INST_EXTPACK)YouShallOverrideThis/
+- TEMPLATE_VBoxR0ExtPack_DEFS = VBOX_IN_EXTPACK VBOX_IN_EXTPACK_R0
+- if1of ($(VBOX_LDR_FMT), pe lx)
+- TEMPLATE_VBoxR0ExtPack_LIBS = \
+- $(PATH_STAGE_LIB)/VMMR0Imp$(VBOX_SUFF_LIB) \
+- $(PATH_STAGE_LIB)/SUPR0$(VBOX_SUFF_LIB)
+- endif
+-
+- TEMPLATE_VBoxRcExtPack = For the raw-mode context extension pack modules.
+- TEMPLATE_VBoxRcExtPack_EXTENDS = VBoxRc
+- TEMPLATE_VBoxRcExtPack_EXTENDS_BY = appending
+- TEMPLATE_VBoxRcExtPack_SYSSUFF = .rc
+- TEMPLATE_VBoxRcExtPack_INST = $(INST_EXTPACK)YouShallOverrideThis/
+- TEMPLATE_VBoxRcExtPack_DEFS = VBOX_IN_EXTPACK VBOX_IN_EXTPACK_RC
+- if1of ($(VBOX_LDR_FMT32), pe lx)
+- TEMPLATE_VBoxRcExtPack_LIBS = \
+- $(PATH_STAGE_LIB)/VMMRCBuiltin$(VBOX_SUFF_LIB) \
+- $(PATH_STAGE_LIB)/VMMRCImp$(VBOX_SUFF_LIB)
+- endif
+-
+- TEMPLATE_VBoxInsExtPack = For the install targets of an extension pack.
+- TEMPLATE_VBoxInsExtPack_MODE = 0644
+- TEMPLATE_VBoxInsExtPack_INST = $(INST_EXTPACK)YouShallOverrideThis/
+-
+- # For each individual extension pack
+- ifdef VBOX_WITH_EXTPACK_PUEL
+- TEMPLATE_VBoxR3ExtPackPuel = For the ring-3 context modules in the PUEL extension pack.
+- TEMPLATE_VBoxR3ExtPackPuel_EXTENDS = VBoxR3ExtPack
+- TEMPLATE_VBoxR3ExtPackPuel_INST = $(INST_EXTPACK_PUEL)$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)/
+-
+- TEMPLATE_VBoxR0ExtPackPuel = For the ring-0 context modules in the PUEL extension pack.
+- TEMPLATE_VBoxR0ExtPackPuel_EXTENDS = VBoxR0ExtPack
+- TEMPLATE_VBoxR0ExtPackPuel_INST = $(INST_EXTPACK_PUEL)$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)/
+-
+- TEMPLATE_VBoxRcExtPackPuel = For the raw-mode context modules in the PUEL extension pack.
+- TEMPLATE_VBoxRcExtPackPuel_EXTENDS = VBoxRcExtPack
+- TEMPLATE_VBoxRcExtPackPuel_INST = $(INST_EXTPACK_PUEL)$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)/
+-
+- TEMPLATE_VBoxInsExtPackPuel = For the install targets of an extension pack.
+- TEMPLATE_VBoxInsExtPackPuel_EXTENDS = VBoxR0ExtPack
+- TEMPLATE_VBoxInsExtPackPuel_INST = $(INST_EXTPACK_PUEL)
+-endif
+-endif # VBOX_WITH_EXTPACK
+-
+-
+ #
+ # Qt 4
+ # Qt 4
+--- VirtualBox-4.1.18.orig/Makefile.kmk 2012-07-24 17:16:47.078929150 -0300
++++ VirtualBox-4.1.18/Makefile.kmk 2012-07-24 17:16:47.125592981 -0300
+@@ -446,7 +446,6 @@
+ include/VBox \
+ include/VBox/vmm \
+ include/VBox/com \
+- include/VBox/ExtPack \
+ include/VBox/HostServices \
+ include/VBox/GuestHost \
+ include/VBox/HGSMI \
+@@ -862,191 +861,6 @@
+ additions-build-linux.x86.combined \
+ additions-packing
+
+-
+-#
+-# Build the extension packs, all of them.
+-#
+-# This is tailored (hardcoded) for the extension pack build box.
+-#
+-# The fetching must be done in serial fashion, while the building should be
+-# more flexible wrt to -jN.
+-#
+-extpacks-fetch:
+- + $(KMK) -C tools fetch VBOX_ONLY_EXTPACKS=1
+- + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=amd64 KBUILD_TARGET=darwin BUILD_TARGET_ARCH=amd64 BUILD_TARGET=darwin VBOX_ONLY_EXTPACKS=1
+- + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=darwin BUILD_TARGET_ARCH=x86 BUILD_TARGET=darwin VBOX_ONLY_EXTPACKS=1
+-# + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=amd64 KBUILD_TARGET=freebsd BUILD_TARGET_ARCH=amd64 BUILD_TARGET=freebsd VBOX_ONLY_EXTPACKS=1
+-# + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=freebsd BUILD_TARGET_ARCH=x86 BUILD_TARGET=freebsd VBOX_ONLY_EXTPACKS=1
+- + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=amd64 KBUILD_TARGET=linux BUILD_TARGET_ARCH=amd64 BUILD_TARGET=linux VBOX_ONLY_EXTPACKS=1
+- + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=linux BUILD_TARGET_ARCH=x86 BUILD_TARGET=linux VBOX_ONLY_EXTPACKS=1
+-# + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=os2 BUILD_TARGET_ARCH=x86 BUILD_TARGET=os2 VBOX_ONLY_EXTPACKS=1
+- + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=amd64 KBUILD_TARGET=solaris BUILD_TARGET_ARCH=amd64 BUILD_TARGET=solaris VBOX_ONLY_EXTPACKS=1
+- + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=solaris BUILD_TARGET_ARCH=x86 BUILD_TARGET=solaris VBOX_ONLY_EXTPACKS=1
+- + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=amd64 KBUILD_TARGET=win BUILD_TARGET_ARCH=amd64 BUILD_TARGET=win VBOX_ONLY_EXTPACKS=1
+- + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=win BUILD_TARGET_ARCH=x86 BUILD_TARGET=win VBOX_ONLY_EXTPACKS=1
+-
+-
+-extpacks-build: \
+- extpacks-build-win.amd64 \
+- extpacks-build-win.x86 \
+- extpacks-build-solaris.amd64 \
+- extpacks-build-solaris.x86 \
+- extpacks-build-os2.x86 \
+- extpacks-build-linux.amd64 \
+- extpacks-build-linux.x86 \
+- extpacks-build-darwin.amd64 \
+- extpacks-build-darwin.x86 \
+- extpacks-build-freebsd.amd64 \
+- extpacks-build-freebsd.x86
+-
+-VBOX_EXTPACKS_BUILD.amd64 = VBOX_ONLY_EXTPACKS=1 \
+- KBUILD_TYPE=$(KBUILD_TYPE) BUILD_TYPE=$(KBUILD_TYPE) \
+- KBUILD_TARGET_ARCH=amd64 BUILD_TARGET_ARCH=amd64 \
+- VBOX_SVN_REV=$(VBOX_SVN_REV)
+-
+-VBOX_EXTPACKS_BUILD.x86 = VBOX_ONLY_EXTPACKS=1 \
+- KBUILD_TYPE=$(KBUILD_TYPE) BUILD_TYPE=$(KBUILD_TYPE) \
+- KBUILD_TARGET_ARCH=x86 BUILD_TARGET_ARCH=x86 \
+- VBOX_SVN_REV=$(VBOX_SVN_REV)
+-
+-# Automatically determine the extpack build subdir name. Used for figuring out
+-# directory names inside the extension pack building VMs.
+-VBOX_EXTPACKS_BUILD_SUBDIRNAME := $(lastword $(subst /, ,$(PATH_ROOT)))
+-
+-# When building in parallel on a Windows host, make sure we finish the host
+-# bit before kicking off any UNIX guest or we'll run into file sharing issues.
+-ifeq ($(KBUILD_TARGET),win)
+-VBOX_EXTPACKS_BUILD_WIN_HOST_FIRST = extpacks-build-win.x86 extpacks-build-win.amd64
+-else
+-VBOX_EXTPACKS_BUILD_WIN_HOST_FIRST =
+-endif
+-
+-extpacks-build-win.amd64:
+-ifeq ($(KBUILD_TARGET),win)
+- + $(VBOX_KMK_TIME) $(KMK) $(VBOX_EXTPACKS_BUILD.amd64) all $(VBOX_EXTPACKS_HOST_BUILD_TWEAK)
+-else
+- $(call MSG_L1,Building Windows/amd64 extension packs)
+- $(VBOX_KMK_TIME) ssh vbox@192.168.27.6 " echo $@ && cd e:/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME) && tools/env.sh kmk $(VBOX_EXTPACKS_BUILD.amd64) all"
+-endif
+-
+-extpacks-build-win.x86:
+-ifeq ($(KBUILD_TARGET),win)
+- + $(VBOX_KMK_TIME) $(KMK) $(VBOX_EXTPACKS_BUILD.x86) all $(VBOX_EXTPACKS_HOST_BUILD_TWEAK)
+-else
+- $(call MSG_L1,Building Windows/x86 extension packs)
+- $(VBOX_KMK_TIME) ssh vbox@192.168.27.16 " echo $@ && cd e:/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME) && tools/env.sh kmk $(VBOX_EXTPACKS_BUILD.x86) all"
+-endif
+-
+-ifeq ($(KBUILD_TARGET),solaris)
+-extpacks-build-solaris.amd64:
+- + $(VBOX_KMK_TIME) $(KMK) $(VBOX_EXTPACKS_BUILD.amd64) all $(VBOX_EXTPACKS_HOST_BUILD_TWEAK)
+-
+-extpacks-build-solaris.x86: extpacks-build-solaris.amd64
+- + $(VBOX_KMK_TIME) $(KMK) $(VBOX_EXTPACKS_BUILD.x86) VBOX_WITH_COMBINED_SOLARIS_GUEST_PACKAGE=1 all $(VBOX_EXTPACKS_HOST_BUILD_TWEAK)
+-
+-else
+-# Serialize 32-bit and 64-bit ASSUMING the same VM builds both.
+-extpacks-build-solaris.rsync-into-vm: $(VBOX_EXTPACKS_BUILD_WIN_HOST_FIRST)
+- $(VBOX_KMK_TIME) $(call VBOX_RSYNC_IN_FN,solaris,*) . 192.168.27.4:/mnt/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME)
+-
+-extpacks-build-solaris.build-it: extpacks-build-solaris.rsync-into-vm
+- $(call MSG_L1,Building Solaris/amd64 extension packs)
+- $(VBOX_KMK_TIME) ssh vbox@192.168.27.4 " echo $@/amd64 && cd /mnt/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_EXTPACKS_BUILD.amd64) all"
+- $(call MSG_L1,Building Solaris/x86 extension packs)
+- $(VBOX_KMK_TIME) ssh vbox@192.168.27.4 " echo $@/x86 && cd /mnt/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_EXTPACKS_BUILD.x86) all"
+-
+-extpacks-build-solaris.rsync-out-of-vm: extpacks-build-solaris.build-it
+- $(VBOX_KMK_TIME) rsync -a --delete 192.168.27.4:/mnt/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME)/out/solaris.x86 out/
+- $(VBOX_KMK_TIME) rsync -a --delete 192.168.27.4:/mnt/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME)/out/solaris.amd64 out/
+-
+-.NOTPARALLEL: extpacks-build-solaris.rsync-out-of-vm extpacks-build-solaris.rsync-into-vm
+-.PHONY: extpacks-build-solaris.rsync-out-of-vm extpacks-build-solaris.rsync-into-vm extpacks-build-solaris.build-it
+-
+-extpacks-build-solaris.amd64: extpacks-build-solaris.rsync-out-of-vm
+-extpacks-build-solaris.x86: extpacks-build-solaris.rsync-out-of-vm
+-endif
+-
+-extpacks-build-os2.x86:
+-#ifeq ($(KBUILD_TARGET),os2)
+-# + $(VBOX_KMK_TIME) $(KMK) $(VBOX_EXTPACKS_BUILD.x86) all $(VBOX_EXTPACKS_HOST_BUILD_TWEAK)
+-#else
+-# $(VBOX_KMK_TIME) ssh vbox@192.168.27.3 " cd /mnt/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_EXTPACKS_BUILD.x86) "
+-#endif
+-
+-extpacks-build-linux.amd64: $(VBOX_EXTPACKS_BUILD_WIN_HOST_FIRST)
+-ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),linux.amd64)
+- + $(VBOX_KMK_TIME) $(KMK) $(VBOX_EXTPACKS_BUILD.amd64) all $(VBOX_EXTPACKS_HOST_BUILD_TWEAK)
+-else
+- $(call MSG_L1,Building Linux/amd64 extension packs)
+- $(VBOX_KMK_TIME) ssh vbox@192.168.27.12 " echo $@ && cd /mnt/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_EXTPACKS_BUILD.amd64) all"
+-endif
+-
+-extpacks-build-linux.x86: $(VBOX_EXTPACKS_BUILD_WIN_HOST_FIRST)
+-ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),linux.x86)
+- + $(VBOX_KMK_TIME) $(KMK) $(VBOX_EXTPACKS_BUILD.x86) all $(VBOX_EXTPACKS_HOST_BUILD_TWEAK)
+-else
+- $(call MSG_L1,Building Linux/x86 extension packs)
+- $(VBOX_KMK_TIME) ssh vbox@192.168.27.11 " echo $@ && cd /mnt/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_EXTPACKS_BUILD.x86) all"
+-endif
+-
+-extpacks-build-freebsd.amd64: $(VBOX_EXTPACKS_BUILD_WIN_HOST_FIRST)
+-#ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),freebsd.amd64)
+-# + $(VBOX_KMK_TIME) $(KMK) $(VBOX_EXTPACKS_BUILD.amd64) all $(VBOX_EXTPACKS_HOST_BUILD_TWEAK)
+-#else
+-# $(call MSG_L1,Building FreeBSD/amd64 extension packs)
+-# $(VBOX_KMK_TIME) ssh vbox@192.168.27.17 " echo $@ && cd /mnt/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_EXTPACKS_BUILD.amd64) all"
+-#endif
+-
+-extpacks-build-freebsd.x86: $(VBOX_EXTPACKS_BUILD_WIN_HOST_FIRST)
+-#ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),freebsd.x86)
+-# + $(VBOX_KMK_TIME) $(KMK) $(VBOX_EXTPACKS_BUILD.x86) all $(VBOX_EXTPACKS_HOST_BUILD_TWEAK)
+-#else
+-# $(call MSG_L1,Building FreeBSD/x86 extension packs)
+-# $(VBOX_KMK_TIME) ssh vbox@192.168.27.7 " echo $@ && cd /mnt/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_EXTPACKS_BUILD.x86) all"
+-#endif
+-
+-extpacks-build-darwin.amd64: $(VBOX_EXTPACKS_BUILD_WIN_HOST_FIRST)
+-ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),darwin.amd64)
+- + $(VBOX_KMK_TIME) $(KMK) $(VBOX_EXTPACKS_BUILD.amd64) all $(VBOX_EXTPACKS_HOST_BUILD_TWEAK)
+-else
+- $(call MSG_L1,Building Darwin/amd64 extension packs)
+- $(VBOX_KMK_TIME) $(call VBOX_RSYNC_IN_FN,darwin,amd64) . 192.168.27.15:/Users/vbox/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME)
+- $(VBOX_KMK_TIME) ssh vbox@192.168.27.15 " echo $@ && cd /Users/vbox/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_EXTPACKS_BUILD.amd64) all"
+- $(VBOX_KMK_TIME) rsync -am -v --delete 192.168.27.15:/Users/vbox/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME)/out/darwin.amd64 out/
+-endif
+-
+-extpacks-build-darwin.x86: $(VBOX_EXTPACKS_BUILD_WIN_HOST_FIRST)
+-ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),darwin.x86)
+- + $(VBOX_KMK_TIME) $(KMK) $(VBOX_EXTPACKS_BUILD.x86) all $(VBOX_EXTPACKS_HOST_BUILD_TWEAK)
+-else
+- $(call MSG_L1,Building Darwin/x86 extension packs)
+- $(VBOX_KMK_TIME) $(call VBOX_RSYNC_IN_FN,darwin,x86) . 192.168.27.5:/Users/vbox/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME)
+- $(VBOX_KMK_TIME) ssh vbox@192.168.27.5 " echo $@ && cd /Users/vbox/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_EXTPACKS_BUILD.x86) all"
+- $(VBOX_KMK_TIME) rsync -am -v --delete 192.168.27.5:/Users/vbox/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME)/out/darwin.x86 out/
+-endif
+-
+-
+-extpacks-packing:
+- + $(KMK) VBOX_ONLY_EXTPACKS=1 \
+- VBOX_WITH_EXTPACK_OS_ARCHS="darwin.amd64 darwin.x86 linux.amd64 linux.x86 solaris.amd64 solaris.x86 win.amd64 win.x86" \
+- packing
+-# +++ freebsd.amd64 freebsd.x86 os2.x86 ^^^
+-
+-.PHONY: \
+- extpacks-build-win.x86 \
+- extpacks-build-win.amd64 \
+- extpacks-build-solaris.amd64 \
+- extpacks-build-solaris.x86 \
+- extpacks-build-os2.x86 \
+- extpacks-build-linux.amd64 \
+- extpacks-build-linux.x86 \
+- extpacks-build-freebsd.amd64 \
+- extpacks-build-freebsd.x86 \
+- extpacks-build-darwin.amd64 \
+- extpacks-build-darwin.x86 \
+- extpacks-packing
+-
+-
+ #
+ # Build the test suite, all of it.
+ #
+--- VirtualBox-4.1.18.orig/src/VBox/Devices/build/VBoxDD.cpp 2012-06-20 10:15:51.000000000 -0300
++++ VirtualBox-4.1.18/src/VBox/Devices/build/VBoxDD.cpp 2012-07-24 16:18:03.964493454 -0300
+@@ -132,11 +132,6 @@
+ if (RT_FAILURE(rc))
+ return rc;
+ #endif
+-#ifdef VBOX_WITH_EHCI_IMPL
+- rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceEHCI);
+- if (RT_FAILURE(rc))
+- return rc;
+-#endif
+ #ifdef VBOX_ACPI
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceACPI);
+ if (RT_FAILURE(rc))
+--- VirtualBox-4.1.18.orig/src/VBox/Devices/build/VBoxDD.h 2012-06-20 10:15:51.000000000 -0300
++++ VirtualBox-4.1.18/src/VBox/Devices/build/VBoxDD.h 2012-07-24 16:20:35.939205389 -0300
+@@ -62,7 +62,6 @@
+ extern const PDMDEVREG g_DeviceICH6_HDA;
+ extern const PDMDEVREG g_DeviceAudioSniffer;
+ extern const PDMDEVREG g_DeviceOHCI;
+-extern const PDMDEVREG g_DeviceEHCI;
+ extern const PDMDEVREG g_DeviceACPI;
+ extern const PDMDEVREG g_DeviceDMA;
+ extern const PDMDEVREG g_DeviceFloppyController;
+--- VirtualBox-4.1.18.orig/src/VBox/Main/include/ExtPackManagerImpl.h 2012-06-20 10:17:33.000000000 -0300
++++ /dev/null 2012-07-24 14:48:18.638572110 -0300
+@@ -1,245 +0,0 @@
+-/* $Id: ExtPackManagerImpl.h $ */
+-/** @file
+- * VirtualBox Main - interface for Extension Packs, VBoxSVC & VBoxC.
+- */
+-
+-/*
+- * Copyright (C) 2010 Oracle Corporation
+- *
+- * This file is part of VirtualBox Open Source Edition (OSE), as
+- * available from http://www.virtualbox.org. This file is free software;
+- * you can redistribute it and/or modify it under the terms of the GNU
+- * General Public License (GPL) as published by the Free Software
+- * Foundation, in version 2 as it comes in the "COPYING" file of the
+- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+- */
+-
+-#ifndef ____H_EXTPACKMANAGERIMPL
+-#define ____H_EXTPACKMANAGERIMPL
+-
+-#include "VirtualBoxBase.h"
+-#include <VBox/ExtPack/ExtPack.h>
+-#include <iprt/fs.h>
+-
+-/**
+- * An extension pack file.
+- */
+-class ATL_NO_VTABLE ExtPackFile :
+- public VirtualBoxBase,
+- VBOX_SCRIPTABLE_IMPL(IExtPackFile)
+-{
+-public:
+- /** @name COM and internal init/term/mapping cruft.
+- * @{ */
+- VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(ExtPackFile, IExtPackFile)
+- DECLARE_NOT_AGGREGATABLE(ExtPackFile)
+- DECLARE_PROTECT_FINAL_CONSTRUCT()
+- BEGIN_COM_MAP(ExtPackFile)
+- VBOX_DEFAULT_INTERFACE_ENTRIES(IExtPackFile)
+- COM_INTERFACE_ENTRY(IExtPackBase)
+- END_COM_MAP()
+- DECLARE_EMPTY_CTOR_DTOR(ExtPackFile)
+-
+- HRESULT FinalConstruct();
+- void FinalRelease();
+- HRESULT initWithFile(const char *a_pszFile, const char *a_pszDigest, class ExtPackManager *a_pExtPackMgr, VirtualBox *a_pVirtualBox);
+- void uninit();
+- RTMEMEF_NEW_AND_DELETE_OPERATORS();
+- /** @} */
+-
+- /** @name IExtPackBase interfaces
+- * @{ */
+- STDMETHOD(COMGETTER(Name))(BSTR *a_pbstrName);
+- STDMETHOD(COMGETTER(Description))(BSTR *a_pbstrDescription);
+- STDMETHOD(COMGETTER(Version))(BSTR *a_pbstrVersion);
+- STDMETHOD(COMGETTER(Revision))(ULONG *a_puRevision);
+- STDMETHOD(COMGETTER(VRDEModule))(BSTR *a_pbstrVrdeModule);
+- STDMETHOD(COMGETTER(PlugIns))(ComSafeArrayOut(IExtPackPlugIn *, a_paPlugIns));
+- STDMETHOD(COMGETTER(Usable))(BOOL *a_pfUsable);
+- STDMETHOD(COMGETTER(WhyUnusable))(BSTR *a_pbstrWhy);
+- STDMETHOD(COMGETTER(ShowLicense))(BOOL *a_pfShowIt);
+- STDMETHOD(COMGETTER(License))(BSTR *a_pbstrHtmlLicense);
+- STDMETHOD(QueryLicense)(IN_BSTR a_bstrPreferredLocale, IN_BSTR a_bstrPreferredLanguage,
+- IN_BSTR a_bstrFormat, BSTR *a_pbstrLicense);
+- /** @} */
+-
+- /** @name IExtPackFile interfaces
+- * @{ */
+- STDMETHOD(COMGETTER(FilePath))(BSTR *a_pbstrPath);
+- STDMETHOD(Install)(BOOL a_fReplace, IN_BSTR a_bstrDisplayInfo, IProgress **a_ppProgress);
+- /** @} */
+-
+-private:
+- /** @name Misc init helpers
+- * @{ */
+- HRESULT initFailed(const char *a_pszWhyFmt, ...);
+- /** @} */
+-
+-private:
+- struct Data;
+- /** Pointer to the private instance. */
+- Data *m;
+-
+- friend class ExtPackManager;
+-};
+-
+-
+-/**
+- * An installed extension pack.
+- */
+-class ATL_NO_VTABLE ExtPack :
+- public VirtualBoxBase,
+- VBOX_SCRIPTABLE_IMPL(IExtPack)
+-{
+-public:
+- /** @name COM and internal init/term/mapping cruft.
+- * @{ */
+- VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(ExtPack, IExtPack)
+- DECLARE_NOT_AGGREGATABLE(ExtPack)
+- DECLARE_PROTECT_FINAL_CONSTRUCT()
+- BEGIN_COM_MAP(ExtPack)
+- VBOX_DEFAULT_INTERFACE_ENTRIES(IExtPack)
+- COM_INTERFACE_ENTRY(IExtPackBase)
+- END_COM_MAP()
+- DECLARE_EMPTY_CTOR_DTOR(ExtPack)
+-
+- HRESULT FinalConstruct();
+- void FinalRelease();
+- HRESULT initWithDir(VBOXEXTPACKCTX a_enmContext, const char *a_pszName, const char *a_pszDir);
+- void uninit();
+- RTMEMEF_NEW_AND_DELETE_OPERATORS();
+- /** @} */
+-
+- /** @name IExtPackBase interfaces
+- * @{ */
+- STDMETHOD(COMGETTER(Name))(BSTR *a_pbstrName);
+- STDMETHOD(COMGETTER(Description))(BSTR *a_pbstrDescription);
+- STDMETHOD(COMGETTER(Version))(BSTR *a_pbstrVersion);
+- STDMETHOD(COMGETTER(Revision))(ULONG *a_puRevision);
+- STDMETHOD(COMGETTER(VRDEModule))(BSTR *a_pbstrVrdeModule);
+- STDMETHOD(COMGETTER(PlugIns))(ComSafeArrayOut(IExtPackPlugIn *, a_paPlugIns));
+- STDMETHOD(COMGETTER(Usable))(BOOL *a_pfUsable);
+- STDMETHOD(COMGETTER(WhyUnusable))(BSTR *a_pbstrWhy);
+- STDMETHOD(COMGETTER(ShowLicense))(BOOL *a_pfShowIt);
+- STDMETHOD(COMGETTER(License))(BSTR *a_pbstrHtmlLicense);
+- STDMETHOD(QueryLicense)(IN_BSTR a_bstrPreferredLocale, IN_BSTR a_bstrPreferredLanguage,
+- IN_BSTR a_bstrFormat, BSTR *a_pbstrLicense);
+- /** @} */
+-
+- /** @name IExtPack interfaces
+- * @{ */
+- STDMETHOD(QueryObject)(IN_BSTR a_bstrObjectId, IUnknown **a_ppUnknown);
+- /** @} */
+-
+- /** @name Internal interfaces used by ExtPackManager.
+- * @{ */
+- bool callInstalledHook(IVirtualBox *a_pVirtualBox, AutoWriteLock *a_pLock, PRTERRINFO pErrInfo);
+- HRESULT callUninstallHookAndClose(IVirtualBox *a_pVirtualBox, bool a_fForcedRemoval);
+- bool callVirtualBoxReadyHook(IVirtualBox *a_pVirtualBox, AutoWriteLock *a_pLock);
+- bool callConsoleReadyHook(IConsole *a_pConsole, AutoWriteLock *a_pLock);
+- bool callVmCreatedHook(IVirtualBox *a_pVirtualBox, IMachine *a_pMachine, AutoWriteLock *a_pLock);
+- bool callVmConfigureVmmHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock, int *a_pvrc);
+- bool callVmPowerOnHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock, int *a_pvrc);
+- bool callVmPowerOffHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock);
+- HRESULT checkVrde(void);
+- HRESULT getVrdpLibraryName(Utf8Str *a_pstrVrdeLibrary);
+- bool wantsToBeDefaultVrde(void) const;
+- HRESULT refresh(bool *pfCanDelete);
+- /** @} */
+-
+-protected:
+- /** @name Internal helper methods.
+- * @{ */
+- void probeAndLoad(void);
+- bool findModule(const char *a_pszName, const char *a_pszExt, VBOXEXTPACKMODKIND a_enmKind,
+- Utf8Str *a_ppStrFound, bool *a_pfNative, PRTFSOBJINFO a_pObjInfo) const;
+- static bool objinfoIsEqual(PCRTFSOBJINFO pObjInfo1, PCRTFSOBJINFO pObjInfo2);
+- /** @} */
+-
+- /** @name Extension Pack Helpers
+- * @{ */
+- static DECLCALLBACK(int) hlpFindModule(PCVBOXEXTPACKHLP pHlp, const char *pszName, const char *pszExt,
+- VBOXEXTPACKMODKIND enmKind, char *pszFound, size_t cbFound, bool *pfNative);
+- static DECLCALLBACK(int) hlpGetFilePath(PCVBOXEXTPACKHLP pHlp, const char *pszFilename, char *pszPath, size_t cbPath);
+- static DECLCALLBACK(VBOXEXTPACKCTX) hlpGetContext(PCVBOXEXTPACKHLP pHlp);
+- static DECLCALLBACK(int) hlpReservedN(PCVBOXEXTPACKHLP pHlp);
+- /** @} */
+-
+-private:
+- struct Data;
+- /** Pointer to the private instance. */
+- Data *m;
+-
+- friend class ExtPackManager;
+-};
+-
+-
+-/**
+- * Extension pack manager.
+- */
+-class ATL_NO_VTABLE ExtPackManager :
+- public VirtualBoxBase,
+- VBOX_SCRIPTABLE_IMPL(IExtPackManager)
+-{
+- /** @name COM and internal init/term/mapping cruft.
+- * @{ */
+- VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(ExtPackManager, IExtPackManager)
+- DECLARE_NOT_AGGREGATABLE(ExtPackManager)
+- DECLARE_PROTECT_FINAL_CONSTRUCT()
+- BEGIN_COM_MAP(ExtPackManager)
+- VBOX_DEFAULT_INTERFACE_ENTRIES(IExtPackManager)
+- END_COM_MAP()
+- DECLARE_EMPTY_CTOR_DTOR(ExtPackManager)
+-
+- HRESULT FinalConstruct();
+- void FinalRelease();
+- HRESULT initExtPackManager(VirtualBox *a_pVirtualBox, VBOXEXTPACKCTX a_enmContext);
+- void uninit();
+- RTMEMEF_NEW_AND_DELETE_OPERATORS();
+- /** @} */
+-
+- /** @name IExtPack interfaces
+- * @{ */
+- STDMETHOD(COMGETTER(InstalledExtPacks))(ComSafeArrayOut(IExtPack *, a_paExtPacks));
+- STDMETHOD(Find)(IN_BSTR a_bstrName, IExtPack **a_pExtPack);
+- STDMETHOD(OpenExtPackFile)(IN_BSTR a_bstrTarball, IExtPackFile **a_ppExtPackFile);
+- STDMETHOD(Uninstall)(IN_BSTR a_bstrName, BOOL a_fForcedRemoval, IN_BSTR a_bstrDisplayInfo, IProgress **a_ppProgress);
+- STDMETHOD(Cleanup)(void);
+- STDMETHOD(QueryAllPlugInsForFrontend)(IN_BSTR a_bstrFrontend, ComSafeArrayOut(BSTR, a_pabstrPlugInModules));
+- STDMETHOD(IsExtPackUsable(IN_BSTR a_bstrExtPack, BOOL *aUsable));
+- /** @} */
+-
+- /** @name Internal interfaces used by other Main classes.
+- * @{ */
+- static DECLCALLBACK(int) doInstallThreadProc(RTTHREAD hThread, void *pvJob);
+- HRESULT doInstall(ExtPackFile *a_pExtPackFile, bool a_fReplace, Utf8Str const *a_pstrDisplayInfo);
+- static DECLCALLBACK(int) doUninstallThreadProc(RTTHREAD hThread, void *pvJob);
+- HRESULT doUninstall(const Utf8Str *a_pstrName, bool a_fForcedRemoval, const Utf8Str *a_pstrDisplayInfo);
+- void callAllVirtualBoxReadyHooks(void);
+- void callAllConsoleReadyHooks(IConsole *a_pConsole);
+- void callAllVmCreatedHooks(IMachine *a_pMachine);
+- int callAllVmConfigureVmmHooks(IConsole *a_pConsole, PVM a_pVM);
+- int callAllVmPowerOnHooks(IConsole *a_pConsole, PVM a_pVM);
+- void callAllVmPowerOffHooks(IConsole *a_pConsole, PVM a_pVM);
+- HRESULT checkVrdeExtPack(Utf8Str const *a_pstrExtPack);
+- int getVrdeLibraryPathForExtPack(Utf8Str const *a_pstrExtPack, Utf8Str *a_pstrVrdeLibrary);
+- HRESULT getDefaultVrdeExtPack(Utf8Str *a_pstrExtPack);
+- bool isExtPackUsable(const char *a_pszExtPack);
+- void dumpAllToReleaseLog(void);
+- /** @} */
+-
+-private:
+- HRESULT runSetUidToRootHelper(Utf8Str const *a_pstrDisplayInfo, const char *a_pszCommand, ...);
+- ExtPack *findExtPack(const char *a_pszName);
+- void removeExtPack(const char *a_pszName);
+- HRESULT refreshExtPack(const char *a_pszName, bool a_fUnsuableIsError, ExtPack **a_ppExtPack);
+-
+-private:
+- struct Data;
+- /** Pointer to the private instance. */
+- Data *m;
+-};
+-
+-#endif
+-/* vi: set tabstop=4 shiftwidth=4 expandtab: */
+--- VirtualBox-4.1.18.orig/src/VBox/Main/include/ExtPackUtil.h 2012-06-20 10:17:33.000000000 -0300
++++ /dev/null 2012-07-24 14:48:18.638572110 -0300
+@@ -1,137 +0,0 @@
+-/* $Id: ExtPackUtil.h $ */
+-/** @file
+- * VirtualBox Main - Extension Pack Utilities and definitions, VBoxC, VBoxSVC, ++.
+- */
+-
+-/*
+- * Copyright (C) 2010 Oracle Corporation
+- *
+- * This file is part of VirtualBox Open Source Edition (OSE), as
+- * available from http://www.virtualbox.org. This file is free software;
+- * you can redistribute it and/or modify it under the terms of the GNU
+- * General Public License (GPL) as published by the Free Software
+- * Foundation, in version 2 as it comes in the "COPYING" file of the
+- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+- */
+-
+-#ifndef ____H_EXTPACKUTIL
+-#define ____H_EXTPACKUTIL
+-
+-#include <iprt/cpp/ministring.h>
+-#include <iprt/fs.h>
+-#include <iprt/vfs.h>
+-
+-
+-/** @name VBOX_EXTPACK_DESCRIPTION_NAME
+- * The name of the description file in an extension pack. */
+-#define VBOX_EXTPACK_DESCRIPTION_NAME "ExtPack.xml"
+-/** @name VBOX_EXTPACK_DESCRIPTION_NAME
+- * The name of the manifest file in an extension pack. */
+-#define VBOX_EXTPACK_MANIFEST_NAME "ExtPack.manifest"
+-/** @name VBOX_EXTPACK_SIGNATURE_NAME
+- * The name of the signature file in an extension pack. */
+-#define VBOX_EXTPACK_SIGNATURE_NAME "ExtPack.signature"
+-/** @name VBOX_EXTPACK_LICENSE_NAME_PREFIX
+- * The name prefix of a license file in an extension pack. There can be
+- * several license files in a pack, the variations being on locale, language
+- * and format (HTML, RTF, plain text). All extension packages shall include
+- * a */
+-#define VBOX_EXTPACK_LICENSE_NAME_PREFIX "ExtPack-license"
+-/** @name VBOX_EXTPACK_SUFFIX
+- * The suffix of a extension pack tarball. */
+-#define VBOX_EXTPACK_SUFFIX ".vbox-extpack"
+-
+-/** The minimum length (strlen) of a extension pack name. */
+-#define VBOX_EXTPACK_NAME_MIN_LEN 3
+-/** The max length (strlen) of a extension pack name. */
+-#define VBOX_EXTPACK_NAME_MAX_LEN 64
+-
+-/** The architecture-dependent application data subdirectory where the
+- * extension packs are installed. Relative to RTPathAppPrivateArch. */
+-#define VBOX_EXTPACK_INSTALL_DIR "ExtensionPacks"
+-/** The architecture-independent application data subdirectory where the
+- * certificates are installed. Relative to RTPathAppPrivateNoArch. */
+-#define VBOX_EXTPACK_CERT_DIR "ExtPackCertificates"
+-
+-/** The maximum entry name length.
+- * Play short and safe. */
+-#define VBOX_EXTPACK_MAX_MEMBER_NAME_LENGTH 128
+-
+-
+-/**
+- * Plug-in descriptor.
+- */
+-typedef struct VBOXEXTPACKPLUGINDESC
+-{
+- /** The name. */
+- RTCString strName;
+- /** The module name. */
+- RTCString strModule;
+- /** The description. */
+- RTCString strDescription;
+- /** The frontend or component which it plugs into. */
+- RTCString strFrontend;
+-} VBOXEXTPACKPLUGINDESC;
+-/** Pointer to a plug-in descriptor. */
+-typedef VBOXEXTPACKPLUGINDESC *PVBOXEXTPACKPLUGINDESC;
+-
+-/**
+- * Extension pack descriptor
+- *
+- * This is the internal representation of the ExtPack.xml.
+- */
+-typedef struct VBOXEXTPACKDESC
+-{
+- /** The name. */
+- RTCString strName;
+- /** The description. */
+- RTCString strDescription;
+- /** The version string. */
+- RTCString strVersion;
+- /** The edition string. */
+- RTCString strEdition;
+- /** The internal revision number. */
+- uint32_t uRevision;
+- /** The name of the main module. */
+- RTCString strMainModule;
+- /** The name of the VRDE module, empty if none. */
+- RTCString strVrdeModule;
+- /** The number of plug-in descriptors. */
+- uint32_t cPlugIns;
+- /** Pointer to an array of plug-in descriptors. */
+- PVBOXEXTPACKPLUGINDESC paPlugIns;
+- /** Whether to show the license prior to installation. */
+- bool fShowLicense;
+-} VBOXEXTPACKDESC;
+-
+-/** Pointer to a extension pack descriptor. */
+-typedef VBOXEXTPACKDESC *PVBOXEXTPACKDESC;
+-/** Pointer to a const extension pack descriptor. */
+-typedef VBOXEXTPACKDESC const *PCVBOXEXTPACKDESC;
+-
+-
+-void VBoxExtPackInitDesc(PVBOXEXTPACKDESC a_pExtPackDesc);
+-RTCString *VBoxExtPackLoadDesc(const char *a_pszDir, PVBOXEXTPACKDESC a_pExtPackDesc, PRTFSOBJINFO a_pObjInfo);
+-RTCString *VBoxExtPackLoadDescFromVfsFile(RTVFSFILE hVfsFile, PVBOXEXTPACKDESC a_pExtPackDesc, PRTFSOBJINFO a_pObjInfo);
+-RTCString *VBoxExtPackExtractNameFromTarballPath(const char *pszTarball);
+-void VBoxExtPackFreeDesc(PVBOXEXTPACKDESC a_pExtPackDesc);
+-bool VBoxExtPackIsValidName(const char *pszName);
+-bool VBoxExtPackIsValidMangledName(const char *pszMangledName, size_t cchMax = RTSTR_MAX);
+-RTCString *VBoxExtPackMangleName(const char *pszName);
+-RTCString *VBoxExtPackUnmangleName(const char *pszMangledName, size_t cbMax);
+-int VBoxExtPackCalcDir(char *pszExtPackDir, size_t cbExtPackDir, const char *pszParentDir, const char *pszName);
+-bool VBoxExtPackIsValidVersionString(const char *pszVersion);
+-bool VBoxExtPackIsValidEditionString(const char *pszEdition);
+-bool VBoxExtPackIsValidModuleString(const char *pszModule);
+-
+-int VBoxExtPackValidateMember(const char *pszName, RTVFSOBJTYPE enmType, RTVFSOBJ hVfsObj, char *pszError, size_t cbError);
+-int VBoxExtPackOpenTarFss(RTFILE hTarballFile, char *pszError, size_t cbError, PRTVFSFSSTREAM phTarFss, PRTMANIFEST phFileManifest);
+-int VBoxExtPackValidateTarball(RTFILE hTarballFile, const char *pszExtPackName,
+- const char *pszTarball, const char *pszTarballDigest,
+- char *pszError, size_t cbError,
+- PRTMANIFEST phValidManifest, PRTVFSFILE phXmlFile, RTCString *pStrDigest);
+-
+-
+-#endif
+-
+--- VirtualBox-4.1.18.orig/src/VBox/Main/src-all/ExtPackManagerImpl.cpp 2012-06-20 10:17:34.000000000 -0300
++++ /dev/null 2012-07-24 14:48:18.638572110 -0300
+@@ -1,3126 +0,0 @@
+-/* $Id: ExtPackManagerImpl.cpp $ */
+-/** @file
+- * VirtualBox Main - interface for Extension Packs, VBoxSVC & VBoxC.
+- */
+-
+-/*
+- * Copyright (C) 2010 Oracle Corporation
+- *
+- * This file is part of VirtualBox Open Source Edition (OSE), as
+- * available from http://www.virtualbox.org. This file is free software;
+- * you can redistribute it and/or modify it under the terms of the GNU
+- * General Public License (GPL) as published by the Free Software
+- * Foundation, in version 2 as it comes in the "COPYING" file of the
+- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+- */
+-
+-
+-/*******************************************************************************
+-* Header Files *
+-*******************************************************************************/
+-#include "ExtPackManagerImpl.h"
+-#include "ExtPackUtil.h"
+-
+-#include <iprt/buildconfig.h>
+-#include <iprt/ctype.h>
+-#include <iprt/dir.h>
+-#include <iprt/env.h>
+-#include <iprt/file.h>
+-#include <iprt/ldr.h>
+-#include <iprt/manifest.h>
+-#include <iprt/param.h>
+-#include <iprt/path.h>
+-#include <iprt/pipe.h>
+-#include <iprt/process.h>
+-#include <iprt/string.h>
+-
+-#include <VBox/com/array.h>
+-#include <VBox/com/ErrorInfo.h>
+-#include <VBox/err.h>
+-#include <VBox/log.h>
+-#include <VBox/sup.h>
+-#include <VBox/version.h>
+-#include "AutoCaller.h"
+-#include "Global.h"
+-#include "ProgressImpl.h"
+-#include "SystemPropertiesImpl.h"
+-#include "VirtualBoxImpl.h"
+-
+-
+-/*******************************************************************************
+-* Defined Constants And Macros *
+-*******************************************************************************/
+-/** @name VBOX_EXTPACK_HELPER_NAME
+- * The name of the utility application we employ to install and uninstall the
+- * extension packs. This is a set-uid-to-root binary on unixy platforms, which
+- * is why it has to be a separate application.
+- */
+-#if defined(RT_OS_WINDOWS) || defined(RT_OS_OS2)
+-# define VBOX_EXTPACK_HELPER_NAME "VBoxExtPackHelperApp.exe"
+-#else
+-# define VBOX_EXTPACK_HELPER_NAME "VBoxExtPackHelperApp"
+-#endif
+-
+-
+-/*******************************************************************************
+-* Structures and Typedefs *
+-*******************************************************************************/
+-struct ExtPackBaseData
+-{
+-public:
+- /** The extension pack descriptor (loaded from the XML, mostly). */
+- VBOXEXTPACKDESC Desc;
+- /** The file system object info of the XML file.
+- * This is for detecting changes and save time in refresh(). */
+- RTFSOBJINFO ObjInfoDesc;
+- /** Whether it's usable or not. */
+- bool fUsable;
+- /** Why it is unusable. */
+- Utf8Str strWhyUnusable;
+-};
+-
+-/**
+- * Private extension pack data.
+- */
+-struct ExtPackFile::Data : public ExtPackBaseData
+-{
+-public:
+- /** The path to the tarball. */
+- Utf8Str strExtPackFile;
+- /** The SHA-256 hash of the file (as string). */
+- Utf8Str strDigest;
+- /** The file handle of the extension pack file. */
+- RTFILE hExtPackFile;
+- /** Our manifest for the tarball. */
+- RTMANIFEST hOurManifest;
+- /** Pointer to the extension pack manager. */
+- ComObjPtr<ExtPackManager> ptrExtPackMgr;
+- /** Pointer to the VirtualBox object so we can create a progress object. */
+- VirtualBox *pVirtualBox;
+-
+- RTMEMEF_NEW_AND_DELETE_OPERATORS();
+-};
+-
+-/**
+- * Private extension pack data.
+- */
+-struct ExtPack::Data : public ExtPackBaseData
+-{
+-public:
+- /** Where the extension pack is located. */
+- Utf8Str strExtPackPath;
+- /** The file system object info of the extension pack directory.
+- * This is for detecting changes and save time in refresh(). */
+- RTFSOBJINFO ObjInfoExtPack;
+- /** The full path to the main module. */
+- Utf8Str strMainModPath;
+- /** The file system object info of the main module.
+- * This is used to determin whether to bother try reload it. */
+- RTFSOBJINFO ObjInfoMainMod;
+- /** The module handle of the main extension pack module. */
+- RTLDRMOD hMainMod;
+-
+- /** The helper callbacks for the extension pack. */
+- VBOXEXTPACKHLP Hlp;
+- /** Pointer back to the extension pack object (for Hlp methods). */
+- ExtPack *pThis;
+- /** The extension pack registration structure. */
+- PCVBOXEXTPACKREG pReg;
+- /** The current context. */
+- VBOXEXTPACKCTX enmContext;
+- /** Set if we've made the pfnVirtualBoxReady or pfnConsoleReady call. */
+- bool fMadeReadyCall;
+-
+- RTMEMEF_NEW_AND_DELETE_OPERATORS();
+-};
+-
+-/** List of extension packs. */
+-typedef std::list< ComObjPtr<ExtPack> > ExtPackList;
+-
+-/**
+- * Private extension pack manager data.
+- */
+-struct ExtPackManager::Data
+-{
+- /** The directory where the extension packs are installed. */
+- Utf8Str strBaseDir;
+- /** The directory where the certificates this installation recognizes are
+- * stored. */
+- Utf8Str strCertificatDirPath;
+- /** The list of installed extension packs. */
+- ExtPackList llInstalledExtPacks;
+- /** Pointer to the VirtualBox object, our parent. */
+- VirtualBox *pVirtualBox;
+- /** The current context. */
+- VBOXEXTPACKCTX enmContext;
+-#if !defined(RT_OS_WINDOWS) && !defined(RT_OS_DARWIN)
+- /** File handle for the VBoxVMM libary which we slurp because ExtPacks depend on it. */
+- RTLDRMOD hVBoxVMM;
+-#endif
+-
+- RTMEMEF_NEW_AND_DELETE_OPERATORS();
+-};
+-
+-/**
+- * Extension pack installation job.
+- */
+-typedef struct EXTPACKINSTALLJOB
+-{
+- /** Smart pointer to the extension pack file. */
+- ComPtr<ExtPackFile> ptrExtPackFile;
+- /** The replace argument. */
+- bool fReplace;
+- /** The display info argument. */
+- Utf8Str strDisplayInfo;
+- /** Smart pointer to the extension manager. */
+- ComPtr<ExtPackManager> ptrExtPackMgr;
+- /** Smart pointer to the progress object for this job. */
+- ComObjPtr<Progress> ptrProgress;
+-} EXTPACKINSTALLJOB;
+-/** Pointer to an extension pack installation job. */
+-typedef EXTPACKINSTALLJOB *PEXTPACKINSTALLJOB;
+-
+-/**
+- * Extension pack uninstallation job.
+- */
+-typedef struct EXTPACKUNINSTALLJOB
+-{
+- /** Smart pointer to the extension manager. */
+- ComPtr<ExtPackManager> ptrExtPackMgr;
+- /** The name of the extension pack. */
+- Utf8Str strName;
+- /** The replace argument. */
+- bool fForcedRemoval;
+- /** The display info argument. */
+- Utf8Str strDisplayInfo;
+- /** Smart pointer to the progress object for this job. */
+- ComObjPtr<Progress> ptrProgress;
+-} EXTPACKUNINSTALLJOB;
+-/** Pointer to an extension pack uninstallation job. */
+-typedef EXTPACKUNINSTALLJOB *PEXTPACKUNINSTALLJOB;
+-
+-
+-DEFINE_EMPTY_CTOR_DTOR(ExtPackFile)
+-
+-/**
+- * Called by ComObjPtr::createObject when creating the object.
+- *
+- * Just initialize the basic object state, do the rest in initWithDir().
+- *
+- * @returns S_OK.
+- */
+-HRESULT ExtPackFile::FinalConstruct()
+-{
+- m = NULL;
+- return BaseFinalConstruct();
+-}
+-
+-/**
+- * Initializes the extension pack by reading its file.
+- *
+- * @returns COM status code.
+- * @param a_pszFile The path to the extension pack file.
+- * @param a_pszDigest The SHA-256 digest of the file. Or an empty string.
+- * @param a_pExtPackMgr Pointer to the extension pack manager.
+- * @param a_pVirtualBox Pointer to the VirtualBox object.
+- */
+-HRESULT ExtPackFile::initWithFile(const char *a_pszFile, const char *a_pszDigest, ExtPackManager *a_pExtPackMgr, VirtualBox *a_pVirtualBox)
+-{
+- AutoInitSpan autoInitSpan(this);
+- AssertReturn(autoInitSpan.isOk(), E_FAIL);
+-
+- /*
+- * Allocate + initialize our private data.
+- */
+- m = new ExtPackFile::Data;
+- VBoxExtPackInitDesc(&m->Desc);
+- RT_ZERO(m->ObjInfoDesc);
+- m->fUsable = false;
+- m->strWhyUnusable = tr("ExtPack::init failed");
+- m->strExtPackFile = a_pszFile;
+- m->strDigest = a_pszDigest;
+- m->hExtPackFile = NIL_RTFILE;
+- m->hOurManifest = NIL_RTMANIFEST;
+- m->ptrExtPackMgr = a_pExtPackMgr;
+- m->pVirtualBox = a_pVirtualBox;
+-
+- RTCString *pstrTarName = VBoxExtPackExtractNameFromTarballPath(a_pszFile);
+- if (pstrTarName)
+- {
+- m->Desc.strName = *pstrTarName;
+- delete pstrTarName;
+- pstrTarName = NULL;
+- }
+-
+- autoInitSpan.setSucceeded();
+-
+- /*
+- * Try open the extension pack and check that it is a regular file.
+- */
+- int vrc = RTFileOpen(&m->hExtPackFile, a_pszFile,
+- RTFILE_O_READ | RTFILE_O_DENY_WRITE | RTFILE_O_OPEN);
+- if (RT_FAILURE(vrc))
+- {
+- if (vrc == VERR_FILE_NOT_FOUND || vrc == VERR_PATH_NOT_FOUND)
+- return initFailed(tr("'%s' file not found"), a_pszFile);
+- return initFailed(tr("RTFileOpen('%s',,) failed with %Rrc"), a_pszFile, vrc);
+- }
+-
+- RTFSOBJINFO ObjInfo;
+- vrc = RTFileQueryInfo(m->hExtPackFile, &ObjInfo, RTFSOBJATTRADD_UNIX);
+- if (RT_FAILURE(vrc))
+- return initFailed(tr("RTFileQueryInfo failed with %Rrc on '%s'"), vrc, a_pszFile);
+- if (!RTFS_IS_FILE(ObjInfo.Attr.fMode))
+- return initFailed(tr("Not a regular file: %s"), a_pszFile);
+-
+- /*
+- * Validate the tarball and extract the XML file.
+- */
+- char szError[8192];
+- RTVFSFILE hXmlFile;
+- vrc = VBoxExtPackValidateTarball(m->hExtPackFile, NULL /*pszExtPackName*/, a_pszFile, a_pszDigest,
+- szError, sizeof(szError), &m->hOurManifest, &hXmlFile, &m->strDigest);
+- if (RT_FAILURE(vrc))
+- return initFailed(tr("%s"), szError);
+-
+- /*
+- * Parse the XML.
+- */
+- RTCString strSavedName(m->Desc.strName);
+- RTCString *pStrLoadErr = VBoxExtPackLoadDescFromVfsFile(hXmlFile, &m->Desc, &m->ObjInfoDesc);
+- RTVfsFileRelease(hXmlFile);
+- if (pStrLoadErr != NULL)
+- {
+- m->strWhyUnusable.printf(tr("Failed to the xml file: %s"), pStrLoadErr->c_str());
+- m->Desc.strName = strSavedName;
+- delete pStrLoadErr;
+- return S_OK;
+- }
+-
+- /*
+- * Match the tarball name with the name from the XML.
+- */
+- /** @todo drop this restriction after the old install interface is
+- * dropped. */
+- if (!strSavedName.equalsIgnoreCase(m->Desc.strName))
+- return initFailed(tr("Extension pack name mismatch between the downloaded file and the XML inside it (xml='%s' file='%s')"),
+- m->Desc.strName.c_str(), strSavedName.c_str());
+-
+- m->fUsable = true;
+- m->strWhyUnusable.setNull();
+- return S_OK;
+-}
+-
+-/**
+- * Protected helper that formats the strWhyUnusable value.
+- *
+- * @returns S_OK
+- * @param a_pszWhyFmt Why it failed, format string.
+- * @param ... The format arguments.
+- */
+-HRESULT ExtPackFile::initFailed(const char *a_pszWhyFmt, ...)
+-{
+- va_list va;
+- va_start(va, a_pszWhyFmt);
+- m->strWhyUnusable.printfV(a_pszWhyFmt, va);
+- va_end(va);
+- return S_OK;
+-}
+-
+-/**
+- * COM cruft.
+- */
+-void ExtPackFile::FinalRelease()
+-{
+- uninit();
+- BaseFinalRelease();
+-}
+-
+-/**
+- * Do the actual cleanup.
+- */
+-void ExtPackFile::uninit()
+-{
+- /* Enclose the state transition Ready->InUninit->NotReady */
+- AutoUninitSpan autoUninitSpan(this);
+- if (!autoUninitSpan.uninitDone() && m != NULL)
+- {
+- VBoxExtPackFreeDesc(&m->Desc);
+- RTFileClose(m->hExtPackFile);
+- m->hExtPackFile = NIL_RTFILE;
+- RTManifestRelease(m->hOurManifest);
+- m->hOurManifest = NIL_RTMANIFEST;
+-
+- delete m;
+- m = NULL;
+- }
+-}
+-
+-STDMETHODIMP ExtPackFile::COMGETTER(Name)(BSTR *a_pbstrName)
+-{
+- CheckComArgOutPointerValid(a_pbstrName);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- Bstr str(m->Desc.strName);
+- str.cloneTo(a_pbstrName);
+- }
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackFile::COMGETTER(Description)(BSTR *a_pbstrDescription)
+-{
+- CheckComArgOutPointerValid(a_pbstrDescription);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- Bstr str(m->Desc.strDescription);
+- str.cloneTo(a_pbstrDescription);
+- }
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackFile::COMGETTER(Version)(BSTR *a_pbstrVersion)
+-{
+- CheckComArgOutPointerValid(a_pbstrVersion);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- /* HACK ALERT: This is for easing backporting to 4.1. The edition stuff
+- will be changed into a separate */
+- if (m->Desc.strEdition.isEmpty())
+- {
+- Bstr str(m->Desc.strVersion);
+- str.cloneTo(a_pbstrVersion);
+- }
+- else
+- {
+- RTCString strHack(m->Desc.strVersion);
+- strHack.append('-');
+- strHack.append(m->Desc.strEdition);
+-
+- Bstr str(strHack);
+- str.cloneTo(a_pbstrVersion);
+- }
+- }
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackFile::COMGETTER(Revision)(ULONG *a_puRevision)
+-{
+- CheckComArgOutPointerValid(a_puRevision);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- *a_puRevision = m->Desc.uRevision;
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackFile::COMGETTER(VRDEModule)(BSTR *a_pbstrVrdeModule)
+-{
+- CheckComArgOutPointerValid(a_pbstrVrdeModule);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- Bstr str(m->Desc.strVrdeModule);
+- str.cloneTo(a_pbstrVrdeModule);
+- }
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackFile::COMGETTER(PlugIns)(ComSafeArrayOut(IExtPackPlugIn *, a_paPlugIns))
+-{
+- /** @todo implement plug-ins. */
+-#ifdef VBOX_WITH_XPCOM
+- NOREF(a_paPlugIns);
+- NOREF(a_paPlugInsSize);
+-#endif
+- ReturnComNotImplemented();
+-}
+-
+-STDMETHODIMP ExtPackFile::COMGETTER(Usable)(BOOL *a_pfUsable)
+-{
+- CheckComArgOutPointerValid(a_pfUsable);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- *a_pfUsable = m->fUsable;
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackFile::COMGETTER(WhyUnusable)(BSTR *a_pbstrWhy)
+-{
+- CheckComArgOutPointerValid(a_pbstrWhy);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- m->strWhyUnusable.cloneTo(a_pbstrWhy);
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackFile::COMGETTER(ShowLicense)(BOOL *a_pfShowIt)
+-{
+- CheckComArgOutPointerValid(a_pfShowIt);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- *a_pfShowIt = m->Desc.fShowLicense;
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackFile::COMGETTER(License)(BSTR *a_pbstrHtmlLicense)
+-{
+- Bstr bstrHtml("html");
+- return QueryLicense(Bstr::Empty.raw(), Bstr::Empty.raw(), bstrHtml.raw(), a_pbstrHtmlLicense);
+-}
+-
+-/* Same as ExtPack::QueryLicense, should really explore the subject of base classes here... */
+-STDMETHODIMP ExtPackFile::QueryLicense(IN_BSTR a_bstrPreferredLocale, IN_BSTR a_bstrPreferredLanguage, IN_BSTR a_bstrFormat,
+- BSTR *a_pbstrLicense)
+-{
+- /*
+- * Validate input.
+- */
+- CheckComArgOutPointerValid(a_pbstrLicense);
+- CheckComArgNotNull(a_bstrPreferredLocale);
+- CheckComArgNotNull(a_bstrPreferredLanguage);
+- CheckComArgNotNull(a_bstrFormat);
+-
+- Utf8Str strPreferredLocale(a_bstrPreferredLocale);
+- if (strPreferredLocale.length() != 2 && strPreferredLocale.length() != 0)
+- return setError(E_FAIL, tr("The preferred locale is a two character string or empty."));
+-
+- Utf8Str strPreferredLanguage(a_bstrPreferredLanguage);
+- if (strPreferredLanguage.length() != 2 && strPreferredLanguage.length() != 0)
+- return setError(E_FAIL, tr("The preferred lanuage is a two character string or empty."));
+-
+- Utf8Str strFormat(a_bstrFormat);
+- if ( !strFormat.equals("html")
+- && !strFormat.equals("rtf")
+- && !strFormat.equals("txt"))
+- return setError(E_FAIL, tr("The license format can only have the values 'html', 'rtf' and 'txt'."));
+-
+- /*
+- * Combine the options to form a file name before locking down anything.
+- */
+- char szName[sizeof(VBOX_EXTPACK_LICENSE_NAME_PREFIX "-de_DE.html") + 2];
+- if (strPreferredLocale.isNotEmpty() && strPreferredLanguage.isNotEmpty())
+- RTStrPrintf(szName, sizeof(szName), VBOX_EXTPACK_LICENSE_NAME_PREFIX "-%s_%s.%s",
+- strPreferredLocale.c_str(), strPreferredLanguage.c_str(), strFormat.c_str());
+- else if (strPreferredLocale.isNotEmpty())
+- RTStrPrintf(szName, sizeof(szName), VBOX_EXTPACK_LICENSE_NAME_PREFIX "-%s.%s", strPreferredLocale.c_str(), strFormat.c_str());
+- else if (strPreferredLanguage.isNotEmpty())
+- RTStrPrintf(szName, sizeof(szName), VBOX_EXTPACK_LICENSE_NAME_PREFIX "-_%s.%s", strPreferredLocale.c_str(), strFormat.c_str());
+- else
+- RTStrPrintf(szName, sizeof(szName), VBOX_EXTPACK_LICENSE_NAME_PREFIX ".%s", strFormat.c_str());
+-
+- /*
+- * Lock the extension pack. We need a write lock here as there must not be
+- * concurrent accesses to the tar file handle.
+- */
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+-
+- /*
+- * Do not permit this query on a pack that isn't considered usable (could
+- * be marked so because of bad license files).
+- */
+- if (!m->fUsable)
+- hrc = setError(E_FAIL, tr("%s"), m->strWhyUnusable.c_str());
+- else
+- {
+- /*
+- * Look it up in the manifest before scanning the tarball for it
+- */
+- if (RTManifestEntryExists(m->hOurManifest, szName))
+- {
+- RTVFSFSSTREAM hTarFss;
+- char szError[8192];
+- int vrc = VBoxExtPackOpenTarFss(m->hExtPackFile, szError, sizeof(szError), &hTarFss, NULL);
+- if (RT_SUCCESS(vrc))
+- {
+- for (;;)
+- {
+- /* Get the first/next. */
+- char *pszName;
+- RTVFSOBJ hVfsObj;
+- RTVFSOBJTYPE enmType;
+- vrc = RTVfsFsStrmNext(hTarFss, &pszName, &enmType, &hVfsObj);
+- if (RT_FAILURE(vrc))
+- {
+- if (vrc != VERR_EOF)
+- hrc = setError(VBOX_E_IPRT_ERROR, tr("RTVfsFsStrmNext failed: %Rrc"), vrc);
+- else
+- hrc = setError(E_UNEXPECTED, tr("'%s' was found in the manifest but not in the tarball"), szName);
+- break;
+- }
+-
+- /* Is this it? */
+- const char *pszAdjName = pszName[0] == '.' && pszName[1] == '/' ? &pszName[2] : pszName;
+- if ( !strcmp(pszAdjName, szName)
+- && ( enmType == RTVFSOBJTYPE_IO_STREAM
+- || enmType == RTVFSOBJTYPE_FILE))
+- {
+- RTVFSIOSTREAM hVfsIos = RTVfsObjToIoStream(hVfsObj);
+- RTVfsObjRelease(hVfsObj);
+- RTStrFree(pszName);
+-
+- /* Load the file into memory. */
+- RTFSOBJINFO ObjInfo;
+- vrc = RTVfsIoStrmQueryInfo(hVfsIos, &ObjInfo, RTFSOBJATTRADD_NOTHING);
+- if (RT_SUCCESS(vrc))
+- {
+- size_t cbFile = (size_t)ObjInfo.cbObject;
+- void *pvFile = RTMemAllocZ(cbFile + 1);
+- if (pvFile)
+- {
+- vrc = RTVfsIoStrmRead(hVfsIos, pvFile, cbFile, true /*fBlocking*/, NULL);
+- if (RT_SUCCESS(vrc))
+- {
+- /* try translate it into a string we can return. */
+- Bstr bstrLicense((const char *)pvFile, cbFile);
+- if (bstrLicense.isNotEmpty())
+- {
+- bstrLicense.detachTo(a_pbstrLicense);
+- hrc = S_OK;
+- }
+- else
+- hrc = setError(VBOX_E_IPRT_ERROR,
+- tr("The license file '%s' is empty or contains invalid UTF-8 encoding"),
+- szName);
+- }
+- else
+- hrc = setError(VBOX_E_IPRT_ERROR, tr("Failed to read '%s': %Rrc"), szName, vrc);
+- RTMemFree(pvFile);
+- }
+- else
+- hrc = setError(E_OUTOFMEMORY, tr("Failed to allocate %zu bytes for '%s'"), cbFile, szName);
+- }
+- else
+- hrc = setError(VBOX_E_IPRT_ERROR, tr("RTVfsIoStrmQueryInfo on '%s': %Rrc"), szName, vrc);
+- RTVfsIoStrmRelease(hVfsIos);
+- break;
+- }
+-
+- /* Release current. */
+- RTVfsObjRelease(hVfsObj);
+- RTStrFree(pszName);
+- }
+- RTVfsFsStrmRelease(hTarFss);
+- }
+- else
+- hrc = setError(VBOX_E_OBJECT_NOT_FOUND, tr("%s"), szError);
+- }
+- else
+- hrc = setError(VBOX_E_OBJECT_NOT_FOUND, tr("The license file '%s' was not found in '%s'"),
+- szName, m->strExtPackFile.c_str());
+- }
+- }
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackFile::COMGETTER(FilePath)(BSTR *a_pbstrPath)
+-{
+- CheckComArgOutPointerValid(a_pbstrPath);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- m->strExtPackFile.cloneTo(a_pbstrPath);
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackFile::Install(BOOL a_fReplace, IN_BSTR a_bstrDisplayInfo, IProgress **a_ppProgress)
+-{
+- if (a_ppProgress)
+- *a_ppProgress = NULL;
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- if (m->fUsable)
+- {
+- PEXTPACKINSTALLJOB pJob = NULL;
+- try
+- {
+- pJob = new EXTPACKINSTALLJOB;
+- pJob->ptrExtPackFile = this;
+- pJob->fReplace = a_fReplace != FALSE;
+- pJob->strDisplayInfo = a_bstrDisplayInfo;
+- pJob->ptrExtPackMgr = m->ptrExtPackMgr;
+- hrc = pJob->ptrProgress.createObject();
+- if (SUCCEEDED(hrc))
+- {
+- Bstr bstrDescription = tr("Installing extension pack");
+- hrc = pJob->ptrProgress->init(
+-#ifndef VBOX_COM_INPROC
+- m->pVirtualBox,
+-#endif
+- static_cast<IExtPackFile *>(this),
+- bstrDescription.raw(),
+- FALSE /*aCancelable*/,
+- NULL /*aId*/);
+- }
+- if (SUCCEEDED(hrc))
+- {
+- ComPtr<Progress> ptrProgress = pJob->ptrProgress;
+- int vrc = RTThreadCreate(NULL /*phThread*/, ExtPackManager::doInstallThreadProc, pJob, 0,
+- RTTHREADTYPE_DEFAULT, 0 /*fFlags*/, "ExtPackInst");
+- if (RT_SUCCESS(vrc))
+- {
+- pJob = NULL; /* the thread deletes it */
+- ptrProgress.queryInterfaceTo(a_ppProgress);
+- }
+- else
+- hrc = setError(VBOX_E_IPRT_ERROR, tr("RTThreadCreate failed with %Rrc"), vrc);
+- }
+- }
+- catch (std::bad_alloc)
+- {
+- hrc = E_OUTOFMEMORY;
+- }
+- if (pJob)
+- delete pJob;
+- }
+- else
+- hrc = setError(E_FAIL, "%s", m->strWhyUnusable.c_str());
+- }
+- return hrc;
+-}
+-
+-
+-
+-
+-
+-DEFINE_EMPTY_CTOR_DTOR(ExtPack)
+-
+-/**
+- * Called by ComObjPtr::createObject when creating the object.
+- *
+- * Just initialize the basic object state, do the rest in initWithDir().
+- *
+- * @returns S_OK.
+- */
+-HRESULT ExtPack::FinalConstruct()
+-{
+- m = NULL;
+- return S_OK;
+-}
+-
+-/**
+- * Initializes the extension pack by reading its file.
+- *
+- * @returns COM status code.
+- * @param a_enmContext The context we're in.
+- * @param a_pszName The name of the extension pack. This is also the
+- * name of the subdirector under @a a_pszParentDir
+- * where the extension pack is installed.
+- * @param a_pszDir The extension pack directory name.
+- */
+-HRESULT ExtPack::initWithDir(VBOXEXTPACKCTX a_enmContext, const char *a_pszName, const char *a_pszDir)
+-{
+- AutoInitSpan autoInitSpan(this);
+- AssertReturn(autoInitSpan.isOk(), E_FAIL);
+-
+- static const VBOXEXTPACKHLP s_HlpTmpl =
+- {
+- /* u32Version = */ VBOXEXTPACKHLP_VERSION,
+- /* uVBoxFullVersion = */ VBOX_FULL_VERSION,
+- /* uVBoxVersionRevision = */ 0,
+- /* u32Padding = */ 0,
+- /* pszVBoxVersion = */ "",
+- /* pfnFindModule = */ ExtPack::hlpFindModule,
+- /* pfnGetFilePath = */ ExtPack::hlpGetFilePath,
+- /* pfnGetContext = */ ExtPack::hlpGetContext,
+- /* pfnReserved1 = */ ExtPack::hlpReservedN,
+- /* pfnReserved2 = */ ExtPack::hlpReservedN,
+- /* pfnReserved3 = */ ExtPack::hlpReservedN,
+- /* pfnReserved4 = */ ExtPack::hlpReservedN,
+- /* pfnReserved5 = */ ExtPack::hlpReservedN,
+- /* pfnReserved6 = */ ExtPack::hlpReservedN,
+- /* pfnReserved7 = */ ExtPack::hlpReservedN,
+- /* pfnReserved8 = */ ExtPack::hlpReservedN,
+- /* pfnReserved9 = */ ExtPack::hlpReservedN,
+- /* u32EndMarker = */ VBOXEXTPACKHLP_VERSION
+- };
+-
+- /*
+- * Allocate + initialize our private data.
+- */
+- m = new Data;
+- VBoxExtPackInitDesc(&m->Desc);
+- m->Desc.strName = a_pszName;
+- RT_ZERO(m->ObjInfoDesc);
+- m->fUsable = false;
+- m->strWhyUnusable = tr("ExtPack::init failed");
+- m->strExtPackPath = a_pszDir;
+- RT_ZERO(m->ObjInfoExtPack);
+- m->strMainModPath.setNull();
+- RT_ZERO(m->ObjInfoMainMod);
+- m->hMainMod = NIL_RTLDRMOD;
+- m->Hlp = s_HlpTmpl;
+- m->Hlp.pszVBoxVersion = RTBldCfgVersion();
+- m->Hlp.uVBoxInternalRevision = RTBldCfgRevision();
+- m->pThis = this;
+- m->pReg = NULL;
+- m->enmContext = a_enmContext;
+- m->fMadeReadyCall = false;
+-
+- /*
+- * Probe the extension pack (this code is shared with refresh()).
+- */
+- probeAndLoad();
+-
+- autoInitSpan.setSucceeded();
+- return S_OK;
+-}
+-
+-/**
+- * COM cruft.
+- */
+-void ExtPack::FinalRelease()
+-{
+- uninit();
+-}
+-
+-/**
+- * Do the actual cleanup.
+- */
+-void ExtPack::uninit()
+-{
+- /* Enclose the state transition Ready->InUninit->NotReady */
+- AutoUninitSpan autoUninitSpan(this);
+- if (!autoUninitSpan.uninitDone() && m != NULL)
+- {
+- if (m->hMainMod != NIL_RTLDRMOD)
+- {
+- AssertPtr(m->pReg);
+- if (m->pReg->pfnUnload != NULL)
+- m->pReg->pfnUnload(m->pReg);
+-
+- RTLdrClose(m->hMainMod);
+- m->hMainMod = NIL_RTLDRMOD;
+- m->pReg = NULL;
+- }
+-
+- VBoxExtPackFreeDesc(&m->Desc);
+-
+- delete m;
+- m = NULL;
+- }
+-}
+-
+-
+-/**
+- * Calls the installed hook.
+- *
+- * @returns true if we left the lock, false if we didn't.
+- * @param a_pVirtualBox The VirtualBox interface.
+- * @param a_pLock The write lock held by the caller.
+- * @param pErrInfo Where to return error information.
+- */
+-bool ExtPack::callInstalledHook(IVirtualBox *a_pVirtualBox, AutoWriteLock *a_pLock, PRTERRINFO pErrInfo)
+-{
+- if ( m != NULL
+- && m->hMainMod != NIL_RTLDRMOD)
+- {
+- if (m->pReg->pfnInstalled)
+- {
+- ComPtr<ExtPack> ptrSelfRef = this;
+- a_pLock->release();
+- pErrInfo->rc = m->pReg->pfnInstalled(m->pReg, a_pVirtualBox, pErrInfo);
+- a_pLock->acquire();
+- return true;
+- }
+- }
+- pErrInfo->rc = VINF_SUCCESS;
+- return false;
+-}
+-
+-/**
+- * Calls the uninstall hook and closes the module.
+- *
+- * @returns S_OK or COM error status with error information.
+- * @param a_pVirtualBox The VirtualBox interface.
+- * @param a_fForcedRemoval When set, we'll ignore complaints from the
+- * uninstall hook.
+- * @remarks The caller holds the manager's write lock, not released.
+- */
+-HRESULT ExtPack::callUninstallHookAndClose(IVirtualBox *a_pVirtualBox, bool a_fForcedRemoval)
+-{
+- HRESULT hrc = S_OK;
+-
+- if ( m != NULL
+- && m->hMainMod != NIL_RTLDRMOD)
+- {
+- if (m->pReg->pfnUninstall && !a_fForcedRemoval)
+- {
+- int vrc = m->pReg->pfnUninstall(m->pReg, a_pVirtualBox);
+- if (RT_FAILURE(vrc))
+- {
+- LogRel(("ExtPack pfnUninstall returned %Rrc for %s\n", vrc, m->Desc.strName.c_str()));
+- if (!a_fForcedRemoval)
+- hrc = setError(E_FAIL, tr("pfnUninstall returned %Rrc"), vrc);
+- }
+- }
+- if (SUCCEEDED(hrc))
+- {
+- RTLdrClose(m->hMainMod);
+- m->hMainMod = NIL_RTLDRMOD;
+- m->pReg = NULL;
+- }
+- }
+-
+- return hrc;
+-}
+-
+-/**
+- * Calls the pfnVirtualBoxReady hook.
+- *
+- * @returns true if we left the lock, false if we didn't.
+- * @param a_pVirtualBox The VirtualBox interface.
+- * @param a_pLock The write lock held by the caller.
+- */
+-bool ExtPack::callVirtualBoxReadyHook(IVirtualBox *a_pVirtualBox, AutoWriteLock *a_pLock)
+-{
+- if ( m != NULL
+- && m->fUsable
+- && !m->fMadeReadyCall)
+- {
+- m->fMadeReadyCall = true;
+- if (m->pReg->pfnVirtualBoxReady)
+- {
+- ComPtr<ExtPack> ptrSelfRef = this;
+- a_pLock->release();
+- m->pReg->pfnVirtualBoxReady(m->pReg, a_pVirtualBox);
+- a_pLock->acquire();
+- return true;
+- }
+- }
+- return false;
+-}
+-
+-/**
+- * Calls the pfnConsoleReady hook.
+- *
+- * @returns true if we left the lock, false if we didn't.
+- * @param a_pConsole The Console interface.
+- * @param a_pLock The write lock held by the caller.
+- */
+-bool ExtPack::callConsoleReadyHook(IConsole *a_pConsole, AutoWriteLock *a_pLock)
+-{
+- if ( m != NULL
+- && m->fUsable
+- && !m->fMadeReadyCall)
+- {
+- m->fMadeReadyCall = true;
+- if (m->pReg->pfnConsoleReady)
+- {
+- ComPtr<ExtPack> ptrSelfRef = this;
+- a_pLock->release();
+- m->pReg->pfnConsoleReady(m->pReg, a_pConsole);
+- a_pLock->acquire();
+- return true;
+- }
+- }
+- return false;
+-}
+-
+-/**
+- * Calls the pfnVMCreate hook.
+- *
+- * @returns true if we left the lock, false if we didn't.
+- * @param a_pVirtualBox The VirtualBox interface.
+- * @param a_pMachine The machine interface of the new VM.
+- * @param a_pLock The write lock held by the caller.
+- */
+-bool ExtPack::callVmCreatedHook(IVirtualBox *a_pVirtualBox, IMachine *a_pMachine, AutoWriteLock *a_pLock)
+-{
+- if ( m != NULL
+- && m->fUsable)
+- {
+- if (m->pReg->pfnVMCreated)
+- {
+- ComPtr<ExtPack> ptrSelfRef = this;
+- a_pLock->release();
+- m->pReg->pfnVMCreated(m->pReg, a_pVirtualBox, a_pMachine);
+- a_pLock->acquire();
+- return true;
+- }
+- }
+- return false;
+-}
+-
+-/**
+- * Calls the pfnVMConfigureVMM hook.
+- *
+- * @returns true if we left the lock, false if we didn't.
+- * @param a_pConsole The console interface.
+- * @param a_pVM The VM handle.
+- * @param a_pLock The write lock held by the caller.
+- * @param a_pvrc Where to return the status code of the
+- * callback. This is always set. LogRel is
+- * called on if a failure status is returned.
+- */
+-bool ExtPack::callVmConfigureVmmHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock, int *a_pvrc)
+-{
+- *a_pvrc = VINF_SUCCESS;
+- if ( m != NULL
+- && m->fUsable)
+- {
+- if (m->pReg->pfnVMConfigureVMM)
+- {
+- ComPtr<ExtPack> ptrSelfRef = this;
+- a_pLock->release();
+- int vrc = m->pReg->pfnVMConfigureVMM(m->pReg, a_pConsole, a_pVM);
+- *a_pvrc = vrc;
+- a_pLock->acquire();
+- if (RT_FAILURE(vrc))
+- LogRel(("ExtPack pfnVMConfigureVMM returned %Rrc for %s\n", vrc, m->Desc.strName.c_str()));
+- return true;
+- }
+- }
+- return false;
+-}
+-
+-/**
+- * Calls the pfnVMPowerOn hook.
+- *
+- * @returns true if we left the lock, false if we didn't.
+- * @param a_pConsole The console interface.
+- * @param a_pVM The VM handle.
+- * @param a_pLock The write lock held by the caller.
+- * @param a_pvrc Where to return the status code of the
+- * callback. This is always set. LogRel is
+- * called on if a failure status is returned.
+- */
+-bool ExtPack::callVmPowerOnHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock, int *a_pvrc)
+-{
+- *a_pvrc = VINF_SUCCESS;
+- if ( m != NULL
+- && m->fUsable)
+- {
+- if (m->pReg->pfnVMPowerOn)
+- {
+- ComPtr<ExtPack> ptrSelfRef = this;
+- a_pLock->release();
+- int vrc = m->pReg->pfnVMPowerOn(m->pReg, a_pConsole, a_pVM);
+- *a_pvrc = vrc;
+- a_pLock->acquire();
+- if (RT_FAILURE(vrc))
+- LogRel(("ExtPack pfnVMPowerOn returned %Rrc for %s\n", vrc, m->Desc.strName.c_str()));
+- return true;
+- }
+- }
+- return false;
+-}
+-
+-/**
+- * Calls the pfnVMPowerOff hook.
+- *
+- * @returns true if we left the lock, false if we didn't.
+- * @param a_pConsole The console interface.
+- * @param a_pVM The VM handle.
+- * @param a_pLock The write lock held by the caller.
+- */
+-bool ExtPack::callVmPowerOffHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock)
+-{
+- if ( m != NULL
+- && m->fUsable)
+- {
+- if (m->pReg->pfnVMPowerOff)
+- {
+- ComPtr<ExtPack> ptrSelfRef = this;
+- a_pLock->release();
+- m->pReg->pfnVMPowerOff(m->pReg, a_pConsole, a_pVM);
+- a_pLock->acquire();
+- return true;
+- }
+- }
+- return false;
+-}
+-
+-/**
+- * Check if the extension pack is usable and has an VRDE module.
+- *
+- * @returns S_OK or COM error status with error information.
+- *
+- * @remarks Caller holds the extension manager lock for reading, no locking
+- * necessary.
+- */
+-HRESULT ExtPack::checkVrde(void)
+-{
+- HRESULT hrc;
+- if ( m != NULL
+- && m->fUsable)
+- {
+- if (m->Desc.strVrdeModule.isNotEmpty())
+- hrc = S_OK;
+- else
+- hrc = setError(E_FAIL, tr("The extension pack '%s' does not include a VRDE module"), m->Desc.strName.c_str());
+- }
+- else
+- hrc = setError(E_FAIL, tr("%s"), m->strWhyUnusable.c_str());
+- return hrc;
+-}
+-
+-/**
+- * Same as checkVrde(), except that it also resolves the path to the module.
+- *
+- * @returns S_OK or COM error status with error information.
+- * @param a_pstrVrdeLibrary Where to return the path on success.
+- *
+- * @remarks Caller holds the extension manager lock for reading, no locking
+- * necessary.
+- */
+-HRESULT ExtPack::getVrdpLibraryName(Utf8Str *a_pstrVrdeLibrary)
+-{
+- HRESULT hrc = checkVrde();
+- if (SUCCEEDED(hrc))
+- {
+- if (findModule(m->Desc.strVrdeModule.c_str(), NULL, VBOXEXTPACKMODKIND_R3,
+- a_pstrVrdeLibrary, NULL /*a_pfNative*/, NULL /*a_pObjInfo*/))
+- hrc = S_OK;
+- else
+- hrc = setError(E_FAIL, tr("Failed to locate the VRDE module '%s' in extension pack '%s'"),
+- m->Desc.strVrdeModule.c_str(), m->Desc.strName.c_str());
+- }
+- return hrc;
+-}
+-
+-/**
+- * Check if this extension pack wishes to be the default VRDE provider.
+- *
+- * @returns @c true if it wants to and it is in a usable state, otherwise
+- * @c false.
+- *
+- * @remarks Caller holds the extension manager lock for reading, no locking
+- * necessary.
+- */
+-bool ExtPack::wantsToBeDefaultVrde(void) const
+-{
+- return m->fUsable
+- && m->Desc.strVrdeModule.isNotEmpty();
+-}
+-
+-/**
+- * Refreshes the extension pack state.
+- *
+- * This is called by the manager so that the on disk changes are picked up.
+- *
+- * @returns S_OK or COM error status with error information.
+- *
+- * @param a_pfCanDelete Optional can-delete-this-object output indicator.
+- *
+- * @remarks Caller holds the extension manager lock for writing.
+- * @remarks Only called in VBoxSVC.
+- */
+-HRESULT ExtPack::refresh(bool *a_pfCanDelete)
+-{
+- if (a_pfCanDelete)
+- *a_pfCanDelete = false;
+-
+- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS); /* for the COMGETTERs */
+-
+- /*
+- * Has the module been deleted?
+- */
+- RTFSOBJINFO ObjInfoExtPack;
+- int vrc = RTPathQueryInfoEx(m->strExtPackPath.c_str(), &ObjInfoExtPack, RTFSOBJATTRADD_UNIX, RTPATH_F_ON_LINK);
+- if ( RT_FAILURE(vrc)
+- || !RTFS_IS_DIRECTORY(ObjInfoExtPack.Attr.fMode))
+- {
+- if (a_pfCanDelete)
+- *a_pfCanDelete = true;
+- return S_OK;
+- }
+-
+- /*
+- * We've got a directory, so try query file system object info for the
+- * files we are interested in as well.
+- */
+- RTFSOBJINFO ObjInfoDesc;
+- char szDescFilePath[RTPATH_MAX];
+- vrc = RTPathJoin(szDescFilePath, sizeof(szDescFilePath), m->strExtPackPath.c_str(), VBOX_EXTPACK_DESCRIPTION_NAME);
+- if (RT_SUCCESS(vrc))
+- vrc = RTPathQueryInfoEx(szDescFilePath, &ObjInfoDesc, RTFSOBJATTRADD_UNIX, RTPATH_F_ON_LINK);
+- if (RT_FAILURE(vrc))
+- RT_ZERO(ObjInfoDesc);
+-
+- RTFSOBJINFO ObjInfoMainMod;
+- if (m->strMainModPath.isNotEmpty())
+- vrc = RTPathQueryInfoEx(m->strMainModPath.c_str(), &ObjInfoMainMod, RTFSOBJATTRADD_UNIX, RTPATH_F_ON_LINK);
+- if (m->strMainModPath.isEmpty() || RT_FAILURE(vrc))
+- RT_ZERO(ObjInfoMainMod);
+-
+- /*
+- * If we have a usable module already, just verify that things haven't
+- * changed since we loaded it.
+- */
+- if (m->fUsable)
+- {
+- if (m->hMainMod == NIL_RTLDRMOD)
+- probeAndLoad();
+- else if ( !objinfoIsEqual(&ObjInfoDesc, &m->ObjInfoDesc)
+- || !objinfoIsEqual(&ObjInfoMainMod, &m->ObjInfoMainMod)
+- || !objinfoIsEqual(&ObjInfoExtPack, &m->ObjInfoExtPack) )
+- {
+- /** @todo not important, so it can wait. */
+- }
+- }
+- /*
+- * Ok, it is currently not usable. If anything has changed since last time
+- * reprobe the extension pack.
+- */
+- else if ( !objinfoIsEqual(&ObjInfoDesc, &m->ObjInfoDesc)
+- || !objinfoIsEqual(&ObjInfoMainMod, &m->ObjInfoMainMod)
+- || !objinfoIsEqual(&ObjInfoExtPack, &m->ObjInfoExtPack) )
+- probeAndLoad();
+-
+- return S_OK;
+-}
+-
+-/**
+- * Probes the extension pack, loading the main dll and calling its registration
+- * entry point.
+- *
+- * This updates the state accordingly, the strWhyUnusable and fUnusable members
+- * being the most important ones.
+- */
+-void ExtPack::probeAndLoad(void)
+-{
+- m->fUsable = false;
+- m->fMadeReadyCall = false;
+-
+- /*
+- * Query the file system info for the extension pack directory. This and
+- * all other file system info we save is for the benefit of refresh().
+- */
+- int vrc = RTPathQueryInfoEx(m->strExtPackPath.c_str(), &m->ObjInfoExtPack, RTFSOBJATTRADD_UNIX, RTPATH_F_ON_LINK);
+- if (RT_FAILURE(vrc))
+- {
+- m->strWhyUnusable.printf(tr("RTPathQueryInfoEx on '%s' failed: %Rrc"), m->strExtPackPath.c_str(), vrc);
+- return;
+- }
+- if (!RTFS_IS_DIRECTORY(m->ObjInfoExtPack.Attr.fMode))
+- {
+- if (RTFS_IS_SYMLINK(m->ObjInfoExtPack.Attr.fMode))
+- m->strWhyUnusable.printf(tr("'%s' is a symbolic link, this is not allowed"), m->strExtPackPath.c_str(), vrc);
+- else if (RTFS_IS_FILE(m->ObjInfoExtPack.Attr.fMode))
+- m->strWhyUnusable.printf(tr("'%s' is a symbolic file, not a directory"), m->strExtPackPath.c_str(), vrc);
+- else
+- m->strWhyUnusable.printf(tr("'%s' is not a directory (fMode=%#x)"), m->strExtPackPath.c_str(), m->ObjInfoExtPack.Attr.fMode);
+- return;
+- }
+-
+- RTERRINFOSTATIC ErrInfo;
+- RTErrInfoInitStatic(&ErrInfo);
+- vrc = SUPR3HardenedVerifyDir(m->strExtPackPath.c_str(), true /*fRecursive*/, true /*fCheckFiles*/, &ErrInfo.Core);
+- if (RT_FAILURE(vrc))
+- {
+- m->strWhyUnusable.printf(tr("%s (rc=%Rrc)"), ErrInfo.Core.pszMsg, vrc);
+- return;
+- }
+-
+- /*
+- * Read the description file.
+- */
+- RTCString strSavedName(m->Desc.strName);
+- RTCString *pStrLoadErr = VBoxExtPackLoadDesc(m->strExtPackPath.c_str(), &m->Desc, &m->ObjInfoDesc);
+- if (pStrLoadErr != NULL)
+- {
+- m->strWhyUnusable.printf(tr("Failed to load '%s/%s': %s"),
+- m->strExtPackPath.c_str(), VBOX_EXTPACK_DESCRIPTION_NAME, pStrLoadErr->c_str());
+- m->Desc.strName = strSavedName;
+- delete pStrLoadErr;
+- return;
+- }
+-
+- /*
+- * Make sure the XML name and directory matches.
+- */
+- if (!m->Desc.strName.equalsIgnoreCase(strSavedName))
+- {
+- m->strWhyUnusable.printf(tr("The description name ('%s') and directory name ('%s') does not match"),
+- m->Desc.strName.c_str(), strSavedName.c_str());
+- m->Desc.strName = strSavedName;
+- return;
+- }
+-
+- /*
+- * Load the main DLL and call the predefined entry point.
+- */
+- bool fIsNative;
+- if (!findModule(m->Desc.strMainModule.c_str(), NULL /* default extension */, VBOXEXTPACKMODKIND_R3,
+- &m->strMainModPath, &fIsNative, &m->ObjInfoMainMod))
+- {
+- m->strWhyUnusable.printf(tr("Failed to locate the main module ('%s')"), m->Desc.strMainModule.c_str());
+- return;
+- }
+-
+- vrc = SUPR3HardenedVerifyPlugIn(m->strMainModPath.c_str(), &ErrInfo.Core);
+- if (RT_FAILURE(vrc))
+- {
+- m->strWhyUnusable.printf(tr("%s"), ErrInfo.Core.pszMsg);
+- return;
+- }
+-
+- if (fIsNative)
+- {
+- vrc = SUPR3HardenedLdrLoadPlugIn(m->strMainModPath.c_str(), &m->hMainMod, &ErrInfo.Core);
+- if (RT_FAILURE(vrc))
+- {
+- m->hMainMod = NIL_RTLDRMOD;
+- m->strWhyUnusable.printf(tr("Failed to load the main module ('%s'): %Rrc - %s"),
+- m->strMainModPath.c_str(), vrc, ErrInfo.Core.pszMsg);
+- return;
+- }
+- }
+- else
+- {
+- m->strWhyUnusable.printf(tr("Only native main modules are currently supported"));
+- return;
+- }
+-
+- /*
+- * Resolve the predefined entry point.
+- */
+- PFNVBOXEXTPACKREGISTER pfnRegistration;
+- vrc = RTLdrGetSymbol(m->hMainMod, VBOX_EXTPACK_MAIN_MOD_ENTRY_POINT, (void **)&pfnRegistration);
+- if (RT_SUCCESS(vrc))
+- {
+- RTErrInfoClear(&ErrInfo.Core);
+- vrc = pfnRegistration(&m->Hlp, &m->pReg, &ErrInfo.Core);
+- if ( RT_SUCCESS(vrc)
+- && !RTErrInfoIsSet(&ErrInfo.Core)
+- && VALID_PTR(m->pReg))
+- {
+- if ( VBOXEXTPACK_IS_MAJOR_VER_EQUAL(m->pReg->u32Version, VBOXEXTPACKREG_VERSION)
+- && m->pReg->u32EndMarker == m->pReg->u32Version)
+- {
+- if ( (!m->pReg->pfnInstalled || RT_VALID_PTR(m->pReg->pfnInstalled))
+- && (!m->pReg->pfnUninstall || RT_VALID_PTR(m->pReg->pfnUninstall))
+- && (!m->pReg->pfnVirtualBoxReady || RT_VALID_PTR(m->pReg->pfnVirtualBoxReady))
+- && (!m->pReg->pfnConsoleReady || RT_VALID_PTR(m->pReg->pfnConsoleReady))
+- && (!m->pReg->pfnUnload || RT_VALID_PTR(m->pReg->pfnUnload))
+- && (!m->pReg->pfnVMCreated || RT_VALID_PTR(m->pReg->pfnVMCreated))
+- && (!m->pReg->pfnVMConfigureVMM || RT_VALID_PTR(m->pReg->pfnVMConfigureVMM))
+- && (!m->pReg->pfnVMPowerOn || RT_VALID_PTR(m->pReg->pfnVMPowerOn))
+- && (!m->pReg->pfnVMPowerOff || RT_VALID_PTR(m->pReg->pfnVMPowerOff))
+- && (!m->pReg->pfnQueryObject || RT_VALID_PTR(m->pReg->pfnQueryObject))
+- )
+- {
+- /*
+- * We're good!
+- */
+- m->fUsable = true;
+- m->strWhyUnusable.setNull();
+- return;
+- }
+-
+- m->strWhyUnusable = tr("The registration structure contains on or more invalid function pointers");
+- }
+- else
+- m->strWhyUnusable.printf(tr("Unsupported registration structure version %u.%u"),
+- RT_HIWORD(m->pReg->u32Version), RT_LOWORD(m->pReg->u32Version));
+- }
+- else
+- m->strWhyUnusable.printf(tr("%s returned %Rrc, pReg=%p ErrInfo='%s'"),
+- VBOX_EXTPACK_MAIN_MOD_ENTRY_POINT, vrc, m->pReg, ErrInfo.Core.pszMsg);
+- m->pReg = NULL;
+- }
+- else
+- m->strWhyUnusable.printf(tr("Failed to resolve exported symbol '%s' in the main module: %Rrc"),
+- VBOX_EXTPACK_MAIN_MOD_ENTRY_POINT, vrc);
+-
+- RTLdrClose(m->hMainMod);
+- m->hMainMod = NIL_RTLDRMOD;
+-}
+-
+-/**
+- * Finds a module.
+- *
+- * @returns true if found, false if not.
+- * @param a_pszName The module base name (no extension).
+- * @param a_pszExt The extension. If NULL we use default
+- * extensions.
+- * @param a_enmKind The kind of module to locate.
+- * @param a_pStrFound Where to return the path to the module we've
+- * found.
+- * @param a_pfNative Where to return whether this is a native module
+- * or an agnostic one. Optional.
+- * @param a_pObjInfo Where to return the file system object info for
+- * the module. Optional.
+- */
+-bool ExtPack::findModule(const char *a_pszName, const char *a_pszExt, VBOXEXTPACKMODKIND a_enmKind,
+- Utf8Str *a_pStrFound, bool *a_pfNative, PRTFSOBJINFO a_pObjInfo) const
+-{
+- /*
+- * Try the native path first.
+- */
+- char szPath[RTPATH_MAX];
+- int vrc = RTPathJoin(szPath, sizeof(szPath), m->strExtPackPath.c_str(), RTBldCfgTargetDotArch());
+- AssertLogRelRCReturn(vrc, false);
+- vrc = RTPathAppend(szPath, sizeof(szPath), a_pszName);
+- AssertLogRelRCReturn(vrc, false);
+- if (!a_pszExt)
+- {
+- const char *pszDefExt;
+- switch (a_enmKind)
+- {
+- case VBOXEXTPACKMODKIND_RC: pszDefExt = ".rc"; break;
+- case VBOXEXTPACKMODKIND_R0: pszDefExt = ".r0"; break;
+- case VBOXEXTPACKMODKIND_R3: pszDefExt = RTLdrGetSuff(); break;
+- default:
+- AssertFailedReturn(false);
+- }
+- vrc = RTStrCat(szPath, sizeof(szPath), pszDefExt);
+- AssertLogRelRCReturn(vrc, false);
+- }
+-
+- RTFSOBJINFO ObjInfo;
+- if (!a_pObjInfo)
+- a_pObjInfo = &ObjInfo;
+- vrc = RTPathQueryInfo(szPath, a_pObjInfo, RTFSOBJATTRADD_UNIX);
+- if (RT_SUCCESS(vrc) && RTFS_IS_FILE(a_pObjInfo->Attr.fMode))
+- {
+- if (a_pfNative)
+- *a_pfNative = true;
+- *a_pStrFound = szPath;
+- return true;
+- }
+-
+- /*
+- * Try the platform agnostic modules.
+- */
+- /* gcc.x86/module.rel */
+- char szSubDir[32];
+- RTStrPrintf(szSubDir, sizeof(szSubDir), "%s.%s", RTBldCfgCompiler(), RTBldCfgTargetArch());
+- vrc = RTPathJoin(szPath, sizeof(szPath), m->strExtPackPath.c_str(), szSubDir);
+- AssertLogRelRCReturn(vrc, false);
+- vrc = RTPathAppend(szPath, sizeof(szPath), a_pszName);
+- AssertLogRelRCReturn(vrc, false);
+- if (!a_pszExt)
+- {
+- vrc = RTStrCat(szPath, sizeof(szPath), ".rel");
+- AssertLogRelRCReturn(vrc, false);
+- }
+- vrc = RTPathQueryInfo(szPath, a_pObjInfo, RTFSOBJATTRADD_UNIX);
+- if (RT_SUCCESS(vrc) && RTFS_IS_FILE(a_pObjInfo->Attr.fMode))
+- {
+- if (a_pfNative)
+- *a_pfNative = false;
+- *a_pStrFound = szPath;
+- return true;
+- }
+-
+- /* x86/module.rel */
+- vrc = RTPathJoin(szPath, sizeof(szPath), m->strExtPackPath.c_str(), RTBldCfgTargetArch());
+- AssertLogRelRCReturn(vrc, false);
+- vrc = RTPathAppend(szPath, sizeof(szPath), a_pszName);
+- AssertLogRelRCReturn(vrc, false);
+- if (!a_pszExt)
+- {
+- vrc = RTStrCat(szPath, sizeof(szPath), ".rel");
+- AssertLogRelRCReturn(vrc, false);
+- }
+- vrc = RTPathQueryInfo(szPath, a_pObjInfo, RTFSOBJATTRADD_UNIX);
+- if (RT_SUCCESS(vrc) && RTFS_IS_FILE(a_pObjInfo->Attr.fMode))
+- {
+- if (a_pfNative)
+- *a_pfNative = false;
+- *a_pStrFound = szPath;
+- return true;
+- }
+-
+- return false;
+-}
+-
+-/**
+- * Compares two file system object info structures.
+- *
+- * @returns true if equal, false if not.
+- * @param pObjInfo1 The first.
+- * @param pObjInfo2 The second.
+- * @todo IPRT should do this, really.
+- */
+-/* static */ bool ExtPack::objinfoIsEqual(PCRTFSOBJINFO pObjInfo1, PCRTFSOBJINFO pObjInfo2)
+-{
+- if (!RTTimeSpecIsEqual(&pObjInfo1->ModificationTime, &pObjInfo2->ModificationTime))
+- return false;
+- if (!RTTimeSpecIsEqual(&pObjInfo1->ChangeTime, &pObjInfo2->ChangeTime))
+- return false;
+- if (!RTTimeSpecIsEqual(&pObjInfo1->BirthTime, &pObjInfo2->BirthTime))
+- return false;
+- if (pObjInfo1->cbObject != pObjInfo2->cbObject)
+- return false;
+- if (pObjInfo1->Attr.fMode != pObjInfo2->Attr.fMode)
+- return false;
+- if (pObjInfo1->Attr.enmAdditional == pObjInfo2->Attr.enmAdditional)
+- {
+- switch (pObjInfo1->Attr.enmAdditional)
+- {
+- case RTFSOBJATTRADD_UNIX:
+- if (pObjInfo1->Attr.u.Unix.uid != pObjInfo2->Attr.u.Unix.uid)
+- return false;
+- if (pObjInfo1->Attr.u.Unix.gid != pObjInfo2->Attr.u.Unix.gid)
+- return false;
+- if (pObjInfo1->Attr.u.Unix.INodeIdDevice != pObjInfo2->Attr.u.Unix.INodeIdDevice)
+- return false;
+- if (pObjInfo1->Attr.u.Unix.INodeId != pObjInfo2->Attr.u.Unix.INodeId)
+- return false;
+- if (pObjInfo1->Attr.u.Unix.GenerationId != pObjInfo2->Attr.u.Unix.GenerationId)
+- return false;
+- break;
+- default:
+- break;
+- }
+- }
+- return true;
+-}
+-
+-
+-/**
+- * @interface_method_impl{VBOXEXTPACKHLP,pfnFindModule}
+- */
+-/*static*/ DECLCALLBACK(int)
+-ExtPack::hlpFindModule(PCVBOXEXTPACKHLP pHlp, const char *pszName, const char *pszExt, VBOXEXTPACKMODKIND enmKind,
+- char *pszFound, size_t cbFound, bool *pfNative)
+-{
+- /*
+- * Validate the input and get our bearings.
+- */
+- AssertPtrReturn(pszName, VERR_INVALID_POINTER);
+- AssertPtrNullReturn(pszExt, VERR_INVALID_POINTER);
+- AssertPtrReturn(pszFound, VERR_INVALID_POINTER);
+- AssertPtrNullReturn(pfNative, VERR_INVALID_POINTER);
+- AssertReturn(enmKind > VBOXEXTPACKMODKIND_INVALID && enmKind < VBOXEXTPACKMODKIND_END, VERR_INVALID_PARAMETER);
+-
+- AssertPtrReturn(pHlp, VERR_INVALID_POINTER);
+- AssertReturn(pHlp->u32Version == VBOXEXTPACKHLP_VERSION, VERR_INVALID_POINTER);
+- ExtPack::Data *m = RT_FROM_CPP_MEMBER(pHlp, Data, Hlp);
+- AssertPtrReturn(m, VERR_INVALID_POINTER);
+- ExtPack *pThis = m->pThis;
+- AssertPtrReturn(pThis, VERR_INVALID_POINTER);
+-
+- /*
+- * This is just a wrapper around findModule.
+- */
+- Utf8Str strFound;
+- if (pThis->findModule(pszName, pszExt, enmKind, &strFound, pfNative, NULL))
+- return RTStrCopy(pszFound, cbFound, strFound.c_str());
+- return VERR_FILE_NOT_FOUND;
+-}
+-
+-/*static*/ DECLCALLBACK(int)
+-ExtPack::hlpGetFilePath(PCVBOXEXTPACKHLP pHlp, const char *pszFilename, char *pszPath, size_t cbPath)
+-{
+- /*
+- * Validate the input and get our bearings.
+- */
+- AssertPtrReturn(pszFilename, VERR_INVALID_POINTER);
+- AssertPtrReturn(pszPath, VERR_INVALID_POINTER);
+- AssertReturn(cbPath > 0, VERR_BUFFER_OVERFLOW);
+-
+- AssertPtrReturn(pHlp, VERR_INVALID_POINTER);
+- AssertReturn(pHlp->u32Version == VBOXEXTPACKHLP_VERSION, VERR_INVALID_POINTER);
+- ExtPack::Data *m = RT_FROM_CPP_MEMBER(pHlp, Data, Hlp);
+- AssertPtrReturn(m, VERR_INVALID_POINTER);
+- ExtPack *pThis = m->pThis;
+- AssertPtrReturn(pThis, VERR_INVALID_POINTER);
+-
+- /*
+- * This is a simple RTPathJoin, no checking if things exists or anything.
+- */
+- int vrc = RTPathJoin(pszPath, cbPath, pThis->m->strExtPackPath.c_str(), pszFilename);
+- if (RT_FAILURE(vrc))
+- RT_BZERO(pszPath, cbPath);
+- return vrc;
+-}
+-
+-/*static*/ DECLCALLBACK(VBOXEXTPACKCTX)
+-ExtPack::hlpGetContext(PCVBOXEXTPACKHLP pHlp)
+-{
+- /*
+- * Validate the input and get our bearings.
+- */
+- AssertPtrReturn(pHlp, VBOXEXTPACKCTX_INVALID);
+- AssertReturn(pHlp->u32Version == VBOXEXTPACKHLP_VERSION, VBOXEXTPACKCTX_INVALID);
+- ExtPack::Data *m = RT_FROM_CPP_MEMBER(pHlp, Data, Hlp);
+- AssertPtrReturn(m, VBOXEXTPACKCTX_INVALID);
+- ExtPack *pThis = m->pThis;
+- AssertPtrReturn(pThis, VBOXEXTPACKCTX_INVALID);
+-
+- return pThis->m->enmContext;
+-}
+-
+-/*static*/ DECLCALLBACK(int)
+-ExtPack::hlpReservedN(PCVBOXEXTPACKHLP pHlp)
+-{
+- /*
+- * Validate the input and get our bearings.
+- */
+- AssertPtrReturn(pHlp, VERR_INVALID_POINTER);
+- AssertReturn(pHlp->u32Version == VBOXEXTPACKHLP_VERSION, VERR_INVALID_POINTER);
+- ExtPack::Data *m = RT_FROM_CPP_MEMBER(pHlp, Data, Hlp);
+- AssertPtrReturn(m, VERR_INVALID_POINTER);
+- ExtPack *pThis = m->pThis;
+- AssertPtrReturn(pThis, VERR_INVALID_POINTER);
+-
+- return VERR_NOT_IMPLEMENTED;
+-}
+-
+-
+-
+-
+-
+-STDMETHODIMP ExtPack::COMGETTER(Name)(BSTR *a_pbstrName)
+-{
+- CheckComArgOutPointerValid(a_pbstrName);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- Bstr str(m->Desc.strName);
+- str.cloneTo(a_pbstrName);
+- }
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPack::COMGETTER(Description)(BSTR *a_pbstrDescription)
+-{
+- CheckComArgOutPointerValid(a_pbstrDescription);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- Bstr str(m->Desc.strDescription);
+- str.cloneTo(a_pbstrDescription);
+- }
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPack::COMGETTER(Version)(BSTR *a_pbstrVersion)
+-{
+- CheckComArgOutPointerValid(a_pbstrVersion);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- /* HACK ALERT: This is for easing backporting to 4.1. The edition stuff
+- will be changed into a separate */
+- if (m->Desc.strEdition.isEmpty())
+- {
+- Bstr str(m->Desc.strVersion);
+- str.cloneTo(a_pbstrVersion);
+- }
+- else
+- {
+- RTCString strHack(m->Desc.strVersion);
+- strHack.append('-');
+- strHack.append(m->Desc.strEdition);
+-
+- Bstr str(strHack);
+- str.cloneTo(a_pbstrVersion);
+- }
+- }
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPack::COMGETTER(Revision)(ULONG *a_puRevision)
+-{
+- CheckComArgOutPointerValid(a_puRevision);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- *a_puRevision = m->Desc.uRevision;
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPack::COMGETTER(VRDEModule)(BSTR *a_pbstrVrdeModule)
+-{
+- CheckComArgOutPointerValid(a_pbstrVrdeModule);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- Bstr str(m->Desc.strVrdeModule);
+- str.cloneTo(a_pbstrVrdeModule);
+- }
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPack::COMGETTER(PlugIns)(ComSafeArrayOut(IExtPackPlugIn *, a_paPlugIns))
+-{
+- /** @todo implement plug-ins. */
+-#ifdef VBOX_WITH_XPCOM
+- NOREF(a_paPlugIns);
+- NOREF(a_paPlugInsSize);
+-#endif
+- ReturnComNotImplemented();
+-}
+-
+-STDMETHODIMP ExtPack::COMGETTER(Usable)(BOOL *a_pfUsable)
+-{
+- CheckComArgOutPointerValid(a_pfUsable);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- *a_pfUsable = m->fUsable;
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPack::COMGETTER(WhyUnusable)(BSTR *a_pbstrWhy)
+-{
+- CheckComArgOutPointerValid(a_pbstrWhy);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- m->strWhyUnusable.cloneTo(a_pbstrWhy);
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPack::COMGETTER(ShowLicense)(BOOL *a_pfShowIt)
+-{
+- CheckComArgOutPointerValid(a_pfShowIt);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- *a_pfShowIt = m->Desc.fShowLicense;
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPack::COMGETTER(License)(BSTR *a_pbstrHtmlLicense)
+-{
+- Bstr bstrHtml("html");
+- return QueryLicense(Bstr::Empty.raw(), Bstr::Empty.raw(), bstrHtml.raw(), a_pbstrHtmlLicense);
+-}
+-
+-STDMETHODIMP ExtPack::QueryLicense(IN_BSTR a_bstrPreferredLocale, IN_BSTR a_bstrPreferredLanguage, IN_BSTR a_bstrFormat,
+- BSTR *a_pbstrLicense)
+-{
+- /*
+- * Validate input.
+- */
+- CheckComArgOutPointerValid(a_pbstrLicense);
+- CheckComArgNotNull(a_bstrPreferredLocale);
+- CheckComArgNotNull(a_bstrPreferredLanguage);
+- CheckComArgNotNull(a_bstrFormat);
+-
+- Utf8Str strPreferredLocale(a_bstrPreferredLocale);
+- if (strPreferredLocale.length() != 2 && strPreferredLocale.length() != 0)
+- return setError(E_FAIL, tr("The preferred locale is a two character string or empty."));
+-
+- Utf8Str strPreferredLanguage(a_bstrPreferredLanguage);
+- if (strPreferredLanguage.length() != 2 && strPreferredLanguage.length() != 0)
+- return setError(E_FAIL, tr("The preferred lanuage is a two character string or empty."));
+-
+- Utf8Str strFormat(a_bstrFormat);
+- if ( !strFormat.equals("html")
+- && !strFormat.equals("rtf")
+- && !strFormat.equals("txt"))
+- return setError(E_FAIL, tr("The license format can only have the values 'html', 'rtf' and 'txt'."));
+-
+- /*
+- * Combine the options to form a file name before locking down anything.
+- */
+- char szName[sizeof(VBOX_EXTPACK_LICENSE_NAME_PREFIX "-de_DE.html") + 2];
+- if (strPreferredLocale.isNotEmpty() && strPreferredLanguage.isNotEmpty())
+- RTStrPrintf(szName, sizeof(szName), VBOX_EXTPACK_LICENSE_NAME_PREFIX "-%s_%s.%s",
+- strPreferredLocale.c_str(), strPreferredLanguage.c_str(), strFormat.c_str());
+- else if (strPreferredLocale.isNotEmpty())
+- RTStrPrintf(szName, sizeof(szName), VBOX_EXTPACK_LICENSE_NAME_PREFIX "-%s.%s", strPreferredLocale.c_str(), strFormat.c_str());
+- else if (strPreferredLanguage.isNotEmpty())
+- RTStrPrintf(szName, sizeof(szName), VBOX_EXTPACK_LICENSE_NAME_PREFIX "-_%s.%s", strPreferredLocale.c_str(), strFormat.c_str());
+- else
+- RTStrPrintf(szName, sizeof(szName), VBOX_EXTPACK_LICENSE_NAME_PREFIX ".%s", strFormat.c_str());
+-
+- /*
+- * Effectuate the query.
+- */
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS); /* paranoia */
+-
+- if (!m->fUsable)
+- hrc = setError(E_FAIL, tr("%s"), m->strWhyUnusable.c_str());
+- else
+- {
+- char szPath[RTPATH_MAX];
+- int vrc = RTPathJoin(szPath, sizeof(szPath), m->strExtPackPath.c_str(), szName);
+- if (RT_SUCCESS(vrc))
+- {
+- void *pvFile;
+- size_t cbFile;
+- vrc = RTFileReadAllEx(szPath, 0, RTFOFF_MAX, RTFILE_RDALL_O_DENY_READ, &pvFile, &cbFile);
+- if (RT_SUCCESS(vrc))
+- {
+- Bstr bstrLicense((const char *)pvFile, cbFile);
+- if (bstrLicense.isNotEmpty())
+- {
+- bstrLicense.detachTo(a_pbstrLicense);
+- hrc = S_OK;
+- }
+- else
+- hrc = setError(VBOX_E_IPRT_ERROR, tr("The license file '%s' is empty or contains invalid UTF-8 encoding"),
+- szPath);
+- RTFileReadAllFree(pvFile, cbFile);
+- }
+- else if (vrc == VERR_FILE_NOT_FOUND || vrc == VERR_PATH_NOT_FOUND)
+- hrc = setError(VBOX_E_OBJECT_NOT_FOUND, tr("The license file '%s' was not found in extension pack '%s'"),
+- szName, m->Desc.strName.c_str());
+- else
+- hrc = setError(VBOX_E_FILE_ERROR, tr("Failed to open the license file '%s': %Rrc"), szPath, vrc);
+- }
+- else
+- hrc = setError(VBOX_E_IPRT_ERROR, tr("RTPathJoin failed: %Rrc"), vrc);
+- }
+- }
+- return hrc;
+-}
+-
+-
+-STDMETHODIMP ExtPack::QueryObject(IN_BSTR a_bstrObjectId, IUnknown **a_ppUnknown)
+-{
+- com::Guid ObjectId;
+- CheckComArgGuid(a_bstrObjectId, ObjectId);
+- CheckComArgOutPointerValid(a_ppUnknown);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- if ( m->pReg
+- && m->pReg->pfnQueryObject)
+- {
+- void *pvUnknown = m->pReg->pfnQueryObject(m->pReg, ObjectId.raw());
+- if (pvUnknown)
+- *a_ppUnknown = (IUnknown *)pvUnknown;
+- else
+- hrc = E_NOINTERFACE;
+- }
+- else
+- hrc = E_NOINTERFACE;
+- }
+- return hrc;
+-}
+-
+-
+-
+-
+-DEFINE_EMPTY_CTOR_DTOR(ExtPackManager)
+-
+-/**
+- * Called by ComObjPtr::createObject when creating the object.
+- *
+- * Just initialize the basic object state, do the rest in init().
+- *
+- * @returns S_OK.
+- */
+-HRESULT ExtPackManager::FinalConstruct()
+-{
+- m = NULL;
+- return S_OK;
+-}
+-
+-/**
+- * Initializes the extension pack manager.
+- *
+- * @returns COM status code.
+- * @param a_pVirtualBox Pointer to the VirtualBox object.
+- * @param a_enmContext The context we're in.
+- */
+-HRESULT ExtPackManager::initExtPackManager(VirtualBox *a_pVirtualBox, VBOXEXTPACKCTX a_enmContext)
+-{
+- AutoInitSpan autoInitSpan(this);
+- AssertReturn(autoInitSpan.isOk(), E_FAIL);
+-
+- /*
+- * Figure some stuff out before creating the instance data.
+- */
+- char szBaseDir[RTPATH_MAX];
+- int rc = RTPathAppPrivateArchTop(szBaseDir, sizeof(szBaseDir));
+- AssertLogRelRCReturn(rc, E_FAIL);
+- rc = RTPathAppend(szBaseDir, sizeof(szBaseDir), VBOX_EXTPACK_INSTALL_DIR);
+- AssertLogRelRCReturn(rc, E_FAIL);
+-
+- char szCertificatDir[RTPATH_MAX];
+- rc = RTPathAppPrivateNoArch(szCertificatDir, sizeof(szCertificatDir));
+- AssertLogRelRCReturn(rc, E_FAIL);
+- rc = RTPathAppend(szCertificatDir, sizeof(szCertificatDir), VBOX_EXTPACK_CERT_DIR);
+- AssertLogRelRCReturn(rc, E_FAIL);
+-
+- /*
+- * Allocate and initialize the instance data.
+- */
+- m = new Data;
+- m->strBaseDir = szBaseDir;
+- m->strCertificatDirPath = szCertificatDir;
+- m->pVirtualBox = a_pVirtualBox;
+- m->enmContext = a_enmContext;
+-
+- /*
+- * Slurp in VBoxVMM which is used by VBoxPuelMain.
+- */
+-#if !defined(RT_OS_WINDOWS) && !defined(RT_OS_DARWIN)
+- if (a_enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON)
+- {
+- int vrc = SUPR3HardenedLdrLoadAppPriv("VBoxVMM", &m->hVBoxVMM, RTLDRLOAD_FLAGS_GLOBAL, NULL);
+- if (RT_FAILURE(vrc))
+- m->hVBoxVMM = NIL_RTLDRMOD;
+- /* cleanup in ::uninit()? */
+- }
+-#endif
+-
+- /*
+- * Go looking for extensions. The RTDirOpen may fail if nothing has been
+- * installed yet, or if root is paranoid and has revoked our access to them.
+- *
+- * We ASSUME that there are no files, directories or stuff in the directory
+- * that exceed the max name length in RTDIRENTRYEX.
+- */
+- HRESULT hrc = S_OK;
+- PRTDIR pDir;
+- int vrc = RTDirOpen(&pDir, szBaseDir);
+- if (RT_SUCCESS(vrc))
+- {
+- for (;;)
+- {
+- RTDIRENTRYEX Entry;
+- vrc = RTDirReadEx(pDir, &Entry, NULL /*pcbDirEntry*/, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK);
+- if (RT_FAILURE(vrc))
+- {
+- AssertLogRelMsg(vrc == VERR_NO_MORE_FILES, ("%Rrc\n", vrc));
+- break;
+- }
+- if ( RTFS_IS_DIRECTORY(Entry.Info.Attr.fMode)
+- && strcmp(Entry.szName, ".") != 0
+- && strcmp(Entry.szName, "..") != 0
+- && VBoxExtPackIsValidMangledName(Entry.szName) )
+- {
+- /*
+- * All directories are extensions, the shall be nothing but
+- * extensions in this subdirectory.
+- */
+- char szExtPackDir[RTPATH_MAX];
+- vrc = RTPathJoin(szExtPackDir, sizeof(szExtPackDir), m->strBaseDir.c_str(), Entry.szName);
+- AssertLogRelRC(vrc);
+- if (RT_SUCCESS(vrc))
+- {
+- RTCString *pstrName = VBoxExtPackUnmangleName(Entry.szName, RTSTR_MAX);
+- AssertLogRel(pstrName);
+- if (pstrName)
+- {
+- ComObjPtr<ExtPack> NewExtPack;
+- HRESULT hrc2 = NewExtPack.createObject();
+- if (SUCCEEDED(hrc2))
+- hrc2 = NewExtPack->initWithDir(a_enmContext, pstrName->c_str(), szExtPackDir);
+- delete pstrName;
+- if (SUCCEEDED(hrc2))
+- m->llInstalledExtPacks.push_back(NewExtPack);
+- else if (SUCCEEDED(rc))
+- hrc = hrc2;
+- }
+- else
+- hrc = E_UNEXPECTED;
+- }
+- else
+- hrc = E_UNEXPECTED;
+- }
+- }
+- RTDirClose(pDir);
+- }
+- /* else: ignore, the directory probably does not exist or something. */
+-
+- if (SUCCEEDED(hrc))
+- autoInitSpan.setSucceeded();
+- return hrc;
+-}
+-
+-/**
+- * COM cruft.
+- */
+-void ExtPackManager::FinalRelease()
+-{
+- uninit();
+-}
+-
+-/**
+- * Do the actual cleanup.
+- */
+-void ExtPackManager::uninit()
+-{
+- /* Enclose the state transition Ready->InUninit->NotReady */
+- AutoUninitSpan autoUninitSpan(this);
+- if (!autoUninitSpan.uninitDone() && m != NULL)
+- {
+- delete m;
+- m = NULL;
+- }
+-}
+-
+-
+-STDMETHODIMP ExtPackManager::COMGETTER(InstalledExtPacks)(ComSafeArrayOut(IExtPack *, a_paExtPacks))
+-{
+- CheckComArgOutSafeArrayPointerValid(a_paExtPacks);
+- Assert(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+-
+- SafeIfaceArray<IExtPack> SaExtPacks(m->llInstalledExtPacks);
+- SaExtPacks.detachTo(ComSafeArrayOutArg(a_paExtPacks));
+- }
+-
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackManager::Find(IN_BSTR a_bstrName, IExtPack **a_pExtPack)
+-{
+- CheckComArgNotNull(a_bstrName);
+- CheckComArgOutPointerValid(a_pExtPack);
+- Utf8Str strName(a_bstrName);
+- Assert(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+-
+- ComPtr<ExtPack> ptrExtPack = findExtPack(strName.c_str());
+- if (!ptrExtPack.isNull())
+- ptrExtPack.queryInterfaceTo(a_pExtPack);
+- else
+- hrc = VBOX_E_OBJECT_NOT_FOUND;
+- }
+-
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackManager::OpenExtPackFile(IN_BSTR a_bstrTarballAndDigest, IExtPackFile **a_ppExtPackFile)
+-{
+- CheckComArgNotNull(a_bstrTarballAndDigest);
+- CheckComArgOutPointerValid(a_ppExtPackFile);
+- AssertReturn(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON, E_UNEXPECTED);
+-
+- /* The API can optionally take a ::SHA-256=<hex-digest> attribute at the
+- end of the file name. This is just a temporary measure for
+- backporting, in 4.2 we'll add another parameter to the method. */
+- Utf8Str strTarball;
+- Utf8Str strDigest;
+- Utf8Str strTarballAndDigest(a_bstrTarballAndDigest);
+- size_t offSha256 = strTarballAndDigest.find("::SHA-256=");
+- if (offSha256 == Utf8Str::npos)
+- strTarball = strTarballAndDigest;
+- else
+- {
+- strTarball = strTarballAndDigest.substr(0, offSha256);
+- strDigest = strTarballAndDigest.substr(offSha256 + sizeof("::SHA-256=") - 1);
+- }
+-
+- ComObjPtr<ExtPackFile> NewExtPackFile;
+- HRESULT hrc = NewExtPackFile.createObject();
+- if (SUCCEEDED(hrc))
+- hrc = NewExtPackFile->initWithFile(strTarball.c_str(), strDigest.c_str(), this, m->pVirtualBox);
+- if (SUCCEEDED(hrc))
+- NewExtPackFile.queryInterfaceTo(a_ppExtPackFile);
+-
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackManager::Uninstall(IN_BSTR a_bstrName, BOOL a_fForcedRemoval, IN_BSTR a_bstrDisplayInfo,
+- IProgress **a_ppProgress)
+-{
+- CheckComArgNotNull(a_bstrName);
+- if (a_ppProgress)
+- *a_ppProgress = NULL;
+- Assert(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- PEXTPACKUNINSTALLJOB pJob = NULL;
+- try
+- {
+- pJob = new EXTPACKUNINSTALLJOB;
+- pJob->ptrExtPackMgr = this;
+- pJob->strName = a_bstrName;
+- pJob->fForcedRemoval = a_fForcedRemoval != FALSE;
+- pJob->strDisplayInfo = a_bstrDisplayInfo;
+- hrc = pJob->ptrProgress.createObject();
+- if (SUCCEEDED(hrc))
+- {
+- Bstr bstrDescription = tr("Uninstalling extension pack");
+- hrc = pJob->ptrProgress->init(
+-#ifndef VBOX_COM_INPROC
+- m->pVirtualBox,
+-#endif
+- static_cast<IExtPackManager *>(this),
+- bstrDescription.raw(),
+- FALSE /*aCancelable*/,
+- NULL /*aId*/);
+- }
+- if (SUCCEEDED(hrc))
+- {
+- ComPtr<Progress> ptrProgress = pJob->ptrProgress;
+- int vrc = RTThreadCreate(NULL /*phThread*/, ExtPackManager::doUninstallThreadProc, pJob, 0,
+- RTTHREADTYPE_DEFAULT, 0 /*fFlags*/, "ExtPackUninst");
+- if (RT_SUCCESS(vrc))
+- {
+- pJob = NULL; /* the thread deletes it */
+- ptrProgress.queryInterfaceTo(a_ppProgress);
+- }
+- else
+- hrc = setError(VBOX_E_IPRT_ERROR, tr("RTThreadCreate failed with %Rrc"), vrc);
+- }
+- }
+- catch (std::bad_alloc)
+- {
+- hrc = E_OUTOFMEMORY;
+- }
+- if (pJob)
+- delete pJob;
+- }
+-
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackManager::Cleanup(void)
+-{
+- Assert(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- /*
+- * Run the set-uid-to-root binary that performs the cleanup.
+- *
+- * Take the write lock to prevent conflicts with other calls to this
+- * VBoxSVC instance.
+- */
+- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+- hrc = runSetUidToRootHelper(NULL,
+- "cleanup",
+- "--base-dir", m->strBaseDir.c_str(),
+- (const char *)NULL);
+- }
+-
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackManager::QueryAllPlugInsForFrontend(IN_BSTR a_bstrFrontend, ComSafeArrayOut(BSTR, a_pabstrPlugInModules))
+-{
+- CheckComArgNotNull(a_bstrFrontend);
+- Utf8Str strName(a_bstrFrontend);
+- CheckComArgOutSafeArrayPointerValid(a_pabstrPlugInModules);
+- Assert(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- com::SafeArray<BSTR> saPaths((size_t)0);
+- /** @todo implement plug-ins */
+- saPaths.detachTo(ComSafeArrayOutArg(a_pabstrPlugInModules));
+- }
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackManager::IsExtPackUsable(IN_BSTR a_bstrExtPack, BOOL *aUsable)
+-{
+- CheckComArgNotNull(a_bstrExtPack);
+- Utf8Str strExtPack(a_bstrExtPack);
+- *aUsable = isExtPackUsable(strExtPack.c_str());
+- return S_OK;
+-}
+-
+-/**
+- * Finds the success indicator string in the stderr output ofr hte helper app.
+- *
+- * @returns Pointer to the indicator.
+- * @param psz The stderr output string. Can be NULL.
+- * @param cch The size of the string.
+- */
+-static char *findSuccessIndicator(char *psz, size_t cch)
+-{
+- static const char s_szSuccessInd[] = "rcExit=RTEXITCODE_SUCCESS";
+- Assert(!cch || strlen(psz) == cch);
+- if (cch < sizeof(s_szSuccessInd) - 1)
+- return NULL;
+- char *pszInd = &psz[cch - sizeof(s_szSuccessInd) + 1];
+- if (strcmp(s_szSuccessInd, pszInd))
+- return NULL;
+- return pszInd;
+-}
+-
+-/**
+- * Runs the helper application that does the privileged operations.
+- *
+- * @returns S_OK or a failure status with error information set.
+- * @param a_pstrDisplayInfo Platform specific display info hacks.
+- * @param a_pszCommand The command to execute.
+- * @param ... The argument strings that goes along with the
+- * command. Maximum is about 16. Terminated by a
+- * NULL.
+- */
+-HRESULT ExtPackManager::runSetUidToRootHelper(Utf8Str const *a_pstrDisplayInfo, const char *a_pszCommand, ...)
+-{
+- /*
+- * Calculate the path to the helper application.
+- */
+- char szExecName[RTPATH_MAX];
+- int vrc = RTPathAppPrivateArch(szExecName, sizeof(szExecName));
+- AssertLogRelRCReturn(vrc, E_UNEXPECTED);
+-
+- vrc = RTPathAppend(szExecName, sizeof(szExecName), VBOX_EXTPACK_HELPER_NAME);
+- AssertLogRelRCReturn(vrc, E_UNEXPECTED);
+-
+- /*
+- * Convert the variable argument list to a RTProcCreate argument vector.
+- */
+- const char *apszArgs[20];
+- unsigned cArgs = 0;
+-
+- LogRel(("ExtPack: Executing '%s'", szExecName));
+- apszArgs[cArgs++] = &szExecName[0];
+-
+- if ( a_pstrDisplayInfo
+- && a_pstrDisplayInfo->isNotEmpty())
+- {
+- LogRel((" '--display-info-hack' '%s'", a_pstrDisplayInfo->c_str()));
+- apszArgs[cArgs++] = "--display-info-hack";
+- apszArgs[cArgs++] = a_pstrDisplayInfo->c_str();
+- }
+-
+- LogRel(("'%s'", a_pszCommand));
+- apszArgs[cArgs++] = a_pszCommand;
+-
+- va_list va;
+- va_start(va, a_pszCommand);
+- const char *pszLastArg;
+- for (;;)
+- {
+- AssertReturn(cArgs < RT_ELEMENTS(apszArgs) - 1, E_UNEXPECTED);
+- pszLastArg = va_arg(va, const char *);
+- if (!pszLastArg)
+- break;
+- LogRel((" '%s'", pszLastArg));
+- apszArgs[cArgs++] = pszLastArg;
+- };
+- va_end(va);
+-
+- LogRel(("\n"));
+- apszArgs[cArgs] = NULL;
+-
+- /*
+- * Create a PIPE which we attach to stderr so that we can read the error
+- * message on failure and report it back to the caller.
+- */
+- RTPIPE hPipeR;
+- RTHANDLE hStdErrPipe;
+- hStdErrPipe.enmType = RTHANDLETYPE_PIPE;
+- vrc = RTPipeCreate(&hPipeR, &hStdErrPipe.u.hPipe, RTPIPE_C_INHERIT_WRITE);
+- AssertLogRelRCReturn(vrc, E_UNEXPECTED);
+-
+- /*
+- * Spawn the process.
+- */
+- HRESULT hrc;
+- RTPROCESS hProcess;
+- vrc = RTProcCreateEx(szExecName,
+- apszArgs,
+- RTENV_DEFAULT,
+- 0 /*fFlags*/,
+- NULL /*phStdIn*/,
+- NULL /*phStdOut*/,
+- &hStdErrPipe,
+- NULL /*pszAsUser*/,
+- NULL /*pszPassword*/,
+- &hProcess);
+- if (RT_SUCCESS(vrc))
+- {
+- vrc = RTPipeClose(hStdErrPipe.u.hPipe);
+- hStdErrPipe.u.hPipe = NIL_RTPIPE;
+-
+- /*
+- * Read the pipe output until the process completes.
+- */
+- RTPROCSTATUS ProcStatus = { -42, RTPROCEXITREASON_ABEND };
+- size_t cbStdErrBuf = 0;
+- size_t offStdErrBuf = 0;
+- char *pszStdErrBuf = NULL;
+- do
+- {
+- /*
+- * Service the pipe. Block waiting for output or the pipe breaking
+- * when the process terminates.
+- */
+- if (hPipeR != NIL_RTPIPE)
+- {
+- char achBuf[1024];
+- size_t cbRead;
+- vrc = RTPipeReadBlocking(hPipeR, achBuf, sizeof(achBuf), &cbRead);
+- if (RT_SUCCESS(vrc))
+- {
+- /* grow the buffer? */
+- size_t cbBufReq = offStdErrBuf + cbRead + 1;
+- if ( cbBufReq > cbStdErrBuf
+- && cbBufReq < _256K)
+- {
+- size_t cbNew = RT_ALIGN_Z(cbBufReq, 16); // 1024
+- void *pvNew = RTMemRealloc(pszStdErrBuf, cbNew);
+- if (pvNew)
+- {
+- pszStdErrBuf = (char *)pvNew;
+- cbStdErrBuf = cbNew;
+- }
+- }
+-
+- /* append if we've got room. */
+- if (cbBufReq <= cbStdErrBuf)
+- {
+- memcpy(&pszStdErrBuf[offStdErrBuf], achBuf, cbRead);
+- offStdErrBuf = offStdErrBuf + cbRead;
+- pszStdErrBuf[offStdErrBuf] = '\0';
+- }
+- }
+- else
+- {
+- AssertLogRelMsg(vrc == VERR_BROKEN_PIPE, ("%Rrc\n", vrc));
+- RTPipeClose(hPipeR);
+- hPipeR = NIL_RTPIPE;
+- }
+- }
+-
+- /*
+- * Service the process. Block if we have no pipe.
+- */
+- if (hProcess != NIL_RTPROCESS)
+- {
+- vrc = RTProcWait(hProcess,
+- hPipeR == NIL_RTPIPE ? RTPROCWAIT_FLAGS_BLOCK : RTPROCWAIT_FLAGS_NOBLOCK,
+- &ProcStatus);
+- if (RT_SUCCESS(vrc))
+- hProcess = NIL_RTPROCESS;
+- else
+- AssertLogRelMsgStmt(vrc == VERR_PROCESS_RUNNING, ("%Rrc\n", vrc), hProcess = NIL_RTPROCESS);
+- }
+- } while ( hPipeR != NIL_RTPIPE
+- || hProcess != NIL_RTPROCESS);
+-
+- LogRel(("ExtPack: enmReason=%d iStatus=%d stderr='%s'\n",
+- ProcStatus.enmReason, ProcStatus.iStatus, offStdErrBuf ? pszStdErrBuf : ""));
+-
+- /*
+- * Look for rcExit=RTEXITCODE_SUCCESS at the end of the error output,
+- * cut it as it is only there to attest the success.
+- */
+- if (offStdErrBuf > 0)
+- {
+- RTStrStripR(pszStdErrBuf);
+- offStdErrBuf = strlen(pszStdErrBuf);
+- }
+-
+- char *pszSuccessInd = findSuccessIndicator(pszStdErrBuf, offStdErrBuf);
+- if (pszSuccessInd)
+- {
+- *pszSuccessInd = '\0';
+- offStdErrBuf = pszSuccessInd - pszStdErrBuf;
+- }
+- else if ( ProcStatus.enmReason == RTPROCEXITREASON_NORMAL
+- && ProcStatus.iStatus == 0)
+- ProcStatus.iStatus = offStdErrBuf ? 667 : 666;
+-
+- /*
+- * Compose the status code and, on failure, error message.
+- */
+- if ( ProcStatus.enmReason == RTPROCEXITREASON_NORMAL
+- && ProcStatus.iStatus == 0)
+- hrc = S_OK;
+- else if (ProcStatus.enmReason == RTPROCEXITREASON_NORMAL)
+- {
+- AssertMsg(ProcStatus.iStatus != 0, ("%s\n", pszStdErrBuf));
+- hrc = setError(E_FAIL, tr("The installer failed with exit code %d: %s"),
+- ProcStatus.iStatus, offStdErrBuf ? pszStdErrBuf : "");
+- }
+- else if (ProcStatus.enmReason == RTPROCEXITREASON_SIGNAL)
+- hrc = setError(E_UNEXPECTED, tr("The installer was killed by signal #d (stderr: %s)"),
+- ProcStatus.iStatus, offStdErrBuf ? pszStdErrBuf : "");
+- else if (ProcStatus.enmReason == RTPROCEXITREASON_ABEND)
+- hrc = setError(E_UNEXPECTED, tr("The installer aborted abnormally (stderr: %s)"),
+- offStdErrBuf ? pszStdErrBuf : "");
+- else
+- hrc = setError(E_UNEXPECTED, tr("internal error: enmReason=%d iStatus=%d stderr='%s'"),
+- ProcStatus.enmReason, ProcStatus.iStatus, offStdErrBuf ? pszStdErrBuf : "");
+-
+- RTMemFree(pszStdErrBuf);
+- }
+- else
+- hrc = setError(VBOX_E_IPRT_ERROR, tr("Failed to launch the helper application '%s' (%Rrc)"), szExecName, vrc);
+-
+- RTPipeClose(hPipeR);
+- RTPipeClose(hStdErrPipe.u.hPipe);
+-
+- return hrc;
+-}
+-
+-/**
+- * Finds an installed extension pack.
+- *
+- * @returns Pointer to the extension pack if found, NULL if not. (No reference
+- * counting problem here since the caller must be holding the lock.)
+- * @param a_pszName The name of the extension pack.
+- */
+-ExtPack *ExtPackManager::findExtPack(const char *a_pszName)
+-{
+- size_t cchName = strlen(a_pszName);
+-
+- for (ExtPackList::iterator it = m->llInstalledExtPacks.begin();
+- it != m->llInstalledExtPacks.end();
+- it++)
+- {
+- ExtPack::Data *pExtPackData = (*it)->m;
+- if ( pExtPackData
+- && pExtPackData->Desc.strName.length() == cchName
+- && pExtPackData->Desc.strName.equalsIgnoreCase(a_pszName))
+- return (*it);
+- }
+- return NULL;
+-}
+-
+-/**
+- * Removes an installed extension pack from the internal list.
+- *
+- * The package is expected to exist!
+- *
+- * @param a_pszName The name of the extension pack.
+- */
+-void ExtPackManager::removeExtPack(const char *a_pszName)
+-{
+- size_t cchName = strlen(a_pszName);
+-
+- for (ExtPackList::iterator it = m->llInstalledExtPacks.begin();
+- it != m->llInstalledExtPacks.end();
+- it++)
+- {
+- ExtPack::Data *pExtPackData = (*it)->m;
+- if ( pExtPackData
+- && pExtPackData->Desc.strName.length() == cchName
+- && pExtPackData->Desc.strName.equalsIgnoreCase(a_pszName))
+- {
+- m->llInstalledExtPacks.erase(it);
+- return;
+- }
+- }
+- AssertMsgFailed(("%s\n", a_pszName));
+-}
+-
+-/**
+- * Refreshes the specified extension pack.
+- *
+- * This may remove the extension pack from the list, so any non-smart pointers
+- * to the extension pack object may become invalid.
+- *
+- * @returns S_OK and *a_ppExtPack on success, COM status code and error
+- * message on failure. Note that *a_ppExtPack can be NULL.
+- *
+- * @param a_pszName The extension to update..
+- * @param a_fUnusableIsError If @c true, report an unusable extension pack
+- * as an error.
+- * @param a_ppExtPack Where to store the pointer to the extension
+- * pack of it is still around after the refresh.
+- * This is optional.
+- *
+- * @remarks Caller holds the extension manager lock.
+- * @remarks Only called in VBoxSVC.
+- */
+-HRESULT ExtPackManager::refreshExtPack(const char *a_pszName, bool a_fUnusableIsError, ExtPack **a_ppExtPack)
+-{
+- Assert(m->pVirtualBox != NULL); /* Only called from VBoxSVC. */
+-
+- HRESULT hrc;
+- ExtPack *pExtPack = findExtPack(a_pszName);
+- if (pExtPack)
+- {
+- /*
+- * Refresh existing object.
+- */
+- bool fCanDelete;
+- hrc = pExtPack->refresh(&fCanDelete);
+- if (SUCCEEDED(hrc))
+- {
+- if (fCanDelete)
+- {
+- removeExtPack(a_pszName);
+- pExtPack = NULL;
+- }
+- }
+- }
+- else
+- {
+- /*
+- * Do this check here, otherwise VBoxExtPackCalcDir() will fail with a strange
+- * error.
+- */
+- bool fValid = VBoxExtPackIsValidName(a_pszName);
+- if (!fValid)
+- return setError(E_FAIL, "Invalid extension pack name specified");
+-
+- /*
+- * Does the dir exist? Make some special effort to deal with case
+- * sensitivie file systems (a_pszName is case insensitive and mangled).
+- */
+- char szDir[RTPATH_MAX];
+- int vrc = VBoxExtPackCalcDir(szDir, sizeof(szDir), m->strBaseDir.c_str(), a_pszName);
+- AssertLogRelRCReturn(vrc, E_FAIL);
+-
+- RTDIRENTRYEX Entry;
+- RTFSOBJINFO ObjInfo;
+- vrc = RTPathQueryInfoEx(szDir, &ObjInfo, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK);
+- bool fExists = RT_SUCCESS(vrc) && RTFS_IS_DIRECTORY(ObjInfo.Attr.fMode);
+- if (!fExists)
+- {
+- PRTDIR pDir;
+- vrc = RTDirOpen(&pDir, m->strBaseDir.c_str());
+- if (RT_SUCCESS(vrc))
+- {
+- const char *pszMangledName = RTPathFilename(szDir);
+- for (;;)
+- {
+- vrc = RTDirReadEx(pDir, &Entry, NULL /*pcbDirEntry*/, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK);
+- if (RT_FAILURE(vrc))
+- {
+- AssertLogRelMsg(vrc == VERR_NO_MORE_FILES, ("%Rrc\n", vrc));
+- break;
+- }
+- if ( RTFS_IS_DIRECTORY(Entry.Info.Attr.fMode)
+- && !RTStrICmp(Entry.szName, pszMangledName))
+- {
+- /*
+- * The installed extension pack has a uses different case.
+- * Update the name and directory variables.
+- */
+- vrc = RTPathJoin(szDir, sizeof(szDir), m->strBaseDir.c_str(), Entry.szName); /* not really necessary */
+- AssertLogRelRCReturnStmt(vrc, RTDirClose(pDir), E_UNEXPECTED);
+- a_pszName = Entry.szName;
+- fExists = true;
+- break;
+- }
+- }
+- RTDirClose(pDir);
+- }
+- }
+- if (fExists)
+- {
+- /*
+- * We've got something, create a new extension pack object for it.
+- */
+- ComObjPtr<ExtPack> ptrNewExtPack;
+- hrc = ptrNewExtPack.createObject();
+- if (SUCCEEDED(hrc))
+- hrc = ptrNewExtPack->initWithDir(m->enmContext, a_pszName, szDir);
+- if (SUCCEEDED(hrc))
+- {
+- m->llInstalledExtPacks.push_back(ptrNewExtPack);
+- if (ptrNewExtPack->m->fUsable)
+- LogRel(("ExtPackManager: Found extension pack '%s'.\n", a_pszName));
+- else
+- LogRel(("ExtPackManager: Found bad extension pack '%s': %s\n",
+- a_pszName, ptrNewExtPack->m->strWhyUnusable.c_str() ));
+- pExtPack = ptrNewExtPack;
+- }
+- }
+- else
+- hrc = S_OK;
+- }
+-
+- /*
+- * Report error if not usable, if that is desired.
+- */
+- if ( SUCCEEDED(hrc)
+- && pExtPack
+- && a_fUnusableIsError
+- && !pExtPack->m->fUsable)
+- hrc = setError(E_FAIL, "%s", pExtPack->m->strWhyUnusable.c_str());
+-
+- if (a_ppExtPack)
+- *a_ppExtPack = pExtPack;
+- return hrc;
+-}
+-
+-/**
+- * Thread wrapper around doInstall.
+- *
+- * @returns VINF_SUCCESS (ignored)
+- * @param hThread The thread handle (ignored).
+- * @param pvJob The job structure.
+- */
+-/*static*/ DECLCALLBACK(int) ExtPackManager::doInstallThreadProc(RTTHREAD hThread, void *pvJob)
+-{
+- PEXTPACKINSTALLJOB pJob = (PEXTPACKINSTALLJOB)pvJob;
+- HRESULT hrc = pJob->ptrExtPackMgr->doInstall(pJob->ptrExtPackFile, pJob->fReplace, &pJob->strDisplayInfo);
+- pJob->ptrProgress->notifyComplete(hrc);
+- delete pJob;
+-
+- NOREF(hThread);
+- return VINF_SUCCESS;
+-}
+-
+-/**
+- * Worker for IExtPackFile::Install.
+- *
+- * Called on a worker thread via doInstallThreadProc.
+- *
+- * @returns COM status code.
+- * @param a_pExtPackFile The extension pack file, caller checks that
+- * it's usable.
+- * @param a_fReplace Whether to replace any existing extpack or just
+- * fail.
+- * @param a_pstrDisplayInfo Host specific display information hacks.
+- * @param a_ppProgress Where to return a progress object some day. Can
+- * be NULL.
+- */
+-HRESULT ExtPackManager::doInstall(ExtPackFile *a_pExtPackFile, bool a_fReplace, Utf8Str const *a_pstrDisplayInfo)
+-{
+- AssertReturn(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON, E_UNEXPECTED);
+- RTCString const * const pStrName = &a_pExtPackFile->m->Desc.strName;
+- RTCString const * const pStrTarball = &a_pExtPackFile->m->strExtPackFile;
+- RTCString const * const pStrTarballDigest = &a_pExtPackFile->m->strDigest;
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+-
+- /*
+- * Refresh the data we have on the extension pack as it
+- * may be made stale by direct meddling or some other user.
+- */
+- ExtPack *pExtPack;
+- hrc = refreshExtPack(pStrName->c_str(), false /*a_fUnusableIsError*/, &pExtPack);
+- if (SUCCEEDED(hrc))
+- {
+- if (pExtPack && a_fReplace)
+- hrc = pExtPack->callUninstallHookAndClose(m->pVirtualBox, false /*a_ForcedRemoval*/);
+- else if (pExtPack)
+- hrc = setError(E_FAIL,
+- tr("Extension pack '%s' is already installed."
+- " In case of a reinstallation, please uninstall it first"),
+- pStrName->c_str());
+- }
+- if (SUCCEEDED(hrc))
+- {
+- /*
+- * Run the privileged helper binary that performs the actual
+- * installation. Then create an object for the packet (we do this
+- * even on failure, to be on the safe side).
+- */
+- hrc = runSetUidToRootHelper(a_pstrDisplayInfo,
+- "install",
+- "--base-dir", m->strBaseDir.c_str(),
+- "--cert-dir", m->strCertificatDirPath.c_str(),
+- "--name", pStrName->c_str(),
+- "--tarball", pStrTarball->c_str(),
+- "--sha-256", pStrTarballDigest->c_str(),
+- pExtPack ? "--replace" : (const char *)NULL,
+- (const char *)NULL);
+- if (SUCCEEDED(hrc))
+- {
+- hrc = refreshExtPack(pStrName->c_str(), true /*a_fUnusableIsError*/, &pExtPack);
+- if (SUCCEEDED(hrc) && pExtPack)
+- {
+- RTERRINFOSTATIC ErrInfo;
+- RTErrInfoInitStatic(&ErrInfo);
+- pExtPack->callInstalledHook(m->pVirtualBox, &autoLock, &ErrInfo.Core);
+- if (RT_SUCCESS(ErrInfo.Core.rc))
+- LogRel(("ExtPackManager: Successfully installed extension pack '%s'.\n", pStrName->c_str()));
+- else
+- {
+- LogRel(("ExtPackManager: Installated hook for '%s' failed: %Rrc - %s\n",
+- pStrName->c_str(), ErrInfo.Core.rc, ErrInfo.Core.pszMsg));
+-
+- /*
+- * Uninstall the extpack if the error indicates that.
+- */
+- if (ErrInfo.Core.rc == VERR_EXTPACK_UNSUPPORTED_HOST_UNINSTALL)
+- runSetUidToRootHelper(a_pstrDisplayInfo,
+- "uninstall",
+- "--base-dir", m->strBaseDir.c_str(),
+- "--name", pStrName->c_str(),
+- "--forced",
+- (const char *)NULL);
+- hrc = setError(E_FAIL, tr("The installation hook failed: %Rrc - %s"),
+- ErrInfo.Core.rc, ErrInfo.Core.pszMsg);
+- }
+- }
+- else if (SUCCEEDED(hrc))
+- hrc = setError(E_FAIL, tr("Installing extension pack '%s' failed under mysterious circumstances"),
+- pStrName->c_str());
+- }
+- else
+- {
+- ErrorInfoKeeper Eik;
+- refreshExtPack(pStrName->c_str(), false /*a_fUnusableIsError*/, NULL);
+- }
+- }
+-
+- /*
+- * Do VirtualBoxReady callbacks now for any freshly installed
+- * extension pack (old ones will not be called).
+- */
+- if (m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON)
+- {
+- autoLock.release();
+- callAllVirtualBoxReadyHooks();
+- }
+- }
+-
+- return hrc;
+-}
+-
+-/**
+- * Thread wrapper around doUninstall.
+- *
+- * @returns VINF_SUCCESS (ignored)
+- * @param hThread The thread handle (ignored).
+- * @param pvJob The job structure.
+- */
+-/*static*/ DECLCALLBACK(int) ExtPackManager::doUninstallThreadProc(RTTHREAD hThread, void *pvJob)
+-{
+- PEXTPACKUNINSTALLJOB pJob = (PEXTPACKUNINSTALLJOB)pvJob;
+- HRESULT hrc = pJob->ptrExtPackMgr->doUninstall(&pJob->strName, pJob->fForcedRemoval, &pJob->strDisplayInfo);
+- pJob->ptrProgress->notifyComplete(hrc);
+- delete pJob;
+-
+- NOREF(hThread);
+- return VINF_SUCCESS;
+-}
+-
+-/**
+- * Worker for IExtPackManager::Uninstall.
+- *
+- * Called on a worker thread via doUninstallThreadProc.
+- *
+- * @returns COM status code.
+- * @param a_pstrName The name of the extension pack to uninstall.
+- * @param a_fForcedRemoval Whether to be skip and ignore certain bits of
+- * the extpack feedback. To deal with misbehaving
+- * extension pack hooks.
+- * @param a_pstrDisplayInfo Host specific display information hacks.
+- */
+-HRESULT ExtPackManager::doUninstall(Utf8Str const *a_pstrName, bool a_fForcedRemoval, Utf8Str const *a_pstrDisplayInfo)
+-{
+- Assert(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+-
+- /*
+- * Refresh the data we have on the extension pack as it may be made
+- * stale by direct meddling or some other user.
+- */
+- ExtPack *pExtPack;
+- hrc = refreshExtPack(a_pstrName->c_str(), false /*a_fUnusableIsError*/, &pExtPack);
+- if (SUCCEEDED(hrc))
+- {
+- if (!pExtPack)
+- {
+- LogRel(("ExtPackManager: Extension pack '%s' is not installed, so nothing to uninstall.\n", a_pstrName->c_str()));
+- hrc = S_OK; /* nothing to uninstall */
+- }
+- else
+- {
+- /*
+- * Call the uninstall hook and unload the main dll.
+- */
+- hrc = pExtPack->callUninstallHookAndClose(m->pVirtualBox, a_fForcedRemoval);
+- if (SUCCEEDED(hrc))
+- {
+- /*
+- * Run the set-uid-to-root binary that performs the
+- * uninstallation. Then refresh the object.
+- *
+- * This refresh is theorically subject to races, but it's of
+- * the don't-do-that variety.
+- */
+- const char *pszForcedOpt = a_fForcedRemoval ? "--forced" : NULL;
+- hrc = runSetUidToRootHelper(a_pstrDisplayInfo,
+- "uninstall",
+- "--base-dir", m->strBaseDir.c_str(),
+- "--name", a_pstrName->c_str(),
+- pszForcedOpt, /* Last as it may be NULL. */
+- (const char *)NULL);
+- if (SUCCEEDED(hrc))
+- {
+- hrc = refreshExtPack(a_pstrName->c_str(), false /*a_fUnusableIsError*/, &pExtPack);
+- if (SUCCEEDED(hrc))
+- {
+- if (!pExtPack)
+- LogRel(("ExtPackManager: Successfully uninstalled extension pack '%s'.\n", a_pstrName->c_str()));
+- else
+- hrc = setError(E_FAIL,
+- tr("Uninstall extension pack '%s' failed under mysterious circumstances"),
+- a_pstrName->c_str());
+- }
+- }
+- else
+- {
+- ErrorInfoKeeper Eik;
+- refreshExtPack(a_pstrName->c_str(), false /*a_fUnusableIsError*/, NULL);
+- }
+- }
+- }
+- }
+-
+- /*
+- * Do VirtualBoxReady callbacks now for any freshly installed
+- * extension pack (old ones will not be called).
+- */
+- if (m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON)
+- {
+- autoLock.release();
+- callAllVirtualBoxReadyHooks();
+- }
+- }
+-
+- return hrc;
+-}
+-
+-
+-/**
+- * Calls the pfnVirtualBoxReady hook for all working extension packs.
+- *
+- * @remarks The caller must not hold any locks.
+- */
+-void ExtPackManager::callAllVirtualBoxReadyHooks(void)
+-{
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (FAILED(hrc))
+- return;
+- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+- ComPtr<ExtPackManager> ptrSelfRef = this;
+-
+- for (ExtPackList::iterator it = m->llInstalledExtPacks.begin();
+- it != m->llInstalledExtPacks.end();
+- /* advancing below */)
+- {
+- if ((*it)->callVirtualBoxReadyHook(m->pVirtualBox, &autoLock))
+- it = m->llInstalledExtPacks.begin();
+- else
+- it++;
+- }
+-}
+-
+-/**
+- * Calls the pfnConsoleReady hook for all working extension packs.
+- *
+- * @param a_pConsole The console interface.
+- * @remarks The caller must not hold any locks.
+- */
+-void ExtPackManager::callAllConsoleReadyHooks(IConsole *a_pConsole)
+-{
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (FAILED(hrc))
+- return;
+- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+- ComPtr<ExtPackManager> ptrSelfRef = this;
+-
+- for (ExtPackList::iterator it = m->llInstalledExtPacks.begin();
+- it != m->llInstalledExtPacks.end();
+- /* advancing below */)
+- {
+- if ((*it)->callConsoleReadyHook(a_pConsole, &autoLock))
+- it = m->llInstalledExtPacks.begin();
+- else
+- it++;
+- }
+-}
+-
+-/**
+- * Calls the pfnVMCreated hook for all working extension packs.
+- *
+- * @param a_pMachine The machine interface of the new VM.
+- */
+-void ExtPackManager::callAllVmCreatedHooks(IMachine *a_pMachine)
+-{
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (FAILED(hrc))
+- return;
+- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+- ComPtr<ExtPackManager> ptrSelfRef = this; /* paranoia */
+- ExtPackList llExtPacks = m->llInstalledExtPacks;
+-
+- for (ExtPackList::iterator it = llExtPacks.begin(); it != llExtPacks.end(); it++)
+- (*it)->callVmCreatedHook(m->pVirtualBox, a_pMachine, &autoLock);
+-}
+-
+-/**
+- * Calls the pfnVMConfigureVMM hook for all working extension packs.
+- *
+- * @returns VBox status code. Stops on the first failure, expecting the caller
+- * to signal this to the caller of the CFGM constructor.
+- * @param a_pConsole The console interface for the VM.
+- * @param a_pVM The VM handle.
+- */
+-int ExtPackManager::callAllVmConfigureVmmHooks(IConsole *a_pConsole, PVM a_pVM)
+-{
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (FAILED(hrc))
+- return Global::vboxStatusCodeFromCOM(hrc);
+- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+- ComPtr<ExtPackManager> ptrSelfRef = this; /* paranoia */
+- ExtPackList llExtPacks = m->llInstalledExtPacks;
+-
+- for (ExtPackList::iterator it = llExtPacks.begin(); it != llExtPacks.end(); it++)
+- {
+- int vrc;
+- (*it)->callVmConfigureVmmHook(a_pConsole, a_pVM, &autoLock, &vrc);
+- if (RT_FAILURE(vrc))
+- return vrc;
+- }
+-
+- return VINF_SUCCESS;
+-}
+-
+-/**
+- * Calls the pfnVMPowerOn hook for all working extension packs.
+- *
+- * @returns VBox status code. Stops on the first failure, expecting the caller
+- * to not power on the VM.
+- * @param a_pConsole The console interface for the VM.
+- * @param a_pVM The VM handle.
+- */
+-int ExtPackManager::callAllVmPowerOnHooks(IConsole *a_pConsole, PVM a_pVM)
+-{
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (FAILED(hrc))
+- return Global::vboxStatusCodeFromCOM(hrc);
+- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+- ComPtr<ExtPackManager> ptrSelfRef = this; /* paranoia */
+- ExtPackList llExtPacks = m->llInstalledExtPacks;
+-
+- for (ExtPackList::iterator it = llExtPacks.begin(); it != llExtPacks.end(); it++)
+- {
+- int vrc;
+- (*it)->callVmPowerOnHook(a_pConsole, a_pVM, &autoLock, &vrc);
+- if (RT_FAILURE(vrc))
+- return vrc;
+- }
+-
+- return VINF_SUCCESS;
+-}
+-
+-/**
+- * Calls the pfnVMPowerOff hook for all working extension packs.
+- *
+- * @param a_pConsole The console interface for the VM.
+- * @param a_pVM The VM handle. Can be NULL.
+- */
+-void ExtPackManager::callAllVmPowerOffHooks(IConsole *a_pConsole, PVM a_pVM)
+-{
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (FAILED(hrc))
+- return;
+- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+- ComPtr<ExtPackManager> ptrSelfRef = this; /* paranoia */
+- ExtPackList llExtPacks = m->llInstalledExtPacks;
+-
+- for (ExtPackList::iterator it = llExtPacks.begin(); it != llExtPacks.end(); it++)
+- (*it)->callVmPowerOffHook(a_pConsole, a_pVM, &autoLock);
+-}
+-
+-
+-/**
+- * Checks that the specified extension pack contains a VRDE module and that it
+- * is shipshape.
+- *
+- * @returns S_OK if ok, appropriate failure status code with details.
+- * @param a_pstrExtPack The name of the extension pack.
+- */
+-HRESULT ExtPackManager::checkVrdeExtPack(Utf8Str const *a_pstrExtPack)
+-{
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+-
+- ExtPack *pExtPack = findExtPack(a_pstrExtPack->c_str());
+- if (pExtPack)
+- hrc = pExtPack->checkVrde();
+- else
+- hrc = setError(VBOX_E_OBJECT_NOT_FOUND, tr("No extension pack by the name '%s' was found"), a_pstrExtPack->c_str());
+- }
+-
+- return hrc;
+-}
+-
+-/**
+- * Gets the full path to the VRDE library of the specified extension pack.
+- *
+- * This will do extacly the same as checkVrdeExtPack and then resolve the
+- * library path.
+- *
+- * @returns S_OK if a path is returned, COM error status and message return if
+- * not.
+- * @param a_pstrExtPack The extension pack.
+- * @param a_pstrVrdeLibrary Where to return the path.
+- */
+-int ExtPackManager::getVrdeLibraryPathForExtPack(Utf8Str const *a_pstrExtPack, Utf8Str *a_pstrVrdeLibrary)
+-{
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+-
+- ExtPack *pExtPack = findExtPack(a_pstrExtPack->c_str());
+- if (pExtPack)
+- hrc = pExtPack->getVrdpLibraryName(a_pstrVrdeLibrary);
+- else
+- hrc = setError(VBOX_E_OBJECT_NOT_FOUND, tr("No extension pack by the name '%s' was found"), a_pstrExtPack->c_str());
+- }
+-
+- return hrc;
+-}
+-
+-/**
+- * Gets the name of the default VRDE extension pack.
+- *
+- * @returns S_OK or some COM error status on red tape failure.
+- * @param a_pstrExtPack Where to return the extension pack name. Returns
+- * empty if no extension pack wishes to be the default
+- * VRDP provider.
+- */
+-HRESULT ExtPackManager::getDefaultVrdeExtPack(Utf8Str *a_pstrExtPack)
+-{
+- a_pstrExtPack->setNull();
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+-
+- for (ExtPackList::iterator it = m->llInstalledExtPacks.begin();
+- it != m->llInstalledExtPacks.end();
+- it++)
+- {
+- if ((*it)->wantsToBeDefaultVrde())
+- {
+- *a_pstrExtPack = (*it)->m->Desc.strName;
+- break;
+- }
+- }
+- }
+- return hrc;
+-}
+-
+-/**
+- * Checks if an extension pack is (present and) usable.
+- *
+- * @returns @c true if it is, otherwise @c false.
+- * @param a_pszExtPack The name of the extension pack.
+- */
+-bool ExtPackManager::isExtPackUsable(const char *a_pszExtPack)
+-{
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (FAILED(hrc))
+- return false;
+- AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+-
+- ExtPack *pExtPack = findExtPack(a_pszExtPack);
+- return pExtPack != NULL
+- && pExtPack->m->fUsable;
+-}
+-
+-/**
+- * Dumps all extension packs to the release log.
+- */
+-void ExtPackManager::dumpAllToReleaseLog(void)
+-{
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (FAILED(hrc))
+- return;
+- AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+-
+- LogRel(("Installed Extension Packs:\n"));
+- for (ExtPackList::iterator it = m->llInstalledExtPacks.begin();
+- it != m->llInstalledExtPacks.end();
+- it++)
+- {
+- ExtPack::Data *pExtPackData = (*it)->m;
+- if (pExtPackData)
+- {
+- if (pExtPackData->fUsable)
+- LogRel((" %s (Version: %s r%u%s%s; VRDE Module: %s)\n",
+- pExtPackData->Desc.strName.c_str(),
+- pExtPackData->Desc.strVersion.c_str(),
+- pExtPackData->Desc.uRevision,
+- pExtPackData->Desc.strEdition.isEmpty() ? "" : " ",
+- pExtPackData->Desc.strEdition.c_str(),
+- pExtPackData->Desc.strVrdeModule.c_str() ));
+- else
+- LogRel((" %s (Version: %s r%u%s%s; VRDE Module: %s unusable because of '%s')\n",
+- pExtPackData->Desc.strName.c_str(),
+- pExtPackData->Desc.strVersion.c_str(),
+- pExtPackData->Desc.uRevision,
+- pExtPackData->Desc.strEdition.isEmpty() ? "" : " ",
+- pExtPackData->Desc.strEdition.c_str(),
+- pExtPackData->Desc.strVrdeModule.c_str(),
+- pExtPackData->strWhyUnusable.c_str() ));
+- }
+- else
+- LogRel((" pExtPackData is NULL\n"));
+- }
+-
+- if (!m->llInstalledExtPacks.size())
+- LogRel((" None installed!\n"));
+-}
+-
+-/* vi: set tabstop=4 shiftwidth=4 expandtab: */
+--- VirtualBox-4.1.18.orig/src/VBox/Main/src-all/ExtPackUtil.cpp 2012-06-20 10:17:34.000000000 -0300
++++ /dev/null 2012-07-24 14:48:18.638572110 -0300
+@@ -1,1385 +0,0 @@
+-/* $Id: ExtPackUtil.cpp $ */
+-/** @file
+- * VirtualBox Main - Extension Pack Utilities and definitions, VBoxC, VBoxSVC, ++.
+- */
+-
+-/*
+- * Copyright (C) 2010-2012 Oracle Corporation
+- *
+- * This file is part of VirtualBox Open Source Edition (OSE), as
+- * available from http://www.virtualbox.org. This file is free software;
+- * you can redistribute it and/or modify it under the terms of the GNU
+- * General Public License (GPL) as published by the Free Software
+- * Foundation, in version 2 as it comes in the "COPYING" file of the
+- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+- */
+-
+-
+-/*******************************************************************************
+-* Header Files *
+-*******************************************************************************/
+-#include "../include/ExtPackUtil.h"
+-
+-#include <iprt/ctype.h>
+-#include <iprt/dir.h>
+-#include <iprt/file.h>
+-#include <iprt/manifest.h>
+-#include <iprt/param.h>
+-#include <iprt/path.h>
+-#include <iprt/sha.h>
+-#include <iprt/string.h>
+-#include <iprt/vfs.h>
+-#include <iprt/tar.h>
+-#include <iprt/zip.h>
+-#include <iprt/cpp/xml.h>
+-
+-#include <VBox/log.h>
+-
+-
+-/**
+- * Worker for VBoxExtPackLoadDesc that loads the plug-in descriptors.
+- *
+- * @returns Same as VBoxExtPackLoadDesc.
+- * @param pVBoxExtPackElm
+- * @param pcPlugIns Where to return the number of plug-ins in the
+- * array.
+- * @param paPlugIns Where to return the plug-in descriptor array.
+- * (RTMemFree it even on failure)
+- */
+-static RTCString *
+-vboxExtPackLoadPlugInDescs(const xml::ElementNode *pVBoxExtPackElm,
+- uint32_t *pcPlugIns, PVBOXEXTPACKPLUGINDESC *paPlugIns)
+-{
+- *pcPlugIns = 0;
+- *paPlugIns = NULL;
+-
+- /** @todo plug-ins */
+- NOREF(pVBoxExtPackElm);
+-
+- return NULL;
+-}
+-
+-/**
+- * Clears the extension pack descriptor.
+- *
+- * @param a_pExtPackDesc The descriptor to clear.
+- */
+-static void vboxExtPackClearDesc(PVBOXEXTPACKDESC a_pExtPackDesc)
+-{
+- a_pExtPackDesc->strName.setNull();
+- a_pExtPackDesc->strDescription.setNull();
+- a_pExtPackDesc->strVersion.setNull();
+- a_pExtPackDesc->strEdition.setNull();
+- a_pExtPackDesc->uRevision = 0;
+- a_pExtPackDesc->strMainModule.setNull();
+- a_pExtPackDesc->strVrdeModule.setNull();
+- a_pExtPackDesc->cPlugIns = 0;
+- a_pExtPackDesc->paPlugIns = NULL;
+- a_pExtPackDesc->fShowLicense = false;
+-}
+-
+-/**
+- * Initializes an extension pack descriptor so that it's safe to call free on
+- * it whatever happens later on.
+- *
+- * @param a_pExtPackDesc The descirptor to initialize.
+- */
+-void VBoxExtPackInitDesc(PVBOXEXTPACKDESC a_pExtPackDesc)
+-{
+- vboxExtPackClearDesc(a_pExtPackDesc);
+-}
+-
+-
+-/**
+- * Load the extension pack descriptor from an XML document.
+- *
+- * @returns NULL on success, pointer to an error message on failure (caller
+- * deletes it).
+- * @param a_pDoc Pointer to the the XML document.
+- * @param a_pExtPackDesc Where to store the extension pack descriptor.
+- */
+-static RTCString *vboxExtPackLoadDescFromDoc(xml::Document *a_pDoc, PVBOXEXTPACKDESC a_pExtPackDesc)
+-{
+- /*
+- * Get the main element and check its version.
+- */
+- const xml::ElementNode *pVBoxExtPackElm = a_pDoc->getRootElement();
+- if ( !pVBoxExtPackElm
+- || strcmp(pVBoxExtPackElm->getName(), "VirtualBoxExtensionPack") != 0)
+- return new RTCString("No VirtualBoxExtensionPack element");
+-
+- RTCString strFormatVersion;
+- if (!pVBoxExtPackElm->getAttributeValue("version", strFormatVersion))
+- return new RTCString("Missing format version");
+- if (!strFormatVersion.equals("1.0"))
+- return &(new RTCString("Unsupported format version: "))->append(strFormatVersion);
+-
+- /*
+- * Read and validate mandatory bits.
+- */
+- const xml::ElementNode *pNameElm = pVBoxExtPackElm->findChildElement("Name");
+- if (!pNameElm)
+- return new RTCString("The 'Name' element is missing");
+- const char *pszName = pNameElm->getValue();
+- if (!VBoxExtPackIsValidName(pszName))
+- return &(new RTCString("Invalid name: "))->append(pszName);
+-
+- const xml::ElementNode *pDescElm = pVBoxExtPackElm->findChildElement("Description");
+- if (!pDescElm)
+- return new RTCString("The 'Description' element is missing");
+- const char *pszDesc = pDescElm->getValue();
+- if (!pszDesc || *pszDesc == '\0')
+- return new RTCString("The 'Description' element is empty");
+- if (strpbrk(pszDesc, "\n\r\t\v\b") != NULL)
+- return new RTCString("The 'Description' must not contain control characters");
+-
+- const xml::ElementNode *pVersionElm = pVBoxExtPackElm->findChildElement("Version");
+- if (!pVersionElm)
+- return new RTCString("The 'Version' element is missing");
+- const char *pszVersion = pVersionElm->getValue();
+- if (!pszVersion || *pszVersion == '\0')
+- return new RTCString("The 'Version' element is empty");
+- if (!VBoxExtPackIsValidVersionString(pszVersion))
+- return &(new RTCString("Invalid version string: "))->append(pszVersion);
+-
+- uint32_t uRevision;
+- if (!pVersionElm->getAttributeValue("revision", uRevision))
+- uRevision = 0;
+-
+- const char *pszEdition;
+- if (!pVersionElm->getAttributeValue("edition", pszEdition))
+- pszEdition = "";
+- if (!VBoxExtPackIsValidEditionString(pszEdition))
+- return &(new RTCString("Invalid edition string: "))->append(pszEdition);
+-
+- const xml::ElementNode *pMainModuleElm = pVBoxExtPackElm->findChildElement("MainModule");
+- if (!pMainModuleElm)
+- return new RTCString("The 'MainModule' element is missing");
+- const char *pszMainModule = pMainModuleElm->getValue();
+- if (!pszMainModule || *pszMainModule == '\0')
+- return new RTCString("The 'MainModule' element is empty");
+- if (!VBoxExtPackIsValidModuleString(pszMainModule))
+- return &(new RTCString("Invalid main module string: "))->append(pszMainModule);
+-
+- /*
+- * The VRDE module, optional.
+- * Accept both none and empty as tokens of no VRDE module.
+- */
+- const char *pszVrdeModule = NULL;
+- const xml::ElementNode *pVrdeModuleElm = pVBoxExtPackElm->findChildElement("VRDEModule");
+- if (pVrdeModuleElm)
+- {
+- pszVrdeModule = pVrdeModuleElm->getValue();
+- if (!pszVrdeModule || *pszVrdeModule == '\0')
+- pszVrdeModule = NULL;
+- else if (!VBoxExtPackIsValidModuleString(pszVrdeModule))
+- return &(new RTCString("Invalid VRDE module string: "))->append(pszVrdeModule);
+- }
+-
+- /*
+- * Whether to show the license, optional. (presense is enough here)
+- */
+- const xml::ElementNode *pShowLicenseElm = pVBoxExtPackElm->findChildElement("ShowLicense");
+- bool fShowLicense = pShowLicenseElm != NULL;
+-
+- /*
+- * Parse plug-in descriptions (last because of the manual memory management).
+- */
+- uint32_t cPlugIns = 0;
+- PVBOXEXTPACKPLUGINDESC paPlugIns = NULL;
+- RTCString *pstrRet = vboxExtPackLoadPlugInDescs(pVBoxExtPackElm, &cPlugIns, &paPlugIns);
+- if (pstrRet)
+- {
+- RTMemFree(paPlugIns);
+- return pstrRet;
+- }
+-
+- /*
+- * Everything seems fine, fill in the return values and return successfully.
+- */
+- a_pExtPackDesc->strName = pszName;
+- a_pExtPackDesc->strDescription = pszDesc;
+- a_pExtPackDesc->strVersion = pszVersion;
+- a_pExtPackDesc->strEdition = pszEdition;
+- a_pExtPackDesc->uRevision = uRevision;
+- a_pExtPackDesc->strMainModule = pszMainModule;
+- a_pExtPackDesc->strVrdeModule = pszVrdeModule;
+- a_pExtPackDesc->cPlugIns = cPlugIns;
+- a_pExtPackDesc->paPlugIns = paPlugIns;
+- a_pExtPackDesc->fShowLicense = fShowLicense;
+-
+- return NULL;
+-}
+-
+-/**
+- * Reads the extension pack descriptor.
+- *
+- * @returns NULL on success, pointer to an error message on failure (caller
+- * deletes it).
+- * @param a_pszDir The directory containing the description file.
+- * @param a_pExtPackDesc Where to store the extension pack descriptor.
+- * @param a_pObjInfo Where to store the object info for the file (unix
+- * attribs). Optional.
+- */
+-RTCString *VBoxExtPackLoadDesc(const char *a_pszDir, PVBOXEXTPACKDESC a_pExtPackDesc, PRTFSOBJINFO a_pObjInfo)
+-{
+- vboxExtPackClearDesc(a_pExtPackDesc);
+-
+- /*
+- * Validate, open and parse the XML file.
+- */
+- char szFilePath[RTPATH_MAX];
+- int vrc = RTPathJoin(szFilePath, sizeof(szFilePath), a_pszDir, VBOX_EXTPACK_DESCRIPTION_NAME);
+- if (RT_FAILURE(vrc))
+- return new RTCString("RTPathJoin failed with %Rrc", vrc);
+-
+- RTFSOBJINFO ObjInfo;
+- vrc = RTPathQueryInfoEx(szFilePath, &ObjInfo, RTFSOBJATTRADD_UNIX, RTPATH_F_ON_LINK);
+- if (RT_FAILURE(vrc))
+- return &(new RTCString())->printf("RTPathQueryInfoEx failed with %Rrc", vrc);
+- if (a_pObjInfo)
+- *a_pObjInfo = ObjInfo;
+- if (!RTFS_IS_FILE(ObjInfo.Attr.fMode))
+- {
+- if (RTFS_IS_SYMLINK(ObjInfo.Attr.fMode))
+- return new RTCString("The XML file is symlinked, that is not allowed");
+- return &(new RTCString)->printf("The XML file is not a file (fMode=%#x)", ObjInfo.Attr.fMode);
+- }
+-
+- xml::Document Doc;
+- {
+- xml::XmlFileParser Parser;
+- try
+- {
+- Parser.read(szFilePath, Doc);
+- }
+- catch (xml::XmlError Err)
+- {
+- return new RTCString(Err.what());
+- }
+- }
+-
+- /*
+- * Hand the xml doc over to the common code.
+- */
+- return vboxExtPackLoadDescFromDoc(&Doc, a_pExtPackDesc);
+-}
+-
+-/**
+- * Reads the extension pack descriptor.
+- *
+- * @returns NULL on success, pointer to an error message on failure (caller
+- * deletes it).
+- * @param a_pszDir The directory containing the description file.
+- * @param a_pExtPackDesc Where to store the extension pack descriptor.
+- * @param a_pObjInfo Where to store the object info for the file (unix
+- * attribs). Optional.
+- */
+-RTCString *VBoxExtPackLoadDescFromVfsFile(RTVFSFILE hVfsFile, PVBOXEXTPACKDESC a_pExtPackDesc, PRTFSOBJINFO a_pObjInfo)
+-{
+- vboxExtPackClearDesc(a_pExtPackDesc);
+-
+- /*
+- * Query the object info.
+- */
+- RTFSOBJINFO ObjInfo;
+- int rc = RTVfsFileQueryInfo(hVfsFile, &ObjInfo, RTFSOBJATTRADD_UNIX);
+- if (RT_FAILURE(rc))
+- return &(new RTCString)->printf("RTVfsFileQueryInfo failed: %Rrc", rc);
+- if (a_pObjInfo)
+- *a_pObjInfo = ObjInfo;
+-
+- /*
+- * The simple approach, read the whole thing into memory and pass this to
+- * the XML parser.
+- */
+-
+- /* Check the file size. */
+- if (ObjInfo.cbObject > _1M || ObjInfo.cbObject < 0)
+- return &(new RTCString)->printf("The XML file is too large (%'RU64 bytes)", ObjInfo.cbObject);
+- size_t const cbFile = (size_t)ObjInfo.cbObject;
+-
+- /* Rewind to the start of the file. */
+- rc = RTVfsFileSeek(hVfsFile, 0, RTFILE_SEEK_BEGIN, NULL);
+- if (RT_FAILURE(rc))
+- return &(new RTCString)->printf("RTVfsFileSeek(,0,BEGIN) failed: %Rrc", rc);
+-
+- /* Allocate memory and read the file content into it. */
+- void *pvFile = RTMemTmpAlloc(cbFile);
+- if (!pvFile)
+- return &(new RTCString)->printf("RTMemTmpAlloc(%zu) failed", cbFile);
+-
+- RTCString *pstrErr = NULL;
+- rc = RTVfsFileRead(hVfsFile, pvFile, cbFile, NULL);
+- if (RT_FAILURE(rc))
+- pstrErr = &(new RTCString)->printf("RTVfsFileRead failed: %Rrc", rc);
+-
+- /*
+- * Parse the file.
+- */
+- xml::Document Doc;
+- if (RT_SUCCESS(rc))
+- {
+- xml::XmlMemParser Parser;
+- RTCString strFileName = VBOX_EXTPACK_DESCRIPTION_NAME;
+- try
+- {
+- Parser.read(pvFile, cbFile, strFileName, Doc);
+- }
+- catch (xml::XmlError Err)
+- {
+- pstrErr = new RTCString(Err.what());
+- rc = VERR_PARSE_ERROR;
+- }
+- }
+- RTMemTmpFree(pvFile);
+-
+- /*
+- * Hand the xml doc over to the common code.
+- */
+- if (RT_SUCCESS(rc))
+- pstrErr = vboxExtPackLoadDescFromDoc(&Doc, a_pExtPackDesc);
+-
+- return pstrErr;
+-}
+-
+-/**
+- * Frees all resources associated with a extension pack descriptor.
+- *
+- * @param a_pExtPackDesc The extension pack descriptor which members
+- * should be freed.
+- */
+-void VBoxExtPackFreeDesc(PVBOXEXTPACKDESC a_pExtPackDesc)
+-{
+- if (!a_pExtPackDesc)
+- return;
+-
+- a_pExtPackDesc->strName.setNull();
+- a_pExtPackDesc->strDescription.setNull();
+- a_pExtPackDesc->strVersion.setNull();
+- a_pExtPackDesc->strEdition.setNull();
+- a_pExtPackDesc->uRevision = 0;
+- a_pExtPackDesc->strMainModule.setNull();
+- a_pExtPackDesc->strVrdeModule.setNull();
+- a_pExtPackDesc->cPlugIns = 0;
+- RTMemFree(a_pExtPackDesc->paPlugIns);
+- a_pExtPackDesc->paPlugIns = NULL;
+- a_pExtPackDesc->fShowLicense = false;
+-}
+-
+-/**
+- * Extract the extension pack name from the tarball path.
+- *
+- * @returns String containing the name on success, the caller must delete it.
+- * NULL if no valid name was found or if we ran out of memory.
+- * @param pszTarball The path to the tarball.
+- */
+-RTCString *VBoxExtPackExtractNameFromTarballPath(const char *pszTarball)
+-{
+- /*
+- * Skip ahead to the filename part and count the number of characters
+- * that matches the criteria for a mangled extension pack name.
+- */
+- const char *pszSrc = RTPathFilename(pszTarball);
+- if (!pszSrc)
+- return NULL;
+-
+- size_t off = 0;
+- while (RT_C_IS_ALNUM(pszSrc[off]) || pszSrc[off] == '_')
+- off++;
+-
+- /*
+- * Check min and max name limits.
+- */
+- if ( off > VBOX_EXTPACK_NAME_MAX_LEN
+- || off < VBOX_EXTPACK_NAME_MIN_LEN)
+- return NULL;
+-
+- /*
+- * Return the unmangled name.
+- */
+- return VBoxExtPackUnmangleName(pszSrc, off);
+-}
+-
+-/**
+- * Validates the extension pack name.
+- *
+- * @returns true if valid, false if not.
+- * @param pszName The name to validate.
+- * @sa VBoxExtPackExtractNameFromTarballPath
+- */
+-bool VBoxExtPackIsValidName(const char *pszName)
+-{
+- if (!pszName)
+- return false;
+-
+- /*
+- * Check the characters making up the name, only english alphabet
+- * characters, decimal digits and spaces are allowed.
+- */
+- size_t off = 0;
+- while (pszName[off])
+- {
+- if (!RT_C_IS_ALNUM(pszName[off]) && pszName[off] != ' ')
+- return false;
+- off++;
+- }
+-
+- /*
+- * Check min and max name limits.
+- */
+- if ( off > VBOX_EXTPACK_NAME_MAX_LEN
+- || off < VBOX_EXTPACK_NAME_MIN_LEN)
+- return false;
+-
+- return true;
+-}
+-
+-/**
+- * Checks if an alledged manged extension pack name.
+- *
+- * @returns true if valid, false if not.
+- * @param pszMangledName The mangled name to validate.
+- * @param cchMax The max number of chars to test.
+- * @sa VBoxExtPackMangleName
+- */
+-bool VBoxExtPackIsValidMangledName(const char *pszMangledName, size_t cchMax /*= RTSTR_MAX*/)
+-{
+- if (!pszMangledName)
+- return false;
+-
+- /*
+- * Check the characters making up the name, only english alphabet
+- * characters, decimal digits and underscores (=space) are allowed.
+- */
+- size_t off = 0;
+- while (off < cchMax && pszMangledName[off])
+- {
+- if (!RT_C_IS_ALNUM(pszMangledName[off]) && pszMangledName[off] != '_')
+- return false;
+- off++;
+- }
+-
+- /*
+- * Check min and max name limits.
+- */
+- if ( off > VBOX_EXTPACK_NAME_MAX_LEN
+- || off < VBOX_EXTPACK_NAME_MIN_LEN)
+- return false;
+-
+- return true;
+-}
+-
+-/**
+- * Mangle an extension pack name so it can be used by a directory or file name.
+- *
+- * @returns String containing the mangled name on success, the caller must
+- * delete it. NULL on failure.
+- * @param pszName The unmangled name.
+- * @sa VBoxExtPackUnmangleName, VBoxExtPackIsValidMangledName
+- */
+-RTCString *VBoxExtPackMangleName(const char *pszName)
+-{
+- AssertReturn(VBoxExtPackIsValidName(pszName), NULL);
+-
+- char szTmp[VBOX_EXTPACK_NAME_MAX_LEN + 1];
+- size_t off = 0;
+- char ch;
+- while ((ch = pszName[off]) != '\0')
+- {
+- if (ch == ' ')
+- ch = '_';
+- szTmp[off++] = ch;
+- }
+- szTmp[off] = '\0';
+- Assert(VBoxExtPackIsValidMangledName(szTmp));
+-
+- return new RTCString(szTmp, off);
+-}
+-
+-/**
+- * Unmangle an extension pack name (reverses VBoxExtPackMangleName).
+- *
+- * @returns String containing the mangled name on success, the caller must
+- * delete it. NULL on failure.
+- * @param pszMangledName The mangled name.
+- * @param cchMax The max name length. RTSTR_MAX is fine.
+- * @sa VBoxExtPackMangleName, VBoxExtPackIsValidMangledName
+- */
+-RTCString *VBoxExtPackUnmangleName(const char *pszMangledName, size_t cchMax)
+-{
+- AssertReturn(VBoxExtPackIsValidMangledName(pszMangledName, cchMax), NULL);
+-
+- char szTmp[VBOX_EXTPACK_NAME_MAX_LEN + 1];
+- size_t off = 0;
+- char ch;
+- while ( off < cchMax
+- && (ch = pszMangledName[off]) != '\0')
+- {
+- if (ch == '_')
+- ch = ' ';
+- else
+- AssertReturn(RT_C_IS_ALNUM(ch) || ch == ' ', NULL);
+- szTmp[off++] = ch;
+- }
+- szTmp[off] = '\0';
+- AssertReturn(VBoxExtPackIsValidName(szTmp), NULL);
+-
+- return new RTCString(szTmp, off);
+-}
+-
+-/**
+- * Constructs the extension pack directory path.
+- *
+- * A combination of RTPathJoin and VBoxExtPackMangleName.
+- *
+- * @returns IPRT status code like RTPathJoin.
+- * @param pszExtPackDir Where to return the directory path.
+- * @param cbExtPackDir The size of the return buffer.
+- * @param pszParentDir The parent directory (".../Extensions").
+- * @param pszName The extension pack name, unmangled.
+- */
+-int VBoxExtPackCalcDir(char *pszExtPackDir, size_t cbExtPackDir, const char *pszParentDir, const char *pszName)
+-{
+- AssertReturn(VBoxExtPackIsValidName(pszName), VERR_INTERNAL_ERROR_5);
+-
+- RTCString *pstrMangledName = VBoxExtPackMangleName(pszName);
+- if (!pstrMangledName)
+- return VERR_INTERNAL_ERROR_4;
+-
+- int vrc = RTPathJoin(pszExtPackDir, cbExtPackDir, pszParentDir, pstrMangledName->c_str());
+- delete pstrMangledName;
+-
+- return vrc;
+-}
+-
+-
+-/**
+- * Validates the extension pack version string.
+- *
+- * @returns true if valid, false if not.
+- * @param pszVersion The version string to validate.
+- */
+-bool VBoxExtPackIsValidVersionString(const char *pszVersion)
+-{
+- if (!pszVersion || *pszVersion == '\0')
+- return false;
+-
+- /* 1.x.y.z... */
+- for (;;)
+- {
+- if (!RT_C_IS_DIGIT(*pszVersion))
+- return false;
+- do
+- pszVersion++;
+- while (RT_C_IS_DIGIT(*pszVersion));
+- if (*pszVersion != '.')
+- break;
+- pszVersion++;
+- }
+-
+- /* upper case string + numbers indicating the build type */
+- if (*pszVersion == '-' || *pszVersion == '_')
+- {
+- /** @todo Should probably restrict this to known build types (alpha,
+- * beta, rc, ++). */
+- do
+- pszVersion++;
+- while ( RT_C_IS_DIGIT(*pszVersion)
+- || RT_C_IS_UPPER(*pszVersion)
+- || *pszVersion == '-'
+- || *pszVersion == '_');
+- }
+-
+- return *pszVersion == '\0';
+-}
+-
+-/**
+- * Validates the extension pack edition string.
+- *
+- * @returns true if valid, false if not.
+- * @param pszEdition The edition string to validate.
+- */
+-bool VBoxExtPackIsValidEditionString(const char *pszEdition)
+-{
+- if (*pszEdition)
+- {
+- if (!RT_C_IS_UPPER(*pszEdition))
+- return false;
+-
+- do
+- pszEdition++;
+- while ( RT_C_IS_UPPER(*pszEdition)
+- || RT_C_IS_DIGIT(*pszEdition)
+- || *pszEdition == '-'
+- || *pszEdition == '_');
+- }
+- return *pszEdition == '\0';
+-}
+-
+-/**
+- * Validates an extension pack module string.
+- *
+- * @returns true if valid, false if not.
+- * @param pszModule The module string to validate.
+- */
+-bool VBoxExtPackIsValidModuleString(const char *pszModule)
+-{
+- if (!pszModule || *pszModule == '\0')
+- return false;
+-
+- /* Restricted charset, no extensions (dots). */
+- while ( RT_C_IS_ALNUM(*pszModule)
+- || *pszModule == '-'
+- || *pszModule == '_')
+- pszModule++;
+-
+- return *pszModule == '\0';
+-}
+-
+-/**
+- * RTStrPrintfv wrapper.
+- *
+- * @returns @a rc
+- * @param rc The status code to return.
+- * @param pszError The error buffer.
+- * @param cbError The size of the buffer.
+- * @param pszFormat The error message format string.
+- * @param ... Format arguments.
+- */
+-static int vboxExtPackReturnError(int rc, char *pszError, size_t cbError, const char *pszFormat, ...)
+-{
+- va_list va;
+- va_start(va, pszFormat);
+- RTStrPrintfV(pszError, cbError, pszFormat, va);
+- va_end(va);
+- return rc;
+-}
+-
+-/**
+- * RTStrPrintfv wrapper.
+- *
+- * @param pszError The error buffer.
+- * @param cbError The size of the buffer.
+- * @param pszFormat The error message format string.
+- * @param ... Format arguments.
+- */
+-static void vboxExtPackSetError(char *pszError, size_t cbError, const char *pszFormat, ...)
+-{
+- va_list va;
+- va_start(va, pszFormat);
+- RTStrPrintfV(pszError, cbError, pszFormat, va);
+- va_end(va);
+-}
+-
+-/**
+- * Verifies the manifest and its signature.
+- *
+- * @returns VBox status code, failures with message.
+- * @param hManifestFile The xml from the extension pack.
+- * @param pszExtPackName The expected extension pack name. This can be
+- * NULL, in which we don't have any expectations.
+- * @param pszError Where to store an error message on failure.
+- * @param cbError The size of the buffer @a pszError points to.
+- */
+-static int vboxExtPackVerifyXml(RTVFSFILE hXmlFile, const char *pszExtPackName, char *pszError, size_t cbError)
+-{
+- /*
+- * Load the XML.
+- */
+- VBOXEXTPACKDESC ExtPackDesc;
+- RTCString *pstrErr = VBoxExtPackLoadDescFromVfsFile(hXmlFile, &ExtPackDesc, NULL);
+- if (pstrErr)
+- {
+- RTStrCopy(pszError, cbError, pstrErr->c_str());
+- delete pstrErr;
+- return VERR_PARSE_ERROR;
+- }
+-
+- /*
+- * Check the name.
+- */
+- /** @todo drop this restriction after the old install interface is
+- * dropped. */
+- int rc = VINF_SUCCESS;
+- if ( pszExtPackName
+- && !ExtPackDesc.strName.equalsIgnoreCase(pszExtPackName))
+- rc = vboxExtPackReturnError(VERR_NOT_EQUAL, pszError, cbError,
+- "The name of the downloaded file and the name stored inside the extension pack does not match"
+- " (xml='%s' file='%s')", ExtPackDesc.strName.c_str(), pszExtPackName);
+- return rc;
+-}
+-
+-/**
+- * Verifies the manifest and its signature.
+- *
+- * @returns VBox status code, failures with message.
+- * @param hOurManifest The manifest we compiled.
+- * @param hManifestFile The manifest file in the extension pack.
+- * @param hSignatureFile The manifest signature file.
+- * @param pszError Where to store an error message on failure.
+- * @param cbError The size of the buffer @a pszError points to.
+- */
+-static int vboxExtPackVerifyManifestAndSignature(RTMANIFEST hOurManifest, RTVFSFILE hManifestFile, RTVFSFILE hSignatureFile,
+- char *pszError, size_t cbError)
+-{
+- /*
+- * Read the manifest from the extension pack.
+- */
+- int rc = RTVfsFileSeek(hManifestFile, 0, RTFILE_SEEK_BEGIN, NULL);
+- if (RT_FAILURE(rc))
+- return vboxExtPackReturnError(rc, pszError, cbError, "RTVfsFileSeek failed: %Rrc", rc);
+-
+- RTMANIFEST hTheirManifest;
+- rc = RTManifestCreate(0 /*fFlags*/, &hTheirManifest);
+- if (RT_FAILURE(rc))
+- return vboxExtPackReturnError(rc, pszError, cbError, "RTManifestCreate failed: %Rrc", rc);
+-
+- RTVFSIOSTREAM hVfsIos = RTVfsFileToIoStream(hManifestFile);
+- rc = RTManifestReadStandard(hTheirManifest, hVfsIos);
+- RTVfsIoStrmRelease(hVfsIos);
+- if (RT_SUCCESS(rc))
+- {
+- /*
+- * Compare the manifests.
+- */
+- static const char *s_apszIgnoreEntries[] =
+- {
+- VBOX_EXTPACK_MANIFEST_NAME,
+- VBOX_EXTPACK_SIGNATURE_NAME,
+- "./" VBOX_EXTPACK_MANIFEST_NAME,
+- "./" VBOX_EXTPACK_SIGNATURE_NAME,
+- NULL
+- };
+- char szError[RTPATH_MAX];
+- rc = RTManifestEqualsEx(hOurManifest, hTheirManifest, &s_apszIgnoreEntries[0], NULL,
+- RTMANIFEST_EQUALS_IGN_MISSING_ATTRS /*fFlags*/,
+- szError, sizeof(szError));
+- if (RT_SUCCESS(rc))
+- {
+- /*
+- * Validate the manifest file signature.
+- */
+- /** @todo implement signature stuff */
+- NOREF(hSignatureFile);
+-
+- }
+- else if (rc == VERR_NOT_EQUAL && szError[0])
+- vboxExtPackSetError(pszError, cbError, "Manifest mismatch: %s", szError);
+- else
+- vboxExtPackSetError(pszError, cbError, "RTManifestEqualsEx failed: %Rrc", rc);
+-#if 0
+- RTVFSIOSTREAM hVfsIosStdOut = NIL_RTVFSIOSTREAM;
+- RTVfsIoStrmFromStdHandle(RTHANDLESTD_OUTPUT, RTFILE_O_WRITE, true, &hVfsIosStdOut);
+- RTVfsIoStrmWrite(hVfsIosStdOut, "Our:\n", sizeof("Our:\n") - 1, true, NULL);
+- RTManifestWriteStandard(hOurManifest, hVfsIosStdOut);
+- RTVfsIoStrmWrite(hVfsIosStdOut, "Their:\n", sizeof("Their:\n") - 1, true, NULL);
+- RTManifestWriteStandard(hTheirManifest, hVfsIosStdOut);
+-#endif
+- }
+- else
+- vboxExtPackSetError(pszError, cbError, "Error parsing '%s': %Rrc", VBOX_EXTPACK_MANIFEST_NAME, rc);
+-
+- RTManifestRelease(hTheirManifest);
+- return rc;
+-}
+-
+-
+-/**
+- * Verifies the file digest (if specified) and returns the SHA-256 of the file.
+- *
+- * @returns
+- * @param hFileManifest Manifest containing a SHA-256 digest of the file
+- * that was calculated as the file was processed.
+- * @param pszFileDigest SHA-256 digest of the file.
+- * @param pStrDigest Where to return the SHA-256 digest. Optional.
+- * @param pszError Where to write an error message on failure.
+- * @param cbError The size of the @a pszError buffer.
+- */
+-static int vboxExtPackVerifyFileDigest(RTMANIFEST hFileManifest, const char *pszFileDigest,
+- RTCString *pStrDigest, char *pszError, size_t cbError)
+-{
+- /*
+- * Extract the SHA-256 entry for the extpack file.
+- */
+- char szCalculatedDigest[RTSHA256_DIGEST_LEN + 1];
+- int rc = RTManifestEntryQueryAttr(hFileManifest, "extpack", NULL /*no name*/, RTMANIFEST_ATTR_SHA256,
+- szCalculatedDigest, sizeof(szCalculatedDigest), NULL);
+- if (RT_SUCCESS(rc))
+- {
+- /*
+- * Convert the two strings to binary form before comparing.
+- * We convert the calculated hash even if we don't have anything to
+- * compare with, just to validate it.
+- */
+- uint8_t abCalculatedHash[RTSHA256_HASH_SIZE];
+- rc = RTSha256FromString(szCalculatedDigest, abCalculatedHash);
+- if (RT_SUCCESS(rc))
+- {
+- if ( pszFileDigest
+- && *pszFileDigest != '\0')
+- {
+- uint8_t abFileHash[RTSHA256_HASH_SIZE];
+- rc = RTSha256FromString(pszFileDigest, abFileHash);
+- if (RT_SUCCESS(rc))
+- {
+- if (memcmp(abFileHash, abCalculatedHash, sizeof(abFileHash)))
+- {
+- vboxExtPackSetError(pszError, cbError, "The extension pack file has changed (SHA-256 mismatch)");
+- rc = VERR_NOT_EQUAL;
+- }
+- }
+- else
+- vboxExtPackSetError(pszError, cbError, "Bad SHA-256 '%s': %Rrc", szCalculatedDigest, rc);
+- }
+-
+- /*
+- * Set the output hash on success.
+- */
+- if (pStrDigest && RT_SUCCESS(rc))
+- {
+- try
+- {
+- *pStrDigest = szCalculatedDigest;
+- }
+- catch (std::bad_alloc)
+- {
+- rc = VERR_NO_MEMORY;
+- }
+- }
+- }
+- else
+- vboxExtPackSetError(pszError, cbError, "Bad SHA-256 '%s': %Rrc", szCalculatedDigest, rc);
+- }
+- else
+- vboxExtPackSetError(pszError, cbError, "RTManifestEntryGetAttr: %Rrc", rc);
+- return rc;
+-}
+-
+-
+-
+-/**
+- * Validates a standard file.
+- *
+- * Generally all files are
+- *
+- * @returns VBox status code, failure message in @a pszError.
+- * @param pszAdjName The adjusted member name.
+- * @param enmType The VFS object type.
+- * @param phVfsObj The pointer to the VFS object handle variable.
+- * This is both input and output.
+- * @param phVfsFile Where to store the handle to the memorized
+- * file. This is NULL for license files.
+- * @param pszError Where to write an error message on failure.
+- * @param cbError The size of the @a pszError buffer.
+- */
+-static int VBoxExtPackValidateStandardFile(const char *pszAdjName, RTVFSOBJTYPE enmType,
+- PRTVFSOBJ phVfsObj, PRTVFSFILE phVfsFile, char *pszError, size_t cbError)
+-{
+- int rc;
+-
+- /*
+- * Make sure it's a file and that it isn't too large.
+- */
+- if (phVfsFile && *phVfsFile != NIL_RTVFSFILE)
+- rc = vboxExtPackReturnError(VERR_DUPLICATE, pszError, cbError,
+- "There can only be one '%s'", pszAdjName);
+- else if (enmType != RTVFSOBJTYPE_IO_STREAM && enmType != RTVFSOBJTYPE_FILE)
+- rc = vboxExtPackReturnError(VERR_NOT_A_FILE, pszError, cbError,
+- "Standard member '%s' is not a file", pszAdjName);
+- else
+- {
+- RTFSOBJINFO ObjInfo;
+- rc = RTVfsObjQueryInfo(*phVfsObj, &ObjInfo, RTFSOBJATTRADD_NOTHING);
+- if (RT_SUCCESS(rc))
+- {
+- if (!RTFS_IS_FILE(ObjInfo.Attr.fMode))
+- rc = vboxExtPackReturnError(VERR_NOT_A_FILE, pszError, cbError,
+- "Standard member '%s' is not a file", pszAdjName);
+- else if (ObjInfo.cbObject >= _1M)
+- rc = vboxExtPackReturnError(VERR_OUT_OF_RANGE, pszError, cbError,
+- "Standard member '%s' is too large: %'RU64 bytes (max 1 MB)",
+- pszAdjName, (uint64_t)ObjInfo.cbObject);
+- else
+- {
+- /*
+- * Make an in memory copy of the stream and check that the file
+- * is UTF-8 clean.
+- */
+- RTVFSIOSTREAM hVfsIos = RTVfsObjToIoStream(*phVfsObj);
+- RTVFSFILE hVfsFile;
+- rc = RTVfsMemorizeIoStreamAsFile(hVfsIos, RTFILE_O_READ, &hVfsFile);
+- if (RT_SUCCESS(rc))
+- {
+- rc = RTVfsIoStrmValidateUtf8Encoding(hVfsIos,
+- RTVFS_VALIDATE_UTF8_BY_RTC_3629 | RTVFS_VALIDATE_UTF8_NO_NULL,
+- NULL);
+- if (RT_SUCCESS(rc))
+- {
+- /*
+- * Replace *phVfsObj with the memorized file.
+- */
+- rc = RTVfsFileSeek(hVfsFile, 0, RTFILE_SEEK_BEGIN, NULL);
+- if (RT_SUCCESS(rc))
+- {
+- RTVfsObjRelease(*phVfsObj);
+- *phVfsObj = RTVfsObjFromFile(hVfsFile);
+- }
+- else
+- vboxExtPackSetError(pszError, cbError, "RTVfsFileSeek failed on '%s': %Rrc", pszAdjName, rc);
+- }
+-
+- if (phVfsFile && RT_SUCCESS(rc))
+- *phVfsFile = hVfsFile;
+- else
+- RTVfsFileRelease(hVfsFile);
+- }
+- else
+- vboxExtPackSetError(pszError, cbError, "RTVfsMemorizeIoStreamAsFile failed on '%s': %Rrc", pszAdjName, rc);
+- RTVfsIoStrmRelease(hVfsIos);
+- }
+- }
+- else
+- vboxExtPackSetError(pszError, cbError, "RTVfsObjQueryInfo failed on '%s': %Rrc", pszAdjName, rc);
+- }
+- return rc;
+-}
+-
+-
+-/**
+- * Validates a name in an extension pack.
+- *
+- * We restrict the charset to try make sure the extension pack can be unpacked
+- * on all file systems.
+- *
+- * @returns VBox status code, failures with message.
+- * @param pszName The name to validate.
+- * @param pszError Where to store an error message on failure.
+- * @param cbError The size of the buffer @a pszError points to.
+- */
+-static int vboxExtPackValidateMemberName(const char *pszName, char *pszError, size_t cbError)
+-{
+- if (RTPathStartsWithRoot(pszName))
+- return vboxExtPackReturnError(VERR_PATH_IS_NOT_RELATIVE, pszError, cbError, "'%s': starts with root spec", pszName);
+-
+- const char *pszErr = NULL;
+- const char *psz = pszName;
+- int ch;
+- while ((ch = *psz) != '\0')
+- {
+- /* Character set restrictions. */
+- if (ch < 0 || ch >= 128)
+- {
+- pszErr = "Only 7-bit ASCII allowed";
+- break;
+- }
+- if (ch <= 31 || ch == 127)
+- {
+- pszErr = "No control characters are not allowed";
+- break;
+- }
+- if (ch == '\\')
+- {
+- pszErr = "Only backward slashes are not allowed";
+- break;
+- }
+- if (strchr("'\":;*?|[]<>(){}", ch))
+- {
+- pszErr = "The characters ', \", :, ;, *, ?, |, [, ], <, >, (, ), { and } are not allowed";
+- break;
+- }
+-
+- /* Take the simple way out and ban all ".." sequences. */
+- if ( ch == '.'
+- && psz[1] == '.')
+- {
+- pszErr = "Double dot sequence are not allowed";
+- break;
+- }
+-
+- /* Keep the tree shallow or the hardening checks will fail. */
+- if (psz - pszName > VBOX_EXTPACK_MAX_MEMBER_NAME_LENGTH)
+- {
+- pszErr = "Too long";
+- break;
+- }
+-
+- /* advance */
+- psz++;
+- }
+-
+- if (pszErr)
+- return vboxExtPackReturnError(VERR_INVALID_NAME, pszError, cbError,
+- "Bad member name '%s' (pos %zu): %s", pszName, (size_t)(psz - pszName), pszErr);
+- return RTEXITCODE_SUCCESS;
+-}
+-
+-
+-/**
+- * Validates a file in an extension pack.
+- *
+- * @returns VBox status code, failures with message.
+- * @param pszName The name of the file.
+- * @param hVfsObj The VFS object.
+- * @param pszError Where to store an error message on failure.
+- * @param cbError The size of the buffer @a pszError points to.
+- */
+-static int vboxExtPackValidateMemberFile(const char *pszName, RTVFSOBJ hVfsObj, char *pszError, size_t cbError)
+-{
+- int rc = vboxExtPackValidateMemberName(pszName, pszError, cbError);
+- if (RT_SUCCESS(rc))
+- {
+- RTFSOBJINFO ObjInfo;
+- rc = RTVfsObjQueryInfo(hVfsObj, &ObjInfo, RTFSOBJATTRADD_NOTHING);
+- if (RT_SUCCESS(rc))
+- {
+- if (ObjInfo.cbObject >= 9*_1G64)
+- rc = vboxExtPackReturnError(VERR_OUT_OF_RANGE, pszError, cbError,
+- "'%s': too large (%'RU64 bytes)",
+- pszName, (uint64_t)ObjInfo.cbObject);
+- if (!RTFS_IS_FILE(ObjInfo.Attr.fMode))
+- rc = vboxExtPackReturnError(VERR_NOT_A_FILE, pszError, cbError,
+- "The alleged file '%s' has a mode mask stating otherwise (%RTfmode)",
+- pszName, ObjInfo.Attr.fMode);
+- }
+- else
+- vboxExtPackSetError(pszError, cbError, "RTVfsObjQueryInfo failed on '%s': %Rrc", pszName, rc);
+- }
+- return rc;
+-}
+-
+-
+-/**
+- * Validates a directory in an extension pack.
+- *
+- * @returns VBox status code, failures with message.
+- * @param pszName The name of the directory.
+- * @param hVfsObj The VFS object.
+- * @param pszError Where to store an error message on failure.
+- * @param cbError The size of the buffer @a pszError points to.
+- */
+-static int vboxExtPackValidateMemberDir(const char *pszName, RTVFSOBJ hVfsObj, char *pszError, size_t cbError)
+-{
+- int rc = vboxExtPackValidateMemberName(pszName, pszError, cbError);
+- if (RT_SUCCESS(rc))
+- {
+- RTFSOBJINFO ObjInfo;
+- rc = RTVfsObjQueryInfo(hVfsObj, &ObjInfo, RTFSOBJATTRADD_NOTHING);
+- if (RT_SUCCESS(rc))
+- {
+- if (!RTFS_IS_DIRECTORY(ObjInfo.Attr.fMode))
+- rc = vboxExtPackReturnError(VERR_NOT_A_DIRECTORY, pszError, cbError,
+- "The alleged directory '%s' has a mode mask saying differently (%RTfmode)",
+- pszName, ObjInfo.Attr.fMode);
+- }
+- else
+- vboxExtPackSetError(pszError, cbError, "RTVfsObjQueryInfo failed on '%s': %Rrc", pszName, rc);
+- }
+- return rc;
+-}
+-
+-/**
+- * Validates a member of an extension pack.
+- *
+- * @returns VBox status code, failures with message.
+- * @param pszName The name of the directory.
+- * @param enmType The object type.
+- * @param hVfsObj The VFS object.
+- * @param pszError Where to store an error message on failure.
+- * @param cbError The size of the buffer @a pszError points to.
+- */
+-int VBoxExtPackValidateMember(const char *pszName, RTVFSOBJTYPE enmType, RTVFSOBJ hVfsObj, char *pszError, size_t cbError)
+-{
+- Assert(cbError > 0);
+- *pszError = '\0';
+-
+- int rc;
+- if ( enmType == RTVFSOBJTYPE_FILE
+- || enmType == RTVFSOBJTYPE_IO_STREAM)
+- rc = vboxExtPackValidateMemberFile(pszName, hVfsObj, pszError, cbError);
+- else if ( enmType == RTVFSOBJTYPE_DIR
+- || enmType == RTVFSOBJTYPE_BASE)
+- rc = vboxExtPackValidateMemberDir(pszName, hVfsObj, pszError, cbError);
+- else
+- rc = vboxExtPackReturnError(VERR_UNEXPECTED_FS_OBJ_TYPE, pszError, cbError,
+- "'%s' is not a file or directory (enmType=%d)", pszName, enmType);
+- return rc;
+-}
+-
+-
+-/**
+- * Rewinds the tarball file handle and creates a gunzip | tar chain that
+- * results in a filesystem stream.
+- *
+- * @returns VBox status code, failures with message.
+- * @param hTarballFile The handle to the tarball file.
+- * @param pszError Where to store an error message on failure.
+- * @param cbError The size of the buffer @a pszError points to.
+- * @param phTarFss Where to return the filesystem stream handle.
+- * @param phFileManifest Where to return a manifest where the tarball is
+- * gettting hashed. The entry will be called
+- * "extpack" and be ready when the file system
+- * stream is at an end. Optional.
+- */
+-int VBoxExtPackOpenTarFss(RTFILE hTarballFile, char *pszError, size_t cbError, PRTVFSFSSTREAM phTarFss, PRTMANIFEST phFileManifest)
+-{
+- Assert(cbError > 0);
+- *pszError = '\0';
+- *phTarFss = NIL_RTVFSFSSTREAM;
+-
+- /*
+- * Rewind the file and set up a VFS chain for it.
+- */
+- int rc = RTFileSeek(hTarballFile, 0, RTFILE_SEEK_BEGIN, NULL);
+- if (RT_FAILURE(rc))
+- return vboxExtPackReturnError(rc, pszError, cbError, "Failed seeking to the start of the tarball: %Rrc", rc);
+-
+- RTVFSIOSTREAM hTarballIos;
+- rc = RTVfsIoStrmFromRTFile(hTarballFile, RTFILE_O_READ | RTFILE_O_DENY_WRITE | RTFILE_O_OPEN, true /*fLeaveOpen*/,
+- &hTarballIos);
+- if (RT_FAILURE(rc))
+- return vboxExtPackReturnError(rc, pszError, cbError, "RTVfsIoStrmFromRTFile failed: %Rrc", rc);
+-
+- RTMANIFEST hFileManifest = NIL_RTMANIFEST;
+- rc = RTManifestCreate(0 /*fFlags*/, &hFileManifest);
+- if (RT_SUCCESS(rc))
+- {
+- RTVFSIOSTREAM hPtIos;
+- rc = RTManifestEntryAddPassthruIoStream(hFileManifest, hTarballIos, "extpack", RTMANIFEST_ATTR_SHA256, true /*read*/, &hPtIos);
+- if (RT_SUCCESS(rc))
+- {
+- RTVFSIOSTREAM hGunzipIos;
+- rc = RTZipGzipDecompressIoStream(hPtIos, 0 /*fFlags*/, &hGunzipIos);
+- if (RT_SUCCESS(rc))
+- {
+- RTVFSFSSTREAM hTarFss;
+- rc = RTZipTarFsStreamFromIoStream(hGunzipIos, 0 /*fFlags*/, &hTarFss);
+- if (RT_SUCCESS(rc))
+- {
+- RTVfsIoStrmRelease(hPtIos);
+- RTVfsIoStrmRelease(hGunzipIos);
+- RTVfsIoStrmRelease(hTarballIos);
+- *phTarFss = hTarFss;
+- if (phFileManifest)
+- *phFileManifest = hFileManifest;
+- else
+- RTManifestRelease(hFileManifest);
+- return VINF_SUCCESS;
+- }
+-
+- vboxExtPackSetError(pszError, cbError, "RTZipTarFsStreamFromIoStream failed: %Rrc", rc);
+- RTVfsIoStrmRelease(hGunzipIos);
+- }
+- else
+- vboxExtPackSetError(pszError, cbError, "RTZipGzipDecompressIoStream failed: %Rrc", rc);
+- RTVfsIoStrmRelease(hPtIos);
+- }
+- else
+- vboxExtPackSetError(pszError, cbError, "RTManifestEntryAddPassthruIoStream failed: %Rrc", rc);
+- RTManifestRelease(hFileManifest);
+- }
+- else
+- vboxExtPackSetError(pszError, cbError, "RTManifestCreate failed: %Rrc", rc);
+-
+- RTVfsIoStrmRelease(hTarballIos);
+- return rc;
+-}
+-
+-
+-/**
+- * Validates the extension pack tarball prior to unpacking.
+- *
+- * Operations performed:
+- * - Mandatory files.
+- * - Manifest check.
+- * - Manifest seal check.
+- * - XML check, match name.
+- *
+- * @returns VBox status code, failures with message.
+- * @param hTarballFile The handle to open the @a pszTarball file.
+- * @param pszExtPackName The name of the extension pack name. NULL if
+- * the name is not fixed.
+- * @param pszTarball The name of the tarball in case we have to
+- * complain about something.
+- * @param pszTarballDigest The SHA-256 digest of the tarball. Empty string
+- * if no digest available.
+- * @param pszError Where to store an error message on failure.
+- * @param cbError The size of the buffer @a pszError points to.
+- * @param phValidManifest Where to optionally return the handle to fully
+- * validated the manifest for the extension pack.
+- * This includes all files.
+- * @param phXmlFile Where to optionally return the memorized XML
+- * file.
+- * @param pStrDigest Where to return the digest of the file.
+- * Optional.
+- */
+-int VBoxExtPackValidateTarball(RTFILE hTarballFile, const char *pszExtPackName,
+- const char *pszTarball, const char *pszTarballDigest,
+- char *pszError, size_t cbError,
+- PRTMANIFEST phValidManifest, PRTVFSFILE phXmlFile, RTCString *pStrDigest)
+-{
+- /*
+- * Clear return values.
+- */
+- if (phValidManifest)
+- *phValidManifest = NIL_RTMANIFEST;
+- if (phXmlFile)
+- *phXmlFile = NIL_RTVFSFILE;
+- Assert(cbError > 1);
+- *pszError = '\0';
+- NOREF(pszTarball);
+-
+- /*
+- * Open the tar.gz filesystem stream and set up an manifest in-memory file.
+- */
+- RTMANIFEST hFileManifest;
+- RTVFSFSSTREAM hTarFss;
+- int rc = VBoxExtPackOpenTarFss(hTarballFile, pszError, cbError, &hTarFss, &hFileManifest);
+- if (RT_FAILURE(rc))
+- return rc;
+-
+- RTMANIFEST hOurManifest;
+- rc = RTManifestCreate(0 /*fFlags*/, &hOurManifest);
+- if (RT_SUCCESS(rc))
+- {
+- /*
+- * Process the tarball (would be nice to move this to a function).
+- */
+- RTVFSFILE hXmlFile = NIL_RTVFSFILE;
+- RTVFSFILE hManifestFile = NIL_RTVFSFILE;
+- RTVFSFILE hSignatureFile = NIL_RTVFSFILE;
+- for (;;)
+- {
+- /*
+- * Get the next stream object.
+- */
+- char *pszName;
+- RTVFSOBJ hVfsObj;
+- RTVFSOBJTYPE enmType;
+- rc = RTVfsFsStrmNext(hTarFss, &pszName, &enmType, &hVfsObj);
+- if (RT_FAILURE(rc))
+- {
+- if (rc != VERR_EOF)
+- vboxExtPackSetError(pszError, cbError, "RTVfsFsStrmNext failed: %Rrc", rc);
+- else
+- rc = VINF_SUCCESS;
+- break;
+- }
+- const char *pszAdjName = pszName[0] == '.' && pszName[1] == '/' ? &pszName[2] : pszName;
+-
+- /*
+- * Check the type & name validity, performing special tests on
+- * standard extension pack member files.
+- *
+- * N.B. We will always reach the end of the loop before breaking on
+- * failure - cleanup reasons.
+- */
+- rc = VBoxExtPackValidateMember(pszName, enmType, hVfsObj, pszError, cbError);
+- if (RT_SUCCESS(rc))
+- {
+- PRTVFSFILE phVfsFile = NULL;
+- if (!strcmp(pszAdjName, VBOX_EXTPACK_DESCRIPTION_NAME))
+- phVfsFile = &hXmlFile;
+- else if (!strcmp(pszAdjName, VBOX_EXTPACK_MANIFEST_NAME))
+- phVfsFile = &hManifestFile;
+- else if (!strcmp(pszAdjName, VBOX_EXTPACK_SIGNATURE_NAME))
+- phVfsFile = &hSignatureFile;
+- else if (!strncmp(pszAdjName, VBOX_EXTPACK_LICENSE_NAME_PREFIX, sizeof(VBOX_EXTPACK_LICENSE_NAME_PREFIX) - 1))
+- rc = VBoxExtPackValidateStandardFile(pszAdjName, enmType, &hVfsObj, NULL, pszError, cbError);
+- if (phVfsFile)
+- rc = VBoxExtPackValidateStandardFile(pszAdjName, enmType, &hVfsObj, phVfsFile, pszError, cbError);
+- }
+-
+- /*
+- * Add any I/O stream to the manifest
+- */
+- if ( RT_SUCCESS(rc)
+- && ( enmType == RTVFSOBJTYPE_FILE
+- || enmType == RTVFSOBJTYPE_IO_STREAM))
+- {
+- RTVFSIOSTREAM hVfsIos = RTVfsObjToIoStream(hVfsObj);
+- rc = RTManifestEntryAddIoStream(hOurManifest, hVfsIos, pszAdjName, RTMANIFEST_ATTR_SIZE | RTMANIFEST_ATTR_SHA256);
+- if (RT_FAILURE(rc))
+- vboxExtPackSetError(pszError, cbError, "RTManifestEntryAddIoStream failed on '%s': %Rrc", pszAdjName, rc);
+- RTVfsIoStrmRelease(hVfsIos);
+- }
+-
+- /*
+- * Clean up and break out on failure.
+- */
+- RTVfsObjRelease(hVfsObj);
+- RTStrFree(pszName);
+- if (RT_FAILURE(rc))
+- break;
+- }
+-
+- /*
+- * Check the integrity of the tarball file.
+- */
+- if (RT_SUCCESS(rc))
+- {
+- RTVfsFsStrmRelease(hTarFss);
+- hTarFss = NIL_RTVFSFSSTREAM;
+- rc = vboxExtPackVerifyFileDigest(hFileManifest, pszTarballDigest, pStrDigest, pszError, cbError);
+- }
+-
+- /*
+- * If we've successfully processed the tarball, verify that the
+- * mandatory files are present.
+- */
+- if (RT_SUCCESS(rc))
+- {
+- if (hXmlFile == NIL_RTVFSFILE)
+- rc = vboxExtPackReturnError(VERR_MISSING, pszError, cbError, "Mandator file '%s' is missing", VBOX_EXTPACK_DESCRIPTION_NAME);
+- if (hManifestFile == NIL_RTVFSFILE)
+- rc = vboxExtPackReturnError(VERR_MISSING, pszError, cbError, "Mandator file '%s' is missing", VBOX_EXTPACK_MANIFEST_NAME);
+- if (hSignatureFile == NIL_RTVFSFILE)
+- rc = vboxExtPackReturnError(VERR_MISSING, pszError, cbError, "Mandator file '%s' is missing", VBOX_EXTPACK_SIGNATURE_NAME);
+- }
+-
+- /*
+- * Check the manifest and it's signature.
+- */
+- if (RT_SUCCESS(rc))
+- rc = vboxExtPackVerifyManifestAndSignature(hOurManifest, hManifestFile, hSignatureFile, pszError, cbError);
+-
+- /*
+- * Check the XML.
+- */
+- if (RT_SUCCESS(rc))
+- rc = vboxExtPackVerifyXml(hXmlFile, pszExtPackName, pszError, cbError);
+-
+- /*
+- * Returns objects.
+- */
+- if (RT_SUCCESS(rc))
+- {
+- if (phValidManifest)
+- {
+- RTManifestRetain(hOurManifest);
+- *phValidManifest = hOurManifest;
+- }
+- if (phXmlFile)
+- {
+- RTVfsFileRetain(hXmlFile);
+- *phXmlFile = hXmlFile;
+- }
+- }
+-
+- /*
+- * Release our object references.
+- */
+- RTManifestRelease(hOurManifest);
+- RTVfsFileRelease(hXmlFile);
+- RTVfsFileRelease(hManifestFile);
+- RTVfsFileRelease(hSignatureFile);
+- }
+- else
+- vboxExtPackSetError(pszError, cbError, "RTManifestCreate failed: %Rrc", rc);
+- RTVfsFsStrmRelease(hTarFss);
+- RTManifestRelease(hFileManifest);
+-
+- return rc;
+-}
+-
+--- VirtualBox-4.1.18.orig/include/Makefile.kmk 2012-06-20 10:07:49.000000000 -0300
++++ VirtualBox-4.1.18/include/Makefile.kmk 2012-07-24 21:11:57.007068865 -0300
+@@ -51,7 +51,6 @@
+ VBox/vd-cache-plugin.h \
+ VBox/vmm/uvm.h \
+ VBox/vscsi.h \
+- $(wildcard VBox/ExtPack/*.h ) \
+ iprt/alloca.h \
+ iprt/tcp.h \
+ iprt/localipc.h \
+--- VirtualBox-4.1.18.orig/src/Makefile.kmk 2012-06-20 10:07:57.000000000 -0300
++++ VirtualBox-4.1.18/src/Makefile.kmk 2012-07-24 22:51:10.206996034 -0300
+@@ -26,14 +26,6 @@
+ include $(PATH_SUB_CURRENT)/VBox/Makefile.kmk
+ include $(PATH_SUB_CURRENT)/libs/Makefile.kmk
+
+-else if defined(VBOX_ONLY_EXTPACKS)
+- include $(PATH_SUB_CURRENT)/bldprogs/Makefile.kmk
+- include $(PATH_SUB_CURRENT)/VBox/Makefile.kmk
+- include $(PATH_SUB_CURRENT)/libs/Makefile.kmk
+- ifndef VBOX_ONLY_EXTPACKS_USE_IMPLIBS
+- include $(PATH_SUB_CURRENT)/recompiler/Makefile.kmk
+- endif
+-
+ else if defined(VBOX_ONLY_TESTSUITE)
+ include $(PATH_SUB_CURRENT)/libs/Makefile.kmk
+ include $(PATH_SUB_CURRENT)/VBox/Makefile.kmk
+--- VirtualBox-4.1.18.orig/src/VBox/Makefile.kmk 2012-07-24 21:19:55.565641784 -0300
++++ VirtualBox-4.1.18/src/VBox/Makefile.kmk 2012-07-24 22:12:55.429156962 -0300
+@@ -33,19 +33,6 @@
+ include $(PATH_SUB_CURRENT)/HostDrivers/Makefile.kmk
+ include $(PATH_SUB_CURRENT)/Frontends/Makefile.kmk
+
+-else ifdef VBOX_ONLY_EXTPACKS
+- include $(PATH_SUB_CURRENT)/Runtime/Makefile.kmk
+- include $(PATH_SUB_CURRENT)/Devices/Makefile.kmk
+- include $(PATH_SUB_CURRENT)/HostDrivers/Makefile.kmk
+- include $(PATH_SUB_CURRENT)/ExtPacks/Makefile.kmk
+- ifdef VBOX_WITH_VRDP
+- include $(PATH_SUB_CURRENT)/RDP/Makefile.kmk
+- endif
+- include $(PATH_SUB_CURRENT)/VMM/Makefile.kmk
+- ifndef VBOX_ONLY_EXTPACKS_USE_IMPLIBS
+- include $(PATH_SUB_CURRENT)/Disassembler/Makefile.kmk
+- endif
+-
+ else ifdef VBOX_ONLY_SDK
+ include $(PATH_SUB_CURRENT)/Main/Makefile.kmk
+ ifdef VBOX_WITH_VRDP
+@@ -92,9 +79,6 @@
+ if1of ($(KBUILD_TARGET_ARCH), amd64 x86)
+ include $(PATH_SUB_CURRENT)/NetworkServices/Makefile.kmk
+ endif
+- ifndef VBOX_OSE
+- include $(PATH_SUB_CURRENT)/ExtPacks/Makefile.kmk
+- endif
+ ifdef VBOX_WITH_INSTALLER
+ include $(PATH_SUB_CURRENT)/Installer/Makefile.kmk # Keep this last.
+ endif
+--- VirtualBox-4.1.18/src/libs/Makefile.kmk.orig 2012-07-24 21:23:26.938013023 -0300
++++ VirtualBox-4.1.18/src/libs/Makefile.kmk 2012-07-24 21:43:42.557911752 -0300
+@@ -48,13 +48,6 @@
+ include $(PATH_SUB_CURRENT)/kStuff/Makefile.kmk
+ endif
+
+-# OpenSSL.
+-if !defined(VBOX_ONLY_SDK) \
+- && ( "$(SDK_VBOX_OPENSSL_INCS)" == "$(SDK_VBOX_OPENSSL_VBOX_DEFAULT_INCS)" \
+- || defined(VBOX_WITH_EXTPACK_PUEL_BUILD))
+- include $(PATH_SUB_CURRENT)/openssl-0.9.8t/Makefile.kmk
+-endif
+-
+ # libjpeg for VRDP video redirection
+ if defined(VBOX_WITH_VRDP) && defined(VBOX_WITH_VRDP_VIDEO_CHANNEL)
+ include $(PATH_SUB_CURRENT)/jpeg-8a/Makefile.kmk
+--- VirtualBox-4.1.18.orig/src/VBox/Devices/Makefile.kmk 2012-07-24 23:06:45.916276235 -0300
++++ VirtualBox-4.1.18/src/VBox/Devices/Makefile.kmk 2012-07-24 23:17:00.202963228 -0300
+@@ -21,9 +21,7 @@
+
+ # Include sub-makefiles.
+ include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
+-if defined(VBOX_WITH_INTEL_PXE) || defined(VBOX_ONLY_EXTPACKS)
+- include $(PATH_SUB_CURRENT)/PC/PXE/Makefile.kmk
+-else if defined(VBOX_WITH_PXE_ROM) && !defined(VBOX_WITHOUT_ETHERBOOT)
++if defined(VBOX_WITH_PXE_ROM) && !defined(VBOX_WITHOUT_ETHERBOOT)
+ include $(PATH_SUB_CURRENT)/PC/Etherboot-src/Makefile.kmk
+ endif
+ if !defined(VBOX_ONLY_EXTPACKS) # Goes on almost to the end of the file.
+@@ -57,9 +55,6 @@
+ ifdef VBOX_WITH_USB
+ VBoxDDU_DEFS += VBOX_WITH_USB IN_USBLIB
+ VBoxDDU_SDKS.win = WINPSDK W2K3DDK
+- if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
+- VBoxDDU_DEFS += VBOX_WITH_EHCI_IMPL
+- endif
+ ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
+ VBoxDDU_DEFS.darwin += VBOX_WITH_NEW_USB_CODE_ON_DARWIN
+ endif
+@@ -122,9 +117,6 @@
+ VBoxDD_DEFS = VBOX_ACPI
+ ifdef VBOX_WITH_USB
+ VBoxDD_DEFS += VBOX_WITH_USB
+- if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
+- VBoxDD_DEFS += VBOX_WITH_EHCI_IMPL
+- endif
+ endif
+ ifdef VBOX_WITH_VUSB
+ VBoxDD_DEFS += VBOX_WITH_VUSB
+@@ -446,11 +438,6 @@
+ endif
+ ifdef VBOX_WITH_USB
+ DevicesR3_DEFS += VBOX_WITH_USB
+- if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
+- DevicesR3_DEFS += VBOX_WITH_EHCI_IMPL
+- DevicesR3_SOURCES += \
+- USB/DevEHCI.cpp
+- endif
+ endif
+ if defined(VBOX_WITH_PCI_PASSTHROUGH_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
+ DevicesR3_DEFS += VBOX_WITH_PCI_PASSTHROUGH_IMPL
+@@ -607,11 +594,6 @@
+
+ ifdef VBOX_WITH_USB
+ VBoxDDGC_DEFS += VBOX_WITH_USB
+- if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
+- VBoxDDGC_DEFS += VBOX_WITH_EHCI_IMPL
+- VBoxDDGC_SOURCES += \
+- USB/DevEHCI.cpp
+- endif
+ endif
+
+ ifdef VBOX_WITH_VIDEOHWACCEL
+@@ -711,11 +693,6 @@
+ endif
+ ifdef VBOX_WITH_USB
+ VBoxDDR0_DEFS += VBOX_WITH_USB
+- if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
+- VBoxDDR0_DEFS += VBOX_WITH_EHCI_IMPL
+- VBoxDDR0_SOURCES += \
+- USB/DevEHCI.cpp
+- endif
+ endif
+
+ if defined(VBOX_WITH_PCI_PASSTHROUGH_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
+@@ -1204,49 +1181,5 @@
+
+ endif # !VBOX_ONLY_EXTPACKS
+
+-if defined(VBOX_WITH_EXTPACK_PUEL) && defined(VBOX_WITH_EXTPACK_PUEL_BUILD)
+- #
+- # The EHCI (USB 2.0) Extension Pack Modules.
+- #
+- if defined(VBOX_WITH_USB)
+- DLLS += VBoxEhciR3
+- VBoxEhciR3_TEMPLATE = VBoxR3ExtPackPuel
+- VBoxEhciR3_SOURCES = USB/DevEHCI.cpp
+-
+- SYSMODS += VBoxEhciR0
+- VBoxEhciR0_TEMPLATE = VBoxR0ExtPackPuel
+- VBoxEhciR0_SOURCES = USB/DevEHCI.cpp
+-
+- ifdef VBOX_WITH_RAW_MODE
+- SYSMODS += VBoxEhciRC
+- VBoxEhciRC_TEMPLATE = VBoxRcExtPackPuel
+- VBoxEhciRC_SOURCES = USB/DevEHCI.cpp
+- endif
+- endif
+-
+- if defined(VBOX_WITH_PCI_PASSTHROUGH)
+- DLLS += VBoxPciRawR3
+- VBoxPciRawR3_TEMPLATE = VBoxR3ExtPackPuel
+- VBoxPciRawR3_SOURCES = Bus/DevPciRaw.cpp
+-
+- DLLS += VBoxPciRawDrv
+- VBoxPciRawDrv_TEMPLATE = VBoxR3ExtPackPuel
+- VBoxPciRawDrv_SOURCES = Bus/DrvPciRaw.cpp
+-
+- SYSMODS += VBoxPciRawR0
+- VBoxPciRawR0_TEMPLATE = VBoxR0ExtPackPuel
+- VBoxPciRawR0_SOURCES = Bus/DevPciRaw.cpp
+-
+- Bus/DevPciRaw.cpp_INCS = Bus
+- endif
+-
+- #
+- # The Intel PXE rom.
+- #
+- INSTALLS += VBoxExtPackPuelInsRoms
+- VBoxExtPackPuelInsRoms_TEMPLATE = VBoxInsExtPackPuel
+- VBoxExtPackPuelInsRoms_SOURCES = PC/PXE/PXE-Intel.rom=>PXE-Intel.rom
+-endif # VBOX_WITH_EXTPACK_PUEL
+-
+ include $(KBUILD_PATH)/subfooter.kmk
+
+--- VirtualBox-4.1.18.orig/src/VBox/Main/Makefile.kmk 2012-07-24 23:38:25.304126039 -0300
++++ VirtualBox-4.1.18/src/VBox/Main/Makefile.kmk 2012-07-24 23:38:25.350789964 -0300
+@@ -230,14 +230,12 @@
+ $(if $(VBOX_USB_WITH_SYSFS),VBOX_USB_WITH_SYSFS,) \
+ $(if $(VBOX_USB_WITH_INOTIFY),VBOX_USB_WITH_INOTIFY,) \
+ $(if $(VBOX_WITH_LIVE_MIGRATION),VBOX_WITH_LIVE_MIGRATION,) \
+- $(if $(VBOX_WITH_EXTPACK),VBOX_WITH_EXTPACK,) \
+ $(if $(VBOX_WITH_VUSB),VBOX_WITH_VUSB,) \
+ $(if $(VBOX_WITH_S3),VBOX_WITH_S3,) \
+ $(if $(VBOX_WITH_PCI_PASSTHROUGH),VBOX_WITH_PCI_PASSTHROUGH,)
+ ifdef VBOX_WITH_USB
+ VBoxSVC_DEFS += \
+ VBOX_WITH_USB \
+- $(if $(VBOX_WITH_EHCI),VBOX_WITH_EHCI,) \
+ $(if $(VBOX_WITH_NEW_USB_CODE_ON_DARWIN),VBOX_WITH_NEW_USB_CODE_ON_DARWIN,)
+ endif
+ VBoxSVC_DEFS.win += VBOX_COM_OUTOFPROC_MODULE
+@@ -290,7 +288,6 @@
+ src-all/SharedFolderImpl.cpp \
+ src-all/VirtualBoxBase.cpp \
+ src-all/VirtualBoxErrorInfoImpl.cpp \
+- $(if $(VBOX_WITH_EXTPACK),src-all/ExtPackManagerImpl.cpp src-all/ExtPackUtil.cpp,) \
+ src-server/ApplianceImpl.cpp \
+ src-server/ApplianceImplExport.cpp \
+ src-server/ApplianceImplImport.cpp \
+@@ -543,8 +540,6 @@
+ $(if $(VBOX_WITH_HGSMI),VBOX_WITH_HGSMI,) \
+ $(if $(VBOX_WITH_VIDEOHWACCEL),VBOX_WITH_VIDEOHWACCEL,) \
+ $(if $(VBOX_WITH_USB),VBOX_WITH_USB,) \
+- $(if-expr defined(VBOX_WITH_EHCI) && defined(VBOX_WITH_USB),VBOX_WITH_EHCI,) \
+- $(if $(VBOX_WITH_EXTPACK),VBOX_WITH_EXTPACK,) \
+ $(if $(VBOX_WITH_PCI_PASSTHROUGH),VBOX_WITH_PCI_PASSTHROUGH,)
+
+ VBoxC_DEFS.darwin.x86 = VBOX_WITH_2X_4GB_ADDR_SPACE
+@@ -602,7 +597,6 @@
+ src-all/SharedFolderImpl.cpp \
+ src-all/VirtualBoxBase.cpp \
+ src-all/VirtualBoxErrorInfoImpl.cpp \
+- $(if $(VBOX_WITH_EXTPACK),src-all/ExtPackManagerImpl.cpp src-all/ExtPackUtil.cpp,) \
+ $(if $(VBOX_WITH_USB_VIDEO),src-client/UsbWebcamInterface.cpp,) \
+ $(if $(VBOX_WITH_USB_CARDREADER),src-client/UsbCardReader.cpp,) \
+ src-client/AdditionsFacilityImpl.cpp \
+@@ -711,22 +705,6 @@
+ endif # !win
+
+
+-#
+-# The VBoxExtPackHelperApp.
+-#
+-ifdef VBOX_WITH_EXTPACK
+- PROGRAMS += VBoxExtPackHelperApp
+- VBoxExtPackHelperApp_TEMPLATE = VBoxR3SetUidToRoot
+- VBoxExtPackHelperApp_LDFLAGS.darwin = -framework Security
+- VBoxExtPackHelperApp_LDFLAGS.win = /SUBSYSTEM:windows
+- VBoxExtPackHelperApp_SOURCES = \
+- src-helper-apps/VBoxExtPackHelperApp.cpp \
+- src-all/ExtPackUtil.cpp
+- VBoxExtPackHelperApp_LIBS = \
+- $(LIB_RUNTIME)
+-endif # VBOX_WITH_EXTPACK
+-
+-
+ endif # !VBOX_ONLY_SDK (the ifndef is far above)
+
+
+--- VirtualBox-4.1.18.orig/src/VBox/Frontends/VirtualBox/Makefile.kmk 2012-07-24 23:25:04.575825175 -0300
++++ VirtualBox-4.1.18/src/VBox/Frontends/VirtualBox/Makefile.kmk 2012-07-24 23:25:04.619156084 -0300
+@@ -888,7 +888,6 @@
+ $(VBOX_MACOSX_ICON_FILE)=>Resources/virtualbox.icns \
+ $(VBOX_BRAND_GUI_VBOX_64PX_PNG)=>Resources/virtualbox.png \
+ $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-vbox.icns=>Resources/virtualbox-vbox.icns \
+- $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-vbox-extpack.icns=>Resources/virtualbox-vbox-extpack.icns \
+ $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-ovf.icns=>Resources/virtualbox-ovf.icns \
+ $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-ova.icns=>Resources/virtualbox-ova.icns \
+ $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-vdi.icns=>Resources/virtualbox-vdi.icns \
+--- VirtualBox-4.1.18.orig/src/VBox/Frontends/VirtualBox/VirtualBox2.qrc 2012-07-24 23:28:17.985011038 -0300
++++ VirtualBox-4.1.18/src/VBox/Frontends/VirtualBox/VirtualBox2.qrc 2012-07-24 23:28:18.051673913 -0300
+@@ -167,18 +167,6 @@
+ <file alias="status_check_32px.png">images/status_check_32px.png</file>
+ <file alias="status_error_16px.png">images/status_error_16px.png</file>
+ <file alias="status_error_32px.png">images/status_error_32px.png</file>
+- <file alias="extension_pack_16px.png">images/extension_pack_16px.png</file>
+- <file alias="extension_pack_disabled_16px.png">images/extension_pack_disabled_16px.png</file>
+- <file alias="extension_pack_32px.png">images/extension_pack_32px.png</file>
+- <file alias="extension_pack_disabled_32px.png">images/extension_pack_disabled_32px.png</file>
+- <file alias="extension_pack_install_16px.png">images/extension_pack_install_16px.png</file>
+- <file alias="extension_pack_install_disabled_16px.png">images/extension_pack_install_disabled_16px.png</file>
+- <file alias="extension_pack_install_32px.png">images/extension_pack_install_32px.png</file>
+- <file alias="extension_pack_install_disabled_32px.png">images/extension_pack_install_disabled_32px.png</file>
+- <file alias="extension_pack_uninstall_16px.png">images/extension_pack_uninstall_16px.png</file>
+- <file alias="extension_pack_uninstall_disabled_16px.png">images/extension_pack_uninstall_disabled_16px.png</file>
+- <file alias="extension_pack_uninstall_32px.png">images/extension_pack_uninstall_32px.png</file>
+- <file alias="extension_pack_uninstall_disabled_32px.png">images/extension_pack_uninstall_disabled_32px.png</file>
+ <file alias="proxy_16px.png">images/proxy_16px.png</file>
+ <file alias="proxy_disabled_16px.png">images/proxy_disabled_16px.png</file>
+ <file alias="proxy_32px.png">images/proxy_32px.png</file>
+--- VirtualBox-4.1.18.orig/src/VBox/Installer/linux/Makefile.kmk 2012-07-25 00:32:00.780012664 -0300
++++ VirtualBox-4.1.18/src/VBox/Installer/linux/Makefile.kmk 2012-07-25 00:32:00.806677728 -0300
+@@ -170,11 +170,6 @@
+ VBox.sh \
+ VBox.png
+
+-ifdef VBOX_WITH_EXTPACK
+- VBOX_LNX_STRIP_BIN += \
+- VBoxExtPackHelperApp
+-endif
+-
+ # Qt4 GUI
+ ifdef VBOX_WITH_QTGUI
+ include $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk
+@@ -286,7 +281,7 @@
+
+ VBOX_MIME_ICONS = \
+ $(addprefix $(PATH_ROOT)/src/VBox/Resources/other/,\
+- $(foreach f,ova ovf vbox vbox-extpack vdi vmdk vhd hdd, \
++ $(foreach f,ova ovf vbox vdi vmdk vhd hdd, \
+ $(foreach s,16 20 24 32 48 64 72 96 128 256,\
+ virtualbox-$(f)-$(s)px.png=>$(s)x$(s)/virtualbox-$(f).png)))
+
+--- VirtualBox-4.1.18.orig/src/VBox/Installer/win/Makefile.kmk 2012-07-25 00:34:52.253398525 -0300
++++ VirtualBox-4.1.18/src/VBox/Installer/win/Makefile.kmk 2012-07-25 00:34:52.300062531 -0300
+@@ -435,7 +435,6 @@
+ -E 'VBOX_WITH_DEBUGGER_GUI=$(if-expr defined(VBOX_WITH_DEBUGGER_GUI) && defined(VBOX_WITH_QTGUI),yes,no)' \
+ -E 'VBOX_WITH_DOCS_PACKING=$(if $(VBOX_WITH_DOCS_PACKING),yes,no)' \
+ -E 'VBOX_WITH_EFIFW_PACKING=$(if $(VBOX_WITH_EFIFW_PACKING),yes,no)' \
+- -E 'VBOX_WITH_EXTPACK=$(if $(VBOX_WITH_EXTPACK),yes,no)' \
+ -E 'VBOX_WITH_GUEST_CONTROL=$(if $(VBOX_WITH_GUEST_CONTROL),yes,no)' \
+ -E 'VBOX_WITH_GUEST_PROPS=$(if $(VBOX_WITH_GUEST_PROPS),yes,no)' \
+ -E 'VBOX_WITH_NETFLT=$(if $(VBOX_WITH_NETFLT),yes,no)' \
+--- VirtualBox-4.1.18.orig/src/VBox/Installer/darwin/Makefile.kmk 2012-07-25 00:36:55.929571374 -0300
++++ VirtualBox-4.1.18/src/VBox/Installer/darwin/Makefile.kmk 2012-07-25 00:36:55.959569630 -0300
+@@ -629,7 +629,6 @@
+ MacOS/VirtualBoxVM \
+ MacOS/VBoxNetAdpCtl \
+ MacOS/VBoxNetDHCP \
+- MacOS/VBoxExtPackHelperApp \
+ MacOS/VBoxBalloonCtrl
+ ifdef VBOX_WITH_WEBSERVICES
+ VBOX_DI_VBAPP_PROGS += \
+@@ -659,7 +658,6 @@
+ Resources/virtualbox.icns \
+ Resources/virtualbox.png \
+ Resources/virtualbox-vbox.icns \
+- Resources/virtualbox-vbox-extpack.icns \
+ Resources/virtualbox-ovf.icns \
+ Resources/virtualbox-ova.icns \
+ Resources/virtualbox-vdi.icns \
+--- VirtualBox-4.1.18/src/VBox/Installer/solaris/Makefile.kmk.orig 2012-07-25 00:38:48.476398293 -0300
++++ VirtualBox-4.1.18/src/VBox/Installer/solaris/Makefile.kmk 2012-07-25 00:38:48.516396159 -0300
+@@ -185,12 +185,12 @@
+
+ VBOX_MIME_ICONS = \
+ $(addprefix $(PATH_ROOT)/src/VBox/Resources/other/,\
+- $(foreach f,ova ovf vbox vbox-extpack vdi vmdk vhd hdd, \
++ $(foreach f,ova ovf vbox vdi vmdk vhd hdd, \
+ $(foreach s,16 20 24 32 48 64 72 96 128 256,\
+ virtualbox-$(f)-$(s)px.png=>$(s)x$(s)/mimetypes/virtualbox-$(f).png)))
+
+ SOLARIS_COMMON_ICONS = \
+- $(foreach f,ova ovf vbox vbox-extpack vdi vmdk vhd hdd, \
++ $(foreach f,ova ovf vbox vdi vmdk vhd hdd, \
+ $(foreach s,16 20 24 32 48 64 72 96 128 256,\
+ $(s)x$(s)/mimetypes/virtualbox-$(f).png))
+
+@@ -210,7 +210,6 @@
+ $(if $(VBOX_WITH_VBOXSDL),VBoxSDL,) \
+ $(if $(VBOX_WITH_NETADP),VBoxNetAdpCtl,) \
+ VBoxNetDHCP \
+- $(if $(VBOX_WITH_EXTPACK),VBoxExtPackHelperApp,) \
+ VBoxSVC \
+ $(if $(VBOX_WITH_CROGL),VBoxTestOGL,) \
+ VBoxXPCOMIPCD \
+--- VirtualBox-4.1.18.orig/src/VBox/Runtime/Makefile.kmk 2012-07-25 00:40:58.745522450 -0300
++++ VirtualBox-4.1.18/src/VBox/Runtime/Makefile.kmk 2012-07-25 00:40:58.782186960 -0300
+@@ -53,15 +53,6 @@
+ #
+ LIBRARIES += RuntimeR3 RuntimeBldProg
+
+-else ifdef VBOX_ONLY_EXTPACKS_USE_IMPLIBS
+- #
+- # Build docs only - need just regular R3 runtime.
+- #
+- LIBRARIES += RuntimeBldProg
+- LIBRARIES.solaris += RuntimeR0Stub
+- LIBRARIES.win += RuntimeR0Stub RuntimeRCStub
+- include $(PATH_SUB_CURRENT)/tools/Makefile.kmk
+-
+ else # !VBOX_ONLY_ADDITIONS && !VBOX_ONLY_TESTSUITE && !VBOX_ONLY_DOCS
+
+ #
diff --git a/libre/virtualbox-libre-modules-lts/os_blag.png b/libre/virtualbox-libre-modules-lts/os_blag.png
new file mode 100644
index 000000000..61995ca10
--- /dev/null
+++ b/libre/virtualbox-libre-modules-lts/os_blag.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules-lts/os_blag_64.png b/libre/virtualbox-libre-modules-lts/os_blag_64.png
new file mode 100644
index 000000000..aa4463a97
--- /dev/null
+++ b/libre/virtualbox-libre-modules-lts/os_blag_64.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules-lts/os_dragora.png b/libre/virtualbox-libre-modules-lts/os_dragora.png
new file mode 100644
index 000000000..d1df45880
--- /dev/null
+++ b/libre/virtualbox-libre-modules-lts/os_dragora.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules-lts/os_dragora_64.png b/libre/virtualbox-libre-modules-lts/os_dragora_64.png
new file mode 100644
index 000000000..64bcecf20
--- /dev/null
+++ b/libre/virtualbox-libre-modules-lts/os_dragora_64.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules-lts/os_dynebolic.png b/libre/virtualbox-libre-modules-lts/os_dynebolic.png
new file mode 100644
index 000000000..67b07d4c0
--- /dev/null
+++ b/libre/virtualbox-libre-modules-lts/os_dynebolic.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules-lts/os_gnewsense.png b/libre/virtualbox-libre-modules-lts/os_gnewsense.png
new file mode 100644
index 000000000..76d9e38b3
--- /dev/null
+++ b/libre/virtualbox-libre-modules-lts/os_gnewsense.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules-lts/os_gnewsense_64.png b/libre/virtualbox-libre-modules-lts/os_gnewsense_64.png
new file mode 100644
index 000000000..8859c34e8
--- /dev/null
+++ b/libre/virtualbox-libre-modules-lts/os_gnewsense_64.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules-lts/os_gnu.png b/libre/virtualbox-libre-modules-lts/os_gnu.png
new file mode 100644
index 000000000..26c4550f9
--- /dev/null
+++ b/libre/virtualbox-libre-modules-lts/os_gnu.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules-lts/os_gnu_64.png b/libre/virtualbox-libre-modules-lts/os_gnu_64.png
new file mode 100644
index 000000000..4161634e9
--- /dev/null
+++ b/libre/virtualbox-libre-modules-lts/os_gnu_64.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules-lts/os_gnuhurd.png b/libre/virtualbox-libre-modules-lts/os_gnuhurd.png
new file mode 100644
index 000000000..26c4550f9
--- /dev/null
+++ b/libre/virtualbox-libre-modules-lts/os_gnuhurd.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules-lts/os_gnulinux.png b/libre/virtualbox-libre-modules-lts/os_gnulinux.png
new file mode 100644
index 000000000..26c4550f9
--- /dev/null
+++ b/libre/virtualbox-libre-modules-lts/os_gnulinux.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules-lts/os_gnulinux_64.png b/libre/virtualbox-libre-modules-lts/os_gnulinux_64.png
new file mode 100644
index 000000000..4161634e9
--- /dev/null
+++ b/libre/virtualbox-libre-modules-lts/os_gnulinux_64.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules-lts/os_musix.png b/libre/virtualbox-libre-modules-lts/os_musix.png
new file mode 100644
index 000000000..fb7b94577
--- /dev/null
+++ b/libre/virtualbox-libre-modules-lts/os_musix.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules-lts/os_musix_64.png b/libre/virtualbox-libre-modules-lts/os_musix_64.png
new file mode 100644
index 000000000..a1bbbbf3a
--- /dev/null
+++ b/libre/virtualbox-libre-modules-lts/os_musix_64.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules-lts/os_os64base.png b/libre/virtualbox-libre-modules-lts/os_os64base.png
new file mode 100644
index 000000000..7aec20314
--- /dev/null
+++ b/libre/virtualbox-libre-modules-lts/os_os64base.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules-lts/os_os64base.xcf b/libre/virtualbox-libre-modules-lts/os_os64base.xcf
new file mode 100644
index 000000000..d8e28e35e
--- /dev/null
+++ b/libre/virtualbox-libre-modules-lts/os_os64base.xcf
Binary files differ
diff --git a/libre/virtualbox-libre-modules-lts/os_osbase.png b/libre/virtualbox-libre-modules-lts/os_osbase.png
new file mode 100644
index 000000000..00f197fca
--- /dev/null
+++ b/libre/virtualbox-libre-modules-lts/os_osbase.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules-lts/os_osbase.xcf b/libre/virtualbox-libre-modules-lts/os_osbase.xcf
new file mode 100644
index 000000000..c4463c857
--- /dev/null
+++ b/libre/virtualbox-libre-modules-lts/os_osbase.xcf
Binary files differ
diff --git a/libre/virtualbox-libre-modules-lts/os_parabola.png b/libre/virtualbox-libre-modules-lts/os_parabola.png
new file mode 100644
index 000000000..757abc484
--- /dev/null
+++ b/libre/virtualbox-libre-modules-lts/os_parabola.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules-lts/os_parabola_64.png b/libre/virtualbox-libre-modules-lts/os_parabola_64.png
new file mode 100644
index 000000000..5ac7c2767
--- /dev/null
+++ b/libre/virtualbox-libre-modules-lts/os_parabola_64.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules-lts/os_trisquel.png b/libre/virtualbox-libre-modules-lts/os_trisquel.png
new file mode 100644
index 000000000..c6f0d3d7a
--- /dev/null
+++ b/libre/virtualbox-libre-modules-lts/os_trisquel.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules-lts/os_trisquel_64.png b/libre/virtualbox-libre-modules-lts/os_trisquel_64.png
new file mode 100644
index 000000000..ebca3dd43
--- /dev/null
+++ b/libre/virtualbox-libre-modules-lts/os_trisquel_64.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules-lts/os_ututo.png b/libre/virtualbox-libre-modules-lts/os_ututo.png
new file mode 100644
index 000000000..e1dffb575
--- /dev/null
+++ b/libre/virtualbox-libre-modules-lts/os_ututo.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules-lts/os_ututo_64.png b/libre/virtualbox-libre-modules-lts/os_ututo_64.png
new file mode 100644
index 000000000..158468e0a
--- /dev/null
+++ b/libre/virtualbox-libre-modules-lts/os_ututo_64.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules-lts/os_venenux.png b/libre/virtualbox-libre-modules-lts/os_venenux.png
new file mode 100644
index 000000000..5e0c1585d
--- /dev/null
+++ b/libre/virtualbox-libre-modules-lts/os_venenux.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules-lts/virtualbox-libre-modules-lts.install b/libre/virtualbox-libre-modules-lts/virtualbox-libre-modules-lts.install
new file mode 100644
index 000000000..5387563a6
--- /dev/null
+++ b/libre/virtualbox-libre-modules-lts/virtualbox-libre-modules-lts.install
@@ -0,0 +1,18 @@
+EXTRAMODULES='extramodules-3.0-LIBRE-LTS'
+
+post_install() {
+/bin/cat << EOF
+===> You must load vboxdrv module before starting VirtualBox:
+===> # modprobe vboxdrv
+EOF
+ depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+}
+
+post_upgrade() {
+ depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+ echo 'In order to use the new version, reload all virtualbox modules manually.'
+}
+
+post_remove() {
+ depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+}
diff --git a/libre/virtualbox-libre-modules-lts/virtualbox-libre-parabola-modules-lts.install b/libre/virtualbox-libre-modules-lts/virtualbox-libre-parabola-modules-lts.install
new file mode 100644
index 000000000..54a052390
--- /dev/null
+++ b/libre/virtualbox-libre-modules-lts/virtualbox-libre-parabola-modules-lts.install
@@ -0,0 +1,16 @@
+EXTRAMODULES='extramodules-3.0-LIBRE-LTS'
+
+post_install() {
+cat << EOF
+===> You may want to load vboxguest, vboxsf and vboxvideo
+EOF
+ depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+}
+
+post_upgrade() {
+ depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+}
+
+post_remove() {
+ depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+}
diff --git a/libre/virtualbox-libre-modules/.directory b/libre/virtualbox-libre-modules/.directory
new file mode 100644
index 000000000..7486c78f1
--- /dev/null
+++ b/libre/virtualbox-libre-modules/.directory
@@ -0,0 +1,2 @@
+[Dolphin]
+Timestamp=2012,3,20,12,36,27
diff --git a/libre/virtualbox-libre-modules/60-vboxguest.rules b/libre/virtualbox-libre-modules/60-vboxguest.rules
new file mode 100644
index 000000000..6285f7249
--- /dev/null
+++ b/libre/virtualbox-libre-modules/60-vboxguest.rules
@@ -0,0 +1,2 @@
+ACTION=="add", KERNEL=="vboxguest", SUBSYSTEM=="misc", OWNER="root", MODE="0600"
+ACTION=="add", KERNEL=="vboxuser", SUBSYSTEM=="misc", OWNER="root", MODE="0666"
diff --git a/libre/virtualbox-libre-modules/LocalConfig.kmk b/libre/virtualbox-libre-modules/LocalConfig.kmk
new file mode 100644
index 000000000..af79f90cd
--- /dev/null
+++ b/libre/virtualbox-libre-modules/LocalConfig.kmk
@@ -0,0 +1,19 @@
+VBOX_WITH_ADDITION_DRIVERS =
+VBOX_WITH_INSTALLER = 1
+VBOX_WITH_LINUX_ADDITIONS = 1
+VBOX_WITH_X11_ADDITIONS =
+VBOX_WITH_TESTCASES =
+VBOX_WITH_TESTSUITE =
+VBOX_WITH_ORIGIN :=
+VBOX_PATH_APP_PRIVATE_ARCH := /usr/lib/virtualbox
+VBOX_PATH_SHARED_LIBS := $(VBOX_PATH_APP_PRIVATE_ARCH)
+VBOX_WITH_RUNPATH := $(VBOX_PATH_APP_PRIVATE_ARCH)
+VBOX_PATH_APP_PRIVATE := /usr/share/virtualbox
+VBOX_PATH_APP_DOCS := /usr/share/virtualbox
+VBOX_WITH_REGISTRATION_REQUEST =
+VBOX_WITH_UPDATE_REQUEST =
+VBOX_WITH_VNC := 1
+VBOX_BLD_PYTHON = python2
+VBOX_JAVA_HOME = /usr/lib/jvm/java-6-openjdk
+VBOX_GCC_WERR =
+VBOX_GCC_WARN =
diff --git a/libre/virtualbox-libre-modules/PKGBUILD b/libre/virtualbox-libre-modules/PKGBUILD
new file mode 100644
index 000000000..ef63d7ff0
--- /dev/null
+++ b/libre/virtualbox-libre-modules/PKGBUILD
@@ -0,0 +1,157 @@
+# $Id$
+#Maintainer: Ionut Biru <ibiru@archlinux.org>
+#Maintainer (Parabola): Jorge López <jorginho@lavabit.com>
+#Contributor (Parabola): André Silva <emulatorman@lavabit.com>
+
+pkgbase=virtualbox-libre-modules
+pkgname=('virtualbox-libre-modules' 'virtualbox-libre-parabola-modules')
+pkgver=4.1.18
+pkgrel=5.1
+arch=('i686' 'x86_64')
+url='http://virtualbox.org'
+license=('GPL')
+makedepends=('libstdc++5' 'bin86' 'dev86' 'iasl' 'libxslt' 'libxml2' 'libpng' 'libidl2' 'xalan-c' 'sdl' 'linux-libre-headers')
+[[ $CARCH == "x86_64" ]] && makedepends=("${makedepends[@]}" 'gcc-multilib' 'lib32-glibc')
+source=(http://download.virtualbox.org/virtualbox/${pkgver}/VirtualBox-${pkgver}.tar.bz2
+ LocalConfig.kmk 60-vboxguest.rules os_blag_64.png os_blag.png
+ os_dragora_64.png os_dragora.png os_dynebolic.png os_gnewsense_64.png os_gnewsense.png
+ os_gnu_64.png os_gnuhurd.png os_gnulinux_64.png os_gnulinux.png os_gnu.png
+ os_musix_64.png os_musix.png os_parabola_64.png os_parabola.png os_trisquel_64.png
+ os_trisquel.png os_ututo_64.png os_ututo.png os_venenux.png libre.patch
+ free-distros.patch)
+md5sums=('38db0a87cba659b484af868b0c2bd3ac'
+ '4c88bd122677a35f68abd76eb01b378b'
+ 'ed1341881437455d9735875ddf455fbe'
+ '8538dba8686d7449cb481c9bae9d722a'
+ '545c925b46f2ac95e5f8ae407fad101a'
+ 'f6416f509c2e5460e4dc624e0a57f3c1'
+ 'bbfb59dd517c020a23701b480187a355'
+ 'efacfdb61918286ea9bc89866b8fd239'
+ '7c3eb09995e8bafeef414374e44ad4ce'
+ 'a49ed3ab6bd0fb084de0ab3dd97ae93e'
+ '6b432b3305ed446125eef052c38355a6'
+ 'a70022a468bd3e9daf01818d2d74ac3c'
+ '6b432b3305ed446125eef052c38355a6'
+ 'a70022a468bd3e9daf01818d2d74ac3c'
+ 'a70022a468bd3e9daf01818d2d74ac3c'
+ '380eb2ab6cad3da198094585853c129c'
+ 'a60bb9a98abcc3c34156f9051d00df9a'
+ '3a908ef6952bcf987e63ef2fe4e98d24'
+ '02e87c39c353634cecacf98f1707fa15'
+ '0cf41a41e7a415d404d5584e047fd450'
+ '449cde3b58390284b59c5d663de3edc9'
+ 'c7951fe6888d939f3a7d0dafe477e82b'
+ '4da8eeb2ece7e475fc7a0d1003da26c6'
+ '5e4187af59726d71c5be48d0cd816c34'
+ 'a9e4724b56ddf99bb2e9a8fab8ad43ba'
+ 'f7d275fc52e5f3cfafd85646c2914063')
+
+_extramodules=extramodules-3.5-LIBRE
+_kernver="$(cat /usr/lib/modules/${_extramodules}/version || true)"
+
+export KERN_DIR=/usr/lib/modules/${_kernver}/build
+export KERN_INCL=/usr/src/linux-${_kernver}/include/
+
+build() {
+ cd "$srcdir/VirtualBox-${pkgver}"
+
+ patch -Np1 -i "$srcdir/libre.patch"
+ patch -Np1 -i "$srcdir/free-distros.patch"
+
+ ## Removing Nonfree directories
+ rm -rv "./include/VBox/ExtPack"
+ rm -rv "./src/VBox/ExtPacks"
+ rm -rv "./src/VBox/Main/src-helper-apps"
+
+ ## Removing Oracle VM VirtualBox Extension Pack icons
+ rm -v "./src/VBox/Resources/darwin/virtualbox-vbox-extpack.icns"
+ rm -v "./src/VBox/Resources/other/virtualbox-vbox-extpack-"{16px,20px,24px,32px,40px,48px,64px,72px,80px,96px,128px,256px,512px}.png
+ rm -v "./src/VBox/Resources/win/OSE/virtualbox-vbox-extpack.ico"
+ rm -v "./src/VBox/Frontends/VirtualBox/images/extension_pack_"{16px,32px,disabled{_16px,_32px},install{_16px,_32px},install_disabled{_16px,_32px},uninstall{_16px,_32px},uninstall_disabled{_16px,_32px}}.png
+
+ ## Adding free distros icons
+ for i in {gnuhurd,dynebolic,venenux,{gnu{,linux},parabola,gnewsense,blag,dragora,ututo,musix,trisquel}{,_64}}; do
+ cp -v "$srcdir/os_${i}.png" "./src/VBox/Frontends/VirtualBox/images"
+ done
+
+ ## Removing non-free OS icons
+ rm -v "./src/VBox/Frontends/VirtualBox/images/os_"{{{arch,turbo}linux,debian,fedora,gentoo,linux{24,26},macosx,mandriva,{free,net,open}bsd,redhat,solaris,opensuse,oracle{,solaris},ubuntu,win{2k{3,8},7,8,vista,xp},xandros}{,_64},dos,jrockitve,l4,linux{,22,_other},netware,qnx,os2{_other,ecs,warp{3,4,45}},win{2k,31,95,98,_other,me,nt4}}.png
+
+ cp "$srcdir/LocalConfig.kmk" .
+
+ ./configure \
+ --with-linux=/usr/src/linux-${_kernver} \
+ --disable-java \
+ --disable-docs \
+ --disable-xpcom \
+ --disable-python \
+ --disable-sdl-ttf \
+ --disable-alsa \
+ --disable-pulse \
+ --disable-dbus \
+ --disable-opengl \
+ --build-headless \
+ --nofatal
+ source ./env.sh
+ kmk all
+
+ make -C "$srcdir/VirtualBox-${pkgver}/out/linux.$BUILD_PLATFORM_ARCH/release/bin/src"
+ make -C "$srcdir/VirtualBox-${pkgver}/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src"
+}
+
+package_virtualbox-libre-parabola-modules(){
+ pkgdesc="Additions only for Parabola guests (kernel modules)"
+ license=('GPL')
+ install=virtualbox-libre-parabola-modules.install
+ depends=('linux-libre>=3.5' 'linux-libre<3.6')
+ replaces=('virtualbox-archlinux-modules')
+ conflicts=('virtualbox-archlinux-modules')
+ provides=("virtualbox-archlinux-modules=$pkgver")
+
+ source "$srcdir/VirtualBox-${pkgver}/env.sh"
+
+ cd "$srcdir/VirtualBox-${pkgver}/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src"
+
+ for module in vboxguest.ko vboxsf.ko vboxvideo.ko; do
+ install -D -m644 ${module} \
+ "$pkgdir/usr/lib/modules/${_extramodules}/${module}"
+ done
+
+ install -D -m 0644 "$srcdir/60-vboxguest.rules" \
+ "$pkgdir/usr/lib/udev/rules.d/60-vboxguest.rules"
+
+ find "${pkgdir}" -name '*.ko' -exec gzip -9 {} \;
+
+ sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "$startdir/virtualbox-libre-parabola-modules.install"
+}
+
+package_virtualbox-libre-modules(){
+ pkgdesc="Kernel modules for VirtualBox"
+ license=('GPL')
+ install=virtualbox-libre-modules.install
+ depends=('linux-libre>=3.5' 'linux-libre<3.6')
+ replaces=('virtualbox-modules')
+ conflicts=('virtualbox-modules')
+ provides=("virtualbox-modules=$pkgver")
+
+ source "$srcdir/VirtualBox-${pkgver}/env.sh"
+
+
+ cd "$srcdir/VirtualBox-${pkgver}/out/linux.$BUILD_PLATFORM_ARCH/release/bin/src"
+
+ install -D -m644 vboxdrv.ko \
+ "$pkgdir/usr/lib/modules/${_extramodules}/vboxdrv.ko"
+
+ install -D -m644 vboxnetadp.ko \
+ "$pkgdir/usr/lib/modules/${_extramodules}/vboxnetadp.ko"
+
+ install -D -m644 vboxnetflt.ko \
+ "$pkgdir/usr/lib/modules/${_extramodules}/vboxnetflt.ko"
+
+ install -D -m644 vboxpci.ko \
+ "$pkgdir/usr/lib/modules/${_extramodules}/vboxpci.ko"
+
+ find "${pkgdir}" -name '*.ko' -exec gzip -9 {} +
+
+ sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "$startdir/virtualbox-libre-modules.install"
+}
diff --git a/libre/virtualbox-libre-modules/free-distros.patch b/libre/virtualbox-libre-modules/free-distros.patch
new file mode 100644
index 000000000..7920fb6ab
--- /dev/null
+++ b/libre/virtualbox-libre-modules/free-distros.patch
@@ -0,0 +1,1383 @@
+--- VirtualBox-4.1.18.orig/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UINewVMWzd.cpp 2012-07-25 14:51:03.569003667 -0300
++++ VirtualBox-4.1.18/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UINewVMWzd.cpp 2012-07-25 14:51:03.652333615 -0300
+@@ -44,94 +44,38 @@
+ * first matching string found, will be used. */
+ static const osTypePattern gs_OSTypePattern[] =
+ {
+- { QRegExp("DOS", Qt::CaseInsensitive), "DOS" },
+
+- /* Windows */
+- { QRegExp("Wi.*98", Qt::CaseInsensitive), "Windows98" },
+- { QRegExp("Wi.*95", Qt::CaseInsensitive), "Windows95" },
+- { QRegExp("Wi.*Me", Qt::CaseInsensitive), "WindowsMe" },
+- { QRegExp("(Wi.*NT)|(NT4)", Qt::CaseInsensitive), "WindowsNT4" },
+- { QRegExp("((Wi.*XP)|(\\bXP\\b)).*64", Qt::CaseInsensitive), "WindowsXP_64" },
+- { QRegExp("(Wi.*XP)|(\\bXP\\b)", Qt::CaseInsensitive), "WindowsXP" },
+- { QRegExp("((Wi.*2003)|(W2K3)).*64", Qt::CaseInsensitive), "Windows2003_64" },
+- { QRegExp("(Wi.*2003)|(W2K3)", Qt::CaseInsensitive), "Windows2003" },
+- { QRegExp("((Wi.*V)|(Vista)).*64", Qt::CaseInsensitive), "WindowsVista_64" },
+- { QRegExp("(Wi.*V)|(Vista)", Qt::CaseInsensitive), "WindowsVista" },
+- { QRegExp("((Wi.*2008)|(W2K8)).*64", Qt::CaseInsensitive), "Windows2008_64" },
+- { QRegExp("(Wi.*2008)|(W2K8)", Qt::CaseInsensitive), "Windows2008" },
+- { QRegExp("(Wi.*2000)|(W2K)", Qt::CaseInsensitive), "Windows2000" },
+- { QRegExp("(Wi.*7.*64)|(W7.*64)", Qt::CaseInsensitive), "Windows7_64" },
+- { QRegExp("(Wi.*7)|(W7)", Qt::CaseInsensitive), "Windows7" },
+- { QRegExp("(Wi.*8.*64)|(W8.*64)", Qt::CaseInsensitive), "Windows8_64" },
+- { QRegExp("(Wi.*8)|(W8)", Qt::CaseInsensitive), "Windows8" },
+- { QRegExp("Wi.*3", Qt::CaseInsensitive), "Windows31" },
+- { QRegExp("Wi", Qt::CaseInsensitive), "WindowsXP" },
+-
+- /* Solaris */
+- { QRegExp("((Op.*So)|(os20[01][0-9])|(So.*1[01])|(India)|(Neva)).*64", Qt::CaseInsensitive), "OpenSolaris_64" },
+- { QRegExp("(Op.*So)|(os20[01][0-9])|(So.*1[01])|(India)|(Neva)", Qt::CaseInsensitive), "OpenSolaris" },
+- { QRegExp("So.*64", Qt::CaseInsensitive), "Solaris_64" },
+- { QRegExp("So", Qt::CaseInsensitive), "Solaris" },
+-
+- /* OS/2 */
+- { QRegExp("OS[/|!-]{,1}2.*W.*4.?5", Qt::CaseInsensitive), "OS2Warp45" },
+- { QRegExp("OS[/|!-]{,1}2.*W.*4", Qt::CaseInsensitive), "OS2Warp4" },
+- { QRegExp("OS[/|!-]{,1}2.*W", Qt::CaseInsensitive), "OS2Warp3" },
+- { QRegExp("(OS[/|!-]{,1}2.*e)|(eCS.*)", Qt::CaseInsensitive), "OS2eCS" },
+- { QRegExp("OS[/|!-]{,1}2", Qt::CaseInsensitive), "OS2" },
+-
+- /* Code names for Linux distributions */
+- { QRegExp("((edgy)|(feisty)|(gutsy)|(hardy)|(intrepid)|(jaunty)|(karmic)|(lucid)|(maverick)|(natty)|(oneiric)|(precise)).*64", Qt::CaseInsensitive), "Ubuntu_64" },
+- { QRegExp("(edgy)|(feisty)|(gutsy)|(hardy)|(intrepid)|(jaunty)|(karmic)|(lucid)|(maverick)|(natty)|(oneiric)|(precise)", Qt::CaseInsensitive), "Ubuntu" },
+- { QRegExp("((sarge)|(etch)|(lenny)|(squeeze)|(wheezy)|(sid)).*64", Qt::CaseInsensitive), "Debian_64" },
+- { QRegExp("(sarge)|(etch)|(lenny)|(squeeze)|(wheezy)|(sid)", Qt::CaseInsensitive), "Debian" },
+- { QRegExp("((moonshine)|(werewolf)|(sulphur)|(cambridge)|(leonidas)|(constantine)|(goddard)|(laughlin)|(lovelock)|(verne)).*64", Qt::CaseInsensitive), "Fedora_64" },
+- { QRegExp("(moonshine)|(werewolf)|(sulphur)|(cambridge)|(leonidas)|(constantine)|(goddard)|(laughlin)|(lovelock)|(verne)", Qt::CaseInsensitive), "Fedora" },
+-
+- /* Regular names of Linux distributions */
+- { QRegExp("Arc.*64", Qt::CaseInsensitive), "ArchLinux_64" },
+- { QRegExp("Arc", Qt::CaseInsensitive), "ArchLinux" },
+- { QRegExp("Deb.*64", Qt::CaseInsensitive), "Debian_64" },
+- { QRegExp("Deb", Qt::CaseInsensitive), "Debian" },
+- { QRegExp("((SU)|(Nov)|(SLE)).*64", Qt::CaseInsensitive), "OpenSUSE_64" },
+- { QRegExp("(SU)|(Nov)|(SLE)", Qt::CaseInsensitive), "OpenSUSE" },
+- { QRegExp("Fe.*64", Qt::CaseInsensitive), "Fedora_64" },
+- { QRegExp("Fe", Qt::CaseInsensitive), "Fedora" },
+- { QRegExp("((Gen)|(Sab)).*64", Qt::CaseInsensitive), "Gentoo_64" },
+- { QRegExp("(Gen)|(Sab)", Qt::CaseInsensitive), "Gentoo" },
+- { QRegExp("Man.*64", Qt::CaseInsensitive), "Mandriva_64" },
+- { QRegExp("Man", Qt::CaseInsensitive), "Mandriva" },
+- { QRegExp("((Red)|(rhel)|(cen)).*64", Qt::CaseInsensitive), "RedHat_64" },
+- { QRegExp("(Red)|(rhel)|(cen)", Qt::CaseInsensitive), "RedHat" },
+- { QRegExp("Tur.*64", Qt::CaseInsensitive), "Turbolinux_64" },
+- { QRegExp("Tur", Qt::CaseInsensitive), "Turbolinux" },
+- { QRegExp("Ub.*64", Qt::CaseInsensitive), "Ubuntu_64" },
+- { QRegExp("Ub", Qt::CaseInsensitive), "Ubuntu" },
+- { QRegExp("Xa.*64", Qt::CaseInsensitive), "Xandros_64" },
+- { QRegExp("Xa", Qt::CaseInsensitive), "Xandros" },
+- { QRegExp("((Or)|(oel)).*64", Qt::CaseInsensitive), "Oracle_64" },
+- { QRegExp("(Or)|(oel)", Qt::CaseInsensitive), "Oracle" },
+- { QRegExp("((Li)|(lnx)).*2.?2", Qt::CaseInsensitive), "Linux22" },
+- { QRegExp("((Li)|(lnx)).*2.?4.*64", Qt::CaseInsensitive), "Linux24_64" },
+- { QRegExp("((Li)|(lnx)).*2.?4", Qt::CaseInsensitive), "Linux24" },
+- { QRegExp("((((Li)|(lnx)).*2.?6)|(LFS)).*64", Qt::CaseInsensitive), "Linux26_64" },
+- { QRegExp("(((Li)|(lnx)).*2.?6)|(LFS)", Qt::CaseInsensitive), "Linux26" },
+- { QRegExp("((Li)|(lnx)).*64", Qt::CaseInsensitive), "Linux26_64" },
+- { QRegExp("(Li)|(lnx)", Qt::CaseInsensitive), "Linux26" },
++ /* Code names for GNU/Linux distributions */
++ { QRegExp("((Taranis)|(Dagda)|(Brigantia)).*64", Qt::CaseInsensitive), "Trisquel_64" },
++ { QRegExp("(Taranis)|(Dagda)|(Brigantia)", Qt::CaseInsensitive), "Trisquel" },
++ { QRegExp("((metad)|(parkes)|(three)).*64", Qt::CaseInsensitive), "gNewSense_64" },
++ { QRegExp("(deltah)|(metad)|(parkes)|(three)", Qt::CaseInsensitive), "gNewSense" },
++ { QRegExp("((90k)|(119k)|(140k)|(160k)|(90000)|(119000)|(140000)|(160000)|(Spartakus)).*64", Qt::CaseInsensitive), "Blag_64" },
++ { QRegExp("(90k)|(119k)|(140k)|(160k)|(90000)|(119000)|(140000)|(160000)|(Spartakus)", Qt::CaseInsensitive), "Blag" },
++
++ /* Regular names of GNU/Linux distributions and GNU-Hurd */
++ { QRegExp("Pa.*64", Qt::CaseInsensitive), "Parabola_64" },
++ { QRegExp("Pa", Qt::CaseInsensitive), "Parabola" },
++ { QRegExp("((gNe)|(new)|(Sen)).*64", Qt::CaseInsensitive), "gNewSense_64" },
++ { QRegExp("(gNe)|(new)|(Sen)", Qt::CaseInsensitive), "gNewSense" },
++ { QRegExp("Bla.*64", Qt::CaseInsensitive), "Blag_64" },
++ { QRegExp("Bla", Qt::CaseInsensitive), "Blag" },
++ { QRegExp("Dra.*64", Qt::CaseInsensitive), "Dragora_64" },
++ { QRegExp("Dra", Qt::CaseInsensitive), "Dragora" },
++ { QRegExp("((Utu)|(XS)).*64", Qt::CaseInsensitive), "Ututo_64" },
++ { QRegExp("(Utu)|(XS)", Qt::CaseInsensitive), "Ututo" },
++ { QRegExp("Mus.*64", Qt::CaseInsensitive), "Musix_64" },
++ { QRegExp("Mus", Qt::CaseInsensitive), "Musix" },
++ { QRegExp("Tri.*64", Qt::CaseInsensitive), "Trisquel_64" },
++ { QRegExp("Tri", Qt::CaseInsensitive), "Trisquel" },
++ { QRegExp("Dyn", Qt::CaseInsensitive), "Dynebolic" },
++ { QRegExp("Ven", Qt::CaseInsensitive), "Venenux" },
++ { QRegExp("GNU", Qt::CaseInsensitive), "GNU" },
++ { QRegExp("Hu", Qt::CaseInsensitive), "GNUHurd" },
++ { QRegExp("((Li)|(lnx)).*64", Qt::CaseInsensitive), "GNULinux_64" },
++ { QRegExp("(Li)|(lnx)", Qt::CaseInsensitive), "GNULinux" },
+
+ /* Other */
+- { QRegExp("L4", Qt::CaseInsensitive), "L4" },
+- { QRegExp("((Fr.*B)|(fbsd)).*64", Qt::CaseInsensitive), "FreeBSD_64" },
+- { QRegExp("(Fr.*B)|(fbsd)", Qt::CaseInsensitive), "FreeBSD" },
+- { QRegExp("Op.*B.*64", Qt::CaseInsensitive), "OpenBSD_64" },
+- { QRegExp("Op.*B", Qt::CaseInsensitive), "OpenBSD" },
+- { QRegExp("Ne.*B.*64", Qt::CaseInsensitive), "NetBSD_64" },
+- { QRegExp("Ne.*B", Qt::CaseInsensitive), "NetBSD" },
+- { QRegExp("QN", Qt::CaseInsensitive), "QNX" },
+- { QRegExp("((Mac)|(Tig)|(Leop)|(osx)).*64", Qt::CaseInsensitive), "MacOS_64" },
+- { QRegExp("(Mac)|(Tig)|(Leop)|(osx)", Qt::CaseInsensitive), "MacOS" },
+- { QRegExp("Net", Qt::CaseInsensitive), "Netware" },
+- { QRegExp("Rocki", Qt::CaseInsensitive), "JRockitVE" },
+ { QRegExp("Ot", Qt::CaseInsensitive), "Other" },
+ };
+
+--- VirtualBox-4.1.18.orig/src/VBox/Main/xml/Settings.cpp 2012-07-25 15:14:50.498764160 -0300
++++ VirtualBox-4.1.18/src/VBox/Main/xml/Settings.cpp 2012-07-25 15:14:50.548761649 -0300
+@@ -3227,40 +3227,18 @@
+ } aConvertOSTypes[] =
+ {
+ { "unknown", "Other" },
+- { "dos", "DOS" },
+- { "win31", "Windows31" },
+- { "win95", "Windows95" },
+- { "win98", "Windows98" },
+- { "winme", "WindowsMe" },
+- { "winnt4", "WindowsNT4" },
+- { "win2k", "Windows2000" },
+- { "winxp", "WindowsXP" },
+- { "win2k3", "Windows2003" },
+- { "winvista", "WindowsVista" },
+- { "win2k8", "Windows2008" },
+- { "os2warp3", "OS2Warp3" },
+- { "os2warp4", "OS2Warp4" },
+- { "os2warp45", "OS2Warp45" },
+- { "ecs", "OS2eCS" },
+- { "linux22", "Linux22" },
+- { "linux24", "Linux24" },
+- { "linux26", "Linux26" },
+- { "archlinux", "ArchLinux" },
+- { "debian", "Debian" },
+- { "opensuse", "OpenSUSE" },
+- { "fedoracore", "Fedora" },
+- { "gentoo", "Gentoo" },
+- { "mandriva", "Mandriva" },
+- { "redhat", "RedHat" },
+- { "ubuntu", "Ubuntu" },
+- { "xandros", "Xandros" },
+- { "freebsd", "FreeBSD" },
+- { "openbsd", "OpenBSD" },
+- { "netbsd", "NetBSD" },
+- { "netware", "Netware" },
+- { "solaris", "Solaris" },
+- { "opensolaris", "OpenSolaris" },
+- { "l4", "L4" }
++ { "gnu", "GNU" },
++ { "gnuhurd", "GNUHurd" },
++ { "gnulinux", "GNULinux" },
++ { "parabola", "Parabola" },
++ { "gnewsense", "gNewSense" },
++ { "blag", "Blag" },
++ { "dragora", "Dragora" },
++ { "ututo", "Ututo" },
++ { "musix", "Musix" },
++ { "trisquel", "Trisquel" },
++ { "dynebolic", "Dynebolic" },
++ { "venenux", "Venenux" },
+ };
+
+ void MachineConfigFile::convertOldOSType_pre1_5(Utf8Str &str)
+--- VirtualBox-4.1.18.orig/src/VBox/Main/xml/SettingsConverter.xsl 2012-07-25 15:21:04.553581275 -0300
++++ VirtualBox-4.1.18/src/VBox/Main/xml/SettingsConverter.xsl 2012-07-25 15:21:04.593579427 -0300
+@@ -729,40 +729,18 @@
+ <xsl:attribute name="OSType">
+ <xsl:choose>
+ <xsl:when test="@OSType='unknown'">Other</xsl:when>
+- <xsl:when test="@OSType='dos'">DOS</xsl:when>
+- <xsl:when test="@OSType='win31'">Windows31</xsl:when>
+- <xsl:when test="@OSType='win95'">Windows95</xsl:when>
+- <xsl:when test="@OSType='win98'">Windows98</xsl:when>
+- <xsl:when test="@OSType='winme'">WindowsMe</xsl:when>
+- <xsl:when test="@OSType='winnt4'">WindowsNT4</xsl:when>
+- <xsl:when test="@OSType='win2k'">Windows2000</xsl:when>
+- <xsl:when test="@OSType='winxp'">WindowsXP</xsl:when>
+- <xsl:when test="@OSType='win2k3'">Windows2003</xsl:when>
+- <xsl:when test="@OSType='winvista'">WindowsVista</xsl:when>
+- <xsl:when test="@OSType='win2k8'">Windows2008</xsl:when>
+- <xsl:when test="@OSType='os2warp3'">OS2Warp3</xsl:when>
+- <xsl:when test="@OSType='os2warp4'">OS2Warp4</xsl:when>
+- <xsl:when test="@OSType='os2warp45'">OS2Warp45</xsl:when>
+- <xsl:when test="@OSType='ecs'">OS2eCS</xsl:when>
+- <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='archlinux'">ArchLinux</xsl:when>
+- <xsl:when test="@OSType='debian'">Debian</xsl:when>
+- <xsl:when test="@OSType='opensuse'">OpenSUSE</xsl:when>
+- <xsl:when test="@OSType='fedoracore'">Fedora</xsl:when>
+- <xsl:when test="@OSType='gentoo'">Gentoo</xsl:when>
+- <xsl:when test="@OSType='mandriva'">Mandriva</xsl:when>
+- <xsl:when test="@OSType='redhat'">RedHat</xsl:when>
+- <xsl:when test="@OSType='ubuntu'">Ubuntu</xsl:when>
+- <xsl:when test="@OSType='xandros'">Xandros</xsl:when>
+- <xsl:when test="@OSType='freebsd'">FreeBSD</xsl:when>
+- <xsl:when test="@OSType='openbsd'">OpenBSD</xsl:when>
+- <xsl:when test="@OSType='netbsd'">NetBSD</xsl:when>
+- <xsl:when test="@OSType='netware'">Netware</xsl:when>
+- <xsl:when test="@OSType='solaris'">Solaris</xsl:when>
+- <xsl:when test="@OSType='opensolaris'">OpenSolaris</xsl:when>
+- <xsl:when test="@OSType='l4'">L4</xsl:when>
++ <xsl:when test="@OSType='gnu'">GNU</xsl:when>
++ <xsl:when test="@OSType='gnuhurd'">GNUHurd</xsl:when>
++ <xsl:when test="@OSType='gnulinux'">GNULinux</xsl:when>
++ <xsl:when test="@OSType='parabola'">Parabola</xsl:when>
++ <xsl:when test="@OSType='gnewsense'">gNewSense</xsl:when>
++ <xsl:when test="@OSType='blag'">Blag</xsl:when>
++ <xsl:when test="@OSType='dragora'">Dragora</xsl:when>
++ <xsl:when test="@OSType='ututo'">Ututo</xsl:when>
++ <xsl:when test="@OSType='musix'">Musix</xsl:when>
++ <xsl:when test="@OSType='trisquel'">Trisquel</xsl:when>
++ <xsl:when test="@OSType='dynebolic'">Dynebolic</xsl:when>
++ <xsl:when test="@OSType='venenux'">Venenux</xsl:when>
+ </xsl:choose>
+ </xsl:attribute>
+ <xsl:apply-templates select="@*[name()!='OSType']" mode="v1.5"/>
+--- VirtualBox-4.1.18.orig/src/VBox/Main/xml/VirtualBox-settings-common.xsd 2012-07-25 15:04:37.856003691 -0300
++++ VirtualBox-4.1.18/src/VBox/Main/xml/VirtualBox-settings-common.xsd 2012-07-25 15:04:37.892668156 -0300
+@@ -137,75 +137,27 @@
+ <xsd:simpleType name="TGuestOSType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="Other"/>
+- <xsd:enumeration value="DOS"/>
+- <xsd:enumeration value="Netware"/>
+- <xsd:enumeration value="L4"/>
+- <xsd:enumeration value="Windows31"/>
+- <xsd:enumeration value="Windows95"/>
+- <xsd:enumeration value="Windows98"/>
+- <xsd:enumeration value="WindowsMe"/>
+- <xsd:enumeration value="WindowsNT4"/>
+- <xsd:enumeration value="Windows2000"/>
+- <xsd:enumeration value="WindowsXP"/>
+- <xsd:enumeration value="WindowsXP_64"/>
+- <xsd:enumeration value="Windows2003"/>
+- <xsd:enumeration value="Windows2003_64"/>
+- <xsd:enumeration value="WindowsVista"/>
+- <xsd:enumeration value="WindowsVista_64"/>
+- <xsd:enumeration value="Windows2008"/>
+- <xsd:enumeration value="Windows2008_64"/>
+- <xsd:enumeration value="Windows7"/>
+- <xsd:enumeration value="Windows7_64"/>
+- <xsd:enumeration value="Windows8"/>
+- <xsd:enumeration value="Windows8_64"/>
+- <xsd:enumeration value="WindowsNT"/>
+- <xsd:enumeration value="OS2Warp3"/>
+- <xsd:enumeration value="OS2Warp4"/>
+- <xsd:enumeration value="OS2Warp45"/>
+- <xsd:enumeration value="OS2eCS"/>
+- <xsd:enumeration value="OS2"/>
+- <xsd:enumeration value="Linux22"/>
+- <xsd:enumeration value="Linux24"/>
+- <xsd:enumeration value="Linux24_64"/>
+- <xsd:enumeration value="Linux26"/>
+- <xsd:enumeration value="Linux26_64"/>
+- <xsd:enumeration value="ArchLinux"/>
+- <xsd:enumeration value="ArchLinux_64"/>
+- <xsd:enumeration value="Debian"/>
+- <xsd:enumeration value="Debian_64"/>
+- <xsd:enumeration value="OpenSUSE"/>
+- <xsd:enumeration value="OpenSUSE_64"/>
+- <xsd:enumeration value="Fedora"/>
+- <xsd:enumeration value="Fedora_64"/>
+- <xsd:enumeration value="Gentoo"/>
+- <xsd:enumeration value="Gentoo_64"/>
+- <xsd:enumeration value="Mandriva"/>
+- <xsd:enumeration value="Mandriva_64"/>
+- <xsd:enumeration value="RedHat"/>
+- <xsd:enumeration value="RedHat_64"/>
+- <xsd:enumeration value="Turbolinux"/>
+- <xsd:enumeration value="Turbolinux_64"/>
+- <xsd:enumeration value="Ubuntu"/>
+- <xsd:enumeration value="Ubuntu_64"/>
+- <xsd:enumeration value="Xandros"/>
+- <xsd:enumeration value="Xandros_64"/>
+- <xsd:enumeration value="Oracle"/>
+- <xsd:enumeration value="Oracle_64"/>
+- <xsd:enumeration value="Linux"/>
+- <xsd:enumeration value="FreeBSD"/>
+- <xsd:enumeration value="FreeBSD_64"/>
+- <xsd:enumeration value="OpenBSD"/>
+- <xsd:enumeration value="OpenBSD_64"/>
+- <xsd:enumeration value="NetBSD"/>
+- <xsd:enumeration value="NetBSD_64"/>
+- <xsd:enumeration value="Solaris"/>
+- <xsd:enumeration value="Solaris_64"/>
+- <xsd:enumeration value="OpenSolaris"/>
+- <xsd:enumeration value="OpenSolaris_64"/>
+- <xsd:enumeration value="QNX"/>
+- <xsd:enumeration value="MacOS"/>
+- <xsd:enumeration value="MacOS_64"/>
+- <xsd:enumeration value="JRockitVE"/>
++ <xsd:enumeration value="GNU"/>
++ <xsd:enumeration value="GNU_64"/>
++ <xsd:enumeration value="GNUHurd"/>
++ <xsd:enumeration value="GNULinux"/>
++ <xsd:enumeration value="GNULinux_64"/>
++ <xsd:enumeration value="Parabola"/>
++ <xsd:enumeration value="Parabola_64"/>
++ <xsd:enumeration value="gNewSense"/>
++ <xsd:enumeration value="gNewSense_64"/>
++ <xsd:enumeration value="Blag"/>
++ <xsd:enumeration value="Blag_64"/>
++ <xsd:enumeration value="Dragora"/>
++ <xsd:enumeration value="Dragora_64"/>
++ <xsd:enumeration value="Ututo"/>
++ <xsd:enumeration value="Ututo_64"/>
++ <xsd:enumeration value="Musix"/>
++ <xsd:enumeration value="Musix_64"/>
++ <xsd:enumeration value="Trisquel"/>
++ <xsd:enumeration value="Trisquel_64"/>
++ <xsd:enumeration value="Dynebolic"/>
++ <xsd:enumeration value="Venenux"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+--- VirtualBox-4.1.18.orig/src/VBox/Frontends/VirtualBox/VirtualBox2.qrc 2012-07-25 15:40:56.733096866 -0300
++++ VirtualBox-4.1.18/src/VBox/Frontends/VirtualBox/VirtualBox2.qrc 2012-07-25 15:40:56.796426519 -0300
+@@ -1,75 +1,27 @@
+ <!DOCTYPE RCC><RCC version="1.0">
+ <qresource prefix="/">
+- <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>
+- <file alias="os_debian_64.png">images/os_debian_64.png</file>
+- <file alias="os_dos.png">images/os_dos.png</file>
+- <file alias="os_fedora.png">images/os_fedora.png</file>
+- <file alias="os_fedora_64.png">images/os_fedora_64.png</file>
+- <file alias="os_freebsd.png">images/os_freebsd.png</file>
+- <file alias="os_freebsd_64.png">images/os_freebsd_64.png</file>
+- <file alias="os_gentoo.png">images/os_gentoo.png</file>
+- <file alias="os_gentoo_64.png">images/os_gentoo_64.png</file>
+- <file alias="os_jrockitve.png">images/os_jrockitve.png</file>
+- <file alias="os_l4.png">images/os_l4.png</file>
+- <file alias="os_linux_other.png">images/os_linux_other.png</file>
+- <file alias="os_linux22.png">images/os_linux22.png</file>
+- <file alias="os_linux24.png">images/os_linux24.png</file>
+- <file alias="os_linux24_64.png">images/os_linux24_64.png</file>
+- <file alias="os_linux26.png">images/os_linux26.png</file>
+- <file alias="os_linux26_64.png">images/os_linux26_64.png</file>
+- <file alias="os_mandriva.png">images/os_mandriva.png</file>
+- <file alias="os_mandriva_64.png">images/os_mandriva_64.png</file>
+- <file alias="os_netbsd.png">images/os_netbsd.png</file>
+- <file alias="os_netbsd_64.png">images/os_netbsd_64.png</file>
+- <file alias="os_netware.png">images/os_netware.png</file>
+- <file alias="os_openbsd.png">images/os_openbsd.png</file>
+- <file alias="os_openbsd_64.png">images/os_openbsd_64.png</file>
+- <file alias="os_oraclesolaris.png">images/os_oraclesolaris.png</file>
+- <file alias="os_oraclesolaris_64.png">images/os_oraclesolaris_64.png</file>
+- <file alias="os_opensuse.png">images/os_opensuse.png</file>
+- <file alias="os_opensuse_64.png">images/os_opensuse_64.png</file>
+- <file alias="os_os2_other.png">images/os_os2_other.png</file>
+- <file alias="os_os2ecs.png">images/os_os2ecs.png</file>
+- <file alias="os_os2warp3.png">images/os_os2warp3.png</file>
+- <file alias="os_os2warp4.png">images/os_os2warp4.png</file>
+- <file alias="os_os2warp45.png">images/os_os2warp45.png</file>
++ <file alias="os_parabola.png">images/os_parabola.png</file>
++ <file alias="os_parabola_64.png">images/os_parabola_64.png</file>
++ <file alias="os_gnewsense.png">images/os_gnewsense.png</file>
++ <file alias="os_gnewsense_64.png">images/os_gnewsense_64.png</file>
++ <file alias="os_blag.png">images/os_blag.png</file>
++ <file alias="os_blag_64.png">images/os_blag_64.png</file>
++ <file alias="os_ututo.png">images/os_ututo.png</file>
++ <file alias="os_ututo_64.png">images/os_ututo_64.png</file>
++ <file alias="os_gnu.png">images/os_gnu.png</file>
++ <file alias="os_gnu_64.png">images/os_gnu_64.png</file>
++ <file alias="os_gnuhurd.png">images/os_gnuhurd.png</file>
++ <file alias="os_gnulinux.png">images/os_gnulinux.png</file>
++ <file alias="os_gnulinux_64.png">images/os_gnulinux_64.png</file>
++ <file alias="os_musix.png">images/os_musix.png</file>
++ <file alias="os_musix_64.png">images/os_musix_64.png</file>
++ <file alias="os_dragora.png">images/os_dragora.png</file>
++ <file alias="os_dragora_64.png">images/os_dragora_64.png</file>
+ <file alias="os_other.png">images/os_other.png</file>
+- <file alias="os_qnx.png">images/os_qnx.png</file>
+- <file alias="os_redhat.png">images/os_redhat.png</file>
+- <file alias="os_redhat_64.png">images/os_redhat_64.png</file>
+- <file alias="os_turbolinux.png">images/os_turbolinux.png</file>
+- <file alias="os_turbolinux_64.png">images/os_turbolinux_64.png</file>
+- <file alias="os_solaris.png">images/os_solaris.png</file>
+- <file alias="os_solaris_64.png">images/os_solaris_64.png</file>
+- <file alias="os_ubuntu.png">images/os_ubuntu.png</file>
+- <file alias="os_ubuntu_64.png">images/os_ubuntu_64.png</file>
+- <file alias="os_win_other.png">images/os_win_other.png</file>
+- <file alias="os_win2k.png">images/os_win2k.png</file>
+- <file alias="os_win2k3.png">images/os_win2k3.png</file>
+- <file alias="os_win2k3_64.png">images/os_win2k3_64.png</file>
+- <file alias="os_win2k8.png">images/os_win2k8.png</file>
+- <file alias="os_win2k8_64.png">images/os_win2k8_64.png</file>
+- <file alias="os_win31.png">images/os_win31.png</file>
+- <file alias="os_win7.png">images/os_win7.png</file>
+- <file alias="os_win7_64.png">images/os_win7_64.png</file>
+- <file alias="os_win8.png">images/os_win8.png</file>
+- <file alias="os_win8_64.png">images/os_win8_64.png</file>
+- <file alias="os_win95.png">images/os_win95.png</file>
+- <file alias="os_win98.png">images/os_win98.png</file>
+- <file alias="os_winme.png">images/os_winme.png</file>
+- <file alias="os_winnt4.png">images/os_winnt4.png</file>
+- <file alias="os_winvista.png">images/os_winvista.png</file>
+- <file alias="os_winvista_64.png">images/os_winvista_64.png</file>
+- <file alias="os_winxp.png">images/os_winxp.png</file>
+- <file alias="os_winxp_64.png">images/os_winxp_64.png</file>
+- <file alias="os_xandros.png">images/os_xandros.png</file>
+- <file alias="os_xandros_64.png">images/os_xandros_64.png</file>
+- <file alias="os_oracle.png">images/os_oracle.png</file>
+- <file alias="os_oracle_64.png">images/os_oracle_64.png</file>
+- <file alias="os_macosx.png">images/os_macosx.png</file>
+- <file alias="os_macosx_64.png">images/os_macosx_64.png</file>
++ <file alias="os_dynebolic.png">images/os_dynebolic.png</file>
++ <file alias="os_venenux.png">images/os_venenux.png</file>
++ <file alias="os_trisquel.png">images/os_trisquel.png</file>
++ <file alias="os_trisquel_64.png">images/os_trisquel_64.png</file>
+ <file alias="hd_16px.png">images/hd_16px.png</file>
+ <file alias="hd_disabled_16px.png">images/hd_disabled_16px.png</file>
+ <file alias="hd_32px.png">images/hd_32px.png</file>
+--- VirtualBox-4.1.18.orig/src/VBox/Main/src-all/Global.cpp 2012-06-20 10:17:34.000000000 -0300
++++ VirtualBox-4.1.18/src/VBox/Main/src-all/Global.cpp 2012-07-25 19:32:44.482993976 -0300
+@@ -35,284 +35,90 @@
+ VBOXOSTYPE_Unknown, VBOXOSHINT_NONE,
+ 64, 4, 2 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows31, "Windows 3.1",
+- VBOXOSTYPE_Win31, VBOXOSHINT_NONE,
+- 32, 4, 1 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_SB16 },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows95, "Windows 95",
+- VBOXOSTYPE_Win95, VBOXOSHINT_NONE,
+- 64, 4, 2 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows98, "Windows 98",
+- VBOXOSTYPE_Win98, VBOXOSHINT_NONE,
+- 64, 4, 2 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_WindowsMe, "Windows Me",
+- VBOXOSTYPE_WinMe, VBOXOSHINT_NONE,
+- 64, 4, 4 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_WindowsNT4, "Windows NT 4",
+- VBOXOSTYPE_WinNT4, VBOXOSHINT_NONE,
+- 128, 16, 2 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows2000, "Windows 2000",
+- VBOXOSTYPE_Win2k, VBOXOSHINT_USBTABLET,
+- 168, 16, 4 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_WindowsXP, "Windows XP",
+- VBOXOSTYPE_WinXP, VBOXOSHINT_USBTABLET,
+- 192, 16, 10 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_WindowsXP_64, "Windows XP (64 bit)",
+- VBOXOSTYPE_WinXP_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_USBTABLET,
+- 192, 16, 10 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows2003, "Windows 2003",
+- VBOXOSTYPE_Win2k3, VBOXOSHINT_USBTABLET,
+- 256, 16, 20 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows2003_64, "Windows 2003 (64 bit)",
+- VBOXOSTYPE_Win2k3_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_USBTABLET,
+- 256, 16, 20 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_HDA },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_WindowsVista, "Windows Vista",
+- VBOXOSTYPE_WinVista, VBOXOSHINT_USBTABLET,
+- 512, 16, 25 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_HDA },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_WindowsVista_64, "Windows Vista (64 bit)",
+- VBOXOSTYPE_WinVista_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_USBTABLET,
+- 512, 16, 25 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_HDA },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows2008, "Windows 2008",
+- VBOXOSTYPE_Win2k8, VBOXOSHINT_USBTABLET,
+- 512, 16, 25 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_HDA },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows2008_64, "Windows 2008 (64 bit)",
+- VBOXOSTYPE_Win2k8_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_USBTABLET,
+- 512, 16, 25 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_HDA },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows7, "Windows 7",
+- VBOXOSTYPE_Win7, VBOXOSHINT_USBTABLET,
+- 512, 16, 25 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_HDA },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows7_64, "Windows 7 (64 bit)",
+- VBOXOSTYPE_Win7_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_USBTABLET,
+- 512, 16, 25 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_HDA },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows8, "Windows 8",
+- VBOXOSTYPE_Win8, VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_USBTABLET | VBOXOSHINT_PAE,
+- 1024,128, 25 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_HDA },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows8_64, "Windows 8 (64 bit)",
+- VBOXOSTYPE_Win8_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_USBTABLET,
+- 1536,128, 25 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_HDA },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_WindowsNT, "Other Windows",
+- VBOXOSTYPE_WinNT, VBOXOSHINT_NONE,
+- 512, 16, 20 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Linux22, "Linux 2.2",
+- VBOXOSTYPE_Linux22, VBOXOSHINT_RTCUTC,
+- 64, 4, 2 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Linux24, "Linux 2.4",
+- VBOXOSTYPE_Linux24, VBOXOSHINT_RTCUTC,
+- 128, 4, 4 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Linux24_64, "Linux 2.4 (64 bit)",
+- VBOXOSTYPE_Linux24_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC,
+- 128, 4, 4 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
++ { "GNU", "GNU", SchemaDefs_OSTypeId_GNU, "GNU",
++ VBOXOSTYPE_GNU, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ 256, 4, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
++ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
++ { "GNU", "GNU", SchemaDefs_OSTypeId_GNU_64, "GNU (64 bit)",
++ VBOXOSTYPE_GNU_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 },
++ { "GNU-Hurd", "GNU-Hurd", SchemaDefs_OSTypeId_GNUHurd, "GNU-Hurd",
++ VBOXOSTYPE_GNUHurd, 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", SchemaDefs_OSTypeId_Linux26, "Linux 2.6",
+- VBOXOSTYPE_Linux26, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_GNULinux, "GNU/Linux",
++ VBOXOSTYPE_GNULinux, 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", SchemaDefs_OSTypeId_Linux26_64, "Linux 2.6 (64 bit)",
+- VBOXOSTYPE_Linux26_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_GNULinux_64, "GNU/Linux (64 bit)",
++ VBOXOSTYPE_GNULinux_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", SchemaDefs_OSTypeId_ArchLinux, "Arch Linux",
+- VBOXOSTYPE_ArchLinux, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Parabola, "Parabola GNU/Linux-libre",
++ VBOXOSTYPE_Parabola, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
+ 256, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_ArchLinux_64, "Arch Linux (64 bit)",
+- VBOXOSTYPE_ArchLinux_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Parabola_64, "Parabola GNU/Linux-libre (64 bit)",
++ VBOXOSTYPE_Parabola_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
+ 256, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Debian, "Debian",
+- VBOXOSTYPE_Debian, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_gNewSense, "gNewSense",
++ VBOXOSTYPE_gNewSense, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
+ 384, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Debian_64, "Debian (64 bit)",
+- VBOXOSTYPE_Debian_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_gNewSense_64, "gNewSense (64 bit)",
++ VBOXOSTYPE_gNewSense_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
+ 384, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97},
+- { "Linux", "Linux", SchemaDefs_OSTypeId_OpenSUSE, "openSUSE",
+- VBOXOSTYPE_OpenSUSE, 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", SchemaDefs_OSTypeId_OpenSUSE_64, "openSUSE (64 bit)",
+- VBOXOSTYPE_OpenSUSE_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", SchemaDefs_OSTypeId_Fedora, "Fedora",
+- VBOXOSTYPE_FedoraCore, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Blag, "Blag Linux and GNU",
++ VBOXOSTYPE_Blag, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
+ 768, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Fedora_64, "Fedora (64 bit)",
+- VBOXOSTYPE_FedoraCore_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Blag_64, "Blag Linux and GNU (64 bit)",
++ VBOXOSTYPE_Blag_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
+ 768, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Gentoo, "Gentoo",
+- VBOXOSTYPE_Gentoo, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Dragora, "Dragora",
++ VBOXOSTYPE_Dragora, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
+ 256, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Gentoo_64, "Gentoo (64 bit)",
+- VBOXOSTYPE_Gentoo_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Dragora_64, "Dragora (64 bit)",
++ VBOXOSTYPE_Dragora_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
+ 256, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Mandriva, "Mandriva",
+- VBOXOSTYPE_Mandriva, 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", SchemaDefs_OSTypeId_Mandriva_64, "Mandriva (64 bit)",
+- VBOXOSTYPE_Mandriva_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", SchemaDefs_OSTypeId_RedHat, "Red Hat",
+- VBOXOSTYPE_RedHat, VBOXOSHINT_RTCUTC | VBOXOSHINT_PAE,
+- 512, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Ututo, "Ututo XS",
++ VBOXOSTYPE_Ututo, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ 256, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_RedHat_64, "Red Hat (64 bit)",
+- VBOXOSTYPE_RedHat_x64, VBOXOSHINT_64BIT | VBOXOSHINT_PAE | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC,
+- 512, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Ututo_64, "Ututo XS (64 bit)",
++ VBOXOSTYPE_Ututo_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ 256, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Turbolinux, "Turbolinux",
+- VBOXOSTYPE_Turbolinux, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Musix, "Musix",
++ VBOXOSTYPE_Musix, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
+ 384, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Turbolinux, "Turbolinux (64 bit)",
+- VBOXOSTYPE_Turbolinux_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Musix_64, "Musix (64 bit)",
++ VBOXOSTYPE_Musix_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
+ 384, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Ubuntu, "Ubuntu",
+- VBOXOSTYPE_Ubuntu, VBOXOSHINT_RTCUTC | VBOXOSHINT_PAE | VBOXOSHINT_USBTABLET,
++ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97},
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Trisquel, "Trisquel",
++ VBOXOSTYPE_Trisquel, VBOXOSHINT_RTCUTC | VBOXOSHINT_PAE | VBOXOSHINT_USBTABLET,
+ 512, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Ubuntu_64, "Ubuntu (64 bit)",
+- VBOXOSTYPE_Ubuntu_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Trisquel_64, "Trisquel (64 bit)",
++ VBOXOSTYPE_Trisquel_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", SchemaDefs_OSTypeId_Xandros, "Xandros",
+- VBOXOSTYPE_Xandros, VBOXOSHINT_RTCUTC,
+- 256, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Xandros_64, "Xandros (64 bit)",
+- VBOXOSTYPE_Xandros_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC,
+- 256, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Oracle, "Oracle",
+- VBOXOSTYPE_Oracle, VBOXOSHINT_RTCUTC | VBOXOSHINT_PAE,
+- 512, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Dynebolic, "Dyne:bolic",
++ VBOXOSTYPE_Dynebolic, 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", SchemaDefs_OSTypeId_Oracle_64, "Oracle (64 bit)",
+- VBOXOSTYPE_Oracle_x64, VBOXOSHINT_64BIT | VBOXOSHINT_PAE | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC,
+- 512, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Venenux, "Venenux",
++ VBOXOSTYPE_Venenux, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ 384, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Linux, "Other Linux",
+- VBOXOSTYPE_Linux, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
+- 256, 12, 8 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Solaris", "Solaris", SchemaDefs_OSTypeId_Solaris, "Oracle Solaris 10 5/09 and earlier",
+- VBOXOSTYPE_Solaris, VBOXOSHINT_NONE,
+- 768, 12, 16 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Solaris", "Solaris", SchemaDefs_OSTypeId_Solaris_64, "Oracle Solaris 10 5/09 and earlier (64 bit)",
+- VBOXOSTYPE_Solaris_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC,
+- 1536, 12, 16 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Solaris", "Solaris", SchemaDefs_OSTypeId_OpenSolaris, "Oracle Solaris 10 10/09 and later",
+- VBOXOSTYPE_OpenSolaris, VBOXOSHINT_USBTABLET,
+- 768, 12, 16 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_IntelAhci, StorageBus_SATA,
+- StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Solaris", "Solaris", SchemaDefs_OSTypeId_OpenSolaris_64, "Oracle Solaris 10 10/09 and later (64 bit)",
+- VBOXOSTYPE_OpenSolaris_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_USBTABLET,
+- 1536, 12, 16 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_IntelAhci, StorageBus_SATA,
+- StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "BSD", "BSD", SchemaDefs_OSTypeId_FreeBSD, "FreeBSD",
+- VBOXOSTYPE_FreeBSD, VBOXOSHINT_NONE,
+- 128, 4, 2 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "BSD", "BSD", SchemaDefs_OSTypeId_FreeBSD_64, "FreeBSD (64 bit)",
+- VBOXOSTYPE_FreeBSD_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC,
+- 128, 4, 2 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "BSD", "BSD", SchemaDefs_OSTypeId_OpenBSD, "OpenBSD",
+- VBOXOSTYPE_OpenBSD, VBOXOSHINT_HWVIRTEX,
+- 64, 4, 2 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "BSD", "BSD", SchemaDefs_OSTypeId_OpenBSD_64, "OpenBSD (64 bit)",
+- VBOXOSTYPE_OpenBSD_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC,
+- 64, 4, 2 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "BSD", "BSD", SchemaDefs_OSTypeId_NetBSD, "NetBSD",
+- VBOXOSTYPE_NetBSD, VBOXOSHINT_NONE,
+- 64, 4, 2 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "BSD", "BSD", SchemaDefs_OSTypeId_NetBSD_64, "NetBSD (64 bit)",
+- VBOXOSTYPE_NetBSD_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC,
+- 64, 4, 2 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "OS2", "IBM OS/2", SchemaDefs_OSTypeId_OS2Warp3, "OS/2 Warp 3",
+- VBOXOSTYPE_OS2Warp3, VBOXOSHINT_HWVIRTEX,
+- 48, 4, 1 * _1G64, NetworkAdapterType_Am79C973, 1, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "OS2", "IBM OS/2", SchemaDefs_OSTypeId_OS2Warp4, "OS/2 Warp 4",
+- VBOXOSTYPE_OS2Warp4, VBOXOSHINT_HWVIRTEX,
+- 64, 4, 2 * _1G64, NetworkAdapterType_Am79C973, 1, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "OS2", "IBM OS/2", SchemaDefs_OSTypeId_OS2Warp45, "OS/2 Warp 4.5",
+- VBOXOSTYPE_OS2Warp45, VBOXOSHINT_HWVIRTEX,
+- 96, 4, 2 * _1G64, NetworkAdapterType_Am79C973, 1, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "OS2", "IBM OS/2", SchemaDefs_OSTypeId_OS2eCS, "eComStation",
+- VBOXOSTYPE_ECS, VBOXOSHINT_HWVIRTEX,
+- 96, 4, 2 * _1G64, NetworkAdapterType_Am79C973, 1, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "OS2", "IBM OS/2", SchemaDefs_OSTypeId_OS2, "Other OS/2",
+- VBOXOSTYPE_OS2, VBOXOSHINT_HWVIRTEX,
+- 96, 4, 2 * _1G64, NetworkAdapterType_Am79C973, 1, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "MacOS", "Mac OS X", SchemaDefs_OSTypeId_MacOS, "Mac OS X Server",
+- VBOXOSTYPE_MacOS, VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_EFI | VBOXOSHINT_PAE | VBOXOSHINT_USBHID | VBOXOSHINT_HPET | VBOXOSHINT_USBTABLET,
+- 1024, 4, 20 * _1G64, NetworkAdapterType_I82543GC, 0,
+- StorageControllerType_ICH6, StorageBus_IDE, StorageControllerType_IntelAhci, StorageBus_SATA,
+- ChipsetType_ICH9, AudioControllerType_HDA },
+- { "MacOS", "Mac OS X", SchemaDefs_OSTypeId_MacOS_64, "Mac OS X Server (64 bit)",
+- VBOXOSTYPE_MacOS_x64, VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_EFI | VBOXOSHINT_PAE | VBOXOSHINT_64BIT | VBOXOSHINT_USBHID | VBOXOSHINT_HPET | VBOXOSHINT_USBTABLET,
+- 1024, 4, 20 * _1G64, NetworkAdapterType_I82543GC, 0,
+- StorageControllerType_ICH6, StorageBus_IDE, StorageControllerType_IntelAhci, StorageBus_SATA,
+- ChipsetType_ICH9, AudioControllerType_HDA },
+- { "Other", "Other", SchemaDefs_OSTypeId_DOS, "DOS",
+- VBOXOSTYPE_DOS, VBOXOSHINT_NONE,
+- 32, 4, 500 * _1M, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_SB16 },
+- { "Other", "Other", SchemaDefs_OSTypeId_Netware, "Netware",
+- VBOXOSTYPE_Netware, VBOXOSHINT_HWVIRTEX,
+- 512, 4, 4 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Other", "Other", SchemaDefs_OSTypeId_L4, "L4",
+- VBOXOSTYPE_L4, VBOXOSHINT_NONE,
+- 64, 4, 2 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Other", "Other", SchemaDefs_OSTypeId_QNX, "QNX",
+- VBOXOSTYPE_QNX, VBOXOSHINT_HWVIRTEX,
+- 512, 4, 4 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Other", "Other", SchemaDefs_OSTypeId_JRockitVE, "JRockitVE",
+- VBOXOSTYPE_JRockitVE, VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_PAE,
+- 1024, 4, 8 * _1G64, NetworkAdapterType_I82545EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_BusLogic, StorageBus_SCSI, ChipsetType_PIIX3, AudioControllerType_AC97 },
+ };
+
+ /**
+--- VirtualBox-4.1.18.orig/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp 2012-07-25 21:44:01.290876720 -0300
++++ VirtualBox-4.1.18/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp 2012-07-25 22:00:57.819380802 -0300
+@@ -4875,75 +4875,27 @@
+ static const char *kOSTypeIcons [][2] =
+ {
+ {"Other", ":/os_other.png"},
+- {"DOS", ":/os_dos.png"},
+- {"Netware", ":/os_netware.png"},
+- {"L4", ":/os_l4.png"},
+- {"Windows31", ":/os_win31.png"},
+- {"Windows95", ":/os_win95.png"},
+- {"Windows98", ":/os_win98.png"},
+- {"WindowsMe", ":/os_winme.png"},
+- {"WindowsNT4", ":/os_winnt4.png"},
+- {"Windows2000", ":/os_win2k.png"},
+- {"WindowsXP", ":/os_winxp.png"},
+- {"WindowsXP_64", ":/os_winxp_64.png"},
+- {"Windows2003", ":/os_win2k3.png"},
+- {"Windows2003_64", ":/os_win2k3_64.png"},
+- {"WindowsVista", ":/os_winvista.png"},
+- {"WindowsVista_64", ":/os_winvista_64.png"},
+- {"Windows2008", ":/os_win2k8.png"},
+- {"Windows2008_64", ":/os_win2k8_64.png"},
+- {"Windows7", ":/os_win7.png"},
+- {"Windows7_64", ":/os_win7_64.png"},
+- {"Windows8", ":/os_win8.png"},
+- {"Windows8_64", ":/os_win8_64.png"},
+- {"WindowsNT", ":/os_win_other.png"},
+- {"OS2Warp3", ":/os_os2warp3.png"},
+- {"OS2Warp4", ":/os_os2warp4.png"},
+- {"OS2Warp45", ":/os_os2warp45.png"},
+- {"OS2eCS", ":/os_os2ecs.png"},
+- {"OS2", ":/os_os2_other.png"},
+- {"Linux22", ":/os_linux22.png"},
+- {"Linux24", ":/os_linux24.png"},
+- {"Linux24_64", ":/os_linux24_64.png"},
+- {"Linux26", ":/os_linux26.png"},
+- {"Linux26_64", ":/os_linux26_64.png"},
+- {"ArchLinux", ":/os_archlinux.png"},
+- {"ArchLinux_64", ":/os_archlinux_64.png"},
+- {"Debian", ":/os_debian.png"},
+- {"Debian_64", ":/os_debian_64.png"},
+- {"OpenSUSE", ":/os_opensuse.png"},
+- {"OpenSUSE_64", ":/os_opensuse_64.png"},
+- {"Fedora", ":/os_fedora.png"},
+- {"Fedora_64", ":/os_fedora_64.png"},
+- {"Gentoo", ":/os_gentoo.png"},
+- {"Gentoo_64", ":/os_gentoo_64.png"},
+- {"Mandriva", ":/os_mandriva.png"},
+- {"Mandriva_64", ":/os_mandriva_64.png"},
+- {"RedHat", ":/os_redhat.png"},
+- {"RedHat_64", ":/os_redhat_64.png"},
+- {"Turbolinux", ":/os_turbolinux.png"},
+- {"Turbolinux_64", ":/os_turbolinux_64.png"},
+- {"Ubuntu", ":/os_ubuntu.png"},
+- {"Ubuntu_64", ":/os_ubuntu_64.png"},
+- {"Xandros", ":/os_xandros.png"},
+- {"Xandros_64", ":/os_xandros_64.png"},
+- {"Oracle", ":/os_oracle.png"},
+- {"Oracle_64", ":/os_oracle_64.png"},
+- {"Linux", ":/os_linux_other.png"},
+- {"FreeBSD", ":/os_freebsd.png"},
+- {"FreeBSD_64", ":/os_freebsd_64.png"},
+- {"OpenBSD", ":/os_openbsd.png"},
+- {"OpenBSD_64", ":/os_openbsd_64.png"},
+- {"NetBSD", ":/os_netbsd.png"},
+- {"NetBSD_64", ":/os_netbsd_64.png"},
+- {"Solaris", ":/os_solaris.png"},
+- {"Solaris_64", ":/os_solaris_64.png"},
+- {"OpenSolaris", ":/os_oraclesolaris.png"},
+- {"OpenSolaris_64", ":/os_oraclesolaris_64.png"},
+- {"QNX", ":/os_qnx.png"},
+- {"MacOS", ":/os_macosx.png"},
+- {"MacOS_64", ":/os_macosx_64.png"},
+- {"JRockitVE", ":/os_jrockitve.png"},
++ {"GNU", ":/os_gnu.png"},
++ {"GNU_64", ":/os_gnu_64.png"},
++ {"GNUHurd", ":/os_gnuhurd.png"},
++ {"GNULinux", ":/os_gnulinux.png"},
++ {"GNULinux_64", ":/os_gnulinux_64.png"},
++ {"Parabola", ":/os_parabola.png"},
++ {"Parabola_64", ":/os_parabola_64.png"},
++ {"gNewSense", ":/os_gnewsense.png"},
++ {"gNewSense_64", ":/os_gnewsense_64.png"},
++ {"Blag", ":/os_blag.png"},
++ {"Blag_64", ":/os_blag_64.png"},
++ {"Dragora", ":/os_dragora.png"},
++ {"Dragora_64", ":/os_dragora_64.png"},
++ {"Ututo", ":/os_ututo.png"},
++ {"Ututo_64", ":/os_ututo_64.png"},
++ {"Musix", ":/os_musix.png"},
++ {"Musix_64", ":/os_musix_64.png"},
++ {"Trisquel", ":/os_trisquel.png"},
++ {"Trisquel_64", ":/os_trisquel_64.png"},
++ {"Dynebolic", ":/os_dynebolic.png"},
++ {"Venenux", ":/os_venenux.png"},
+ };
+ for (uint n = 0; n < SIZEOF_ARRAY (kOSTypeIcons); ++ n)
+ {
+--- VirtualBox-4.1.18.orig/src/VBox/Frontends/VirtualBox/src/widgets/VBoxOSTypeSelectorWidget.cpp.orig 2012-06-20 10:16:38.000000000 -0300
++++ VirtualBox-4.1.18/src/VBox/Frontends/VirtualBox/src/widgets/VBoxOSTypeSelectorWidget.cpp 2012-07-25 22:07:51.232436783 -0300
+@@ -192,17 +192,10 @@
+ if (typeIndex != -1)
+ mCbType->setCurrentIndex (typeIndex);
+ }
+- /* Or select WinXP item for Windows family as default */
+- else if (familyId == "Windows")
++ /* Or select Parabola GNU/Linux-libre item for GNU/Linux family as default */
++ else if (familyId == "GNU/Linux")
+ {
+- int xpIndex = mCbType->findData ("WindowsXP", RoleTypeID);
+- if (xpIndex != -1)
+- mCbType->setCurrentIndex (xpIndex);
+- }
+- /* Or select Ubuntu item for Linux family as default */
+- else if (familyId == "Linux")
+- {
+- int ubIndex = mCbType->findData ("Ubuntu", RoleTypeID);
++ int ubIndex = mCbType->findData ("Parabola", RoleTypeID);
+ if (ubIndex != -1)
+ mCbType->setCurrentIndex (ubIndex);
+ }
+--- VirtualBox-4.1.18.orig/include/VBox/ostypes.h 2012-06-20 10:07:51.000000000 -0300
++++ VirtualBox-4.1.18/include/VBox/ostypes.h 2012-07-25 23:20:57.322757456 -0300
+@@ -43,77 +43,27 @@
+ typedef enum VBOXOSTYPE
+ {
+ VBOXOSTYPE_Unknown = 0,
+- VBOXOSTYPE_DOS = 0x10000,
+- VBOXOSTYPE_Win31 = 0x15000,
+- VBOXOSTYPE_Win9x = 0x20000,
+- VBOXOSTYPE_Win95 = 0x21000,
+- VBOXOSTYPE_Win98 = 0x22000,
+- VBOXOSTYPE_WinMe = 0x23000,
+- VBOXOSTYPE_WinNT = 0x30000,
+- VBOXOSTYPE_WinNT4 = 0x31000,
+- VBOXOSTYPE_Win2k = 0x32000,
+- VBOXOSTYPE_WinXP = 0x33000,
+- VBOXOSTYPE_WinXP_x64 = 0x33100,
+- VBOXOSTYPE_Win2k3 = 0x34000,
+- VBOXOSTYPE_Win2k3_x64 = 0x34100,
+- VBOXOSTYPE_WinVista = 0x35000,
+- VBOXOSTYPE_WinVista_x64 = 0x35100,
+- VBOXOSTYPE_Win2k8 = 0x36000,
+- VBOXOSTYPE_Win2k8_x64 = 0x36100,
+- VBOXOSTYPE_Win7 = 0x37000,
+- VBOXOSTYPE_Win7_x64 = 0x37100,
+- VBOXOSTYPE_Win8 = 0x38000,
+- VBOXOSTYPE_Win8_x64 = 0x38100,
+- VBOXOSTYPE_OS2 = 0x40000,
+- VBOXOSTYPE_OS2Warp3 = 0x41000,
+- VBOXOSTYPE_OS2Warp4 = 0x42000,
+- VBOXOSTYPE_OS2Warp45 = 0x43000,
+- VBOXOSTYPE_ECS = 0x44000,
+- VBOXOSTYPE_Linux = 0x50000,
+- VBOXOSTYPE_Linux_x64 = 0x50100,
+- VBOXOSTYPE_Linux22 = 0x51000,
+- VBOXOSTYPE_Linux24 = 0x52000,
+- VBOXOSTYPE_Linux24_x64 = 0x52100,
+- VBOXOSTYPE_Linux26 = 0x53000,
+- VBOXOSTYPE_Linux26_x64 = 0x53100,
+- VBOXOSTYPE_ArchLinux = 0x54000,
+- VBOXOSTYPE_ArchLinux_x64 = 0x54100,
+- VBOXOSTYPE_Debian = 0x55000,
+- VBOXOSTYPE_Debian_x64 = 0x55100,
+- VBOXOSTYPE_OpenSUSE = 0x56000,
+- VBOXOSTYPE_OpenSUSE_x64 = 0x56100,
+- VBOXOSTYPE_FedoraCore = 0x57000,
+- VBOXOSTYPE_FedoraCore_x64 = 0x57100,
+- VBOXOSTYPE_Gentoo = 0x58000,
+- VBOXOSTYPE_Gentoo_x64 = 0x58100,
+- VBOXOSTYPE_Mandriva = 0x59000,
+- VBOXOSTYPE_Mandriva_x64 = 0x59100,
+- VBOXOSTYPE_RedHat = 0x5A000,
+- VBOXOSTYPE_RedHat_x64 = 0x5A100,
+- VBOXOSTYPE_Turbolinux = 0x5B000,
+- VBOXOSTYPE_Turbolinux_x64 = 0x5B100,
+- VBOXOSTYPE_Ubuntu = 0x5C000,
+- VBOXOSTYPE_Ubuntu_x64 = 0x5C100,
+- VBOXOSTYPE_Xandros = 0x5D000,
+- VBOXOSTYPE_Xandros_x64 = 0x5D100,
+- VBOXOSTYPE_Oracle = 0x5E000,
+- VBOXOSTYPE_Oracle_x64 = 0x5E100,
+- VBOXOSTYPE_FreeBSD = 0x60000,
+- VBOXOSTYPE_FreeBSD_x64 = 0x60100,
+- VBOXOSTYPE_OpenBSD = 0x61000,
+- VBOXOSTYPE_OpenBSD_x64 = 0x61100,
+- VBOXOSTYPE_NetBSD = 0x62000,
+- VBOXOSTYPE_NetBSD_x64 = 0x62100,
+- VBOXOSTYPE_Netware = 0x70000,
+- VBOXOSTYPE_Solaris = 0x80000,
+- VBOXOSTYPE_Solaris_x64 = 0x80100,
+- VBOXOSTYPE_OpenSolaris = 0x81000,
+- VBOXOSTYPE_OpenSolaris_x64 = 0x81100,
+- VBOXOSTYPE_L4 = 0x90000,
+- VBOXOSTYPE_QNX = 0xA0000,
+- VBOXOSTYPE_MacOS = 0xB0000,
+- VBOXOSTYPE_MacOS_x64 = 0xB0100,
+- VBOXOSTYPE_JRockitVE = 0xC0000,
++ VBOXOSTYPE_GNU = 0x10000,
++ VBOXOSTYPE_GNU_x64 = 0x10100,
++ VBOXOSTYPE_GNUHurd = 0x20000,
++ VBOXOSTYPE_GNULinux = 0x30000,
++ VBOXOSTYPE_GNULinux_x64 = 0x30100,
++ VBOXOSTYPE_Parabola = 0x31000,
++ VBOXOSTYPE_Parabola_x64 = 0x31100,
++ VBOXOSTYPE_gNewSense = 0x32000,
++ VBOXOSTYPE_gNewSense_x64 = 0x32100,
++ VBOXOSTYPE_Blag = 0x33000,
++ VBOXOSTYPE_Blag_x64 = 0x33100,
++ VBOXOSTYPE_Dragora = 0x34000,
++ VBOXOSTYPE_Dragora_x64 = 0x34100,
++ VBOXOSTYPE_Ututo = 0x35000,
++ VBOXOSTYPE_Ututo_x64 = 0x35100,
++ VBOXOSTYPE_Musix = 0x36000,
++ VBOXOSTYPE_Musix_x64 = 0x36100,
++ VBOXOSTYPE_Trisquel = 0x37000,
++ VBOXOSTYPE_Trisquel_x64 = 0x37100,
++ VBOXOSTYPE_Dynebolic = 0x38000,
++ VBOXOSTYPE_Venenux = 0x39000,
+ /** The bit number which indicates 64-bit or 32-bit. */
+ #define VBOXOSTYPE_x64_BIT 8
+ /** The mask which indicates 64-bit. */
+@@ -129,16 +79,11 @@
+ typedef enum VBOXOSFAMILY
+ {
+ VBOXOSFAMILY_Unknown = 0,
+- VBOXOSFAMILY_Windows32 = 1,
+- VBOXOSFAMILY_Windows64 = 2,
+- VBOXOSFAMILY_Linux32 = 3,
+- VBOXOSFAMILY_Linux64 = 4,
+- VBOXOSFAMILY_FreeBSD32 = 5,
+- VBOXOSFAMILY_FreeBSD64 = 6,
+- VBOXOSFAMILY_Solaris32 = 7,
+- VBOXOSFAMILY_Solaris64 = 8,
+- VBOXOSFAMILY_MacOSX32 = 9,
+- VBOXOSFAMILY_MacOSX64 = 10,
++ VBOXOSFAMILY_GNU32 = 1,
++ VBOXOSFAMILY_GNU64 = 2,
++ VBOXOSFAMILY_GNUHurd = 3,
++ VBOXOSFAMILY_GNULinux32 = 4,
++ VBOXOSFAMILY_GNULinux64 = 5,
+ /** The usual 32-bit hack. */
+ VBOXOSFAMILY_32BIT_HACK = 0x7fffffff
+ } VBOXOSFAMILY;
+--- VirtualBox-4.1.18.orig/src/VBox/Main/src-server/ApplianceImpl.cpp 2012-06-20 10:17:35.000000000 -0300
++++ VirtualBox-4.1.18/src/VBox/Main/src-server/ApplianceImpl.cpp 2012-07-26 01:28:50.033551279 -0300
+@@ -49,94 +49,33 @@
+ g_osTypes[] =
+ {
+ { ovf::CIMOSType_CIMOS_Unknown, SchemaDefs_OSTypeId_Other },
+- { ovf::CIMOSType_CIMOS_OS2, SchemaDefs_OSTypeId_OS2 },
+- { ovf::CIMOSType_CIMOS_OS2, SchemaDefs_OSTypeId_OS2Warp3 },
+- { ovf::CIMOSType_CIMOS_OS2, SchemaDefs_OSTypeId_OS2Warp4 },
+- { ovf::CIMOSType_CIMOS_OS2, SchemaDefs_OSTypeId_OS2Warp45 },
+- { ovf::CIMOSType_CIMOS_MSDOS, SchemaDefs_OSTypeId_DOS },
+- { ovf::CIMOSType_CIMOS_WIN3x, SchemaDefs_OSTypeId_Windows31 },
+- { ovf::CIMOSType_CIMOS_WIN95, SchemaDefs_OSTypeId_Windows95 },
+- { ovf::CIMOSType_CIMOS_WIN98, SchemaDefs_OSTypeId_Windows98 },
+- { ovf::CIMOSType_CIMOS_WINNT, SchemaDefs_OSTypeId_WindowsNT },
+- { ovf::CIMOSType_CIMOS_WINNT, SchemaDefs_OSTypeId_WindowsNT4 },
+- { ovf::CIMOSType_CIMOS_NetWare, SchemaDefs_OSTypeId_Netware },
+- { ovf::CIMOSType_CIMOS_NovellOES, SchemaDefs_OSTypeId_Netware },
+- { ovf::CIMOSType_CIMOS_Solaris, SchemaDefs_OSTypeId_Solaris },
+- { ovf::CIMOSType_CIMOS_SunOS, SchemaDefs_OSTypeId_Solaris },
+- { ovf::CIMOSType_CIMOS_FreeBSD, SchemaDefs_OSTypeId_FreeBSD },
+- { ovf::CIMOSType_CIMOS_NetBSD, SchemaDefs_OSTypeId_NetBSD },
+- { ovf::CIMOSType_CIMOS_QNX, SchemaDefs_OSTypeId_QNX },
+- { ovf::CIMOSType_CIMOS_Windows2000, SchemaDefs_OSTypeId_Windows2000 },
+- { ovf::CIMOSType_CIMOS_WindowsMe, SchemaDefs_OSTypeId_WindowsMe },
+- { ovf::CIMOSType_CIMOS_OpenBSD, SchemaDefs_OSTypeId_OpenBSD },
+- { ovf::CIMOSType_CIMOS_WindowsXP, SchemaDefs_OSTypeId_WindowsXP },
+- { ovf::CIMOSType_CIMOS_WindowsXPEmbedded, SchemaDefs_OSTypeId_WindowsXP },
+- { ovf::CIMOSType_CIMOS_WindowsEmbeddedforPointofService, SchemaDefs_OSTypeId_WindowsXP },
+- { ovf::CIMOSType_CIMOS_MicrosoftWindowsServer2003, SchemaDefs_OSTypeId_Windows2003 },
+- { ovf::CIMOSType_CIMOS_MicrosoftWindowsServer2003_64, SchemaDefs_OSTypeId_Windows2003_64 },
+- { ovf::CIMOSType_CIMOS_WindowsXP_64, SchemaDefs_OSTypeId_WindowsXP_64 },
+- { ovf::CIMOSType_CIMOS_WindowsVista, SchemaDefs_OSTypeId_WindowsVista },
+- { ovf::CIMOSType_CIMOS_WindowsVista_64, SchemaDefs_OSTypeId_WindowsVista_64 },
+- { ovf::CIMOSType_CIMOS_MicrosoftWindowsServer2008, SchemaDefs_OSTypeId_Windows2008 },
+- { ovf::CIMOSType_CIMOS_MicrosoftWindowsServer2008_64, SchemaDefs_OSTypeId_Windows2008_64 },
+- { ovf::CIMOSType_CIMOS_FreeBSD_64, SchemaDefs_OSTypeId_FreeBSD_64 },
+- { ovf::CIMOSType_CIMOS_MACOS, SchemaDefs_OSTypeId_MacOS },
+- { ovf::CIMOSType_CIMOS_MACOS, SchemaDefs_OSTypeId_MacOS_64 }, // there is no CIM 64-bit type for this
+-
+- // Linuxes
+- { ovf::CIMOSType_CIMOS_RedHatEnterpriseLinux, SchemaDefs_OSTypeId_RedHat },
+- { ovf::CIMOSType_CIMOS_RedHatEnterpriseLinux_64, SchemaDefs_OSTypeId_RedHat_64 },
+- { ovf::CIMOSType_CIMOS_Solaris_64, SchemaDefs_OSTypeId_Solaris_64 },
+- { ovf::CIMOSType_CIMOS_SUSE, SchemaDefs_OSTypeId_OpenSUSE },
+- { ovf::CIMOSType_CIMOS_SLES, SchemaDefs_OSTypeId_OpenSUSE },
+- { ovf::CIMOSType_CIMOS_NovellLinuxDesktop, SchemaDefs_OSTypeId_OpenSUSE },
+- { ovf::CIMOSType_CIMOS_SUSE_64, SchemaDefs_OSTypeId_OpenSUSE_64 },
+- { ovf::CIMOSType_CIMOS_SLES_64, SchemaDefs_OSTypeId_OpenSUSE_64 },
+- { ovf::CIMOSType_CIMOS_LINUX, SchemaDefs_OSTypeId_Linux },
+- { ovf::CIMOSType_CIMOS_LINUX, SchemaDefs_OSTypeId_Linux22 },
+- { ovf::CIMOSType_CIMOS_SunJavaDesktopSystem, SchemaDefs_OSTypeId_Linux },
+- { ovf::CIMOSType_CIMOS_TurboLinux, SchemaDefs_OSTypeId_Turbolinux },
+- { ovf::CIMOSType_CIMOS_TurboLinux_64, SchemaDefs_OSTypeId_Turbolinux_64 },
+- { ovf::CIMOSType_CIMOS_Mandriva, SchemaDefs_OSTypeId_Mandriva },
+- { ovf::CIMOSType_CIMOS_Mandriva_64, SchemaDefs_OSTypeId_Mandriva_64 },
+- { ovf::CIMOSType_CIMOS_Ubuntu, SchemaDefs_OSTypeId_Ubuntu },
+- { ovf::CIMOSType_CIMOS_Ubuntu_64, SchemaDefs_OSTypeId_Ubuntu_64 },
+- { ovf::CIMOSType_CIMOS_Debian, SchemaDefs_OSTypeId_Debian },
+- { ovf::CIMOSType_CIMOS_Debian_64, SchemaDefs_OSTypeId_Debian_64 },
+- { ovf::CIMOSType_CIMOS_Linux_2_4_x, SchemaDefs_OSTypeId_Linux24 },
+- { ovf::CIMOSType_CIMOS_Linux_2_4_x_64, SchemaDefs_OSTypeId_Linux24_64 },
+- { ovf::CIMOSType_CIMOS_Linux_2_6_x, SchemaDefs_OSTypeId_Linux26 },
+- { ovf::CIMOSType_CIMOS_Linux_2_6_x_64, SchemaDefs_OSTypeId_Linux26_64 },
+- { ovf::CIMOSType_CIMOS_Linux_64, SchemaDefs_OSTypeId_Linux26_64 },
+-
+- // types that we have support for but CIM doesn't
+- { ovf::CIMOSType_CIMOS_Linux_2_6_x, SchemaDefs_OSTypeId_ArchLinux },
+- { ovf::CIMOSType_CIMOS_Linux_2_6_x_64, SchemaDefs_OSTypeId_ArchLinux_64 },
+- { ovf::CIMOSType_CIMOS_Linux_2_6_x, SchemaDefs_OSTypeId_Fedora },
+- { ovf::CIMOSType_CIMOS_Linux_2_6_x_64, SchemaDefs_OSTypeId_Fedora_64 },
+- { ovf::CIMOSType_CIMOS_Linux_2_6_x, SchemaDefs_OSTypeId_Gentoo },
+- { ovf::CIMOSType_CIMOS_Linux_2_6_x_64, SchemaDefs_OSTypeId_Gentoo_64 },
+- { ovf::CIMOSType_CIMOS_Linux_2_6_x, SchemaDefs_OSTypeId_Xandros },
+- { ovf::CIMOSType_CIMOS_Linux_2_6_x_64, SchemaDefs_OSTypeId_Xandros_64 },
+- { ovf::CIMOSType_CIMOS_Solaris, SchemaDefs_OSTypeId_OpenSolaris },
+- { ovf::CIMOSType_CIMOS_Solaris_64, SchemaDefs_OSTypeId_OpenSolaris_64 },
+-
+- // types added with CIM 2.25.0 follow:
+- { ovf::CIMOSType_CIMOS_WindowsServer2008R2, SchemaDefs_OSTypeId_Windows2008 }, // duplicate, see above
+-// { ovf::CIMOSType_CIMOS_VMwareESXi = 104, // we can't run ESX in a VM
+- { ovf::CIMOSType_CIMOS_Windows7, SchemaDefs_OSTypeId_Windows7 },
+- { ovf::CIMOSType_CIMOS_Windows7, SchemaDefs_OSTypeId_Windows7_64 }, // there is no CIM 64-bit type for this
+- { ovf::CIMOSType_CIMOS_CentOS, SchemaDefs_OSTypeId_RedHat },
+- { ovf::CIMOSType_CIMOS_CentOS_64, SchemaDefs_OSTypeId_RedHat_64 },
+- { ovf::CIMOSType_CIMOS_OracleEnterpriseLinux, SchemaDefs_OSTypeId_Oracle },
+- { ovf::CIMOSType_CIMOS_OracleEnterpriseLinux_64, SchemaDefs_OSTypeId_Oracle_64 },
+- { ovf::CIMOSType_CIMOS_eComStation, SchemaDefs_OSTypeId_OS2eCS }
+-
+- // there are no CIM types for these, so these turn to "other" on export:
+- // SchemaDefs_OSTypeId_OpenBSD
+- // SchemaDefs_OSTypeId_OpenBSD_64
+- // SchemaDefs_OSTypeId_NetBSD
+- // SchemaDefs_OSTypeId_NetBSD_64
++
++ // Custom OS
++ { ovf::CIMOSType_CIMOS_GNU, SchemaDefs_OSTypeId_GNU },
++ { ovf::CIMOSType_CIMOS_GNU_64, SchemaDefs_OSTypeId_GNU_64 },
++ { ovf::CIMOSType_CIMOS_GNUHurd, SchemaDefs_OSTypeId_GNUHurd },
++ { ovf::CIMOSType_CIMOS_GNULinux, SchemaDefs_OSTypeId_GNULinux },
++ { ovf::CIMOSType_CIMOS_GNULinux_64, SchemaDefs_OSTypeId_GNULinux_64 },
++
++ // GNU/Linux free distros
++ { ovf::CIMOSType_CIMOS_gNewSense, SchemaDefs_OSTypeId_gNewSense },
++ { ovf::CIMOSType_CIMOS_gNewSense_64, SchemaDefs_OSTypeId_gNewSense_64 },
++ { ovf::CIMOSType_CIMOS_Dragora, SchemaDefs_OSTypeId_Dragora },
++ { ovf::CIMOSType_CIMOS_Dragora_64, SchemaDefs_OSTypeId_Dragora_64 },
++ { ovf::CIMOSType_CIMOS_Musix, SchemaDefs_OSTypeId_Musix },
++ { ovf::CIMOSType_CIMOS_Musix_64, SchemaDefs_OSTypeId_Musix_64 },
++ { ovf::CIMOSType_CIMOS_Trisquel, SchemaDefs_OSTypeId_Trisquel },
++ { ovf::CIMOSType_CIMOS_Trisquel_64, SchemaDefs_OSTypeId_Trisquel_64 },
++ { ovf::CIMOSType_CIMOS_Dynebolic, SchemaDefs_OSTypeId_Dynebolic },
++ { ovf::CIMOSType_CIMOS_Venenux, SchemaDefs_OSTypeId_Venenux },
++
++ // GNU/Linux free distros that we have support for but CIM doesn't
++ { ovf::CIMOSType_CIMOS_GNULinux, SchemaDefs_OSTypeId_Parabola },
++ { ovf::CIMOSType_CIMOS_GNULinux_64, SchemaDefs_OSTypeId_Parabola_64 },
++ { ovf::CIMOSType_CIMOS_GNULinux, SchemaDefs_OSTypeId_Blag },
++ { ovf::CIMOSType_CIMOS_GNULinux_64, SchemaDefs_OSTypeId_Blag_64 },
++ { ovf::CIMOSType_CIMOS_GNULinux, SchemaDefs_OSTypeId_Ututo },
++ { ovf::CIMOSType_CIMOS_GNULinux_64, SchemaDefs_OSTypeId_Ututo_64 },
+
+ };
+
+@@ -150,53 +89,34 @@
+ /* These are the 32-Bit ones. They are sorted by priority. */
+ static const osTypePattern g_osTypesPattern[] =
+ {
+- {"Windows NT", SchemaDefs_OSTypeId_WindowsNT4},
+- {"Windows XP", SchemaDefs_OSTypeId_WindowsXP},
+- {"Windows 2000", SchemaDefs_OSTypeId_Windows2000},
+- {"Windows 2003", SchemaDefs_OSTypeId_Windows2003},
+- {"Windows Vista", SchemaDefs_OSTypeId_WindowsVista},
+- {"Windows 2008", SchemaDefs_OSTypeId_Windows2008},
+- {"SUSE", SchemaDefs_OSTypeId_OpenSUSE},
+- {"Novell", SchemaDefs_OSTypeId_OpenSUSE},
+- {"Red Hat", SchemaDefs_OSTypeId_RedHat},
+- {"Mandriva", SchemaDefs_OSTypeId_Mandriva},
+- {"Ubuntu", SchemaDefs_OSTypeId_Ubuntu},
+- {"Debian", SchemaDefs_OSTypeId_Debian},
+- {"QNX", SchemaDefs_OSTypeId_QNX},
+- {"Linux 2.4", SchemaDefs_OSTypeId_Linux24},
+- {"Linux 2.6", SchemaDefs_OSTypeId_Linux26},
+- {"Linux", SchemaDefs_OSTypeId_Linux},
+- {"OpenSolaris", SchemaDefs_OSTypeId_OpenSolaris},
+- {"Solaris", SchemaDefs_OSTypeId_OpenSolaris},
+- {"FreeBSD", SchemaDefs_OSTypeId_FreeBSD},
+- {"NetBSD", SchemaDefs_OSTypeId_NetBSD},
+- {"Windows 95", SchemaDefs_OSTypeId_Windows95},
+- {"Windows 98", SchemaDefs_OSTypeId_Windows98},
+- {"Windows Me", SchemaDefs_OSTypeId_WindowsMe},
+- {"Windows 3.", SchemaDefs_OSTypeId_Windows31},
+- {"DOS", SchemaDefs_OSTypeId_DOS},
+- {"OS2", SchemaDefs_OSTypeId_OS2}
++
++ {"Parabola GNU/Linux-libre", SchemaDefs_OSTypeId_Parabola},
++ {"gNewSense", SchemaDefs_OSTypeId_gNewSense},
++ {"Blag Linux and GNU", SchemaDefs_OSTypeId_Blag},
++ {"Dragora", SchemaDefs_OSTypeId_Dragora},
++ {"Ututo XS", SchemaDefs_OSTypeId_Ututo},
++ {"Musix", SchemaDefs_OSTypeId_Musix},
++ {"Trisquel", SchemaDefs_OSTypeId_Trisquel},
++ {"Dyne:bolic", SchemaDefs_OSTypeId_Dynebolic},
++ {"Venenux", SchemaDefs_OSTypeId_Venenux},
++ {"GNU", SchemaDefs_OSTypeId_GNU},
++ {"GNU-Hurd", SchemaDefs_OSTypeId_GNUHurd},
++ {"GNU/Linux", SchemaDefs_OSTypeId_GNULinux},
++
+ };
+
+ /* These are the 64-Bit ones. They are sorted by priority. */
+ static const osTypePattern g_osTypesPattern64[] =
+ {
+- {"Windows XP", SchemaDefs_OSTypeId_WindowsXP_64},
+- {"Windows 2003", SchemaDefs_OSTypeId_Windows2003_64},
+- {"Windows Vista", SchemaDefs_OSTypeId_WindowsVista_64},
+- {"Windows 2008", SchemaDefs_OSTypeId_Windows2008_64},
+- {"SUSE", SchemaDefs_OSTypeId_OpenSUSE_64},
+- {"Novell", SchemaDefs_OSTypeId_OpenSUSE_64},
+- {"Red Hat", SchemaDefs_OSTypeId_RedHat_64},
+- {"Mandriva", SchemaDefs_OSTypeId_Mandriva_64},
+- {"Ubuntu", SchemaDefs_OSTypeId_Ubuntu_64},
+- {"Debian", SchemaDefs_OSTypeId_Debian_64},
+- {"Linux 2.4", SchemaDefs_OSTypeId_Linux24_64},
+- {"Linux 2.6", SchemaDefs_OSTypeId_Linux26_64},
+- {"Linux", SchemaDefs_OSTypeId_Linux26_64},
+- {"OpenSolaris", SchemaDefs_OSTypeId_OpenSolaris_64},
+- {"Solaris", SchemaDefs_OSTypeId_OpenSolaris_64},
+- {"FreeBSD", SchemaDefs_OSTypeId_FreeBSD_64},
++ {"Parabola GNU/Linux-libre", SchemaDefs_OSTypeId_Parabola_64},
++ {"gNewSense", SchemaDefs_OSTypeId_gNewSense_64},
++ {"Blag Linux and GNU", SchemaDefs_OSTypeId_Blag_64},
++ {"Dragora", SchemaDefs_OSTypeId_Dragora_64},
++ {"Ututo XS", SchemaDefs_OSTypeId_Ututo_64},
++ {"Musix", SchemaDefs_OSTypeId_Musix_64},
++ {"Trisquel", SchemaDefs_OSTypeId_Trisquel_64},
++ {"GNU", SchemaDefs_OSTypeId_GNU_64},
++ {"GNU/Linux", SchemaDefs_OSTypeId_GNULinux_64},
+ };
+
+ /**
+--- VirtualBox-4.1.18.orig/src/VBox/Main/include/ovfreader.h 2012-06-20 10:17:34.000000000 -0300
++++ VirtualBox-4.1.18/src/VBox/Main/include/ovfreader.h 2012-07-26 03:51:21.807619186 -0300
+@@ -34,119 +34,24 @@
+
+ enum CIMOSType_T
+ {
+- CIMOSType_CIMOS_Unknown = 0,
+- CIMOSType_CIMOS_Other = 1,
+- CIMOSType_CIMOS_MACOS = 2,
+- CIMOSType_CIMOS_ATTUNIX = 3,
+- CIMOSType_CIMOS_DGUX = 4,
+- CIMOSType_CIMOS_DECNT = 5,
+- CIMOSType_CIMOS_Tru64UNIX = 6,
+- CIMOSType_CIMOS_OpenVMS = 7,
+- CIMOSType_CIMOS_HPUX = 8,
+- CIMOSType_CIMOS_AIX = 9,
+- CIMOSType_CIMOS_MVS = 10,
+- CIMOSType_CIMOS_OS400 = 11,
+- CIMOSType_CIMOS_OS2 = 12,
+- CIMOSType_CIMOS_JavaVM = 13,
+- CIMOSType_CIMOS_MSDOS = 14,
+- CIMOSType_CIMOS_WIN3x = 15,
+- CIMOSType_CIMOS_WIN95 = 16,
+- CIMOSType_CIMOS_WIN98 = 17,
+- CIMOSType_CIMOS_WINNT = 18,
+- CIMOSType_CIMOS_WINCE = 19,
+- CIMOSType_CIMOS_NCR3000 = 20,
+- CIMOSType_CIMOS_NetWare = 21,
+- CIMOSType_CIMOS_OSF = 22,
+- CIMOSType_CIMOS_DCOS = 23,
+- CIMOSType_CIMOS_ReliantUNIX = 24,
+- CIMOSType_CIMOS_SCOUnixWare = 25,
+- CIMOSType_CIMOS_SCOOpenServer = 26,
+- CIMOSType_CIMOS_Sequent = 27,
+- CIMOSType_CIMOS_IRIX = 28,
+- CIMOSType_CIMOS_Solaris = 29,
+- CIMOSType_CIMOS_SunOS = 30,
+- CIMOSType_CIMOS_U6000 = 31,
+- CIMOSType_CIMOS_ASERIES = 32,
+- CIMOSType_CIMOS_HPNonStopOS = 33,
+- CIMOSType_CIMOS_HPNonStopOSS = 34,
+- CIMOSType_CIMOS_BS2000 = 35,
+- CIMOSType_CIMOS_LINUX = 36,
+- CIMOSType_CIMOS_Lynx = 37,
+- CIMOSType_CIMOS_XENIX = 38,
+- CIMOSType_CIMOS_VM = 39,
+- CIMOSType_CIMOS_InteractiveUNIX = 40,
+- CIMOSType_CIMOS_BSDUNIX = 41,
+- CIMOSType_CIMOS_FreeBSD = 42,
+- CIMOSType_CIMOS_NetBSD = 43,
+- CIMOSType_CIMOS_GNUHurd = 44,
+- CIMOSType_CIMOS_OS9 = 45,
+- CIMOSType_CIMOS_MACHKernel = 46,
+- CIMOSType_CIMOS_Inferno = 47,
+- CIMOSType_CIMOS_QNX = 48,
+- CIMOSType_CIMOS_EPOC = 49,
+- CIMOSType_CIMOS_IxWorks = 50,
+- CIMOSType_CIMOS_VxWorks = 51,
+- CIMOSType_CIMOS_MiNT = 52,
+- CIMOSType_CIMOS_BeOS = 53,
+- CIMOSType_CIMOS_HPMPE = 54,
+- CIMOSType_CIMOS_NextStep = 55,
+- CIMOSType_CIMOS_PalmPilot = 56,
+- CIMOSType_CIMOS_Rhapsody = 57,
+- CIMOSType_CIMOS_Windows2000 = 58,
+- CIMOSType_CIMOS_Dedicated = 59,
+- CIMOSType_CIMOS_OS390 = 60,
+- CIMOSType_CIMOS_VSE = 61,
+- CIMOSType_CIMOS_TPF = 62,
+- CIMOSType_CIMOS_WindowsMe = 63,
+- CIMOSType_CIMOS_CalderaOpenUNIX = 64,
+- CIMOSType_CIMOS_OpenBSD = 65,
+- CIMOSType_CIMOS_NotApplicable = 66,
+- CIMOSType_CIMOS_WindowsXP = 67,
+- CIMOSType_CIMOS_zOS = 68,
+- CIMOSType_CIMOS_MicrosoftWindowsServer2003 = 69,
+- CIMOSType_CIMOS_MicrosoftWindowsServer2003_64 = 70,
+- CIMOSType_CIMOS_WindowsXP_64 = 71,
+- CIMOSType_CIMOS_WindowsXPEmbedded = 72,
+- CIMOSType_CIMOS_WindowsVista = 73,
+- CIMOSType_CIMOS_WindowsVista_64 = 74,
+- CIMOSType_CIMOS_WindowsEmbeddedforPointofService = 75,
+- CIMOSType_CIMOS_MicrosoftWindowsServer2008 = 76,
+- CIMOSType_CIMOS_MicrosoftWindowsServer2008_64 = 77,
+- CIMOSType_CIMOS_FreeBSD_64 = 78,
+- CIMOSType_CIMOS_RedHatEnterpriseLinux = 79,
+- CIMOSType_CIMOS_RedHatEnterpriseLinux_64 = 80,
+- CIMOSType_CIMOS_Solaris_64 = 81,
+- CIMOSType_CIMOS_SUSE = 82,
+- CIMOSType_CIMOS_SUSE_64 = 83,
+- CIMOSType_CIMOS_SLES = 84,
+- CIMOSType_CIMOS_SLES_64 = 85,
+- CIMOSType_CIMOS_NovellOES = 86,
+- CIMOSType_CIMOS_NovellLinuxDesktop = 87,
+- CIMOSType_CIMOS_SunJavaDesktopSystem = 88,
+- CIMOSType_CIMOS_Mandriva = 89,
+- CIMOSType_CIMOS_Mandriva_64 = 90,
+- CIMOSType_CIMOS_TurboLinux = 91,
+- CIMOSType_CIMOS_TurboLinux_64 = 92,
+- CIMOSType_CIMOS_Ubuntu = 93,
+- CIMOSType_CIMOS_Ubuntu_64 = 94,
+- CIMOSType_CIMOS_Debian = 95,
+- CIMOSType_CIMOS_Debian_64 = 96,
+- CIMOSType_CIMOS_Linux_2_4_x = 97,
+- CIMOSType_CIMOS_Linux_2_4_x_64 = 98,
+- CIMOSType_CIMOS_Linux_2_6_x = 99,
+- CIMOSType_CIMOS_Linux_2_6_x_64 = 100,
+- CIMOSType_CIMOS_Linux_64 = 101,
+- CIMOSType_CIMOS_Other_64 = 102,
+- // types added with CIM 2.25.0 follow:
+- CIMOSType_CIMOS_WindowsServer2008R2 = 103,
+- CIMOSType_CIMOS_VMwareESXi = 104,
+- CIMOSType_CIMOS_Windows7 = 105,
+- CIMOSType_CIMOS_CentOS = 106,
+- CIMOSType_CIMOS_CentOS_64 = 107,
+- CIMOSType_CIMOS_OracleEnterpriseLinux = 108,
+- CIMOSType_CIMOS_OracleEnterpriseLinux_64 = 109,
+- CIMOSType_CIMOS_eComStation = 110
+- // no new types added with CIM 2.26.0
++ CIMOSType_CIMOS_Unknown = 0,
++ CIMOSType_CIMOS_Other = 1,
++ CIMOSType_CIMOS_Other_64 = 2,
++ CIMOSType_CIMOS_gNewSense = 3,
++ CIMOSType_CIMOS_gNewSense_64 = 4,
++ CIMOSType_CIMOS_Dragora = 5,
++ CIMOSType_CIMOS_Dragora_64 = 6,
++ CIMOSType_CIMOS_Musix = 7,
++ CIMOSType_CIMOS_Musix_64 = 8,
++ CIMOSType_CIMOS_Trisquel = 9,
++ CIMOSType_CIMOS_Trisquel_64 = 10,
++ CIMOSType_CIMOS_Dynebolic = 11,
++ CIMOSType_CIMOS_Venenux = 12,
++ CIMOSType_CIMOS_GNU = 13,
++ CIMOSType_CIMOS_GNU_64 = 14,
++ CIMOSType_CIMOS_GNUHurd = 15,
++ CIMOSType_CIMOS_GNULinux = 16,
++ CIMOSType_CIMOS_GNULinux_64 = 17
+ };
+
+
+--- VirtualBox-4.1.18.orig/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c 2012-06-20 10:09:01.000000000 -0300
++++ VirtualBox-4.1.18/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c 2012-07-26 15:32:55.309812685 -0300
+@@ -622,16 +622,16 @@
+ * Call the common device extension initializer.
+ */
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) && defined(RT_ARCH_X86)
+- VBOXOSTYPE enmOSType = VBOXOSTYPE_Linux26;
++ VBOXOSTYPE enmOSType = VBOXOSTYPE_GNULinux;
+ #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) && defined(RT_ARCH_AMD64)
+- VBOXOSTYPE enmOSType = VBOXOSTYPE_Linux26_x64;
++ VBOXOSTYPE enmOSType = VBOXOSTYPE_GNULinux_x64;
+ #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0) && defined(RT_ARCH_X86)
+- VBOXOSTYPE enmOSType = VBOXOSTYPE_Linux24;
++ VBOXOSTYPE enmOSType = VBOXOSTYPE_GNULinux;
+ #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0) && defined(RT_ARCH_AMD64)
+- VBOXOSTYPE enmOSType = VBOXOSTYPE_Linux24_x64;
++ VBOXOSTYPE enmOSType = VBOXOSTYPE_GNULinux_x64;
+ #else
+ # warning "huh? which arch + version is this?"
+- VBOXOSTYPE enmOsType = VBOXOSTYPE_Linux;
++ VBOXOSTYPE enmOsType = VBOXOSTYPE_GNULinux;
+ #endif
+ rc = VBoxGuestInitDevExt(&g_DevExt,
+ g_IOPortBase,
diff --git a/libre/virtualbox-libre-modules/libre.patch b/libre/virtualbox-libre-modules/libre.patch
new file mode 100644
index 000000000..e51d0c0a7
--- /dev/null
+++ b/libre/virtualbox-libre-modules/libre.patch
@@ -0,0 +1,5765 @@
+--- VirtualBox-4.1.18.orig/Config.kmk 2012-07-24 16:38:43.981310996 -0300
++++ VirtualBox-4.1.18/Config.kmk 2012-07-24 16:38:44.001309865 -0300
+@@ -56,9 +56,6 @@
+ PROPS_SYSMODS_ACCUMULATE_L += INTERMEDIATES
+ PROPS_MISCBINS_ACCUMULATE_L += INTERMEDIATES
+
+-# Misc names used bye the install paths below.
+-VBOX_PUEL_MANGLED_NAME := Oracle_VM_VirtualBox_Extension_Pack
+-
+ # Install paths
+ ## @todo This will change after 4.1 is branched off!
+ # What is now 'bin' and 'lib' will be moved down under 'staged/', except on
+@@ -125,9 +122,6 @@
+ endif
+
+ INST_DOC = doc/
+-INST_EXTPACK = $(INST_BIN)ExtensionPacks/
+-INST_EXTPACK_CERTS = $(INST_BIN)ExtPackCertificates/
+-INST_EXTPACK_PUEL = $(INST_EXTPACK)$(VBOX_PUEL_MANGLED_NAME)/
+ INST_PACKAGES = packages/
+
+ VBOX_PATH_SDK = $(patsubst %/,%,$(PATH_STAGE)/$(INST_SDK))
+@@ -136,7 +130,6 @@
+ VBOX_PATH_ADDITIONS = $(patsubst %/,%,$(PATH_STAGE)/$(INST_ADDITIONS))
+ VBOX_PATH_ADDITIONS_ISO = $(patsubst %/,%,$(PATH_STAGE)/$(INST_ADDITIONS_ISO))
+ VBOX_PATH_ADDITIONS_LIB = $(patsubst %/,%,$(PATH_STAGE)/$(INST_ADDITIONS_LIB))
+-VBOX_PATH_EXTPACK_PUEL= $(patsubst %/,%,$(PATH_STAGE)/$(INST_EXTPACK_PUEL))
+ VBOX_PATH_PACKAGES = $(patsubst %/,%,$(PATH_STAGE)/$(INST_PACKAGES))
+
+
+@@ -208,7 +201,6 @@
+ export VBOX_ADDITIONS_SH_MODE = release
+ export VBOX_DOCUMENTATION_SH_MODE = release
+ export VBOX_EFI_SH_MODE = release
+- export VBOX_EXTPACKS_SH_MODE = release
+ endif
+
+ # Some info on the vendor
+@@ -361,8 +353,6 @@
+ VBOX_WITH_USB = 1
+ # Enable the USB 1.1 controller plus virtual USB HID devices.
+ VBOX_WITH_VUSB = 1
+-# Enable the USB 2.0 controller.
+-VBOX_WITH_EHCI = 1
+ # Enable the ISCSI feature.
+ VBOX_WITH_ISCSI = 1
+ # Enable INIP support in the ISCSI feature.
+@@ -430,9 +420,6 @@
+ ifdef VBOX_WITH_USB
+ VBOX_WITH_VUSB = 1
+ endif
+-ifdef VBOX_WITH_EHCI
+- VBOX_WITH_EHCI_IMPL = 1
+-endif
+ ifdef VBOX_WITH_PCI_PASSTHROUGH
+ VBOX_WITH_PCI_PASSTHROUGH_IMPL = 1
+ endif
+@@ -591,15 +578,6 @@
+ ## @}
+
+
+-## @name Extension pack
+-## @{
+-# Enables the extension pack feature.
+-VBOX_WITH_EXTPACK = 1
+-# Enables separating code into the Oracle VM VirtualBox Extension Pack, dubbed PUEL.
+-VBOX_WITH_EXTPACK_PUEL = 1
+-# Enables building+packing the Oracle VM VirtualBox Extension Pack, includes VBOX_WITH_EXTPACK_PUEL
+-VBOX_WITH_EXTPACK_PUEL_BUILD = 1
+-## @}
+
+ ## @name Misc
+ ## @{
+@@ -777,14 +755,6 @@
+ # Skip stuff.
+ #
+
+-ifdef VBOX_ONLY_EXTPACKS
+- # Clear some VBOX_WITH_XXX variables instead of adding ifdefs all over the place.
+- VBOX_WITH_DEBUGGER =
+- VBOX_WITH_ADDITIONS =
+- VBOX_WITH_VBOXDRV =
+- VBOX_WITH_TESTCASES =
+-endif
+-
+ # VBOX_QUICK can be used by core developers to speed to the build
+ ifdef VBOX_QUICK
+ # undefine variables by assigning blank.
+@@ -848,7 +818,6 @@
+ VBOX_WITH_TESTSUITE=
+ VBOX_WITH_QTGUI=
+ VBOX_WITH_USB=
+- VBOX_WITH_EHCI=
+ VBOX_WITH_DOCS=
+ VBOX_WITH_PDM_ASYNC_COMPLETION=
+ VBOX_WITH_KCHMVIEWER=
+@@ -870,7 +839,6 @@
+ VBOX_WITH_CROGL=
+ VBOX_WITH_DEBUGGER=
+ VBOX_WITH_DOCS=
+- VBOX_WITH_EHCI=
+ VBOX_WITH_HARDENING=
+ VBOX_WITH_HEADLESS=
+ VBOX_WITH_HGCM=
+@@ -952,9 +920,6 @@
+ #
+ ifdef VBOX_OSE
+ VBOX_WITH_VRDP=
+- VBOX_WITH_EHCI_IMPL=
+- VBOX_WITH_EXTPACK_PUEL=
+- VBOX_WITH_EXTPACK_PUEL_BUILD=
+ VBOX_WITH_PCI_PASSTHROUGH_IMPL=
+ VBOX_WITH_OS2_ADDITIONS_BIN=
+ VBOX_WITH_SECURELABEL=
+@@ -1082,10 +1047,6 @@
+ VBOX_WITH_KCHMVIEWER=
+ endif
+
+-ifdef VBOX_WITH_EXTPACK_PUEL_BUILD
+- VBOX_WITH_EXTPACK_PUEL = 1
+-endif
+-
+ #
+ # Mark OSE builds clearly, helps figuring out limitations more easily.
+ #
+@@ -1679,9 +1640,6 @@
+ # biossums (set BIOS checksums)
+ VBOX_BIOSSUMS ?= $(PATH_OBJ)/biossums/biossums$(HOSTSUFF_EXE)
+
+-# RTManifest (extension pack manifest utility)
+-VBOX_RTMANIFEST ?= $(PATH_OBJ)/bldRTManifest/bldRTManifest$(HOSTSUFF_EXE)
+-
+ # filesplitter (splits java files)
+ VBOX_FILESPLIT ?= $(PATH_OBJ)/filesplitter/filesplitter$(HOSTSUFF_EXE)
+
+@@ -2461,13 +2419,6 @@
+ SDK_VBOX_OPENSSL2_LIBS = $(NO_SUCH_VARIABLE)
+ endif
+
+-SDK_VBoxOpenSslExtPack = Internal use only.
+-SDK_VBoxOpenSslExtPack_INCS = $(SDK_VBOX_OPENSSL_VBOX_DEFAULT_INCS)
+-SDK_VBoxOpenSslExtPack_ORDERDEPS = $(crypto-headers_1_TARGET)
+-SDK_VBoxOpenSslExtPack_LIBS = \
+- $(PATH_STAGE_LIB)/VBoxExtPack-libssl$(VBOX_SUFF_LIB) \
+- $(PATH_STAGE_LIB)/VBoxExtPack-libcrypto$(VBOX_SUFF_LIB)
+-
+ SDK_VBOX_BLD_OPENSSL = .
+ SDK_VBOX_BLD_OPENSSL_EXTENDS = VBOX_OPENSSL
+ SDK_VBOX_BLD_OPENSSL_LIBS ?= \
+@@ -3817,100 +3768,6 @@
+ endif
+ TEMPLATE_VBOXMAINCLIENTDLL_LDFLAGS.darwin = $(filter-out -bind_at_load,$(TEMPLATE_VBOXMAINCLIENTEXE_LDFLAGS.darwin))
+
+-
+-
+-#
+-# Templates used for building the extension packs.
+-#
+-ifdef VBOX_WITH_EXTPACK
+- # Base templates (native or portable).
+- TEMPLATE_VBoxR3ExtPack = For the ring-3 context extension pack modules.
+- if 1 # Native for now.
+- TEMPLATE_VBoxR3ExtPack_EXTENDS = VBOXR3DLLNOXCPT
+- TEMPLATE_VBoxR3ExtPack_DEFS = $(TEMPLATE_VBOXR3DLLNOXCPT_DEFS) VBOX_IN_EXTPACK VBOX_IN_EXTPACK_R3
+- else
+- TEMPLATE_VBoxR3ExtPack_EXTENDS = VBOXNOCRTGCC
+- TEMPLATE_VBoxR3ExtPack_DEFS = $(TEMPLATE_VBOXNOCRTGCC_DEFS) VBOX_IN_EXTPACK VBOX_IN_EXTPACK_R3 IPRT_NO_CRT IN_RING3
+- TEMPLATE_VBoxR3ExtPack_INCS = $(PATH_ROOT)/include/iprt/nocrt $(TEMPLATE_VBOXR3DLLNOXCPT_INCS)
+- endif
+- ifneq ($(KBUILD_TARGET),win)
+- TEMPLATE_VBoxR3ExtPack_CXXFLAGS = $(TEMPLATE_VBOXR3DLLNOXCPT_CXXFLAGS) -fno-rtti
+- endif
+- TEMPLATE_VBoxR3ExtPack_INST = $(INST_EXTPACK)YouShallOverrideThis/
+- ifeq ($(KBUILD_TARGET),linux)
+- TEMPLATE_VBoxR3ExtPack_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RUNPATH)' '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)', $(TEMPLATE_VBOXR3DLLNOXCPT_LDFLAGS))
+- else
+- if !defined(VBOX_WITH_RUNPATH) && defined(VBOX_WITH_RELATIVE_RUNPATH)
+- TEMPLATE_VBoxR3ExtPack_LDFLAGS = '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)/../../..' $(filter-out '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)', $(TEMPLATE_VBOXR3DLLNOXCPT_LDFLAGS))
+- endif
+- endif
+- ifdef VBOX_ONLY_EXTPACKS_USE_IMPLIBS
+- if1of ($(KBUILD_TARGET), win os2)
+- TEMPLATE_VBoxR3ExtPack_LIBS = \
+- $(TEMPLATE_LIBS_VBOXR3) \
+- $(PATH_STAGE_LIB)/VMMR3Imp$(VBOX_SUFF_LIB) \
+- $(PATH_STAGE_LIB)/VBoxRTImp$(VBOX_SUFF_LIB)
+- else
+- TEMPLATE_VBoxR3ExtPack_LIBS = \
+- $(TEMPLATE_LIBS_VBOXR3) \
+- $(PATH_STAGE_LIB)/VMMR3Imp$(VBOX_SUFF_DLL) \
+- $(PATH_STAGE_LIB)/VBoxRTImp$(VBOX_SUFF_DLL)
+- endif
+- else
+- TEMPLATE_VBoxR3ExtPack_LIBS = \
+- $(TEMPLATE_LIBS_VBOXR3) \
+- $(LIB_RUNTIME) \
+- $(LIB_VMM)
+- endif
+-
+- TEMPLATE_VBoxR0ExtPack = For the ring-0 context extension pack modules.
+- TEMPLATE_VBoxR0ExtPack_EXTENDS = VBoxR0
+- TEMPLATE_VBoxR0ExtPack_EXTENDS_BY = appending
+- TEMPLATE_VBoxR0ExtPack_INST = $(INST_EXTPACK)YouShallOverrideThis/
+- TEMPLATE_VBoxR0ExtPack_DEFS = VBOX_IN_EXTPACK VBOX_IN_EXTPACK_R0
+- if1of ($(VBOX_LDR_FMT), pe lx)
+- TEMPLATE_VBoxR0ExtPack_LIBS = \
+- $(PATH_STAGE_LIB)/VMMR0Imp$(VBOX_SUFF_LIB) \
+- $(PATH_STAGE_LIB)/SUPR0$(VBOX_SUFF_LIB)
+- endif
+-
+- TEMPLATE_VBoxRcExtPack = For the raw-mode context extension pack modules.
+- TEMPLATE_VBoxRcExtPack_EXTENDS = VBoxRc
+- TEMPLATE_VBoxRcExtPack_EXTENDS_BY = appending
+- TEMPLATE_VBoxRcExtPack_SYSSUFF = .rc
+- TEMPLATE_VBoxRcExtPack_INST = $(INST_EXTPACK)YouShallOverrideThis/
+- TEMPLATE_VBoxRcExtPack_DEFS = VBOX_IN_EXTPACK VBOX_IN_EXTPACK_RC
+- if1of ($(VBOX_LDR_FMT32), pe lx)
+- TEMPLATE_VBoxRcExtPack_LIBS = \
+- $(PATH_STAGE_LIB)/VMMRCBuiltin$(VBOX_SUFF_LIB) \
+- $(PATH_STAGE_LIB)/VMMRCImp$(VBOX_SUFF_LIB)
+- endif
+-
+- TEMPLATE_VBoxInsExtPack = For the install targets of an extension pack.
+- TEMPLATE_VBoxInsExtPack_MODE = 0644
+- TEMPLATE_VBoxInsExtPack_INST = $(INST_EXTPACK)YouShallOverrideThis/
+-
+- # For each individual extension pack
+- ifdef VBOX_WITH_EXTPACK_PUEL
+- TEMPLATE_VBoxR3ExtPackPuel = For the ring-3 context modules in the PUEL extension pack.
+- TEMPLATE_VBoxR3ExtPackPuel_EXTENDS = VBoxR3ExtPack
+- TEMPLATE_VBoxR3ExtPackPuel_INST = $(INST_EXTPACK_PUEL)$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)/
+-
+- TEMPLATE_VBoxR0ExtPackPuel = For the ring-0 context modules in the PUEL extension pack.
+- TEMPLATE_VBoxR0ExtPackPuel_EXTENDS = VBoxR0ExtPack
+- TEMPLATE_VBoxR0ExtPackPuel_INST = $(INST_EXTPACK_PUEL)$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)/
+-
+- TEMPLATE_VBoxRcExtPackPuel = For the raw-mode context modules in the PUEL extension pack.
+- TEMPLATE_VBoxRcExtPackPuel_EXTENDS = VBoxRcExtPack
+- TEMPLATE_VBoxRcExtPackPuel_INST = $(INST_EXTPACK_PUEL)$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)/
+-
+- TEMPLATE_VBoxInsExtPackPuel = For the install targets of an extension pack.
+- TEMPLATE_VBoxInsExtPackPuel_EXTENDS = VBoxR0ExtPack
+- TEMPLATE_VBoxInsExtPackPuel_INST = $(INST_EXTPACK_PUEL)
+-endif
+-endif # VBOX_WITH_EXTPACK
+-
+-
+ #
+ # Qt 4
+ # Qt 4
+--- VirtualBox-4.1.18.orig/Makefile.kmk 2012-07-24 17:16:47.078929150 -0300
++++ VirtualBox-4.1.18/Makefile.kmk 2012-07-24 17:16:47.125592981 -0300
+@@ -446,7 +446,6 @@
+ include/VBox \
+ include/VBox/vmm \
+ include/VBox/com \
+- include/VBox/ExtPack \
+ include/VBox/HostServices \
+ include/VBox/GuestHost \
+ include/VBox/HGSMI \
+@@ -862,191 +861,6 @@
+ additions-build-linux.x86.combined \
+ additions-packing
+
+-
+-#
+-# Build the extension packs, all of them.
+-#
+-# This is tailored (hardcoded) for the extension pack build box.
+-#
+-# The fetching must be done in serial fashion, while the building should be
+-# more flexible wrt to -jN.
+-#
+-extpacks-fetch:
+- + $(KMK) -C tools fetch VBOX_ONLY_EXTPACKS=1
+- + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=amd64 KBUILD_TARGET=darwin BUILD_TARGET_ARCH=amd64 BUILD_TARGET=darwin VBOX_ONLY_EXTPACKS=1
+- + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=darwin BUILD_TARGET_ARCH=x86 BUILD_TARGET=darwin VBOX_ONLY_EXTPACKS=1
+-# + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=amd64 KBUILD_TARGET=freebsd BUILD_TARGET_ARCH=amd64 BUILD_TARGET=freebsd VBOX_ONLY_EXTPACKS=1
+-# + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=freebsd BUILD_TARGET_ARCH=x86 BUILD_TARGET=freebsd VBOX_ONLY_EXTPACKS=1
+- + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=amd64 KBUILD_TARGET=linux BUILD_TARGET_ARCH=amd64 BUILD_TARGET=linux VBOX_ONLY_EXTPACKS=1
+- + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=linux BUILD_TARGET_ARCH=x86 BUILD_TARGET=linux VBOX_ONLY_EXTPACKS=1
+-# + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=os2 BUILD_TARGET_ARCH=x86 BUILD_TARGET=os2 VBOX_ONLY_EXTPACKS=1
+- + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=amd64 KBUILD_TARGET=solaris BUILD_TARGET_ARCH=amd64 BUILD_TARGET=solaris VBOX_ONLY_EXTPACKS=1
+- + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=solaris BUILD_TARGET_ARCH=x86 BUILD_TARGET=solaris VBOX_ONLY_EXTPACKS=1
+- + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=amd64 KBUILD_TARGET=win BUILD_TARGET_ARCH=amd64 BUILD_TARGET=win VBOX_ONLY_EXTPACKS=1
+- + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=win BUILD_TARGET_ARCH=x86 BUILD_TARGET=win VBOX_ONLY_EXTPACKS=1
+-
+-
+-extpacks-build: \
+- extpacks-build-win.amd64 \
+- extpacks-build-win.x86 \
+- extpacks-build-solaris.amd64 \
+- extpacks-build-solaris.x86 \
+- extpacks-build-os2.x86 \
+- extpacks-build-linux.amd64 \
+- extpacks-build-linux.x86 \
+- extpacks-build-darwin.amd64 \
+- extpacks-build-darwin.x86 \
+- extpacks-build-freebsd.amd64 \
+- extpacks-build-freebsd.x86
+-
+-VBOX_EXTPACKS_BUILD.amd64 = VBOX_ONLY_EXTPACKS=1 \
+- KBUILD_TYPE=$(KBUILD_TYPE) BUILD_TYPE=$(KBUILD_TYPE) \
+- KBUILD_TARGET_ARCH=amd64 BUILD_TARGET_ARCH=amd64 \
+- VBOX_SVN_REV=$(VBOX_SVN_REV)
+-
+-VBOX_EXTPACKS_BUILD.x86 = VBOX_ONLY_EXTPACKS=1 \
+- KBUILD_TYPE=$(KBUILD_TYPE) BUILD_TYPE=$(KBUILD_TYPE) \
+- KBUILD_TARGET_ARCH=x86 BUILD_TARGET_ARCH=x86 \
+- VBOX_SVN_REV=$(VBOX_SVN_REV)
+-
+-# Automatically determine the extpack build subdir name. Used for figuring out
+-# directory names inside the extension pack building VMs.
+-VBOX_EXTPACKS_BUILD_SUBDIRNAME := $(lastword $(subst /, ,$(PATH_ROOT)))
+-
+-# When building in parallel on a Windows host, make sure we finish the host
+-# bit before kicking off any UNIX guest or we'll run into file sharing issues.
+-ifeq ($(KBUILD_TARGET),win)
+-VBOX_EXTPACKS_BUILD_WIN_HOST_FIRST = extpacks-build-win.x86 extpacks-build-win.amd64
+-else
+-VBOX_EXTPACKS_BUILD_WIN_HOST_FIRST =
+-endif
+-
+-extpacks-build-win.amd64:
+-ifeq ($(KBUILD_TARGET),win)
+- + $(VBOX_KMK_TIME) $(KMK) $(VBOX_EXTPACKS_BUILD.amd64) all $(VBOX_EXTPACKS_HOST_BUILD_TWEAK)
+-else
+- $(call MSG_L1,Building Windows/amd64 extension packs)
+- $(VBOX_KMK_TIME) ssh vbox@192.168.27.6 " echo $@ && cd e:/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME) && tools/env.sh kmk $(VBOX_EXTPACKS_BUILD.amd64) all"
+-endif
+-
+-extpacks-build-win.x86:
+-ifeq ($(KBUILD_TARGET),win)
+- + $(VBOX_KMK_TIME) $(KMK) $(VBOX_EXTPACKS_BUILD.x86) all $(VBOX_EXTPACKS_HOST_BUILD_TWEAK)
+-else
+- $(call MSG_L1,Building Windows/x86 extension packs)
+- $(VBOX_KMK_TIME) ssh vbox@192.168.27.16 " echo $@ && cd e:/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME) && tools/env.sh kmk $(VBOX_EXTPACKS_BUILD.x86) all"
+-endif
+-
+-ifeq ($(KBUILD_TARGET),solaris)
+-extpacks-build-solaris.amd64:
+- + $(VBOX_KMK_TIME) $(KMK) $(VBOX_EXTPACKS_BUILD.amd64) all $(VBOX_EXTPACKS_HOST_BUILD_TWEAK)
+-
+-extpacks-build-solaris.x86: extpacks-build-solaris.amd64
+- + $(VBOX_KMK_TIME) $(KMK) $(VBOX_EXTPACKS_BUILD.x86) VBOX_WITH_COMBINED_SOLARIS_GUEST_PACKAGE=1 all $(VBOX_EXTPACKS_HOST_BUILD_TWEAK)
+-
+-else
+-# Serialize 32-bit and 64-bit ASSUMING the same VM builds both.
+-extpacks-build-solaris.rsync-into-vm: $(VBOX_EXTPACKS_BUILD_WIN_HOST_FIRST)
+- $(VBOX_KMK_TIME) $(call VBOX_RSYNC_IN_FN,solaris,*) . 192.168.27.4:/mnt/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME)
+-
+-extpacks-build-solaris.build-it: extpacks-build-solaris.rsync-into-vm
+- $(call MSG_L1,Building Solaris/amd64 extension packs)
+- $(VBOX_KMK_TIME) ssh vbox@192.168.27.4 " echo $@/amd64 && cd /mnt/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_EXTPACKS_BUILD.amd64) all"
+- $(call MSG_L1,Building Solaris/x86 extension packs)
+- $(VBOX_KMK_TIME) ssh vbox@192.168.27.4 " echo $@/x86 && cd /mnt/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_EXTPACKS_BUILD.x86) all"
+-
+-extpacks-build-solaris.rsync-out-of-vm: extpacks-build-solaris.build-it
+- $(VBOX_KMK_TIME) rsync -a --delete 192.168.27.4:/mnt/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME)/out/solaris.x86 out/
+- $(VBOX_KMK_TIME) rsync -a --delete 192.168.27.4:/mnt/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME)/out/solaris.amd64 out/
+-
+-.NOTPARALLEL: extpacks-build-solaris.rsync-out-of-vm extpacks-build-solaris.rsync-into-vm
+-.PHONY: extpacks-build-solaris.rsync-out-of-vm extpacks-build-solaris.rsync-into-vm extpacks-build-solaris.build-it
+-
+-extpacks-build-solaris.amd64: extpacks-build-solaris.rsync-out-of-vm
+-extpacks-build-solaris.x86: extpacks-build-solaris.rsync-out-of-vm
+-endif
+-
+-extpacks-build-os2.x86:
+-#ifeq ($(KBUILD_TARGET),os2)
+-# + $(VBOX_KMK_TIME) $(KMK) $(VBOX_EXTPACKS_BUILD.x86) all $(VBOX_EXTPACKS_HOST_BUILD_TWEAK)
+-#else
+-# $(VBOX_KMK_TIME) ssh vbox@192.168.27.3 " cd /mnt/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_EXTPACKS_BUILD.x86) "
+-#endif
+-
+-extpacks-build-linux.amd64: $(VBOX_EXTPACKS_BUILD_WIN_HOST_FIRST)
+-ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),linux.amd64)
+- + $(VBOX_KMK_TIME) $(KMK) $(VBOX_EXTPACKS_BUILD.amd64) all $(VBOX_EXTPACKS_HOST_BUILD_TWEAK)
+-else
+- $(call MSG_L1,Building Linux/amd64 extension packs)
+- $(VBOX_KMK_TIME) ssh vbox@192.168.27.12 " echo $@ && cd /mnt/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_EXTPACKS_BUILD.amd64) all"
+-endif
+-
+-extpacks-build-linux.x86: $(VBOX_EXTPACKS_BUILD_WIN_HOST_FIRST)
+-ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),linux.x86)
+- + $(VBOX_KMK_TIME) $(KMK) $(VBOX_EXTPACKS_BUILD.x86) all $(VBOX_EXTPACKS_HOST_BUILD_TWEAK)
+-else
+- $(call MSG_L1,Building Linux/x86 extension packs)
+- $(VBOX_KMK_TIME) ssh vbox@192.168.27.11 " echo $@ && cd /mnt/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_EXTPACKS_BUILD.x86) all"
+-endif
+-
+-extpacks-build-freebsd.amd64: $(VBOX_EXTPACKS_BUILD_WIN_HOST_FIRST)
+-#ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),freebsd.amd64)
+-# + $(VBOX_KMK_TIME) $(KMK) $(VBOX_EXTPACKS_BUILD.amd64) all $(VBOX_EXTPACKS_HOST_BUILD_TWEAK)
+-#else
+-# $(call MSG_L1,Building FreeBSD/amd64 extension packs)
+-# $(VBOX_KMK_TIME) ssh vbox@192.168.27.17 " echo $@ && cd /mnt/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_EXTPACKS_BUILD.amd64) all"
+-#endif
+-
+-extpacks-build-freebsd.x86: $(VBOX_EXTPACKS_BUILD_WIN_HOST_FIRST)
+-#ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),freebsd.x86)
+-# + $(VBOX_KMK_TIME) $(KMK) $(VBOX_EXTPACKS_BUILD.x86) all $(VBOX_EXTPACKS_HOST_BUILD_TWEAK)
+-#else
+-# $(call MSG_L1,Building FreeBSD/x86 extension packs)
+-# $(VBOX_KMK_TIME) ssh vbox@192.168.27.7 " echo $@ && cd /mnt/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_EXTPACKS_BUILD.x86) all"
+-#endif
+-
+-extpacks-build-darwin.amd64: $(VBOX_EXTPACKS_BUILD_WIN_HOST_FIRST)
+-ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),darwin.amd64)
+- + $(VBOX_KMK_TIME) $(KMK) $(VBOX_EXTPACKS_BUILD.amd64) all $(VBOX_EXTPACKS_HOST_BUILD_TWEAK)
+-else
+- $(call MSG_L1,Building Darwin/amd64 extension packs)
+- $(VBOX_KMK_TIME) $(call VBOX_RSYNC_IN_FN,darwin,amd64) . 192.168.27.15:/Users/vbox/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME)
+- $(VBOX_KMK_TIME) ssh vbox@192.168.27.15 " echo $@ && cd /Users/vbox/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_EXTPACKS_BUILD.amd64) all"
+- $(VBOX_KMK_TIME) rsync -am -v --delete 192.168.27.15:/Users/vbox/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME)/out/darwin.amd64 out/
+-endif
+-
+-extpacks-build-darwin.x86: $(VBOX_EXTPACKS_BUILD_WIN_HOST_FIRST)
+-ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),darwin.x86)
+- + $(VBOX_KMK_TIME) $(KMK) $(VBOX_EXTPACKS_BUILD.x86) all $(VBOX_EXTPACKS_HOST_BUILD_TWEAK)
+-else
+- $(call MSG_L1,Building Darwin/x86 extension packs)
+- $(VBOX_KMK_TIME) $(call VBOX_RSYNC_IN_FN,darwin,x86) . 192.168.27.5:/Users/vbox/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME)
+- $(VBOX_KMK_TIME) ssh vbox@192.168.27.5 " echo $@ && cd /Users/vbox/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_EXTPACKS_BUILD.x86) all"
+- $(VBOX_KMK_TIME) rsync -am -v --delete 192.168.27.5:/Users/vbox/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME)/out/darwin.x86 out/
+-endif
+-
+-
+-extpacks-packing:
+- + $(KMK) VBOX_ONLY_EXTPACKS=1 \
+- VBOX_WITH_EXTPACK_OS_ARCHS="darwin.amd64 darwin.x86 linux.amd64 linux.x86 solaris.amd64 solaris.x86 win.amd64 win.x86" \
+- packing
+-# +++ freebsd.amd64 freebsd.x86 os2.x86 ^^^
+-
+-.PHONY: \
+- extpacks-build-win.x86 \
+- extpacks-build-win.amd64 \
+- extpacks-build-solaris.amd64 \
+- extpacks-build-solaris.x86 \
+- extpacks-build-os2.x86 \
+- extpacks-build-linux.amd64 \
+- extpacks-build-linux.x86 \
+- extpacks-build-freebsd.amd64 \
+- extpacks-build-freebsd.x86 \
+- extpacks-build-darwin.amd64 \
+- extpacks-build-darwin.x86 \
+- extpacks-packing
+-
+-
+ #
+ # Build the test suite, all of it.
+ #
+--- VirtualBox-4.1.18.orig/src/VBox/Devices/build/VBoxDD.cpp 2012-06-20 10:15:51.000000000 -0300
++++ VirtualBox-4.1.18/src/VBox/Devices/build/VBoxDD.cpp 2012-07-24 16:18:03.964493454 -0300
+@@ -132,11 +132,6 @@
+ if (RT_FAILURE(rc))
+ return rc;
+ #endif
+-#ifdef VBOX_WITH_EHCI_IMPL
+- rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceEHCI);
+- if (RT_FAILURE(rc))
+- return rc;
+-#endif
+ #ifdef VBOX_ACPI
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceACPI);
+ if (RT_FAILURE(rc))
+--- VirtualBox-4.1.18.orig/src/VBox/Devices/build/VBoxDD.h 2012-06-20 10:15:51.000000000 -0300
++++ VirtualBox-4.1.18/src/VBox/Devices/build/VBoxDD.h 2012-07-24 16:20:35.939205389 -0300
+@@ -62,7 +62,6 @@
+ extern const PDMDEVREG g_DeviceICH6_HDA;
+ extern const PDMDEVREG g_DeviceAudioSniffer;
+ extern const PDMDEVREG g_DeviceOHCI;
+-extern const PDMDEVREG g_DeviceEHCI;
+ extern const PDMDEVREG g_DeviceACPI;
+ extern const PDMDEVREG g_DeviceDMA;
+ extern const PDMDEVREG g_DeviceFloppyController;
+--- VirtualBox-4.1.18.orig/src/VBox/Main/include/ExtPackManagerImpl.h 2012-06-20 10:17:33.000000000 -0300
++++ /dev/null 2012-07-24 14:48:18.638572110 -0300
+@@ -1,245 +0,0 @@
+-/* $Id: ExtPackManagerImpl.h $ */
+-/** @file
+- * VirtualBox Main - interface for Extension Packs, VBoxSVC & VBoxC.
+- */
+-
+-/*
+- * Copyright (C) 2010 Oracle Corporation
+- *
+- * This file is part of VirtualBox Open Source Edition (OSE), as
+- * available from http://www.virtualbox.org. This file is free software;
+- * you can redistribute it and/or modify it under the terms of the GNU
+- * General Public License (GPL) as published by the Free Software
+- * Foundation, in version 2 as it comes in the "COPYING" file of the
+- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+- */
+-
+-#ifndef ____H_EXTPACKMANAGERIMPL
+-#define ____H_EXTPACKMANAGERIMPL
+-
+-#include "VirtualBoxBase.h"
+-#include <VBox/ExtPack/ExtPack.h>
+-#include <iprt/fs.h>
+-
+-/**
+- * An extension pack file.
+- */
+-class ATL_NO_VTABLE ExtPackFile :
+- public VirtualBoxBase,
+- VBOX_SCRIPTABLE_IMPL(IExtPackFile)
+-{
+-public:
+- /** @name COM and internal init/term/mapping cruft.
+- * @{ */
+- VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(ExtPackFile, IExtPackFile)
+- DECLARE_NOT_AGGREGATABLE(ExtPackFile)
+- DECLARE_PROTECT_FINAL_CONSTRUCT()
+- BEGIN_COM_MAP(ExtPackFile)
+- VBOX_DEFAULT_INTERFACE_ENTRIES(IExtPackFile)
+- COM_INTERFACE_ENTRY(IExtPackBase)
+- END_COM_MAP()
+- DECLARE_EMPTY_CTOR_DTOR(ExtPackFile)
+-
+- HRESULT FinalConstruct();
+- void FinalRelease();
+- HRESULT initWithFile(const char *a_pszFile, const char *a_pszDigest, class ExtPackManager *a_pExtPackMgr, VirtualBox *a_pVirtualBox);
+- void uninit();
+- RTMEMEF_NEW_AND_DELETE_OPERATORS();
+- /** @} */
+-
+- /** @name IExtPackBase interfaces
+- * @{ */
+- STDMETHOD(COMGETTER(Name))(BSTR *a_pbstrName);
+- STDMETHOD(COMGETTER(Description))(BSTR *a_pbstrDescription);
+- STDMETHOD(COMGETTER(Version))(BSTR *a_pbstrVersion);
+- STDMETHOD(COMGETTER(Revision))(ULONG *a_puRevision);
+- STDMETHOD(COMGETTER(VRDEModule))(BSTR *a_pbstrVrdeModule);
+- STDMETHOD(COMGETTER(PlugIns))(ComSafeArrayOut(IExtPackPlugIn *, a_paPlugIns));
+- STDMETHOD(COMGETTER(Usable))(BOOL *a_pfUsable);
+- STDMETHOD(COMGETTER(WhyUnusable))(BSTR *a_pbstrWhy);
+- STDMETHOD(COMGETTER(ShowLicense))(BOOL *a_pfShowIt);
+- STDMETHOD(COMGETTER(License))(BSTR *a_pbstrHtmlLicense);
+- STDMETHOD(QueryLicense)(IN_BSTR a_bstrPreferredLocale, IN_BSTR a_bstrPreferredLanguage,
+- IN_BSTR a_bstrFormat, BSTR *a_pbstrLicense);
+- /** @} */
+-
+- /** @name IExtPackFile interfaces
+- * @{ */
+- STDMETHOD(COMGETTER(FilePath))(BSTR *a_pbstrPath);
+- STDMETHOD(Install)(BOOL a_fReplace, IN_BSTR a_bstrDisplayInfo, IProgress **a_ppProgress);
+- /** @} */
+-
+-private:
+- /** @name Misc init helpers
+- * @{ */
+- HRESULT initFailed(const char *a_pszWhyFmt, ...);
+- /** @} */
+-
+-private:
+- struct Data;
+- /** Pointer to the private instance. */
+- Data *m;
+-
+- friend class ExtPackManager;
+-};
+-
+-
+-/**
+- * An installed extension pack.
+- */
+-class ATL_NO_VTABLE ExtPack :
+- public VirtualBoxBase,
+- VBOX_SCRIPTABLE_IMPL(IExtPack)
+-{
+-public:
+- /** @name COM and internal init/term/mapping cruft.
+- * @{ */
+- VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(ExtPack, IExtPack)
+- DECLARE_NOT_AGGREGATABLE(ExtPack)
+- DECLARE_PROTECT_FINAL_CONSTRUCT()
+- BEGIN_COM_MAP(ExtPack)
+- VBOX_DEFAULT_INTERFACE_ENTRIES(IExtPack)
+- COM_INTERFACE_ENTRY(IExtPackBase)
+- END_COM_MAP()
+- DECLARE_EMPTY_CTOR_DTOR(ExtPack)
+-
+- HRESULT FinalConstruct();
+- void FinalRelease();
+- HRESULT initWithDir(VBOXEXTPACKCTX a_enmContext, const char *a_pszName, const char *a_pszDir);
+- void uninit();
+- RTMEMEF_NEW_AND_DELETE_OPERATORS();
+- /** @} */
+-
+- /** @name IExtPackBase interfaces
+- * @{ */
+- STDMETHOD(COMGETTER(Name))(BSTR *a_pbstrName);
+- STDMETHOD(COMGETTER(Description))(BSTR *a_pbstrDescription);
+- STDMETHOD(COMGETTER(Version))(BSTR *a_pbstrVersion);
+- STDMETHOD(COMGETTER(Revision))(ULONG *a_puRevision);
+- STDMETHOD(COMGETTER(VRDEModule))(BSTR *a_pbstrVrdeModule);
+- STDMETHOD(COMGETTER(PlugIns))(ComSafeArrayOut(IExtPackPlugIn *, a_paPlugIns));
+- STDMETHOD(COMGETTER(Usable))(BOOL *a_pfUsable);
+- STDMETHOD(COMGETTER(WhyUnusable))(BSTR *a_pbstrWhy);
+- STDMETHOD(COMGETTER(ShowLicense))(BOOL *a_pfShowIt);
+- STDMETHOD(COMGETTER(License))(BSTR *a_pbstrHtmlLicense);
+- STDMETHOD(QueryLicense)(IN_BSTR a_bstrPreferredLocale, IN_BSTR a_bstrPreferredLanguage,
+- IN_BSTR a_bstrFormat, BSTR *a_pbstrLicense);
+- /** @} */
+-
+- /** @name IExtPack interfaces
+- * @{ */
+- STDMETHOD(QueryObject)(IN_BSTR a_bstrObjectId, IUnknown **a_ppUnknown);
+- /** @} */
+-
+- /** @name Internal interfaces used by ExtPackManager.
+- * @{ */
+- bool callInstalledHook(IVirtualBox *a_pVirtualBox, AutoWriteLock *a_pLock, PRTERRINFO pErrInfo);
+- HRESULT callUninstallHookAndClose(IVirtualBox *a_pVirtualBox, bool a_fForcedRemoval);
+- bool callVirtualBoxReadyHook(IVirtualBox *a_pVirtualBox, AutoWriteLock *a_pLock);
+- bool callConsoleReadyHook(IConsole *a_pConsole, AutoWriteLock *a_pLock);
+- bool callVmCreatedHook(IVirtualBox *a_pVirtualBox, IMachine *a_pMachine, AutoWriteLock *a_pLock);
+- bool callVmConfigureVmmHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock, int *a_pvrc);
+- bool callVmPowerOnHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock, int *a_pvrc);
+- bool callVmPowerOffHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock);
+- HRESULT checkVrde(void);
+- HRESULT getVrdpLibraryName(Utf8Str *a_pstrVrdeLibrary);
+- bool wantsToBeDefaultVrde(void) const;
+- HRESULT refresh(bool *pfCanDelete);
+- /** @} */
+-
+-protected:
+- /** @name Internal helper methods.
+- * @{ */
+- void probeAndLoad(void);
+- bool findModule(const char *a_pszName, const char *a_pszExt, VBOXEXTPACKMODKIND a_enmKind,
+- Utf8Str *a_ppStrFound, bool *a_pfNative, PRTFSOBJINFO a_pObjInfo) const;
+- static bool objinfoIsEqual(PCRTFSOBJINFO pObjInfo1, PCRTFSOBJINFO pObjInfo2);
+- /** @} */
+-
+- /** @name Extension Pack Helpers
+- * @{ */
+- static DECLCALLBACK(int) hlpFindModule(PCVBOXEXTPACKHLP pHlp, const char *pszName, const char *pszExt,
+- VBOXEXTPACKMODKIND enmKind, char *pszFound, size_t cbFound, bool *pfNative);
+- static DECLCALLBACK(int) hlpGetFilePath(PCVBOXEXTPACKHLP pHlp, const char *pszFilename, char *pszPath, size_t cbPath);
+- static DECLCALLBACK(VBOXEXTPACKCTX) hlpGetContext(PCVBOXEXTPACKHLP pHlp);
+- static DECLCALLBACK(int) hlpReservedN(PCVBOXEXTPACKHLP pHlp);
+- /** @} */
+-
+-private:
+- struct Data;
+- /** Pointer to the private instance. */
+- Data *m;
+-
+- friend class ExtPackManager;
+-};
+-
+-
+-/**
+- * Extension pack manager.
+- */
+-class ATL_NO_VTABLE ExtPackManager :
+- public VirtualBoxBase,
+- VBOX_SCRIPTABLE_IMPL(IExtPackManager)
+-{
+- /** @name COM and internal init/term/mapping cruft.
+- * @{ */
+- VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(ExtPackManager, IExtPackManager)
+- DECLARE_NOT_AGGREGATABLE(ExtPackManager)
+- DECLARE_PROTECT_FINAL_CONSTRUCT()
+- BEGIN_COM_MAP(ExtPackManager)
+- VBOX_DEFAULT_INTERFACE_ENTRIES(IExtPackManager)
+- END_COM_MAP()
+- DECLARE_EMPTY_CTOR_DTOR(ExtPackManager)
+-
+- HRESULT FinalConstruct();
+- void FinalRelease();
+- HRESULT initExtPackManager(VirtualBox *a_pVirtualBox, VBOXEXTPACKCTX a_enmContext);
+- void uninit();
+- RTMEMEF_NEW_AND_DELETE_OPERATORS();
+- /** @} */
+-
+- /** @name IExtPack interfaces
+- * @{ */
+- STDMETHOD(COMGETTER(InstalledExtPacks))(ComSafeArrayOut(IExtPack *, a_paExtPacks));
+- STDMETHOD(Find)(IN_BSTR a_bstrName, IExtPack **a_pExtPack);
+- STDMETHOD(OpenExtPackFile)(IN_BSTR a_bstrTarball, IExtPackFile **a_ppExtPackFile);
+- STDMETHOD(Uninstall)(IN_BSTR a_bstrName, BOOL a_fForcedRemoval, IN_BSTR a_bstrDisplayInfo, IProgress **a_ppProgress);
+- STDMETHOD(Cleanup)(void);
+- STDMETHOD(QueryAllPlugInsForFrontend)(IN_BSTR a_bstrFrontend, ComSafeArrayOut(BSTR, a_pabstrPlugInModules));
+- STDMETHOD(IsExtPackUsable(IN_BSTR a_bstrExtPack, BOOL *aUsable));
+- /** @} */
+-
+- /** @name Internal interfaces used by other Main classes.
+- * @{ */
+- static DECLCALLBACK(int) doInstallThreadProc(RTTHREAD hThread, void *pvJob);
+- HRESULT doInstall(ExtPackFile *a_pExtPackFile, bool a_fReplace, Utf8Str const *a_pstrDisplayInfo);
+- static DECLCALLBACK(int) doUninstallThreadProc(RTTHREAD hThread, void *pvJob);
+- HRESULT doUninstall(const Utf8Str *a_pstrName, bool a_fForcedRemoval, const Utf8Str *a_pstrDisplayInfo);
+- void callAllVirtualBoxReadyHooks(void);
+- void callAllConsoleReadyHooks(IConsole *a_pConsole);
+- void callAllVmCreatedHooks(IMachine *a_pMachine);
+- int callAllVmConfigureVmmHooks(IConsole *a_pConsole, PVM a_pVM);
+- int callAllVmPowerOnHooks(IConsole *a_pConsole, PVM a_pVM);
+- void callAllVmPowerOffHooks(IConsole *a_pConsole, PVM a_pVM);
+- HRESULT checkVrdeExtPack(Utf8Str const *a_pstrExtPack);
+- int getVrdeLibraryPathForExtPack(Utf8Str const *a_pstrExtPack, Utf8Str *a_pstrVrdeLibrary);
+- HRESULT getDefaultVrdeExtPack(Utf8Str *a_pstrExtPack);
+- bool isExtPackUsable(const char *a_pszExtPack);
+- void dumpAllToReleaseLog(void);
+- /** @} */
+-
+-private:
+- HRESULT runSetUidToRootHelper(Utf8Str const *a_pstrDisplayInfo, const char *a_pszCommand, ...);
+- ExtPack *findExtPack(const char *a_pszName);
+- void removeExtPack(const char *a_pszName);
+- HRESULT refreshExtPack(const char *a_pszName, bool a_fUnsuableIsError, ExtPack **a_ppExtPack);
+-
+-private:
+- struct Data;
+- /** Pointer to the private instance. */
+- Data *m;
+-};
+-
+-#endif
+-/* vi: set tabstop=4 shiftwidth=4 expandtab: */
+--- VirtualBox-4.1.18.orig/src/VBox/Main/include/ExtPackUtil.h 2012-06-20 10:17:33.000000000 -0300
++++ /dev/null 2012-07-24 14:48:18.638572110 -0300
+@@ -1,137 +0,0 @@
+-/* $Id: ExtPackUtil.h $ */
+-/** @file
+- * VirtualBox Main - Extension Pack Utilities and definitions, VBoxC, VBoxSVC, ++.
+- */
+-
+-/*
+- * Copyright (C) 2010 Oracle Corporation
+- *
+- * This file is part of VirtualBox Open Source Edition (OSE), as
+- * available from http://www.virtualbox.org. This file is free software;
+- * you can redistribute it and/or modify it under the terms of the GNU
+- * General Public License (GPL) as published by the Free Software
+- * Foundation, in version 2 as it comes in the "COPYING" file of the
+- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+- */
+-
+-#ifndef ____H_EXTPACKUTIL
+-#define ____H_EXTPACKUTIL
+-
+-#include <iprt/cpp/ministring.h>
+-#include <iprt/fs.h>
+-#include <iprt/vfs.h>
+-
+-
+-/** @name VBOX_EXTPACK_DESCRIPTION_NAME
+- * The name of the description file in an extension pack. */
+-#define VBOX_EXTPACK_DESCRIPTION_NAME "ExtPack.xml"
+-/** @name VBOX_EXTPACK_DESCRIPTION_NAME
+- * The name of the manifest file in an extension pack. */
+-#define VBOX_EXTPACK_MANIFEST_NAME "ExtPack.manifest"
+-/** @name VBOX_EXTPACK_SIGNATURE_NAME
+- * The name of the signature file in an extension pack. */
+-#define VBOX_EXTPACK_SIGNATURE_NAME "ExtPack.signature"
+-/** @name VBOX_EXTPACK_LICENSE_NAME_PREFIX
+- * The name prefix of a license file in an extension pack. There can be
+- * several license files in a pack, the variations being on locale, language
+- * and format (HTML, RTF, plain text). All extension packages shall include
+- * a */
+-#define VBOX_EXTPACK_LICENSE_NAME_PREFIX "ExtPack-license"
+-/** @name VBOX_EXTPACK_SUFFIX
+- * The suffix of a extension pack tarball. */
+-#define VBOX_EXTPACK_SUFFIX ".vbox-extpack"
+-
+-/** The minimum length (strlen) of a extension pack name. */
+-#define VBOX_EXTPACK_NAME_MIN_LEN 3
+-/** The max length (strlen) of a extension pack name. */
+-#define VBOX_EXTPACK_NAME_MAX_LEN 64
+-
+-/** The architecture-dependent application data subdirectory where the
+- * extension packs are installed. Relative to RTPathAppPrivateArch. */
+-#define VBOX_EXTPACK_INSTALL_DIR "ExtensionPacks"
+-/** The architecture-independent application data subdirectory where the
+- * certificates are installed. Relative to RTPathAppPrivateNoArch. */
+-#define VBOX_EXTPACK_CERT_DIR "ExtPackCertificates"
+-
+-/** The maximum entry name length.
+- * Play short and safe. */
+-#define VBOX_EXTPACK_MAX_MEMBER_NAME_LENGTH 128
+-
+-
+-/**
+- * Plug-in descriptor.
+- */
+-typedef struct VBOXEXTPACKPLUGINDESC
+-{
+- /** The name. */
+- RTCString strName;
+- /** The module name. */
+- RTCString strModule;
+- /** The description. */
+- RTCString strDescription;
+- /** The frontend or component which it plugs into. */
+- RTCString strFrontend;
+-} VBOXEXTPACKPLUGINDESC;
+-/** Pointer to a plug-in descriptor. */
+-typedef VBOXEXTPACKPLUGINDESC *PVBOXEXTPACKPLUGINDESC;
+-
+-/**
+- * Extension pack descriptor
+- *
+- * This is the internal representation of the ExtPack.xml.
+- */
+-typedef struct VBOXEXTPACKDESC
+-{
+- /** The name. */
+- RTCString strName;
+- /** The description. */
+- RTCString strDescription;
+- /** The version string. */
+- RTCString strVersion;
+- /** The edition string. */
+- RTCString strEdition;
+- /** The internal revision number. */
+- uint32_t uRevision;
+- /** The name of the main module. */
+- RTCString strMainModule;
+- /** The name of the VRDE module, empty if none. */
+- RTCString strVrdeModule;
+- /** The number of plug-in descriptors. */
+- uint32_t cPlugIns;
+- /** Pointer to an array of plug-in descriptors. */
+- PVBOXEXTPACKPLUGINDESC paPlugIns;
+- /** Whether to show the license prior to installation. */
+- bool fShowLicense;
+-} VBOXEXTPACKDESC;
+-
+-/** Pointer to a extension pack descriptor. */
+-typedef VBOXEXTPACKDESC *PVBOXEXTPACKDESC;
+-/** Pointer to a const extension pack descriptor. */
+-typedef VBOXEXTPACKDESC const *PCVBOXEXTPACKDESC;
+-
+-
+-void VBoxExtPackInitDesc(PVBOXEXTPACKDESC a_pExtPackDesc);
+-RTCString *VBoxExtPackLoadDesc(const char *a_pszDir, PVBOXEXTPACKDESC a_pExtPackDesc, PRTFSOBJINFO a_pObjInfo);
+-RTCString *VBoxExtPackLoadDescFromVfsFile(RTVFSFILE hVfsFile, PVBOXEXTPACKDESC a_pExtPackDesc, PRTFSOBJINFO a_pObjInfo);
+-RTCString *VBoxExtPackExtractNameFromTarballPath(const char *pszTarball);
+-void VBoxExtPackFreeDesc(PVBOXEXTPACKDESC a_pExtPackDesc);
+-bool VBoxExtPackIsValidName(const char *pszName);
+-bool VBoxExtPackIsValidMangledName(const char *pszMangledName, size_t cchMax = RTSTR_MAX);
+-RTCString *VBoxExtPackMangleName(const char *pszName);
+-RTCString *VBoxExtPackUnmangleName(const char *pszMangledName, size_t cbMax);
+-int VBoxExtPackCalcDir(char *pszExtPackDir, size_t cbExtPackDir, const char *pszParentDir, const char *pszName);
+-bool VBoxExtPackIsValidVersionString(const char *pszVersion);
+-bool VBoxExtPackIsValidEditionString(const char *pszEdition);
+-bool VBoxExtPackIsValidModuleString(const char *pszModule);
+-
+-int VBoxExtPackValidateMember(const char *pszName, RTVFSOBJTYPE enmType, RTVFSOBJ hVfsObj, char *pszError, size_t cbError);
+-int VBoxExtPackOpenTarFss(RTFILE hTarballFile, char *pszError, size_t cbError, PRTVFSFSSTREAM phTarFss, PRTMANIFEST phFileManifest);
+-int VBoxExtPackValidateTarball(RTFILE hTarballFile, const char *pszExtPackName,
+- const char *pszTarball, const char *pszTarballDigest,
+- char *pszError, size_t cbError,
+- PRTMANIFEST phValidManifest, PRTVFSFILE phXmlFile, RTCString *pStrDigest);
+-
+-
+-#endif
+-
+--- VirtualBox-4.1.18.orig/src/VBox/Main/src-all/ExtPackManagerImpl.cpp 2012-06-20 10:17:34.000000000 -0300
++++ /dev/null 2012-07-24 14:48:18.638572110 -0300
+@@ -1,3126 +0,0 @@
+-/* $Id: ExtPackManagerImpl.cpp $ */
+-/** @file
+- * VirtualBox Main - interface for Extension Packs, VBoxSVC & VBoxC.
+- */
+-
+-/*
+- * Copyright (C) 2010 Oracle Corporation
+- *
+- * This file is part of VirtualBox Open Source Edition (OSE), as
+- * available from http://www.virtualbox.org. This file is free software;
+- * you can redistribute it and/or modify it under the terms of the GNU
+- * General Public License (GPL) as published by the Free Software
+- * Foundation, in version 2 as it comes in the "COPYING" file of the
+- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+- */
+-
+-
+-/*******************************************************************************
+-* Header Files *
+-*******************************************************************************/
+-#include "ExtPackManagerImpl.h"
+-#include "ExtPackUtil.h"
+-
+-#include <iprt/buildconfig.h>
+-#include <iprt/ctype.h>
+-#include <iprt/dir.h>
+-#include <iprt/env.h>
+-#include <iprt/file.h>
+-#include <iprt/ldr.h>
+-#include <iprt/manifest.h>
+-#include <iprt/param.h>
+-#include <iprt/path.h>
+-#include <iprt/pipe.h>
+-#include <iprt/process.h>
+-#include <iprt/string.h>
+-
+-#include <VBox/com/array.h>
+-#include <VBox/com/ErrorInfo.h>
+-#include <VBox/err.h>
+-#include <VBox/log.h>
+-#include <VBox/sup.h>
+-#include <VBox/version.h>
+-#include "AutoCaller.h"
+-#include "Global.h"
+-#include "ProgressImpl.h"
+-#include "SystemPropertiesImpl.h"
+-#include "VirtualBoxImpl.h"
+-
+-
+-/*******************************************************************************
+-* Defined Constants And Macros *
+-*******************************************************************************/
+-/** @name VBOX_EXTPACK_HELPER_NAME
+- * The name of the utility application we employ to install and uninstall the
+- * extension packs. This is a set-uid-to-root binary on unixy platforms, which
+- * is why it has to be a separate application.
+- */
+-#if defined(RT_OS_WINDOWS) || defined(RT_OS_OS2)
+-# define VBOX_EXTPACK_HELPER_NAME "VBoxExtPackHelperApp.exe"
+-#else
+-# define VBOX_EXTPACK_HELPER_NAME "VBoxExtPackHelperApp"
+-#endif
+-
+-
+-/*******************************************************************************
+-* Structures and Typedefs *
+-*******************************************************************************/
+-struct ExtPackBaseData
+-{
+-public:
+- /** The extension pack descriptor (loaded from the XML, mostly). */
+- VBOXEXTPACKDESC Desc;
+- /** The file system object info of the XML file.
+- * This is for detecting changes and save time in refresh(). */
+- RTFSOBJINFO ObjInfoDesc;
+- /** Whether it's usable or not. */
+- bool fUsable;
+- /** Why it is unusable. */
+- Utf8Str strWhyUnusable;
+-};
+-
+-/**
+- * Private extension pack data.
+- */
+-struct ExtPackFile::Data : public ExtPackBaseData
+-{
+-public:
+- /** The path to the tarball. */
+- Utf8Str strExtPackFile;
+- /** The SHA-256 hash of the file (as string). */
+- Utf8Str strDigest;
+- /** The file handle of the extension pack file. */
+- RTFILE hExtPackFile;
+- /** Our manifest for the tarball. */
+- RTMANIFEST hOurManifest;
+- /** Pointer to the extension pack manager. */
+- ComObjPtr<ExtPackManager> ptrExtPackMgr;
+- /** Pointer to the VirtualBox object so we can create a progress object. */
+- VirtualBox *pVirtualBox;
+-
+- RTMEMEF_NEW_AND_DELETE_OPERATORS();
+-};
+-
+-/**
+- * Private extension pack data.
+- */
+-struct ExtPack::Data : public ExtPackBaseData
+-{
+-public:
+- /** Where the extension pack is located. */
+- Utf8Str strExtPackPath;
+- /** The file system object info of the extension pack directory.
+- * This is for detecting changes and save time in refresh(). */
+- RTFSOBJINFO ObjInfoExtPack;
+- /** The full path to the main module. */
+- Utf8Str strMainModPath;
+- /** The file system object info of the main module.
+- * This is used to determin whether to bother try reload it. */
+- RTFSOBJINFO ObjInfoMainMod;
+- /** The module handle of the main extension pack module. */
+- RTLDRMOD hMainMod;
+-
+- /** The helper callbacks for the extension pack. */
+- VBOXEXTPACKHLP Hlp;
+- /** Pointer back to the extension pack object (for Hlp methods). */
+- ExtPack *pThis;
+- /** The extension pack registration structure. */
+- PCVBOXEXTPACKREG pReg;
+- /** The current context. */
+- VBOXEXTPACKCTX enmContext;
+- /** Set if we've made the pfnVirtualBoxReady or pfnConsoleReady call. */
+- bool fMadeReadyCall;
+-
+- RTMEMEF_NEW_AND_DELETE_OPERATORS();
+-};
+-
+-/** List of extension packs. */
+-typedef std::list< ComObjPtr<ExtPack> > ExtPackList;
+-
+-/**
+- * Private extension pack manager data.
+- */
+-struct ExtPackManager::Data
+-{
+- /** The directory where the extension packs are installed. */
+- Utf8Str strBaseDir;
+- /** The directory where the certificates this installation recognizes are
+- * stored. */
+- Utf8Str strCertificatDirPath;
+- /** The list of installed extension packs. */
+- ExtPackList llInstalledExtPacks;
+- /** Pointer to the VirtualBox object, our parent. */
+- VirtualBox *pVirtualBox;
+- /** The current context. */
+- VBOXEXTPACKCTX enmContext;
+-#if !defined(RT_OS_WINDOWS) && !defined(RT_OS_DARWIN)
+- /** File handle for the VBoxVMM libary which we slurp because ExtPacks depend on it. */
+- RTLDRMOD hVBoxVMM;
+-#endif
+-
+- RTMEMEF_NEW_AND_DELETE_OPERATORS();
+-};
+-
+-/**
+- * Extension pack installation job.
+- */
+-typedef struct EXTPACKINSTALLJOB
+-{
+- /** Smart pointer to the extension pack file. */
+- ComPtr<ExtPackFile> ptrExtPackFile;
+- /** The replace argument. */
+- bool fReplace;
+- /** The display info argument. */
+- Utf8Str strDisplayInfo;
+- /** Smart pointer to the extension manager. */
+- ComPtr<ExtPackManager> ptrExtPackMgr;
+- /** Smart pointer to the progress object for this job. */
+- ComObjPtr<Progress> ptrProgress;
+-} EXTPACKINSTALLJOB;
+-/** Pointer to an extension pack installation job. */
+-typedef EXTPACKINSTALLJOB *PEXTPACKINSTALLJOB;
+-
+-/**
+- * Extension pack uninstallation job.
+- */
+-typedef struct EXTPACKUNINSTALLJOB
+-{
+- /** Smart pointer to the extension manager. */
+- ComPtr<ExtPackManager> ptrExtPackMgr;
+- /** The name of the extension pack. */
+- Utf8Str strName;
+- /** The replace argument. */
+- bool fForcedRemoval;
+- /** The display info argument. */
+- Utf8Str strDisplayInfo;
+- /** Smart pointer to the progress object for this job. */
+- ComObjPtr<Progress> ptrProgress;
+-} EXTPACKUNINSTALLJOB;
+-/** Pointer to an extension pack uninstallation job. */
+-typedef EXTPACKUNINSTALLJOB *PEXTPACKUNINSTALLJOB;
+-
+-
+-DEFINE_EMPTY_CTOR_DTOR(ExtPackFile)
+-
+-/**
+- * Called by ComObjPtr::createObject when creating the object.
+- *
+- * Just initialize the basic object state, do the rest in initWithDir().
+- *
+- * @returns S_OK.
+- */
+-HRESULT ExtPackFile::FinalConstruct()
+-{
+- m = NULL;
+- return BaseFinalConstruct();
+-}
+-
+-/**
+- * Initializes the extension pack by reading its file.
+- *
+- * @returns COM status code.
+- * @param a_pszFile The path to the extension pack file.
+- * @param a_pszDigest The SHA-256 digest of the file. Or an empty string.
+- * @param a_pExtPackMgr Pointer to the extension pack manager.
+- * @param a_pVirtualBox Pointer to the VirtualBox object.
+- */
+-HRESULT ExtPackFile::initWithFile(const char *a_pszFile, const char *a_pszDigest, ExtPackManager *a_pExtPackMgr, VirtualBox *a_pVirtualBox)
+-{
+- AutoInitSpan autoInitSpan(this);
+- AssertReturn(autoInitSpan.isOk(), E_FAIL);
+-
+- /*
+- * Allocate + initialize our private data.
+- */
+- m = new ExtPackFile::Data;
+- VBoxExtPackInitDesc(&m->Desc);
+- RT_ZERO(m->ObjInfoDesc);
+- m->fUsable = false;
+- m->strWhyUnusable = tr("ExtPack::init failed");
+- m->strExtPackFile = a_pszFile;
+- m->strDigest = a_pszDigest;
+- m->hExtPackFile = NIL_RTFILE;
+- m->hOurManifest = NIL_RTMANIFEST;
+- m->ptrExtPackMgr = a_pExtPackMgr;
+- m->pVirtualBox = a_pVirtualBox;
+-
+- RTCString *pstrTarName = VBoxExtPackExtractNameFromTarballPath(a_pszFile);
+- if (pstrTarName)
+- {
+- m->Desc.strName = *pstrTarName;
+- delete pstrTarName;
+- pstrTarName = NULL;
+- }
+-
+- autoInitSpan.setSucceeded();
+-
+- /*
+- * Try open the extension pack and check that it is a regular file.
+- */
+- int vrc = RTFileOpen(&m->hExtPackFile, a_pszFile,
+- RTFILE_O_READ | RTFILE_O_DENY_WRITE | RTFILE_O_OPEN);
+- if (RT_FAILURE(vrc))
+- {
+- if (vrc == VERR_FILE_NOT_FOUND || vrc == VERR_PATH_NOT_FOUND)
+- return initFailed(tr("'%s' file not found"), a_pszFile);
+- return initFailed(tr("RTFileOpen('%s',,) failed with %Rrc"), a_pszFile, vrc);
+- }
+-
+- RTFSOBJINFO ObjInfo;
+- vrc = RTFileQueryInfo(m->hExtPackFile, &ObjInfo, RTFSOBJATTRADD_UNIX);
+- if (RT_FAILURE(vrc))
+- return initFailed(tr("RTFileQueryInfo failed with %Rrc on '%s'"), vrc, a_pszFile);
+- if (!RTFS_IS_FILE(ObjInfo.Attr.fMode))
+- return initFailed(tr("Not a regular file: %s"), a_pszFile);
+-
+- /*
+- * Validate the tarball and extract the XML file.
+- */
+- char szError[8192];
+- RTVFSFILE hXmlFile;
+- vrc = VBoxExtPackValidateTarball(m->hExtPackFile, NULL /*pszExtPackName*/, a_pszFile, a_pszDigest,
+- szError, sizeof(szError), &m->hOurManifest, &hXmlFile, &m->strDigest);
+- if (RT_FAILURE(vrc))
+- return initFailed(tr("%s"), szError);
+-
+- /*
+- * Parse the XML.
+- */
+- RTCString strSavedName(m->Desc.strName);
+- RTCString *pStrLoadErr = VBoxExtPackLoadDescFromVfsFile(hXmlFile, &m->Desc, &m->ObjInfoDesc);
+- RTVfsFileRelease(hXmlFile);
+- if (pStrLoadErr != NULL)
+- {
+- m->strWhyUnusable.printf(tr("Failed to the xml file: %s"), pStrLoadErr->c_str());
+- m->Desc.strName = strSavedName;
+- delete pStrLoadErr;
+- return S_OK;
+- }
+-
+- /*
+- * Match the tarball name with the name from the XML.
+- */
+- /** @todo drop this restriction after the old install interface is
+- * dropped. */
+- if (!strSavedName.equalsIgnoreCase(m->Desc.strName))
+- return initFailed(tr("Extension pack name mismatch between the downloaded file and the XML inside it (xml='%s' file='%s')"),
+- m->Desc.strName.c_str(), strSavedName.c_str());
+-
+- m->fUsable = true;
+- m->strWhyUnusable.setNull();
+- return S_OK;
+-}
+-
+-/**
+- * Protected helper that formats the strWhyUnusable value.
+- *
+- * @returns S_OK
+- * @param a_pszWhyFmt Why it failed, format string.
+- * @param ... The format arguments.
+- */
+-HRESULT ExtPackFile::initFailed(const char *a_pszWhyFmt, ...)
+-{
+- va_list va;
+- va_start(va, a_pszWhyFmt);
+- m->strWhyUnusable.printfV(a_pszWhyFmt, va);
+- va_end(va);
+- return S_OK;
+-}
+-
+-/**
+- * COM cruft.
+- */
+-void ExtPackFile::FinalRelease()
+-{
+- uninit();
+- BaseFinalRelease();
+-}
+-
+-/**
+- * Do the actual cleanup.
+- */
+-void ExtPackFile::uninit()
+-{
+- /* Enclose the state transition Ready->InUninit->NotReady */
+- AutoUninitSpan autoUninitSpan(this);
+- if (!autoUninitSpan.uninitDone() && m != NULL)
+- {
+- VBoxExtPackFreeDesc(&m->Desc);
+- RTFileClose(m->hExtPackFile);
+- m->hExtPackFile = NIL_RTFILE;
+- RTManifestRelease(m->hOurManifest);
+- m->hOurManifest = NIL_RTMANIFEST;
+-
+- delete m;
+- m = NULL;
+- }
+-}
+-
+-STDMETHODIMP ExtPackFile::COMGETTER(Name)(BSTR *a_pbstrName)
+-{
+- CheckComArgOutPointerValid(a_pbstrName);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- Bstr str(m->Desc.strName);
+- str.cloneTo(a_pbstrName);
+- }
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackFile::COMGETTER(Description)(BSTR *a_pbstrDescription)
+-{
+- CheckComArgOutPointerValid(a_pbstrDescription);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- Bstr str(m->Desc.strDescription);
+- str.cloneTo(a_pbstrDescription);
+- }
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackFile::COMGETTER(Version)(BSTR *a_pbstrVersion)
+-{
+- CheckComArgOutPointerValid(a_pbstrVersion);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- /* HACK ALERT: This is for easing backporting to 4.1. The edition stuff
+- will be changed into a separate */
+- if (m->Desc.strEdition.isEmpty())
+- {
+- Bstr str(m->Desc.strVersion);
+- str.cloneTo(a_pbstrVersion);
+- }
+- else
+- {
+- RTCString strHack(m->Desc.strVersion);
+- strHack.append('-');
+- strHack.append(m->Desc.strEdition);
+-
+- Bstr str(strHack);
+- str.cloneTo(a_pbstrVersion);
+- }
+- }
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackFile::COMGETTER(Revision)(ULONG *a_puRevision)
+-{
+- CheckComArgOutPointerValid(a_puRevision);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- *a_puRevision = m->Desc.uRevision;
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackFile::COMGETTER(VRDEModule)(BSTR *a_pbstrVrdeModule)
+-{
+- CheckComArgOutPointerValid(a_pbstrVrdeModule);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- Bstr str(m->Desc.strVrdeModule);
+- str.cloneTo(a_pbstrVrdeModule);
+- }
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackFile::COMGETTER(PlugIns)(ComSafeArrayOut(IExtPackPlugIn *, a_paPlugIns))
+-{
+- /** @todo implement plug-ins. */
+-#ifdef VBOX_WITH_XPCOM
+- NOREF(a_paPlugIns);
+- NOREF(a_paPlugInsSize);
+-#endif
+- ReturnComNotImplemented();
+-}
+-
+-STDMETHODIMP ExtPackFile::COMGETTER(Usable)(BOOL *a_pfUsable)
+-{
+- CheckComArgOutPointerValid(a_pfUsable);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- *a_pfUsable = m->fUsable;
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackFile::COMGETTER(WhyUnusable)(BSTR *a_pbstrWhy)
+-{
+- CheckComArgOutPointerValid(a_pbstrWhy);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- m->strWhyUnusable.cloneTo(a_pbstrWhy);
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackFile::COMGETTER(ShowLicense)(BOOL *a_pfShowIt)
+-{
+- CheckComArgOutPointerValid(a_pfShowIt);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- *a_pfShowIt = m->Desc.fShowLicense;
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackFile::COMGETTER(License)(BSTR *a_pbstrHtmlLicense)
+-{
+- Bstr bstrHtml("html");
+- return QueryLicense(Bstr::Empty.raw(), Bstr::Empty.raw(), bstrHtml.raw(), a_pbstrHtmlLicense);
+-}
+-
+-/* Same as ExtPack::QueryLicense, should really explore the subject of base classes here... */
+-STDMETHODIMP ExtPackFile::QueryLicense(IN_BSTR a_bstrPreferredLocale, IN_BSTR a_bstrPreferredLanguage, IN_BSTR a_bstrFormat,
+- BSTR *a_pbstrLicense)
+-{
+- /*
+- * Validate input.
+- */
+- CheckComArgOutPointerValid(a_pbstrLicense);
+- CheckComArgNotNull(a_bstrPreferredLocale);
+- CheckComArgNotNull(a_bstrPreferredLanguage);
+- CheckComArgNotNull(a_bstrFormat);
+-
+- Utf8Str strPreferredLocale(a_bstrPreferredLocale);
+- if (strPreferredLocale.length() != 2 && strPreferredLocale.length() != 0)
+- return setError(E_FAIL, tr("The preferred locale is a two character string or empty."));
+-
+- Utf8Str strPreferredLanguage(a_bstrPreferredLanguage);
+- if (strPreferredLanguage.length() != 2 && strPreferredLanguage.length() != 0)
+- return setError(E_FAIL, tr("The preferred lanuage is a two character string or empty."));
+-
+- Utf8Str strFormat(a_bstrFormat);
+- if ( !strFormat.equals("html")
+- && !strFormat.equals("rtf")
+- && !strFormat.equals("txt"))
+- return setError(E_FAIL, tr("The license format can only have the values 'html', 'rtf' and 'txt'."));
+-
+- /*
+- * Combine the options to form a file name before locking down anything.
+- */
+- char szName[sizeof(VBOX_EXTPACK_LICENSE_NAME_PREFIX "-de_DE.html") + 2];
+- if (strPreferredLocale.isNotEmpty() && strPreferredLanguage.isNotEmpty())
+- RTStrPrintf(szName, sizeof(szName), VBOX_EXTPACK_LICENSE_NAME_PREFIX "-%s_%s.%s",
+- strPreferredLocale.c_str(), strPreferredLanguage.c_str(), strFormat.c_str());
+- else if (strPreferredLocale.isNotEmpty())
+- RTStrPrintf(szName, sizeof(szName), VBOX_EXTPACK_LICENSE_NAME_PREFIX "-%s.%s", strPreferredLocale.c_str(), strFormat.c_str());
+- else if (strPreferredLanguage.isNotEmpty())
+- RTStrPrintf(szName, sizeof(szName), VBOX_EXTPACK_LICENSE_NAME_PREFIX "-_%s.%s", strPreferredLocale.c_str(), strFormat.c_str());
+- else
+- RTStrPrintf(szName, sizeof(szName), VBOX_EXTPACK_LICENSE_NAME_PREFIX ".%s", strFormat.c_str());
+-
+- /*
+- * Lock the extension pack. We need a write lock here as there must not be
+- * concurrent accesses to the tar file handle.
+- */
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+-
+- /*
+- * Do not permit this query on a pack that isn't considered usable (could
+- * be marked so because of bad license files).
+- */
+- if (!m->fUsable)
+- hrc = setError(E_FAIL, tr("%s"), m->strWhyUnusable.c_str());
+- else
+- {
+- /*
+- * Look it up in the manifest before scanning the tarball for it
+- */
+- if (RTManifestEntryExists(m->hOurManifest, szName))
+- {
+- RTVFSFSSTREAM hTarFss;
+- char szError[8192];
+- int vrc = VBoxExtPackOpenTarFss(m->hExtPackFile, szError, sizeof(szError), &hTarFss, NULL);
+- if (RT_SUCCESS(vrc))
+- {
+- for (;;)
+- {
+- /* Get the first/next. */
+- char *pszName;
+- RTVFSOBJ hVfsObj;
+- RTVFSOBJTYPE enmType;
+- vrc = RTVfsFsStrmNext(hTarFss, &pszName, &enmType, &hVfsObj);
+- if (RT_FAILURE(vrc))
+- {
+- if (vrc != VERR_EOF)
+- hrc = setError(VBOX_E_IPRT_ERROR, tr("RTVfsFsStrmNext failed: %Rrc"), vrc);
+- else
+- hrc = setError(E_UNEXPECTED, tr("'%s' was found in the manifest but not in the tarball"), szName);
+- break;
+- }
+-
+- /* Is this it? */
+- const char *pszAdjName = pszName[0] == '.' && pszName[1] == '/' ? &pszName[2] : pszName;
+- if ( !strcmp(pszAdjName, szName)
+- && ( enmType == RTVFSOBJTYPE_IO_STREAM
+- || enmType == RTVFSOBJTYPE_FILE))
+- {
+- RTVFSIOSTREAM hVfsIos = RTVfsObjToIoStream(hVfsObj);
+- RTVfsObjRelease(hVfsObj);
+- RTStrFree(pszName);
+-
+- /* Load the file into memory. */
+- RTFSOBJINFO ObjInfo;
+- vrc = RTVfsIoStrmQueryInfo(hVfsIos, &ObjInfo, RTFSOBJATTRADD_NOTHING);
+- if (RT_SUCCESS(vrc))
+- {
+- size_t cbFile = (size_t)ObjInfo.cbObject;
+- void *pvFile = RTMemAllocZ(cbFile + 1);
+- if (pvFile)
+- {
+- vrc = RTVfsIoStrmRead(hVfsIos, pvFile, cbFile, true /*fBlocking*/, NULL);
+- if (RT_SUCCESS(vrc))
+- {
+- /* try translate it into a string we can return. */
+- Bstr bstrLicense((const char *)pvFile, cbFile);
+- if (bstrLicense.isNotEmpty())
+- {
+- bstrLicense.detachTo(a_pbstrLicense);
+- hrc = S_OK;
+- }
+- else
+- hrc = setError(VBOX_E_IPRT_ERROR,
+- tr("The license file '%s' is empty or contains invalid UTF-8 encoding"),
+- szName);
+- }
+- else
+- hrc = setError(VBOX_E_IPRT_ERROR, tr("Failed to read '%s': %Rrc"), szName, vrc);
+- RTMemFree(pvFile);
+- }
+- else
+- hrc = setError(E_OUTOFMEMORY, tr("Failed to allocate %zu bytes for '%s'"), cbFile, szName);
+- }
+- else
+- hrc = setError(VBOX_E_IPRT_ERROR, tr("RTVfsIoStrmQueryInfo on '%s': %Rrc"), szName, vrc);
+- RTVfsIoStrmRelease(hVfsIos);
+- break;
+- }
+-
+- /* Release current. */
+- RTVfsObjRelease(hVfsObj);
+- RTStrFree(pszName);
+- }
+- RTVfsFsStrmRelease(hTarFss);
+- }
+- else
+- hrc = setError(VBOX_E_OBJECT_NOT_FOUND, tr("%s"), szError);
+- }
+- else
+- hrc = setError(VBOX_E_OBJECT_NOT_FOUND, tr("The license file '%s' was not found in '%s'"),
+- szName, m->strExtPackFile.c_str());
+- }
+- }
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackFile::COMGETTER(FilePath)(BSTR *a_pbstrPath)
+-{
+- CheckComArgOutPointerValid(a_pbstrPath);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- m->strExtPackFile.cloneTo(a_pbstrPath);
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackFile::Install(BOOL a_fReplace, IN_BSTR a_bstrDisplayInfo, IProgress **a_ppProgress)
+-{
+- if (a_ppProgress)
+- *a_ppProgress = NULL;
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- if (m->fUsable)
+- {
+- PEXTPACKINSTALLJOB pJob = NULL;
+- try
+- {
+- pJob = new EXTPACKINSTALLJOB;
+- pJob->ptrExtPackFile = this;
+- pJob->fReplace = a_fReplace != FALSE;
+- pJob->strDisplayInfo = a_bstrDisplayInfo;
+- pJob->ptrExtPackMgr = m->ptrExtPackMgr;
+- hrc = pJob->ptrProgress.createObject();
+- if (SUCCEEDED(hrc))
+- {
+- Bstr bstrDescription = tr("Installing extension pack");
+- hrc = pJob->ptrProgress->init(
+-#ifndef VBOX_COM_INPROC
+- m->pVirtualBox,
+-#endif
+- static_cast<IExtPackFile *>(this),
+- bstrDescription.raw(),
+- FALSE /*aCancelable*/,
+- NULL /*aId*/);
+- }
+- if (SUCCEEDED(hrc))
+- {
+- ComPtr<Progress> ptrProgress = pJob->ptrProgress;
+- int vrc = RTThreadCreate(NULL /*phThread*/, ExtPackManager::doInstallThreadProc, pJob, 0,
+- RTTHREADTYPE_DEFAULT, 0 /*fFlags*/, "ExtPackInst");
+- if (RT_SUCCESS(vrc))
+- {
+- pJob = NULL; /* the thread deletes it */
+- ptrProgress.queryInterfaceTo(a_ppProgress);
+- }
+- else
+- hrc = setError(VBOX_E_IPRT_ERROR, tr("RTThreadCreate failed with %Rrc"), vrc);
+- }
+- }
+- catch (std::bad_alloc)
+- {
+- hrc = E_OUTOFMEMORY;
+- }
+- if (pJob)
+- delete pJob;
+- }
+- else
+- hrc = setError(E_FAIL, "%s", m->strWhyUnusable.c_str());
+- }
+- return hrc;
+-}
+-
+-
+-
+-
+-
+-DEFINE_EMPTY_CTOR_DTOR(ExtPack)
+-
+-/**
+- * Called by ComObjPtr::createObject when creating the object.
+- *
+- * Just initialize the basic object state, do the rest in initWithDir().
+- *
+- * @returns S_OK.
+- */
+-HRESULT ExtPack::FinalConstruct()
+-{
+- m = NULL;
+- return S_OK;
+-}
+-
+-/**
+- * Initializes the extension pack by reading its file.
+- *
+- * @returns COM status code.
+- * @param a_enmContext The context we're in.
+- * @param a_pszName The name of the extension pack. This is also the
+- * name of the subdirector under @a a_pszParentDir
+- * where the extension pack is installed.
+- * @param a_pszDir The extension pack directory name.
+- */
+-HRESULT ExtPack::initWithDir(VBOXEXTPACKCTX a_enmContext, const char *a_pszName, const char *a_pszDir)
+-{
+- AutoInitSpan autoInitSpan(this);
+- AssertReturn(autoInitSpan.isOk(), E_FAIL);
+-
+- static const VBOXEXTPACKHLP s_HlpTmpl =
+- {
+- /* u32Version = */ VBOXEXTPACKHLP_VERSION,
+- /* uVBoxFullVersion = */ VBOX_FULL_VERSION,
+- /* uVBoxVersionRevision = */ 0,
+- /* u32Padding = */ 0,
+- /* pszVBoxVersion = */ "",
+- /* pfnFindModule = */ ExtPack::hlpFindModule,
+- /* pfnGetFilePath = */ ExtPack::hlpGetFilePath,
+- /* pfnGetContext = */ ExtPack::hlpGetContext,
+- /* pfnReserved1 = */ ExtPack::hlpReservedN,
+- /* pfnReserved2 = */ ExtPack::hlpReservedN,
+- /* pfnReserved3 = */ ExtPack::hlpReservedN,
+- /* pfnReserved4 = */ ExtPack::hlpReservedN,
+- /* pfnReserved5 = */ ExtPack::hlpReservedN,
+- /* pfnReserved6 = */ ExtPack::hlpReservedN,
+- /* pfnReserved7 = */ ExtPack::hlpReservedN,
+- /* pfnReserved8 = */ ExtPack::hlpReservedN,
+- /* pfnReserved9 = */ ExtPack::hlpReservedN,
+- /* u32EndMarker = */ VBOXEXTPACKHLP_VERSION
+- };
+-
+- /*
+- * Allocate + initialize our private data.
+- */
+- m = new Data;
+- VBoxExtPackInitDesc(&m->Desc);
+- m->Desc.strName = a_pszName;
+- RT_ZERO(m->ObjInfoDesc);
+- m->fUsable = false;
+- m->strWhyUnusable = tr("ExtPack::init failed");
+- m->strExtPackPath = a_pszDir;
+- RT_ZERO(m->ObjInfoExtPack);
+- m->strMainModPath.setNull();
+- RT_ZERO(m->ObjInfoMainMod);
+- m->hMainMod = NIL_RTLDRMOD;
+- m->Hlp = s_HlpTmpl;
+- m->Hlp.pszVBoxVersion = RTBldCfgVersion();
+- m->Hlp.uVBoxInternalRevision = RTBldCfgRevision();
+- m->pThis = this;
+- m->pReg = NULL;
+- m->enmContext = a_enmContext;
+- m->fMadeReadyCall = false;
+-
+- /*
+- * Probe the extension pack (this code is shared with refresh()).
+- */
+- probeAndLoad();
+-
+- autoInitSpan.setSucceeded();
+- return S_OK;
+-}
+-
+-/**
+- * COM cruft.
+- */
+-void ExtPack::FinalRelease()
+-{
+- uninit();
+-}
+-
+-/**
+- * Do the actual cleanup.
+- */
+-void ExtPack::uninit()
+-{
+- /* Enclose the state transition Ready->InUninit->NotReady */
+- AutoUninitSpan autoUninitSpan(this);
+- if (!autoUninitSpan.uninitDone() && m != NULL)
+- {
+- if (m->hMainMod != NIL_RTLDRMOD)
+- {
+- AssertPtr(m->pReg);
+- if (m->pReg->pfnUnload != NULL)
+- m->pReg->pfnUnload(m->pReg);
+-
+- RTLdrClose(m->hMainMod);
+- m->hMainMod = NIL_RTLDRMOD;
+- m->pReg = NULL;
+- }
+-
+- VBoxExtPackFreeDesc(&m->Desc);
+-
+- delete m;
+- m = NULL;
+- }
+-}
+-
+-
+-/**
+- * Calls the installed hook.
+- *
+- * @returns true if we left the lock, false if we didn't.
+- * @param a_pVirtualBox The VirtualBox interface.
+- * @param a_pLock The write lock held by the caller.
+- * @param pErrInfo Where to return error information.
+- */
+-bool ExtPack::callInstalledHook(IVirtualBox *a_pVirtualBox, AutoWriteLock *a_pLock, PRTERRINFO pErrInfo)
+-{
+- if ( m != NULL
+- && m->hMainMod != NIL_RTLDRMOD)
+- {
+- if (m->pReg->pfnInstalled)
+- {
+- ComPtr<ExtPack> ptrSelfRef = this;
+- a_pLock->release();
+- pErrInfo->rc = m->pReg->pfnInstalled(m->pReg, a_pVirtualBox, pErrInfo);
+- a_pLock->acquire();
+- return true;
+- }
+- }
+- pErrInfo->rc = VINF_SUCCESS;
+- return false;
+-}
+-
+-/**
+- * Calls the uninstall hook and closes the module.
+- *
+- * @returns S_OK or COM error status with error information.
+- * @param a_pVirtualBox The VirtualBox interface.
+- * @param a_fForcedRemoval When set, we'll ignore complaints from the
+- * uninstall hook.
+- * @remarks The caller holds the manager's write lock, not released.
+- */
+-HRESULT ExtPack::callUninstallHookAndClose(IVirtualBox *a_pVirtualBox, bool a_fForcedRemoval)
+-{
+- HRESULT hrc = S_OK;
+-
+- if ( m != NULL
+- && m->hMainMod != NIL_RTLDRMOD)
+- {
+- if (m->pReg->pfnUninstall && !a_fForcedRemoval)
+- {
+- int vrc = m->pReg->pfnUninstall(m->pReg, a_pVirtualBox);
+- if (RT_FAILURE(vrc))
+- {
+- LogRel(("ExtPack pfnUninstall returned %Rrc for %s\n", vrc, m->Desc.strName.c_str()));
+- if (!a_fForcedRemoval)
+- hrc = setError(E_FAIL, tr("pfnUninstall returned %Rrc"), vrc);
+- }
+- }
+- if (SUCCEEDED(hrc))
+- {
+- RTLdrClose(m->hMainMod);
+- m->hMainMod = NIL_RTLDRMOD;
+- m->pReg = NULL;
+- }
+- }
+-
+- return hrc;
+-}
+-
+-/**
+- * Calls the pfnVirtualBoxReady hook.
+- *
+- * @returns true if we left the lock, false if we didn't.
+- * @param a_pVirtualBox The VirtualBox interface.
+- * @param a_pLock The write lock held by the caller.
+- */
+-bool ExtPack::callVirtualBoxReadyHook(IVirtualBox *a_pVirtualBox, AutoWriteLock *a_pLock)
+-{
+- if ( m != NULL
+- && m->fUsable
+- && !m->fMadeReadyCall)
+- {
+- m->fMadeReadyCall = true;
+- if (m->pReg->pfnVirtualBoxReady)
+- {
+- ComPtr<ExtPack> ptrSelfRef = this;
+- a_pLock->release();
+- m->pReg->pfnVirtualBoxReady(m->pReg, a_pVirtualBox);
+- a_pLock->acquire();
+- return true;
+- }
+- }
+- return false;
+-}
+-
+-/**
+- * Calls the pfnConsoleReady hook.
+- *
+- * @returns true if we left the lock, false if we didn't.
+- * @param a_pConsole The Console interface.
+- * @param a_pLock The write lock held by the caller.
+- */
+-bool ExtPack::callConsoleReadyHook(IConsole *a_pConsole, AutoWriteLock *a_pLock)
+-{
+- if ( m != NULL
+- && m->fUsable
+- && !m->fMadeReadyCall)
+- {
+- m->fMadeReadyCall = true;
+- if (m->pReg->pfnConsoleReady)
+- {
+- ComPtr<ExtPack> ptrSelfRef = this;
+- a_pLock->release();
+- m->pReg->pfnConsoleReady(m->pReg, a_pConsole);
+- a_pLock->acquire();
+- return true;
+- }
+- }
+- return false;
+-}
+-
+-/**
+- * Calls the pfnVMCreate hook.
+- *
+- * @returns true if we left the lock, false if we didn't.
+- * @param a_pVirtualBox The VirtualBox interface.
+- * @param a_pMachine The machine interface of the new VM.
+- * @param a_pLock The write lock held by the caller.
+- */
+-bool ExtPack::callVmCreatedHook(IVirtualBox *a_pVirtualBox, IMachine *a_pMachine, AutoWriteLock *a_pLock)
+-{
+- if ( m != NULL
+- && m->fUsable)
+- {
+- if (m->pReg->pfnVMCreated)
+- {
+- ComPtr<ExtPack> ptrSelfRef = this;
+- a_pLock->release();
+- m->pReg->pfnVMCreated(m->pReg, a_pVirtualBox, a_pMachine);
+- a_pLock->acquire();
+- return true;
+- }
+- }
+- return false;
+-}
+-
+-/**
+- * Calls the pfnVMConfigureVMM hook.
+- *
+- * @returns true if we left the lock, false if we didn't.
+- * @param a_pConsole The console interface.
+- * @param a_pVM The VM handle.
+- * @param a_pLock The write lock held by the caller.
+- * @param a_pvrc Where to return the status code of the
+- * callback. This is always set. LogRel is
+- * called on if a failure status is returned.
+- */
+-bool ExtPack::callVmConfigureVmmHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock, int *a_pvrc)
+-{
+- *a_pvrc = VINF_SUCCESS;
+- if ( m != NULL
+- && m->fUsable)
+- {
+- if (m->pReg->pfnVMConfigureVMM)
+- {
+- ComPtr<ExtPack> ptrSelfRef = this;
+- a_pLock->release();
+- int vrc = m->pReg->pfnVMConfigureVMM(m->pReg, a_pConsole, a_pVM);
+- *a_pvrc = vrc;
+- a_pLock->acquire();
+- if (RT_FAILURE(vrc))
+- LogRel(("ExtPack pfnVMConfigureVMM returned %Rrc for %s\n", vrc, m->Desc.strName.c_str()));
+- return true;
+- }
+- }
+- return false;
+-}
+-
+-/**
+- * Calls the pfnVMPowerOn hook.
+- *
+- * @returns true if we left the lock, false if we didn't.
+- * @param a_pConsole The console interface.
+- * @param a_pVM The VM handle.
+- * @param a_pLock The write lock held by the caller.
+- * @param a_pvrc Where to return the status code of the
+- * callback. This is always set. LogRel is
+- * called on if a failure status is returned.
+- */
+-bool ExtPack::callVmPowerOnHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock, int *a_pvrc)
+-{
+- *a_pvrc = VINF_SUCCESS;
+- if ( m != NULL
+- && m->fUsable)
+- {
+- if (m->pReg->pfnVMPowerOn)
+- {
+- ComPtr<ExtPack> ptrSelfRef = this;
+- a_pLock->release();
+- int vrc = m->pReg->pfnVMPowerOn(m->pReg, a_pConsole, a_pVM);
+- *a_pvrc = vrc;
+- a_pLock->acquire();
+- if (RT_FAILURE(vrc))
+- LogRel(("ExtPack pfnVMPowerOn returned %Rrc for %s\n", vrc, m->Desc.strName.c_str()));
+- return true;
+- }
+- }
+- return false;
+-}
+-
+-/**
+- * Calls the pfnVMPowerOff hook.
+- *
+- * @returns true if we left the lock, false if we didn't.
+- * @param a_pConsole The console interface.
+- * @param a_pVM The VM handle.
+- * @param a_pLock The write lock held by the caller.
+- */
+-bool ExtPack::callVmPowerOffHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock)
+-{
+- if ( m != NULL
+- && m->fUsable)
+- {
+- if (m->pReg->pfnVMPowerOff)
+- {
+- ComPtr<ExtPack> ptrSelfRef = this;
+- a_pLock->release();
+- m->pReg->pfnVMPowerOff(m->pReg, a_pConsole, a_pVM);
+- a_pLock->acquire();
+- return true;
+- }
+- }
+- return false;
+-}
+-
+-/**
+- * Check if the extension pack is usable and has an VRDE module.
+- *
+- * @returns S_OK or COM error status with error information.
+- *
+- * @remarks Caller holds the extension manager lock for reading, no locking
+- * necessary.
+- */
+-HRESULT ExtPack::checkVrde(void)
+-{
+- HRESULT hrc;
+- if ( m != NULL
+- && m->fUsable)
+- {
+- if (m->Desc.strVrdeModule.isNotEmpty())
+- hrc = S_OK;
+- else
+- hrc = setError(E_FAIL, tr("The extension pack '%s' does not include a VRDE module"), m->Desc.strName.c_str());
+- }
+- else
+- hrc = setError(E_FAIL, tr("%s"), m->strWhyUnusable.c_str());
+- return hrc;
+-}
+-
+-/**
+- * Same as checkVrde(), except that it also resolves the path to the module.
+- *
+- * @returns S_OK or COM error status with error information.
+- * @param a_pstrVrdeLibrary Where to return the path on success.
+- *
+- * @remarks Caller holds the extension manager lock for reading, no locking
+- * necessary.
+- */
+-HRESULT ExtPack::getVrdpLibraryName(Utf8Str *a_pstrVrdeLibrary)
+-{
+- HRESULT hrc = checkVrde();
+- if (SUCCEEDED(hrc))
+- {
+- if (findModule(m->Desc.strVrdeModule.c_str(), NULL, VBOXEXTPACKMODKIND_R3,
+- a_pstrVrdeLibrary, NULL /*a_pfNative*/, NULL /*a_pObjInfo*/))
+- hrc = S_OK;
+- else
+- hrc = setError(E_FAIL, tr("Failed to locate the VRDE module '%s' in extension pack '%s'"),
+- m->Desc.strVrdeModule.c_str(), m->Desc.strName.c_str());
+- }
+- return hrc;
+-}
+-
+-/**
+- * Check if this extension pack wishes to be the default VRDE provider.
+- *
+- * @returns @c true if it wants to and it is in a usable state, otherwise
+- * @c false.
+- *
+- * @remarks Caller holds the extension manager lock for reading, no locking
+- * necessary.
+- */
+-bool ExtPack::wantsToBeDefaultVrde(void) const
+-{
+- return m->fUsable
+- && m->Desc.strVrdeModule.isNotEmpty();
+-}
+-
+-/**
+- * Refreshes the extension pack state.
+- *
+- * This is called by the manager so that the on disk changes are picked up.
+- *
+- * @returns S_OK or COM error status with error information.
+- *
+- * @param a_pfCanDelete Optional can-delete-this-object output indicator.
+- *
+- * @remarks Caller holds the extension manager lock for writing.
+- * @remarks Only called in VBoxSVC.
+- */
+-HRESULT ExtPack::refresh(bool *a_pfCanDelete)
+-{
+- if (a_pfCanDelete)
+- *a_pfCanDelete = false;
+-
+- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS); /* for the COMGETTERs */
+-
+- /*
+- * Has the module been deleted?
+- */
+- RTFSOBJINFO ObjInfoExtPack;
+- int vrc = RTPathQueryInfoEx(m->strExtPackPath.c_str(), &ObjInfoExtPack, RTFSOBJATTRADD_UNIX, RTPATH_F_ON_LINK);
+- if ( RT_FAILURE(vrc)
+- || !RTFS_IS_DIRECTORY(ObjInfoExtPack.Attr.fMode))
+- {
+- if (a_pfCanDelete)
+- *a_pfCanDelete = true;
+- return S_OK;
+- }
+-
+- /*
+- * We've got a directory, so try query file system object info for the
+- * files we are interested in as well.
+- */
+- RTFSOBJINFO ObjInfoDesc;
+- char szDescFilePath[RTPATH_MAX];
+- vrc = RTPathJoin(szDescFilePath, sizeof(szDescFilePath), m->strExtPackPath.c_str(), VBOX_EXTPACK_DESCRIPTION_NAME);
+- if (RT_SUCCESS(vrc))
+- vrc = RTPathQueryInfoEx(szDescFilePath, &ObjInfoDesc, RTFSOBJATTRADD_UNIX, RTPATH_F_ON_LINK);
+- if (RT_FAILURE(vrc))
+- RT_ZERO(ObjInfoDesc);
+-
+- RTFSOBJINFO ObjInfoMainMod;
+- if (m->strMainModPath.isNotEmpty())
+- vrc = RTPathQueryInfoEx(m->strMainModPath.c_str(), &ObjInfoMainMod, RTFSOBJATTRADD_UNIX, RTPATH_F_ON_LINK);
+- if (m->strMainModPath.isEmpty() || RT_FAILURE(vrc))
+- RT_ZERO(ObjInfoMainMod);
+-
+- /*
+- * If we have a usable module already, just verify that things haven't
+- * changed since we loaded it.
+- */
+- if (m->fUsable)
+- {
+- if (m->hMainMod == NIL_RTLDRMOD)
+- probeAndLoad();
+- else if ( !objinfoIsEqual(&ObjInfoDesc, &m->ObjInfoDesc)
+- || !objinfoIsEqual(&ObjInfoMainMod, &m->ObjInfoMainMod)
+- || !objinfoIsEqual(&ObjInfoExtPack, &m->ObjInfoExtPack) )
+- {
+- /** @todo not important, so it can wait. */
+- }
+- }
+- /*
+- * Ok, it is currently not usable. If anything has changed since last time
+- * reprobe the extension pack.
+- */
+- else if ( !objinfoIsEqual(&ObjInfoDesc, &m->ObjInfoDesc)
+- || !objinfoIsEqual(&ObjInfoMainMod, &m->ObjInfoMainMod)
+- || !objinfoIsEqual(&ObjInfoExtPack, &m->ObjInfoExtPack) )
+- probeAndLoad();
+-
+- return S_OK;
+-}
+-
+-/**
+- * Probes the extension pack, loading the main dll and calling its registration
+- * entry point.
+- *
+- * This updates the state accordingly, the strWhyUnusable and fUnusable members
+- * being the most important ones.
+- */
+-void ExtPack::probeAndLoad(void)
+-{
+- m->fUsable = false;
+- m->fMadeReadyCall = false;
+-
+- /*
+- * Query the file system info for the extension pack directory. This and
+- * all other file system info we save is for the benefit of refresh().
+- */
+- int vrc = RTPathQueryInfoEx(m->strExtPackPath.c_str(), &m->ObjInfoExtPack, RTFSOBJATTRADD_UNIX, RTPATH_F_ON_LINK);
+- if (RT_FAILURE(vrc))
+- {
+- m->strWhyUnusable.printf(tr("RTPathQueryInfoEx on '%s' failed: %Rrc"), m->strExtPackPath.c_str(), vrc);
+- return;
+- }
+- if (!RTFS_IS_DIRECTORY(m->ObjInfoExtPack.Attr.fMode))
+- {
+- if (RTFS_IS_SYMLINK(m->ObjInfoExtPack.Attr.fMode))
+- m->strWhyUnusable.printf(tr("'%s' is a symbolic link, this is not allowed"), m->strExtPackPath.c_str(), vrc);
+- else if (RTFS_IS_FILE(m->ObjInfoExtPack.Attr.fMode))
+- m->strWhyUnusable.printf(tr("'%s' is a symbolic file, not a directory"), m->strExtPackPath.c_str(), vrc);
+- else
+- m->strWhyUnusable.printf(tr("'%s' is not a directory (fMode=%#x)"), m->strExtPackPath.c_str(), m->ObjInfoExtPack.Attr.fMode);
+- return;
+- }
+-
+- RTERRINFOSTATIC ErrInfo;
+- RTErrInfoInitStatic(&ErrInfo);
+- vrc = SUPR3HardenedVerifyDir(m->strExtPackPath.c_str(), true /*fRecursive*/, true /*fCheckFiles*/, &ErrInfo.Core);
+- if (RT_FAILURE(vrc))
+- {
+- m->strWhyUnusable.printf(tr("%s (rc=%Rrc)"), ErrInfo.Core.pszMsg, vrc);
+- return;
+- }
+-
+- /*
+- * Read the description file.
+- */
+- RTCString strSavedName(m->Desc.strName);
+- RTCString *pStrLoadErr = VBoxExtPackLoadDesc(m->strExtPackPath.c_str(), &m->Desc, &m->ObjInfoDesc);
+- if (pStrLoadErr != NULL)
+- {
+- m->strWhyUnusable.printf(tr("Failed to load '%s/%s': %s"),
+- m->strExtPackPath.c_str(), VBOX_EXTPACK_DESCRIPTION_NAME, pStrLoadErr->c_str());
+- m->Desc.strName = strSavedName;
+- delete pStrLoadErr;
+- return;
+- }
+-
+- /*
+- * Make sure the XML name and directory matches.
+- */
+- if (!m->Desc.strName.equalsIgnoreCase(strSavedName))
+- {
+- m->strWhyUnusable.printf(tr("The description name ('%s') and directory name ('%s') does not match"),
+- m->Desc.strName.c_str(), strSavedName.c_str());
+- m->Desc.strName = strSavedName;
+- return;
+- }
+-
+- /*
+- * Load the main DLL and call the predefined entry point.
+- */
+- bool fIsNative;
+- if (!findModule(m->Desc.strMainModule.c_str(), NULL /* default extension */, VBOXEXTPACKMODKIND_R3,
+- &m->strMainModPath, &fIsNative, &m->ObjInfoMainMod))
+- {
+- m->strWhyUnusable.printf(tr("Failed to locate the main module ('%s')"), m->Desc.strMainModule.c_str());
+- return;
+- }
+-
+- vrc = SUPR3HardenedVerifyPlugIn(m->strMainModPath.c_str(), &ErrInfo.Core);
+- if (RT_FAILURE(vrc))
+- {
+- m->strWhyUnusable.printf(tr("%s"), ErrInfo.Core.pszMsg);
+- return;
+- }
+-
+- if (fIsNative)
+- {
+- vrc = SUPR3HardenedLdrLoadPlugIn(m->strMainModPath.c_str(), &m->hMainMod, &ErrInfo.Core);
+- if (RT_FAILURE(vrc))
+- {
+- m->hMainMod = NIL_RTLDRMOD;
+- m->strWhyUnusable.printf(tr("Failed to load the main module ('%s'): %Rrc - %s"),
+- m->strMainModPath.c_str(), vrc, ErrInfo.Core.pszMsg);
+- return;
+- }
+- }
+- else
+- {
+- m->strWhyUnusable.printf(tr("Only native main modules are currently supported"));
+- return;
+- }
+-
+- /*
+- * Resolve the predefined entry point.
+- */
+- PFNVBOXEXTPACKREGISTER pfnRegistration;
+- vrc = RTLdrGetSymbol(m->hMainMod, VBOX_EXTPACK_MAIN_MOD_ENTRY_POINT, (void **)&pfnRegistration);
+- if (RT_SUCCESS(vrc))
+- {
+- RTErrInfoClear(&ErrInfo.Core);
+- vrc = pfnRegistration(&m->Hlp, &m->pReg, &ErrInfo.Core);
+- if ( RT_SUCCESS(vrc)
+- && !RTErrInfoIsSet(&ErrInfo.Core)
+- && VALID_PTR(m->pReg))
+- {
+- if ( VBOXEXTPACK_IS_MAJOR_VER_EQUAL(m->pReg->u32Version, VBOXEXTPACKREG_VERSION)
+- && m->pReg->u32EndMarker == m->pReg->u32Version)
+- {
+- if ( (!m->pReg->pfnInstalled || RT_VALID_PTR(m->pReg->pfnInstalled))
+- && (!m->pReg->pfnUninstall || RT_VALID_PTR(m->pReg->pfnUninstall))
+- && (!m->pReg->pfnVirtualBoxReady || RT_VALID_PTR(m->pReg->pfnVirtualBoxReady))
+- && (!m->pReg->pfnConsoleReady || RT_VALID_PTR(m->pReg->pfnConsoleReady))
+- && (!m->pReg->pfnUnload || RT_VALID_PTR(m->pReg->pfnUnload))
+- && (!m->pReg->pfnVMCreated || RT_VALID_PTR(m->pReg->pfnVMCreated))
+- && (!m->pReg->pfnVMConfigureVMM || RT_VALID_PTR(m->pReg->pfnVMConfigureVMM))
+- && (!m->pReg->pfnVMPowerOn || RT_VALID_PTR(m->pReg->pfnVMPowerOn))
+- && (!m->pReg->pfnVMPowerOff || RT_VALID_PTR(m->pReg->pfnVMPowerOff))
+- && (!m->pReg->pfnQueryObject || RT_VALID_PTR(m->pReg->pfnQueryObject))
+- )
+- {
+- /*
+- * We're good!
+- */
+- m->fUsable = true;
+- m->strWhyUnusable.setNull();
+- return;
+- }
+-
+- m->strWhyUnusable = tr("The registration structure contains on or more invalid function pointers");
+- }
+- else
+- m->strWhyUnusable.printf(tr("Unsupported registration structure version %u.%u"),
+- RT_HIWORD(m->pReg->u32Version), RT_LOWORD(m->pReg->u32Version));
+- }
+- else
+- m->strWhyUnusable.printf(tr("%s returned %Rrc, pReg=%p ErrInfo='%s'"),
+- VBOX_EXTPACK_MAIN_MOD_ENTRY_POINT, vrc, m->pReg, ErrInfo.Core.pszMsg);
+- m->pReg = NULL;
+- }
+- else
+- m->strWhyUnusable.printf(tr("Failed to resolve exported symbol '%s' in the main module: %Rrc"),
+- VBOX_EXTPACK_MAIN_MOD_ENTRY_POINT, vrc);
+-
+- RTLdrClose(m->hMainMod);
+- m->hMainMod = NIL_RTLDRMOD;
+-}
+-
+-/**
+- * Finds a module.
+- *
+- * @returns true if found, false if not.
+- * @param a_pszName The module base name (no extension).
+- * @param a_pszExt The extension. If NULL we use default
+- * extensions.
+- * @param a_enmKind The kind of module to locate.
+- * @param a_pStrFound Where to return the path to the module we've
+- * found.
+- * @param a_pfNative Where to return whether this is a native module
+- * or an agnostic one. Optional.
+- * @param a_pObjInfo Where to return the file system object info for
+- * the module. Optional.
+- */
+-bool ExtPack::findModule(const char *a_pszName, const char *a_pszExt, VBOXEXTPACKMODKIND a_enmKind,
+- Utf8Str *a_pStrFound, bool *a_pfNative, PRTFSOBJINFO a_pObjInfo) const
+-{
+- /*
+- * Try the native path first.
+- */
+- char szPath[RTPATH_MAX];
+- int vrc = RTPathJoin(szPath, sizeof(szPath), m->strExtPackPath.c_str(), RTBldCfgTargetDotArch());
+- AssertLogRelRCReturn(vrc, false);
+- vrc = RTPathAppend(szPath, sizeof(szPath), a_pszName);
+- AssertLogRelRCReturn(vrc, false);
+- if (!a_pszExt)
+- {
+- const char *pszDefExt;
+- switch (a_enmKind)
+- {
+- case VBOXEXTPACKMODKIND_RC: pszDefExt = ".rc"; break;
+- case VBOXEXTPACKMODKIND_R0: pszDefExt = ".r0"; break;
+- case VBOXEXTPACKMODKIND_R3: pszDefExt = RTLdrGetSuff(); break;
+- default:
+- AssertFailedReturn(false);
+- }
+- vrc = RTStrCat(szPath, sizeof(szPath), pszDefExt);
+- AssertLogRelRCReturn(vrc, false);
+- }
+-
+- RTFSOBJINFO ObjInfo;
+- if (!a_pObjInfo)
+- a_pObjInfo = &ObjInfo;
+- vrc = RTPathQueryInfo(szPath, a_pObjInfo, RTFSOBJATTRADD_UNIX);
+- if (RT_SUCCESS(vrc) && RTFS_IS_FILE(a_pObjInfo->Attr.fMode))
+- {
+- if (a_pfNative)
+- *a_pfNative = true;
+- *a_pStrFound = szPath;
+- return true;
+- }
+-
+- /*
+- * Try the platform agnostic modules.
+- */
+- /* gcc.x86/module.rel */
+- char szSubDir[32];
+- RTStrPrintf(szSubDir, sizeof(szSubDir), "%s.%s", RTBldCfgCompiler(), RTBldCfgTargetArch());
+- vrc = RTPathJoin(szPath, sizeof(szPath), m->strExtPackPath.c_str(), szSubDir);
+- AssertLogRelRCReturn(vrc, false);
+- vrc = RTPathAppend(szPath, sizeof(szPath), a_pszName);
+- AssertLogRelRCReturn(vrc, false);
+- if (!a_pszExt)
+- {
+- vrc = RTStrCat(szPath, sizeof(szPath), ".rel");
+- AssertLogRelRCReturn(vrc, false);
+- }
+- vrc = RTPathQueryInfo(szPath, a_pObjInfo, RTFSOBJATTRADD_UNIX);
+- if (RT_SUCCESS(vrc) && RTFS_IS_FILE(a_pObjInfo->Attr.fMode))
+- {
+- if (a_pfNative)
+- *a_pfNative = false;
+- *a_pStrFound = szPath;
+- return true;
+- }
+-
+- /* x86/module.rel */
+- vrc = RTPathJoin(szPath, sizeof(szPath), m->strExtPackPath.c_str(), RTBldCfgTargetArch());
+- AssertLogRelRCReturn(vrc, false);
+- vrc = RTPathAppend(szPath, sizeof(szPath), a_pszName);
+- AssertLogRelRCReturn(vrc, false);
+- if (!a_pszExt)
+- {
+- vrc = RTStrCat(szPath, sizeof(szPath), ".rel");
+- AssertLogRelRCReturn(vrc, false);
+- }
+- vrc = RTPathQueryInfo(szPath, a_pObjInfo, RTFSOBJATTRADD_UNIX);
+- if (RT_SUCCESS(vrc) && RTFS_IS_FILE(a_pObjInfo->Attr.fMode))
+- {
+- if (a_pfNative)
+- *a_pfNative = false;
+- *a_pStrFound = szPath;
+- return true;
+- }
+-
+- return false;
+-}
+-
+-/**
+- * Compares two file system object info structures.
+- *
+- * @returns true if equal, false if not.
+- * @param pObjInfo1 The first.
+- * @param pObjInfo2 The second.
+- * @todo IPRT should do this, really.
+- */
+-/* static */ bool ExtPack::objinfoIsEqual(PCRTFSOBJINFO pObjInfo1, PCRTFSOBJINFO pObjInfo2)
+-{
+- if (!RTTimeSpecIsEqual(&pObjInfo1->ModificationTime, &pObjInfo2->ModificationTime))
+- return false;
+- if (!RTTimeSpecIsEqual(&pObjInfo1->ChangeTime, &pObjInfo2->ChangeTime))
+- return false;
+- if (!RTTimeSpecIsEqual(&pObjInfo1->BirthTime, &pObjInfo2->BirthTime))
+- return false;
+- if (pObjInfo1->cbObject != pObjInfo2->cbObject)
+- return false;
+- if (pObjInfo1->Attr.fMode != pObjInfo2->Attr.fMode)
+- return false;
+- if (pObjInfo1->Attr.enmAdditional == pObjInfo2->Attr.enmAdditional)
+- {
+- switch (pObjInfo1->Attr.enmAdditional)
+- {
+- case RTFSOBJATTRADD_UNIX:
+- if (pObjInfo1->Attr.u.Unix.uid != pObjInfo2->Attr.u.Unix.uid)
+- return false;
+- if (pObjInfo1->Attr.u.Unix.gid != pObjInfo2->Attr.u.Unix.gid)
+- return false;
+- if (pObjInfo1->Attr.u.Unix.INodeIdDevice != pObjInfo2->Attr.u.Unix.INodeIdDevice)
+- return false;
+- if (pObjInfo1->Attr.u.Unix.INodeId != pObjInfo2->Attr.u.Unix.INodeId)
+- return false;
+- if (pObjInfo1->Attr.u.Unix.GenerationId != pObjInfo2->Attr.u.Unix.GenerationId)
+- return false;
+- break;
+- default:
+- break;
+- }
+- }
+- return true;
+-}
+-
+-
+-/**
+- * @interface_method_impl{VBOXEXTPACKHLP,pfnFindModule}
+- */
+-/*static*/ DECLCALLBACK(int)
+-ExtPack::hlpFindModule(PCVBOXEXTPACKHLP pHlp, const char *pszName, const char *pszExt, VBOXEXTPACKMODKIND enmKind,
+- char *pszFound, size_t cbFound, bool *pfNative)
+-{
+- /*
+- * Validate the input and get our bearings.
+- */
+- AssertPtrReturn(pszName, VERR_INVALID_POINTER);
+- AssertPtrNullReturn(pszExt, VERR_INVALID_POINTER);
+- AssertPtrReturn(pszFound, VERR_INVALID_POINTER);
+- AssertPtrNullReturn(pfNative, VERR_INVALID_POINTER);
+- AssertReturn(enmKind > VBOXEXTPACKMODKIND_INVALID && enmKind < VBOXEXTPACKMODKIND_END, VERR_INVALID_PARAMETER);
+-
+- AssertPtrReturn(pHlp, VERR_INVALID_POINTER);
+- AssertReturn(pHlp->u32Version == VBOXEXTPACKHLP_VERSION, VERR_INVALID_POINTER);
+- ExtPack::Data *m = RT_FROM_CPP_MEMBER(pHlp, Data, Hlp);
+- AssertPtrReturn(m, VERR_INVALID_POINTER);
+- ExtPack *pThis = m->pThis;
+- AssertPtrReturn(pThis, VERR_INVALID_POINTER);
+-
+- /*
+- * This is just a wrapper around findModule.
+- */
+- Utf8Str strFound;
+- if (pThis->findModule(pszName, pszExt, enmKind, &strFound, pfNative, NULL))
+- return RTStrCopy(pszFound, cbFound, strFound.c_str());
+- return VERR_FILE_NOT_FOUND;
+-}
+-
+-/*static*/ DECLCALLBACK(int)
+-ExtPack::hlpGetFilePath(PCVBOXEXTPACKHLP pHlp, const char *pszFilename, char *pszPath, size_t cbPath)
+-{
+- /*
+- * Validate the input and get our bearings.
+- */
+- AssertPtrReturn(pszFilename, VERR_INVALID_POINTER);
+- AssertPtrReturn(pszPath, VERR_INVALID_POINTER);
+- AssertReturn(cbPath > 0, VERR_BUFFER_OVERFLOW);
+-
+- AssertPtrReturn(pHlp, VERR_INVALID_POINTER);
+- AssertReturn(pHlp->u32Version == VBOXEXTPACKHLP_VERSION, VERR_INVALID_POINTER);
+- ExtPack::Data *m = RT_FROM_CPP_MEMBER(pHlp, Data, Hlp);
+- AssertPtrReturn(m, VERR_INVALID_POINTER);
+- ExtPack *pThis = m->pThis;
+- AssertPtrReturn(pThis, VERR_INVALID_POINTER);
+-
+- /*
+- * This is a simple RTPathJoin, no checking if things exists or anything.
+- */
+- int vrc = RTPathJoin(pszPath, cbPath, pThis->m->strExtPackPath.c_str(), pszFilename);
+- if (RT_FAILURE(vrc))
+- RT_BZERO(pszPath, cbPath);
+- return vrc;
+-}
+-
+-/*static*/ DECLCALLBACK(VBOXEXTPACKCTX)
+-ExtPack::hlpGetContext(PCVBOXEXTPACKHLP pHlp)
+-{
+- /*
+- * Validate the input and get our bearings.
+- */
+- AssertPtrReturn(pHlp, VBOXEXTPACKCTX_INVALID);
+- AssertReturn(pHlp->u32Version == VBOXEXTPACKHLP_VERSION, VBOXEXTPACKCTX_INVALID);
+- ExtPack::Data *m = RT_FROM_CPP_MEMBER(pHlp, Data, Hlp);
+- AssertPtrReturn(m, VBOXEXTPACKCTX_INVALID);
+- ExtPack *pThis = m->pThis;
+- AssertPtrReturn(pThis, VBOXEXTPACKCTX_INVALID);
+-
+- return pThis->m->enmContext;
+-}
+-
+-/*static*/ DECLCALLBACK(int)
+-ExtPack::hlpReservedN(PCVBOXEXTPACKHLP pHlp)
+-{
+- /*
+- * Validate the input and get our bearings.
+- */
+- AssertPtrReturn(pHlp, VERR_INVALID_POINTER);
+- AssertReturn(pHlp->u32Version == VBOXEXTPACKHLP_VERSION, VERR_INVALID_POINTER);
+- ExtPack::Data *m = RT_FROM_CPP_MEMBER(pHlp, Data, Hlp);
+- AssertPtrReturn(m, VERR_INVALID_POINTER);
+- ExtPack *pThis = m->pThis;
+- AssertPtrReturn(pThis, VERR_INVALID_POINTER);
+-
+- return VERR_NOT_IMPLEMENTED;
+-}
+-
+-
+-
+-
+-
+-STDMETHODIMP ExtPack::COMGETTER(Name)(BSTR *a_pbstrName)
+-{
+- CheckComArgOutPointerValid(a_pbstrName);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- Bstr str(m->Desc.strName);
+- str.cloneTo(a_pbstrName);
+- }
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPack::COMGETTER(Description)(BSTR *a_pbstrDescription)
+-{
+- CheckComArgOutPointerValid(a_pbstrDescription);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- Bstr str(m->Desc.strDescription);
+- str.cloneTo(a_pbstrDescription);
+- }
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPack::COMGETTER(Version)(BSTR *a_pbstrVersion)
+-{
+- CheckComArgOutPointerValid(a_pbstrVersion);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- /* HACK ALERT: This is for easing backporting to 4.1. The edition stuff
+- will be changed into a separate */
+- if (m->Desc.strEdition.isEmpty())
+- {
+- Bstr str(m->Desc.strVersion);
+- str.cloneTo(a_pbstrVersion);
+- }
+- else
+- {
+- RTCString strHack(m->Desc.strVersion);
+- strHack.append('-');
+- strHack.append(m->Desc.strEdition);
+-
+- Bstr str(strHack);
+- str.cloneTo(a_pbstrVersion);
+- }
+- }
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPack::COMGETTER(Revision)(ULONG *a_puRevision)
+-{
+- CheckComArgOutPointerValid(a_puRevision);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- *a_puRevision = m->Desc.uRevision;
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPack::COMGETTER(VRDEModule)(BSTR *a_pbstrVrdeModule)
+-{
+- CheckComArgOutPointerValid(a_pbstrVrdeModule);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- Bstr str(m->Desc.strVrdeModule);
+- str.cloneTo(a_pbstrVrdeModule);
+- }
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPack::COMGETTER(PlugIns)(ComSafeArrayOut(IExtPackPlugIn *, a_paPlugIns))
+-{
+- /** @todo implement plug-ins. */
+-#ifdef VBOX_WITH_XPCOM
+- NOREF(a_paPlugIns);
+- NOREF(a_paPlugInsSize);
+-#endif
+- ReturnComNotImplemented();
+-}
+-
+-STDMETHODIMP ExtPack::COMGETTER(Usable)(BOOL *a_pfUsable)
+-{
+- CheckComArgOutPointerValid(a_pfUsable);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- *a_pfUsable = m->fUsable;
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPack::COMGETTER(WhyUnusable)(BSTR *a_pbstrWhy)
+-{
+- CheckComArgOutPointerValid(a_pbstrWhy);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- m->strWhyUnusable.cloneTo(a_pbstrWhy);
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPack::COMGETTER(ShowLicense)(BOOL *a_pfShowIt)
+-{
+- CheckComArgOutPointerValid(a_pfShowIt);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- *a_pfShowIt = m->Desc.fShowLicense;
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPack::COMGETTER(License)(BSTR *a_pbstrHtmlLicense)
+-{
+- Bstr bstrHtml("html");
+- return QueryLicense(Bstr::Empty.raw(), Bstr::Empty.raw(), bstrHtml.raw(), a_pbstrHtmlLicense);
+-}
+-
+-STDMETHODIMP ExtPack::QueryLicense(IN_BSTR a_bstrPreferredLocale, IN_BSTR a_bstrPreferredLanguage, IN_BSTR a_bstrFormat,
+- BSTR *a_pbstrLicense)
+-{
+- /*
+- * Validate input.
+- */
+- CheckComArgOutPointerValid(a_pbstrLicense);
+- CheckComArgNotNull(a_bstrPreferredLocale);
+- CheckComArgNotNull(a_bstrPreferredLanguage);
+- CheckComArgNotNull(a_bstrFormat);
+-
+- Utf8Str strPreferredLocale(a_bstrPreferredLocale);
+- if (strPreferredLocale.length() != 2 && strPreferredLocale.length() != 0)
+- return setError(E_FAIL, tr("The preferred locale is a two character string or empty."));
+-
+- Utf8Str strPreferredLanguage(a_bstrPreferredLanguage);
+- if (strPreferredLanguage.length() != 2 && strPreferredLanguage.length() != 0)
+- return setError(E_FAIL, tr("The preferred lanuage is a two character string or empty."));
+-
+- Utf8Str strFormat(a_bstrFormat);
+- if ( !strFormat.equals("html")
+- && !strFormat.equals("rtf")
+- && !strFormat.equals("txt"))
+- return setError(E_FAIL, tr("The license format can only have the values 'html', 'rtf' and 'txt'."));
+-
+- /*
+- * Combine the options to form a file name before locking down anything.
+- */
+- char szName[sizeof(VBOX_EXTPACK_LICENSE_NAME_PREFIX "-de_DE.html") + 2];
+- if (strPreferredLocale.isNotEmpty() && strPreferredLanguage.isNotEmpty())
+- RTStrPrintf(szName, sizeof(szName), VBOX_EXTPACK_LICENSE_NAME_PREFIX "-%s_%s.%s",
+- strPreferredLocale.c_str(), strPreferredLanguage.c_str(), strFormat.c_str());
+- else if (strPreferredLocale.isNotEmpty())
+- RTStrPrintf(szName, sizeof(szName), VBOX_EXTPACK_LICENSE_NAME_PREFIX "-%s.%s", strPreferredLocale.c_str(), strFormat.c_str());
+- else if (strPreferredLanguage.isNotEmpty())
+- RTStrPrintf(szName, sizeof(szName), VBOX_EXTPACK_LICENSE_NAME_PREFIX "-_%s.%s", strPreferredLocale.c_str(), strFormat.c_str());
+- else
+- RTStrPrintf(szName, sizeof(szName), VBOX_EXTPACK_LICENSE_NAME_PREFIX ".%s", strFormat.c_str());
+-
+- /*
+- * Effectuate the query.
+- */
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS); /* paranoia */
+-
+- if (!m->fUsable)
+- hrc = setError(E_FAIL, tr("%s"), m->strWhyUnusable.c_str());
+- else
+- {
+- char szPath[RTPATH_MAX];
+- int vrc = RTPathJoin(szPath, sizeof(szPath), m->strExtPackPath.c_str(), szName);
+- if (RT_SUCCESS(vrc))
+- {
+- void *pvFile;
+- size_t cbFile;
+- vrc = RTFileReadAllEx(szPath, 0, RTFOFF_MAX, RTFILE_RDALL_O_DENY_READ, &pvFile, &cbFile);
+- if (RT_SUCCESS(vrc))
+- {
+- Bstr bstrLicense((const char *)pvFile, cbFile);
+- if (bstrLicense.isNotEmpty())
+- {
+- bstrLicense.detachTo(a_pbstrLicense);
+- hrc = S_OK;
+- }
+- else
+- hrc = setError(VBOX_E_IPRT_ERROR, tr("The license file '%s' is empty or contains invalid UTF-8 encoding"),
+- szPath);
+- RTFileReadAllFree(pvFile, cbFile);
+- }
+- else if (vrc == VERR_FILE_NOT_FOUND || vrc == VERR_PATH_NOT_FOUND)
+- hrc = setError(VBOX_E_OBJECT_NOT_FOUND, tr("The license file '%s' was not found in extension pack '%s'"),
+- szName, m->Desc.strName.c_str());
+- else
+- hrc = setError(VBOX_E_FILE_ERROR, tr("Failed to open the license file '%s': %Rrc"), szPath, vrc);
+- }
+- else
+- hrc = setError(VBOX_E_IPRT_ERROR, tr("RTPathJoin failed: %Rrc"), vrc);
+- }
+- }
+- return hrc;
+-}
+-
+-
+-STDMETHODIMP ExtPack::QueryObject(IN_BSTR a_bstrObjectId, IUnknown **a_ppUnknown)
+-{
+- com::Guid ObjectId;
+- CheckComArgGuid(a_bstrObjectId, ObjectId);
+- CheckComArgOutPointerValid(a_ppUnknown);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- if ( m->pReg
+- && m->pReg->pfnQueryObject)
+- {
+- void *pvUnknown = m->pReg->pfnQueryObject(m->pReg, ObjectId.raw());
+- if (pvUnknown)
+- *a_ppUnknown = (IUnknown *)pvUnknown;
+- else
+- hrc = E_NOINTERFACE;
+- }
+- else
+- hrc = E_NOINTERFACE;
+- }
+- return hrc;
+-}
+-
+-
+-
+-
+-DEFINE_EMPTY_CTOR_DTOR(ExtPackManager)
+-
+-/**
+- * Called by ComObjPtr::createObject when creating the object.
+- *
+- * Just initialize the basic object state, do the rest in init().
+- *
+- * @returns S_OK.
+- */
+-HRESULT ExtPackManager::FinalConstruct()
+-{
+- m = NULL;
+- return S_OK;
+-}
+-
+-/**
+- * Initializes the extension pack manager.
+- *
+- * @returns COM status code.
+- * @param a_pVirtualBox Pointer to the VirtualBox object.
+- * @param a_enmContext The context we're in.
+- */
+-HRESULT ExtPackManager::initExtPackManager(VirtualBox *a_pVirtualBox, VBOXEXTPACKCTX a_enmContext)
+-{
+- AutoInitSpan autoInitSpan(this);
+- AssertReturn(autoInitSpan.isOk(), E_FAIL);
+-
+- /*
+- * Figure some stuff out before creating the instance data.
+- */
+- char szBaseDir[RTPATH_MAX];
+- int rc = RTPathAppPrivateArchTop(szBaseDir, sizeof(szBaseDir));
+- AssertLogRelRCReturn(rc, E_FAIL);
+- rc = RTPathAppend(szBaseDir, sizeof(szBaseDir), VBOX_EXTPACK_INSTALL_DIR);
+- AssertLogRelRCReturn(rc, E_FAIL);
+-
+- char szCertificatDir[RTPATH_MAX];
+- rc = RTPathAppPrivateNoArch(szCertificatDir, sizeof(szCertificatDir));
+- AssertLogRelRCReturn(rc, E_FAIL);
+- rc = RTPathAppend(szCertificatDir, sizeof(szCertificatDir), VBOX_EXTPACK_CERT_DIR);
+- AssertLogRelRCReturn(rc, E_FAIL);
+-
+- /*
+- * Allocate and initialize the instance data.
+- */
+- m = new Data;
+- m->strBaseDir = szBaseDir;
+- m->strCertificatDirPath = szCertificatDir;
+- m->pVirtualBox = a_pVirtualBox;
+- m->enmContext = a_enmContext;
+-
+- /*
+- * Slurp in VBoxVMM which is used by VBoxPuelMain.
+- */
+-#if !defined(RT_OS_WINDOWS) && !defined(RT_OS_DARWIN)
+- if (a_enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON)
+- {
+- int vrc = SUPR3HardenedLdrLoadAppPriv("VBoxVMM", &m->hVBoxVMM, RTLDRLOAD_FLAGS_GLOBAL, NULL);
+- if (RT_FAILURE(vrc))
+- m->hVBoxVMM = NIL_RTLDRMOD;
+- /* cleanup in ::uninit()? */
+- }
+-#endif
+-
+- /*
+- * Go looking for extensions. The RTDirOpen may fail if nothing has been
+- * installed yet, or if root is paranoid and has revoked our access to them.
+- *
+- * We ASSUME that there are no files, directories or stuff in the directory
+- * that exceed the max name length in RTDIRENTRYEX.
+- */
+- HRESULT hrc = S_OK;
+- PRTDIR pDir;
+- int vrc = RTDirOpen(&pDir, szBaseDir);
+- if (RT_SUCCESS(vrc))
+- {
+- for (;;)
+- {
+- RTDIRENTRYEX Entry;
+- vrc = RTDirReadEx(pDir, &Entry, NULL /*pcbDirEntry*/, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK);
+- if (RT_FAILURE(vrc))
+- {
+- AssertLogRelMsg(vrc == VERR_NO_MORE_FILES, ("%Rrc\n", vrc));
+- break;
+- }
+- if ( RTFS_IS_DIRECTORY(Entry.Info.Attr.fMode)
+- && strcmp(Entry.szName, ".") != 0
+- && strcmp(Entry.szName, "..") != 0
+- && VBoxExtPackIsValidMangledName(Entry.szName) )
+- {
+- /*
+- * All directories are extensions, the shall be nothing but
+- * extensions in this subdirectory.
+- */
+- char szExtPackDir[RTPATH_MAX];
+- vrc = RTPathJoin(szExtPackDir, sizeof(szExtPackDir), m->strBaseDir.c_str(), Entry.szName);
+- AssertLogRelRC(vrc);
+- if (RT_SUCCESS(vrc))
+- {
+- RTCString *pstrName = VBoxExtPackUnmangleName(Entry.szName, RTSTR_MAX);
+- AssertLogRel(pstrName);
+- if (pstrName)
+- {
+- ComObjPtr<ExtPack> NewExtPack;
+- HRESULT hrc2 = NewExtPack.createObject();
+- if (SUCCEEDED(hrc2))
+- hrc2 = NewExtPack->initWithDir(a_enmContext, pstrName->c_str(), szExtPackDir);
+- delete pstrName;
+- if (SUCCEEDED(hrc2))
+- m->llInstalledExtPacks.push_back(NewExtPack);
+- else if (SUCCEEDED(rc))
+- hrc = hrc2;
+- }
+- else
+- hrc = E_UNEXPECTED;
+- }
+- else
+- hrc = E_UNEXPECTED;
+- }
+- }
+- RTDirClose(pDir);
+- }
+- /* else: ignore, the directory probably does not exist or something. */
+-
+- if (SUCCEEDED(hrc))
+- autoInitSpan.setSucceeded();
+- return hrc;
+-}
+-
+-/**
+- * COM cruft.
+- */
+-void ExtPackManager::FinalRelease()
+-{
+- uninit();
+-}
+-
+-/**
+- * Do the actual cleanup.
+- */
+-void ExtPackManager::uninit()
+-{
+- /* Enclose the state transition Ready->InUninit->NotReady */
+- AutoUninitSpan autoUninitSpan(this);
+- if (!autoUninitSpan.uninitDone() && m != NULL)
+- {
+- delete m;
+- m = NULL;
+- }
+-}
+-
+-
+-STDMETHODIMP ExtPackManager::COMGETTER(InstalledExtPacks)(ComSafeArrayOut(IExtPack *, a_paExtPacks))
+-{
+- CheckComArgOutSafeArrayPointerValid(a_paExtPacks);
+- Assert(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+-
+- SafeIfaceArray<IExtPack> SaExtPacks(m->llInstalledExtPacks);
+- SaExtPacks.detachTo(ComSafeArrayOutArg(a_paExtPacks));
+- }
+-
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackManager::Find(IN_BSTR a_bstrName, IExtPack **a_pExtPack)
+-{
+- CheckComArgNotNull(a_bstrName);
+- CheckComArgOutPointerValid(a_pExtPack);
+- Utf8Str strName(a_bstrName);
+- Assert(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+-
+- ComPtr<ExtPack> ptrExtPack = findExtPack(strName.c_str());
+- if (!ptrExtPack.isNull())
+- ptrExtPack.queryInterfaceTo(a_pExtPack);
+- else
+- hrc = VBOX_E_OBJECT_NOT_FOUND;
+- }
+-
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackManager::OpenExtPackFile(IN_BSTR a_bstrTarballAndDigest, IExtPackFile **a_ppExtPackFile)
+-{
+- CheckComArgNotNull(a_bstrTarballAndDigest);
+- CheckComArgOutPointerValid(a_ppExtPackFile);
+- AssertReturn(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON, E_UNEXPECTED);
+-
+- /* The API can optionally take a ::SHA-256=<hex-digest> attribute at the
+- end of the file name. This is just a temporary measure for
+- backporting, in 4.2 we'll add another parameter to the method. */
+- Utf8Str strTarball;
+- Utf8Str strDigest;
+- Utf8Str strTarballAndDigest(a_bstrTarballAndDigest);
+- size_t offSha256 = strTarballAndDigest.find("::SHA-256=");
+- if (offSha256 == Utf8Str::npos)
+- strTarball = strTarballAndDigest;
+- else
+- {
+- strTarball = strTarballAndDigest.substr(0, offSha256);
+- strDigest = strTarballAndDigest.substr(offSha256 + sizeof("::SHA-256=") - 1);
+- }
+-
+- ComObjPtr<ExtPackFile> NewExtPackFile;
+- HRESULT hrc = NewExtPackFile.createObject();
+- if (SUCCEEDED(hrc))
+- hrc = NewExtPackFile->initWithFile(strTarball.c_str(), strDigest.c_str(), this, m->pVirtualBox);
+- if (SUCCEEDED(hrc))
+- NewExtPackFile.queryInterfaceTo(a_ppExtPackFile);
+-
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackManager::Uninstall(IN_BSTR a_bstrName, BOOL a_fForcedRemoval, IN_BSTR a_bstrDisplayInfo,
+- IProgress **a_ppProgress)
+-{
+- CheckComArgNotNull(a_bstrName);
+- if (a_ppProgress)
+- *a_ppProgress = NULL;
+- Assert(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- PEXTPACKUNINSTALLJOB pJob = NULL;
+- try
+- {
+- pJob = new EXTPACKUNINSTALLJOB;
+- pJob->ptrExtPackMgr = this;
+- pJob->strName = a_bstrName;
+- pJob->fForcedRemoval = a_fForcedRemoval != FALSE;
+- pJob->strDisplayInfo = a_bstrDisplayInfo;
+- hrc = pJob->ptrProgress.createObject();
+- if (SUCCEEDED(hrc))
+- {
+- Bstr bstrDescription = tr("Uninstalling extension pack");
+- hrc = pJob->ptrProgress->init(
+-#ifndef VBOX_COM_INPROC
+- m->pVirtualBox,
+-#endif
+- static_cast<IExtPackManager *>(this),
+- bstrDescription.raw(),
+- FALSE /*aCancelable*/,
+- NULL /*aId*/);
+- }
+- if (SUCCEEDED(hrc))
+- {
+- ComPtr<Progress> ptrProgress = pJob->ptrProgress;
+- int vrc = RTThreadCreate(NULL /*phThread*/, ExtPackManager::doUninstallThreadProc, pJob, 0,
+- RTTHREADTYPE_DEFAULT, 0 /*fFlags*/, "ExtPackUninst");
+- if (RT_SUCCESS(vrc))
+- {
+- pJob = NULL; /* the thread deletes it */
+- ptrProgress.queryInterfaceTo(a_ppProgress);
+- }
+- else
+- hrc = setError(VBOX_E_IPRT_ERROR, tr("RTThreadCreate failed with %Rrc"), vrc);
+- }
+- }
+- catch (std::bad_alloc)
+- {
+- hrc = E_OUTOFMEMORY;
+- }
+- if (pJob)
+- delete pJob;
+- }
+-
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackManager::Cleanup(void)
+-{
+- Assert(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- /*
+- * Run the set-uid-to-root binary that performs the cleanup.
+- *
+- * Take the write lock to prevent conflicts with other calls to this
+- * VBoxSVC instance.
+- */
+- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+- hrc = runSetUidToRootHelper(NULL,
+- "cleanup",
+- "--base-dir", m->strBaseDir.c_str(),
+- (const char *)NULL);
+- }
+-
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackManager::QueryAllPlugInsForFrontend(IN_BSTR a_bstrFrontend, ComSafeArrayOut(BSTR, a_pabstrPlugInModules))
+-{
+- CheckComArgNotNull(a_bstrFrontend);
+- Utf8Str strName(a_bstrFrontend);
+- CheckComArgOutSafeArrayPointerValid(a_pabstrPlugInModules);
+- Assert(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- com::SafeArray<BSTR> saPaths((size_t)0);
+- /** @todo implement plug-ins */
+- saPaths.detachTo(ComSafeArrayOutArg(a_pabstrPlugInModules));
+- }
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackManager::IsExtPackUsable(IN_BSTR a_bstrExtPack, BOOL *aUsable)
+-{
+- CheckComArgNotNull(a_bstrExtPack);
+- Utf8Str strExtPack(a_bstrExtPack);
+- *aUsable = isExtPackUsable(strExtPack.c_str());
+- return S_OK;
+-}
+-
+-/**
+- * Finds the success indicator string in the stderr output ofr hte helper app.
+- *
+- * @returns Pointer to the indicator.
+- * @param psz The stderr output string. Can be NULL.
+- * @param cch The size of the string.
+- */
+-static char *findSuccessIndicator(char *psz, size_t cch)
+-{
+- static const char s_szSuccessInd[] = "rcExit=RTEXITCODE_SUCCESS";
+- Assert(!cch || strlen(psz) == cch);
+- if (cch < sizeof(s_szSuccessInd) - 1)
+- return NULL;
+- char *pszInd = &psz[cch - sizeof(s_szSuccessInd) + 1];
+- if (strcmp(s_szSuccessInd, pszInd))
+- return NULL;
+- return pszInd;
+-}
+-
+-/**
+- * Runs the helper application that does the privileged operations.
+- *
+- * @returns S_OK or a failure status with error information set.
+- * @param a_pstrDisplayInfo Platform specific display info hacks.
+- * @param a_pszCommand The command to execute.
+- * @param ... The argument strings that goes along with the
+- * command. Maximum is about 16. Terminated by a
+- * NULL.
+- */
+-HRESULT ExtPackManager::runSetUidToRootHelper(Utf8Str const *a_pstrDisplayInfo, const char *a_pszCommand, ...)
+-{
+- /*
+- * Calculate the path to the helper application.
+- */
+- char szExecName[RTPATH_MAX];
+- int vrc = RTPathAppPrivateArch(szExecName, sizeof(szExecName));
+- AssertLogRelRCReturn(vrc, E_UNEXPECTED);
+-
+- vrc = RTPathAppend(szExecName, sizeof(szExecName), VBOX_EXTPACK_HELPER_NAME);
+- AssertLogRelRCReturn(vrc, E_UNEXPECTED);
+-
+- /*
+- * Convert the variable argument list to a RTProcCreate argument vector.
+- */
+- const char *apszArgs[20];
+- unsigned cArgs = 0;
+-
+- LogRel(("ExtPack: Executing '%s'", szExecName));
+- apszArgs[cArgs++] = &szExecName[0];
+-
+- if ( a_pstrDisplayInfo
+- && a_pstrDisplayInfo->isNotEmpty())
+- {
+- LogRel((" '--display-info-hack' '%s'", a_pstrDisplayInfo->c_str()));
+- apszArgs[cArgs++] = "--display-info-hack";
+- apszArgs[cArgs++] = a_pstrDisplayInfo->c_str();
+- }
+-
+- LogRel(("'%s'", a_pszCommand));
+- apszArgs[cArgs++] = a_pszCommand;
+-
+- va_list va;
+- va_start(va, a_pszCommand);
+- const char *pszLastArg;
+- for (;;)
+- {
+- AssertReturn(cArgs < RT_ELEMENTS(apszArgs) - 1, E_UNEXPECTED);
+- pszLastArg = va_arg(va, const char *);
+- if (!pszLastArg)
+- break;
+- LogRel((" '%s'", pszLastArg));
+- apszArgs[cArgs++] = pszLastArg;
+- };
+- va_end(va);
+-
+- LogRel(("\n"));
+- apszArgs[cArgs] = NULL;
+-
+- /*
+- * Create a PIPE which we attach to stderr so that we can read the error
+- * message on failure and report it back to the caller.
+- */
+- RTPIPE hPipeR;
+- RTHANDLE hStdErrPipe;
+- hStdErrPipe.enmType = RTHANDLETYPE_PIPE;
+- vrc = RTPipeCreate(&hPipeR, &hStdErrPipe.u.hPipe, RTPIPE_C_INHERIT_WRITE);
+- AssertLogRelRCReturn(vrc, E_UNEXPECTED);
+-
+- /*
+- * Spawn the process.
+- */
+- HRESULT hrc;
+- RTPROCESS hProcess;
+- vrc = RTProcCreateEx(szExecName,
+- apszArgs,
+- RTENV_DEFAULT,
+- 0 /*fFlags*/,
+- NULL /*phStdIn*/,
+- NULL /*phStdOut*/,
+- &hStdErrPipe,
+- NULL /*pszAsUser*/,
+- NULL /*pszPassword*/,
+- &hProcess);
+- if (RT_SUCCESS(vrc))
+- {
+- vrc = RTPipeClose(hStdErrPipe.u.hPipe);
+- hStdErrPipe.u.hPipe = NIL_RTPIPE;
+-
+- /*
+- * Read the pipe output until the process completes.
+- */
+- RTPROCSTATUS ProcStatus = { -42, RTPROCEXITREASON_ABEND };
+- size_t cbStdErrBuf = 0;
+- size_t offStdErrBuf = 0;
+- char *pszStdErrBuf = NULL;
+- do
+- {
+- /*
+- * Service the pipe. Block waiting for output or the pipe breaking
+- * when the process terminates.
+- */
+- if (hPipeR != NIL_RTPIPE)
+- {
+- char achBuf[1024];
+- size_t cbRead;
+- vrc = RTPipeReadBlocking(hPipeR, achBuf, sizeof(achBuf), &cbRead);
+- if (RT_SUCCESS(vrc))
+- {
+- /* grow the buffer? */
+- size_t cbBufReq = offStdErrBuf + cbRead + 1;
+- if ( cbBufReq > cbStdErrBuf
+- && cbBufReq < _256K)
+- {
+- size_t cbNew = RT_ALIGN_Z(cbBufReq, 16); // 1024
+- void *pvNew = RTMemRealloc(pszStdErrBuf, cbNew);
+- if (pvNew)
+- {
+- pszStdErrBuf = (char *)pvNew;
+- cbStdErrBuf = cbNew;
+- }
+- }
+-
+- /* append if we've got room. */
+- if (cbBufReq <= cbStdErrBuf)
+- {
+- memcpy(&pszStdErrBuf[offStdErrBuf], achBuf, cbRead);
+- offStdErrBuf = offStdErrBuf + cbRead;
+- pszStdErrBuf[offStdErrBuf] = '\0';
+- }
+- }
+- else
+- {
+- AssertLogRelMsg(vrc == VERR_BROKEN_PIPE, ("%Rrc\n", vrc));
+- RTPipeClose(hPipeR);
+- hPipeR = NIL_RTPIPE;
+- }
+- }
+-
+- /*
+- * Service the process. Block if we have no pipe.
+- */
+- if (hProcess != NIL_RTPROCESS)
+- {
+- vrc = RTProcWait(hProcess,
+- hPipeR == NIL_RTPIPE ? RTPROCWAIT_FLAGS_BLOCK : RTPROCWAIT_FLAGS_NOBLOCK,
+- &ProcStatus);
+- if (RT_SUCCESS(vrc))
+- hProcess = NIL_RTPROCESS;
+- else
+- AssertLogRelMsgStmt(vrc == VERR_PROCESS_RUNNING, ("%Rrc\n", vrc), hProcess = NIL_RTPROCESS);
+- }
+- } while ( hPipeR != NIL_RTPIPE
+- || hProcess != NIL_RTPROCESS);
+-
+- LogRel(("ExtPack: enmReason=%d iStatus=%d stderr='%s'\n",
+- ProcStatus.enmReason, ProcStatus.iStatus, offStdErrBuf ? pszStdErrBuf : ""));
+-
+- /*
+- * Look for rcExit=RTEXITCODE_SUCCESS at the end of the error output,
+- * cut it as it is only there to attest the success.
+- */
+- if (offStdErrBuf > 0)
+- {
+- RTStrStripR(pszStdErrBuf);
+- offStdErrBuf = strlen(pszStdErrBuf);
+- }
+-
+- char *pszSuccessInd = findSuccessIndicator(pszStdErrBuf, offStdErrBuf);
+- if (pszSuccessInd)
+- {
+- *pszSuccessInd = '\0';
+- offStdErrBuf = pszSuccessInd - pszStdErrBuf;
+- }
+- else if ( ProcStatus.enmReason == RTPROCEXITREASON_NORMAL
+- && ProcStatus.iStatus == 0)
+- ProcStatus.iStatus = offStdErrBuf ? 667 : 666;
+-
+- /*
+- * Compose the status code and, on failure, error message.
+- */
+- if ( ProcStatus.enmReason == RTPROCEXITREASON_NORMAL
+- && ProcStatus.iStatus == 0)
+- hrc = S_OK;
+- else if (ProcStatus.enmReason == RTPROCEXITREASON_NORMAL)
+- {
+- AssertMsg(ProcStatus.iStatus != 0, ("%s\n", pszStdErrBuf));
+- hrc = setError(E_FAIL, tr("The installer failed with exit code %d: %s"),
+- ProcStatus.iStatus, offStdErrBuf ? pszStdErrBuf : "");
+- }
+- else if (ProcStatus.enmReason == RTPROCEXITREASON_SIGNAL)
+- hrc = setError(E_UNEXPECTED, tr("The installer was killed by signal #d (stderr: %s)"),
+- ProcStatus.iStatus, offStdErrBuf ? pszStdErrBuf : "");
+- else if (ProcStatus.enmReason == RTPROCEXITREASON_ABEND)
+- hrc = setError(E_UNEXPECTED, tr("The installer aborted abnormally (stderr: %s)"),
+- offStdErrBuf ? pszStdErrBuf : "");
+- else
+- hrc = setError(E_UNEXPECTED, tr("internal error: enmReason=%d iStatus=%d stderr='%s'"),
+- ProcStatus.enmReason, ProcStatus.iStatus, offStdErrBuf ? pszStdErrBuf : "");
+-
+- RTMemFree(pszStdErrBuf);
+- }
+- else
+- hrc = setError(VBOX_E_IPRT_ERROR, tr("Failed to launch the helper application '%s' (%Rrc)"), szExecName, vrc);
+-
+- RTPipeClose(hPipeR);
+- RTPipeClose(hStdErrPipe.u.hPipe);
+-
+- return hrc;
+-}
+-
+-/**
+- * Finds an installed extension pack.
+- *
+- * @returns Pointer to the extension pack if found, NULL if not. (No reference
+- * counting problem here since the caller must be holding the lock.)
+- * @param a_pszName The name of the extension pack.
+- */
+-ExtPack *ExtPackManager::findExtPack(const char *a_pszName)
+-{
+- size_t cchName = strlen(a_pszName);
+-
+- for (ExtPackList::iterator it = m->llInstalledExtPacks.begin();
+- it != m->llInstalledExtPacks.end();
+- it++)
+- {
+- ExtPack::Data *pExtPackData = (*it)->m;
+- if ( pExtPackData
+- && pExtPackData->Desc.strName.length() == cchName
+- && pExtPackData->Desc.strName.equalsIgnoreCase(a_pszName))
+- return (*it);
+- }
+- return NULL;
+-}
+-
+-/**
+- * Removes an installed extension pack from the internal list.
+- *
+- * The package is expected to exist!
+- *
+- * @param a_pszName The name of the extension pack.
+- */
+-void ExtPackManager::removeExtPack(const char *a_pszName)
+-{
+- size_t cchName = strlen(a_pszName);
+-
+- for (ExtPackList::iterator it = m->llInstalledExtPacks.begin();
+- it != m->llInstalledExtPacks.end();
+- it++)
+- {
+- ExtPack::Data *pExtPackData = (*it)->m;
+- if ( pExtPackData
+- && pExtPackData->Desc.strName.length() == cchName
+- && pExtPackData->Desc.strName.equalsIgnoreCase(a_pszName))
+- {
+- m->llInstalledExtPacks.erase(it);
+- return;
+- }
+- }
+- AssertMsgFailed(("%s\n", a_pszName));
+-}
+-
+-/**
+- * Refreshes the specified extension pack.
+- *
+- * This may remove the extension pack from the list, so any non-smart pointers
+- * to the extension pack object may become invalid.
+- *
+- * @returns S_OK and *a_ppExtPack on success, COM status code and error
+- * message on failure. Note that *a_ppExtPack can be NULL.
+- *
+- * @param a_pszName The extension to update..
+- * @param a_fUnusableIsError If @c true, report an unusable extension pack
+- * as an error.
+- * @param a_ppExtPack Where to store the pointer to the extension
+- * pack of it is still around after the refresh.
+- * This is optional.
+- *
+- * @remarks Caller holds the extension manager lock.
+- * @remarks Only called in VBoxSVC.
+- */
+-HRESULT ExtPackManager::refreshExtPack(const char *a_pszName, bool a_fUnusableIsError, ExtPack **a_ppExtPack)
+-{
+- Assert(m->pVirtualBox != NULL); /* Only called from VBoxSVC. */
+-
+- HRESULT hrc;
+- ExtPack *pExtPack = findExtPack(a_pszName);
+- if (pExtPack)
+- {
+- /*
+- * Refresh existing object.
+- */
+- bool fCanDelete;
+- hrc = pExtPack->refresh(&fCanDelete);
+- if (SUCCEEDED(hrc))
+- {
+- if (fCanDelete)
+- {
+- removeExtPack(a_pszName);
+- pExtPack = NULL;
+- }
+- }
+- }
+- else
+- {
+- /*
+- * Do this check here, otherwise VBoxExtPackCalcDir() will fail with a strange
+- * error.
+- */
+- bool fValid = VBoxExtPackIsValidName(a_pszName);
+- if (!fValid)
+- return setError(E_FAIL, "Invalid extension pack name specified");
+-
+- /*
+- * Does the dir exist? Make some special effort to deal with case
+- * sensitivie file systems (a_pszName is case insensitive and mangled).
+- */
+- char szDir[RTPATH_MAX];
+- int vrc = VBoxExtPackCalcDir(szDir, sizeof(szDir), m->strBaseDir.c_str(), a_pszName);
+- AssertLogRelRCReturn(vrc, E_FAIL);
+-
+- RTDIRENTRYEX Entry;
+- RTFSOBJINFO ObjInfo;
+- vrc = RTPathQueryInfoEx(szDir, &ObjInfo, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK);
+- bool fExists = RT_SUCCESS(vrc) && RTFS_IS_DIRECTORY(ObjInfo.Attr.fMode);
+- if (!fExists)
+- {
+- PRTDIR pDir;
+- vrc = RTDirOpen(&pDir, m->strBaseDir.c_str());
+- if (RT_SUCCESS(vrc))
+- {
+- const char *pszMangledName = RTPathFilename(szDir);
+- for (;;)
+- {
+- vrc = RTDirReadEx(pDir, &Entry, NULL /*pcbDirEntry*/, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK);
+- if (RT_FAILURE(vrc))
+- {
+- AssertLogRelMsg(vrc == VERR_NO_MORE_FILES, ("%Rrc\n", vrc));
+- break;
+- }
+- if ( RTFS_IS_DIRECTORY(Entry.Info.Attr.fMode)
+- && !RTStrICmp(Entry.szName, pszMangledName))
+- {
+- /*
+- * The installed extension pack has a uses different case.
+- * Update the name and directory variables.
+- */
+- vrc = RTPathJoin(szDir, sizeof(szDir), m->strBaseDir.c_str(), Entry.szName); /* not really necessary */
+- AssertLogRelRCReturnStmt(vrc, RTDirClose(pDir), E_UNEXPECTED);
+- a_pszName = Entry.szName;
+- fExists = true;
+- break;
+- }
+- }
+- RTDirClose(pDir);
+- }
+- }
+- if (fExists)
+- {
+- /*
+- * We've got something, create a new extension pack object for it.
+- */
+- ComObjPtr<ExtPack> ptrNewExtPack;
+- hrc = ptrNewExtPack.createObject();
+- if (SUCCEEDED(hrc))
+- hrc = ptrNewExtPack->initWithDir(m->enmContext, a_pszName, szDir);
+- if (SUCCEEDED(hrc))
+- {
+- m->llInstalledExtPacks.push_back(ptrNewExtPack);
+- if (ptrNewExtPack->m->fUsable)
+- LogRel(("ExtPackManager: Found extension pack '%s'.\n", a_pszName));
+- else
+- LogRel(("ExtPackManager: Found bad extension pack '%s': %s\n",
+- a_pszName, ptrNewExtPack->m->strWhyUnusable.c_str() ));
+- pExtPack = ptrNewExtPack;
+- }
+- }
+- else
+- hrc = S_OK;
+- }
+-
+- /*
+- * Report error if not usable, if that is desired.
+- */
+- if ( SUCCEEDED(hrc)
+- && pExtPack
+- && a_fUnusableIsError
+- && !pExtPack->m->fUsable)
+- hrc = setError(E_FAIL, "%s", pExtPack->m->strWhyUnusable.c_str());
+-
+- if (a_ppExtPack)
+- *a_ppExtPack = pExtPack;
+- return hrc;
+-}
+-
+-/**
+- * Thread wrapper around doInstall.
+- *
+- * @returns VINF_SUCCESS (ignored)
+- * @param hThread The thread handle (ignored).
+- * @param pvJob The job structure.
+- */
+-/*static*/ DECLCALLBACK(int) ExtPackManager::doInstallThreadProc(RTTHREAD hThread, void *pvJob)
+-{
+- PEXTPACKINSTALLJOB pJob = (PEXTPACKINSTALLJOB)pvJob;
+- HRESULT hrc = pJob->ptrExtPackMgr->doInstall(pJob->ptrExtPackFile, pJob->fReplace, &pJob->strDisplayInfo);
+- pJob->ptrProgress->notifyComplete(hrc);
+- delete pJob;
+-
+- NOREF(hThread);
+- return VINF_SUCCESS;
+-}
+-
+-/**
+- * Worker for IExtPackFile::Install.
+- *
+- * Called on a worker thread via doInstallThreadProc.
+- *
+- * @returns COM status code.
+- * @param a_pExtPackFile The extension pack file, caller checks that
+- * it's usable.
+- * @param a_fReplace Whether to replace any existing extpack or just
+- * fail.
+- * @param a_pstrDisplayInfo Host specific display information hacks.
+- * @param a_ppProgress Where to return a progress object some day. Can
+- * be NULL.
+- */
+-HRESULT ExtPackManager::doInstall(ExtPackFile *a_pExtPackFile, bool a_fReplace, Utf8Str const *a_pstrDisplayInfo)
+-{
+- AssertReturn(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON, E_UNEXPECTED);
+- RTCString const * const pStrName = &a_pExtPackFile->m->Desc.strName;
+- RTCString const * const pStrTarball = &a_pExtPackFile->m->strExtPackFile;
+- RTCString const * const pStrTarballDigest = &a_pExtPackFile->m->strDigest;
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+-
+- /*
+- * Refresh the data we have on the extension pack as it
+- * may be made stale by direct meddling or some other user.
+- */
+- ExtPack *pExtPack;
+- hrc = refreshExtPack(pStrName->c_str(), false /*a_fUnusableIsError*/, &pExtPack);
+- if (SUCCEEDED(hrc))
+- {
+- if (pExtPack && a_fReplace)
+- hrc = pExtPack->callUninstallHookAndClose(m->pVirtualBox, false /*a_ForcedRemoval*/);
+- else if (pExtPack)
+- hrc = setError(E_FAIL,
+- tr("Extension pack '%s' is already installed."
+- " In case of a reinstallation, please uninstall it first"),
+- pStrName->c_str());
+- }
+- if (SUCCEEDED(hrc))
+- {
+- /*
+- * Run the privileged helper binary that performs the actual
+- * installation. Then create an object for the packet (we do this
+- * even on failure, to be on the safe side).
+- */
+- hrc = runSetUidToRootHelper(a_pstrDisplayInfo,
+- "install",
+- "--base-dir", m->strBaseDir.c_str(),
+- "--cert-dir", m->strCertificatDirPath.c_str(),
+- "--name", pStrName->c_str(),
+- "--tarball", pStrTarball->c_str(),
+- "--sha-256", pStrTarballDigest->c_str(),
+- pExtPack ? "--replace" : (const char *)NULL,
+- (const char *)NULL);
+- if (SUCCEEDED(hrc))
+- {
+- hrc = refreshExtPack(pStrName->c_str(), true /*a_fUnusableIsError*/, &pExtPack);
+- if (SUCCEEDED(hrc) && pExtPack)
+- {
+- RTERRINFOSTATIC ErrInfo;
+- RTErrInfoInitStatic(&ErrInfo);
+- pExtPack->callInstalledHook(m->pVirtualBox, &autoLock, &ErrInfo.Core);
+- if (RT_SUCCESS(ErrInfo.Core.rc))
+- LogRel(("ExtPackManager: Successfully installed extension pack '%s'.\n", pStrName->c_str()));
+- else
+- {
+- LogRel(("ExtPackManager: Installated hook for '%s' failed: %Rrc - %s\n",
+- pStrName->c_str(), ErrInfo.Core.rc, ErrInfo.Core.pszMsg));
+-
+- /*
+- * Uninstall the extpack if the error indicates that.
+- */
+- if (ErrInfo.Core.rc == VERR_EXTPACK_UNSUPPORTED_HOST_UNINSTALL)
+- runSetUidToRootHelper(a_pstrDisplayInfo,
+- "uninstall",
+- "--base-dir", m->strBaseDir.c_str(),
+- "--name", pStrName->c_str(),
+- "--forced",
+- (const char *)NULL);
+- hrc = setError(E_FAIL, tr("The installation hook failed: %Rrc - %s"),
+- ErrInfo.Core.rc, ErrInfo.Core.pszMsg);
+- }
+- }
+- else if (SUCCEEDED(hrc))
+- hrc = setError(E_FAIL, tr("Installing extension pack '%s' failed under mysterious circumstances"),
+- pStrName->c_str());
+- }
+- else
+- {
+- ErrorInfoKeeper Eik;
+- refreshExtPack(pStrName->c_str(), false /*a_fUnusableIsError*/, NULL);
+- }
+- }
+-
+- /*
+- * Do VirtualBoxReady callbacks now for any freshly installed
+- * extension pack (old ones will not be called).
+- */
+- if (m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON)
+- {
+- autoLock.release();
+- callAllVirtualBoxReadyHooks();
+- }
+- }
+-
+- return hrc;
+-}
+-
+-/**
+- * Thread wrapper around doUninstall.
+- *
+- * @returns VINF_SUCCESS (ignored)
+- * @param hThread The thread handle (ignored).
+- * @param pvJob The job structure.
+- */
+-/*static*/ DECLCALLBACK(int) ExtPackManager::doUninstallThreadProc(RTTHREAD hThread, void *pvJob)
+-{
+- PEXTPACKUNINSTALLJOB pJob = (PEXTPACKUNINSTALLJOB)pvJob;
+- HRESULT hrc = pJob->ptrExtPackMgr->doUninstall(&pJob->strName, pJob->fForcedRemoval, &pJob->strDisplayInfo);
+- pJob->ptrProgress->notifyComplete(hrc);
+- delete pJob;
+-
+- NOREF(hThread);
+- return VINF_SUCCESS;
+-}
+-
+-/**
+- * Worker for IExtPackManager::Uninstall.
+- *
+- * Called on a worker thread via doUninstallThreadProc.
+- *
+- * @returns COM status code.
+- * @param a_pstrName The name of the extension pack to uninstall.
+- * @param a_fForcedRemoval Whether to be skip and ignore certain bits of
+- * the extpack feedback. To deal with misbehaving
+- * extension pack hooks.
+- * @param a_pstrDisplayInfo Host specific display information hacks.
+- */
+-HRESULT ExtPackManager::doUninstall(Utf8Str const *a_pstrName, bool a_fForcedRemoval, Utf8Str const *a_pstrDisplayInfo)
+-{
+- Assert(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+-
+- /*
+- * Refresh the data we have on the extension pack as it may be made
+- * stale by direct meddling or some other user.
+- */
+- ExtPack *pExtPack;
+- hrc = refreshExtPack(a_pstrName->c_str(), false /*a_fUnusableIsError*/, &pExtPack);
+- if (SUCCEEDED(hrc))
+- {
+- if (!pExtPack)
+- {
+- LogRel(("ExtPackManager: Extension pack '%s' is not installed, so nothing to uninstall.\n", a_pstrName->c_str()));
+- hrc = S_OK; /* nothing to uninstall */
+- }
+- else
+- {
+- /*
+- * Call the uninstall hook and unload the main dll.
+- */
+- hrc = pExtPack->callUninstallHookAndClose(m->pVirtualBox, a_fForcedRemoval);
+- if (SUCCEEDED(hrc))
+- {
+- /*
+- * Run the set-uid-to-root binary that performs the
+- * uninstallation. Then refresh the object.
+- *
+- * This refresh is theorically subject to races, but it's of
+- * the don't-do-that variety.
+- */
+- const char *pszForcedOpt = a_fForcedRemoval ? "--forced" : NULL;
+- hrc = runSetUidToRootHelper(a_pstrDisplayInfo,
+- "uninstall",
+- "--base-dir", m->strBaseDir.c_str(),
+- "--name", a_pstrName->c_str(),
+- pszForcedOpt, /* Last as it may be NULL. */
+- (const char *)NULL);
+- if (SUCCEEDED(hrc))
+- {
+- hrc = refreshExtPack(a_pstrName->c_str(), false /*a_fUnusableIsError*/, &pExtPack);
+- if (SUCCEEDED(hrc))
+- {
+- if (!pExtPack)
+- LogRel(("ExtPackManager: Successfully uninstalled extension pack '%s'.\n", a_pstrName->c_str()));
+- else
+- hrc = setError(E_FAIL,
+- tr("Uninstall extension pack '%s' failed under mysterious circumstances"),
+- a_pstrName->c_str());
+- }
+- }
+- else
+- {
+- ErrorInfoKeeper Eik;
+- refreshExtPack(a_pstrName->c_str(), false /*a_fUnusableIsError*/, NULL);
+- }
+- }
+- }
+- }
+-
+- /*
+- * Do VirtualBoxReady callbacks now for any freshly installed
+- * extension pack (old ones will not be called).
+- */
+- if (m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON)
+- {
+- autoLock.release();
+- callAllVirtualBoxReadyHooks();
+- }
+- }
+-
+- return hrc;
+-}
+-
+-
+-/**
+- * Calls the pfnVirtualBoxReady hook for all working extension packs.
+- *
+- * @remarks The caller must not hold any locks.
+- */
+-void ExtPackManager::callAllVirtualBoxReadyHooks(void)
+-{
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (FAILED(hrc))
+- return;
+- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+- ComPtr<ExtPackManager> ptrSelfRef = this;
+-
+- for (ExtPackList::iterator it = m->llInstalledExtPacks.begin();
+- it != m->llInstalledExtPacks.end();
+- /* advancing below */)
+- {
+- if ((*it)->callVirtualBoxReadyHook(m->pVirtualBox, &autoLock))
+- it = m->llInstalledExtPacks.begin();
+- else
+- it++;
+- }
+-}
+-
+-/**
+- * Calls the pfnConsoleReady hook for all working extension packs.
+- *
+- * @param a_pConsole The console interface.
+- * @remarks The caller must not hold any locks.
+- */
+-void ExtPackManager::callAllConsoleReadyHooks(IConsole *a_pConsole)
+-{
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (FAILED(hrc))
+- return;
+- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+- ComPtr<ExtPackManager> ptrSelfRef = this;
+-
+- for (ExtPackList::iterator it = m->llInstalledExtPacks.begin();
+- it != m->llInstalledExtPacks.end();
+- /* advancing below */)
+- {
+- if ((*it)->callConsoleReadyHook(a_pConsole, &autoLock))
+- it = m->llInstalledExtPacks.begin();
+- else
+- it++;
+- }
+-}
+-
+-/**
+- * Calls the pfnVMCreated hook for all working extension packs.
+- *
+- * @param a_pMachine The machine interface of the new VM.
+- */
+-void ExtPackManager::callAllVmCreatedHooks(IMachine *a_pMachine)
+-{
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (FAILED(hrc))
+- return;
+- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+- ComPtr<ExtPackManager> ptrSelfRef = this; /* paranoia */
+- ExtPackList llExtPacks = m->llInstalledExtPacks;
+-
+- for (ExtPackList::iterator it = llExtPacks.begin(); it != llExtPacks.end(); it++)
+- (*it)->callVmCreatedHook(m->pVirtualBox, a_pMachine, &autoLock);
+-}
+-
+-/**
+- * Calls the pfnVMConfigureVMM hook for all working extension packs.
+- *
+- * @returns VBox status code. Stops on the first failure, expecting the caller
+- * to signal this to the caller of the CFGM constructor.
+- * @param a_pConsole The console interface for the VM.
+- * @param a_pVM The VM handle.
+- */
+-int ExtPackManager::callAllVmConfigureVmmHooks(IConsole *a_pConsole, PVM a_pVM)
+-{
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (FAILED(hrc))
+- return Global::vboxStatusCodeFromCOM(hrc);
+- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+- ComPtr<ExtPackManager> ptrSelfRef = this; /* paranoia */
+- ExtPackList llExtPacks = m->llInstalledExtPacks;
+-
+- for (ExtPackList::iterator it = llExtPacks.begin(); it != llExtPacks.end(); it++)
+- {
+- int vrc;
+- (*it)->callVmConfigureVmmHook(a_pConsole, a_pVM, &autoLock, &vrc);
+- if (RT_FAILURE(vrc))
+- return vrc;
+- }
+-
+- return VINF_SUCCESS;
+-}
+-
+-/**
+- * Calls the pfnVMPowerOn hook for all working extension packs.
+- *
+- * @returns VBox status code. Stops on the first failure, expecting the caller
+- * to not power on the VM.
+- * @param a_pConsole The console interface for the VM.
+- * @param a_pVM The VM handle.
+- */
+-int ExtPackManager::callAllVmPowerOnHooks(IConsole *a_pConsole, PVM a_pVM)
+-{
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (FAILED(hrc))
+- return Global::vboxStatusCodeFromCOM(hrc);
+- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+- ComPtr<ExtPackManager> ptrSelfRef = this; /* paranoia */
+- ExtPackList llExtPacks = m->llInstalledExtPacks;
+-
+- for (ExtPackList::iterator it = llExtPacks.begin(); it != llExtPacks.end(); it++)
+- {
+- int vrc;
+- (*it)->callVmPowerOnHook(a_pConsole, a_pVM, &autoLock, &vrc);
+- if (RT_FAILURE(vrc))
+- return vrc;
+- }
+-
+- return VINF_SUCCESS;
+-}
+-
+-/**
+- * Calls the pfnVMPowerOff hook for all working extension packs.
+- *
+- * @param a_pConsole The console interface for the VM.
+- * @param a_pVM The VM handle. Can be NULL.
+- */
+-void ExtPackManager::callAllVmPowerOffHooks(IConsole *a_pConsole, PVM a_pVM)
+-{
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (FAILED(hrc))
+- return;
+- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+- ComPtr<ExtPackManager> ptrSelfRef = this; /* paranoia */
+- ExtPackList llExtPacks = m->llInstalledExtPacks;
+-
+- for (ExtPackList::iterator it = llExtPacks.begin(); it != llExtPacks.end(); it++)
+- (*it)->callVmPowerOffHook(a_pConsole, a_pVM, &autoLock);
+-}
+-
+-
+-/**
+- * Checks that the specified extension pack contains a VRDE module and that it
+- * is shipshape.
+- *
+- * @returns S_OK if ok, appropriate failure status code with details.
+- * @param a_pstrExtPack The name of the extension pack.
+- */
+-HRESULT ExtPackManager::checkVrdeExtPack(Utf8Str const *a_pstrExtPack)
+-{
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+-
+- ExtPack *pExtPack = findExtPack(a_pstrExtPack->c_str());
+- if (pExtPack)
+- hrc = pExtPack->checkVrde();
+- else
+- hrc = setError(VBOX_E_OBJECT_NOT_FOUND, tr("No extension pack by the name '%s' was found"), a_pstrExtPack->c_str());
+- }
+-
+- return hrc;
+-}
+-
+-/**
+- * Gets the full path to the VRDE library of the specified extension pack.
+- *
+- * This will do extacly the same as checkVrdeExtPack and then resolve the
+- * library path.
+- *
+- * @returns S_OK if a path is returned, COM error status and message return if
+- * not.
+- * @param a_pstrExtPack The extension pack.
+- * @param a_pstrVrdeLibrary Where to return the path.
+- */
+-int ExtPackManager::getVrdeLibraryPathForExtPack(Utf8Str const *a_pstrExtPack, Utf8Str *a_pstrVrdeLibrary)
+-{
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+-
+- ExtPack *pExtPack = findExtPack(a_pstrExtPack->c_str());
+- if (pExtPack)
+- hrc = pExtPack->getVrdpLibraryName(a_pstrVrdeLibrary);
+- else
+- hrc = setError(VBOX_E_OBJECT_NOT_FOUND, tr("No extension pack by the name '%s' was found"), a_pstrExtPack->c_str());
+- }
+-
+- return hrc;
+-}
+-
+-/**
+- * Gets the name of the default VRDE extension pack.
+- *
+- * @returns S_OK or some COM error status on red tape failure.
+- * @param a_pstrExtPack Where to return the extension pack name. Returns
+- * empty if no extension pack wishes to be the default
+- * VRDP provider.
+- */
+-HRESULT ExtPackManager::getDefaultVrdeExtPack(Utf8Str *a_pstrExtPack)
+-{
+- a_pstrExtPack->setNull();
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+-
+- for (ExtPackList::iterator it = m->llInstalledExtPacks.begin();
+- it != m->llInstalledExtPacks.end();
+- it++)
+- {
+- if ((*it)->wantsToBeDefaultVrde())
+- {
+- *a_pstrExtPack = (*it)->m->Desc.strName;
+- break;
+- }
+- }
+- }
+- return hrc;
+-}
+-
+-/**
+- * Checks if an extension pack is (present and) usable.
+- *
+- * @returns @c true if it is, otherwise @c false.
+- * @param a_pszExtPack The name of the extension pack.
+- */
+-bool ExtPackManager::isExtPackUsable(const char *a_pszExtPack)
+-{
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (FAILED(hrc))
+- return false;
+- AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+-
+- ExtPack *pExtPack = findExtPack(a_pszExtPack);
+- return pExtPack != NULL
+- && pExtPack->m->fUsable;
+-}
+-
+-/**
+- * Dumps all extension packs to the release log.
+- */
+-void ExtPackManager::dumpAllToReleaseLog(void)
+-{
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (FAILED(hrc))
+- return;
+- AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+-
+- LogRel(("Installed Extension Packs:\n"));
+- for (ExtPackList::iterator it = m->llInstalledExtPacks.begin();
+- it != m->llInstalledExtPacks.end();
+- it++)
+- {
+- ExtPack::Data *pExtPackData = (*it)->m;
+- if (pExtPackData)
+- {
+- if (pExtPackData->fUsable)
+- LogRel((" %s (Version: %s r%u%s%s; VRDE Module: %s)\n",
+- pExtPackData->Desc.strName.c_str(),
+- pExtPackData->Desc.strVersion.c_str(),
+- pExtPackData->Desc.uRevision,
+- pExtPackData->Desc.strEdition.isEmpty() ? "" : " ",
+- pExtPackData->Desc.strEdition.c_str(),
+- pExtPackData->Desc.strVrdeModule.c_str() ));
+- else
+- LogRel((" %s (Version: %s r%u%s%s; VRDE Module: %s unusable because of '%s')\n",
+- pExtPackData->Desc.strName.c_str(),
+- pExtPackData->Desc.strVersion.c_str(),
+- pExtPackData->Desc.uRevision,
+- pExtPackData->Desc.strEdition.isEmpty() ? "" : " ",
+- pExtPackData->Desc.strEdition.c_str(),
+- pExtPackData->Desc.strVrdeModule.c_str(),
+- pExtPackData->strWhyUnusable.c_str() ));
+- }
+- else
+- LogRel((" pExtPackData is NULL\n"));
+- }
+-
+- if (!m->llInstalledExtPacks.size())
+- LogRel((" None installed!\n"));
+-}
+-
+-/* vi: set tabstop=4 shiftwidth=4 expandtab: */
+--- VirtualBox-4.1.18.orig/src/VBox/Main/src-all/ExtPackUtil.cpp 2012-06-20 10:17:34.000000000 -0300
++++ /dev/null 2012-07-24 14:48:18.638572110 -0300
+@@ -1,1385 +0,0 @@
+-/* $Id: ExtPackUtil.cpp $ */
+-/** @file
+- * VirtualBox Main - Extension Pack Utilities and definitions, VBoxC, VBoxSVC, ++.
+- */
+-
+-/*
+- * Copyright (C) 2010-2012 Oracle Corporation
+- *
+- * This file is part of VirtualBox Open Source Edition (OSE), as
+- * available from http://www.virtualbox.org. This file is free software;
+- * you can redistribute it and/or modify it under the terms of the GNU
+- * General Public License (GPL) as published by the Free Software
+- * Foundation, in version 2 as it comes in the "COPYING" file of the
+- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+- */
+-
+-
+-/*******************************************************************************
+-* Header Files *
+-*******************************************************************************/
+-#include "../include/ExtPackUtil.h"
+-
+-#include <iprt/ctype.h>
+-#include <iprt/dir.h>
+-#include <iprt/file.h>
+-#include <iprt/manifest.h>
+-#include <iprt/param.h>
+-#include <iprt/path.h>
+-#include <iprt/sha.h>
+-#include <iprt/string.h>
+-#include <iprt/vfs.h>
+-#include <iprt/tar.h>
+-#include <iprt/zip.h>
+-#include <iprt/cpp/xml.h>
+-
+-#include <VBox/log.h>
+-
+-
+-/**
+- * Worker for VBoxExtPackLoadDesc that loads the plug-in descriptors.
+- *
+- * @returns Same as VBoxExtPackLoadDesc.
+- * @param pVBoxExtPackElm
+- * @param pcPlugIns Where to return the number of plug-ins in the
+- * array.
+- * @param paPlugIns Where to return the plug-in descriptor array.
+- * (RTMemFree it even on failure)
+- */
+-static RTCString *
+-vboxExtPackLoadPlugInDescs(const xml::ElementNode *pVBoxExtPackElm,
+- uint32_t *pcPlugIns, PVBOXEXTPACKPLUGINDESC *paPlugIns)
+-{
+- *pcPlugIns = 0;
+- *paPlugIns = NULL;
+-
+- /** @todo plug-ins */
+- NOREF(pVBoxExtPackElm);
+-
+- return NULL;
+-}
+-
+-/**
+- * Clears the extension pack descriptor.
+- *
+- * @param a_pExtPackDesc The descriptor to clear.
+- */
+-static void vboxExtPackClearDesc(PVBOXEXTPACKDESC a_pExtPackDesc)
+-{
+- a_pExtPackDesc->strName.setNull();
+- a_pExtPackDesc->strDescription.setNull();
+- a_pExtPackDesc->strVersion.setNull();
+- a_pExtPackDesc->strEdition.setNull();
+- a_pExtPackDesc->uRevision = 0;
+- a_pExtPackDesc->strMainModule.setNull();
+- a_pExtPackDesc->strVrdeModule.setNull();
+- a_pExtPackDesc->cPlugIns = 0;
+- a_pExtPackDesc->paPlugIns = NULL;
+- a_pExtPackDesc->fShowLicense = false;
+-}
+-
+-/**
+- * Initializes an extension pack descriptor so that it's safe to call free on
+- * it whatever happens later on.
+- *
+- * @param a_pExtPackDesc The descirptor to initialize.
+- */
+-void VBoxExtPackInitDesc(PVBOXEXTPACKDESC a_pExtPackDesc)
+-{
+- vboxExtPackClearDesc(a_pExtPackDesc);
+-}
+-
+-
+-/**
+- * Load the extension pack descriptor from an XML document.
+- *
+- * @returns NULL on success, pointer to an error message on failure (caller
+- * deletes it).
+- * @param a_pDoc Pointer to the the XML document.
+- * @param a_pExtPackDesc Where to store the extension pack descriptor.
+- */
+-static RTCString *vboxExtPackLoadDescFromDoc(xml::Document *a_pDoc, PVBOXEXTPACKDESC a_pExtPackDesc)
+-{
+- /*
+- * Get the main element and check its version.
+- */
+- const xml::ElementNode *pVBoxExtPackElm = a_pDoc->getRootElement();
+- if ( !pVBoxExtPackElm
+- || strcmp(pVBoxExtPackElm->getName(), "VirtualBoxExtensionPack") != 0)
+- return new RTCString("No VirtualBoxExtensionPack element");
+-
+- RTCString strFormatVersion;
+- if (!pVBoxExtPackElm->getAttributeValue("version", strFormatVersion))
+- return new RTCString("Missing format version");
+- if (!strFormatVersion.equals("1.0"))
+- return &(new RTCString("Unsupported format version: "))->append(strFormatVersion);
+-
+- /*
+- * Read and validate mandatory bits.
+- */
+- const xml::ElementNode *pNameElm = pVBoxExtPackElm->findChildElement("Name");
+- if (!pNameElm)
+- return new RTCString("The 'Name' element is missing");
+- const char *pszName = pNameElm->getValue();
+- if (!VBoxExtPackIsValidName(pszName))
+- return &(new RTCString("Invalid name: "))->append(pszName);
+-
+- const xml::ElementNode *pDescElm = pVBoxExtPackElm->findChildElement("Description");
+- if (!pDescElm)
+- return new RTCString("The 'Description' element is missing");
+- const char *pszDesc = pDescElm->getValue();
+- if (!pszDesc || *pszDesc == '\0')
+- return new RTCString("The 'Description' element is empty");
+- if (strpbrk(pszDesc, "\n\r\t\v\b") != NULL)
+- return new RTCString("The 'Description' must not contain control characters");
+-
+- const xml::ElementNode *pVersionElm = pVBoxExtPackElm->findChildElement("Version");
+- if (!pVersionElm)
+- return new RTCString("The 'Version' element is missing");
+- const char *pszVersion = pVersionElm->getValue();
+- if (!pszVersion || *pszVersion == '\0')
+- return new RTCString("The 'Version' element is empty");
+- if (!VBoxExtPackIsValidVersionString(pszVersion))
+- return &(new RTCString("Invalid version string: "))->append(pszVersion);
+-
+- uint32_t uRevision;
+- if (!pVersionElm->getAttributeValue("revision", uRevision))
+- uRevision = 0;
+-
+- const char *pszEdition;
+- if (!pVersionElm->getAttributeValue("edition", pszEdition))
+- pszEdition = "";
+- if (!VBoxExtPackIsValidEditionString(pszEdition))
+- return &(new RTCString("Invalid edition string: "))->append(pszEdition);
+-
+- const xml::ElementNode *pMainModuleElm = pVBoxExtPackElm->findChildElement("MainModule");
+- if (!pMainModuleElm)
+- return new RTCString("The 'MainModule' element is missing");
+- const char *pszMainModule = pMainModuleElm->getValue();
+- if (!pszMainModule || *pszMainModule == '\0')
+- return new RTCString("The 'MainModule' element is empty");
+- if (!VBoxExtPackIsValidModuleString(pszMainModule))
+- return &(new RTCString("Invalid main module string: "))->append(pszMainModule);
+-
+- /*
+- * The VRDE module, optional.
+- * Accept both none and empty as tokens of no VRDE module.
+- */
+- const char *pszVrdeModule = NULL;
+- const xml::ElementNode *pVrdeModuleElm = pVBoxExtPackElm->findChildElement("VRDEModule");
+- if (pVrdeModuleElm)
+- {
+- pszVrdeModule = pVrdeModuleElm->getValue();
+- if (!pszVrdeModule || *pszVrdeModule == '\0')
+- pszVrdeModule = NULL;
+- else if (!VBoxExtPackIsValidModuleString(pszVrdeModule))
+- return &(new RTCString("Invalid VRDE module string: "))->append(pszVrdeModule);
+- }
+-
+- /*
+- * Whether to show the license, optional. (presense is enough here)
+- */
+- const xml::ElementNode *pShowLicenseElm = pVBoxExtPackElm->findChildElement("ShowLicense");
+- bool fShowLicense = pShowLicenseElm != NULL;
+-
+- /*
+- * Parse plug-in descriptions (last because of the manual memory management).
+- */
+- uint32_t cPlugIns = 0;
+- PVBOXEXTPACKPLUGINDESC paPlugIns = NULL;
+- RTCString *pstrRet = vboxExtPackLoadPlugInDescs(pVBoxExtPackElm, &cPlugIns, &paPlugIns);
+- if (pstrRet)
+- {
+- RTMemFree(paPlugIns);
+- return pstrRet;
+- }
+-
+- /*
+- * Everything seems fine, fill in the return values and return successfully.
+- */
+- a_pExtPackDesc->strName = pszName;
+- a_pExtPackDesc->strDescription = pszDesc;
+- a_pExtPackDesc->strVersion = pszVersion;
+- a_pExtPackDesc->strEdition = pszEdition;
+- a_pExtPackDesc->uRevision = uRevision;
+- a_pExtPackDesc->strMainModule = pszMainModule;
+- a_pExtPackDesc->strVrdeModule = pszVrdeModule;
+- a_pExtPackDesc->cPlugIns = cPlugIns;
+- a_pExtPackDesc->paPlugIns = paPlugIns;
+- a_pExtPackDesc->fShowLicense = fShowLicense;
+-
+- return NULL;
+-}
+-
+-/**
+- * Reads the extension pack descriptor.
+- *
+- * @returns NULL on success, pointer to an error message on failure (caller
+- * deletes it).
+- * @param a_pszDir The directory containing the description file.
+- * @param a_pExtPackDesc Where to store the extension pack descriptor.
+- * @param a_pObjInfo Where to store the object info for the file (unix
+- * attribs). Optional.
+- */
+-RTCString *VBoxExtPackLoadDesc(const char *a_pszDir, PVBOXEXTPACKDESC a_pExtPackDesc, PRTFSOBJINFO a_pObjInfo)
+-{
+- vboxExtPackClearDesc(a_pExtPackDesc);
+-
+- /*
+- * Validate, open and parse the XML file.
+- */
+- char szFilePath[RTPATH_MAX];
+- int vrc = RTPathJoin(szFilePath, sizeof(szFilePath), a_pszDir, VBOX_EXTPACK_DESCRIPTION_NAME);
+- if (RT_FAILURE(vrc))
+- return new RTCString("RTPathJoin failed with %Rrc", vrc);
+-
+- RTFSOBJINFO ObjInfo;
+- vrc = RTPathQueryInfoEx(szFilePath, &ObjInfo, RTFSOBJATTRADD_UNIX, RTPATH_F_ON_LINK);
+- if (RT_FAILURE(vrc))
+- return &(new RTCString())->printf("RTPathQueryInfoEx failed with %Rrc", vrc);
+- if (a_pObjInfo)
+- *a_pObjInfo = ObjInfo;
+- if (!RTFS_IS_FILE(ObjInfo.Attr.fMode))
+- {
+- if (RTFS_IS_SYMLINK(ObjInfo.Attr.fMode))
+- return new RTCString("The XML file is symlinked, that is not allowed");
+- return &(new RTCString)->printf("The XML file is not a file (fMode=%#x)", ObjInfo.Attr.fMode);
+- }
+-
+- xml::Document Doc;
+- {
+- xml::XmlFileParser Parser;
+- try
+- {
+- Parser.read(szFilePath, Doc);
+- }
+- catch (xml::XmlError Err)
+- {
+- return new RTCString(Err.what());
+- }
+- }
+-
+- /*
+- * Hand the xml doc over to the common code.
+- */
+- return vboxExtPackLoadDescFromDoc(&Doc, a_pExtPackDesc);
+-}
+-
+-/**
+- * Reads the extension pack descriptor.
+- *
+- * @returns NULL on success, pointer to an error message on failure (caller
+- * deletes it).
+- * @param a_pszDir The directory containing the description file.
+- * @param a_pExtPackDesc Where to store the extension pack descriptor.
+- * @param a_pObjInfo Where to store the object info for the file (unix
+- * attribs). Optional.
+- */
+-RTCString *VBoxExtPackLoadDescFromVfsFile(RTVFSFILE hVfsFile, PVBOXEXTPACKDESC a_pExtPackDesc, PRTFSOBJINFO a_pObjInfo)
+-{
+- vboxExtPackClearDesc(a_pExtPackDesc);
+-
+- /*
+- * Query the object info.
+- */
+- RTFSOBJINFO ObjInfo;
+- int rc = RTVfsFileQueryInfo(hVfsFile, &ObjInfo, RTFSOBJATTRADD_UNIX);
+- if (RT_FAILURE(rc))
+- return &(new RTCString)->printf("RTVfsFileQueryInfo failed: %Rrc", rc);
+- if (a_pObjInfo)
+- *a_pObjInfo = ObjInfo;
+-
+- /*
+- * The simple approach, read the whole thing into memory and pass this to
+- * the XML parser.
+- */
+-
+- /* Check the file size. */
+- if (ObjInfo.cbObject > _1M || ObjInfo.cbObject < 0)
+- return &(new RTCString)->printf("The XML file is too large (%'RU64 bytes)", ObjInfo.cbObject);
+- size_t const cbFile = (size_t)ObjInfo.cbObject;
+-
+- /* Rewind to the start of the file. */
+- rc = RTVfsFileSeek(hVfsFile, 0, RTFILE_SEEK_BEGIN, NULL);
+- if (RT_FAILURE(rc))
+- return &(new RTCString)->printf("RTVfsFileSeek(,0,BEGIN) failed: %Rrc", rc);
+-
+- /* Allocate memory and read the file content into it. */
+- void *pvFile = RTMemTmpAlloc(cbFile);
+- if (!pvFile)
+- return &(new RTCString)->printf("RTMemTmpAlloc(%zu) failed", cbFile);
+-
+- RTCString *pstrErr = NULL;
+- rc = RTVfsFileRead(hVfsFile, pvFile, cbFile, NULL);
+- if (RT_FAILURE(rc))
+- pstrErr = &(new RTCString)->printf("RTVfsFileRead failed: %Rrc", rc);
+-
+- /*
+- * Parse the file.
+- */
+- xml::Document Doc;
+- if (RT_SUCCESS(rc))
+- {
+- xml::XmlMemParser Parser;
+- RTCString strFileName = VBOX_EXTPACK_DESCRIPTION_NAME;
+- try
+- {
+- Parser.read(pvFile, cbFile, strFileName, Doc);
+- }
+- catch (xml::XmlError Err)
+- {
+- pstrErr = new RTCString(Err.what());
+- rc = VERR_PARSE_ERROR;
+- }
+- }
+- RTMemTmpFree(pvFile);
+-
+- /*
+- * Hand the xml doc over to the common code.
+- */
+- if (RT_SUCCESS(rc))
+- pstrErr = vboxExtPackLoadDescFromDoc(&Doc, a_pExtPackDesc);
+-
+- return pstrErr;
+-}
+-
+-/**
+- * Frees all resources associated with a extension pack descriptor.
+- *
+- * @param a_pExtPackDesc The extension pack descriptor which members
+- * should be freed.
+- */
+-void VBoxExtPackFreeDesc(PVBOXEXTPACKDESC a_pExtPackDesc)
+-{
+- if (!a_pExtPackDesc)
+- return;
+-
+- a_pExtPackDesc->strName.setNull();
+- a_pExtPackDesc->strDescription.setNull();
+- a_pExtPackDesc->strVersion.setNull();
+- a_pExtPackDesc->strEdition.setNull();
+- a_pExtPackDesc->uRevision = 0;
+- a_pExtPackDesc->strMainModule.setNull();
+- a_pExtPackDesc->strVrdeModule.setNull();
+- a_pExtPackDesc->cPlugIns = 0;
+- RTMemFree(a_pExtPackDesc->paPlugIns);
+- a_pExtPackDesc->paPlugIns = NULL;
+- a_pExtPackDesc->fShowLicense = false;
+-}
+-
+-/**
+- * Extract the extension pack name from the tarball path.
+- *
+- * @returns String containing the name on success, the caller must delete it.
+- * NULL if no valid name was found or if we ran out of memory.
+- * @param pszTarball The path to the tarball.
+- */
+-RTCString *VBoxExtPackExtractNameFromTarballPath(const char *pszTarball)
+-{
+- /*
+- * Skip ahead to the filename part and count the number of characters
+- * that matches the criteria for a mangled extension pack name.
+- */
+- const char *pszSrc = RTPathFilename(pszTarball);
+- if (!pszSrc)
+- return NULL;
+-
+- size_t off = 0;
+- while (RT_C_IS_ALNUM(pszSrc[off]) || pszSrc[off] == '_')
+- off++;
+-
+- /*
+- * Check min and max name limits.
+- */
+- if ( off > VBOX_EXTPACK_NAME_MAX_LEN
+- || off < VBOX_EXTPACK_NAME_MIN_LEN)
+- return NULL;
+-
+- /*
+- * Return the unmangled name.
+- */
+- return VBoxExtPackUnmangleName(pszSrc, off);
+-}
+-
+-/**
+- * Validates the extension pack name.
+- *
+- * @returns true if valid, false if not.
+- * @param pszName The name to validate.
+- * @sa VBoxExtPackExtractNameFromTarballPath
+- */
+-bool VBoxExtPackIsValidName(const char *pszName)
+-{
+- if (!pszName)
+- return false;
+-
+- /*
+- * Check the characters making up the name, only english alphabet
+- * characters, decimal digits and spaces are allowed.
+- */
+- size_t off = 0;
+- while (pszName[off])
+- {
+- if (!RT_C_IS_ALNUM(pszName[off]) && pszName[off] != ' ')
+- return false;
+- off++;
+- }
+-
+- /*
+- * Check min and max name limits.
+- */
+- if ( off > VBOX_EXTPACK_NAME_MAX_LEN
+- || off < VBOX_EXTPACK_NAME_MIN_LEN)
+- return false;
+-
+- return true;
+-}
+-
+-/**
+- * Checks if an alledged manged extension pack name.
+- *
+- * @returns true if valid, false if not.
+- * @param pszMangledName The mangled name to validate.
+- * @param cchMax The max number of chars to test.
+- * @sa VBoxExtPackMangleName
+- */
+-bool VBoxExtPackIsValidMangledName(const char *pszMangledName, size_t cchMax /*= RTSTR_MAX*/)
+-{
+- if (!pszMangledName)
+- return false;
+-
+- /*
+- * Check the characters making up the name, only english alphabet
+- * characters, decimal digits and underscores (=space) are allowed.
+- */
+- size_t off = 0;
+- while (off < cchMax && pszMangledName[off])
+- {
+- if (!RT_C_IS_ALNUM(pszMangledName[off]) && pszMangledName[off] != '_')
+- return false;
+- off++;
+- }
+-
+- /*
+- * Check min and max name limits.
+- */
+- if ( off > VBOX_EXTPACK_NAME_MAX_LEN
+- || off < VBOX_EXTPACK_NAME_MIN_LEN)
+- return false;
+-
+- return true;
+-}
+-
+-/**
+- * Mangle an extension pack name so it can be used by a directory or file name.
+- *
+- * @returns String containing the mangled name on success, the caller must
+- * delete it. NULL on failure.
+- * @param pszName The unmangled name.
+- * @sa VBoxExtPackUnmangleName, VBoxExtPackIsValidMangledName
+- */
+-RTCString *VBoxExtPackMangleName(const char *pszName)
+-{
+- AssertReturn(VBoxExtPackIsValidName(pszName), NULL);
+-
+- char szTmp[VBOX_EXTPACK_NAME_MAX_LEN + 1];
+- size_t off = 0;
+- char ch;
+- while ((ch = pszName[off]) != '\0')
+- {
+- if (ch == ' ')
+- ch = '_';
+- szTmp[off++] = ch;
+- }
+- szTmp[off] = '\0';
+- Assert(VBoxExtPackIsValidMangledName(szTmp));
+-
+- return new RTCString(szTmp, off);
+-}
+-
+-/**
+- * Unmangle an extension pack name (reverses VBoxExtPackMangleName).
+- *
+- * @returns String containing the mangled name on success, the caller must
+- * delete it. NULL on failure.
+- * @param pszMangledName The mangled name.
+- * @param cchMax The max name length. RTSTR_MAX is fine.
+- * @sa VBoxExtPackMangleName, VBoxExtPackIsValidMangledName
+- */
+-RTCString *VBoxExtPackUnmangleName(const char *pszMangledName, size_t cchMax)
+-{
+- AssertReturn(VBoxExtPackIsValidMangledName(pszMangledName, cchMax), NULL);
+-
+- char szTmp[VBOX_EXTPACK_NAME_MAX_LEN + 1];
+- size_t off = 0;
+- char ch;
+- while ( off < cchMax
+- && (ch = pszMangledName[off]) != '\0')
+- {
+- if (ch == '_')
+- ch = ' ';
+- else
+- AssertReturn(RT_C_IS_ALNUM(ch) || ch == ' ', NULL);
+- szTmp[off++] = ch;
+- }
+- szTmp[off] = '\0';
+- AssertReturn(VBoxExtPackIsValidName(szTmp), NULL);
+-
+- return new RTCString(szTmp, off);
+-}
+-
+-/**
+- * Constructs the extension pack directory path.
+- *
+- * A combination of RTPathJoin and VBoxExtPackMangleName.
+- *
+- * @returns IPRT status code like RTPathJoin.
+- * @param pszExtPackDir Where to return the directory path.
+- * @param cbExtPackDir The size of the return buffer.
+- * @param pszParentDir The parent directory (".../Extensions").
+- * @param pszName The extension pack name, unmangled.
+- */
+-int VBoxExtPackCalcDir(char *pszExtPackDir, size_t cbExtPackDir, const char *pszParentDir, const char *pszName)
+-{
+- AssertReturn(VBoxExtPackIsValidName(pszName), VERR_INTERNAL_ERROR_5);
+-
+- RTCString *pstrMangledName = VBoxExtPackMangleName(pszName);
+- if (!pstrMangledName)
+- return VERR_INTERNAL_ERROR_4;
+-
+- int vrc = RTPathJoin(pszExtPackDir, cbExtPackDir, pszParentDir, pstrMangledName->c_str());
+- delete pstrMangledName;
+-
+- return vrc;
+-}
+-
+-
+-/**
+- * Validates the extension pack version string.
+- *
+- * @returns true if valid, false if not.
+- * @param pszVersion The version string to validate.
+- */
+-bool VBoxExtPackIsValidVersionString(const char *pszVersion)
+-{
+- if (!pszVersion || *pszVersion == '\0')
+- return false;
+-
+- /* 1.x.y.z... */
+- for (;;)
+- {
+- if (!RT_C_IS_DIGIT(*pszVersion))
+- return false;
+- do
+- pszVersion++;
+- while (RT_C_IS_DIGIT(*pszVersion));
+- if (*pszVersion != '.')
+- break;
+- pszVersion++;
+- }
+-
+- /* upper case string + numbers indicating the build type */
+- if (*pszVersion == '-' || *pszVersion == '_')
+- {
+- /** @todo Should probably restrict this to known build types (alpha,
+- * beta, rc, ++). */
+- do
+- pszVersion++;
+- while ( RT_C_IS_DIGIT(*pszVersion)
+- || RT_C_IS_UPPER(*pszVersion)
+- || *pszVersion == '-'
+- || *pszVersion == '_');
+- }
+-
+- return *pszVersion == '\0';
+-}
+-
+-/**
+- * Validates the extension pack edition string.
+- *
+- * @returns true if valid, false if not.
+- * @param pszEdition The edition string to validate.
+- */
+-bool VBoxExtPackIsValidEditionString(const char *pszEdition)
+-{
+- if (*pszEdition)
+- {
+- if (!RT_C_IS_UPPER(*pszEdition))
+- return false;
+-
+- do
+- pszEdition++;
+- while ( RT_C_IS_UPPER(*pszEdition)
+- || RT_C_IS_DIGIT(*pszEdition)
+- || *pszEdition == '-'
+- || *pszEdition == '_');
+- }
+- return *pszEdition == '\0';
+-}
+-
+-/**
+- * Validates an extension pack module string.
+- *
+- * @returns true if valid, false if not.
+- * @param pszModule The module string to validate.
+- */
+-bool VBoxExtPackIsValidModuleString(const char *pszModule)
+-{
+- if (!pszModule || *pszModule == '\0')
+- return false;
+-
+- /* Restricted charset, no extensions (dots). */
+- while ( RT_C_IS_ALNUM(*pszModule)
+- || *pszModule == '-'
+- || *pszModule == '_')
+- pszModule++;
+-
+- return *pszModule == '\0';
+-}
+-
+-/**
+- * RTStrPrintfv wrapper.
+- *
+- * @returns @a rc
+- * @param rc The status code to return.
+- * @param pszError The error buffer.
+- * @param cbError The size of the buffer.
+- * @param pszFormat The error message format string.
+- * @param ... Format arguments.
+- */
+-static int vboxExtPackReturnError(int rc, char *pszError, size_t cbError, const char *pszFormat, ...)
+-{
+- va_list va;
+- va_start(va, pszFormat);
+- RTStrPrintfV(pszError, cbError, pszFormat, va);
+- va_end(va);
+- return rc;
+-}
+-
+-/**
+- * RTStrPrintfv wrapper.
+- *
+- * @param pszError The error buffer.
+- * @param cbError The size of the buffer.
+- * @param pszFormat The error message format string.
+- * @param ... Format arguments.
+- */
+-static void vboxExtPackSetError(char *pszError, size_t cbError, const char *pszFormat, ...)
+-{
+- va_list va;
+- va_start(va, pszFormat);
+- RTStrPrintfV(pszError, cbError, pszFormat, va);
+- va_end(va);
+-}
+-
+-/**
+- * Verifies the manifest and its signature.
+- *
+- * @returns VBox status code, failures with message.
+- * @param hManifestFile The xml from the extension pack.
+- * @param pszExtPackName The expected extension pack name. This can be
+- * NULL, in which we don't have any expectations.
+- * @param pszError Where to store an error message on failure.
+- * @param cbError The size of the buffer @a pszError points to.
+- */
+-static int vboxExtPackVerifyXml(RTVFSFILE hXmlFile, const char *pszExtPackName, char *pszError, size_t cbError)
+-{
+- /*
+- * Load the XML.
+- */
+- VBOXEXTPACKDESC ExtPackDesc;
+- RTCString *pstrErr = VBoxExtPackLoadDescFromVfsFile(hXmlFile, &ExtPackDesc, NULL);
+- if (pstrErr)
+- {
+- RTStrCopy(pszError, cbError, pstrErr->c_str());
+- delete pstrErr;
+- return VERR_PARSE_ERROR;
+- }
+-
+- /*
+- * Check the name.
+- */
+- /** @todo drop this restriction after the old install interface is
+- * dropped. */
+- int rc = VINF_SUCCESS;
+- if ( pszExtPackName
+- && !ExtPackDesc.strName.equalsIgnoreCase(pszExtPackName))
+- rc = vboxExtPackReturnError(VERR_NOT_EQUAL, pszError, cbError,
+- "The name of the downloaded file and the name stored inside the extension pack does not match"
+- " (xml='%s' file='%s')", ExtPackDesc.strName.c_str(), pszExtPackName);
+- return rc;
+-}
+-
+-/**
+- * Verifies the manifest and its signature.
+- *
+- * @returns VBox status code, failures with message.
+- * @param hOurManifest The manifest we compiled.
+- * @param hManifestFile The manifest file in the extension pack.
+- * @param hSignatureFile The manifest signature file.
+- * @param pszError Where to store an error message on failure.
+- * @param cbError The size of the buffer @a pszError points to.
+- */
+-static int vboxExtPackVerifyManifestAndSignature(RTMANIFEST hOurManifest, RTVFSFILE hManifestFile, RTVFSFILE hSignatureFile,
+- char *pszError, size_t cbError)
+-{
+- /*
+- * Read the manifest from the extension pack.
+- */
+- int rc = RTVfsFileSeek(hManifestFile, 0, RTFILE_SEEK_BEGIN, NULL);
+- if (RT_FAILURE(rc))
+- return vboxExtPackReturnError(rc, pszError, cbError, "RTVfsFileSeek failed: %Rrc", rc);
+-
+- RTMANIFEST hTheirManifest;
+- rc = RTManifestCreate(0 /*fFlags*/, &hTheirManifest);
+- if (RT_FAILURE(rc))
+- return vboxExtPackReturnError(rc, pszError, cbError, "RTManifestCreate failed: %Rrc", rc);
+-
+- RTVFSIOSTREAM hVfsIos = RTVfsFileToIoStream(hManifestFile);
+- rc = RTManifestReadStandard(hTheirManifest, hVfsIos);
+- RTVfsIoStrmRelease(hVfsIos);
+- if (RT_SUCCESS(rc))
+- {
+- /*
+- * Compare the manifests.
+- */
+- static const char *s_apszIgnoreEntries[] =
+- {
+- VBOX_EXTPACK_MANIFEST_NAME,
+- VBOX_EXTPACK_SIGNATURE_NAME,
+- "./" VBOX_EXTPACK_MANIFEST_NAME,
+- "./" VBOX_EXTPACK_SIGNATURE_NAME,
+- NULL
+- };
+- char szError[RTPATH_MAX];
+- rc = RTManifestEqualsEx(hOurManifest, hTheirManifest, &s_apszIgnoreEntries[0], NULL,
+- RTMANIFEST_EQUALS_IGN_MISSING_ATTRS /*fFlags*/,
+- szError, sizeof(szError));
+- if (RT_SUCCESS(rc))
+- {
+- /*
+- * Validate the manifest file signature.
+- */
+- /** @todo implement signature stuff */
+- NOREF(hSignatureFile);
+-
+- }
+- else if (rc == VERR_NOT_EQUAL && szError[0])
+- vboxExtPackSetError(pszError, cbError, "Manifest mismatch: %s", szError);
+- else
+- vboxExtPackSetError(pszError, cbError, "RTManifestEqualsEx failed: %Rrc", rc);
+-#if 0
+- RTVFSIOSTREAM hVfsIosStdOut = NIL_RTVFSIOSTREAM;
+- RTVfsIoStrmFromStdHandle(RTHANDLESTD_OUTPUT, RTFILE_O_WRITE, true, &hVfsIosStdOut);
+- RTVfsIoStrmWrite(hVfsIosStdOut, "Our:\n", sizeof("Our:\n") - 1, true, NULL);
+- RTManifestWriteStandard(hOurManifest, hVfsIosStdOut);
+- RTVfsIoStrmWrite(hVfsIosStdOut, "Their:\n", sizeof("Their:\n") - 1, true, NULL);
+- RTManifestWriteStandard(hTheirManifest, hVfsIosStdOut);
+-#endif
+- }
+- else
+- vboxExtPackSetError(pszError, cbError, "Error parsing '%s': %Rrc", VBOX_EXTPACK_MANIFEST_NAME, rc);
+-
+- RTManifestRelease(hTheirManifest);
+- return rc;
+-}
+-
+-
+-/**
+- * Verifies the file digest (if specified) and returns the SHA-256 of the file.
+- *
+- * @returns
+- * @param hFileManifest Manifest containing a SHA-256 digest of the file
+- * that was calculated as the file was processed.
+- * @param pszFileDigest SHA-256 digest of the file.
+- * @param pStrDigest Where to return the SHA-256 digest. Optional.
+- * @param pszError Where to write an error message on failure.
+- * @param cbError The size of the @a pszError buffer.
+- */
+-static int vboxExtPackVerifyFileDigest(RTMANIFEST hFileManifest, const char *pszFileDigest,
+- RTCString *pStrDigest, char *pszError, size_t cbError)
+-{
+- /*
+- * Extract the SHA-256 entry for the extpack file.
+- */
+- char szCalculatedDigest[RTSHA256_DIGEST_LEN + 1];
+- int rc = RTManifestEntryQueryAttr(hFileManifest, "extpack", NULL /*no name*/, RTMANIFEST_ATTR_SHA256,
+- szCalculatedDigest, sizeof(szCalculatedDigest), NULL);
+- if (RT_SUCCESS(rc))
+- {
+- /*
+- * Convert the two strings to binary form before comparing.
+- * We convert the calculated hash even if we don't have anything to
+- * compare with, just to validate it.
+- */
+- uint8_t abCalculatedHash[RTSHA256_HASH_SIZE];
+- rc = RTSha256FromString(szCalculatedDigest, abCalculatedHash);
+- if (RT_SUCCESS(rc))
+- {
+- if ( pszFileDigest
+- && *pszFileDigest != '\0')
+- {
+- uint8_t abFileHash[RTSHA256_HASH_SIZE];
+- rc = RTSha256FromString(pszFileDigest, abFileHash);
+- if (RT_SUCCESS(rc))
+- {
+- if (memcmp(abFileHash, abCalculatedHash, sizeof(abFileHash)))
+- {
+- vboxExtPackSetError(pszError, cbError, "The extension pack file has changed (SHA-256 mismatch)");
+- rc = VERR_NOT_EQUAL;
+- }
+- }
+- else
+- vboxExtPackSetError(pszError, cbError, "Bad SHA-256 '%s': %Rrc", szCalculatedDigest, rc);
+- }
+-
+- /*
+- * Set the output hash on success.
+- */
+- if (pStrDigest && RT_SUCCESS(rc))
+- {
+- try
+- {
+- *pStrDigest = szCalculatedDigest;
+- }
+- catch (std::bad_alloc)
+- {
+- rc = VERR_NO_MEMORY;
+- }
+- }
+- }
+- else
+- vboxExtPackSetError(pszError, cbError, "Bad SHA-256 '%s': %Rrc", szCalculatedDigest, rc);
+- }
+- else
+- vboxExtPackSetError(pszError, cbError, "RTManifestEntryGetAttr: %Rrc", rc);
+- return rc;
+-}
+-
+-
+-
+-/**
+- * Validates a standard file.
+- *
+- * Generally all files are
+- *
+- * @returns VBox status code, failure message in @a pszError.
+- * @param pszAdjName The adjusted member name.
+- * @param enmType The VFS object type.
+- * @param phVfsObj The pointer to the VFS object handle variable.
+- * This is both input and output.
+- * @param phVfsFile Where to store the handle to the memorized
+- * file. This is NULL for license files.
+- * @param pszError Where to write an error message on failure.
+- * @param cbError The size of the @a pszError buffer.
+- */
+-static int VBoxExtPackValidateStandardFile(const char *pszAdjName, RTVFSOBJTYPE enmType,
+- PRTVFSOBJ phVfsObj, PRTVFSFILE phVfsFile, char *pszError, size_t cbError)
+-{
+- int rc;
+-
+- /*
+- * Make sure it's a file and that it isn't too large.
+- */
+- if (phVfsFile && *phVfsFile != NIL_RTVFSFILE)
+- rc = vboxExtPackReturnError(VERR_DUPLICATE, pszError, cbError,
+- "There can only be one '%s'", pszAdjName);
+- else if (enmType != RTVFSOBJTYPE_IO_STREAM && enmType != RTVFSOBJTYPE_FILE)
+- rc = vboxExtPackReturnError(VERR_NOT_A_FILE, pszError, cbError,
+- "Standard member '%s' is not a file", pszAdjName);
+- else
+- {
+- RTFSOBJINFO ObjInfo;
+- rc = RTVfsObjQueryInfo(*phVfsObj, &ObjInfo, RTFSOBJATTRADD_NOTHING);
+- if (RT_SUCCESS(rc))
+- {
+- if (!RTFS_IS_FILE(ObjInfo.Attr.fMode))
+- rc = vboxExtPackReturnError(VERR_NOT_A_FILE, pszError, cbError,
+- "Standard member '%s' is not a file", pszAdjName);
+- else if (ObjInfo.cbObject >= _1M)
+- rc = vboxExtPackReturnError(VERR_OUT_OF_RANGE, pszError, cbError,
+- "Standard member '%s' is too large: %'RU64 bytes (max 1 MB)",
+- pszAdjName, (uint64_t)ObjInfo.cbObject);
+- else
+- {
+- /*
+- * Make an in memory copy of the stream and check that the file
+- * is UTF-8 clean.
+- */
+- RTVFSIOSTREAM hVfsIos = RTVfsObjToIoStream(*phVfsObj);
+- RTVFSFILE hVfsFile;
+- rc = RTVfsMemorizeIoStreamAsFile(hVfsIos, RTFILE_O_READ, &hVfsFile);
+- if (RT_SUCCESS(rc))
+- {
+- rc = RTVfsIoStrmValidateUtf8Encoding(hVfsIos,
+- RTVFS_VALIDATE_UTF8_BY_RTC_3629 | RTVFS_VALIDATE_UTF8_NO_NULL,
+- NULL);
+- if (RT_SUCCESS(rc))
+- {
+- /*
+- * Replace *phVfsObj with the memorized file.
+- */
+- rc = RTVfsFileSeek(hVfsFile, 0, RTFILE_SEEK_BEGIN, NULL);
+- if (RT_SUCCESS(rc))
+- {
+- RTVfsObjRelease(*phVfsObj);
+- *phVfsObj = RTVfsObjFromFile(hVfsFile);
+- }
+- else
+- vboxExtPackSetError(pszError, cbError, "RTVfsFileSeek failed on '%s': %Rrc", pszAdjName, rc);
+- }
+-
+- if (phVfsFile && RT_SUCCESS(rc))
+- *phVfsFile = hVfsFile;
+- else
+- RTVfsFileRelease(hVfsFile);
+- }
+- else
+- vboxExtPackSetError(pszError, cbError, "RTVfsMemorizeIoStreamAsFile failed on '%s': %Rrc", pszAdjName, rc);
+- RTVfsIoStrmRelease(hVfsIos);
+- }
+- }
+- else
+- vboxExtPackSetError(pszError, cbError, "RTVfsObjQueryInfo failed on '%s': %Rrc", pszAdjName, rc);
+- }
+- return rc;
+-}
+-
+-
+-/**
+- * Validates a name in an extension pack.
+- *
+- * We restrict the charset to try make sure the extension pack can be unpacked
+- * on all file systems.
+- *
+- * @returns VBox status code, failures with message.
+- * @param pszName The name to validate.
+- * @param pszError Where to store an error message on failure.
+- * @param cbError The size of the buffer @a pszError points to.
+- */
+-static int vboxExtPackValidateMemberName(const char *pszName, char *pszError, size_t cbError)
+-{
+- if (RTPathStartsWithRoot(pszName))
+- return vboxExtPackReturnError(VERR_PATH_IS_NOT_RELATIVE, pszError, cbError, "'%s': starts with root spec", pszName);
+-
+- const char *pszErr = NULL;
+- const char *psz = pszName;
+- int ch;
+- while ((ch = *psz) != '\0')
+- {
+- /* Character set restrictions. */
+- if (ch < 0 || ch >= 128)
+- {
+- pszErr = "Only 7-bit ASCII allowed";
+- break;
+- }
+- if (ch <= 31 || ch == 127)
+- {
+- pszErr = "No control characters are not allowed";
+- break;
+- }
+- if (ch == '\\')
+- {
+- pszErr = "Only backward slashes are not allowed";
+- break;
+- }
+- if (strchr("'\":;*?|[]<>(){}", ch))
+- {
+- pszErr = "The characters ', \", :, ;, *, ?, |, [, ], <, >, (, ), { and } are not allowed";
+- break;
+- }
+-
+- /* Take the simple way out and ban all ".." sequences. */
+- if ( ch == '.'
+- && psz[1] == '.')
+- {
+- pszErr = "Double dot sequence are not allowed";
+- break;
+- }
+-
+- /* Keep the tree shallow or the hardening checks will fail. */
+- if (psz - pszName > VBOX_EXTPACK_MAX_MEMBER_NAME_LENGTH)
+- {
+- pszErr = "Too long";
+- break;
+- }
+-
+- /* advance */
+- psz++;
+- }
+-
+- if (pszErr)
+- return vboxExtPackReturnError(VERR_INVALID_NAME, pszError, cbError,
+- "Bad member name '%s' (pos %zu): %s", pszName, (size_t)(psz - pszName), pszErr);
+- return RTEXITCODE_SUCCESS;
+-}
+-
+-
+-/**
+- * Validates a file in an extension pack.
+- *
+- * @returns VBox status code, failures with message.
+- * @param pszName The name of the file.
+- * @param hVfsObj The VFS object.
+- * @param pszError Where to store an error message on failure.
+- * @param cbError The size of the buffer @a pszError points to.
+- */
+-static int vboxExtPackValidateMemberFile(const char *pszName, RTVFSOBJ hVfsObj, char *pszError, size_t cbError)
+-{
+- int rc = vboxExtPackValidateMemberName(pszName, pszError, cbError);
+- if (RT_SUCCESS(rc))
+- {
+- RTFSOBJINFO ObjInfo;
+- rc = RTVfsObjQueryInfo(hVfsObj, &ObjInfo, RTFSOBJATTRADD_NOTHING);
+- if (RT_SUCCESS(rc))
+- {
+- if (ObjInfo.cbObject >= 9*_1G64)
+- rc = vboxExtPackReturnError(VERR_OUT_OF_RANGE, pszError, cbError,
+- "'%s': too large (%'RU64 bytes)",
+- pszName, (uint64_t)ObjInfo.cbObject);
+- if (!RTFS_IS_FILE(ObjInfo.Attr.fMode))
+- rc = vboxExtPackReturnError(VERR_NOT_A_FILE, pszError, cbError,
+- "The alleged file '%s' has a mode mask stating otherwise (%RTfmode)",
+- pszName, ObjInfo.Attr.fMode);
+- }
+- else
+- vboxExtPackSetError(pszError, cbError, "RTVfsObjQueryInfo failed on '%s': %Rrc", pszName, rc);
+- }
+- return rc;
+-}
+-
+-
+-/**
+- * Validates a directory in an extension pack.
+- *
+- * @returns VBox status code, failures with message.
+- * @param pszName The name of the directory.
+- * @param hVfsObj The VFS object.
+- * @param pszError Where to store an error message on failure.
+- * @param cbError The size of the buffer @a pszError points to.
+- */
+-static int vboxExtPackValidateMemberDir(const char *pszName, RTVFSOBJ hVfsObj, char *pszError, size_t cbError)
+-{
+- int rc = vboxExtPackValidateMemberName(pszName, pszError, cbError);
+- if (RT_SUCCESS(rc))
+- {
+- RTFSOBJINFO ObjInfo;
+- rc = RTVfsObjQueryInfo(hVfsObj, &ObjInfo, RTFSOBJATTRADD_NOTHING);
+- if (RT_SUCCESS(rc))
+- {
+- if (!RTFS_IS_DIRECTORY(ObjInfo.Attr.fMode))
+- rc = vboxExtPackReturnError(VERR_NOT_A_DIRECTORY, pszError, cbError,
+- "The alleged directory '%s' has a mode mask saying differently (%RTfmode)",
+- pszName, ObjInfo.Attr.fMode);
+- }
+- else
+- vboxExtPackSetError(pszError, cbError, "RTVfsObjQueryInfo failed on '%s': %Rrc", pszName, rc);
+- }
+- return rc;
+-}
+-
+-/**
+- * Validates a member of an extension pack.
+- *
+- * @returns VBox status code, failures with message.
+- * @param pszName The name of the directory.
+- * @param enmType The object type.
+- * @param hVfsObj The VFS object.
+- * @param pszError Where to store an error message on failure.
+- * @param cbError The size of the buffer @a pszError points to.
+- */
+-int VBoxExtPackValidateMember(const char *pszName, RTVFSOBJTYPE enmType, RTVFSOBJ hVfsObj, char *pszError, size_t cbError)
+-{
+- Assert(cbError > 0);
+- *pszError = '\0';
+-
+- int rc;
+- if ( enmType == RTVFSOBJTYPE_FILE
+- || enmType == RTVFSOBJTYPE_IO_STREAM)
+- rc = vboxExtPackValidateMemberFile(pszName, hVfsObj, pszError, cbError);
+- else if ( enmType == RTVFSOBJTYPE_DIR
+- || enmType == RTVFSOBJTYPE_BASE)
+- rc = vboxExtPackValidateMemberDir(pszName, hVfsObj, pszError, cbError);
+- else
+- rc = vboxExtPackReturnError(VERR_UNEXPECTED_FS_OBJ_TYPE, pszError, cbError,
+- "'%s' is not a file or directory (enmType=%d)", pszName, enmType);
+- return rc;
+-}
+-
+-
+-/**
+- * Rewinds the tarball file handle and creates a gunzip | tar chain that
+- * results in a filesystem stream.
+- *
+- * @returns VBox status code, failures with message.
+- * @param hTarballFile The handle to the tarball file.
+- * @param pszError Where to store an error message on failure.
+- * @param cbError The size of the buffer @a pszError points to.
+- * @param phTarFss Where to return the filesystem stream handle.
+- * @param phFileManifest Where to return a manifest where the tarball is
+- * gettting hashed. The entry will be called
+- * "extpack" and be ready when the file system
+- * stream is at an end. Optional.
+- */
+-int VBoxExtPackOpenTarFss(RTFILE hTarballFile, char *pszError, size_t cbError, PRTVFSFSSTREAM phTarFss, PRTMANIFEST phFileManifest)
+-{
+- Assert(cbError > 0);
+- *pszError = '\0';
+- *phTarFss = NIL_RTVFSFSSTREAM;
+-
+- /*
+- * Rewind the file and set up a VFS chain for it.
+- */
+- int rc = RTFileSeek(hTarballFile, 0, RTFILE_SEEK_BEGIN, NULL);
+- if (RT_FAILURE(rc))
+- return vboxExtPackReturnError(rc, pszError, cbError, "Failed seeking to the start of the tarball: %Rrc", rc);
+-
+- RTVFSIOSTREAM hTarballIos;
+- rc = RTVfsIoStrmFromRTFile(hTarballFile, RTFILE_O_READ | RTFILE_O_DENY_WRITE | RTFILE_O_OPEN, true /*fLeaveOpen*/,
+- &hTarballIos);
+- if (RT_FAILURE(rc))
+- return vboxExtPackReturnError(rc, pszError, cbError, "RTVfsIoStrmFromRTFile failed: %Rrc", rc);
+-
+- RTMANIFEST hFileManifest = NIL_RTMANIFEST;
+- rc = RTManifestCreate(0 /*fFlags*/, &hFileManifest);
+- if (RT_SUCCESS(rc))
+- {
+- RTVFSIOSTREAM hPtIos;
+- rc = RTManifestEntryAddPassthruIoStream(hFileManifest, hTarballIos, "extpack", RTMANIFEST_ATTR_SHA256, true /*read*/, &hPtIos);
+- if (RT_SUCCESS(rc))
+- {
+- RTVFSIOSTREAM hGunzipIos;
+- rc = RTZipGzipDecompressIoStream(hPtIos, 0 /*fFlags*/, &hGunzipIos);
+- if (RT_SUCCESS(rc))
+- {
+- RTVFSFSSTREAM hTarFss;
+- rc = RTZipTarFsStreamFromIoStream(hGunzipIos, 0 /*fFlags*/, &hTarFss);
+- if (RT_SUCCESS(rc))
+- {
+- RTVfsIoStrmRelease(hPtIos);
+- RTVfsIoStrmRelease(hGunzipIos);
+- RTVfsIoStrmRelease(hTarballIos);
+- *phTarFss = hTarFss;
+- if (phFileManifest)
+- *phFileManifest = hFileManifest;
+- else
+- RTManifestRelease(hFileManifest);
+- return VINF_SUCCESS;
+- }
+-
+- vboxExtPackSetError(pszError, cbError, "RTZipTarFsStreamFromIoStream failed: %Rrc", rc);
+- RTVfsIoStrmRelease(hGunzipIos);
+- }
+- else
+- vboxExtPackSetError(pszError, cbError, "RTZipGzipDecompressIoStream failed: %Rrc", rc);
+- RTVfsIoStrmRelease(hPtIos);
+- }
+- else
+- vboxExtPackSetError(pszError, cbError, "RTManifestEntryAddPassthruIoStream failed: %Rrc", rc);
+- RTManifestRelease(hFileManifest);
+- }
+- else
+- vboxExtPackSetError(pszError, cbError, "RTManifestCreate failed: %Rrc", rc);
+-
+- RTVfsIoStrmRelease(hTarballIos);
+- return rc;
+-}
+-
+-
+-/**
+- * Validates the extension pack tarball prior to unpacking.
+- *
+- * Operations performed:
+- * - Mandatory files.
+- * - Manifest check.
+- * - Manifest seal check.
+- * - XML check, match name.
+- *
+- * @returns VBox status code, failures with message.
+- * @param hTarballFile The handle to open the @a pszTarball file.
+- * @param pszExtPackName The name of the extension pack name. NULL if
+- * the name is not fixed.
+- * @param pszTarball The name of the tarball in case we have to
+- * complain about something.
+- * @param pszTarballDigest The SHA-256 digest of the tarball. Empty string
+- * if no digest available.
+- * @param pszError Where to store an error message on failure.
+- * @param cbError The size of the buffer @a pszError points to.
+- * @param phValidManifest Where to optionally return the handle to fully
+- * validated the manifest for the extension pack.
+- * This includes all files.
+- * @param phXmlFile Where to optionally return the memorized XML
+- * file.
+- * @param pStrDigest Where to return the digest of the file.
+- * Optional.
+- */
+-int VBoxExtPackValidateTarball(RTFILE hTarballFile, const char *pszExtPackName,
+- const char *pszTarball, const char *pszTarballDigest,
+- char *pszError, size_t cbError,
+- PRTMANIFEST phValidManifest, PRTVFSFILE phXmlFile, RTCString *pStrDigest)
+-{
+- /*
+- * Clear return values.
+- */
+- if (phValidManifest)
+- *phValidManifest = NIL_RTMANIFEST;
+- if (phXmlFile)
+- *phXmlFile = NIL_RTVFSFILE;
+- Assert(cbError > 1);
+- *pszError = '\0';
+- NOREF(pszTarball);
+-
+- /*
+- * Open the tar.gz filesystem stream and set up an manifest in-memory file.
+- */
+- RTMANIFEST hFileManifest;
+- RTVFSFSSTREAM hTarFss;
+- int rc = VBoxExtPackOpenTarFss(hTarballFile, pszError, cbError, &hTarFss, &hFileManifest);
+- if (RT_FAILURE(rc))
+- return rc;
+-
+- RTMANIFEST hOurManifest;
+- rc = RTManifestCreate(0 /*fFlags*/, &hOurManifest);
+- if (RT_SUCCESS(rc))
+- {
+- /*
+- * Process the tarball (would be nice to move this to a function).
+- */
+- RTVFSFILE hXmlFile = NIL_RTVFSFILE;
+- RTVFSFILE hManifestFile = NIL_RTVFSFILE;
+- RTVFSFILE hSignatureFile = NIL_RTVFSFILE;
+- for (;;)
+- {
+- /*
+- * Get the next stream object.
+- */
+- char *pszName;
+- RTVFSOBJ hVfsObj;
+- RTVFSOBJTYPE enmType;
+- rc = RTVfsFsStrmNext(hTarFss, &pszName, &enmType, &hVfsObj);
+- if (RT_FAILURE(rc))
+- {
+- if (rc != VERR_EOF)
+- vboxExtPackSetError(pszError, cbError, "RTVfsFsStrmNext failed: %Rrc", rc);
+- else
+- rc = VINF_SUCCESS;
+- break;
+- }
+- const char *pszAdjName = pszName[0] == '.' && pszName[1] == '/' ? &pszName[2] : pszName;
+-
+- /*
+- * Check the type & name validity, performing special tests on
+- * standard extension pack member files.
+- *
+- * N.B. We will always reach the end of the loop before breaking on
+- * failure - cleanup reasons.
+- */
+- rc = VBoxExtPackValidateMember(pszName, enmType, hVfsObj, pszError, cbError);
+- if (RT_SUCCESS(rc))
+- {
+- PRTVFSFILE phVfsFile = NULL;
+- if (!strcmp(pszAdjName, VBOX_EXTPACK_DESCRIPTION_NAME))
+- phVfsFile = &hXmlFile;
+- else if (!strcmp(pszAdjName, VBOX_EXTPACK_MANIFEST_NAME))
+- phVfsFile = &hManifestFile;
+- else if (!strcmp(pszAdjName, VBOX_EXTPACK_SIGNATURE_NAME))
+- phVfsFile = &hSignatureFile;
+- else if (!strncmp(pszAdjName, VBOX_EXTPACK_LICENSE_NAME_PREFIX, sizeof(VBOX_EXTPACK_LICENSE_NAME_PREFIX) - 1))
+- rc = VBoxExtPackValidateStandardFile(pszAdjName, enmType, &hVfsObj, NULL, pszError, cbError);
+- if (phVfsFile)
+- rc = VBoxExtPackValidateStandardFile(pszAdjName, enmType, &hVfsObj, phVfsFile, pszError, cbError);
+- }
+-
+- /*
+- * Add any I/O stream to the manifest
+- */
+- if ( RT_SUCCESS(rc)
+- && ( enmType == RTVFSOBJTYPE_FILE
+- || enmType == RTVFSOBJTYPE_IO_STREAM))
+- {
+- RTVFSIOSTREAM hVfsIos = RTVfsObjToIoStream(hVfsObj);
+- rc = RTManifestEntryAddIoStream(hOurManifest, hVfsIos, pszAdjName, RTMANIFEST_ATTR_SIZE | RTMANIFEST_ATTR_SHA256);
+- if (RT_FAILURE(rc))
+- vboxExtPackSetError(pszError, cbError, "RTManifestEntryAddIoStream failed on '%s': %Rrc", pszAdjName, rc);
+- RTVfsIoStrmRelease(hVfsIos);
+- }
+-
+- /*
+- * Clean up and break out on failure.
+- */
+- RTVfsObjRelease(hVfsObj);
+- RTStrFree(pszName);
+- if (RT_FAILURE(rc))
+- break;
+- }
+-
+- /*
+- * Check the integrity of the tarball file.
+- */
+- if (RT_SUCCESS(rc))
+- {
+- RTVfsFsStrmRelease(hTarFss);
+- hTarFss = NIL_RTVFSFSSTREAM;
+- rc = vboxExtPackVerifyFileDigest(hFileManifest, pszTarballDigest, pStrDigest, pszError, cbError);
+- }
+-
+- /*
+- * If we've successfully processed the tarball, verify that the
+- * mandatory files are present.
+- */
+- if (RT_SUCCESS(rc))
+- {
+- if (hXmlFile == NIL_RTVFSFILE)
+- rc = vboxExtPackReturnError(VERR_MISSING, pszError, cbError, "Mandator file '%s' is missing", VBOX_EXTPACK_DESCRIPTION_NAME);
+- if (hManifestFile == NIL_RTVFSFILE)
+- rc = vboxExtPackReturnError(VERR_MISSING, pszError, cbError, "Mandator file '%s' is missing", VBOX_EXTPACK_MANIFEST_NAME);
+- if (hSignatureFile == NIL_RTVFSFILE)
+- rc = vboxExtPackReturnError(VERR_MISSING, pszError, cbError, "Mandator file '%s' is missing", VBOX_EXTPACK_SIGNATURE_NAME);
+- }
+-
+- /*
+- * Check the manifest and it's signature.
+- */
+- if (RT_SUCCESS(rc))
+- rc = vboxExtPackVerifyManifestAndSignature(hOurManifest, hManifestFile, hSignatureFile, pszError, cbError);
+-
+- /*
+- * Check the XML.
+- */
+- if (RT_SUCCESS(rc))
+- rc = vboxExtPackVerifyXml(hXmlFile, pszExtPackName, pszError, cbError);
+-
+- /*
+- * Returns objects.
+- */
+- if (RT_SUCCESS(rc))
+- {
+- if (phValidManifest)
+- {
+- RTManifestRetain(hOurManifest);
+- *phValidManifest = hOurManifest;
+- }
+- if (phXmlFile)
+- {
+- RTVfsFileRetain(hXmlFile);
+- *phXmlFile = hXmlFile;
+- }
+- }
+-
+- /*
+- * Release our object references.
+- */
+- RTManifestRelease(hOurManifest);
+- RTVfsFileRelease(hXmlFile);
+- RTVfsFileRelease(hManifestFile);
+- RTVfsFileRelease(hSignatureFile);
+- }
+- else
+- vboxExtPackSetError(pszError, cbError, "RTManifestCreate failed: %Rrc", rc);
+- RTVfsFsStrmRelease(hTarFss);
+- RTManifestRelease(hFileManifest);
+-
+- return rc;
+-}
+-
+--- VirtualBox-4.1.18.orig/include/Makefile.kmk 2012-06-20 10:07:49.000000000 -0300
++++ VirtualBox-4.1.18/include/Makefile.kmk 2012-07-24 21:11:57.007068865 -0300
+@@ -51,7 +51,6 @@
+ VBox/vd-cache-plugin.h \
+ VBox/vmm/uvm.h \
+ VBox/vscsi.h \
+- $(wildcard VBox/ExtPack/*.h ) \
+ iprt/alloca.h \
+ iprt/tcp.h \
+ iprt/localipc.h \
+--- VirtualBox-4.1.18.orig/src/Makefile.kmk 2012-06-20 10:07:57.000000000 -0300
++++ VirtualBox-4.1.18/src/Makefile.kmk 2012-07-24 22:51:10.206996034 -0300
+@@ -26,14 +26,6 @@
+ include $(PATH_SUB_CURRENT)/VBox/Makefile.kmk
+ include $(PATH_SUB_CURRENT)/libs/Makefile.kmk
+
+-else if defined(VBOX_ONLY_EXTPACKS)
+- include $(PATH_SUB_CURRENT)/bldprogs/Makefile.kmk
+- include $(PATH_SUB_CURRENT)/VBox/Makefile.kmk
+- include $(PATH_SUB_CURRENT)/libs/Makefile.kmk
+- ifndef VBOX_ONLY_EXTPACKS_USE_IMPLIBS
+- include $(PATH_SUB_CURRENT)/recompiler/Makefile.kmk
+- endif
+-
+ else if defined(VBOX_ONLY_TESTSUITE)
+ include $(PATH_SUB_CURRENT)/libs/Makefile.kmk
+ include $(PATH_SUB_CURRENT)/VBox/Makefile.kmk
+--- VirtualBox-4.1.18.orig/src/VBox/Makefile.kmk 2012-07-24 21:19:55.565641784 -0300
++++ VirtualBox-4.1.18/src/VBox/Makefile.kmk 2012-07-24 22:12:55.429156962 -0300
+@@ -33,19 +33,6 @@
+ include $(PATH_SUB_CURRENT)/HostDrivers/Makefile.kmk
+ include $(PATH_SUB_CURRENT)/Frontends/Makefile.kmk
+
+-else ifdef VBOX_ONLY_EXTPACKS
+- include $(PATH_SUB_CURRENT)/Runtime/Makefile.kmk
+- include $(PATH_SUB_CURRENT)/Devices/Makefile.kmk
+- include $(PATH_SUB_CURRENT)/HostDrivers/Makefile.kmk
+- include $(PATH_SUB_CURRENT)/ExtPacks/Makefile.kmk
+- ifdef VBOX_WITH_VRDP
+- include $(PATH_SUB_CURRENT)/RDP/Makefile.kmk
+- endif
+- include $(PATH_SUB_CURRENT)/VMM/Makefile.kmk
+- ifndef VBOX_ONLY_EXTPACKS_USE_IMPLIBS
+- include $(PATH_SUB_CURRENT)/Disassembler/Makefile.kmk
+- endif
+-
+ else ifdef VBOX_ONLY_SDK
+ include $(PATH_SUB_CURRENT)/Main/Makefile.kmk
+ ifdef VBOX_WITH_VRDP
+@@ -92,9 +79,6 @@
+ if1of ($(KBUILD_TARGET_ARCH), amd64 x86)
+ include $(PATH_SUB_CURRENT)/NetworkServices/Makefile.kmk
+ endif
+- ifndef VBOX_OSE
+- include $(PATH_SUB_CURRENT)/ExtPacks/Makefile.kmk
+- endif
+ ifdef VBOX_WITH_INSTALLER
+ include $(PATH_SUB_CURRENT)/Installer/Makefile.kmk # Keep this last.
+ endif
+--- VirtualBox-4.1.18/src/libs/Makefile.kmk.orig 2012-07-24 21:23:26.938013023 -0300
++++ VirtualBox-4.1.18/src/libs/Makefile.kmk 2012-07-24 21:43:42.557911752 -0300
+@@ -48,13 +48,6 @@
+ include $(PATH_SUB_CURRENT)/kStuff/Makefile.kmk
+ endif
+
+-# OpenSSL.
+-if !defined(VBOX_ONLY_SDK) \
+- && ( "$(SDK_VBOX_OPENSSL_INCS)" == "$(SDK_VBOX_OPENSSL_VBOX_DEFAULT_INCS)" \
+- || defined(VBOX_WITH_EXTPACK_PUEL_BUILD))
+- include $(PATH_SUB_CURRENT)/openssl-0.9.8t/Makefile.kmk
+-endif
+-
+ # libjpeg for VRDP video redirection
+ if defined(VBOX_WITH_VRDP) && defined(VBOX_WITH_VRDP_VIDEO_CHANNEL)
+ include $(PATH_SUB_CURRENT)/jpeg-8a/Makefile.kmk
+--- VirtualBox-4.1.18.orig/src/VBox/Devices/Makefile.kmk 2012-07-24 23:06:45.916276235 -0300
++++ VirtualBox-4.1.18/src/VBox/Devices/Makefile.kmk 2012-07-24 23:17:00.202963228 -0300
+@@ -21,9 +21,7 @@
+
+ # Include sub-makefiles.
+ include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
+-if defined(VBOX_WITH_INTEL_PXE) || defined(VBOX_ONLY_EXTPACKS)
+- include $(PATH_SUB_CURRENT)/PC/PXE/Makefile.kmk
+-else if defined(VBOX_WITH_PXE_ROM) && !defined(VBOX_WITHOUT_ETHERBOOT)
++if defined(VBOX_WITH_PXE_ROM) && !defined(VBOX_WITHOUT_ETHERBOOT)
+ include $(PATH_SUB_CURRENT)/PC/Etherboot-src/Makefile.kmk
+ endif
+ if !defined(VBOX_ONLY_EXTPACKS) # Goes on almost to the end of the file.
+@@ -57,9 +55,6 @@
+ ifdef VBOX_WITH_USB
+ VBoxDDU_DEFS += VBOX_WITH_USB IN_USBLIB
+ VBoxDDU_SDKS.win = WINPSDK W2K3DDK
+- if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
+- VBoxDDU_DEFS += VBOX_WITH_EHCI_IMPL
+- endif
+ ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
+ VBoxDDU_DEFS.darwin += VBOX_WITH_NEW_USB_CODE_ON_DARWIN
+ endif
+@@ -122,9 +117,6 @@
+ VBoxDD_DEFS = VBOX_ACPI
+ ifdef VBOX_WITH_USB
+ VBoxDD_DEFS += VBOX_WITH_USB
+- if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
+- VBoxDD_DEFS += VBOX_WITH_EHCI_IMPL
+- endif
+ endif
+ ifdef VBOX_WITH_VUSB
+ VBoxDD_DEFS += VBOX_WITH_VUSB
+@@ -446,11 +438,6 @@
+ endif
+ ifdef VBOX_WITH_USB
+ DevicesR3_DEFS += VBOX_WITH_USB
+- if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
+- DevicesR3_DEFS += VBOX_WITH_EHCI_IMPL
+- DevicesR3_SOURCES += \
+- USB/DevEHCI.cpp
+- endif
+ endif
+ if defined(VBOX_WITH_PCI_PASSTHROUGH_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
+ DevicesR3_DEFS += VBOX_WITH_PCI_PASSTHROUGH_IMPL
+@@ -607,11 +594,6 @@
+
+ ifdef VBOX_WITH_USB
+ VBoxDDGC_DEFS += VBOX_WITH_USB
+- if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
+- VBoxDDGC_DEFS += VBOX_WITH_EHCI_IMPL
+- VBoxDDGC_SOURCES += \
+- USB/DevEHCI.cpp
+- endif
+ endif
+
+ ifdef VBOX_WITH_VIDEOHWACCEL
+@@ -711,11 +693,6 @@
+ endif
+ ifdef VBOX_WITH_USB
+ VBoxDDR0_DEFS += VBOX_WITH_USB
+- if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
+- VBoxDDR0_DEFS += VBOX_WITH_EHCI_IMPL
+- VBoxDDR0_SOURCES += \
+- USB/DevEHCI.cpp
+- endif
+ endif
+
+ if defined(VBOX_WITH_PCI_PASSTHROUGH_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
+@@ -1204,49 +1181,5 @@
+
+ endif # !VBOX_ONLY_EXTPACKS
+
+-if defined(VBOX_WITH_EXTPACK_PUEL) && defined(VBOX_WITH_EXTPACK_PUEL_BUILD)
+- #
+- # The EHCI (USB 2.0) Extension Pack Modules.
+- #
+- if defined(VBOX_WITH_USB)
+- DLLS += VBoxEhciR3
+- VBoxEhciR3_TEMPLATE = VBoxR3ExtPackPuel
+- VBoxEhciR3_SOURCES = USB/DevEHCI.cpp
+-
+- SYSMODS += VBoxEhciR0
+- VBoxEhciR0_TEMPLATE = VBoxR0ExtPackPuel
+- VBoxEhciR0_SOURCES = USB/DevEHCI.cpp
+-
+- ifdef VBOX_WITH_RAW_MODE
+- SYSMODS += VBoxEhciRC
+- VBoxEhciRC_TEMPLATE = VBoxRcExtPackPuel
+- VBoxEhciRC_SOURCES = USB/DevEHCI.cpp
+- endif
+- endif
+-
+- if defined(VBOX_WITH_PCI_PASSTHROUGH)
+- DLLS += VBoxPciRawR3
+- VBoxPciRawR3_TEMPLATE = VBoxR3ExtPackPuel
+- VBoxPciRawR3_SOURCES = Bus/DevPciRaw.cpp
+-
+- DLLS += VBoxPciRawDrv
+- VBoxPciRawDrv_TEMPLATE = VBoxR3ExtPackPuel
+- VBoxPciRawDrv_SOURCES = Bus/DrvPciRaw.cpp
+-
+- SYSMODS += VBoxPciRawR0
+- VBoxPciRawR0_TEMPLATE = VBoxR0ExtPackPuel
+- VBoxPciRawR0_SOURCES = Bus/DevPciRaw.cpp
+-
+- Bus/DevPciRaw.cpp_INCS = Bus
+- endif
+-
+- #
+- # The Intel PXE rom.
+- #
+- INSTALLS += VBoxExtPackPuelInsRoms
+- VBoxExtPackPuelInsRoms_TEMPLATE = VBoxInsExtPackPuel
+- VBoxExtPackPuelInsRoms_SOURCES = PC/PXE/PXE-Intel.rom=>PXE-Intel.rom
+-endif # VBOX_WITH_EXTPACK_PUEL
+-
+ include $(KBUILD_PATH)/subfooter.kmk
+
+--- VirtualBox-4.1.18.orig/src/VBox/Main/Makefile.kmk 2012-07-24 23:38:25.304126039 -0300
++++ VirtualBox-4.1.18/src/VBox/Main/Makefile.kmk 2012-07-24 23:38:25.350789964 -0300
+@@ -230,14 +230,12 @@
+ $(if $(VBOX_USB_WITH_SYSFS),VBOX_USB_WITH_SYSFS,) \
+ $(if $(VBOX_USB_WITH_INOTIFY),VBOX_USB_WITH_INOTIFY,) \
+ $(if $(VBOX_WITH_LIVE_MIGRATION),VBOX_WITH_LIVE_MIGRATION,) \
+- $(if $(VBOX_WITH_EXTPACK),VBOX_WITH_EXTPACK,) \
+ $(if $(VBOX_WITH_VUSB),VBOX_WITH_VUSB,) \
+ $(if $(VBOX_WITH_S3),VBOX_WITH_S3,) \
+ $(if $(VBOX_WITH_PCI_PASSTHROUGH),VBOX_WITH_PCI_PASSTHROUGH,)
+ ifdef VBOX_WITH_USB
+ VBoxSVC_DEFS += \
+ VBOX_WITH_USB \
+- $(if $(VBOX_WITH_EHCI),VBOX_WITH_EHCI,) \
+ $(if $(VBOX_WITH_NEW_USB_CODE_ON_DARWIN),VBOX_WITH_NEW_USB_CODE_ON_DARWIN,)
+ endif
+ VBoxSVC_DEFS.win += VBOX_COM_OUTOFPROC_MODULE
+@@ -290,7 +288,6 @@
+ src-all/SharedFolderImpl.cpp \
+ src-all/VirtualBoxBase.cpp \
+ src-all/VirtualBoxErrorInfoImpl.cpp \
+- $(if $(VBOX_WITH_EXTPACK),src-all/ExtPackManagerImpl.cpp src-all/ExtPackUtil.cpp,) \
+ src-server/ApplianceImpl.cpp \
+ src-server/ApplianceImplExport.cpp \
+ src-server/ApplianceImplImport.cpp \
+@@ -543,8 +540,6 @@
+ $(if $(VBOX_WITH_HGSMI),VBOX_WITH_HGSMI,) \
+ $(if $(VBOX_WITH_VIDEOHWACCEL),VBOX_WITH_VIDEOHWACCEL,) \
+ $(if $(VBOX_WITH_USB),VBOX_WITH_USB,) \
+- $(if-expr defined(VBOX_WITH_EHCI) && defined(VBOX_WITH_USB),VBOX_WITH_EHCI,) \
+- $(if $(VBOX_WITH_EXTPACK),VBOX_WITH_EXTPACK,) \
+ $(if $(VBOX_WITH_PCI_PASSTHROUGH),VBOX_WITH_PCI_PASSTHROUGH,)
+
+ VBoxC_DEFS.darwin.x86 = VBOX_WITH_2X_4GB_ADDR_SPACE
+@@ -602,7 +597,6 @@
+ src-all/SharedFolderImpl.cpp \
+ src-all/VirtualBoxBase.cpp \
+ src-all/VirtualBoxErrorInfoImpl.cpp \
+- $(if $(VBOX_WITH_EXTPACK),src-all/ExtPackManagerImpl.cpp src-all/ExtPackUtil.cpp,) \
+ $(if $(VBOX_WITH_USB_VIDEO),src-client/UsbWebcamInterface.cpp,) \
+ $(if $(VBOX_WITH_USB_CARDREADER),src-client/UsbCardReader.cpp,) \
+ src-client/AdditionsFacilityImpl.cpp \
+@@ -711,22 +705,6 @@
+ endif # !win
+
+
+-#
+-# The VBoxExtPackHelperApp.
+-#
+-ifdef VBOX_WITH_EXTPACK
+- PROGRAMS += VBoxExtPackHelperApp
+- VBoxExtPackHelperApp_TEMPLATE = VBoxR3SetUidToRoot
+- VBoxExtPackHelperApp_LDFLAGS.darwin = -framework Security
+- VBoxExtPackHelperApp_LDFLAGS.win = /SUBSYSTEM:windows
+- VBoxExtPackHelperApp_SOURCES = \
+- src-helper-apps/VBoxExtPackHelperApp.cpp \
+- src-all/ExtPackUtil.cpp
+- VBoxExtPackHelperApp_LIBS = \
+- $(LIB_RUNTIME)
+-endif # VBOX_WITH_EXTPACK
+-
+-
+ endif # !VBOX_ONLY_SDK (the ifndef is far above)
+
+
+--- VirtualBox-4.1.18.orig/src/VBox/Frontends/VirtualBox/Makefile.kmk 2012-07-24 23:25:04.575825175 -0300
++++ VirtualBox-4.1.18/src/VBox/Frontends/VirtualBox/Makefile.kmk 2012-07-24 23:25:04.619156084 -0300
+@@ -888,7 +888,6 @@
+ $(VBOX_MACOSX_ICON_FILE)=>Resources/virtualbox.icns \
+ $(VBOX_BRAND_GUI_VBOX_64PX_PNG)=>Resources/virtualbox.png \
+ $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-vbox.icns=>Resources/virtualbox-vbox.icns \
+- $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-vbox-extpack.icns=>Resources/virtualbox-vbox-extpack.icns \
+ $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-ovf.icns=>Resources/virtualbox-ovf.icns \
+ $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-ova.icns=>Resources/virtualbox-ova.icns \
+ $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-vdi.icns=>Resources/virtualbox-vdi.icns \
+--- VirtualBox-4.1.18.orig/src/VBox/Frontends/VirtualBox/VirtualBox2.qrc 2012-07-24 23:28:17.985011038 -0300
++++ VirtualBox-4.1.18/src/VBox/Frontends/VirtualBox/VirtualBox2.qrc 2012-07-24 23:28:18.051673913 -0300
+@@ -167,18 +167,6 @@
+ <file alias="status_check_32px.png">images/status_check_32px.png</file>
+ <file alias="status_error_16px.png">images/status_error_16px.png</file>
+ <file alias="status_error_32px.png">images/status_error_32px.png</file>
+- <file alias="extension_pack_16px.png">images/extension_pack_16px.png</file>
+- <file alias="extension_pack_disabled_16px.png">images/extension_pack_disabled_16px.png</file>
+- <file alias="extension_pack_32px.png">images/extension_pack_32px.png</file>
+- <file alias="extension_pack_disabled_32px.png">images/extension_pack_disabled_32px.png</file>
+- <file alias="extension_pack_install_16px.png">images/extension_pack_install_16px.png</file>
+- <file alias="extension_pack_install_disabled_16px.png">images/extension_pack_install_disabled_16px.png</file>
+- <file alias="extension_pack_install_32px.png">images/extension_pack_install_32px.png</file>
+- <file alias="extension_pack_install_disabled_32px.png">images/extension_pack_install_disabled_32px.png</file>
+- <file alias="extension_pack_uninstall_16px.png">images/extension_pack_uninstall_16px.png</file>
+- <file alias="extension_pack_uninstall_disabled_16px.png">images/extension_pack_uninstall_disabled_16px.png</file>
+- <file alias="extension_pack_uninstall_32px.png">images/extension_pack_uninstall_32px.png</file>
+- <file alias="extension_pack_uninstall_disabled_32px.png">images/extension_pack_uninstall_disabled_32px.png</file>
+ <file alias="proxy_16px.png">images/proxy_16px.png</file>
+ <file alias="proxy_disabled_16px.png">images/proxy_disabled_16px.png</file>
+ <file alias="proxy_32px.png">images/proxy_32px.png</file>
+--- VirtualBox-4.1.18.orig/src/VBox/Installer/linux/Makefile.kmk 2012-07-25 00:32:00.780012664 -0300
++++ VirtualBox-4.1.18/src/VBox/Installer/linux/Makefile.kmk 2012-07-25 00:32:00.806677728 -0300
+@@ -170,11 +170,6 @@
+ VBox.sh \
+ VBox.png
+
+-ifdef VBOX_WITH_EXTPACK
+- VBOX_LNX_STRIP_BIN += \
+- VBoxExtPackHelperApp
+-endif
+-
+ # Qt4 GUI
+ ifdef VBOX_WITH_QTGUI
+ include $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk
+@@ -286,7 +281,7 @@
+
+ VBOX_MIME_ICONS = \
+ $(addprefix $(PATH_ROOT)/src/VBox/Resources/other/,\
+- $(foreach f,ova ovf vbox vbox-extpack vdi vmdk vhd hdd, \
++ $(foreach f,ova ovf vbox vdi vmdk vhd hdd, \
+ $(foreach s,16 20 24 32 48 64 72 96 128 256,\
+ virtualbox-$(f)-$(s)px.png=>$(s)x$(s)/virtualbox-$(f).png)))
+
+--- VirtualBox-4.1.18.orig/src/VBox/Installer/win/Makefile.kmk 2012-07-25 00:34:52.253398525 -0300
++++ VirtualBox-4.1.18/src/VBox/Installer/win/Makefile.kmk 2012-07-25 00:34:52.300062531 -0300
+@@ -435,7 +435,6 @@
+ -E 'VBOX_WITH_DEBUGGER_GUI=$(if-expr defined(VBOX_WITH_DEBUGGER_GUI) && defined(VBOX_WITH_QTGUI),yes,no)' \
+ -E 'VBOX_WITH_DOCS_PACKING=$(if $(VBOX_WITH_DOCS_PACKING),yes,no)' \
+ -E 'VBOX_WITH_EFIFW_PACKING=$(if $(VBOX_WITH_EFIFW_PACKING),yes,no)' \
+- -E 'VBOX_WITH_EXTPACK=$(if $(VBOX_WITH_EXTPACK),yes,no)' \
+ -E 'VBOX_WITH_GUEST_CONTROL=$(if $(VBOX_WITH_GUEST_CONTROL),yes,no)' \
+ -E 'VBOX_WITH_GUEST_PROPS=$(if $(VBOX_WITH_GUEST_PROPS),yes,no)' \
+ -E 'VBOX_WITH_NETFLT=$(if $(VBOX_WITH_NETFLT),yes,no)' \
+--- VirtualBox-4.1.18.orig/src/VBox/Installer/darwin/Makefile.kmk 2012-07-25 00:36:55.929571374 -0300
++++ VirtualBox-4.1.18/src/VBox/Installer/darwin/Makefile.kmk 2012-07-25 00:36:55.959569630 -0300
+@@ -629,7 +629,6 @@
+ MacOS/VirtualBoxVM \
+ MacOS/VBoxNetAdpCtl \
+ MacOS/VBoxNetDHCP \
+- MacOS/VBoxExtPackHelperApp \
+ MacOS/VBoxBalloonCtrl
+ ifdef VBOX_WITH_WEBSERVICES
+ VBOX_DI_VBAPP_PROGS += \
+@@ -659,7 +658,6 @@
+ Resources/virtualbox.icns \
+ Resources/virtualbox.png \
+ Resources/virtualbox-vbox.icns \
+- Resources/virtualbox-vbox-extpack.icns \
+ Resources/virtualbox-ovf.icns \
+ Resources/virtualbox-ova.icns \
+ Resources/virtualbox-vdi.icns \
+--- VirtualBox-4.1.18/src/VBox/Installer/solaris/Makefile.kmk.orig 2012-07-25 00:38:48.476398293 -0300
++++ VirtualBox-4.1.18/src/VBox/Installer/solaris/Makefile.kmk 2012-07-25 00:38:48.516396159 -0300
+@@ -185,12 +185,12 @@
+
+ VBOX_MIME_ICONS = \
+ $(addprefix $(PATH_ROOT)/src/VBox/Resources/other/,\
+- $(foreach f,ova ovf vbox vbox-extpack vdi vmdk vhd hdd, \
++ $(foreach f,ova ovf vbox vdi vmdk vhd hdd, \
+ $(foreach s,16 20 24 32 48 64 72 96 128 256,\
+ virtualbox-$(f)-$(s)px.png=>$(s)x$(s)/mimetypes/virtualbox-$(f).png)))
+
+ SOLARIS_COMMON_ICONS = \
+- $(foreach f,ova ovf vbox vbox-extpack vdi vmdk vhd hdd, \
++ $(foreach f,ova ovf vbox vdi vmdk vhd hdd, \
+ $(foreach s,16 20 24 32 48 64 72 96 128 256,\
+ $(s)x$(s)/mimetypes/virtualbox-$(f).png))
+
+@@ -210,7 +210,6 @@
+ $(if $(VBOX_WITH_VBOXSDL),VBoxSDL,) \
+ $(if $(VBOX_WITH_NETADP),VBoxNetAdpCtl,) \
+ VBoxNetDHCP \
+- $(if $(VBOX_WITH_EXTPACK),VBoxExtPackHelperApp,) \
+ VBoxSVC \
+ $(if $(VBOX_WITH_CROGL),VBoxTestOGL,) \
+ VBoxXPCOMIPCD \
+--- VirtualBox-4.1.18.orig/src/VBox/Runtime/Makefile.kmk 2012-07-25 00:40:58.745522450 -0300
++++ VirtualBox-4.1.18/src/VBox/Runtime/Makefile.kmk 2012-07-25 00:40:58.782186960 -0300
+@@ -53,15 +53,6 @@
+ #
+ LIBRARIES += RuntimeR3 RuntimeBldProg
+
+-else ifdef VBOX_ONLY_EXTPACKS_USE_IMPLIBS
+- #
+- # Build docs only - need just regular R3 runtime.
+- #
+- LIBRARIES += RuntimeBldProg
+- LIBRARIES.solaris += RuntimeR0Stub
+- LIBRARIES.win += RuntimeR0Stub RuntimeRCStub
+- include $(PATH_SUB_CURRENT)/tools/Makefile.kmk
+-
+ else # !VBOX_ONLY_ADDITIONS && !VBOX_ONLY_TESTSUITE && !VBOX_ONLY_DOCS
+
+ #
diff --git a/libre/virtualbox-libre-modules/linux34.patch b/libre/virtualbox-libre-modules/linux34.patch
new file mode 100644
index 000000000..05ec78557
--- /dev/null
+++ b/libre/virtualbox-libre-modules/linux34.patch
@@ -0,0 +1,12 @@
+diff -Nur VirtualBox-4.1.14.orig/Config.kmk VirtualBox-4.1.14/Config.kmk
+--- VirtualBox-4.1.14.orig/Config.kmk 2012-04-26 16:56:21.000000000 +0000
++++ VirtualBox-4.1.14/Config.kmk 2012-05-21 14:35:22.348398884 +0000
+@@ -2856,7 +2856,7 @@
+ TEMPLATE_VBOXR0DRV_CFLAGS.amd64 = -m64 -mno-red-zone -mcmodel=kernel -mno-sse -mno-mmx -mno-sse2 -mno-3dnow \
+ -fno-reorder-blocks -ffreestanding -fno-asynchronous-unwind-tables -funit-at-a-time \
+ -Wno-sign-compare -Wdeclaration-after-statement
+-TEMPLATE_VBOXR0DRV_CXXFLAGS = $(filter-out -Wstrict-prototypes -Wno-pointer-sign -ffreestanding -Wdeclaration-after-statement -Werror-implicit-function-declaration,$(TEMPLATE_VBOXR0DRV_CFLAGS) $(TEMPLATE_VBOXR0DRV_CFLAGS.$(KBUILD_TARGET_ARCH))) -fno-exceptions -fno-rtti
++TEMPLATE_VBOXR0DRV_CXXFLAGS = $(filter-out -Wstrict-prototypes -Wno-pointer-sign -ffreestanding -Wdeclaration-after-statement -Werror-implicit-function-declaration,$(TEMPLATE_VBOXR0DRV_CFLAGS) $(TEMPLATE_VBOXR0DRV_CFLAGS.$(KBUILD_TARGET_ARCH))) -fno-exceptions -fno-rtti -fpermissive
+ ifndef VBOX_LINUX_VERSION_2_4
+ # 2.6
+ TEMPLATE_VBOXR0DRV_SYSSUFF = .ko
diff --git a/libre/virtualbox-libre-modules/os_blag.png b/libre/virtualbox-libre-modules/os_blag.png
new file mode 100644
index 000000000..61995ca10
--- /dev/null
+++ b/libre/virtualbox-libre-modules/os_blag.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules/os_blag_64.png b/libre/virtualbox-libre-modules/os_blag_64.png
new file mode 100644
index 000000000..aa4463a97
--- /dev/null
+++ b/libre/virtualbox-libre-modules/os_blag_64.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules/os_dragora.png b/libre/virtualbox-libre-modules/os_dragora.png
new file mode 100644
index 000000000..d1df45880
--- /dev/null
+++ b/libre/virtualbox-libre-modules/os_dragora.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules/os_dragora_64.png b/libre/virtualbox-libre-modules/os_dragora_64.png
new file mode 100644
index 000000000..64bcecf20
--- /dev/null
+++ b/libre/virtualbox-libre-modules/os_dragora_64.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules/os_dynebolic.png b/libre/virtualbox-libre-modules/os_dynebolic.png
new file mode 100644
index 000000000..67b07d4c0
--- /dev/null
+++ b/libre/virtualbox-libre-modules/os_dynebolic.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules/os_gnewsense.png b/libre/virtualbox-libre-modules/os_gnewsense.png
new file mode 100644
index 000000000..76d9e38b3
--- /dev/null
+++ b/libre/virtualbox-libre-modules/os_gnewsense.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules/os_gnewsense_64.png b/libre/virtualbox-libre-modules/os_gnewsense_64.png
new file mode 100644
index 000000000..8859c34e8
--- /dev/null
+++ b/libre/virtualbox-libre-modules/os_gnewsense_64.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules/os_gnu.png b/libre/virtualbox-libre-modules/os_gnu.png
new file mode 100644
index 000000000..26c4550f9
--- /dev/null
+++ b/libre/virtualbox-libre-modules/os_gnu.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules/os_gnu_64.png b/libre/virtualbox-libre-modules/os_gnu_64.png
new file mode 100644
index 000000000..4161634e9
--- /dev/null
+++ b/libre/virtualbox-libre-modules/os_gnu_64.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules/os_gnuhurd.png b/libre/virtualbox-libre-modules/os_gnuhurd.png
new file mode 100644
index 000000000..26c4550f9
--- /dev/null
+++ b/libre/virtualbox-libre-modules/os_gnuhurd.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules/os_gnulinux.png b/libre/virtualbox-libre-modules/os_gnulinux.png
new file mode 100644
index 000000000..26c4550f9
--- /dev/null
+++ b/libre/virtualbox-libre-modules/os_gnulinux.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules/os_gnulinux_64.png b/libre/virtualbox-libre-modules/os_gnulinux_64.png
new file mode 100644
index 000000000..4161634e9
--- /dev/null
+++ b/libre/virtualbox-libre-modules/os_gnulinux_64.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules/os_musix.png b/libre/virtualbox-libre-modules/os_musix.png
new file mode 100644
index 000000000..fb7b94577
--- /dev/null
+++ b/libre/virtualbox-libre-modules/os_musix.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules/os_musix_64.png b/libre/virtualbox-libre-modules/os_musix_64.png
new file mode 100644
index 000000000..a1bbbbf3a
--- /dev/null
+++ b/libre/virtualbox-libre-modules/os_musix_64.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules/os_os64base.png b/libre/virtualbox-libre-modules/os_os64base.png
new file mode 100644
index 000000000..7aec20314
--- /dev/null
+++ b/libre/virtualbox-libre-modules/os_os64base.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules/os_os64base.xcf b/libre/virtualbox-libre-modules/os_os64base.xcf
new file mode 100644
index 000000000..d8e28e35e
--- /dev/null
+++ b/libre/virtualbox-libre-modules/os_os64base.xcf
Binary files differ
diff --git a/libre/virtualbox-libre-modules/os_osbase.png b/libre/virtualbox-libre-modules/os_osbase.png
new file mode 100644
index 000000000..00f197fca
--- /dev/null
+++ b/libre/virtualbox-libre-modules/os_osbase.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules/os_osbase.xcf b/libre/virtualbox-libre-modules/os_osbase.xcf
new file mode 100644
index 000000000..c4463c857
--- /dev/null
+++ b/libre/virtualbox-libre-modules/os_osbase.xcf
Binary files differ
diff --git a/libre/virtualbox-libre-modules/os_parabola.png b/libre/virtualbox-libre-modules/os_parabola.png
new file mode 100644
index 000000000..757abc484
--- /dev/null
+++ b/libre/virtualbox-libre-modules/os_parabola.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules/os_parabola_64.png b/libre/virtualbox-libre-modules/os_parabola_64.png
new file mode 100644
index 000000000..5ac7c2767
--- /dev/null
+++ b/libre/virtualbox-libre-modules/os_parabola_64.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules/os_trisquel.png b/libre/virtualbox-libre-modules/os_trisquel.png
new file mode 100644
index 000000000..c6f0d3d7a
--- /dev/null
+++ b/libre/virtualbox-libre-modules/os_trisquel.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules/os_trisquel_64.png b/libre/virtualbox-libre-modules/os_trisquel_64.png
new file mode 100644
index 000000000..ebca3dd43
--- /dev/null
+++ b/libre/virtualbox-libre-modules/os_trisquel_64.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules/os_ututo.png b/libre/virtualbox-libre-modules/os_ututo.png
new file mode 100644
index 000000000..e1dffb575
--- /dev/null
+++ b/libre/virtualbox-libre-modules/os_ututo.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules/os_ututo_64.png b/libre/virtualbox-libre-modules/os_ututo_64.png
new file mode 100644
index 000000000..158468e0a
--- /dev/null
+++ b/libre/virtualbox-libre-modules/os_ututo_64.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules/os_venenux.png b/libre/virtualbox-libre-modules/os_venenux.png
new file mode 100644
index 000000000..5e0c1585d
--- /dev/null
+++ b/libre/virtualbox-libre-modules/os_venenux.png
Binary files differ
diff --git a/libre/virtualbox-libre-modules/virtualbox-libre-modules.install b/libre/virtualbox-libre-modules/virtualbox-libre-modules.install
new file mode 100644
index 000000000..3f2a12a3f
--- /dev/null
+++ b/libre/virtualbox-libre-modules/virtualbox-libre-modules.install
@@ -0,0 +1,19 @@
+post_install() {
+/bin/cat << EOF
+===> You must load vboxdrv module before starting VirtualBox:
+===> # modprobe vboxdrv
+EOF
+ EXTRAMODULES='extramodules-3.5-LIBRE'
+ depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+}
+
+post_upgrade() {
+ EXTRAMODULES='extramodules-3.5-LIBRE'
+ depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+ echo 'In order to use the new version, reload all virtualbox modules manually.'
+}
+
+post_remove() {
+ EXTRAMODULES='extramodules-3.5-LIBRE'
+ depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+}
diff --git a/libre/virtualbox-libre-modules/virtualbox-libre-parabola-modules.install b/libre/virtualbox-libre-modules/virtualbox-libre-parabola-modules.install
new file mode 100644
index 000000000..c3419c991
--- /dev/null
+++ b/libre/virtualbox-libre-modules/virtualbox-libre-parabola-modules.install
@@ -0,0 +1,17 @@
+post_install() {
+cat << EOF
+===> You may want to load vboxguest, vboxsf and vboxvideo
+EOF
+ EXTRAMODULES='extramodules-3.5-LIBRE'
+ depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+}
+
+post_upgrade() {
+ EXTRAMODULES='extramodules-3.5-LIBRE'
+ depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+}
+
+post_remove() {
+ EXTRAMODULES='extramodules-3.5-LIBRE'
+ depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+}
diff --git a/libre/virtualbox-libre/.directory b/libre/virtualbox-libre/.directory
new file mode 100644
index 000000000..0de6ba6b0
--- /dev/null
+++ b/libre/virtualbox-libre/.directory
@@ -0,0 +1,3 @@
+[Dolphin]
+Timestamp=2012,7,26,5,49,47
+ViewMode=2
diff --git a/libre/virtualbox-libre/PKGBUILD b/libre/virtualbox-libre/PKGBUILD
index 8fa64046b..0e06fe7ba 100644
--- a/libre/virtualbox-libre/PKGBUILD
+++ b/libre/virtualbox-libre/PKGBUILD
@@ -1,18 +1,17 @@
# $Id$
# Maintainer (Parabola): Nicolas Reynolds <fauno@kiwwwi.com.ar>
# Maintainer (Parabola): Jorge López <jorginho@lavabit.com>
-# Contributor (Parabola): André Silva <emulatorman@lavabit.com>
-# Changes:
-# * Adapt to linux-libre
-# * virtualbox-{archlinux,parabola}-*
-# * Removed unfree user manual
-# * Package with --pkg "virtualbox-parabola-additions virtualbox-parabola-modules"
-# Based on
-#Maintainer: Ionut Biru <ibiru@archlinux.org>
+# Maintainer (Parabola): André Silva <emulatorman@lavabit.com>
+# Maintainer (Parabola): Márcio Silva <coadde@lavabit.com>
+# Maintainer: Ionut Biru <ibiru@archlinux.org>
pkgbase=virtualbox-libre
-pkgname=('virtualbox-libre' 'virtualbox-parabola-additions' 'virtualbox-sdk' 'virtualbox-source')
+pkgname=('virtualbox-libre'
+ 'virtualbox-libre-parabola-additions'
+ 'virtualbox-libre-sdk'
+ 'virtualbox-libre-source'
+ 'virtualbox-libre-parabola-source')
pkgver=4.1.18
-pkgrel=2
+pkgrel=4.1
arch=('i686' 'x86_64' 'mips64el')
url='http://virtualbox.org'
license=('GPL' 'custom')
@@ -21,11 +20,16 @@ makedepends=('libstdc++5' 'bin86' 'dev86' 'iasl' 'libxslt' 'libxml2' 'libxcursor
#'xorg-server-devel' 'xf86driproto' 'libxcomposite')
[[ $CARCH == "x86_64" ]] && makedepends=("${makedepends[@]}" 'gcc-multilib' 'lib32-glibc')
source=(http://download.virtualbox.org/virtualbox/${pkgver}/VirtualBox-${pkgver}.tar.bz2
- 10-vboxdrv.rules vboxdrv-reference.patch LocalConfig.kmk vboxbuild
- change_default_driver_dir.patch vbox-service.conf vbox-service.rc
- vboxweb.conf vboxweb.rc)
-
-_extramodules=extramodules-3.4-LIBRE
+ 10-vboxdrv.rules vboxdrv-reference.patch LocalConfig.kmk ipv6_vnc.patch
+ change_default_driver_dir.patch vboxservice.conf vboxservice.rc vboxservice.service
+ vboxweb.conf vboxweb.rc vboxweb.service os_blag_64.png os_blag.png
+ os_dragora_64.png os_dragora.png os_dynebolic.png os_gnewsense_64.png os_gnewsense.png
+ os_gnu_64.png os_gnuhurd.png os_gnulinux_64.png os_gnulinux.png os_gnu.png
+ os_musix_64.png os_musix.png os_parabola_64.png os_parabola.png os_trisquel_64.png
+ os_trisquel.png os_ututo_64.png os_ututo.png os_venenux.png libre.patch
+ free-distros.patch)
+
+_extramodules=extramodules-3.5-LIBRE
_kernver="$(cat /usr/lib/modules/${_extramodules}/version)" || true
build() {
@@ -33,6 +37,29 @@ build() {
patch -Np1 -i "$srcdir/vboxdrv-reference.patch"
patch -Np1 -i "$srcdir/change_default_driver_dir.patch"
+ patch -Np1 -i "$srcdir/libre.patch"
+ patch -Np1 -i "$srcdir/free-distros.patch"
+ # FS#30401
+ patch -Np2 -i "$srcdir/ipv6_vnc.patch"
+
+ ## Removing Nonfree directories
+ rm -rv "./include/VBox/ExtPack"
+ rm -rv "./src/VBox/ExtPacks"
+ rm -rv "./src/VBox/Main/src-helper-apps"
+
+ ## Removing Oracle VM VirtualBox Extension Pack icons
+ rm -v "./src/VBox/Resources/darwin/virtualbox-vbox-extpack.icns"
+ rm -v "./src/VBox/Resources/other/virtualbox-vbox-extpack-"{16px,20px,24px,32px,40px,48px,64px,72px,80px,96px,128px,256px,512px}.png
+ rm -v "./src/VBox/Resources/win/OSE/virtualbox-vbox-extpack.ico"
+ rm -v "./src/VBox/Frontends/VirtualBox/images/extension_pack_"{16px,32px,disabled{_16px,_32px},install{_16px,_32px},install_disabled{_16px,_32px},uninstall{_16px,_32px},uninstall_disabled{_16px,_32px}}.png
+
+ ## Adding free distros icons
+ for i in {gnuhurd,dynebolic,venenux,{gnu{,linux},parabola,gnewsense,blag,dragora,ututo,musix,trisquel}{,_64}}; do
+ cp -v "$srcdir/os_${i}.png" "./src/VBox/Frontends/VirtualBox/images"
+ done
+
+ ## Removing non-free OS icons
+ rm -v "./src/VBox/Frontends/VirtualBox/images/os_"{{{arch,turbo}linux,debian,fedora,gentoo,linux{24,26},macosx,mandriva,{free,net,open}bsd,redhat,solaris,opensuse,oracle{,solaris},ubuntu,win{2k{3,8},7,8,vista,xp},xandros}{,_64},dos,jrockitve,l4,linux{,22,_other},netware,qnx,os2{_other,ecs,warp{3,4,45}},win{2k,31,95,98,_other,me,nt4}}.png
cp "$srcdir/LocalConfig.kmk" .
@@ -48,24 +75,24 @@ build() {
}
package_virtualbox-libre() {
- pkgdesc="Powerful x86 virtualization for enterprise as well as home use"
- depends=('virtualbox-modules' 'libxml2' 'libxcursor' 'libxinerama' 'sdl' 'libxmu' 'curl' 'libvncserver' 'libpng')
+ pkgdesc="Powerful x86 virtualization for enterprise as well as home use (without Oracle VM VirtualBox Extension Pack and non-free OS options support)"
+ depends=('virtualbox-libre-modules' 'libxml2' 'libxcursor' 'libxinerama' 'sdl' 'libxmu' 'curl' 'libvncserver' 'libpng')
optdepends=('qt: for VirtualBox GUI'
'vde2: Virtual Distributed Ethernet support'
- 'virtualbox-sdk: developer kit'
- 'virtualbox-source: host kernel source modules for non-stock kernels'
+ 'virtualbox-libre-sdk: developer kit'
+ 'virtualbox-libre-source: host kernel source modules for non-stock kernels'
'net-tools: for host-only or bridged networking')
backup=('etc/vbox/vbox.cfg')
replaces=('virtualbox' 'virtualbox-ose')
conflicts=('virtualbox' 'virtualbox-ose')
provides=("virtualbox=$pkgver")
- install=virtualbox.install
+ install=virtualbox-libre.install
source "$srcdir/VirtualBox-${pkgver}/env.sh"
cd "$srcdir/VirtualBox-${pkgver}/out/linux.$BUILD_PLATFORM_ARCH/release/bin"
- mkdir -p "$pkgdir"/usr/{bin,lib/virtualbox/components,lib/virtualbox/ExtensionPacks,share/virtualbox/nls}
+ install -dm755 "$pkgdir"/usr/{bin,lib/virtualbox/components,share/virtualbox/nls}
#Binaries and Wrapper with Launchers
@@ -86,7 +113,7 @@ package_virtualbox-libre() {
#setuid root binaries
install -m 4755 VBoxSDL VirtualBox VBoxHeadless VBoxNetDHCP VBoxNetAdpCtl -t "$pkgdir/usr/lib/virtualbox"
#other binaries
- install -m 0755 VBoxManage VBoxSVC VBoxExtPackHelperApp VBoxXPCOMIPCD VBoxTestOGL VBoxBalloonCtrl vboxwebsrv webtest -t "$pkgdir/usr/lib/virtualbox"
+ install -m 0755 VBoxManage VBoxSVC VBoxXPCOMIPCD VBoxTestOGL VBoxBalloonCtrl vboxwebsrv webtest -t "$pkgdir/usr/lib/virtualbox"
#language
install -m 0755 nls/*.qm -t "$pkgdir/usr/share/virtualbox/nls"
@@ -120,35 +147,38 @@ package_virtualbox-libre() {
# install rc.d script
install -D -m755 "$srcdir/vboxweb.rc" "$pkgdir/etc/rc.d/vboxweb"
+ # install systemd service
+ install -D -m644 "$srcdir/vboxweb.service" \
+ "$pkgdir/usr/lib/systemd/system/vboxweb.service"
# install sample config
install -D -m644 "$srcdir/vboxweb.conf" "$pkgdir/etc/conf.d/vboxweb"
}
-package_virtualbox-source() {
+package_virtualbox-libre-source() {
pkgdesc="VirtualBox kernel modules source"
- depends=(gcc make)
- provides=(virtualbox-modules)
+ depends=(dkms gcc make)
+ replaces=('virtualbox-source' 'virtualbox-libre-modules')
+ conflicts=('virtualbox-source')
+ provides=("virtualbox-source=$pkgver" "virtualbox-libre-modules=$pkgver")
optdepends=('linux-libre-headers'
'linux-libre-lts-headers')
- install=virtualbox-source.install
+ install=virtualbox-libre-source.install
+ install -dm755 "$pkgdir/var/lib/dkms/vboxhost/$pkgver"
source "$srcdir/VirtualBox-${pkgver}/env.sh"
- mkdir -p $pkgdir/usr/lib/virtualbox
-
cd "$srcdir/VirtualBox-${pkgver}/out/linux.$BUILD_PLATFORM_ARCH/release/bin"
-
- #sources for modules
- cp -r src ${pkgdir}/usr/lib/virtualbox
- #install compilation script
- install -D -m 755 "${srcdir}/vboxbuild" "${pkgdir}/usr/bin/vboxbuild"
+ cp -r src "$pkgdir/var/lib/dkms/vboxhost/$pkgver/source"
}
-package_virtualbox-sdk() {
+package_virtualbox-libre-sdk() {
pkgdesc="VirtualBox Software Developer Kit (SDK)"
depends=('python2')
+ replaces=('virtualbox-sdk')
+ conflicts=('virtualbox-sdk')
+ provides=("virtualbox-sdk=$pkgver")
- mkdir -p "$pkgdir/usr/lib/virtualbox"
+ install -dm755 "$pkgdir/usr/lib/virtualbox"
source "$srcdir/VirtualBox-${pkgver}/env.sh"
cd "$srcdir/VirtualBox-${pkgver}/out/linux.$BUILD_PLATFORM_ARCH/release/bin"
@@ -162,12 +192,14 @@ package_virtualbox-sdk() {
mv sdk "$pkgdir/usr/lib/virtualbox"
}
-package_virtualbox-parabola-additions(){
+package_virtualbox-libre-parabola-additions(){
pkgdesc="Additions only for Parabola guests (userspace tools)"
- depends=("virtualbox-parabola-modules=$pkgver" 'gcc-libs' 'libxmu' 'xorg-xrandr' 'libxfixes')
+ depends=('virtualbox-libre-parabola-modules' 'gcc-libs' 'libxmu' 'xorg-xrandr' 'libxfixes')
replaces=('virtualbox-guest-additions' 'virtualbox-archlinux-additions')
conflicts=('virtualbox-guest-additions' 'virtualbox-archlinux-additions')
provides=("virtualbox-archlinux-additions=${pkgver}")
+ backup=('etc/conf.d/vboxservice')
+ install=virtualbox-libre-parabola-additions.install
source "$srcdir/VirtualBox-${pkgver}/env.sh"
@@ -189,18 +221,64 @@ package_virtualbox-parabola-additions(){
install -m755 -D pam_vbox.so "$pkgdir/usr/lib/security/pam_vbox.so"
# install rc.d script
- install -D -m755 "$srcdir/vbox-service.rc" "$pkgdir/etc/rc.d/vbox-service"
+ install -D -m755 "$srcdir/vboxservice.rc" "$pkgdir/etc/rc.d/vboxservice"
# install sample config
- install -D -m644 "$srcdir/vbox-service.conf" "$pkgdir/etc/conf.d/vbox-service"
+ install -D -m644 "$srcdir/vboxservice.conf" "$pkgdir/etc/conf.d/vboxservice"
+
+ # install systemd service file
+ install -D -m644 "$srcdir/vboxservice.service" \
+ "$pkgdir/usr/lib/systemd/system/vboxservice.service"
+}
+
+package_virtualbox-libre-parabola-source() {
+ pkgdesc='VirtualBox Additions kernel modules source'
+ depends=(dkms gcc make)
+ replaces=('virtualbox-archlinux-source' 'virtualbox-libre-parabola-modules')
+ conflicts=('virtualbox-archlinux-source')
+ provides=("virtualbox-archlinux-source=${pkgver}" "virtualbox-archlinux-modules=${pkgver}" "virtualbox-libre-parabola-modules=${pkgver}")
+ optdepends=('linux-libre-headers'
+ 'linux-libre-lts-headers')
+ install=virtualbox-libre-parabola-source.install
+
+ install -dm755 "$pkgdir/var/lib/dkms/vboxguest/$pkgver"
+ source "$srcdir/VirtualBox-${pkgver}/env.sh"
+ cd "$srcdir/VirtualBox-${pkgver}/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions"
+ cp -r src "$pkgdir/var/lib/dkms/vboxguest/$pkgver/source"
}
+
md5sums=('38db0a87cba659b484af868b0c2bd3ac'
'5f85710e0b8606de967716ded7b2d351'
'755ab0dd9bcacf2c00d2275b1ca69547'
'a1ff1d1b4423556887e48a32978226a6'
- '248078ab922f27424ba9919d4aa90dcc'
+ '4ff559f2bea335d59c4012048983ca91'
'97e193f050574dd272a38e5ee5ebe62b'
'3c08ad30b89add47d3f45121200a5360'
- '208cf5f842eb2e3a5b6dcfc59080d26c'
+ '7d9823507206de9b8528a72af2f18d74'
+ '07c5f6d86c4b7839d719c8ee0c53653b'
'3ac185709bfe688bb753c46e170d0546'
- 'c159d683ba1947290fc2ad2c64194150')
+ 'c159d683ba1947290fc2ad2c64194150'
+ 'bc9efed88e0469cd7fc460d5a5cd7b4b'
+ '8538dba8686d7449cb481c9bae9d722a'
+ '545c925b46f2ac95e5f8ae407fad101a'
+ 'f6416f509c2e5460e4dc624e0a57f3c1'
+ 'bbfb59dd517c020a23701b480187a355'
+ 'efacfdb61918286ea9bc89866b8fd239'
+ '7c3eb09995e8bafeef414374e44ad4ce'
+ 'a49ed3ab6bd0fb084de0ab3dd97ae93e'
+ '6b432b3305ed446125eef052c38355a6'
+ 'a70022a468bd3e9daf01818d2d74ac3c'
+ '6b432b3305ed446125eef052c38355a6'
+ 'a70022a468bd3e9daf01818d2d74ac3c'
+ 'a70022a468bd3e9daf01818d2d74ac3c'
+ '380eb2ab6cad3da198094585853c129c'
+ 'a60bb9a98abcc3c34156f9051d00df9a'
+ '3a908ef6952bcf987e63ef2fe4e98d24'
+ '02e87c39c353634cecacf98f1707fa15'
+ '0cf41a41e7a415d404d5584e047fd450'
+ '449cde3b58390284b59c5d663de3edc9'
+ 'c7951fe6888d939f3a7d0dafe477e82b'
+ '4da8eeb2ece7e475fc7a0d1003da26c6'
+ '5e4187af59726d71c5be48d0cd816c34'
+ 'a9e4724b56ddf99bb2e9a8fab8ad43ba'
+ 'f7d275fc52e5f3cfafd85646c2914063')
diff --git a/libre/virtualbox-libre/free-distros.patch b/libre/virtualbox-libre/free-distros.patch
new file mode 100644
index 000000000..7920fb6ab
--- /dev/null
+++ b/libre/virtualbox-libre/free-distros.patch
@@ -0,0 +1,1383 @@
+--- VirtualBox-4.1.18.orig/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UINewVMWzd.cpp 2012-07-25 14:51:03.569003667 -0300
++++ VirtualBox-4.1.18/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UINewVMWzd.cpp 2012-07-25 14:51:03.652333615 -0300
+@@ -44,94 +44,38 @@
+ * first matching string found, will be used. */
+ static const osTypePattern gs_OSTypePattern[] =
+ {
+- { QRegExp("DOS", Qt::CaseInsensitive), "DOS" },
+
+- /* Windows */
+- { QRegExp("Wi.*98", Qt::CaseInsensitive), "Windows98" },
+- { QRegExp("Wi.*95", Qt::CaseInsensitive), "Windows95" },
+- { QRegExp("Wi.*Me", Qt::CaseInsensitive), "WindowsMe" },
+- { QRegExp("(Wi.*NT)|(NT4)", Qt::CaseInsensitive), "WindowsNT4" },
+- { QRegExp("((Wi.*XP)|(\\bXP\\b)).*64", Qt::CaseInsensitive), "WindowsXP_64" },
+- { QRegExp("(Wi.*XP)|(\\bXP\\b)", Qt::CaseInsensitive), "WindowsXP" },
+- { QRegExp("((Wi.*2003)|(W2K3)).*64", Qt::CaseInsensitive), "Windows2003_64" },
+- { QRegExp("(Wi.*2003)|(W2K3)", Qt::CaseInsensitive), "Windows2003" },
+- { QRegExp("((Wi.*V)|(Vista)).*64", Qt::CaseInsensitive), "WindowsVista_64" },
+- { QRegExp("(Wi.*V)|(Vista)", Qt::CaseInsensitive), "WindowsVista" },
+- { QRegExp("((Wi.*2008)|(W2K8)).*64", Qt::CaseInsensitive), "Windows2008_64" },
+- { QRegExp("(Wi.*2008)|(W2K8)", Qt::CaseInsensitive), "Windows2008" },
+- { QRegExp("(Wi.*2000)|(W2K)", Qt::CaseInsensitive), "Windows2000" },
+- { QRegExp("(Wi.*7.*64)|(W7.*64)", Qt::CaseInsensitive), "Windows7_64" },
+- { QRegExp("(Wi.*7)|(W7)", Qt::CaseInsensitive), "Windows7" },
+- { QRegExp("(Wi.*8.*64)|(W8.*64)", Qt::CaseInsensitive), "Windows8_64" },
+- { QRegExp("(Wi.*8)|(W8)", Qt::CaseInsensitive), "Windows8" },
+- { QRegExp("Wi.*3", Qt::CaseInsensitive), "Windows31" },
+- { QRegExp("Wi", Qt::CaseInsensitive), "WindowsXP" },
+-
+- /* Solaris */
+- { QRegExp("((Op.*So)|(os20[01][0-9])|(So.*1[01])|(India)|(Neva)).*64", Qt::CaseInsensitive), "OpenSolaris_64" },
+- { QRegExp("(Op.*So)|(os20[01][0-9])|(So.*1[01])|(India)|(Neva)", Qt::CaseInsensitive), "OpenSolaris" },
+- { QRegExp("So.*64", Qt::CaseInsensitive), "Solaris_64" },
+- { QRegExp("So", Qt::CaseInsensitive), "Solaris" },
+-
+- /* OS/2 */
+- { QRegExp("OS[/|!-]{,1}2.*W.*4.?5", Qt::CaseInsensitive), "OS2Warp45" },
+- { QRegExp("OS[/|!-]{,1}2.*W.*4", Qt::CaseInsensitive), "OS2Warp4" },
+- { QRegExp("OS[/|!-]{,1}2.*W", Qt::CaseInsensitive), "OS2Warp3" },
+- { QRegExp("(OS[/|!-]{,1}2.*e)|(eCS.*)", Qt::CaseInsensitive), "OS2eCS" },
+- { QRegExp("OS[/|!-]{,1}2", Qt::CaseInsensitive), "OS2" },
+-
+- /* Code names for Linux distributions */
+- { QRegExp("((edgy)|(feisty)|(gutsy)|(hardy)|(intrepid)|(jaunty)|(karmic)|(lucid)|(maverick)|(natty)|(oneiric)|(precise)).*64", Qt::CaseInsensitive), "Ubuntu_64" },
+- { QRegExp("(edgy)|(feisty)|(gutsy)|(hardy)|(intrepid)|(jaunty)|(karmic)|(lucid)|(maverick)|(natty)|(oneiric)|(precise)", Qt::CaseInsensitive), "Ubuntu" },
+- { QRegExp("((sarge)|(etch)|(lenny)|(squeeze)|(wheezy)|(sid)).*64", Qt::CaseInsensitive), "Debian_64" },
+- { QRegExp("(sarge)|(etch)|(lenny)|(squeeze)|(wheezy)|(sid)", Qt::CaseInsensitive), "Debian" },
+- { QRegExp("((moonshine)|(werewolf)|(sulphur)|(cambridge)|(leonidas)|(constantine)|(goddard)|(laughlin)|(lovelock)|(verne)).*64", Qt::CaseInsensitive), "Fedora_64" },
+- { QRegExp("(moonshine)|(werewolf)|(sulphur)|(cambridge)|(leonidas)|(constantine)|(goddard)|(laughlin)|(lovelock)|(verne)", Qt::CaseInsensitive), "Fedora" },
+-
+- /* Regular names of Linux distributions */
+- { QRegExp("Arc.*64", Qt::CaseInsensitive), "ArchLinux_64" },
+- { QRegExp("Arc", Qt::CaseInsensitive), "ArchLinux" },
+- { QRegExp("Deb.*64", Qt::CaseInsensitive), "Debian_64" },
+- { QRegExp("Deb", Qt::CaseInsensitive), "Debian" },
+- { QRegExp("((SU)|(Nov)|(SLE)).*64", Qt::CaseInsensitive), "OpenSUSE_64" },
+- { QRegExp("(SU)|(Nov)|(SLE)", Qt::CaseInsensitive), "OpenSUSE" },
+- { QRegExp("Fe.*64", Qt::CaseInsensitive), "Fedora_64" },
+- { QRegExp("Fe", Qt::CaseInsensitive), "Fedora" },
+- { QRegExp("((Gen)|(Sab)).*64", Qt::CaseInsensitive), "Gentoo_64" },
+- { QRegExp("(Gen)|(Sab)", Qt::CaseInsensitive), "Gentoo" },
+- { QRegExp("Man.*64", Qt::CaseInsensitive), "Mandriva_64" },
+- { QRegExp("Man", Qt::CaseInsensitive), "Mandriva" },
+- { QRegExp("((Red)|(rhel)|(cen)).*64", Qt::CaseInsensitive), "RedHat_64" },
+- { QRegExp("(Red)|(rhel)|(cen)", Qt::CaseInsensitive), "RedHat" },
+- { QRegExp("Tur.*64", Qt::CaseInsensitive), "Turbolinux_64" },
+- { QRegExp("Tur", Qt::CaseInsensitive), "Turbolinux" },
+- { QRegExp("Ub.*64", Qt::CaseInsensitive), "Ubuntu_64" },
+- { QRegExp("Ub", Qt::CaseInsensitive), "Ubuntu" },
+- { QRegExp("Xa.*64", Qt::CaseInsensitive), "Xandros_64" },
+- { QRegExp("Xa", Qt::CaseInsensitive), "Xandros" },
+- { QRegExp("((Or)|(oel)).*64", Qt::CaseInsensitive), "Oracle_64" },
+- { QRegExp("(Or)|(oel)", Qt::CaseInsensitive), "Oracle" },
+- { QRegExp("((Li)|(lnx)).*2.?2", Qt::CaseInsensitive), "Linux22" },
+- { QRegExp("((Li)|(lnx)).*2.?4.*64", Qt::CaseInsensitive), "Linux24_64" },
+- { QRegExp("((Li)|(lnx)).*2.?4", Qt::CaseInsensitive), "Linux24" },
+- { QRegExp("((((Li)|(lnx)).*2.?6)|(LFS)).*64", Qt::CaseInsensitive), "Linux26_64" },
+- { QRegExp("(((Li)|(lnx)).*2.?6)|(LFS)", Qt::CaseInsensitive), "Linux26" },
+- { QRegExp("((Li)|(lnx)).*64", Qt::CaseInsensitive), "Linux26_64" },
+- { QRegExp("(Li)|(lnx)", Qt::CaseInsensitive), "Linux26" },
++ /* Code names for GNU/Linux distributions */
++ { QRegExp("((Taranis)|(Dagda)|(Brigantia)).*64", Qt::CaseInsensitive), "Trisquel_64" },
++ { QRegExp("(Taranis)|(Dagda)|(Brigantia)", Qt::CaseInsensitive), "Trisquel" },
++ { QRegExp("((metad)|(parkes)|(three)).*64", Qt::CaseInsensitive), "gNewSense_64" },
++ { QRegExp("(deltah)|(metad)|(parkes)|(three)", Qt::CaseInsensitive), "gNewSense" },
++ { QRegExp("((90k)|(119k)|(140k)|(160k)|(90000)|(119000)|(140000)|(160000)|(Spartakus)).*64", Qt::CaseInsensitive), "Blag_64" },
++ { QRegExp("(90k)|(119k)|(140k)|(160k)|(90000)|(119000)|(140000)|(160000)|(Spartakus)", Qt::CaseInsensitive), "Blag" },
++
++ /* Regular names of GNU/Linux distributions and GNU-Hurd */
++ { QRegExp("Pa.*64", Qt::CaseInsensitive), "Parabola_64" },
++ { QRegExp("Pa", Qt::CaseInsensitive), "Parabola" },
++ { QRegExp("((gNe)|(new)|(Sen)).*64", Qt::CaseInsensitive), "gNewSense_64" },
++ { QRegExp("(gNe)|(new)|(Sen)", Qt::CaseInsensitive), "gNewSense" },
++ { QRegExp("Bla.*64", Qt::CaseInsensitive), "Blag_64" },
++ { QRegExp("Bla", Qt::CaseInsensitive), "Blag" },
++ { QRegExp("Dra.*64", Qt::CaseInsensitive), "Dragora_64" },
++ { QRegExp("Dra", Qt::CaseInsensitive), "Dragora" },
++ { QRegExp("((Utu)|(XS)).*64", Qt::CaseInsensitive), "Ututo_64" },
++ { QRegExp("(Utu)|(XS)", Qt::CaseInsensitive), "Ututo" },
++ { QRegExp("Mus.*64", Qt::CaseInsensitive), "Musix_64" },
++ { QRegExp("Mus", Qt::CaseInsensitive), "Musix" },
++ { QRegExp("Tri.*64", Qt::CaseInsensitive), "Trisquel_64" },
++ { QRegExp("Tri", Qt::CaseInsensitive), "Trisquel" },
++ { QRegExp("Dyn", Qt::CaseInsensitive), "Dynebolic" },
++ { QRegExp("Ven", Qt::CaseInsensitive), "Venenux" },
++ { QRegExp("GNU", Qt::CaseInsensitive), "GNU" },
++ { QRegExp("Hu", Qt::CaseInsensitive), "GNUHurd" },
++ { QRegExp("((Li)|(lnx)).*64", Qt::CaseInsensitive), "GNULinux_64" },
++ { QRegExp("(Li)|(lnx)", Qt::CaseInsensitive), "GNULinux" },
+
+ /* Other */
+- { QRegExp("L4", Qt::CaseInsensitive), "L4" },
+- { QRegExp("((Fr.*B)|(fbsd)).*64", Qt::CaseInsensitive), "FreeBSD_64" },
+- { QRegExp("(Fr.*B)|(fbsd)", Qt::CaseInsensitive), "FreeBSD" },
+- { QRegExp("Op.*B.*64", Qt::CaseInsensitive), "OpenBSD_64" },
+- { QRegExp("Op.*B", Qt::CaseInsensitive), "OpenBSD" },
+- { QRegExp("Ne.*B.*64", Qt::CaseInsensitive), "NetBSD_64" },
+- { QRegExp("Ne.*B", Qt::CaseInsensitive), "NetBSD" },
+- { QRegExp("QN", Qt::CaseInsensitive), "QNX" },
+- { QRegExp("((Mac)|(Tig)|(Leop)|(osx)).*64", Qt::CaseInsensitive), "MacOS_64" },
+- { QRegExp("(Mac)|(Tig)|(Leop)|(osx)", Qt::CaseInsensitive), "MacOS" },
+- { QRegExp("Net", Qt::CaseInsensitive), "Netware" },
+- { QRegExp("Rocki", Qt::CaseInsensitive), "JRockitVE" },
+ { QRegExp("Ot", Qt::CaseInsensitive), "Other" },
+ };
+
+--- VirtualBox-4.1.18.orig/src/VBox/Main/xml/Settings.cpp 2012-07-25 15:14:50.498764160 -0300
++++ VirtualBox-4.1.18/src/VBox/Main/xml/Settings.cpp 2012-07-25 15:14:50.548761649 -0300
+@@ -3227,40 +3227,18 @@
+ } aConvertOSTypes[] =
+ {
+ { "unknown", "Other" },
+- { "dos", "DOS" },
+- { "win31", "Windows31" },
+- { "win95", "Windows95" },
+- { "win98", "Windows98" },
+- { "winme", "WindowsMe" },
+- { "winnt4", "WindowsNT4" },
+- { "win2k", "Windows2000" },
+- { "winxp", "WindowsXP" },
+- { "win2k3", "Windows2003" },
+- { "winvista", "WindowsVista" },
+- { "win2k8", "Windows2008" },
+- { "os2warp3", "OS2Warp3" },
+- { "os2warp4", "OS2Warp4" },
+- { "os2warp45", "OS2Warp45" },
+- { "ecs", "OS2eCS" },
+- { "linux22", "Linux22" },
+- { "linux24", "Linux24" },
+- { "linux26", "Linux26" },
+- { "archlinux", "ArchLinux" },
+- { "debian", "Debian" },
+- { "opensuse", "OpenSUSE" },
+- { "fedoracore", "Fedora" },
+- { "gentoo", "Gentoo" },
+- { "mandriva", "Mandriva" },
+- { "redhat", "RedHat" },
+- { "ubuntu", "Ubuntu" },
+- { "xandros", "Xandros" },
+- { "freebsd", "FreeBSD" },
+- { "openbsd", "OpenBSD" },
+- { "netbsd", "NetBSD" },
+- { "netware", "Netware" },
+- { "solaris", "Solaris" },
+- { "opensolaris", "OpenSolaris" },
+- { "l4", "L4" }
++ { "gnu", "GNU" },
++ { "gnuhurd", "GNUHurd" },
++ { "gnulinux", "GNULinux" },
++ { "parabola", "Parabola" },
++ { "gnewsense", "gNewSense" },
++ { "blag", "Blag" },
++ { "dragora", "Dragora" },
++ { "ututo", "Ututo" },
++ { "musix", "Musix" },
++ { "trisquel", "Trisquel" },
++ { "dynebolic", "Dynebolic" },
++ { "venenux", "Venenux" },
+ };
+
+ void MachineConfigFile::convertOldOSType_pre1_5(Utf8Str &str)
+--- VirtualBox-4.1.18.orig/src/VBox/Main/xml/SettingsConverter.xsl 2012-07-25 15:21:04.553581275 -0300
++++ VirtualBox-4.1.18/src/VBox/Main/xml/SettingsConverter.xsl 2012-07-25 15:21:04.593579427 -0300
+@@ -729,40 +729,18 @@
+ <xsl:attribute name="OSType">
+ <xsl:choose>
+ <xsl:when test="@OSType='unknown'">Other</xsl:when>
+- <xsl:when test="@OSType='dos'">DOS</xsl:when>
+- <xsl:when test="@OSType='win31'">Windows31</xsl:when>
+- <xsl:when test="@OSType='win95'">Windows95</xsl:when>
+- <xsl:when test="@OSType='win98'">Windows98</xsl:when>
+- <xsl:when test="@OSType='winme'">WindowsMe</xsl:when>
+- <xsl:when test="@OSType='winnt4'">WindowsNT4</xsl:when>
+- <xsl:when test="@OSType='win2k'">Windows2000</xsl:when>
+- <xsl:when test="@OSType='winxp'">WindowsXP</xsl:when>
+- <xsl:when test="@OSType='win2k3'">Windows2003</xsl:when>
+- <xsl:when test="@OSType='winvista'">WindowsVista</xsl:when>
+- <xsl:when test="@OSType='win2k8'">Windows2008</xsl:when>
+- <xsl:when test="@OSType='os2warp3'">OS2Warp3</xsl:when>
+- <xsl:when test="@OSType='os2warp4'">OS2Warp4</xsl:when>
+- <xsl:when test="@OSType='os2warp45'">OS2Warp45</xsl:when>
+- <xsl:when test="@OSType='ecs'">OS2eCS</xsl:when>
+- <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='archlinux'">ArchLinux</xsl:when>
+- <xsl:when test="@OSType='debian'">Debian</xsl:when>
+- <xsl:when test="@OSType='opensuse'">OpenSUSE</xsl:when>
+- <xsl:when test="@OSType='fedoracore'">Fedora</xsl:when>
+- <xsl:when test="@OSType='gentoo'">Gentoo</xsl:when>
+- <xsl:when test="@OSType='mandriva'">Mandriva</xsl:when>
+- <xsl:when test="@OSType='redhat'">RedHat</xsl:when>
+- <xsl:when test="@OSType='ubuntu'">Ubuntu</xsl:when>
+- <xsl:when test="@OSType='xandros'">Xandros</xsl:when>
+- <xsl:when test="@OSType='freebsd'">FreeBSD</xsl:when>
+- <xsl:when test="@OSType='openbsd'">OpenBSD</xsl:when>
+- <xsl:when test="@OSType='netbsd'">NetBSD</xsl:when>
+- <xsl:when test="@OSType='netware'">Netware</xsl:when>
+- <xsl:when test="@OSType='solaris'">Solaris</xsl:when>
+- <xsl:when test="@OSType='opensolaris'">OpenSolaris</xsl:when>
+- <xsl:when test="@OSType='l4'">L4</xsl:when>
++ <xsl:when test="@OSType='gnu'">GNU</xsl:when>
++ <xsl:when test="@OSType='gnuhurd'">GNUHurd</xsl:when>
++ <xsl:when test="@OSType='gnulinux'">GNULinux</xsl:when>
++ <xsl:when test="@OSType='parabola'">Parabola</xsl:when>
++ <xsl:when test="@OSType='gnewsense'">gNewSense</xsl:when>
++ <xsl:when test="@OSType='blag'">Blag</xsl:when>
++ <xsl:when test="@OSType='dragora'">Dragora</xsl:when>
++ <xsl:when test="@OSType='ututo'">Ututo</xsl:when>
++ <xsl:when test="@OSType='musix'">Musix</xsl:when>
++ <xsl:when test="@OSType='trisquel'">Trisquel</xsl:when>
++ <xsl:when test="@OSType='dynebolic'">Dynebolic</xsl:when>
++ <xsl:when test="@OSType='venenux'">Venenux</xsl:when>
+ </xsl:choose>
+ </xsl:attribute>
+ <xsl:apply-templates select="@*[name()!='OSType']" mode="v1.5"/>
+--- VirtualBox-4.1.18.orig/src/VBox/Main/xml/VirtualBox-settings-common.xsd 2012-07-25 15:04:37.856003691 -0300
++++ VirtualBox-4.1.18/src/VBox/Main/xml/VirtualBox-settings-common.xsd 2012-07-25 15:04:37.892668156 -0300
+@@ -137,75 +137,27 @@
+ <xsd:simpleType name="TGuestOSType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="Other"/>
+- <xsd:enumeration value="DOS"/>
+- <xsd:enumeration value="Netware"/>
+- <xsd:enumeration value="L4"/>
+- <xsd:enumeration value="Windows31"/>
+- <xsd:enumeration value="Windows95"/>
+- <xsd:enumeration value="Windows98"/>
+- <xsd:enumeration value="WindowsMe"/>
+- <xsd:enumeration value="WindowsNT4"/>
+- <xsd:enumeration value="Windows2000"/>
+- <xsd:enumeration value="WindowsXP"/>
+- <xsd:enumeration value="WindowsXP_64"/>
+- <xsd:enumeration value="Windows2003"/>
+- <xsd:enumeration value="Windows2003_64"/>
+- <xsd:enumeration value="WindowsVista"/>
+- <xsd:enumeration value="WindowsVista_64"/>
+- <xsd:enumeration value="Windows2008"/>
+- <xsd:enumeration value="Windows2008_64"/>
+- <xsd:enumeration value="Windows7"/>
+- <xsd:enumeration value="Windows7_64"/>
+- <xsd:enumeration value="Windows8"/>
+- <xsd:enumeration value="Windows8_64"/>
+- <xsd:enumeration value="WindowsNT"/>
+- <xsd:enumeration value="OS2Warp3"/>
+- <xsd:enumeration value="OS2Warp4"/>
+- <xsd:enumeration value="OS2Warp45"/>
+- <xsd:enumeration value="OS2eCS"/>
+- <xsd:enumeration value="OS2"/>
+- <xsd:enumeration value="Linux22"/>
+- <xsd:enumeration value="Linux24"/>
+- <xsd:enumeration value="Linux24_64"/>
+- <xsd:enumeration value="Linux26"/>
+- <xsd:enumeration value="Linux26_64"/>
+- <xsd:enumeration value="ArchLinux"/>
+- <xsd:enumeration value="ArchLinux_64"/>
+- <xsd:enumeration value="Debian"/>
+- <xsd:enumeration value="Debian_64"/>
+- <xsd:enumeration value="OpenSUSE"/>
+- <xsd:enumeration value="OpenSUSE_64"/>
+- <xsd:enumeration value="Fedora"/>
+- <xsd:enumeration value="Fedora_64"/>
+- <xsd:enumeration value="Gentoo"/>
+- <xsd:enumeration value="Gentoo_64"/>
+- <xsd:enumeration value="Mandriva"/>
+- <xsd:enumeration value="Mandriva_64"/>
+- <xsd:enumeration value="RedHat"/>
+- <xsd:enumeration value="RedHat_64"/>
+- <xsd:enumeration value="Turbolinux"/>
+- <xsd:enumeration value="Turbolinux_64"/>
+- <xsd:enumeration value="Ubuntu"/>
+- <xsd:enumeration value="Ubuntu_64"/>
+- <xsd:enumeration value="Xandros"/>
+- <xsd:enumeration value="Xandros_64"/>
+- <xsd:enumeration value="Oracle"/>
+- <xsd:enumeration value="Oracle_64"/>
+- <xsd:enumeration value="Linux"/>
+- <xsd:enumeration value="FreeBSD"/>
+- <xsd:enumeration value="FreeBSD_64"/>
+- <xsd:enumeration value="OpenBSD"/>
+- <xsd:enumeration value="OpenBSD_64"/>
+- <xsd:enumeration value="NetBSD"/>
+- <xsd:enumeration value="NetBSD_64"/>
+- <xsd:enumeration value="Solaris"/>
+- <xsd:enumeration value="Solaris_64"/>
+- <xsd:enumeration value="OpenSolaris"/>
+- <xsd:enumeration value="OpenSolaris_64"/>
+- <xsd:enumeration value="QNX"/>
+- <xsd:enumeration value="MacOS"/>
+- <xsd:enumeration value="MacOS_64"/>
+- <xsd:enumeration value="JRockitVE"/>
++ <xsd:enumeration value="GNU"/>
++ <xsd:enumeration value="GNU_64"/>
++ <xsd:enumeration value="GNUHurd"/>
++ <xsd:enumeration value="GNULinux"/>
++ <xsd:enumeration value="GNULinux_64"/>
++ <xsd:enumeration value="Parabola"/>
++ <xsd:enumeration value="Parabola_64"/>
++ <xsd:enumeration value="gNewSense"/>
++ <xsd:enumeration value="gNewSense_64"/>
++ <xsd:enumeration value="Blag"/>
++ <xsd:enumeration value="Blag_64"/>
++ <xsd:enumeration value="Dragora"/>
++ <xsd:enumeration value="Dragora_64"/>
++ <xsd:enumeration value="Ututo"/>
++ <xsd:enumeration value="Ututo_64"/>
++ <xsd:enumeration value="Musix"/>
++ <xsd:enumeration value="Musix_64"/>
++ <xsd:enumeration value="Trisquel"/>
++ <xsd:enumeration value="Trisquel_64"/>
++ <xsd:enumeration value="Dynebolic"/>
++ <xsd:enumeration value="Venenux"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+--- VirtualBox-4.1.18.orig/src/VBox/Frontends/VirtualBox/VirtualBox2.qrc 2012-07-25 15:40:56.733096866 -0300
++++ VirtualBox-4.1.18/src/VBox/Frontends/VirtualBox/VirtualBox2.qrc 2012-07-25 15:40:56.796426519 -0300
+@@ -1,75 +1,27 @@
+ <!DOCTYPE RCC><RCC version="1.0">
+ <qresource prefix="/">
+- <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>
+- <file alias="os_debian_64.png">images/os_debian_64.png</file>
+- <file alias="os_dos.png">images/os_dos.png</file>
+- <file alias="os_fedora.png">images/os_fedora.png</file>
+- <file alias="os_fedora_64.png">images/os_fedora_64.png</file>
+- <file alias="os_freebsd.png">images/os_freebsd.png</file>
+- <file alias="os_freebsd_64.png">images/os_freebsd_64.png</file>
+- <file alias="os_gentoo.png">images/os_gentoo.png</file>
+- <file alias="os_gentoo_64.png">images/os_gentoo_64.png</file>
+- <file alias="os_jrockitve.png">images/os_jrockitve.png</file>
+- <file alias="os_l4.png">images/os_l4.png</file>
+- <file alias="os_linux_other.png">images/os_linux_other.png</file>
+- <file alias="os_linux22.png">images/os_linux22.png</file>
+- <file alias="os_linux24.png">images/os_linux24.png</file>
+- <file alias="os_linux24_64.png">images/os_linux24_64.png</file>
+- <file alias="os_linux26.png">images/os_linux26.png</file>
+- <file alias="os_linux26_64.png">images/os_linux26_64.png</file>
+- <file alias="os_mandriva.png">images/os_mandriva.png</file>
+- <file alias="os_mandriva_64.png">images/os_mandriva_64.png</file>
+- <file alias="os_netbsd.png">images/os_netbsd.png</file>
+- <file alias="os_netbsd_64.png">images/os_netbsd_64.png</file>
+- <file alias="os_netware.png">images/os_netware.png</file>
+- <file alias="os_openbsd.png">images/os_openbsd.png</file>
+- <file alias="os_openbsd_64.png">images/os_openbsd_64.png</file>
+- <file alias="os_oraclesolaris.png">images/os_oraclesolaris.png</file>
+- <file alias="os_oraclesolaris_64.png">images/os_oraclesolaris_64.png</file>
+- <file alias="os_opensuse.png">images/os_opensuse.png</file>
+- <file alias="os_opensuse_64.png">images/os_opensuse_64.png</file>
+- <file alias="os_os2_other.png">images/os_os2_other.png</file>
+- <file alias="os_os2ecs.png">images/os_os2ecs.png</file>
+- <file alias="os_os2warp3.png">images/os_os2warp3.png</file>
+- <file alias="os_os2warp4.png">images/os_os2warp4.png</file>
+- <file alias="os_os2warp45.png">images/os_os2warp45.png</file>
++ <file alias="os_parabola.png">images/os_parabola.png</file>
++ <file alias="os_parabola_64.png">images/os_parabola_64.png</file>
++ <file alias="os_gnewsense.png">images/os_gnewsense.png</file>
++ <file alias="os_gnewsense_64.png">images/os_gnewsense_64.png</file>
++ <file alias="os_blag.png">images/os_blag.png</file>
++ <file alias="os_blag_64.png">images/os_blag_64.png</file>
++ <file alias="os_ututo.png">images/os_ututo.png</file>
++ <file alias="os_ututo_64.png">images/os_ututo_64.png</file>
++ <file alias="os_gnu.png">images/os_gnu.png</file>
++ <file alias="os_gnu_64.png">images/os_gnu_64.png</file>
++ <file alias="os_gnuhurd.png">images/os_gnuhurd.png</file>
++ <file alias="os_gnulinux.png">images/os_gnulinux.png</file>
++ <file alias="os_gnulinux_64.png">images/os_gnulinux_64.png</file>
++ <file alias="os_musix.png">images/os_musix.png</file>
++ <file alias="os_musix_64.png">images/os_musix_64.png</file>
++ <file alias="os_dragora.png">images/os_dragora.png</file>
++ <file alias="os_dragora_64.png">images/os_dragora_64.png</file>
+ <file alias="os_other.png">images/os_other.png</file>
+- <file alias="os_qnx.png">images/os_qnx.png</file>
+- <file alias="os_redhat.png">images/os_redhat.png</file>
+- <file alias="os_redhat_64.png">images/os_redhat_64.png</file>
+- <file alias="os_turbolinux.png">images/os_turbolinux.png</file>
+- <file alias="os_turbolinux_64.png">images/os_turbolinux_64.png</file>
+- <file alias="os_solaris.png">images/os_solaris.png</file>
+- <file alias="os_solaris_64.png">images/os_solaris_64.png</file>
+- <file alias="os_ubuntu.png">images/os_ubuntu.png</file>
+- <file alias="os_ubuntu_64.png">images/os_ubuntu_64.png</file>
+- <file alias="os_win_other.png">images/os_win_other.png</file>
+- <file alias="os_win2k.png">images/os_win2k.png</file>
+- <file alias="os_win2k3.png">images/os_win2k3.png</file>
+- <file alias="os_win2k3_64.png">images/os_win2k3_64.png</file>
+- <file alias="os_win2k8.png">images/os_win2k8.png</file>
+- <file alias="os_win2k8_64.png">images/os_win2k8_64.png</file>
+- <file alias="os_win31.png">images/os_win31.png</file>
+- <file alias="os_win7.png">images/os_win7.png</file>
+- <file alias="os_win7_64.png">images/os_win7_64.png</file>
+- <file alias="os_win8.png">images/os_win8.png</file>
+- <file alias="os_win8_64.png">images/os_win8_64.png</file>
+- <file alias="os_win95.png">images/os_win95.png</file>
+- <file alias="os_win98.png">images/os_win98.png</file>
+- <file alias="os_winme.png">images/os_winme.png</file>
+- <file alias="os_winnt4.png">images/os_winnt4.png</file>
+- <file alias="os_winvista.png">images/os_winvista.png</file>
+- <file alias="os_winvista_64.png">images/os_winvista_64.png</file>
+- <file alias="os_winxp.png">images/os_winxp.png</file>
+- <file alias="os_winxp_64.png">images/os_winxp_64.png</file>
+- <file alias="os_xandros.png">images/os_xandros.png</file>
+- <file alias="os_xandros_64.png">images/os_xandros_64.png</file>
+- <file alias="os_oracle.png">images/os_oracle.png</file>
+- <file alias="os_oracle_64.png">images/os_oracle_64.png</file>
+- <file alias="os_macosx.png">images/os_macosx.png</file>
+- <file alias="os_macosx_64.png">images/os_macosx_64.png</file>
++ <file alias="os_dynebolic.png">images/os_dynebolic.png</file>
++ <file alias="os_venenux.png">images/os_venenux.png</file>
++ <file alias="os_trisquel.png">images/os_trisquel.png</file>
++ <file alias="os_trisquel_64.png">images/os_trisquel_64.png</file>
+ <file alias="hd_16px.png">images/hd_16px.png</file>
+ <file alias="hd_disabled_16px.png">images/hd_disabled_16px.png</file>
+ <file alias="hd_32px.png">images/hd_32px.png</file>
+--- VirtualBox-4.1.18.orig/src/VBox/Main/src-all/Global.cpp 2012-06-20 10:17:34.000000000 -0300
++++ VirtualBox-4.1.18/src/VBox/Main/src-all/Global.cpp 2012-07-25 19:32:44.482993976 -0300
+@@ -35,284 +35,90 @@
+ VBOXOSTYPE_Unknown, VBOXOSHINT_NONE,
+ 64, 4, 2 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows31, "Windows 3.1",
+- VBOXOSTYPE_Win31, VBOXOSHINT_NONE,
+- 32, 4, 1 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_SB16 },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows95, "Windows 95",
+- VBOXOSTYPE_Win95, VBOXOSHINT_NONE,
+- 64, 4, 2 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows98, "Windows 98",
+- VBOXOSTYPE_Win98, VBOXOSHINT_NONE,
+- 64, 4, 2 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_WindowsMe, "Windows Me",
+- VBOXOSTYPE_WinMe, VBOXOSHINT_NONE,
+- 64, 4, 4 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_WindowsNT4, "Windows NT 4",
+- VBOXOSTYPE_WinNT4, VBOXOSHINT_NONE,
+- 128, 16, 2 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows2000, "Windows 2000",
+- VBOXOSTYPE_Win2k, VBOXOSHINT_USBTABLET,
+- 168, 16, 4 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_WindowsXP, "Windows XP",
+- VBOXOSTYPE_WinXP, VBOXOSHINT_USBTABLET,
+- 192, 16, 10 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_WindowsXP_64, "Windows XP (64 bit)",
+- VBOXOSTYPE_WinXP_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_USBTABLET,
+- 192, 16, 10 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows2003, "Windows 2003",
+- VBOXOSTYPE_Win2k3, VBOXOSHINT_USBTABLET,
+- 256, 16, 20 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows2003_64, "Windows 2003 (64 bit)",
+- VBOXOSTYPE_Win2k3_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_USBTABLET,
+- 256, 16, 20 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_HDA },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_WindowsVista, "Windows Vista",
+- VBOXOSTYPE_WinVista, VBOXOSHINT_USBTABLET,
+- 512, 16, 25 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_HDA },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_WindowsVista_64, "Windows Vista (64 bit)",
+- VBOXOSTYPE_WinVista_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_USBTABLET,
+- 512, 16, 25 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_HDA },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows2008, "Windows 2008",
+- VBOXOSTYPE_Win2k8, VBOXOSHINT_USBTABLET,
+- 512, 16, 25 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_HDA },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows2008_64, "Windows 2008 (64 bit)",
+- VBOXOSTYPE_Win2k8_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_USBTABLET,
+- 512, 16, 25 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_HDA },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows7, "Windows 7",
+- VBOXOSTYPE_Win7, VBOXOSHINT_USBTABLET,
+- 512, 16, 25 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_HDA },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows7_64, "Windows 7 (64 bit)",
+- VBOXOSTYPE_Win7_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_USBTABLET,
+- 512, 16, 25 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_HDA },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows8, "Windows 8",
+- VBOXOSTYPE_Win8, VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_USBTABLET | VBOXOSHINT_PAE,
+- 1024,128, 25 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_HDA },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_Windows8_64, "Windows 8 (64 bit)",
+- VBOXOSTYPE_Win8_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_USBTABLET,
+- 1536,128, 25 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_HDA },
+- { "Windows", "Microsoft Windows", SchemaDefs_OSTypeId_WindowsNT, "Other Windows",
+- VBOXOSTYPE_WinNT, VBOXOSHINT_NONE,
+- 512, 16, 20 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Linux22, "Linux 2.2",
+- VBOXOSTYPE_Linux22, VBOXOSHINT_RTCUTC,
+- 64, 4, 2 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Linux24, "Linux 2.4",
+- VBOXOSTYPE_Linux24, VBOXOSHINT_RTCUTC,
+- 128, 4, 4 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Linux24_64, "Linux 2.4 (64 bit)",
+- VBOXOSTYPE_Linux24_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC,
+- 128, 4, 4 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
++ { "GNU", "GNU", SchemaDefs_OSTypeId_GNU, "GNU",
++ VBOXOSTYPE_GNU, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ 256, 4, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
++ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
++ { "GNU", "GNU", SchemaDefs_OSTypeId_GNU_64, "GNU (64 bit)",
++ VBOXOSTYPE_GNU_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 },
++ { "GNU-Hurd", "GNU-Hurd", SchemaDefs_OSTypeId_GNUHurd, "GNU-Hurd",
++ VBOXOSTYPE_GNUHurd, 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", SchemaDefs_OSTypeId_Linux26, "Linux 2.6",
+- VBOXOSTYPE_Linux26, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_GNULinux, "GNU/Linux",
++ VBOXOSTYPE_GNULinux, 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", SchemaDefs_OSTypeId_Linux26_64, "Linux 2.6 (64 bit)",
+- VBOXOSTYPE_Linux26_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_GNULinux_64, "GNU/Linux (64 bit)",
++ VBOXOSTYPE_GNULinux_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", SchemaDefs_OSTypeId_ArchLinux, "Arch Linux",
+- VBOXOSTYPE_ArchLinux, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Parabola, "Parabola GNU/Linux-libre",
++ VBOXOSTYPE_Parabola, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
+ 256, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_ArchLinux_64, "Arch Linux (64 bit)",
+- VBOXOSTYPE_ArchLinux_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Parabola_64, "Parabola GNU/Linux-libre (64 bit)",
++ VBOXOSTYPE_Parabola_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
+ 256, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Debian, "Debian",
+- VBOXOSTYPE_Debian, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_gNewSense, "gNewSense",
++ VBOXOSTYPE_gNewSense, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
+ 384, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Debian_64, "Debian (64 bit)",
+- VBOXOSTYPE_Debian_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_gNewSense_64, "gNewSense (64 bit)",
++ VBOXOSTYPE_gNewSense_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
+ 384, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97},
+- { "Linux", "Linux", SchemaDefs_OSTypeId_OpenSUSE, "openSUSE",
+- VBOXOSTYPE_OpenSUSE, 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", SchemaDefs_OSTypeId_OpenSUSE_64, "openSUSE (64 bit)",
+- VBOXOSTYPE_OpenSUSE_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", SchemaDefs_OSTypeId_Fedora, "Fedora",
+- VBOXOSTYPE_FedoraCore, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Blag, "Blag Linux and GNU",
++ VBOXOSTYPE_Blag, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
+ 768, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Fedora_64, "Fedora (64 bit)",
+- VBOXOSTYPE_FedoraCore_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Blag_64, "Blag Linux and GNU (64 bit)",
++ VBOXOSTYPE_Blag_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
+ 768, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Gentoo, "Gentoo",
+- VBOXOSTYPE_Gentoo, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Dragora, "Dragora",
++ VBOXOSTYPE_Dragora, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
+ 256, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Gentoo_64, "Gentoo (64 bit)",
+- VBOXOSTYPE_Gentoo_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Dragora_64, "Dragora (64 bit)",
++ VBOXOSTYPE_Dragora_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
+ 256, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Mandriva, "Mandriva",
+- VBOXOSTYPE_Mandriva, 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", SchemaDefs_OSTypeId_Mandriva_64, "Mandriva (64 bit)",
+- VBOXOSTYPE_Mandriva_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", SchemaDefs_OSTypeId_RedHat, "Red Hat",
+- VBOXOSTYPE_RedHat, VBOXOSHINT_RTCUTC | VBOXOSHINT_PAE,
+- 512, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Ututo, "Ututo XS",
++ VBOXOSTYPE_Ututo, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ 256, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_RedHat_64, "Red Hat (64 bit)",
+- VBOXOSTYPE_RedHat_x64, VBOXOSHINT_64BIT | VBOXOSHINT_PAE | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC,
+- 512, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Ututo_64, "Ututo XS (64 bit)",
++ VBOXOSTYPE_Ututo_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ 256, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Turbolinux, "Turbolinux",
+- VBOXOSTYPE_Turbolinux, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Musix, "Musix",
++ VBOXOSTYPE_Musix, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
+ 384, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Turbolinux, "Turbolinux (64 bit)",
+- VBOXOSTYPE_Turbolinux_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Musix_64, "Musix (64 bit)",
++ VBOXOSTYPE_Musix_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
+ 384, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Ubuntu, "Ubuntu",
+- VBOXOSTYPE_Ubuntu, VBOXOSHINT_RTCUTC | VBOXOSHINT_PAE | VBOXOSHINT_USBTABLET,
++ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97},
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Trisquel, "Trisquel",
++ VBOXOSTYPE_Trisquel, VBOXOSHINT_RTCUTC | VBOXOSHINT_PAE | VBOXOSHINT_USBTABLET,
+ 512, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Ubuntu_64, "Ubuntu (64 bit)",
+- VBOXOSTYPE_Ubuntu_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Trisquel_64, "Trisquel (64 bit)",
++ VBOXOSTYPE_Trisquel_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", SchemaDefs_OSTypeId_Xandros, "Xandros",
+- VBOXOSTYPE_Xandros, VBOXOSHINT_RTCUTC,
+- 256, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Xandros_64, "Xandros (64 bit)",
+- VBOXOSTYPE_Xandros_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC,
+- 256, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Oracle, "Oracle",
+- VBOXOSTYPE_Oracle, VBOXOSHINT_RTCUTC | VBOXOSHINT_PAE,
+- 512, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Dynebolic, "Dyne:bolic",
++ VBOXOSTYPE_Dynebolic, 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", SchemaDefs_OSTypeId_Oracle_64, "Oracle (64 bit)",
+- VBOXOSTYPE_Oracle_x64, VBOXOSHINT_64BIT | VBOXOSHINT_PAE | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC,
+- 512, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
++ { "GNU/Linux", "GNU/Linux", SchemaDefs_OSTypeId_Venenux, "Venenux",
++ VBOXOSTYPE_Venenux, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
++ 384, 12, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Linux", "Linux", SchemaDefs_OSTypeId_Linux, "Other Linux",
+- VBOXOSTYPE_Linux, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
+- 256, 12, 8 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Solaris", "Solaris", SchemaDefs_OSTypeId_Solaris, "Oracle Solaris 10 5/09 and earlier",
+- VBOXOSTYPE_Solaris, VBOXOSHINT_NONE,
+- 768, 12, 16 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Solaris", "Solaris", SchemaDefs_OSTypeId_Solaris_64, "Oracle Solaris 10 5/09 and earlier (64 bit)",
+- VBOXOSTYPE_Solaris_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC,
+- 1536, 12, 16 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Solaris", "Solaris", SchemaDefs_OSTypeId_OpenSolaris, "Oracle Solaris 10 10/09 and later",
+- VBOXOSTYPE_OpenSolaris, VBOXOSHINT_USBTABLET,
+- 768, 12, 16 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_IntelAhci, StorageBus_SATA,
+- StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Solaris", "Solaris", SchemaDefs_OSTypeId_OpenSolaris_64, "Oracle Solaris 10 10/09 and later (64 bit)",
+- VBOXOSTYPE_OpenSolaris_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_USBTABLET,
+- 1536, 12, 16 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_IntelAhci, StorageBus_SATA,
+- StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "BSD", "BSD", SchemaDefs_OSTypeId_FreeBSD, "FreeBSD",
+- VBOXOSTYPE_FreeBSD, VBOXOSHINT_NONE,
+- 128, 4, 2 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "BSD", "BSD", SchemaDefs_OSTypeId_FreeBSD_64, "FreeBSD (64 bit)",
+- VBOXOSTYPE_FreeBSD_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC,
+- 128, 4, 2 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "BSD", "BSD", SchemaDefs_OSTypeId_OpenBSD, "OpenBSD",
+- VBOXOSTYPE_OpenBSD, VBOXOSHINT_HWVIRTEX,
+- 64, 4, 2 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "BSD", "BSD", SchemaDefs_OSTypeId_OpenBSD_64, "OpenBSD (64 bit)",
+- VBOXOSTYPE_OpenBSD_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC,
+- 64, 4, 2 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "BSD", "BSD", SchemaDefs_OSTypeId_NetBSD, "NetBSD",
+- VBOXOSTYPE_NetBSD, VBOXOSHINT_NONE,
+- 64, 4, 2 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "BSD", "BSD", SchemaDefs_OSTypeId_NetBSD_64, "NetBSD (64 bit)",
+- VBOXOSTYPE_NetBSD_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC,
+- 64, 4, 2 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "OS2", "IBM OS/2", SchemaDefs_OSTypeId_OS2Warp3, "OS/2 Warp 3",
+- VBOXOSTYPE_OS2Warp3, VBOXOSHINT_HWVIRTEX,
+- 48, 4, 1 * _1G64, NetworkAdapterType_Am79C973, 1, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "OS2", "IBM OS/2", SchemaDefs_OSTypeId_OS2Warp4, "OS/2 Warp 4",
+- VBOXOSTYPE_OS2Warp4, VBOXOSHINT_HWVIRTEX,
+- 64, 4, 2 * _1G64, NetworkAdapterType_Am79C973, 1, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "OS2", "IBM OS/2", SchemaDefs_OSTypeId_OS2Warp45, "OS/2 Warp 4.5",
+- VBOXOSTYPE_OS2Warp45, VBOXOSHINT_HWVIRTEX,
+- 96, 4, 2 * _1G64, NetworkAdapterType_Am79C973, 1, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "OS2", "IBM OS/2", SchemaDefs_OSTypeId_OS2eCS, "eComStation",
+- VBOXOSTYPE_ECS, VBOXOSHINT_HWVIRTEX,
+- 96, 4, 2 * _1G64, NetworkAdapterType_Am79C973, 1, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "OS2", "IBM OS/2", SchemaDefs_OSTypeId_OS2, "Other OS/2",
+- VBOXOSTYPE_OS2, VBOXOSHINT_HWVIRTEX,
+- 96, 4, 2 * _1G64, NetworkAdapterType_Am79C973, 1, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "MacOS", "Mac OS X", SchemaDefs_OSTypeId_MacOS, "Mac OS X Server",
+- VBOXOSTYPE_MacOS, VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_EFI | VBOXOSHINT_PAE | VBOXOSHINT_USBHID | VBOXOSHINT_HPET | VBOXOSHINT_USBTABLET,
+- 1024, 4, 20 * _1G64, NetworkAdapterType_I82543GC, 0,
+- StorageControllerType_ICH6, StorageBus_IDE, StorageControllerType_IntelAhci, StorageBus_SATA,
+- ChipsetType_ICH9, AudioControllerType_HDA },
+- { "MacOS", "Mac OS X", SchemaDefs_OSTypeId_MacOS_64, "Mac OS X Server (64 bit)",
+- VBOXOSTYPE_MacOS_x64, VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_EFI | VBOXOSHINT_PAE | VBOXOSHINT_64BIT | VBOXOSHINT_USBHID | VBOXOSHINT_HPET | VBOXOSHINT_USBTABLET,
+- 1024, 4, 20 * _1G64, NetworkAdapterType_I82543GC, 0,
+- StorageControllerType_ICH6, StorageBus_IDE, StorageControllerType_IntelAhci, StorageBus_SATA,
+- ChipsetType_ICH9, AudioControllerType_HDA },
+- { "Other", "Other", SchemaDefs_OSTypeId_DOS, "DOS",
+- VBOXOSTYPE_DOS, VBOXOSHINT_NONE,
+- 32, 4, 500 * _1M, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_SB16 },
+- { "Other", "Other", SchemaDefs_OSTypeId_Netware, "Netware",
+- VBOXOSTYPE_Netware, VBOXOSHINT_HWVIRTEX,
+- 512, 4, 4 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Other", "Other", SchemaDefs_OSTypeId_L4, "L4",
+- VBOXOSTYPE_L4, VBOXOSHINT_NONE,
+- 64, 4, 2 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Other", "Other", SchemaDefs_OSTypeId_QNX, "QNX",
+- VBOXOSTYPE_QNX, VBOXOSHINT_HWVIRTEX,
+- 512, 4, 4 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97 },
+- { "Other", "Other", SchemaDefs_OSTypeId_JRockitVE, "JRockitVE",
+- VBOXOSTYPE_JRockitVE, VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_PAE,
+- 1024, 4, 8 * _1G64, NetworkAdapterType_I82545EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+- StorageControllerType_BusLogic, StorageBus_SCSI, ChipsetType_PIIX3, AudioControllerType_AC97 },
+ };
+
+ /**
+--- VirtualBox-4.1.18.orig/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp 2012-07-25 21:44:01.290876720 -0300
++++ VirtualBox-4.1.18/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp 2012-07-25 22:00:57.819380802 -0300
+@@ -4875,75 +4875,27 @@
+ static const char *kOSTypeIcons [][2] =
+ {
+ {"Other", ":/os_other.png"},
+- {"DOS", ":/os_dos.png"},
+- {"Netware", ":/os_netware.png"},
+- {"L4", ":/os_l4.png"},
+- {"Windows31", ":/os_win31.png"},
+- {"Windows95", ":/os_win95.png"},
+- {"Windows98", ":/os_win98.png"},
+- {"WindowsMe", ":/os_winme.png"},
+- {"WindowsNT4", ":/os_winnt4.png"},
+- {"Windows2000", ":/os_win2k.png"},
+- {"WindowsXP", ":/os_winxp.png"},
+- {"WindowsXP_64", ":/os_winxp_64.png"},
+- {"Windows2003", ":/os_win2k3.png"},
+- {"Windows2003_64", ":/os_win2k3_64.png"},
+- {"WindowsVista", ":/os_winvista.png"},
+- {"WindowsVista_64", ":/os_winvista_64.png"},
+- {"Windows2008", ":/os_win2k8.png"},
+- {"Windows2008_64", ":/os_win2k8_64.png"},
+- {"Windows7", ":/os_win7.png"},
+- {"Windows7_64", ":/os_win7_64.png"},
+- {"Windows8", ":/os_win8.png"},
+- {"Windows8_64", ":/os_win8_64.png"},
+- {"WindowsNT", ":/os_win_other.png"},
+- {"OS2Warp3", ":/os_os2warp3.png"},
+- {"OS2Warp4", ":/os_os2warp4.png"},
+- {"OS2Warp45", ":/os_os2warp45.png"},
+- {"OS2eCS", ":/os_os2ecs.png"},
+- {"OS2", ":/os_os2_other.png"},
+- {"Linux22", ":/os_linux22.png"},
+- {"Linux24", ":/os_linux24.png"},
+- {"Linux24_64", ":/os_linux24_64.png"},
+- {"Linux26", ":/os_linux26.png"},
+- {"Linux26_64", ":/os_linux26_64.png"},
+- {"ArchLinux", ":/os_archlinux.png"},
+- {"ArchLinux_64", ":/os_archlinux_64.png"},
+- {"Debian", ":/os_debian.png"},
+- {"Debian_64", ":/os_debian_64.png"},
+- {"OpenSUSE", ":/os_opensuse.png"},
+- {"OpenSUSE_64", ":/os_opensuse_64.png"},
+- {"Fedora", ":/os_fedora.png"},
+- {"Fedora_64", ":/os_fedora_64.png"},
+- {"Gentoo", ":/os_gentoo.png"},
+- {"Gentoo_64", ":/os_gentoo_64.png"},
+- {"Mandriva", ":/os_mandriva.png"},
+- {"Mandriva_64", ":/os_mandriva_64.png"},
+- {"RedHat", ":/os_redhat.png"},
+- {"RedHat_64", ":/os_redhat_64.png"},
+- {"Turbolinux", ":/os_turbolinux.png"},
+- {"Turbolinux_64", ":/os_turbolinux_64.png"},
+- {"Ubuntu", ":/os_ubuntu.png"},
+- {"Ubuntu_64", ":/os_ubuntu_64.png"},
+- {"Xandros", ":/os_xandros.png"},
+- {"Xandros_64", ":/os_xandros_64.png"},
+- {"Oracle", ":/os_oracle.png"},
+- {"Oracle_64", ":/os_oracle_64.png"},
+- {"Linux", ":/os_linux_other.png"},
+- {"FreeBSD", ":/os_freebsd.png"},
+- {"FreeBSD_64", ":/os_freebsd_64.png"},
+- {"OpenBSD", ":/os_openbsd.png"},
+- {"OpenBSD_64", ":/os_openbsd_64.png"},
+- {"NetBSD", ":/os_netbsd.png"},
+- {"NetBSD_64", ":/os_netbsd_64.png"},
+- {"Solaris", ":/os_solaris.png"},
+- {"Solaris_64", ":/os_solaris_64.png"},
+- {"OpenSolaris", ":/os_oraclesolaris.png"},
+- {"OpenSolaris_64", ":/os_oraclesolaris_64.png"},
+- {"QNX", ":/os_qnx.png"},
+- {"MacOS", ":/os_macosx.png"},
+- {"MacOS_64", ":/os_macosx_64.png"},
+- {"JRockitVE", ":/os_jrockitve.png"},
++ {"GNU", ":/os_gnu.png"},
++ {"GNU_64", ":/os_gnu_64.png"},
++ {"GNUHurd", ":/os_gnuhurd.png"},
++ {"GNULinux", ":/os_gnulinux.png"},
++ {"GNULinux_64", ":/os_gnulinux_64.png"},
++ {"Parabola", ":/os_parabola.png"},
++ {"Parabola_64", ":/os_parabola_64.png"},
++ {"gNewSense", ":/os_gnewsense.png"},
++ {"gNewSense_64", ":/os_gnewsense_64.png"},
++ {"Blag", ":/os_blag.png"},
++ {"Blag_64", ":/os_blag_64.png"},
++ {"Dragora", ":/os_dragora.png"},
++ {"Dragora_64", ":/os_dragora_64.png"},
++ {"Ututo", ":/os_ututo.png"},
++ {"Ututo_64", ":/os_ututo_64.png"},
++ {"Musix", ":/os_musix.png"},
++ {"Musix_64", ":/os_musix_64.png"},
++ {"Trisquel", ":/os_trisquel.png"},
++ {"Trisquel_64", ":/os_trisquel_64.png"},
++ {"Dynebolic", ":/os_dynebolic.png"},
++ {"Venenux", ":/os_venenux.png"},
+ };
+ for (uint n = 0; n < SIZEOF_ARRAY (kOSTypeIcons); ++ n)
+ {
+--- VirtualBox-4.1.18.orig/src/VBox/Frontends/VirtualBox/src/widgets/VBoxOSTypeSelectorWidget.cpp.orig 2012-06-20 10:16:38.000000000 -0300
++++ VirtualBox-4.1.18/src/VBox/Frontends/VirtualBox/src/widgets/VBoxOSTypeSelectorWidget.cpp 2012-07-25 22:07:51.232436783 -0300
+@@ -192,17 +192,10 @@
+ if (typeIndex != -1)
+ mCbType->setCurrentIndex (typeIndex);
+ }
+- /* Or select WinXP item for Windows family as default */
+- else if (familyId == "Windows")
++ /* Or select Parabola GNU/Linux-libre item for GNU/Linux family as default */
++ else if (familyId == "GNU/Linux")
+ {
+- int xpIndex = mCbType->findData ("WindowsXP", RoleTypeID);
+- if (xpIndex != -1)
+- mCbType->setCurrentIndex (xpIndex);
+- }
+- /* Or select Ubuntu item for Linux family as default */
+- else if (familyId == "Linux")
+- {
+- int ubIndex = mCbType->findData ("Ubuntu", RoleTypeID);
++ int ubIndex = mCbType->findData ("Parabola", RoleTypeID);
+ if (ubIndex != -1)
+ mCbType->setCurrentIndex (ubIndex);
+ }
+--- VirtualBox-4.1.18.orig/include/VBox/ostypes.h 2012-06-20 10:07:51.000000000 -0300
++++ VirtualBox-4.1.18/include/VBox/ostypes.h 2012-07-25 23:20:57.322757456 -0300
+@@ -43,77 +43,27 @@
+ typedef enum VBOXOSTYPE
+ {
+ VBOXOSTYPE_Unknown = 0,
+- VBOXOSTYPE_DOS = 0x10000,
+- VBOXOSTYPE_Win31 = 0x15000,
+- VBOXOSTYPE_Win9x = 0x20000,
+- VBOXOSTYPE_Win95 = 0x21000,
+- VBOXOSTYPE_Win98 = 0x22000,
+- VBOXOSTYPE_WinMe = 0x23000,
+- VBOXOSTYPE_WinNT = 0x30000,
+- VBOXOSTYPE_WinNT4 = 0x31000,
+- VBOXOSTYPE_Win2k = 0x32000,
+- VBOXOSTYPE_WinXP = 0x33000,
+- VBOXOSTYPE_WinXP_x64 = 0x33100,
+- VBOXOSTYPE_Win2k3 = 0x34000,
+- VBOXOSTYPE_Win2k3_x64 = 0x34100,
+- VBOXOSTYPE_WinVista = 0x35000,
+- VBOXOSTYPE_WinVista_x64 = 0x35100,
+- VBOXOSTYPE_Win2k8 = 0x36000,
+- VBOXOSTYPE_Win2k8_x64 = 0x36100,
+- VBOXOSTYPE_Win7 = 0x37000,
+- VBOXOSTYPE_Win7_x64 = 0x37100,
+- VBOXOSTYPE_Win8 = 0x38000,
+- VBOXOSTYPE_Win8_x64 = 0x38100,
+- VBOXOSTYPE_OS2 = 0x40000,
+- VBOXOSTYPE_OS2Warp3 = 0x41000,
+- VBOXOSTYPE_OS2Warp4 = 0x42000,
+- VBOXOSTYPE_OS2Warp45 = 0x43000,
+- VBOXOSTYPE_ECS = 0x44000,
+- VBOXOSTYPE_Linux = 0x50000,
+- VBOXOSTYPE_Linux_x64 = 0x50100,
+- VBOXOSTYPE_Linux22 = 0x51000,
+- VBOXOSTYPE_Linux24 = 0x52000,
+- VBOXOSTYPE_Linux24_x64 = 0x52100,
+- VBOXOSTYPE_Linux26 = 0x53000,
+- VBOXOSTYPE_Linux26_x64 = 0x53100,
+- VBOXOSTYPE_ArchLinux = 0x54000,
+- VBOXOSTYPE_ArchLinux_x64 = 0x54100,
+- VBOXOSTYPE_Debian = 0x55000,
+- VBOXOSTYPE_Debian_x64 = 0x55100,
+- VBOXOSTYPE_OpenSUSE = 0x56000,
+- VBOXOSTYPE_OpenSUSE_x64 = 0x56100,
+- VBOXOSTYPE_FedoraCore = 0x57000,
+- VBOXOSTYPE_FedoraCore_x64 = 0x57100,
+- VBOXOSTYPE_Gentoo = 0x58000,
+- VBOXOSTYPE_Gentoo_x64 = 0x58100,
+- VBOXOSTYPE_Mandriva = 0x59000,
+- VBOXOSTYPE_Mandriva_x64 = 0x59100,
+- VBOXOSTYPE_RedHat = 0x5A000,
+- VBOXOSTYPE_RedHat_x64 = 0x5A100,
+- VBOXOSTYPE_Turbolinux = 0x5B000,
+- VBOXOSTYPE_Turbolinux_x64 = 0x5B100,
+- VBOXOSTYPE_Ubuntu = 0x5C000,
+- VBOXOSTYPE_Ubuntu_x64 = 0x5C100,
+- VBOXOSTYPE_Xandros = 0x5D000,
+- VBOXOSTYPE_Xandros_x64 = 0x5D100,
+- VBOXOSTYPE_Oracle = 0x5E000,
+- VBOXOSTYPE_Oracle_x64 = 0x5E100,
+- VBOXOSTYPE_FreeBSD = 0x60000,
+- VBOXOSTYPE_FreeBSD_x64 = 0x60100,
+- VBOXOSTYPE_OpenBSD = 0x61000,
+- VBOXOSTYPE_OpenBSD_x64 = 0x61100,
+- VBOXOSTYPE_NetBSD = 0x62000,
+- VBOXOSTYPE_NetBSD_x64 = 0x62100,
+- VBOXOSTYPE_Netware = 0x70000,
+- VBOXOSTYPE_Solaris = 0x80000,
+- VBOXOSTYPE_Solaris_x64 = 0x80100,
+- VBOXOSTYPE_OpenSolaris = 0x81000,
+- VBOXOSTYPE_OpenSolaris_x64 = 0x81100,
+- VBOXOSTYPE_L4 = 0x90000,
+- VBOXOSTYPE_QNX = 0xA0000,
+- VBOXOSTYPE_MacOS = 0xB0000,
+- VBOXOSTYPE_MacOS_x64 = 0xB0100,
+- VBOXOSTYPE_JRockitVE = 0xC0000,
++ VBOXOSTYPE_GNU = 0x10000,
++ VBOXOSTYPE_GNU_x64 = 0x10100,
++ VBOXOSTYPE_GNUHurd = 0x20000,
++ VBOXOSTYPE_GNULinux = 0x30000,
++ VBOXOSTYPE_GNULinux_x64 = 0x30100,
++ VBOXOSTYPE_Parabola = 0x31000,
++ VBOXOSTYPE_Parabola_x64 = 0x31100,
++ VBOXOSTYPE_gNewSense = 0x32000,
++ VBOXOSTYPE_gNewSense_x64 = 0x32100,
++ VBOXOSTYPE_Blag = 0x33000,
++ VBOXOSTYPE_Blag_x64 = 0x33100,
++ VBOXOSTYPE_Dragora = 0x34000,
++ VBOXOSTYPE_Dragora_x64 = 0x34100,
++ VBOXOSTYPE_Ututo = 0x35000,
++ VBOXOSTYPE_Ututo_x64 = 0x35100,
++ VBOXOSTYPE_Musix = 0x36000,
++ VBOXOSTYPE_Musix_x64 = 0x36100,
++ VBOXOSTYPE_Trisquel = 0x37000,
++ VBOXOSTYPE_Trisquel_x64 = 0x37100,
++ VBOXOSTYPE_Dynebolic = 0x38000,
++ VBOXOSTYPE_Venenux = 0x39000,
+ /** The bit number which indicates 64-bit or 32-bit. */
+ #define VBOXOSTYPE_x64_BIT 8
+ /** The mask which indicates 64-bit. */
+@@ -129,16 +79,11 @@
+ typedef enum VBOXOSFAMILY
+ {
+ VBOXOSFAMILY_Unknown = 0,
+- VBOXOSFAMILY_Windows32 = 1,
+- VBOXOSFAMILY_Windows64 = 2,
+- VBOXOSFAMILY_Linux32 = 3,
+- VBOXOSFAMILY_Linux64 = 4,
+- VBOXOSFAMILY_FreeBSD32 = 5,
+- VBOXOSFAMILY_FreeBSD64 = 6,
+- VBOXOSFAMILY_Solaris32 = 7,
+- VBOXOSFAMILY_Solaris64 = 8,
+- VBOXOSFAMILY_MacOSX32 = 9,
+- VBOXOSFAMILY_MacOSX64 = 10,
++ VBOXOSFAMILY_GNU32 = 1,
++ VBOXOSFAMILY_GNU64 = 2,
++ VBOXOSFAMILY_GNUHurd = 3,
++ VBOXOSFAMILY_GNULinux32 = 4,
++ VBOXOSFAMILY_GNULinux64 = 5,
+ /** The usual 32-bit hack. */
+ VBOXOSFAMILY_32BIT_HACK = 0x7fffffff
+ } VBOXOSFAMILY;
+--- VirtualBox-4.1.18.orig/src/VBox/Main/src-server/ApplianceImpl.cpp 2012-06-20 10:17:35.000000000 -0300
++++ VirtualBox-4.1.18/src/VBox/Main/src-server/ApplianceImpl.cpp 2012-07-26 01:28:50.033551279 -0300
+@@ -49,94 +49,33 @@
+ g_osTypes[] =
+ {
+ { ovf::CIMOSType_CIMOS_Unknown, SchemaDefs_OSTypeId_Other },
+- { ovf::CIMOSType_CIMOS_OS2, SchemaDefs_OSTypeId_OS2 },
+- { ovf::CIMOSType_CIMOS_OS2, SchemaDefs_OSTypeId_OS2Warp3 },
+- { ovf::CIMOSType_CIMOS_OS2, SchemaDefs_OSTypeId_OS2Warp4 },
+- { ovf::CIMOSType_CIMOS_OS2, SchemaDefs_OSTypeId_OS2Warp45 },
+- { ovf::CIMOSType_CIMOS_MSDOS, SchemaDefs_OSTypeId_DOS },
+- { ovf::CIMOSType_CIMOS_WIN3x, SchemaDefs_OSTypeId_Windows31 },
+- { ovf::CIMOSType_CIMOS_WIN95, SchemaDefs_OSTypeId_Windows95 },
+- { ovf::CIMOSType_CIMOS_WIN98, SchemaDefs_OSTypeId_Windows98 },
+- { ovf::CIMOSType_CIMOS_WINNT, SchemaDefs_OSTypeId_WindowsNT },
+- { ovf::CIMOSType_CIMOS_WINNT, SchemaDefs_OSTypeId_WindowsNT4 },
+- { ovf::CIMOSType_CIMOS_NetWare, SchemaDefs_OSTypeId_Netware },
+- { ovf::CIMOSType_CIMOS_NovellOES, SchemaDefs_OSTypeId_Netware },
+- { ovf::CIMOSType_CIMOS_Solaris, SchemaDefs_OSTypeId_Solaris },
+- { ovf::CIMOSType_CIMOS_SunOS, SchemaDefs_OSTypeId_Solaris },
+- { ovf::CIMOSType_CIMOS_FreeBSD, SchemaDefs_OSTypeId_FreeBSD },
+- { ovf::CIMOSType_CIMOS_NetBSD, SchemaDefs_OSTypeId_NetBSD },
+- { ovf::CIMOSType_CIMOS_QNX, SchemaDefs_OSTypeId_QNX },
+- { ovf::CIMOSType_CIMOS_Windows2000, SchemaDefs_OSTypeId_Windows2000 },
+- { ovf::CIMOSType_CIMOS_WindowsMe, SchemaDefs_OSTypeId_WindowsMe },
+- { ovf::CIMOSType_CIMOS_OpenBSD, SchemaDefs_OSTypeId_OpenBSD },
+- { ovf::CIMOSType_CIMOS_WindowsXP, SchemaDefs_OSTypeId_WindowsXP },
+- { ovf::CIMOSType_CIMOS_WindowsXPEmbedded, SchemaDefs_OSTypeId_WindowsXP },
+- { ovf::CIMOSType_CIMOS_WindowsEmbeddedforPointofService, SchemaDefs_OSTypeId_WindowsXP },
+- { ovf::CIMOSType_CIMOS_MicrosoftWindowsServer2003, SchemaDefs_OSTypeId_Windows2003 },
+- { ovf::CIMOSType_CIMOS_MicrosoftWindowsServer2003_64, SchemaDefs_OSTypeId_Windows2003_64 },
+- { ovf::CIMOSType_CIMOS_WindowsXP_64, SchemaDefs_OSTypeId_WindowsXP_64 },
+- { ovf::CIMOSType_CIMOS_WindowsVista, SchemaDefs_OSTypeId_WindowsVista },
+- { ovf::CIMOSType_CIMOS_WindowsVista_64, SchemaDefs_OSTypeId_WindowsVista_64 },
+- { ovf::CIMOSType_CIMOS_MicrosoftWindowsServer2008, SchemaDefs_OSTypeId_Windows2008 },
+- { ovf::CIMOSType_CIMOS_MicrosoftWindowsServer2008_64, SchemaDefs_OSTypeId_Windows2008_64 },
+- { ovf::CIMOSType_CIMOS_FreeBSD_64, SchemaDefs_OSTypeId_FreeBSD_64 },
+- { ovf::CIMOSType_CIMOS_MACOS, SchemaDefs_OSTypeId_MacOS },
+- { ovf::CIMOSType_CIMOS_MACOS, SchemaDefs_OSTypeId_MacOS_64 }, // there is no CIM 64-bit type for this
+-
+- // Linuxes
+- { ovf::CIMOSType_CIMOS_RedHatEnterpriseLinux, SchemaDefs_OSTypeId_RedHat },
+- { ovf::CIMOSType_CIMOS_RedHatEnterpriseLinux_64, SchemaDefs_OSTypeId_RedHat_64 },
+- { ovf::CIMOSType_CIMOS_Solaris_64, SchemaDefs_OSTypeId_Solaris_64 },
+- { ovf::CIMOSType_CIMOS_SUSE, SchemaDefs_OSTypeId_OpenSUSE },
+- { ovf::CIMOSType_CIMOS_SLES, SchemaDefs_OSTypeId_OpenSUSE },
+- { ovf::CIMOSType_CIMOS_NovellLinuxDesktop, SchemaDefs_OSTypeId_OpenSUSE },
+- { ovf::CIMOSType_CIMOS_SUSE_64, SchemaDefs_OSTypeId_OpenSUSE_64 },
+- { ovf::CIMOSType_CIMOS_SLES_64, SchemaDefs_OSTypeId_OpenSUSE_64 },
+- { ovf::CIMOSType_CIMOS_LINUX, SchemaDefs_OSTypeId_Linux },
+- { ovf::CIMOSType_CIMOS_LINUX, SchemaDefs_OSTypeId_Linux22 },
+- { ovf::CIMOSType_CIMOS_SunJavaDesktopSystem, SchemaDefs_OSTypeId_Linux },
+- { ovf::CIMOSType_CIMOS_TurboLinux, SchemaDefs_OSTypeId_Turbolinux },
+- { ovf::CIMOSType_CIMOS_TurboLinux_64, SchemaDefs_OSTypeId_Turbolinux_64 },
+- { ovf::CIMOSType_CIMOS_Mandriva, SchemaDefs_OSTypeId_Mandriva },
+- { ovf::CIMOSType_CIMOS_Mandriva_64, SchemaDefs_OSTypeId_Mandriva_64 },
+- { ovf::CIMOSType_CIMOS_Ubuntu, SchemaDefs_OSTypeId_Ubuntu },
+- { ovf::CIMOSType_CIMOS_Ubuntu_64, SchemaDefs_OSTypeId_Ubuntu_64 },
+- { ovf::CIMOSType_CIMOS_Debian, SchemaDefs_OSTypeId_Debian },
+- { ovf::CIMOSType_CIMOS_Debian_64, SchemaDefs_OSTypeId_Debian_64 },
+- { ovf::CIMOSType_CIMOS_Linux_2_4_x, SchemaDefs_OSTypeId_Linux24 },
+- { ovf::CIMOSType_CIMOS_Linux_2_4_x_64, SchemaDefs_OSTypeId_Linux24_64 },
+- { ovf::CIMOSType_CIMOS_Linux_2_6_x, SchemaDefs_OSTypeId_Linux26 },
+- { ovf::CIMOSType_CIMOS_Linux_2_6_x_64, SchemaDefs_OSTypeId_Linux26_64 },
+- { ovf::CIMOSType_CIMOS_Linux_64, SchemaDefs_OSTypeId_Linux26_64 },
+-
+- // types that we have support for but CIM doesn't
+- { ovf::CIMOSType_CIMOS_Linux_2_6_x, SchemaDefs_OSTypeId_ArchLinux },
+- { ovf::CIMOSType_CIMOS_Linux_2_6_x_64, SchemaDefs_OSTypeId_ArchLinux_64 },
+- { ovf::CIMOSType_CIMOS_Linux_2_6_x, SchemaDefs_OSTypeId_Fedora },
+- { ovf::CIMOSType_CIMOS_Linux_2_6_x_64, SchemaDefs_OSTypeId_Fedora_64 },
+- { ovf::CIMOSType_CIMOS_Linux_2_6_x, SchemaDefs_OSTypeId_Gentoo },
+- { ovf::CIMOSType_CIMOS_Linux_2_6_x_64, SchemaDefs_OSTypeId_Gentoo_64 },
+- { ovf::CIMOSType_CIMOS_Linux_2_6_x, SchemaDefs_OSTypeId_Xandros },
+- { ovf::CIMOSType_CIMOS_Linux_2_6_x_64, SchemaDefs_OSTypeId_Xandros_64 },
+- { ovf::CIMOSType_CIMOS_Solaris, SchemaDefs_OSTypeId_OpenSolaris },
+- { ovf::CIMOSType_CIMOS_Solaris_64, SchemaDefs_OSTypeId_OpenSolaris_64 },
+-
+- // types added with CIM 2.25.0 follow:
+- { ovf::CIMOSType_CIMOS_WindowsServer2008R2, SchemaDefs_OSTypeId_Windows2008 }, // duplicate, see above
+-// { ovf::CIMOSType_CIMOS_VMwareESXi = 104, // we can't run ESX in a VM
+- { ovf::CIMOSType_CIMOS_Windows7, SchemaDefs_OSTypeId_Windows7 },
+- { ovf::CIMOSType_CIMOS_Windows7, SchemaDefs_OSTypeId_Windows7_64 }, // there is no CIM 64-bit type for this
+- { ovf::CIMOSType_CIMOS_CentOS, SchemaDefs_OSTypeId_RedHat },
+- { ovf::CIMOSType_CIMOS_CentOS_64, SchemaDefs_OSTypeId_RedHat_64 },
+- { ovf::CIMOSType_CIMOS_OracleEnterpriseLinux, SchemaDefs_OSTypeId_Oracle },
+- { ovf::CIMOSType_CIMOS_OracleEnterpriseLinux_64, SchemaDefs_OSTypeId_Oracle_64 },
+- { ovf::CIMOSType_CIMOS_eComStation, SchemaDefs_OSTypeId_OS2eCS }
+-
+- // there are no CIM types for these, so these turn to "other" on export:
+- // SchemaDefs_OSTypeId_OpenBSD
+- // SchemaDefs_OSTypeId_OpenBSD_64
+- // SchemaDefs_OSTypeId_NetBSD
+- // SchemaDefs_OSTypeId_NetBSD_64
++
++ // Custom OS
++ { ovf::CIMOSType_CIMOS_GNU, SchemaDefs_OSTypeId_GNU },
++ { ovf::CIMOSType_CIMOS_GNU_64, SchemaDefs_OSTypeId_GNU_64 },
++ { ovf::CIMOSType_CIMOS_GNUHurd, SchemaDefs_OSTypeId_GNUHurd },
++ { ovf::CIMOSType_CIMOS_GNULinux, SchemaDefs_OSTypeId_GNULinux },
++ { ovf::CIMOSType_CIMOS_GNULinux_64, SchemaDefs_OSTypeId_GNULinux_64 },
++
++ // GNU/Linux free distros
++ { ovf::CIMOSType_CIMOS_gNewSense, SchemaDefs_OSTypeId_gNewSense },
++ { ovf::CIMOSType_CIMOS_gNewSense_64, SchemaDefs_OSTypeId_gNewSense_64 },
++ { ovf::CIMOSType_CIMOS_Dragora, SchemaDefs_OSTypeId_Dragora },
++ { ovf::CIMOSType_CIMOS_Dragora_64, SchemaDefs_OSTypeId_Dragora_64 },
++ { ovf::CIMOSType_CIMOS_Musix, SchemaDefs_OSTypeId_Musix },
++ { ovf::CIMOSType_CIMOS_Musix_64, SchemaDefs_OSTypeId_Musix_64 },
++ { ovf::CIMOSType_CIMOS_Trisquel, SchemaDefs_OSTypeId_Trisquel },
++ { ovf::CIMOSType_CIMOS_Trisquel_64, SchemaDefs_OSTypeId_Trisquel_64 },
++ { ovf::CIMOSType_CIMOS_Dynebolic, SchemaDefs_OSTypeId_Dynebolic },
++ { ovf::CIMOSType_CIMOS_Venenux, SchemaDefs_OSTypeId_Venenux },
++
++ // GNU/Linux free distros that we have support for but CIM doesn't
++ { ovf::CIMOSType_CIMOS_GNULinux, SchemaDefs_OSTypeId_Parabola },
++ { ovf::CIMOSType_CIMOS_GNULinux_64, SchemaDefs_OSTypeId_Parabola_64 },
++ { ovf::CIMOSType_CIMOS_GNULinux, SchemaDefs_OSTypeId_Blag },
++ { ovf::CIMOSType_CIMOS_GNULinux_64, SchemaDefs_OSTypeId_Blag_64 },
++ { ovf::CIMOSType_CIMOS_GNULinux, SchemaDefs_OSTypeId_Ututo },
++ { ovf::CIMOSType_CIMOS_GNULinux_64, SchemaDefs_OSTypeId_Ututo_64 },
+
+ };
+
+@@ -150,53 +89,34 @@
+ /* These are the 32-Bit ones. They are sorted by priority. */
+ static const osTypePattern g_osTypesPattern[] =
+ {
+- {"Windows NT", SchemaDefs_OSTypeId_WindowsNT4},
+- {"Windows XP", SchemaDefs_OSTypeId_WindowsXP},
+- {"Windows 2000", SchemaDefs_OSTypeId_Windows2000},
+- {"Windows 2003", SchemaDefs_OSTypeId_Windows2003},
+- {"Windows Vista", SchemaDefs_OSTypeId_WindowsVista},
+- {"Windows 2008", SchemaDefs_OSTypeId_Windows2008},
+- {"SUSE", SchemaDefs_OSTypeId_OpenSUSE},
+- {"Novell", SchemaDefs_OSTypeId_OpenSUSE},
+- {"Red Hat", SchemaDefs_OSTypeId_RedHat},
+- {"Mandriva", SchemaDefs_OSTypeId_Mandriva},
+- {"Ubuntu", SchemaDefs_OSTypeId_Ubuntu},
+- {"Debian", SchemaDefs_OSTypeId_Debian},
+- {"QNX", SchemaDefs_OSTypeId_QNX},
+- {"Linux 2.4", SchemaDefs_OSTypeId_Linux24},
+- {"Linux 2.6", SchemaDefs_OSTypeId_Linux26},
+- {"Linux", SchemaDefs_OSTypeId_Linux},
+- {"OpenSolaris", SchemaDefs_OSTypeId_OpenSolaris},
+- {"Solaris", SchemaDefs_OSTypeId_OpenSolaris},
+- {"FreeBSD", SchemaDefs_OSTypeId_FreeBSD},
+- {"NetBSD", SchemaDefs_OSTypeId_NetBSD},
+- {"Windows 95", SchemaDefs_OSTypeId_Windows95},
+- {"Windows 98", SchemaDefs_OSTypeId_Windows98},
+- {"Windows Me", SchemaDefs_OSTypeId_WindowsMe},
+- {"Windows 3.", SchemaDefs_OSTypeId_Windows31},
+- {"DOS", SchemaDefs_OSTypeId_DOS},
+- {"OS2", SchemaDefs_OSTypeId_OS2}
++
++ {"Parabola GNU/Linux-libre", SchemaDefs_OSTypeId_Parabola},
++ {"gNewSense", SchemaDefs_OSTypeId_gNewSense},
++ {"Blag Linux and GNU", SchemaDefs_OSTypeId_Blag},
++ {"Dragora", SchemaDefs_OSTypeId_Dragora},
++ {"Ututo XS", SchemaDefs_OSTypeId_Ututo},
++ {"Musix", SchemaDefs_OSTypeId_Musix},
++ {"Trisquel", SchemaDefs_OSTypeId_Trisquel},
++ {"Dyne:bolic", SchemaDefs_OSTypeId_Dynebolic},
++ {"Venenux", SchemaDefs_OSTypeId_Venenux},
++ {"GNU", SchemaDefs_OSTypeId_GNU},
++ {"GNU-Hurd", SchemaDefs_OSTypeId_GNUHurd},
++ {"GNU/Linux", SchemaDefs_OSTypeId_GNULinux},
++
+ };
+
+ /* These are the 64-Bit ones. They are sorted by priority. */
+ static const osTypePattern g_osTypesPattern64[] =
+ {
+- {"Windows XP", SchemaDefs_OSTypeId_WindowsXP_64},
+- {"Windows 2003", SchemaDefs_OSTypeId_Windows2003_64},
+- {"Windows Vista", SchemaDefs_OSTypeId_WindowsVista_64},
+- {"Windows 2008", SchemaDefs_OSTypeId_Windows2008_64},
+- {"SUSE", SchemaDefs_OSTypeId_OpenSUSE_64},
+- {"Novell", SchemaDefs_OSTypeId_OpenSUSE_64},
+- {"Red Hat", SchemaDefs_OSTypeId_RedHat_64},
+- {"Mandriva", SchemaDefs_OSTypeId_Mandriva_64},
+- {"Ubuntu", SchemaDefs_OSTypeId_Ubuntu_64},
+- {"Debian", SchemaDefs_OSTypeId_Debian_64},
+- {"Linux 2.4", SchemaDefs_OSTypeId_Linux24_64},
+- {"Linux 2.6", SchemaDefs_OSTypeId_Linux26_64},
+- {"Linux", SchemaDefs_OSTypeId_Linux26_64},
+- {"OpenSolaris", SchemaDefs_OSTypeId_OpenSolaris_64},
+- {"Solaris", SchemaDefs_OSTypeId_OpenSolaris_64},
+- {"FreeBSD", SchemaDefs_OSTypeId_FreeBSD_64},
++ {"Parabola GNU/Linux-libre", SchemaDefs_OSTypeId_Parabola_64},
++ {"gNewSense", SchemaDefs_OSTypeId_gNewSense_64},
++ {"Blag Linux and GNU", SchemaDefs_OSTypeId_Blag_64},
++ {"Dragora", SchemaDefs_OSTypeId_Dragora_64},
++ {"Ututo XS", SchemaDefs_OSTypeId_Ututo_64},
++ {"Musix", SchemaDefs_OSTypeId_Musix_64},
++ {"Trisquel", SchemaDefs_OSTypeId_Trisquel_64},
++ {"GNU", SchemaDefs_OSTypeId_GNU_64},
++ {"GNU/Linux", SchemaDefs_OSTypeId_GNULinux_64},
+ };
+
+ /**
+--- VirtualBox-4.1.18.orig/src/VBox/Main/include/ovfreader.h 2012-06-20 10:17:34.000000000 -0300
++++ VirtualBox-4.1.18/src/VBox/Main/include/ovfreader.h 2012-07-26 03:51:21.807619186 -0300
+@@ -34,119 +34,24 @@
+
+ enum CIMOSType_T
+ {
+- CIMOSType_CIMOS_Unknown = 0,
+- CIMOSType_CIMOS_Other = 1,
+- CIMOSType_CIMOS_MACOS = 2,
+- CIMOSType_CIMOS_ATTUNIX = 3,
+- CIMOSType_CIMOS_DGUX = 4,
+- CIMOSType_CIMOS_DECNT = 5,
+- CIMOSType_CIMOS_Tru64UNIX = 6,
+- CIMOSType_CIMOS_OpenVMS = 7,
+- CIMOSType_CIMOS_HPUX = 8,
+- CIMOSType_CIMOS_AIX = 9,
+- CIMOSType_CIMOS_MVS = 10,
+- CIMOSType_CIMOS_OS400 = 11,
+- CIMOSType_CIMOS_OS2 = 12,
+- CIMOSType_CIMOS_JavaVM = 13,
+- CIMOSType_CIMOS_MSDOS = 14,
+- CIMOSType_CIMOS_WIN3x = 15,
+- CIMOSType_CIMOS_WIN95 = 16,
+- CIMOSType_CIMOS_WIN98 = 17,
+- CIMOSType_CIMOS_WINNT = 18,
+- CIMOSType_CIMOS_WINCE = 19,
+- CIMOSType_CIMOS_NCR3000 = 20,
+- CIMOSType_CIMOS_NetWare = 21,
+- CIMOSType_CIMOS_OSF = 22,
+- CIMOSType_CIMOS_DCOS = 23,
+- CIMOSType_CIMOS_ReliantUNIX = 24,
+- CIMOSType_CIMOS_SCOUnixWare = 25,
+- CIMOSType_CIMOS_SCOOpenServer = 26,
+- CIMOSType_CIMOS_Sequent = 27,
+- CIMOSType_CIMOS_IRIX = 28,
+- CIMOSType_CIMOS_Solaris = 29,
+- CIMOSType_CIMOS_SunOS = 30,
+- CIMOSType_CIMOS_U6000 = 31,
+- CIMOSType_CIMOS_ASERIES = 32,
+- CIMOSType_CIMOS_HPNonStopOS = 33,
+- CIMOSType_CIMOS_HPNonStopOSS = 34,
+- CIMOSType_CIMOS_BS2000 = 35,
+- CIMOSType_CIMOS_LINUX = 36,
+- CIMOSType_CIMOS_Lynx = 37,
+- CIMOSType_CIMOS_XENIX = 38,
+- CIMOSType_CIMOS_VM = 39,
+- CIMOSType_CIMOS_InteractiveUNIX = 40,
+- CIMOSType_CIMOS_BSDUNIX = 41,
+- CIMOSType_CIMOS_FreeBSD = 42,
+- CIMOSType_CIMOS_NetBSD = 43,
+- CIMOSType_CIMOS_GNUHurd = 44,
+- CIMOSType_CIMOS_OS9 = 45,
+- CIMOSType_CIMOS_MACHKernel = 46,
+- CIMOSType_CIMOS_Inferno = 47,
+- CIMOSType_CIMOS_QNX = 48,
+- CIMOSType_CIMOS_EPOC = 49,
+- CIMOSType_CIMOS_IxWorks = 50,
+- CIMOSType_CIMOS_VxWorks = 51,
+- CIMOSType_CIMOS_MiNT = 52,
+- CIMOSType_CIMOS_BeOS = 53,
+- CIMOSType_CIMOS_HPMPE = 54,
+- CIMOSType_CIMOS_NextStep = 55,
+- CIMOSType_CIMOS_PalmPilot = 56,
+- CIMOSType_CIMOS_Rhapsody = 57,
+- CIMOSType_CIMOS_Windows2000 = 58,
+- CIMOSType_CIMOS_Dedicated = 59,
+- CIMOSType_CIMOS_OS390 = 60,
+- CIMOSType_CIMOS_VSE = 61,
+- CIMOSType_CIMOS_TPF = 62,
+- CIMOSType_CIMOS_WindowsMe = 63,
+- CIMOSType_CIMOS_CalderaOpenUNIX = 64,
+- CIMOSType_CIMOS_OpenBSD = 65,
+- CIMOSType_CIMOS_NotApplicable = 66,
+- CIMOSType_CIMOS_WindowsXP = 67,
+- CIMOSType_CIMOS_zOS = 68,
+- CIMOSType_CIMOS_MicrosoftWindowsServer2003 = 69,
+- CIMOSType_CIMOS_MicrosoftWindowsServer2003_64 = 70,
+- CIMOSType_CIMOS_WindowsXP_64 = 71,
+- CIMOSType_CIMOS_WindowsXPEmbedded = 72,
+- CIMOSType_CIMOS_WindowsVista = 73,
+- CIMOSType_CIMOS_WindowsVista_64 = 74,
+- CIMOSType_CIMOS_WindowsEmbeddedforPointofService = 75,
+- CIMOSType_CIMOS_MicrosoftWindowsServer2008 = 76,
+- CIMOSType_CIMOS_MicrosoftWindowsServer2008_64 = 77,
+- CIMOSType_CIMOS_FreeBSD_64 = 78,
+- CIMOSType_CIMOS_RedHatEnterpriseLinux = 79,
+- CIMOSType_CIMOS_RedHatEnterpriseLinux_64 = 80,
+- CIMOSType_CIMOS_Solaris_64 = 81,
+- CIMOSType_CIMOS_SUSE = 82,
+- CIMOSType_CIMOS_SUSE_64 = 83,
+- CIMOSType_CIMOS_SLES = 84,
+- CIMOSType_CIMOS_SLES_64 = 85,
+- CIMOSType_CIMOS_NovellOES = 86,
+- CIMOSType_CIMOS_NovellLinuxDesktop = 87,
+- CIMOSType_CIMOS_SunJavaDesktopSystem = 88,
+- CIMOSType_CIMOS_Mandriva = 89,
+- CIMOSType_CIMOS_Mandriva_64 = 90,
+- CIMOSType_CIMOS_TurboLinux = 91,
+- CIMOSType_CIMOS_TurboLinux_64 = 92,
+- CIMOSType_CIMOS_Ubuntu = 93,
+- CIMOSType_CIMOS_Ubuntu_64 = 94,
+- CIMOSType_CIMOS_Debian = 95,
+- CIMOSType_CIMOS_Debian_64 = 96,
+- CIMOSType_CIMOS_Linux_2_4_x = 97,
+- CIMOSType_CIMOS_Linux_2_4_x_64 = 98,
+- CIMOSType_CIMOS_Linux_2_6_x = 99,
+- CIMOSType_CIMOS_Linux_2_6_x_64 = 100,
+- CIMOSType_CIMOS_Linux_64 = 101,
+- CIMOSType_CIMOS_Other_64 = 102,
+- // types added with CIM 2.25.0 follow:
+- CIMOSType_CIMOS_WindowsServer2008R2 = 103,
+- CIMOSType_CIMOS_VMwareESXi = 104,
+- CIMOSType_CIMOS_Windows7 = 105,
+- CIMOSType_CIMOS_CentOS = 106,
+- CIMOSType_CIMOS_CentOS_64 = 107,
+- CIMOSType_CIMOS_OracleEnterpriseLinux = 108,
+- CIMOSType_CIMOS_OracleEnterpriseLinux_64 = 109,
+- CIMOSType_CIMOS_eComStation = 110
+- // no new types added with CIM 2.26.0
++ CIMOSType_CIMOS_Unknown = 0,
++ CIMOSType_CIMOS_Other = 1,
++ CIMOSType_CIMOS_Other_64 = 2,
++ CIMOSType_CIMOS_gNewSense = 3,
++ CIMOSType_CIMOS_gNewSense_64 = 4,
++ CIMOSType_CIMOS_Dragora = 5,
++ CIMOSType_CIMOS_Dragora_64 = 6,
++ CIMOSType_CIMOS_Musix = 7,
++ CIMOSType_CIMOS_Musix_64 = 8,
++ CIMOSType_CIMOS_Trisquel = 9,
++ CIMOSType_CIMOS_Trisquel_64 = 10,
++ CIMOSType_CIMOS_Dynebolic = 11,
++ CIMOSType_CIMOS_Venenux = 12,
++ CIMOSType_CIMOS_GNU = 13,
++ CIMOSType_CIMOS_GNU_64 = 14,
++ CIMOSType_CIMOS_GNUHurd = 15,
++ CIMOSType_CIMOS_GNULinux = 16,
++ CIMOSType_CIMOS_GNULinux_64 = 17
+ };
+
+
+--- VirtualBox-4.1.18.orig/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c 2012-06-20 10:09:01.000000000 -0300
++++ VirtualBox-4.1.18/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c 2012-07-26 15:32:55.309812685 -0300
+@@ -622,16 +622,16 @@
+ * Call the common device extension initializer.
+ */
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) && defined(RT_ARCH_X86)
+- VBOXOSTYPE enmOSType = VBOXOSTYPE_Linux26;
++ VBOXOSTYPE enmOSType = VBOXOSTYPE_GNULinux;
+ #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) && defined(RT_ARCH_AMD64)
+- VBOXOSTYPE enmOSType = VBOXOSTYPE_Linux26_x64;
++ VBOXOSTYPE enmOSType = VBOXOSTYPE_GNULinux_x64;
+ #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0) && defined(RT_ARCH_X86)
+- VBOXOSTYPE enmOSType = VBOXOSTYPE_Linux24;
++ VBOXOSTYPE enmOSType = VBOXOSTYPE_GNULinux;
+ #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0) && defined(RT_ARCH_AMD64)
+- VBOXOSTYPE enmOSType = VBOXOSTYPE_Linux24_x64;
++ VBOXOSTYPE enmOSType = VBOXOSTYPE_GNULinux_x64;
+ #else
+ # warning "huh? which arch + version is this?"
+- VBOXOSTYPE enmOsType = VBOXOSTYPE_Linux;
++ VBOXOSTYPE enmOsType = VBOXOSTYPE_GNULinux;
+ #endif
+ rc = VBoxGuestInitDevExt(&g_DevExt,
+ g_IOPortBase,
diff --git a/libre/virtualbox-libre/ipv6_vnc.patch b/libre/virtualbox-libre/ipv6_vnc.patch
new file mode 100644
index 000000000..8f50aba1c
--- /dev/null
+++ b/libre/virtualbox-libre/ipv6_vnc.patch
@@ -0,0 +1,20 @@
+diff -aur vanilla/VirtualBox-4.1.18/src/VBox/Frontends/VBoxHeadless/FramebufferVNC.cpp changed/VirtualBox-4.1.18/src/VBox/Frontends/VBoxHeadless/FramebufferVNC.cpp
+--- vanilla/VirtualBox-4.1.18/src/VBox/Frontends/VBoxHeadless/FramebufferVNC.cpp 2012-06-20 15:15:53.000000000 +0200
++++ changed/VirtualBox-4.1.18/src/VBox/Frontends/VBoxHeadless/FramebufferVNC.cpp 2012-07-16 16:24:22.448349886 +0200
+@@ -88,8 +88,16 @@
+
+ vncServer = rfbGetScreen(0, NULL, mWidth, mHeight, 8, 3, 1);
+ vncServer->screenData = (void*)this;
++#ifdef LIBVNCSERVER_IPv6
++ if (mVncPort) {
++ vncServer->port = mVncPort;
++ vncServer->ipv6port = mVncPort;
++ }
++#else
+ if (mVncPort)
+ vncServer->port = mVncPort;
++#endif
++
+ char *pszDesktopName;
+ rc = RTStrAPrintf(&pszDesktopName, "%s - VirtualBox", pszName);
+ if (rc >= 0)
diff --git a/libre/virtualbox-libre/libre.patch b/libre/virtualbox-libre/libre.patch
new file mode 100644
index 000000000..e51d0c0a7
--- /dev/null
+++ b/libre/virtualbox-libre/libre.patch
@@ -0,0 +1,5765 @@
+--- VirtualBox-4.1.18.orig/Config.kmk 2012-07-24 16:38:43.981310996 -0300
++++ VirtualBox-4.1.18/Config.kmk 2012-07-24 16:38:44.001309865 -0300
+@@ -56,9 +56,6 @@
+ PROPS_SYSMODS_ACCUMULATE_L += INTERMEDIATES
+ PROPS_MISCBINS_ACCUMULATE_L += INTERMEDIATES
+
+-# Misc names used bye the install paths below.
+-VBOX_PUEL_MANGLED_NAME := Oracle_VM_VirtualBox_Extension_Pack
+-
+ # Install paths
+ ## @todo This will change after 4.1 is branched off!
+ # What is now 'bin' and 'lib' will be moved down under 'staged/', except on
+@@ -125,9 +122,6 @@
+ endif
+
+ INST_DOC = doc/
+-INST_EXTPACK = $(INST_BIN)ExtensionPacks/
+-INST_EXTPACK_CERTS = $(INST_BIN)ExtPackCertificates/
+-INST_EXTPACK_PUEL = $(INST_EXTPACK)$(VBOX_PUEL_MANGLED_NAME)/
+ INST_PACKAGES = packages/
+
+ VBOX_PATH_SDK = $(patsubst %/,%,$(PATH_STAGE)/$(INST_SDK))
+@@ -136,7 +130,6 @@
+ VBOX_PATH_ADDITIONS = $(patsubst %/,%,$(PATH_STAGE)/$(INST_ADDITIONS))
+ VBOX_PATH_ADDITIONS_ISO = $(patsubst %/,%,$(PATH_STAGE)/$(INST_ADDITIONS_ISO))
+ VBOX_PATH_ADDITIONS_LIB = $(patsubst %/,%,$(PATH_STAGE)/$(INST_ADDITIONS_LIB))
+-VBOX_PATH_EXTPACK_PUEL= $(patsubst %/,%,$(PATH_STAGE)/$(INST_EXTPACK_PUEL))
+ VBOX_PATH_PACKAGES = $(patsubst %/,%,$(PATH_STAGE)/$(INST_PACKAGES))
+
+
+@@ -208,7 +201,6 @@
+ export VBOX_ADDITIONS_SH_MODE = release
+ export VBOX_DOCUMENTATION_SH_MODE = release
+ export VBOX_EFI_SH_MODE = release
+- export VBOX_EXTPACKS_SH_MODE = release
+ endif
+
+ # Some info on the vendor
+@@ -361,8 +353,6 @@
+ VBOX_WITH_USB = 1
+ # Enable the USB 1.1 controller plus virtual USB HID devices.
+ VBOX_WITH_VUSB = 1
+-# Enable the USB 2.0 controller.
+-VBOX_WITH_EHCI = 1
+ # Enable the ISCSI feature.
+ VBOX_WITH_ISCSI = 1
+ # Enable INIP support in the ISCSI feature.
+@@ -430,9 +420,6 @@
+ ifdef VBOX_WITH_USB
+ VBOX_WITH_VUSB = 1
+ endif
+-ifdef VBOX_WITH_EHCI
+- VBOX_WITH_EHCI_IMPL = 1
+-endif
+ ifdef VBOX_WITH_PCI_PASSTHROUGH
+ VBOX_WITH_PCI_PASSTHROUGH_IMPL = 1
+ endif
+@@ -591,15 +578,6 @@
+ ## @}
+
+
+-## @name Extension pack
+-## @{
+-# Enables the extension pack feature.
+-VBOX_WITH_EXTPACK = 1
+-# Enables separating code into the Oracle VM VirtualBox Extension Pack, dubbed PUEL.
+-VBOX_WITH_EXTPACK_PUEL = 1
+-# Enables building+packing the Oracle VM VirtualBox Extension Pack, includes VBOX_WITH_EXTPACK_PUEL
+-VBOX_WITH_EXTPACK_PUEL_BUILD = 1
+-## @}
+
+ ## @name Misc
+ ## @{
+@@ -777,14 +755,6 @@
+ # Skip stuff.
+ #
+
+-ifdef VBOX_ONLY_EXTPACKS
+- # Clear some VBOX_WITH_XXX variables instead of adding ifdefs all over the place.
+- VBOX_WITH_DEBUGGER =
+- VBOX_WITH_ADDITIONS =
+- VBOX_WITH_VBOXDRV =
+- VBOX_WITH_TESTCASES =
+-endif
+-
+ # VBOX_QUICK can be used by core developers to speed to the build
+ ifdef VBOX_QUICK
+ # undefine variables by assigning blank.
+@@ -848,7 +818,6 @@
+ VBOX_WITH_TESTSUITE=
+ VBOX_WITH_QTGUI=
+ VBOX_WITH_USB=
+- VBOX_WITH_EHCI=
+ VBOX_WITH_DOCS=
+ VBOX_WITH_PDM_ASYNC_COMPLETION=
+ VBOX_WITH_KCHMVIEWER=
+@@ -870,7 +839,6 @@
+ VBOX_WITH_CROGL=
+ VBOX_WITH_DEBUGGER=
+ VBOX_WITH_DOCS=
+- VBOX_WITH_EHCI=
+ VBOX_WITH_HARDENING=
+ VBOX_WITH_HEADLESS=
+ VBOX_WITH_HGCM=
+@@ -952,9 +920,6 @@
+ #
+ ifdef VBOX_OSE
+ VBOX_WITH_VRDP=
+- VBOX_WITH_EHCI_IMPL=
+- VBOX_WITH_EXTPACK_PUEL=
+- VBOX_WITH_EXTPACK_PUEL_BUILD=
+ VBOX_WITH_PCI_PASSTHROUGH_IMPL=
+ VBOX_WITH_OS2_ADDITIONS_BIN=
+ VBOX_WITH_SECURELABEL=
+@@ -1082,10 +1047,6 @@
+ VBOX_WITH_KCHMVIEWER=
+ endif
+
+-ifdef VBOX_WITH_EXTPACK_PUEL_BUILD
+- VBOX_WITH_EXTPACK_PUEL = 1
+-endif
+-
+ #
+ # Mark OSE builds clearly, helps figuring out limitations more easily.
+ #
+@@ -1679,9 +1640,6 @@
+ # biossums (set BIOS checksums)
+ VBOX_BIOSSUMS ?= $(PATH_OBJ)/biossums/biossums$(HOSTSUFF_EXE)
+
+-# RTManifest (extension pack manifest utility)
+-VBOX_RTMANIFEST ?= $(PATH_OBJ)/bldRTManifest/bldRTManifest$(HOSTSUFF_EXE)
+-
+ # filesplitter (splits java files)
+ VBOX_FILESPLIT ?= $(PATH_OBJ)/filesplitter/filesplitter$(HOSTSUFF_EXE)
+
+@@ -2461,13 +2419,6 @@
+ SDK_VBOX_OPENSSL2_LIBS = $(NO_SUCH_VARIABLE)
+ endif
+
+-SDK_VBoxOpenSslExtPack = Internal use only.
+-SDK_VBoxOpenSslExtPack_INCS = $(SDK_VBOX_OPENSSL_VBOX_DEFAULT_INCS)
+-SDK_VBoxOpenSslExtPack_ORDERDEPS = $(crypto-headers_1_TARGET)
+-SDK_VBoxOpenSslExtPack_LIBS = \
+- $(PATH_STAGE_LIB)/VBoxExtPack-libssl$(VBOX_SUFF_LIB) \
+- $(PATH_STAGE_LIB)/VBoxExtPack-libcrypto$(VBOX_SUFF_LIB)
+-
+ SDK_VBOX_BLD_OPENSSL = .
+ SDK_VBOX_BLD_OPENSSL_EXTENDS = VBOX_OPENSSL
+ SDK_VBOX_BLD_OPENSSL_LIBS ?= \
+@@ -3817,100 +3768,6 @@
+ endif
+ TEMPLATE_VBOXMAINCLIENTDLL_LDFLAGS.darwin = $(filter-out -bind_at_load,$(TEMPLATE_VBOXMAINCLIENTEXE_LDFLAGS.darwin))
+
+-
+-
+-#
+-# Templates used for building the extension packs.
+-#
+-ifdef VBOX_WITH_EXTPACK
+- # Base templates (native or portable).
+- TEMPLATE_VBoxR3ExtPack = For the ring-3 context extension pack modules.
+- if 1 # Native for now.
+- TEMPLATE_VBoxR3ExtPack_EXTENDS = VBOXR3DLLNOXCPT
+- TEMPLATE_VBoxR3ExtPack_DEFS = $(TEMPLATE_VBOXR3DLLNOXCPT_DEFS) VBOX_IN_EXTPACK VBOX_IN_EXTPACK_R3
+- else
+- TEMPLATE_VBoxR3ExtPack_EXTENDS = VBOXNOCRTGCC
+- TEMPLATE_VBoxR3ExtPack_DEFS = $(TEMPLATE_VBOXNOCRTGCC_DEFS) VBOX_IN_EXTPACK VBOX_IN_EXTPACK_R3 IPRT_NO_CRT IN_RING3
+- TEMPLATE_VBoxR3ExtPack_INCS = $(PATH_ROOT)/include/iprt/nocrt $(TEMPLATE_VBOXR3DLLNOXCPT_INCS)
+- endif
+- ifneq ($(KBUILD_TARGET),win)
+- TEMPLATE_VBoxR3ExtPack_CXXFLAGS = $(TEMPLATE_VBOXR3DLLNOXCPT_CXXFLAGS) -fno-rtti
+- endif
+- TEMPLATE_VBoxR3ExtPack_INST = $(INST_EXTPACK)YouShallOverrideThis/
+- ifeq ($(KBUILD_TARGET),linux)
+- TEMPLATE_VBoxR3ExtPack_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RUNPATH)' '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)', $(TEMPLATE_VBOXR3DLLNOXCPT_LDFLAGS))
+- else
+- if !defined(VBOX_WITH_RUNPATH) && defined(VBOX_WITH_RELATIVE_RUNPATH)
+- TEMPLATE_VBoxR3ExtPack_LDFLAGS = '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)/../../..' $(filter-out '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)', $(TEMPLATE_VBOXR3DLLNOXCPT_LDFLAGS))
+- endif
+- endif
+- ifdef VBOX_ONLY_EXTPACKS_USE_IMPLIBS
+- if1of ($(KBUILD_TARGET), win os2)
+- TEMPLATE_VBoxR3ExtPack_LIBS = \
+- $(TEMPLATE_LIBS_VBOXR3) \
+- $(PATH_STAGE_LIB)/VMMR3Imp$(VBOX_SUFF_LIB) \
+- $(PATH_STAGE_LIB)/VBoxRTImp$(VBOX_SUFF_LIB)
+- else
+- TEMPLATE_VBoxR3ExtPack_LIBS = \
+- $(TEMPLATE_LIBS_VBOXR3) \
+- $(PATH_STAGE_LIB)/VMMR3Imp$(VBOX_SUFF_DLL) \
+- $(PATH_STAGE_LIB)/VBoxRTImp$(VBOX_SUFF_DLL)
+- endif
+- else
+- TEMPLATE_VBoxR3ExtPack_LIBS = \
+- $(TEMPLATE_LIBS_VBOXR3) \
+- $(LIB_RUNTIME) \
+- $(LIB_VMM)
+- endif
+-
+- TEMPLATE_VBoxR0ExtPack = For the ring-0 context extension pack modules.
+- TEMPLATE_VBoxR0ExtPack_EXTENDS = VBoxR0
+- TEMPLATE_VBoxR0ExtPack_EXTENDS_BY = appending
+- TEMPLATE_VBoxR0ExtPack_INST = $(INST_EXTPACK)YouShallOverrideThis/
+- TEMPLATE_VBoxR0ExtPack_DEFS = VBOX_IN_EXTPACK VBOX_IN_EXTPACK_R0
+- if1of ($(VBOX_LDR_FMT), pe lx)
+- TEMPLATE_VBoxR0ExtPack_LIBS = \
+- $(PATH_STAGE_LIB)/VMMR0Imp$(VBOX_SUFF_LIB) \
+- $(PATH_STAGE_LIB)/SUPR0$(VBOX_SUFF_LIB)
+- endif
+-
+- TEMPLATE_VBoxRcExtPack = For the raw-mode context extension pack modules.
+- TEMPLATE_VBoxRcExtPack_EXTENDS = VBoxRc
+- TEMPLATE_VBoxRcExtPack_EXTENDS_BY = appending
+- TEMPLATE_VBoxRcExtPack_SYSSUFF = .rc
+- TEMPLATE_VBoxRcExtPack_INST = $(INST_EXTPACK)YouShallOverrideThis/
+- TEMPLATE_VBoxRcExtPack_DEFS = VBOX_IN_EXTPACK VBOX_IN_EXTPACK_RC
+- if1of ($(VBOX_LDR_FMT32), pe lx)
+- TEMPLATE_VBoxRcExtPack_LIBS = \
+- $(PATH_STAGE_LIB)/VMMRCBuiltin$(VBOX_SUFF_LIB) \
+- $(PATH_STAGE_LIB)/VMMRCImp$(VBOX_SUFF_LIB)
+- endif
+-
+- TEMPLATE_VBoxInsExtPack = For the install targets of an extension pack.
+- TEMPLATE_VBoxInsExtPack_MODE = 0644
+- TEMPLATE_VBoxInsExtPack_INST = $(INST_EXTPACK)YouShallOverrideThis/
+-
+- # For each individual extension pack
+- ifdef VBOX_WITH_EXTPACK_PUEL
+- TEMPLATE_VBoxR3ExtPackPuel = For the ring-3 context modules in the PUEL extension pack.
+- TEMPLATE_VBoxR3ExtPackPuel_EXTENDS = VBoxR3ExtPack
+- TEMPLATE_VBoxR3ExtPackPuel_INST = $(INST_EXTPACK_PUEL)$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)/
+-
+- TEMPLATE_VBoxR0ExtPackPuel = For the ring-0 context modules in the PUEL extension pack.
+- TEMPLATE_VBoxR0ExtPackPuel_EXTENDS = VBoxR0ExtPack
+- TEMPLATE_VBoxR0ExtPackPuel_INST = $(INST_EXTPACK_PUEL)$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)/
+-
+- TEMPLATE_VBoxRcExtPackPuel = For the raw-mode context modules in the PUEL extension pack.
+- TEMPLATE_VBoxRcExtPackPuel_EXTENDS = VBoxRcExtPack
+- TEMPLATE_VBoxRcExtPackPuel_INST = $(INST_EXTPACK_PUEL)$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)/
+-
+- TEMPLATE_VBoxInsExtPackPuel = For the install targets of an extension pack.
+- TEMPLATE_VBoxInsExtPackPuel_EXTENDS = VBoxR0ExtPack
+- TEMPLATE_VBoxInsExtPackPuel_INST = $(INST_EXTPACK_PUEL)
+-endif
+-endif # VBOX_WITH_EXTPACK
+-
+-
+ #
+ # Qt 4
+ # Qt 4
+--- VirtualBox-4.1.18.orig/Makefile.kmk 2012-07-24 17:16:47.078929150 -0300
++++ VirtualBox-4.1.18/Makefile.kmk 2012-07-24 17:16:47.125592981 -0300
+@@ -446,7 +446,6 @@
+ include/VBox \
+ include/VBox/vmm \
+ include/VBox/com \
+- include/VBox/ExtPack \
+ include/VBox/HostServices \
+ include/VBox/GuestHost \
+ include/VBox/HGSMI \
+@@ -862,191 +861,6 @@
+ additions-build-linux.x86.combined \
+ additions-packing
+
+-
+-#
+-# Build the extension packs, all of them.
+-#
+-# This is tailored (hardcoded) for the extension pack build box.
+-#
+-# The fetching must be done in serial fashion, while the building should be
+-# more flexible wrt to -jN.
+-#
+-extpacks-fetch:
+- + $(KMK) -C tools fetch VBOX_ONLY_EXTPACKS=1
+- + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=amd64 KBUILD_TARGET=darwin BUILD_TARGET_ARCH=amd64 BUILD_TARGET=darwin VBOX_ONLY_EXTPACKS=1
+- + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=darwin BUILD_TARGET_ARCH=x86 BUILD_TARGET=darwin VBOX_ONLY_EXTPACKS=1
+-# + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=amd64 KBUILD_TARGET=freebsd BUILD_TARGET_ARCH=amd64 BUILD_TARGET=freebsd VBOX_ONLY_EXTPACKS=1
+-# + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=freebsd BUILD_TARGET_ARCH=x86 BUILD_TARGET=freebsd VBOX_ONLY_EXTPACKS=1
+- + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=amd64 KBUILD_TARGET=linux BUILD_TARGET_ARCH=amd64 BUILD_TARGET=linux VBOX_ONLY_EXTPACKS=1
+- + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=linux BUILD_TARGET_ARCH=x86 BUILD_TARGET=linux VBOX_ONLY_EXTPACKS=1
+-# + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=os2 BUILD_TARGET_ARCH=x86 BUILD_TARGET=os2 VBOX_ONLY_EXTPACKS=1
+- + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=amd64 KBUILD_TARGET=solaris BUILD_TARGET_ARCH=amd64 BUILD_TARGET=solaris VBOX_ONLY_EXTPACKS=1
+- + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=solaris BUILD_TARGET_ARCH=x86 BUILD_TARGET=solaris VBOX_ONLY_EXTPACKS=1
+- + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=amd64 KBUILD_TARGET=win BUILD_TARGET_ARCH=amd64 BUILD_TARGET=win VBOX_ONLY_EXTPACKS=1
+- + $(KMK) -C tools fetch KBUILD_TARGET_ARCH=x86 KBUILD_TARGET=win BUILD_TARGET_ARCH=x86 BUILD_TARGET=win VBOX_ONLY_EXTPACKS=1
+-
+-
+-extpacks-build: \
+- extpacks-build-win.amd64 \
+- extpacks-build-win.x86 \
+- extpacks-build-solaris.amd64 \
+- extpacks-build-solaris.x86 \
+- extpacks-build-os2.x86 \
+- extpacks-build-linux.amd64 \
+- extpacks-build-linux.x86 \
+- extpacks-build-darwin.amd64 \
+- extpacks-build-darwin.x86 \
+- extpacks-build-freebsd.amd64 \
+- extpacks-build-freebsd.x86
+-
+-VBOX_EXTPACKS_BUILD.amd64 = VBOX_ONLY_EXTPACKS=1 \
+- KBUILD_TYPE=$(KBUILD_TYPE) BUILD_TYPE=$(KBUILD_TYPE) \
+- KBUILD_TARGET_ARCH=amd64 BUILD_TARGET_ARCH=amd64 \
+- VBOX_SVN_REV=$(VBOX_SVN_REV)
+-
+-VBOX_EXTPACKS_BUILD.x86 = VBOX_ONLY_EXTPACKS=1 \
+- KBUILD_TYPE=$(KBUILD_TYPE) BUILD_TYPE=$(KBUILD_TYPE) \
+- KBUILD_TARGET_ARCH=x86 BUILD_TARGET_ARCH=x86 \
+- VBOX_SVN_REV=$(VBOX_SVN_REV)
+-
+-# Automatically determine the extpack build subdir name. Used for figuring out
+-# directory names inside the extension pack building VMs.
+-VBOX_EXTPACKS_BUILD_SUBDIRNAME := $(lastword $(subst /, ,$(PATH_ROOT)))
+-
+-# When building in parallel on a Windows host, make sure we finish the host
+-# bit before kicking off any UNIX guest or we'll run into file sharing issues.
+-ifeq ($(KBUILD_TARGET),win)
+-VBOX_EXTPACKS_BUILD_WIN_HOST_FIRST = extpacks-build-win.x86 extpacks-build-win.amd64
+-else
+-VBOX_EXTPACKS_BUILD_WIN_HOST_FIRST =
+-endif
+-
+-extpacks-build-win.amd64:
+-ifeq ($(KBUILD_TARGET),win)
+- + $(VBOX_KMK_TIME) $(KMK) $(VBOX_EXTPACKS_BUILD.amd64) all $(VBOX_EXTPACKS_HOST_BUILD_TWEAK)
+-else
+- $(call MSG_L1,Building Windows/amd64 extension packs)
+- $(VBOX_KMK_TIME) ssh vbox@192.168.27.6 " echo $@ && cd e:/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME) && tools/env.sh kmk $(VBOX_EXTPACKS_BUILD.amd64) all"
+-endif
+-
+-extpacks-build-win.x86:
+-ifeq ($(KBUILD_TARGET),win)
+- + $(VBOX_KMK_TIME) $(KMK) $(VBOX_EXTPACKS_BUILD.x86) all $(VBOX_EXTPACKS_HOST_BUILD_TWEAK)
+-else
+- $(call MSG_L1,Building Windows/x86 extension packs)
+- $(VBOX_KMK_TIME) ssh vbox@192.168.27.16 " echo $@ && cd e:/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME) && tools/env.sh kmk $(VBOX_EXTPACKS_BUILD.x86) all"
+-endif
+-
+-ifeq ($(KBUILD_TARGET),solaris)
+-extpacks-build-solaris.amd64:
+- + $(VBOX_KMK_TIME) $(KMK) $(VBOX_EXTPACKS_BUILD.amd64) all $(VBOX_EXTPACKS_HOST_BUILD_TWEAK)
+-
+-extpacks-build-solaris.x86: extpacks-build-solaris.amd64
+- + $(VBOX_KMK_TIME) $(KMK) $(VBOX_EXTPACKS_BUILD.x86) VBOX_WITH_COMBINED_SOLARIS_GUEST_PACKAGE=1 all $(VBOX_EXTPACKS_HOST_BUILD_TWEAK)
+-
+-else
+-# Serialize 32-bit and 64-bit ASSUMING the same VM builds both.
+-extpacks-build-solaris.rsync-into-vm: $(VBOX_EXTPACKS_BUILD_WIN_HOST_FIRST)
+- $(VBOX_KMK_TIME) $(call VBOX_RSYNC_IN_FN,solaris,*) . 192.168.27.4:/mnt/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME)
+-
+-extpacks-build-solaris.build-it: extpacks-build-solaris.rsync-into-vm
+- $(call MSG_L1,Building Solaris/amd64 extension packs)
+- $(VBOX_KMK_TIME) ssh vbox@192.168.27.4 " echo $@/amd64 && cd /mnt/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_EXTPACKS_BUILD.amd64) all"
+- $(call MSG_L1,Building Solaris/x86 extension packs)
+- $(VBOX_KMK_TIME) ssh vbox@192.168.27.4 " echo $@/x86 && cd /mnt/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_EXTPACKS_BUILD.x86) all"
+-
+-extpacks-build-solaris.rsync-out-of-vm: extpacks-build-solaris.build-it
+- $(VBOX_KMK_TIME) rsync -a --delete 192.168.27.4:/mnt/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME)/out/solaris.x86 out/
+- $(VBOX_KMK_TIME) rsync -a --delete 192.168.27.4:/mnt/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME)/out/solaris.amd64 out/
+-
+-.NOTPARALLEL: extpacks-build-solaris.rsync-out-of-vm extpacks-build-solaris.rsync-into-vm
+-.PHONY: extpacks-build-solaris.rsync-out-of-vm extpacks-build-solaris.rsync-into-vm extpacks-build-solaris.build-it
+-
+-extpacks-build-solaris.amd64: extpacks-build-solaris.rsync-out-of-vm
+-extpacks-build-solaris.x86: extpacks-build-solaris.rsync-out-of-vm
+-endif
+-
+-extpacks-build-os2.x86:
+-#ifeq ($(KBUILD_TARGET),os2)
+-# + $(VBOX_KMK_TIME) $(KMK) $(VBOX_EXTPACKS_BUILD.x86) all $(VBOX_EXTPACKS_HOST_BUILD_TWEAK)
+-#else
+-# $(VBOX_KMK_TIME) ssh vbox@192.168.27.3 " cd /mnt/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_EXTPACKS_BUILD.x86) "
+-#endif
+-
+-extpacks-build-linux.amd64: $(VBOX_EXTPACKS_BUILD_WIN_HOST_FIRST)
+-ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),linux.amd64)
+- + $(VBOX_KMK_TIME) $(KMK) $(VBOX_EXTPACKS_BUILD.amd64) all $(VBOX_EXTPACKS_HOST_BUILD_TWEAK)
+-else
+- $(call MSG_L1,Building Linux/amd64 extension packs)
+- $(VBOX_KMK_TIME) ssh vbox@192.168.27.12 " echo $@ && cd /mnt/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_EXTPACKS_BUILD.amd64) all"
+-endif
+-
+-extpacks-build-linux.x86: $(VBOX_EXTPACKS_BUILD_WIN_HOST_FIRST)
+-ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),linux.x86)
+- + $(VBOX_KMK_TIME) $(KMK) $(VBOX_EXTPACKS_BUILD.x86) all $(VBOX_EXTPACKS_HOST_BUILD_TWEAK)
+-else
+- $(call MSG_L1,Building Linux/x86 extension packs)
+- $(VBOX_KMK_TIME) ssh vbox@192.168.27.11 " echo $@ && cd /mnt/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_EXTPACKS_BUILD.x86) all"
+-endif
+-
+-extpacks-build-freebsd.amd64: $(VBOX_EXTPACKS_BUILD_WIN_HOST_FIRST)
+-#ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),freebsd.amd64)
+-# + $(VBOX_KMK_TIME) $(KMK) $(VBOX_EXTPACKS_BUILD.amd64) all $(VBOX_EXTPACKS_HOST_BUILD_TWEAK)
+-#else
+-# $(call MSG_L1,Building FreeBSD/amd64 extension packs)
+-# $(VBOX_KMK_TIME) ssh vbox@192.168.27.17 " echo $@ && cd /mnt/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_EXTPACKS_BUILD.amd64) all"
+-#endif
+-
+-extpacks-build-freebsd.x86: $(VBOX_EXTPACKS_BUILD_WIN_HOST_FIRST)
+-#ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),freebsd.x86)
+-# + $(VBOX_KMK_TIME) $(KMK) $(VBOX_EXTPACKS_BUILD.x86) all $(VBOX_EXTPACKS_HOST_BUILD_TWEAK)
+-#else
+-# $(call MSG_L1,Building FreeBSD/x86 extension packs)
+-# $(VBOX_KMK_TIME) ssh vbox@192.168.27.7 " echo $@ && cd /mnt/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_EXTPACKS_BUILD.x86) all"
+-#endif
+-
+-extpacks-build-darwin.amd64: $(VBOX_EXTPACKS_BUILD_WIN_HOST_FIRST)
+-ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),darwin.amd64)
+- + $(VBOX_KMK_TIME) $(KMK) $(VBOX_EXTPACKS_BUILD.amd64) all $(VBOX_EXTPACKS_HOST_BUILD_TWEAK)
+-else
+- $(call MSG_L1,Building Darwin/amd64 extension packs)
+- $(VBOX_KMK_TIME) $(call VBOX_RSYNC_IN_FN,darwin,amd64) . 192.168.27.15:/Users/vbox/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME)
+- $(VBOX_KMK_TIME) ssh vbox@192.168.27.15 " echo $@ && cd /Users/vbox/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_EXTPACKS_BUILD.amd64) all"
+- $(VBOX_KMK_TIME) rsync -am -v --delete 192.168.27.15:/Users/vbox/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME)/out/darwin.amd64 out/
+-endif
+-
+-extpacks-build-darwin.x86: $(VBOX_EXTPACKS_BUILD_WIN_HOST_FIRST)
+-ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),darwin.x86)
+- + $(VBOX_KMK_TIME) $(KMK) $(VBOX_EXTPACKS_BUILD.x86) all $(VBOX_EXTPACKS_HOST_BUILD_TWEAK)
+-else
+- $(call MSG_L1,Building Darwin/x86 extension packs)
+- $(VBOX_KMK_TIME) $(call VBOX_RSYNC_IN_FN,darwin,x86) . 192.168.27.5:/Users/vbox/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME)
+- $(VBOX_KMK_TIME) ssh vbox@192.168.27.5 " echo $@ && cd /Users/vbox/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME) && tools/env.sh --no-wine kmk $(VBOX_EXTPACKS_BUILD.x86) all"
+- $(VBOX_KMK_TIME) rsync -am -v --delete 192.168.27.5:/Users/vbox/tinderbox/$(VBOX_EXTPACKS_BUILD_SUBDIRNAME)/out/darwin.x86 out/
+-endif
+-
+-
+-extpacks-packing:
+- + $(KMK) VBOX_ONLY_EXTPACKS=1 \
+- VBOX_WITH_EXTPACK_OS_ARCHS="darwin.amd64 darwin.x86 linux.amd64 linux.x86 solaris.amd64 solaris.x86 win.amd64 win.x86" \
+- packing
+-# +++ freebsd.amd64 freebsd.x86 os2.x86 ^^^
+-
+-.PHONY: \
+- extpacks-build-win.x86 \
+- extpacks-build-win.amd64 \
+- extpacks-build-solaris.amd64 \
+- extpacks-build-solaris.x86 \
+- extpacks-build-os2.x86 \
+- extpacks-build-linux.amd64 \
+- extpacks-build-linux.x86 \
+- extpacks-build-freebsd.amd64 \
+- extpacks-build-freebsd.x86 \
+- extpacks-build-darwin.amd64 \
+- extpacks-build-darwin.x86 \
+- extpacks-packing
+-
+-
+ #
+ # Build the test suite, all of it.
+ #
+--- VirtualBox-4.1.18.orig/src/VBox/Devices/build/VBoxDD.cpp 2012-06-20 10:15:51.000000000 -0300
++++ VirtualBox-4.1.18/src/VBox/Devices/build/VBoxDD.cpp 2012-07-24 16:18:03.964493454 -0300
+@@ -132,11 +132,6 @@
+ if (RT_FAILURE(rc))
+ return rc;
+ #endif
+-#ifdef VBOX_WITH_EHCI_IMPL
+- rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceEHCI);
+- if (RT_FAILURE(rc))
+- return rc;
+-#endif
+ #ifdef VBOX_ACPI
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceACPI);
+ if (RT_FAILURE(rc))
+--- VirtualBox-4.1.18.orig/src/VBox/Devices/build/VBoxDD.h 2012-06-20 10:15:51.000000000 -0300
++++ VirtualBox-4.1.18/src/VBox/Devices/build/VBoxDD.h 2012-07-24 16:20:35.939205389 -0300
+@@ -62,7 +62,6 @@
+ extern const PDMDEVREG g_DeviceICH6_HDA;
+ extern const PDMDEVREG g_DeviceAudioSniffer;
+ extern const PDMDEVREG g_DeviceOHCI;
+-extern const PDMDEVREG g_DeviceEHCI;
+ extern const PDMDEVREG g_DeviceACPI;
+ extern const PDMDEVREG g_DeviceDMA;
+ extern const PDMDEVREG g_DeviceFloppyController;
+--- VirtualBox-4.1.18.orig/src/VBox/Main/include/ExtPackManagerImpl.h 2012-06-20 10:17:33.000000000 -0300
++++ /dev/null 2012-07-24 14:48:18.638572110 -0300
+@@ -1,245 +0,0 @@
+-/* $Id: ExtPackManagerImpl.h $ */
+-/** @file
+- * VirtualBox Main - interface for Extension Packs, VBoxSVC & VBoxC.
+- */
+-
+-/*
+- * Copyright (C) 2010 Oracle Corporation
+- *
+- * This file is part of VirtualBox Open Source Edition (OSE), as
+- * available from http://www.virtualbox.org. This file is free software;
+- * you can redistribute it and/or modify it under the terms of the GNU
+- * General Public License (GPL) as published by the Free Software
+- * Foundation, in version 2 as it comes in the "COPYING" file of the
+- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+- */
+-
+-#ifndef ____H_EXTPACKMANAGERIMPL
+-#define ____H_EXTPACKMANAGERIMPL
+-
+-#include "VirtualBoxBase.h"
+-#include <VBox/ExtPack/ExtPack.h>
+-#include <iprt/fs.h>
+-
+-/**
+- * An extension pack file.
+- */
+-class ATL_NO_VTABLE ExtPackFile :
+- public VirtualBoxBase,
+- VBOX_SCRIPTABLE_IMPL(IExtPackFile)
+-{
+-public:
+- /** @name COM and internal init/term/mapping cruft.
+- * @{ */
+- VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(ExtPackFile, IExtPackFile)
+- DECLARE_NOT_AGGREGATABLE(ExtPackFile)
+- DECLARE_PROTECT_FINAL_CONSTRUCT()
+- BEGIN_COM_MAP(ExtPackFile)
+- VBOX_DEFAULT_INTERFACE_ENTRIES(IExtPackFile)
+- COM_INTERFACE_ENTRY(IExtPackBase)
+- END_COM_MAP()
+- DECLARE_EMPTY_CTOR_DTOR(ExtPackFile)
+-
+- HRESULT FinalConstruct();
+- void FinalRelease();
+- HRESULT initWithFile(const char *a_pszFile, const char *a_pszDigest, class ExtPackManager *a_pExtPackMgr, VirtualBox *a_pVirtualBox);
+- void uninit();
+- RTMEMEF_NEW_AND_DELETE_OPERATORS();
+- /** @} */
+-
+- /** @name IExtPackBase interfaces
+- * @{ */
+- STDMETHOD(COMGETTER(Name))(BSTR *a_pbstrName);
+- STDMETHOD(COMGETTER(Description))(BSTR *a_pbstrDescription);
+- STDMETHOD(COMGETTER(Version))(BSTR *a_pbstrVersion);
+- STDMETHOD(COMGETTER(Revision))(ULONG *a_puRevision);
+- STDMETHOD(COMGETTER(VRDEModule))(BSTR *a_pbstrVrdeModule);
+- STDMETHOD(COMGETTER(PlugIns))(ComSafeArrayOut(IExtPackPlugIn *, a_paPlugIns));
+- STDMETHOD(COMGETTER(Usable))(BOOL *a_pfUsable);
+- STDMETHOD(COMGETTER(WhyUnusable))(BSTR *a_pbstrWhy);
+- STDMETHOD(COMGETTER(ShowLicense))(BOOL *a_pfShowIt);
+- STDMETHOD(COMGETTER(License))(BSTR *a_pbstrHtmlLicense);
+- STDMETHOD(QueryLicense)(IN_BSTR a_bstrPreferredLocale, IN_BSTR a_bstrPreferredLanguage,
+- IN_BSTR a_bstrFormat, BSTR *a_pbstrLicense);
+- /** @} */
+-
+- /** @name IExtPackFile interfaces
+- * @{ */
+- STDMETHOD(COMGETTER(FilePath))(BSTR *a_pbstrPath);
+- STDMETHOD(Install)(BOOL a_fReplace, IN_BSTR a_bstrDisplayInfo, IProgress **a_ppProgress);
+- /** @} */
+-
+-private:
+- /** @name Misc init helpers
+- * @{ */
+- HRESULT initFailed(const char *a_pszWhyFmt, ...);
+- /** @} */
+-
+-private:
+- struct Data;
+- /** Pointer to the private instance. */
+- Data *m;
+-
+- friend class ExtPackManager;
+-};
+-
+-
+-/**
+- * An installed extension pack.
+- */
+-class ATL_NO_VTABLE ExtPack :
+- public VirtualBoxBase,
+- VBOX_SCRIPTABLE_IMPL(IExtPack)
+-{
+-public:
+- /** @name COM and internal init/term/mapping cruft.
+- * @{ */
+- VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(ExtPack, IExtPack)
+- DECLARE_NOT_AGGREGATABLE(ExtPack)
+- DECLARE_PROTECT_FINAL_CONSTRUCT()
+- BEGIN_COM_MAP(ExtPack)
+- VBOX_DEFAULT_INTERFACE_ENTRIES(IExtPack)
+- COM_INTERFACE_ENTRY(IExtPackBase)
+- END_COM_MAP()
+- DECLARE_EMPTY_CTOR_DTOR(ExtPack)
+-
+- HRESULT FinalConstruct();
+- void FinalRelease();
+- HRESULT initWithDir(VBOXEXTPACKCTX a_enmContext, const char *a_pszName, const char *a_pszDir);
+- void uninit();
+- RTMEMEF_NEW_AND_DELETE_OPERATORS();
+- /** @} */
+-
+- /** @name IExtPackBase interfaces
+- * @{ */
+- STDMETHOD(COMGETTER(Name))(BSTR *a_pbstrName);
+- STDMETHOD(COMGETTER(Description))(BSTR *a_pbstrDescription);
+- STDMETHOD(COMGETTER(Version))(BSTR *a_pbstrVersion);
+- STDMETHOD(COMGETTER(Revision))(ULONG *a_puRevision);
+- STDMETHOD(COMGETTER(VRDEModule))(BSTR *a_pbstrVrdeModule);
+- STDMETHOD(COMGETTER(PlugIns))(ComSafeArrayOut(IExtPackPlugIn *, a_paPlugIns));
+- STDMETHOD(COMGETTER(Usable))(BOOL *a_pfUsable);
+- STDMETHOD(COMGETTER(WhyUnusable))(BSTR *a_pbstrWhy);
+- STDMETHOD(COMGETTER(ShowLicense))(BOOL *a_pfShowIt);
+- STDMETHOD(COMGETTER(License))(BSTR *a_pbstrHtmlLicense);
+- STDMETHOD(QueryLicense)(IN_BSTR a_bstrPreferredLocale, IN_BSTR a_bstrPreferredLanguage,
+- IN_BSTR a_bstrFormat, BSTR *a_pbstrLicense);
+- /** @} */
+-
+- /** @name IExtPack interfaces
+- * @{ */
+- STDMETHOD(QueryObject)(IN_BSTR a_bstrObjectId, IUnknown **a_ppUnknown);
+- /** @} */
+-
+- /** @name Internal interfaces used by ExtPackManager.
+- * @{ */
+- bool callInstalledHook(IVirtualBox *a_pVirtualBox, AutoWriteLock *a_pLock, PRTERRINFO pErrInfo);
+- HRESULT callUninstallHookAndClose(IVirtualBox *a_pVirtualBox, bool a_fForcedRemoval);
+- bool callVirtualBoxReadyHook(IVirtualBox *a_pVirtualBox, AutoWriteLock *a_pLock);
+- bool callConsoleReadyHook(IConsole *a_pConsole, AutoWriteLock *a_pLock);
+- bool callVmCreatedHook(IVirtualBox *a_pVirtualBox, IMachine *a_pMachine, AutoWriteLock *a_pLock);
+- bool callVmConfigureVmmHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock, int *a_pvrc);
+- bool callVmPowerOnHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock, int *a_pvrc);
+- bool callVmPowerOffHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock);
+- HRESULT checkVrde(void);
+- HRESULT getVrdpLibraryName(Utf8Str *a_pstrVrdeLibrary);
+- bool wantsToBeDefaultVrde(void) const;
+- HRESULT refresh(bool *pfCanDelete);
+- /** @} */
+-
+-protected:
+- /** @name Internal helper methods.
+- * @{ */
+- void probeAndLoad(void);
+- bool findModule(const char *a_pszName, const char *a_pszExt, VBOXEXTPACKMODKIND a_enmKind,
+- Utf8Str *a_ppStrFound, bool *a_pfNative, PRTFSOBJINFO a_pObjInfo) const;
+- static bool objinfoIsEqual(PCRTFSOBJINFO pObjInfo1, PCRTFSOBJINFO pObjInfo2);
+- /** @} */
+-
+- /** @name Extension Pack Helpers
+- * @{ */
+- static DECLCALLBACK(int) hlpFindModule(PCVBOXEXTPACKHLP pHlp, const char *pszName, const char *pszExt,
+- VBOXEXTPACKMODKIND enmKind, char *pszFound, size_t cbFound, bool *pfNative);
+- static DECLCALLBACK(int) hlpGetFilePath(PCVBOXEXTPACKHLP pHlp, const char *pszFilename, char *pszPath, size_t cbPath);
+- static DECLCALLBACK(VBOXEXTPACKCTX) hlpGetContext(PCVBOXEXTPACKHLP pHlp);
+- static DECLCALLBACK(int) hlpReservedN(PCVBOXEXTPACKHLP pHlp);
+- /** @} */
+-
+-private:
+- struct Data;
+- /** Pointer to the private instance. */
+- Data *m;
+-
+- friend class ExtPackManager;
+-};
+-
+-
+-/**
+- * Extension pack manager.
+- */
+-class ATL_NO_VTABLE ExtPackManager :
+- public VirtualBoxBase,
+- VBOX_SCRIPTABLE_IMPL(IExtPackManager)
+-{
+- /** @name COM and internal init/term/mapping cruft.
+- * @{ */
+- VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(ExtPackManager, IExtPackManager)
+- DECLARE_NOT_AGGREGATABLE(ExtPackManager)
+- DECLARE_PROTECT_FINAL_CONSTRUCT()
+- BEGIN_COM_MAP(ExtPackManager)
+- VBOX_DEFAULT_INTERFACE_ENTRIES(IExtPackManager)
+- END_COM_MAP()
+- DECLARE_EMPTY_CTOR_DTOR(ExtPackManager)
+-
+- HRESULT FinalConstruct();
+- void FinalRelease();
+- HRESULT initExtPackManager(VirtualBox *a_pVirtualBox, VBOXEXTPACKCTX a_enmContext);
+- void uninit();
+- RTMEMEF_NEW_AND_DELETE_OPERATORS();
+- /** @} */
+-
+- /** @name IExtPack interfaces
+- * @{ */
+- STDMETHOD(COMGETTER(InstalledExtPacks))(ComSafeArrayOut(IExtPack *, a_paExtPacks));
+- STDMETHOD(Find)(IN_BSTR a_bstrName, IExtPack **a_pExtPack);
+- STDMETHOD(OpenExtPackFile)(IN_BSTR a_bstrTarball, IExtPackFile **a_ppExtPackFile);
+- STDMETHOD(Uninstall)(IN_BSTR a_bstrName, BOOL a_fForcedRemoval, IN_BSTR a_bstrDisplayInfo, IProgress **a_ppProgress);
+- STDMETHOD(Cleanup)(void);
+- STDMETHOD(QueryAllPlugInsForFrontend)(IN_BSTR a_bstrFrontend, ComSafeArrayOut(BSTR, a_pabstrPlugInModules));
+- STDMETHOD(IsExtPackUsable(IN_BSTR a_bstrExtPack, BOOL *aUsable));
+- /** @} */
+-
+- /** @name Internal interfaces used by other Main classes.
+- * @{ */
+- static DECLCALLBACK(int) doInstallThreadProc(RTTHREAD hThread, void *pvJob);
+- HRESULT doInstall(ExtPackFile *a_pExtPackFile, bool a_fReplace, Utf8Str const *a_pstrDisplayInfo);
+- static DECLCALLBACK(int) doUninstallThreadProc(RTTHREAD hThread, void *pvJob);
+- HRESULT doUninstall(const Utf8Str *a_pstrName, bool a_fForcedRemoval, const Utf8Str *a_pstrDisplayInfo);
+- void callAllVirtualBoxReadyHooks(void);
+- void callAllConsoleReadyHooks(IConsole *a_pConsole);
+- void callAllVmCreatedHooks(IMachine *a_pMachine);
+- int callAllVmConfigureVmmHooks(IConsole *a_pConsole, PVM a_pVM);
+- int callAllVmPowerOnHooks(IConsole *a_pConsole, PVM a_pVM);
+- void callAllVmPowerOffHooks(IConsole *a_pConsole, PVM a_pVM);
+- HRESULT checkVrdeExtPack(Utf8Str const *a_pstrExtPack);
+- int getVrdeLibraryPathForExtPack(Utf8Str const *a_pstrExtPack, Utf8Str *a_pstrVrdeLibrary);
+- HRESULT getDefaultVrdeExtPack(Utf8Str *a_pstrExtPack);
+- bool isExtPackUsable(const char *a_pszExtPack);
+- void dumpAllToReleaseLog(void);
+- /** @} */
+-
+-private:
+- HRESULT runSetUidToRootHelper(Utf8Str const *a_pstrDisplayInfo, const char *a_pszCommand, ...);
+- ExtPack *findExtPack(const char *a_pszName);
+- void removeExtPack(const char *a_pszName);
+- HRESULT refreshExtPack(const char *a_pszName, bool a_fUnsuableIsError, ExtPack **a_ppExtPack);
+-
+-private:
+- struct Data;
+- /** Pointer to the private instance. */
+- Data *m;
+-};
+-
+-#endif
+-/* vi: set tabstop=4 shiftwidth=4 expandtab: */
+--- VirtualBox-4.1.18.orig/src/VBox/Main/include/ExtPackUtil.h 2012-06-20 10:17:33.000000000 -0300
++++ /dev/null 2012-07-24 14:48:18.638572110 -0300
+@@ -1,137 +0,0 @@
+-/* $Id: ExtPackUtil.h $ */
+-/** @file
+- * VirtualBox Main - Extension Pack Utilities and definitions, VBoxC, VBoxSVC, ++.
+- */
+-
+-/*
+- * Copyright (C) 2010 Oracle Corporation
+- *
+- * This file is part of VirtualBox Open Source Edition (OSE), as
+- * available from http://www.virtualbox.org. This file is free software;
+- * you can redistribute it and/or modify it under the terms of the GNU
+- * General Public License (GPL) as published by the Free Software
+- * Foundation, in version 2 as it comes in the "COPYING" file of the
+- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+- */
+-
+-#ifndef ____H_EXTPACKUTIL
+-#define ____H_EXTPACKUTIL
+-
+-#include <iprt/cpp/ministring.h>
+-#include <iprt/fs.h>
+-#include <iprt/vfs.h>
+-
+-
+-/** @name VBOX_EXTPACK_DESCRIPTION_NAME
+- * The name of the description file in an extension pack. */
+-#define VBOX_EXTPACK_DESCRIPTION_NAME "ExtPack.xml"
+-/** @name VBOX_EXTPACK_DESCRIPTION_NAME
+- * The name of the manifest file in an extension pack. */
+-#define VBOX_EXTPACK_MANIFEST_NAME "ExtPack.manifest"
+-/** @name VBOX_EXTPACK_SIGNATURE_NAME
+- * The name of the signature file in an extension pack. */
+-#define VBOX_EXTPACK_SIGNATURE_NAME "ExtPack.signature"
+-/** @name VBOX_EXTPACK_LICENSE_NAME_PREFIX
+- * The name prefix of a license file in an extension pack. There can be
+- * several license files in a pack, the variations being on locale, language
+- * and format (HTML, RTF, plain text). All extension packages shall include
+- * a */
+-#define VBOX_EXTPACK_LICENSE_NAME_PREFIX "ExtPack-license"
+-/** @name VBOX_EXTPACK_SUFFIX
+- * The suffix of a extension pack tarball. */
+-#define VBOX_EXTPACK_SUFFIX ".vbox-extpack"
+-
+-/** The minimum length (strlen) of a extension pack name. */
+-#define VBOX_EXTPACK_NAME_MIN_LEN 3
+-/** The max length (strlen) of a extension pack name. */
+-#define VBOX_EXTPACK_NAME_MAX_LEN 64
+-
+-/** The architecture-dependent application data subdirectory where the
+- * extension packs are installed. Relative to RTPathAppPrivateArch. */
+-#define VBOX_EXTPACK_INSTALL_DIR "ExtensionPacks"
+-/** The architecture-independent application data subdirectory where the
+- * certificates are installed. Relative to RTPathAppPrivateNoArch. */
+-#define VBOX_EXTPACK_CERT_DIR "ExtPackCertificates"
+-
+-/** The maximum entry name length.
+- * Play short and safe. */
+-#define VBOX_EXTPACK_MAX_MEMBER_NAME_LENGTH 128
+-
+-
+-/**
+- * Plug-in descriptor.
+- */
+-typedef struct VBOXEXTPACKPLUGINDESC
+-{
+- /** The name. */
+- RTCString strName;
+- /** The module name. */
+- RTCString strModule;
+- /** The description. */
+- RTCString strDescription;
+- /** The frontend or component which it plugs into. */
+- RTCString strFrontend;
+-} VBOXEXTPACKPLUGINDESC;
+-/** Pointer to a plug-in descriptor. */
+-typedef VBOXEXTPACKPLUGINDESC *PVBOXEXTPACKPLUGINDESC;
+-
+-/**
+- * Extension pack descriptor
+- *
+- * This is the internal representation of the ExtPack.xml.
+- */
+-typedef struct VBOXEXTPACKDESC
+-{
+- /** The name. */
+- RTCString strName;
+- /** The description. */
+- RTCString strDescription;
+- /** The version string. */
+- RTCString strVersion;
+- /** The edition string. */
+- RTCString strEdition;
+- /** The internal revision number. */
+- uint32_t uRevision;
+- /** The name of the main module. */
+- RTCString strMainModule;
+- /** The name of the VRDE module, empty if none. */
+- RTCString strVrdeModule;
+- /** The number of plug-in descriptors. */
+- uint32_t cPlugIns;
+- /** Pointer to an array of plug-in descriptors. */
+- PVBOXEXTPACKPLUGINDESC paPlugIns;
+- /** Whether to show the license prior to installation. */
+- bool fShowLicense;
+-} VBOXEXTPACKDESC;
+-
+-/** Pointer to a extension pack descriptor. */
+-typedef VBOXEXTPACKDESC *PVBOXEXTPACKDESC;
+-/** Pointer to a const extension pack descriptor. */
+-typedef VBOXEXTPACKDESC const *PCVBOXEXTPACKDESC;
+-
+-
+-void VBoxExtPackInitDesc(PVBOXEXTPACKDESC a_pExtPackDesc);
+-RTCString *VBoxExtPackLoadDesc(const char *a_pszDir, PVBOXEXTPACKDESC a_pExtPackDesc, PRTFSOBJINFO a_pObjInfo);
+-RTCString *VBoxExtPackLoadDescFromVfsFile(RTVFSFILE hVfsFile, PVBOXEXTPACKDESC a_pExtPackDesc, PRTFSOBJINFO a_pObjInfo);
+-RTCString *VBoxExtPackExtractNameFromTarballPath(const char *pszTarball);
+-void VBoxExtPackFreeDesc(PVBOXEXTPACKDESC a_pExtPackDesc);
+-bool VBoxExtPackIsValidName(const char *pszName);
+-bool VBoxExtPackIsValidMangledName(const char *pszMangledName, size_t cchMax = RTSTR_MAX);
+-RTCString *VBoxExtPackMangleName(const char *pszName);
+-RTCString *VBoxExtPackUnmangleName(const char *pszMangledName, size_t cbMax);
+-int VBoxExtPackCalcDir(char *pszExtPackDir, size_t cbExtPackDir, const char *pszParentDir, const char *pszName);
+-bool VBoxExtPackIsValidVersionString(const char *pszVersion);
+-bool VBoxExtPackIsValidEditionString(const char *pszEdition);
+-bool VBoxExtPackIsValidModuleString(const char *pszModule);
+-
+-int VBoxExtPackValidateMember(const char *pszName, RTVFSOBJTYPE enmType, RTVFSOBJ hVfsObj, char *pszError, size_t cbError);
+-int VBoxExtPackOpenTarFss(RTFILE hTarballFile, char *pszError, size_t cbError, PRTVFSFSSTREAM phTarFss, PRTMANIFEST phFileManifest);
+-int VBoxExtPackValidateTarball(RTFILE hTarballFile, const char *pszExtPackName,
+- const char *pszTarball, const char *pszTarballDigest,
+- char *pszError, size_t cbError,
+- PRTMANIFEST phValidManifest, PRTVFSFILE phXmlFile, RTCString *pStrDigest);
+-
+-
+-#endif
+-
+--- VirtualBox-4.1.18.orig/src/VBox/Main/src-all/ExtPackManagerImpl.cpp 2012-06-20 10:17:34.000000000 -0300
++++ /dev/null 2012-07-24 14:48:18.638572110 -0300
+@@ -1,3126 +0,0 @@
+-/* $Id: ExtPackManagerImpl.cpp $ */
+-/** @file
+- * VirtualBox Main - interface for Extension Packs, VBoxSVC & VBoxC.
+- */
+-
+-/*
+- * Copyright (C) 2010 Oracle Corporation
+- *
+- * This file is part of VirtualBox Open Source Edition (OSE), as
+- * available from http://www.virtualbox.org. This file is free software;
+- * you can redistribute it and/or modify it under the terms of the GNU
+- * General Public License (GPL) as published by the Free Software
+- * Foundation, in version 2 as it comes in the "COPYING" file of the
+- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+- */
+-
+-
+-/*******************************************************************************
+-* Header Files *
+-*******************************************************************************/
+-#include "ExtPackManagerImpl.h"
+-#include "ExtPackUtil.h"
+-
+-#include <iprt/buildconfig.h>
+-#include <iprt/ctype.h>
+-#include <iprt/dir.h>
+-#include <iprt/env.h>
+-#include <iprt/file.h>
+-#include <iprt/ldr.h>
+-#include <iprt/manifest.h>
+-#include <iprt/param.h>
+-#include <iprt/path.h>
+-#include <iprt/pipe.h>
+-#include <iprt/process.h>
+-#include <iprt/string.h>
+-
+-#include <VBox/com/array.h>
+-#include <VBox/com/ErrorInfo.h>
+-#include <VBox/err.h>
+-#include <VBox/log.h>
+-#include <VBox/sup.h>
+-#include <VBox/version.h>
+-#include "AutoCaller.h"
+-#include "Global.h"
+-#include "ProgressImpl.h"
+-#include "SystemPropertiesImpl.h"
+-#include "VirtualBoxImpl.h"
+-
+-
+-/*******************************************************************************
+-* Defined Constants And Macros *
+-*******************************************************************************/
+-/** @name VBOX_EXTPACK_HELPER_NAME
+- * The name of the utility application we employ to install and uninstall the
+- * extension packs. This is a set-uid-to-root binary on unixy platforms, which
+- * is why it has to be a separate application.
+- */
+-#if defined(RT_OS_WINDOWS) || defined(RT_OS_OS2)
+-# define VBOX_EXTPACK_HELPER_NAME "VBoxExtPackHelperApp.exe"
+-#else
+-# define VBOX_EXTPACK_HELPER_NAME "VBoxExtPackHelperApp"
+-#endif
+-
+-
+-/*******************************************************************************
+-* Structures and Typedefs *
+-*******************************************************************************/
+-struct ExtPackBaseData
+-{
+-public:
+- /** The extension pack descriptor (loaded from the XML, mostly). */
+- VBOXEXTPACKDESC Desc;
+- /** The file system object info of the XML file.
+- * This is for detecting changes and save time in refresh(). */
+- RTFSOBJINFO ObjInfoDesc;
+- /** Whether it's usable or not. */
+- bool fUsable;
+- /** Why it is unusable. */
+- Utf8Str strWhyUnusable;
+-};
+-
+-/**
+- * Private extension pack data.
+- */
+-struct ExtPackFile::Data : public ExtPackBaseData
+-{
+-public:
+- /** The path to the tarball. */
+- Utf8Str strExtPackFile;
+- /** The SHA-256 hash of the file (as string). */
+- Utf8Str strDigest;
+- /** The file handle of the extension pack file. */
+- RTFILE hExtPackFile;
+- /** Our manifest for the tarball. */
+- RTMANIFEST hOurManifest;
+- /** Pointer to the extension pack manager. */
+- ComObjPtr<ExtPackManager> ptrExtPackMgr;
+- /** Pointer to the VirtualBox object so we can create a progress object. */
+- VirtualBox *pVirtualBox;
+-
+- RTMEMEF_NEW_AND_DELETE_OPERATORS();
+-};
+-
+-/**
+- * Private extension pack data.
+- */
+-struct ExtPack::Data : public ExtPackBaseData
+-{
+-public:
+- /** Where the extension pack is located. */
+- Utf8Str strExtPackPath;
+- /** The file system object info of the extension pack directory.
+- * This is for detecting changes and save time in refresh(). */
+- RTFSOBJINFO ObjInfoExtPack;
+- /** The full path to the main module. */
+- Utf8Str strMainModPath;
+- /** The file system object info of the main module.
+- * This is used to determin whether to bother try reload it. */
+- RTFSOBJINFO ObjInfoMainMod;
+- /** The module handle of the main extension pack module. */
+- RTLDRMOD hMainMod;
+-
+- /** The helper callbacks for the extension pack. */
+- VBOXEXTPACKHLP Hlp;
+- /** Pointer back to the extension pack object (for Hlp methods). */
+- ExtPack *pThis;
+- /** The extension pack registration structure. */
+- PCVBOXEXTPACKREG pReg;
+- /** The current context. */
+- VBOXEXTPACKCTX enmContext;
+- /** Set if we've made the pfnVirtualBoxReady or pfnConsoleReady call. */
+- bool fMadeReadyCall;
+-
+- RTMEMEF_NEW_AND_DELETE_OPERATORS();
+-};
+-
+-/** List of extension packs. */
+-typedef std::list< ComObjPtr<ExtPack> > ExtPackList;
+-
+-/**
+- * Private extension pack manager data.
+- */
+-struct ExtPackManager::Data
+-{
+- /** The directory where the extension packs are installed. */
+- Utf8Str strBaseDir;
+- /** The directory where the certificates this installation recognizes are
+- * stored. */
+- Utf8Str strCertificatDirPath;
+- /** The list of installed extension packs. */
+- ExtPackList llInstalledExtPacks;
+- /** Pointer to the VirtualBox object, our parent. */
+- VirtualBox *pVirtualBox;
+- /** The current context. */
+- VBOXEXTPACKCTX enmContext;
+-#if !defined(RT_OS_WINDOWS) && !defined(RT_OS_DARWIN)
+- /** File handle for the VBoxVMM libary which we slurp because ExtPacks depend on it. */
+- RTLDRMOD hVBoxVMM;
+-#endif
+-
+- RTMEMEF_NEW_AND_DELETE_OPERATORS();
+-};
+-
+-/**
+- * Extension pack installation job.
+- */
+-typedef struct EXTPACKINSTALLJOB
+-{
+- /** Smart pointer to the extension pack file. */
+- ComPtr<ExtPackFile> ptrExtPackFile;
+- /** The replace argument. */
+- bool fReplace;
+- /** The display info argument. */
+- Utf8Str strDisplayInfo;
+- /** Smart pointer to the extension manager. */
+- ComPtr<ExtPackManager> ptrExtPackMgr;
+- /** Smart pointer to the progress object for this job. */
+- ComObjPtr<Progress> ptrProgress;
+-} EXTPACKINSTALLJOB;
+-/** Pointer to an extension pack installation job. */
+-typedef EXTPACKINSTALLJOB *PEXTPACKINSTALLJOB;
+-
+-/**
+- * Extension pack uninstallation job.
+- */
+-typedef struct EXTPACKUNINSTALLJOB
+-{
+- /** Smart pointer to the extension manager. */
+- ComPtr<ExtPackManager> ptrExtPackMgr;
+- /** The name of the extension pack. */
+- Utf8Str strName;
+- /** The replace argument. */
+- bool fForcedRemoval;
+- /** The display info argument. */
+- Utf8Str strDisplayInfo;
+- /** Smart pointer to the progress object for this job. */
+- ComObjPtr<Progress> ptrProgress;
+-} EXTPACKUNINSTALLJOB;
+-/** Pointer to an extension pack uninstallation job. */
+-typedef EXTPACKUNINSTALLJOB *PEXTPACKUNINSTALLJOB;
+-
+-
+-DEFINE_EMPTY_CTOR_DTOR(ExtPackFile)
+-
+-/**
+- * Called by ComObjPtr::createObject when creating the object.
+- *
+- * Just initialize the basic object state, do the rest in initWithDir().
+- *
+- * @returns S_OK.
+- */
+-HRESULT ExtPackFile::FinalConstruct()
+-{
+- m = NULL;
+- return BaseFinalConstruct();
+-}
+-
+-/**
+- * Initializes the extension pack by reading its file.
+- *
+- * @returns COM status code.
+- * @param a_pszFile The path to the extension pack file.
+- * @param a_pszDigest The SHA-256 digest of the file. Or an empty string.
+- * @param a_pExtPackMgr Pointer to the extension pack manager.
+- * @param a_pVirtualBox Pointer to the VirtualBox object.
+- */
+-HRESULT ExtPackFile::initWithFile(const char *a_pszFile, const char *a_pszDigest, ExtPackManager *a_pExtPackMgr, VirtualBox *a_pVirtualBox)
+-{
+- AutoInitSpan autoInitSpan(this);
+- AssertReturn(autoInitSpan.isOk(), E_FAIL);
+-
+- /*
+- * Allocate + initialize our private data.
+- */
+- m = new ExtPackFile::Data;
+- VBoxExtPackInitDesc(&m->Desc);
+- RT_ZERO(m->ObjInfoDesc);
+- m->fUsable = false;
+- m->strWhyUnusable = tr("ExtPack::init failed");
+- m->strExtPackFile = a_pszFile;
+- m->strDigest = a_pszDigest;
+- m->hExtPackFile = NIL_RTFILE;
+- m->hOurManifest = NIL_RTMANIFEST;
+- m->ptrExtPackMgr = a_pExtPackMgr;
+- m->pVirtualBox = a_pVirtualBox;
+-
+- RTCString *pstrTarName = VBoxExtPackExtractNameFromTarballPath(a_pszFile);
+- if (pstrTarName)
+- {
+- m->Desc.strName = *pstrTarName;
+- delete pstrTarName;
+- pstrTarName = NULL;
+- }
+-
+- autoInitSpan.setSucceeded();
+-
+- /*
+- * Try open the extension pack and check that it is a regular file.
+- */
+- int vrc = RTFileOpen(&m->hExtPackFile, a_pszFile,
+- RTFILE_O_READ | RTFILE_O_DENY_WRITE | RTFILE_O_OPEN);
+- if (RT_FAILURE(vrc))
+- {
+- if (vrc == VERR_FILE_NOT_FOUND || vrc == VERR_PATH_NOT_FOUND)
+- return initFailed(tr("'%s' file not found"), a_pszFile);
+- return initFailed(tr("RTFileOpen('%s',,) failed with %Rrc"), a_pszFile, vrc);
+- }
+-
+- RTFSOBJINFO ObjInfo;
+- vrc = RTFileQueryInfo(m->hExtPackFile, &ObjInfo, RTFSOBJATTRADD_UNIX);
+- if (RT_FAILURE(vrc))
+- return initFailed(tr("RTFileQueryInfo failed with %Rrc on '%s'"), vrc, a_pszFile);
+- if (!RTFS_IS_FILE(ObjInfo.Attr.fMode))
+- return initFailed(tr("Not a regular file: %s"), a_pszFile);
+-
+- /*
+- * Validate the tarball and extract the XML file.
+- */
+- char szError[8192];
+- RTVFSFILE hXmlFile;
+- vrc = VBoxExtPackValidateTarball(m->hExtPackFile, NULL /*pszExtPackName*/, a_pszFile, a_pszDigest,
+- szError, sizeof(szError), &m->hOurManifest, &hXmlFile, &m->strDigest);
+- if (RT_FAILURE(vrc))
+- return initFailed(tr("%s"), szError);
+-
+- /*
+- * Parse the XML.
+- */
+- RTCString strSavedName(m->Desc.strName);
+- RTCString *pStrLoadErr = VBoxExtPackLoadDescFromVfsFile(hXmlFile, &m->Desc, &m->ObjInfoDesc);
+- RTVfsFileRelease(hXmlFile);
+- if (pStrLoadErr != NULL)
+- {
+- m->strWhyUnusable.printf(tr("Failed to the xml file: %s"), pStrLoadErr->c_str());
+- m->Desc.strName = strSavedName;
+- delete pStrLoadErr;
+- return S_OK;
+- }
+-
+- /*
+- * Match the tarball name with the name from the XML.
+- */
+- /** @todo drop this restriction after the old install interface is
+- * dropped. */
+- if (!strSavedName.equalsIgnoreCase(m->Desc.strName))
+- return initFailed(tr("Extension pack name mismatch between the downloaded file and the XML inside it (xml='%s' file='%s')"),
+- m->Desc.strName.c_str(), strSavedName.c_str());
+-
+- m->fUsable = true;
+- m->strWhyUnusable.setNull();
+- return S_OK;
+-}
+-
+-/**
+- * Protected helper that formats the strWhyUnusable value.
+- *
+- * @returns S_OK
+- * @param a_pszWhyFmt Why it failed, format string.
+- * @param ... The format arguments.
+- */
+-HRESULT ExtPackFile::initFailed(const char *a_pszWhyFmt, ...)
+-{
+- va_list va;
+- va_start(va, a_pszWhyFmt);
+- m->strWhyUnusable.printfV(a_pszWhyFmt, va);
+- va_end(va);
+- return S_OK;
+-}
+-
+-/**
+- * COM cruft.
+- */
+-void ExtPackFile::FinalRelease()
+-{
+- uninit();
+- BaseFinalRelease();
+-}
+-
+-/**
+- * Do the actual cleanup.
+- */
+-void ExtPackFile::uninit()
+-{
+- /* Enclose the state transition Ready->InUninit->NotReady */
+- AutoUninitSpan autoUninitSpan(this);
+- if (!autoUninitSpan.uninitDone() && m != NULL)
+- {
+- VBoxExtPackFreeDesc(&m->Desc);
+- RTFileClose(m->hExtPackFile);
+- m->hExtPackFile = NIL_RTFILE;
+- RTManifestRelease(m->hOurManifest);
+- m->hOurManifest = NIL_RTMANIFEST;
+-
+- delete m;
+- m = NULL;
+- }
+-}
+-
+-STDMETHODIMP ExtPackFile::COMGETTER(Name)(BSTR *a_pbstrName)
+-{
+- CheckComArgOutPointerValid(a_pbstrName);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- Bstr str(m->Desc.strName);
+- str.cloneTo(a_pbstrName);
+- }
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackFile::COMGETTER(Description)(BSTR *a_pbstrDescription)
+-{
+- CheckComArgOutPointerValid(a_pbstrDescription);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- Bstr str(m->Desc.strDescription);
+- str.cloneTo(a_pbstrDescription);
+- }
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackFile::COMGETTER(Version)(BSTR *a_pbstrVersion)
+-{
+- CheckComArgOutPointerValid(a_pbstrVersion);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- /* HACK ALERT: This is for easing backporting to 4.1. The edition stuff
+- will be changed into a separate */
+- if (m->Desc.strEdition.isEmpty())
+- {
+- Bstr str(m->Desc.strVersion);
+- str.cloneTo(a_pbstrVersion);
+- }
+- else
+- {
+- RTCString strHack(m->Desc.strVersion);
+- strHack.append('-');
+- strHack.append(m->Desc.strEdition);
+-
+- Bstr str(strHack);
+- str.cloneTo(a_pbstrVersion);
+- }
+- }
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackFile::COMGETTER(Revision)(ULONG *a_puRevision)
+-{
+- CheckComArgOutPointerValid(a_puRevision);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- *a_puRevision = m->Desc.uRevision;
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackFile::COMGETTER(VRDEModule)(BSTR *a_pbstrVrdeModule)
+-{
+- CheckComArgOutPointerValid(a_pbstrVrdeModule);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- Bstr str(m->Desc.strVrdeModule);
+- str.cloneTo(a_pbstrVrdeModule);
+- }
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackFile::COMGETTER(PlugIns)(ComSafeArrayOut(IExtPackPlugIn *, a_paPlugIns))
+-{
+- /** @todo implement plug-ins. */
+-#ifdef VBOX_WITH_XPCOM
+- NOREF(a_paPlugIns);
+- NOREF(a_paPlugInsSize);
+-#endif
+- ReturnComNotImplemented();
+-}
+-
+-STDMETHODIMP ExtPackFile::COMGETTER(Usable)(BOOL *a_pfUsable)
+-{
+- CheckComArgOutPointerValid(a_pfUsable);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- *a_pfUsable = m->fUsable;
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackFile::COMGETTER(WhyUnusable)(BSTR *a_pbstrWhy)
+-{
+- CheckComArgOutPointerValid(a_pbstrWhy);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- m->strWhyUnusable.cloneTo(a_pbstrWhy);
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackFile::COMGETTER(ShowLicense)(BOOL *a_pfShowIt)
+-{
+- CheckComArgOutPointerValid(a_pfShowIt);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- *a_pfShowIt = m->Desc.fShowLicense;
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackFile::COMGETTER(License)(BSTR *a_pbstrHtmlLicense)
+-{
+- Bstr bstrHtml("html");
+- return QueryLicense(Bstr::Empty.raw(), Bstr::Empty.raw(), bstrHtml.raw(), a_pbstrHtmlLicense);
+-}
+-
+-/* Same as ExtPack::QueryLicense, should really explore the subject of base classes here... */
+-STDMETHODIMP ExtPackFile::QueryLicense(IN_BSTR a_bstrPreferredLocale, IN_BSTR a_bstrPreferredLanguage, IN_BSTR a_bstrFormat,
+- BSTR *a_pbstrLicense)
+-{
+- /*
+- * Validate input.
+- */
+- CheckComArgOutPointerValid(a_pbstrLicense);
+- CheckComArgNotNull(a_bstrPreferredLocale);
+- CheckComArgNotNull(a_bstrPreferredLanguage);
+- CheckComArgNotNull(a_bstrFormat);
+-
+- Utf8Str strPreferredLocale(a_bstrPreferredLocale);
+- if (strPreferredLocale.length() != 2 && strPreferredLocale.length() != 0)
+- return setError(E_FAIL, tr("The preferred locale is a two character string or empty."));
+-
+- Utf8Str strPreferredLanguage(a_bstrPreferredLanguage);
+- if (strPreferredLanguage.length() != 2 && strPreferredLanguage.length() != 0)
+- return setError(E_FAIL, tr("The preferred lanuage is a two character string or empty."));
+-
+- Utf8Str strFormat(a_bstrFormat);
+- if ( !strFormat.equals("html")
+- && !strFormat.equals("rtf")
+- && !strFormat.equals("txt"))
+- return setError(E_FAIL, tr("The license format can only have the values 'html', 'rtf' and 'txt'."));
+-
+- /*
+- * Combine the options to form a file name before locking down anything.
+- */
+- char szName[sizeof(VBOX_EXTPACK_LICENSE_NAME_PREFIX "-de_DE.html") + 2];
+- if (strPreferredLocale.isNotEmpty() && strPreferredLanguage.isNotEmpty())
+- RTStrPrintf(szName, sizeof(szName), VBOX_EXTPACK_LICENSE_NAME_PREFIX "-%s_%s.%s",
+- strPreferredLocale.c_str(), strPreferredLanguage.c_str(), strFormat.c_str());
+- else if (strPreferredLocale.isNotEmpty())
+- RTStrPrintf(szName, sizeof(szName), VBOX_EXTPACK_LICENSE_NAME_PREFIX "-%s.%s", strPreferredLocale.c_str(), strFormat.c_str());
+- else if (strPreferredLanguage.isNotEmpty())
+- RTStrPrintf(szName, sizeof(szName), VBOX_EXTPACK_LICENSE_NAME_PREFIX "-_%s.%s", strPreferredLocale.c_str(), strFormat.c_str());
+- else
+- RTStrPrintf(szName, sizeof(szName), VBOX_EXTPACK_LICENSE_NAME_PREFIX ".%s", strFormat.c_str());
+-
+- /*
+- * Lock the extension pack. We need a write lock here as there must not be
+- * concurrent accesses to the tar file handle.
+- */
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+-
+- /*
+- * Do not permit this query on a pack that isn't considered usable (could
+- * be marked so because of bad license files).
+- */
+- if (!m->fUsable)
+- hrc = setError(E_FAIL, tr("%s"), m->strWhyUnusable.c_str());
+- else
+- {
+- /*
+- * Look it up in the manifest before scanning the tarball for it
+- */
+- if (RTManifestEntryExists(m->hOurManifest, szName))
+- {
+- RTVFSFSSTREAM hTarFss;
+- char szError[8192];
+- int vrc = VBoxExtPackOpenTarFss(m->hExtPackFile, szError, sizeof(szError), &hTarFss, NULL);
+- if (RT_SUCCESS(vrc))
+- {
+- for (;;)
+- {
+- /* Get the first/next. */
+- char *pszName;
+- RTVFSOBJ hVfsObj;
+- RTVFSOBJTYPE enmType;
+- vrc = RTVfsFsStrmNext(hTarFss, &pszName, &enmType, &hVfsObj);
+- if (RT_FAILURE(vrc))
+- {
+- if (vrc != VERR_EOF)
+- hrc = setError(VBOX_E_IPRT_ERROR, tr("RTVfsFsStrmNext failed: %Rrc"), vrc);
+- else
+- hrc = setError(E_UNEXPECTED, tr("'%s' was found in the manifest but not in the tarball"), szName);
+- break;
+- }
+-
+- /* Is this it? */
+- const char *pszAdjName = pszName[0] == '.' && pszName[1] == '/' ? &pszName[2] : pszName;
+- if ( !strcmp(pszAdjName, szName)
+- && ( enmType == RTVFSOBJTYPE_IO_STREAM
+- || enmType == RTVFSOBJTYPE_FILE))
+- {
+- RTVFSIOSTREAM hVfsIos = RTVfsObjToIoStream(hVfsObj);
+- RTVfsObjRelease(hVfsObj);
+- RTStrFree(pszName);
+-
+- /* Load the file into memory. */
+- RTFSOBJINFO ObjInfo;
+- vrc = RTVfsIoStrmQueryInfo(hVfsIos, &ObjInfo, RTFSOBJATTRADD_NOTHING);
+- if (RT_SUCCESS(vrc))
+- {
+- size_t cbFile = (size_t)ObjInfo.cbObject;
+- void *pvFile = RTMemAllocZ(cbFile + 1);
+- if (pvFile)
+- {
+- vrc = RTVfsIoStrmRead(hVfsIos, pvFile, cbFile, true /*fBlocking*/, NULL);
+- if (RT_SUCCESS(vrc))
+- {
+- /* try translate it into a string we can return. */
+- Bstr bstrLicense((const char *)pvFile, cbFile);
+- if (bstrLicense.isNotEmpty())
+- {
+- bstrLicense.detachTo(a_pbstrLicense);
+- hrc = S_OK;
+- }
+- else
+- hrc = setError(VBOX_E_IPRT_ERROR,
+- tr("The license file '%s' is empty or contains invalid UTF-8 encoding"),
+- szName);
+- }
+- else
+- hrc = setError(VBOX_E_IPRT_ERROR, tr("Failed to read '%s': %Rrc"), szName, vrc);
+- RTMemFree(pvFile);
+- }
+- else
+- hrc = setError(E_OUTOFMEMORY, tr("Failed to allocate %zu bytes for '%s'"), cbFile, szName);
+- }
+- else
+- hrc = setError(VBOX_E_IPRT_ERROR, tr("RTVfsIoStrmQueryInfo on '%s': %Rrc"), szName, vrc);
+- RTVfsIoStrmRelease(hVfsIos);
+- break;
+- }
+-
+- /* Release current. */
+- RTVfsObjRelease(hVfsObj);
+- RTStrFree(pszName);
+- }
+- RTVfsFsStrmRelease(hTarFss);
+- }
+- else
+- hrc = setError(VBOX_E_OBJECT_NOT_FOUND, tr("%s"), szError);
+- }
+- else
+- hrc = setError(VBOX_E_OBJECT_NOT_FOUND, tr("The license file '%s' was not found in '%s'"),
+- szName, m->strExtPackFile.c_str());
+- }
+- }
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackFile::COMGETTER(FilePath)(BSTR *a_pbstrPath)
+-{
+- CheckComArgOutPointerValid(a_pbstrPath);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- m->strExtPackFile.cloneTo(a_pbstrPath);
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackFile::Install(BOOL a_fReplace, IN_BSTR a_bstrDisplayInfo, IProgress **a_ppProgress)
+-{
+- if (a_ppProgress)
+- *a_ppProgress = NULL;
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- if (m->fUsable)
+- {
+- PEXTPACKINSTALLJOB pJob = NULL;
+- try
+- {
+- pJob = new EXTPACKINSTALLJOB;
+- pJob->ptrExtPackFile = this;
+- pJob->fReplace = a_fReplace != FALSE;
+- pJob->strDisplayInfo = a_bstrDisplayInfo;
+- pJob->ptrExtPackMgr = m->ptrExtPackMgr;
+- hrc = pJob->ptrProgress.createObject();
+- if (SUCCEEDED(hrc))
+- {
+- Bstr bstrDescription = tr("Installing extension pack");
+- hrc = pJob->ptrProgress->init(
+-#ifndef VBOX_COM_INPROC
+- m->pVirtualBox,
+-#endif
+- static_cast<IExtPackFile *>(this),
+- bstrDescription.raw(),
+- FALSE /*aCancelable*/,
+- NULL /*aId*/);
+- }
+- if (SUCCEEDED(hrc))
+- {
+- ComPtr<Progress> ptrProgress = pJob->ptrProgress;
+- int vrc = RTThreadCreate(NULL /*phThread*/, ExtPackManager::doInstallThreadProc, pJob, 0,
+- RTTHREADTYPE_DEFAULT, 0 /*fFlags*/, "ExtPackInst");
+- if (RT_SUCCESS(vrc))
+- {
+- pJob = NULL; /* the thread deletes it */
+- ptrProgress.queryInterfaceTo(a_ppProgress);
+- }
+- else
+- hrc = setError(VBOX_E_IPRT_ERROR, tr("RTThreadCreate failed with %Rrc"), vrc);
+- }
+- }
+- catch (std::bad_alloc)
+- {
+- hrc = E_OUTOFMEMORY;
+- }
+- if (pJob)
+- delete pJob;
+- }
+- else
+- hrc = setError(E_FAIL, "%s", m->strWhyUnusable.c_str());
+- }
+- return hrc;
+-}
+-
+-
+-
+-
+-
+-DEFINE_EMPTY_CTOR_DTOR(ExtPack)
+-
+-/**
+- * Called by ComObjPtr::createObject when creating the object.
+- *
+- * Just initialize the basic object state, do the rest in initWithDir().
+- *
+- * @returns S_OK.
+- */
+-HRESULT ExtPack::FinalConstruct()
+-{
+- m = NULL;
+- return S_OK;
+-}
+-
+-/**
+- * Initializes the extension pack by reading its file.
+- *
+- * @returns COM status code.
+- * @param a_enmContext The context we're in.
+- * @param a_pszName The name of the extension pack. This is also the
+- * name of the subdirector under @a a_pszParentDir
+- * where the extension pack is installed.
+- * @param a_pszDir The extension pack directory name.
+- */
+-HRESULT ExtPack::initWithDir(VBOXEXTPACKCTX a_enmContext, const char *a_pszName, const char *a_pszDir)
+-{
+- AutoInitSpan autoInitSpan(this);
+- AssertReturn(autoInitSpan.isOk(), E_FAIL);
+-
+- static const VBOXEXTPACKHLP s_HlpTmpl =
+- {
+- /* u32Version = */ VBOXEXTPACKHLP_VERSION,
+- /* uVBoxFullVersion = */ VBOX_FULL_VERSION,
+- /* uVBoxVersionRevision = */ 0,
+- /* u32Padding = */ 0,
+- /* pszVBoxVersion = */ "",
+- /* pfnFindModule = */ ExtPack::hlpFindModule,
+- /* pfnGetFilePath = */ ExtPack::hlpGetFilePath,
+- /* pfnGetContext = */ ExtPack::hlpGetContext,
+- /* pfnReserved1 = */ ExtPack::hlpReservedN,
+- /* pfnReserved2 = */ ExtPack::hlpReservedN,
+- /* pfnReserved3 = */ ExtPack::hlpReservedN,
+- /* pfnReserved4 = */ ExtPack::hlpReservedN,
+- /* pfnReserved5 = */ ExtPack::hlpReservedN,
+- /* pfnReserved6 = */ ExtPack::hlpReservedN,
+- /* pfnReserved7 = */ ExtPack::hlpReservedN,
+- /* pfnReserved8 = */ ExtPack::hlpReservedN,
+- /* pfnReserved9 = */ ExtPack::hlpReservedN,
+- /* u32EndMarker = */ VBOXEXTPACKHLP_VERSION
+- };
+-
+- /*
+- * Allocate + initialize our private data.
+- */
+- m = new Data;
+- VBoxExtPackInitDesc(&m->Desc);
+- m->Desc.strName = a_pszName;
+- RT_ZERO(m->ObjInfoDesc);
+- m->fUsable = false;
+- m->strWhyUnusable = tr("ExtPack::init failed");
+- m->strExtPackPath = a_pszDir;
+- RT_ZERO(m->ObjInfoExtPack);
+- m->strMainModPath.setNull();
+- RT_ZERO(m->ObjInfoMainMod);
+- m->hMainMod = NIL_RTLDRMOD;
+- m->Hlp = s_HlpTmpl;
+- m->Hlp.pszVBoxVersion = RTBldCfgVersion();
+- m->Hlp.uVBoxInternalRevision = RTBldCfgRevision();
+- m->pThis = this;
+- m->pReg = NULL;
+- m->enmContext = a_enmContext;
+- m->fMadeReadyCall = false;
+-
+- /*
+- * Probe the extension pack (this code is shared with refresh()).
+- */
+- probeAndLoad();
+-
+- autoInitSpan.setSucceeded();
+- return S_OK;
+-}
+-
+-/**
+- * COM cruft.
+- */
+-void ExtPack::FinalRelease()
+-{
+- uninit();
+-}
+-
+-/**
+- * Do the actual cleanup.
+- */
+-void ExtPack::uninit()
+-{
+- /* Enclose the state transition Ready->InUninit->NotReady */
+- AutoUninitSpan autoUninitSpan(this);
+- if (!autoUninitSpan.uninitDone() && m != NULL)
+- {
+- if (m->hMainMod != NIL_RTLDRMOD)
+- {
+- AssertPtr(m->pReg);
+- if (m->pReg->pfnUnload != NULL)
+- m->pReg->pfnUnload(m->pReg);
+-
+- RTLdrClose(m->hMainMod);
+- m->hMainMod = NIL_RTLDRMOD;
+- m->pReg = NULL;
+- }
+-
+- VBoxExtPackFreeDesc(&m->Desc);
+-
+- delete m;
+- m = NULL;
+- }
+-}
+-
+-
+-/**
+- * Calls the installed hook.
+- *
+- * @returns true if we left the lock, false if we didn't.
+- * @param a_pVirtualBox The VirtualBox interface.
+- * @param a_pLock The write lock held by the caller.
+- * @param pErrInfo Where to return error information.
+- */
+-bool ExtPack::callInstalledHook(IVirtualBox *a_pVirtualBox, AutoWriteLock *a_pLock, PRTERRINFO pErrInfo)
+-{
+- if ( m != NULL
+- && m->hMainMod != NIL_RTLDRMOD)
+- {
+- if (m->pReg->pfnInstalled)
+- {
+- ComPtr<ExtPack> ptrSelfRef = this;
+- a_pLock->release();
+- pErrInfo->rc = m->pReg->pfnInstalled(m->pReg, a_pVirtualBox, pErrInfo);
+- a_pLock->acquire();
+- return true;
+- }
+- }
+- pErrInfo->rc = VINF_SUCCESS;
+- return false;
+-}
+-
+-/**
+- * Calls the uninstall hook and closes the module.
+- *
+- * @returns S_OK or COM error status with error information.
+- * @param a_pVirtualBox The VirtualBox interface.
+- * @param a_fForcedRemoval When set, we'll ignore complaints from the
+- * uninstall hook.
+- * @remarks The caller holds the manager's write lock, not released.
+- */
+-HRESULT ExtPack::callUninstallHookAndClose(IVirtualBox *a_pVirtualBox, bool a_fForcedRemoval)
+-{
+- HRESULT hrc = S_OK;
+-
+- if ( m != NULL
+- && m->hMainMod != NIL_RTLDRMOD)
+- {
+- if (m->pReg->pfnUninstall && !a_fForcedRemoval)
+- {
+- int vrc = m->pReg->pfnUninstall(m->pReg, a_pVirtualBox);
+- if (RT_FAILURE(vrc))
+- {
+- LogRel(("ExtPack pfnUninstall returned %Rrc for %s\n", vrc, m->Desc.strName.c_str()));
+- if (!a_fForcedRemoval)
+- hrc = setError(E_FAIL, tr("pfnUninstall returned %Rrc"), vrc);
+- }
+- }
+- if (SUCCEEDED(hrc))
+- {
+- RTLdrClose(m->hMainMod);
+- m->hMainMod = NIL_RTLDRMOD;
+- m->pReg = NULL;
+- }
+- }
+-
+- return hrc;
+-}
+-
+-/**
+- * Calls the pfnVirtualBoxReady hook.
+- *
+- * @returns true if we left the lock, false if we didn't.
+- * @param a_pVirtualBox The VirtualBox interface.
+- * @param a_pLock The write lock held by the caller.
+- */
+-bool ExtPack::callVirtualBoxReadyHook(IVirtualBox *a_pVirtualBox, AutoWriteLock *a_pLock)
+-{
+- if ( m != NULL
+- && m->fUsable
+- && !m->fMadeReadyCall)
+- {
+- m->fMadeReadyCall = true;
+- if (m->pReg->pfnVirtualBoxReady)
+- {
+- ComPtr<ExtPack> ptrSelfRef = this;
+- a_pLock->release();
+- m->pReg->pfnVirtualBoxReady(m->pReg, a_pVirtualBox);
+- a_pLock->acquire();
+- return true;
+- }
+- }
+- return false;
+-}
+-
+-/**
+- * Calls the pfnConsoleReady hook.
+- *
+- * @returns true if we left the lock, false if we didn't.
+- * @param a_pConsole The Console interface.
+- * @param a_pLock The write lock held by the caller.
+- */
+-bool ExtPack::callConsoleReadyHook(IConsole *a_pConsole, AutoWriteLock *a_pLock)
+-{
+- if ( m != NULL
+- && m->fUsable
+- && !m->fMadeReadyCall)
+- {
+- m->fMadeReadyCall = true;
+- if (m->pReg->pfnConsoleReady)
+- {
+- ComPtr<ExtPack> ptrSelfRef = this;
+- a_pLock->release();
+- m->pReg->pfnConsoleReady(m->pReg, a_pConsole);
+- a_pLock->acquire();
+- return true;
+- }
+- }
+- return false;
+-}
+-
+-/**
+- * Calls the pfnVMCreate hook.
+- *
+- * @returns true if we left the lock, false if we didn't.
+- * @param a_pVirtualBox The VirtualBox interface.
+- * @param a_pMachine The machine interface of the new VM.
+- * @param a_pLock The write lock held by the caller.
+- */
+-bool ExtPack::callVmCreatedHook(IVirtualBox *a_pVirtualBox, IMachine *a_pMachine, AutoWriteLock *a_pLock)
+-{
+- if ( m != NULL
+- && m->fUsable)
+- {
+- if (m->pReg->pfnVMCreated)
+- {
+- ComPtr<ExtPack> ptrSelfRef = this;
+- a_pLock->release();
+- m->pReg->pfnVMCreated(m->pReg, a_pVirtualBox, a_pMachine);
+- a_pLock->acquire();
+- return true;
+- }
+- }
+- return false;
+-}
+-
+-/**
+- * Calls the pfnVMConfigureVMM hook.
+- *
+- * @returns true if we left the lock, false if we didn't.
+- * @param a_pConsole The console interface.
+- * @param a_pVM The VM handle.
+- * @param a_pLock The write lock held by the caller.
+- * @param a_pvrc Where to return the status code of the
+- * callback. This is always set. LogRel is
+- * called on if a failure status is returned.
+- */
+-bool ExtPack::callVmConfigureVmmHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock, int *a_pvrc)
+-{
+- *a_pvrc = VINF_SUCCESS;
+- if ( m != NULL
+- && m->fUsable)
+- {
+- if (m->pReg->pfnVMConfigureVMM)
+- {
+- ComPtr<ExtPack> ptrSelfRef = this;
+- a_pLock->release();
+- int vrc = m->pReg->pfnVMConfigureVMM(m->pReg, a_pConsole, a_pVM);
+- *a_pvrc = vrc;
+- a_pLock->acquire();
+- if (RT_FAILURE(vrc))
+- LogRel(("ExtPack pfnVMConfigureVMM returned %Rrc for %s\n", vrc, m->Desc.strName.c_str()));
+- return true;
+- }
+- }
+- return false;
+-}
+-
+-/**
+- * Calls the pfnVMPowerOn hook.
+- *
+- * @returns true if we left the lock, false if we didn't.
+- * @param a_pConsole The console interface.
+- * @param a_pVM The VM handle.
+- * @param a_pLock The write lock held by the caller.
+- * @param a_pvrc Where to return the status code of the
+- * callback. This is always set. LogRel is
+- * called on if a failure status is returned.
+- */
+-bool ExtPack::callVmPowerOnHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock, int *a_pvrc)
+-{
+- *a_pvrc = VINF_SUCCESS;
+- if ( m != NULL
+- && m->fUsable)
+- {
+- if (m->pReg->pfnVMPowerOn)
+- {
+- ComPtr<ExtPack> ptrSelfRef = this;
+- a_pLock->release();
+- int vrc = m->pReg->pfnVMPowerOn(m->pReg, a_pConsole, a_pVM);
+- *a_pvrc = vrc;
+- a_pLock->acquire();
+- if (RT_FAILURE(vrc))
+- LogRel(("ExtPack pfnVMPowerOn returned %Rrc for %s\n", vrc, m->Desc.strName.c_str()));
+- return true;
+- }
+- }
+- return false;
+-}
+-
+-/**
+- * Calls the pfnVMPowerOff hook.
+- *
+- * @returns true if we left the lock, false if we didn't.
+- * @param a_pConsole The console interface.
+- * @param a_pVM The VM handle.
+- * @param a_pLock The write lock held by the caller.
+- */
+-bool ExtPack::callVmPowerOffHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock)
+-{
+- if ( m != NULL
+- && m->fUsable)
+- {
+- if (m->pReg->pfnVMPowerOff)
+- {
+- ComPtr<ExtPack> ptrSelfRef = this;
+- a_pLock->release();
+- m->pReg->pfnVMPowerOff(m->pReg, a_pConsole, a_pVM);
+- a_pLock->acquire();
+- return true;
+- }
+- }
+- return false;
+-}
+-
+-/**
+- * Check if the extension pack is usable and has an VRDE module.
+- *
+- * @returns S_OK or COM error status with error information.
+- *
+- * @remarks Caller holds the extension manager lock for reading, no locking
+- * necessary.
+- */
+-HRESULT ExtPack::checkVrde(void)
+-{
+- HRESULT hrc;
+- if ( m != NULL
+- && m->fUsable)
+- {
+- if (m->Desc.strVrdeModule.isNotEmpty())
+- hrc = S_OK;
+- else
+- hrc = setError(E_FAIL, tr("The extension pack '%s' does not include a VRDE module"), m->Desc.strName.c_str());
+- }
+- else
+- hrc = setError(E_FAIL, tr("%s"), m->strWhyUnusable.c_str());
+- return hrc;
+-}
+-
+-/**
+- * Same as checkVrde(), except that it also resolves the path to the module.
+- *
+- * @returns S_OK or COM error status with error information.
+- * @param a_pstrVrdeLibrary Where to return the path on success.
+- *
+- * @remarks Caller holds the extension manager lock for reading, no locking
+- * necessary.
+- */
+-HRESULT ExtPack::getVrdpLibraryName(Utf8Str *a_pstrVrdeLibrary)
+-{
+- HRESULT hrc = checkVrde();
+- if (SUCCEEDED(hrc))
+- {
+- if (findModule(m->Desc.strVrdeModule.c_str(), NULL, VBOXEXTPACKMODKIND_R3,
+- a_pstrVrdeLibrary, NULL /*a_pfNative*/, NULL /*a_pObjInfo*/))
+- hrc = S_OK;
+- else
+- hrc = setError(E_FAIL, tr("Failed to locate the VRDE module '%s' in extension pack '%s'"),
+- m->Desc.strVrdeModule.c_str(), m->Desc.strName.c_str());
+- }
+- return hrc;
+-}
+-
+-/**
+- * Check if this extension pack wishes to be the default VRDE provider.
+- *
+- * @returns @c true if it wants to and it is in a usable state, otherwise
+- * @c false.
+- *
+- * @remarks Caller holds the extension manager lock for reading, no locking
+- * necessary.
+- */
+-bool ExtPack::wantsToBeDefaultVrde(void) const
+-{
+- return m->fUsable
+- && m->Desc.strVrdeModule.isNotEmpty();
+-}
+-
+-/**
+- * Refreshes the extension pack state.
+- *
+- * This is called by the manager so that the on disk changes are picked up.
+- *
+- * @returns S_OK or COM error status with error information.
+- *
+- * @param a_pfCanDelete Optional can-delete-this-object output indicator.
+- *
+- * @remarks Caller holds the extension manager lock for writing.
+- * @remarks Only called in VBoxSVC.
+- */
+-HRESULT ExtPack::refresh(bool *a_pfCanDelete)
+-{
+- if (a_pfCanDelete)
+- *a_pfCanDelete = false;
+-
+- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS); /* for the COMGETTERs */
+-
+- /*
+- * Has the module been deleted?
+- */
+- RTFSOBJINFO ObjInfoExtPack;
+- int vrc = RTPathQueryInfoEx(m->strExtPackPath.c_str(), &ObjInfoExtPack, RTFSOBJATTRADD_UNIX, RTPATH_F_ON_LINK);
+- if ( RT_FAILURE(vrc)
+- || !RTFS_IS_DIRECTORY(ObjInfoExtPack.Attr.fMode))
+- {
+- if (a_pfCanDelete)
+- *a_pfCanDelete = true;
+- return S_OK;
+- }
+-
+- /*
+- * We've got a directory, so try query file system object info for the
+- * files we are interested in as well.
+- */
+- RTFSOBJINFO ObjInfoDesc;
+- char szDescFilePath[RTPATH_MAX];
+- vrc = RTPathJoin(szDescFilePath, sizeof(szDescFilePath), m->strExtPackPath.c_str(), VBOX_EXTPACK_DESCRIPTION_NAME);
+- if (RT_SUCCESS(vrc))
+- vrc = RTPathQueryInfoEx(szDescFilePath, &ObjInfoDesc, RTFSOBJATTRADD_UNIX, RTPATH_F_ON_LINK);
+- if (RT_FAILURE(vrc))
+- RT_ZERO(ObjInfoDesc);
+-
+- RTFSOBJINFO ObjInfoMainMod;
+- if (m->strMainModPath.isNotEmpty())
+- vrc = RTPathQueryInfoEx(m->strMainModPath.c_str(), &ObjInfoMainMod, RTFSOBJATTRADD_UNIX, RTPATH_F_ON_LINK);
+- if (m->strMainModPath.isEmpty() || RT_FAILURE(vrc))
+- RT_ZERO(ObjInfoMainMod);
+-
+- /*
+- * If we have a usable module already, just verify that things haven't
+- * changed since we loaded it.
+- */
+- if (m->fUsable)
+- {
+- if (m->hMainMod == NIL_RTLDRMOD)
+- probeAndLoad();
+- else if ( !objinfoIsEqual(&ObjInfoDesc, &m->ObjInfoDesc)
+- || !objinfoIsEqual(&ObjInfoMainMod, &m->ObjInfoMainMod)
+- || !objinfoIsEqual(&ObjInfoExtPack, &m->ObjInfoExtPack) )
+- {
+- /** @todo not important, so it can wait. */
+- }
+- }
+- /*
+- * Ok, it is currently not usable. If anything has changed since last time
+- * reprobe the extension pack.
+- */
+- else if ( !objinfoIsEqual(&ObjInfoDesc, &m->ObjInfoDesc)
+- || !objinfoIsEqual(&ObjInfoMainMod, &m->ObjInfoMainMod)
+- || !objinfoIsEqual(&ObjInfoExtPack, &m->ObjInfoExtPack) )
+- probeAndLoad();
+-
+- return S_OK;
+-}
+-
+-/**
+- * Probes the extension pack, loading the main dll and calling its registration
+- * entry point.
+- *
+- * This updates the state accordingly, the strWhyUnusable and fUnusable members
+- * being the most important ones.
+- */
+-void ExtPack::probeAndLoad(void)
+-{
+- m->fUsable = false;
+- m->fMadeReadyCall = false;
+-
+- /*
+- * Query the file system info for the extension pack directory. This and
+- * all other file system info we save is for the benefit of refresh().
+- */
+- int vrc = RTPathQueryInfoEx(m->strExtPackPath.c_str(), &m->ObjInfoExtPack, RTFSOBJATTRADD_UNIX, RTPATH_F_ON_LINK);
+- if (RT_FAILURE(vrc))
+- {
+- m->strWhyUnusable.printf(tr("RTPathQueryInfoEx on '%s' failed: %Rrc"), m->strExtPackPath.c_str(), vrc);
+- return;
+- }
+- if (!RTFS_IS_DIRECTORY(m->ObjInfoExtPack.Attr.fMode))
+- {
+- if (RTFS_IS_SYMLINK(m->ObjInfoExtPack.Attr.fMode))
+- m->strWhyUnusable.printf(tr("'%s' is a symbolic link, this is not allowed"), m->strExtPackPath.c_str(), vrc);
+- else if (RTFS_IS_FILE(m->ObjInfoExtPack.Attr.fMode))
+- m->strWhyUnusable.printf(tr("'%s' is a symbolic file, not a directory"), m->strExtPackPath.c_str(), vrc);
+- else
+- m->strWhyUnusable.printf(tr("'%s' is not a directory (fMode=%#x)"), m->strExtPackPath.c_str(), m->ObjInfoExtPack.Attr.fMode);
+- return;
+- }
+-
+- RTERRINFOSTATIC ErrInfo;
+- RTErrInfoInitStatic(&ErrInfo);
+- vrc = SUPR3HardenedVerifyDir(m->strExtPackPath.c_str(), true /*fRecursive*/, true /*fCheckFiles*/, &ErrInfo.Core);
+- if (RT_FAILURE(vrc))
+- {
+- m->strWhyUnusable.printf(tr("%s (rc=%Rrc)"), ErrInfo.Core.pszMsg, vrc);
+- return;
+- }
+-
+- /*
+- * Read the description file.
+- */
+- RTCString strSavedName(m->Desc.strName);
+- RTCString *pStrLoadErr = VBoxExtPackLoadDesc(m->strExtPackPath.c_str(), &m->Desc, &m->ObjInfoDesc);
+- if (pStrLoadErr != NULL)
+- {
+- m->strWhyUnusable.printf(tr("Failed to load '%s/%s': %s"),
+- m->strExtPackPath.c_str(), VBOX_EXTPACK_DESCRIPTION_NAME, pStrLoadErr->c_str());
+- m->Desc.strName = strSavedName;
+- delete pStrLoadErr;
+- return;
+- }
+-
+- /*
+- * Make sure the XML name and directory matches.
+- */
+- if (!m->Desc.strName.equalsIgnoreCase(strSavedName))
+- {
+- m->strWhyUnusable.printf(tr("The description name ('%s') and directory name ('%s') does not match"),
+- m->Desc.strName.c_str(), strSavedName.c_str());
+- m->Desc.strName = strSavedName;
+- return;
+- }
+-
+- /*
+- * Load the main DLL and call the predefined entry point.
+- */
+- bool fIsNative;
+- if (!findModule(m->Desc.strMainModule.c_str(), NULL /* default extension */, VBOXEXTPACKMODKIND_R3,
+- &m->strMainModPath, &fIsNative, &m->ObjInfoMainMod))
+- {
+- m->strWhyUnusable.printf(tr("Failed to locate the main module ('%s')"), m->Desc.strMainModule.c_str());
+- return;
+- }
+-
+- vrc = SUPR3HardenedVerifyPlugIn(m->strMainModPath.c_str(), &ErrInfo.Core);
+- if (RT_FAILURE(vrc))
+- {
+- m->strWhyUnusable.printf(tr("%s"), ErrInfo.Core.pszMsg);
+- return;
+- }
+-
+- if (fIsNative)
+- {
+- vrc = SUPR3HardenedLdrLoadPlugIn(m->strMainModPath.c_str(), &m->hMainMod, &ErrInfo.Core);
+- if (RT_FAILURE(vrc))
+- {
+- m->hMainMod = NIL_RTLDRMOD;
+- m->strWhyUnusable.printf(tr("Failed to load the main module ('%s'): %Rrc - %s"),
+- m->strMainModPath.c_str(), vrc, ErrInfo.Core.pszMsg);
+- return;
+- }
+- }
+- else
+- {
+- m->strWhyUnusable.printf(tr("Only native main modules are currently supported"));
+- return;
+- }
+-
+- /*
+- * Resolve the predefined entry point.
+- */
+- PFNVBOXEXTPACKREGISTER pfnRegistration;
+- vrc = RTLdrGetSymbol(m->hMainMod, VBOX_EXTPACK_MAIN_MOD_ENTRY_POINT, (void **)&pfnRegistration);
+- if (RT_SUCCESS(vrc))
+- {
+- RTErrInfoClear(&ErrInfo.Core);
+- vrc = pfnRegistration(&m->Hlp, &m->pReg, &ErrInfo.Core);
+- if ( RT_SUCCESS(vrc)
+- && !RTErrInfoIsSet(&ErrInfo.Core)
+- && VALID_PTR(m->pReg))
+- {
+- if ( VBOXEXTPACK_IS_MAJOR_VER_EQUAL(m->pReg->u32Version, VBOXEXTPACKREG_VERSION)
+- && m->pReg->u32EndMarker == m->pReg->u32Version)
+- {
+- if ( (!m->pReg->pfnInstalled || RT_VALID_PTR(m->pReg->pfnInstalled))
+- && (!m->pReg->pfnUninstall || RT_VALID_PTR(m->pReg->pfnUninstall))
+- && (!m->pReg->pfnVirtualBoxReady || RT_VALID_PTR(m->pReg->pfnVirtualBoxReady))
+- && (!m->pReg->pfnConsoleReady || RT_VALID_PTR(m->pReg->pfnConsoleReady))
+- && (!m->pReg->pfnUnload || RT_VALID_PTR(m->pReg->pfnUnload))
+- && (!m->pReg->pfnVMCreated || RT_VALID_PTR(m->pReg->pfnVMCreated))
+- && (!m->pReg->pfnVMConfigureVMM || RT_VALID_PTR(m->pReg->pfnVMConfigureVMM))
+- && (!m->pReg->pfnVMPowerOn || RT_VALID_PTR(m->pReg->pfnVMPowerOn))
+- && (!m->pReg->pfnVMPowerOff || RT_VALID_PTR(m->pReg->pfnVMPowerOff))
+- && (!m->pReg->pfnQueryObject || RT_VALID_PTR(m->pReg->pfnQueryObject))
+- )
+- {
+- /*
+- * We're good!
+- */
+- m->fUsable = true;
+- m->strWhyUnusable.setNull();
+- return;
+- }
+-
+- m->strWhyUnusable = tr("The registration structure contains on or more invalid function pointers");
+- }
+- else
+- m->strWhyUnusable.printf(tr("Unsupported registration structure version %u.%u"),
+- RT_HIWORD(m->pReg->u32Version), RT_LOWORD(m->pReg->u32Version));
+- }
+- else
+- m->strWhyUnusable.printf(tr("%s returned %Rrc, pReg=%p ErrInfo='%s'"),
+- VBOX_EXTPACK_MAIN_MOD_ENTRY_POINT, vrc, m->pReg, ErrInfo.Core.pszMsg);
+- m->pReg = NULL;
+- }
+- else
+- m->strWhyUnusable.printf(tr("Failed to resolve exported symbol '%s' in the main module: %Rrc"),
+- VBOX_EXTPACK_MAIN_MOD_ENTRY_POINT, vrc);
+-
+- RTLdrClose(m->hMainMod);
+- m->hMainMod = NIL_RTLDRMOD;
+-}
+-
+-/**
+- * Finds a module.
+- *
+- * @returns true if found, false if not.
+- * @param a_pszName The module base name (no extension).
+- * @param a_pszExt The extension. If NULL we use default
+- * extensions.
+- * @param a_enmKind The kind of module to locate.
+- * @param a_pStrFound Where to return the path to the module we've
+- * found.
+- * @param a_pfNative Where to return whether this is a native module
+- * or an agnostic one. Optional.
+- * @param a_pObjInfo Where to return the file system object info for
+- * the module. Optional.
+- */
+-bool ExtPack::findModule(const char *a_pszName, const char *a_pszExt, VBOXEXTPACKMODKIND a_enmKind,
+- Utf8Str *a_pStrFound, bool *a_pfNative, PRTFSOBJINFO a_pObjInfo) const
+-{
+- /*
+- * Try the native path first.
+- */
+- char szPath[RTPATH_MAX];
+- int vrc = RTPathJoin(szPath, sizeof(szPath), m->strExtPackPath.c_str(), RTBldCfgTargetDotArch());
+- AssertLogRelRCReturn(vrc, false);
+- vrc = RTPathAppend(szPath, sizeof(szPath), a_pszName);
+- AssertLogRelRCReturn(vrc, false);
+- if (!a_pszExt)
+- {
+- const char *pszDefExt;
+- switch (a_enmKind)
+- {
+- case VBOXEXTPACKMODKIND_RC: pszDefExt = ".rc"; break;
+- case VBOXEXTPACKMODKIND_R0: pszDefExt = ".r0"; break;
+- case VBOXEXTPACKMODKIND_R3: pszDefExt = RTLdrGetSuff(); break;
+- default:
+- AssertFailedReturn(false);
+- }
+- vrc = RTStrCat(szPath, sizeof(szPath), pszDefExt);
+- AssertLogRelRCReturn(vrc, false);
+- }
+-
+- RTFSOBJINFO ObjInfo;
+- if (!a_pObjInfo)
+- a_pObjInfo = &ObjInfo;
+- vrc = RTPathQueryInfo(szPath, a_pObjInfo, RTFSOBJATTRADD_UNIX);
+- if (RT_SUCCESS(vrc) && RTFS_IS_FILE(a_pObjInfo->Attr.fMode))
+- {
+- if (a_pfNative)
+- *a_pfNative = true;
+- *a_pStrFound = szPath;
+- return true;
+- }
+-
+- /*
+- * Try the platform agnostic modules.
+- */
+- /* gcc.x86/module.rel */
+- char szSubDir[32];
+- RTStrPrintf(szSubDir, sizeof(szSubDir), "%s.%s", RTBldCfgCompiler(), RTBldCfgTargetArch());
+- vrc = RTPathJoin(szPath, sizeof(szPath), m->strExtPackPath.c_str(), szSubDir);
+- AssertLogRelRCReturn(vrc, false);
+- vrc = RTPathAppend(szPath, sizeof(szPath), a_pszName);
+- AssertLogRelRCReturn(vrc, false);
+- if (!a_pszExt)
+- {
+- vrc = RTStrCat(szPath, sizeof(szPath), ".rel");
+- AssertLogRelRCReturn(vrc, false);
+- }
+- vrc = RTPathQueryInfo(szPath, a_pObjInfo, RTFSOBJATTRADD_UNIX);
+- if (RT_SUCCESS(vrc) && RTFS_IS_FILE(a_pObjInfo->Attr.fMode))
+- {
+- if (a_pfNative)
+- *a_pfNative = false;
+- *a_pStrFound = szPath;
+- return true;
+- }
+-
+- /* x86/module.rel */
+- vrc = RTPathJoin(szPath, sizeof(szPath), m->strExtPackPath.c_str(), RTBldCfgTargetArch());
+- AssertLogRelRCReturn(vrc, false);
+- vrc = RTPathAppend(szPath, sizeof(szPath), a_pszName);
+- AssertLogRelRCReturn(vrc, false);
+- if (!a_pszExt)
+- {
+- vrc = RTStrCat(szPath, sizeof(szPath), ".rel");
+- AssertLogRelRCReturn(vrc, false);
+- }
+- vrc = RTPathQueryInfo(szPath, a_pObjInfo, RTFSOBJATTRADD_UNIX);
+- if (RT_SUCCESS(vrc) && RTFS_IS_FILE(a_pObjInfo->Attr.fMode))
+- {
+- if (a_pfNative)
+- *a_pfNative = false;
+- *a_pStrFound = szPath;
+- return true;
+- }
+-
+- return false;
+-}
+-
+-/**
+- * Compares two file system object info structures.
+- *
+- * @returns true if equal, false if not.
+- * @param pObjInfo1 The first.
+- * @param pObjInfo2 The second.
+- * @todo IPRT should do this, really.
+- */
+-/* static */ bool ExtPack::objinfoIsEqual(PCRTFSOBJINFO pObjInfo1, PCRTFSOBJINFO pObjInfo2)
+-{
+- if (!RTTimeSpecIsEqual(&pObjInfo1->ModificationTime, &pObjInfo2->ModificationTime))
+- return false;
+- if (!RTTimeSpecIsEqual(&pObjInfo1->ChangeTime, &pObjInfo2->ChangeTime))
+- return false;
+- if (!RTTimeSpecIsEqual(&pObjInfo1->BirthTime, &pObjInfo2->BirthTime))
+- return false;
+- if (pObjInfo1->cbObject != pObjInfo2->cbObject)
+- return false;
+- if (pObjInfo1->Attr.fMode != pObjInfo2->Attr.fMode)
+- return false;
+- if (pObjInfo1->Attr.enmAdditional == pObjInfo2->Attr.enmAdditional)
+- {
+- switch (pObjInfo1->Attr.enmAdditional)
+- {
+- case RTFSOBJATTRADD_UNIX:
+- if (pObjInfo1->Attr.u.Unix.uid != pObjInfo2->Attr.u.Unix.uid)
+- return false;
+- if (pObjInfo1->Attr.u.Unix.gid != pObjInfo2->Attr.u.Unix.gid)
+- return false;
+- if (pObjInfo1->Attr.u.Unix.INodeIdDevice != pObjInfo2->Attr.u.Unix.INodeIdDevice)
+- return false;
+- if (pObjInfo1->Attr.u.Unix.INodeId != pObjInfo2->Attr.u.Unix.INodeId)
+- return false;
+- if (pObjInfo1->Attr.u.Unix.GenerationId != pObjInfo2->Attr.u.Unix.GenerationId)
+- return false;
+- break;
+- default:
+- break;
+- }
+- }
+- return true;
+-}
+-
+-
+-/**
+- * @interface_method_impl{VBOXEXTPACKHLP,pfnFindModule}
+- */
+-/*static*/ DECLCALLBACK(int)
+-ExtPack::hlpFindModule(PCVBOXEXTPACKHLP pHlp, const char *pszName, const char *pszExt, VBOXEXTPACKMODKIND enmKind,
+- char *pszFound, size_t cbFound, bool *pfNative)
+-{
+- /*
+- * Validate the input and get our bearings.
+- */
+- AssertPtrReturn(pszName, VERR_INVALID_POINTER);
+- AssertPtrNullReturn(pszExt, VERR_INVALID_POINTER);
+- AssertPtrReturn(pszFound, VERR_INVALID_POINTER);
+- AssertPtrNullReturn(pfNative, VERR_INVALID_POINTER);
+- AssertReturn(enmKind > VBOXEXTPACKMODKIND_INVALID && enmKind < VBOXEXTPACKMODKIND_END, VERR_INVALID_PARAMETER);
+-
+- AssertPtrReturn(pHlp, VERR_INVALID_POINTER);
+- AssertReturn(pHlp->u32Version == VBOXEXTPACKHLP_VERSION, VERR_INVALID_POINTER);
+- ExtPack::Data *m = RT_FROM_CPP_MEMBER(pHlp, Data, Hlp);
+- AssertPtrReturn(m, VERR_INVALID_POINTER);
+- ExtPack *pThis = m->pThis;
+- AssertPtrReturn(pThis, VERR_INVALID_POINTER);
+-
+- /*
+- * This is just a wrapper around findModule.
+- */
+- Utf8Str strFound;
+- if (pThis->findModule(pszName, pszExt, enmKind, &strFound, pfNative, NULL))
+- return RTStrCopy(pszFound, cbFound, strFound.c_str());
+- return VERR_FILE_NOT_FOUND;
+-}
+-
+-/*static*/ DECLCALLBACK(int)
+-ExtPack::hlpGetFilePath(PCVBOXEXTPACKHLP pHlp, const char *pszFilename, char *pszPath, size_t cbPath)
+-{
+- /*
+- * Validate the input and get our bearings.
+- */
+- AssertPtrReturn(pszFilename, VERR_INVALID_POINTER);
+- AssertPtrReturn(pszPath, VERR_INVALID_POINTER);
+- AssertReturn(cbPath > 0, VERR_BUFFER_OVERFLOW);
+-
+- AssertPtrReturn(pHlp, VERR_INVALID_POINTER);
+- AssertReturn(pHlp->u32Version == VBOXEXTPACKHLP_VERSION, VERR_INVALID_POINTER);
+- ExtPack::Data *m = RT_FROM_CPP_MEMBER(pHlp, Data, Hlp);
+- AssertPtrReturn(m, VERR_INVALID_POINTER);
+- ExtPack *pThis = m->pThis;
+- AssertPtrReturn(pThis, VERR_INVALID_POINTER);
+-
+- /*
+- * This is a simple RTPathJoin, no checking if things exists or anything.
+- */
+- int vrc = RTPathJoin(pszPath, cbPath, pThis->m->strExtPackPath.c_str(), pszFilename);
+- if (RT_FAILURE(vrc))
+- RT_BZERO(pszPath, cbPath);
+- return vrc;
+-}
+-
+-/*static*/ DECLCALLBACK(VBOXEXTPACKCTX)
+-ExtPack::hlpGetContext(PCVBOXEXTPACKHLP pHlp)
+-{
+- /*
+- * Validate the input and get our bearings.
+- */
+- AssertPtrReturn(pHlp, VBOXEXTPACKCTX_INVALID);
+- AssertReturn(pHlp->u32Version == VBOXEXTPACKHLP_VERSION, VBOXEXTPACKCTX_INVALID);
+- ExtPack::Data *m = RT_FROM_CPP_MEMBER(pHlp, Data, Hlp);
+- AssertPtrReturn(m, VBOXEXTPACKCTX_INVALID);
+- ExtPack *pThis = m->pThis;
+- AssertPtrReturn(pThis, VBOXEXTPACKCTX_INVALID);
+-
+- return pThis->m->enmContext;
+-}
+-
+-/*static*/ DECLCALLBACK(int)
+-ExtPack::hlpReservedN(PCVBOXEXTPACKHLP pHlp)
+-{
+- /*
+- * Validate the input and get our bearings.
+- */
+- AssertPtrReturn(pHlp, VERR_INVALID_POINTER);
+- AssertReturn(pHlp->u32Version == VBOXEXTPACKHLP_VERSION, VERR_INVALID_POINTER);
+- ExtPack::Data *m = RT_FROM_CPP_MEMBER(pHlp, Data, Hlp);
+- AssertPtrReturn(m, VERR_INVALID_POINTER);
+- ExtPack *pThis = m->pThis;
+- AssertPtrReturn(pThis, VERR_INVALID_POINTER);
+-
+- return VERR_NOT_IMPLEMENTED;
+-}
+-
+-
+-
+-
+-
+-STDMETHODIMP ExtPack::COMGETTER(Name)(BSTR *a_pbstrName)
+-{
+- CheckComArgOutPointerValid(a_pbstrName);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- Bstr str(m->Desc.strName);
+- str.cloneTo(a_pbstrName);
+- }
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPack::COMGETTER(Description)(BSTR *a_pbstrDescription)
+-{
+- CheckComArgOutPointerValid(a_pbstrDescription);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- Bstr str(m->Desc.strDescription);
+- str.cloneTo(a_pbstrDescription);
+- }
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPack::COMGETTER(Version)(BSTR *a_pbstrVersion)
+-{
+- CheckComArgOutPointerValid(a_pbstrVersion);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- /* HACK ALERT: This is for easing backporting to 4.1. The edition stuff
+- will be changed into a separate */
+- if (m->Desc.strEdition.isEmpty())
+- {
+- Bstr str(m->Desc.strVersion);
+- str.cloneTo(a_pbstrVersion);
+- }
+- else
+- {
+- RTCString strHack(m->Desc.strVersion);
+- strHack.append('-');
+- strHack.append(m->Desc.strEdition);
+-
+- Bstr str(strHack);
+- str.cloneTo(a_pbstrVersion);
+- }
+- }
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPack::COMGETTER(Revision)(ULONG *a_puRevision)
+-{
+- CheckComArgOutPointerValid(a_puRevision);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- *a_puRevision = m->Desc.uRevision;
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPack::COMGETTER(VRDEModule)(BSTR *a_pbstrVrdeModule)
+-{
+- CheckComArgOutPointerValid(a_pbstrVrdeModule);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- Bstr str(m->Desc.strVrdeModule);
+- str.cloneTo(a_pbstrVrdeModule);
+- }
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPack::COMGETTER(PlugIns)(ComSafeArrayOut(IExtPackPlugIn *, a_paPlugIns))
+-{
+- /** @todo implement plug-ins. */
+-#ifdef VBOX_WITH_XPCOM
+- NOREF(a_paPlugIns);
+- NOREF(a_paPlugInsSize);
+-#endif
+- ReturnComNotImplemented();
+-}
+-
+-STDMETHODIMP ExtPack::COMGETTER(Usable)(BOOL *a_pfUsable)
+-{
+- CheckComArgOutPointerValid(a_pfUsable);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- *a_pfUsable = m->fUsable;
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPack::COMGETTER(WhyUnusable)(BSTR *a_pbstrWhy)
+-{
+- CheckComArgOutPointerValid(a_pbstrWhy);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- m->strWhyUnusable.cloneTo(a_pbstrWhy);
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPack::COMGETTER(ShowLicense)(BOOL *a_pfShowIt)
+-{
+- CheckComArgOutPointerValid(a_pfShowIt);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- *a_pfShowIt = m->Desc.fShowLicense;
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPack::COMGETTER(License)(BSTR *a_pbstrHtmlLicense)
+-{
+- Bstr bstrHtml("html");
+- return QueryLicense(Bstr::Empty.raw(), Bstr::Empty.raw(), bstrHtml.raw(), a_pbstrHtmlLicense);
+-}
+-
+-STDMETHODIMP ExtPack::QueryLicense(IN_BSTR a_bstrPreferredLocale, IN_BSTR a_bstrPreferredLanguage, IN_BSTR a_bstrFormat,
+- BSTR *a_pbstrLicense)
+-{
+- /*
+- * Validate input.
+- */
+- CheckComArgOutPointerValid(a_pbstrLicense);
+- CheckComArgNotNull(a_bstrPreferredLocale);
+- CheckComArgNotNull(a_bstrPreferredLanguage);
+- CheckComArgNotNull(a_bstrFormat);
+-
+- Utf8Str strPreferredLocale(a_bstrPreferredLocale);
+- if (strPreferredLocale.length() != 2 && strPreferredLocale.length() != 0)
+- return setError(E_FAIL, tr("The preferred locale is a two character string or empty."));
+-
+- Utf8Str strPreferredLanguage(a_bstrPreferredLanguage);
+- if (strPreferredLanguage.length() != 2 && strPreferredLanguage.length() != 0)
+- return setError(E_FAIL, tr("The preferred lanuage is a two character string or empty."));
+-
+- Utf8Str strFormat(a_bstrFormat);
+- if ( !strFormat.equals("html")
+- && !strFormat.equals("rtf")
+- && !strFormat.equals("txt"))
+- return setError(E_FAIL, tr("The license format can only have the values 'html', 'rtf' and 'txt'."));
+-
+- /*
+- * Combine the options to form a file name before locking down anything.
+- */
+- char szName[sizeof(VBOX_EXTPACK_LICENSE_NAME_PREFIX "-de_DE.html") + 2];
+- if (strPreferredLocale.isNotEmpty() && strPreferredLanguage.isNotEmpty())
+- RTStrPrintf(szName, sizeof(szName), VBOX_EXTPACK_LICENSE_NAME_PREFIX "-%s_%s.%s",
+- strPreferredLocale.c_str(), strPreferredLanguage.c_str(), strFormat.c_str());
+- else if (strPreferredLocale.isNotEmpty())
+- RTStrPrintf(szName, sizeof(szName), VBOX_EXTPACK_LICENSE_NAME_PREFIX "-%s.%s", strPreferredLocale.c_str(), strFormat.c_str());
+- else if (strPreferredLanguage.isNotEmpty())
+- RTStrPrintf(szName, sizeof(szName), VBOX_EXTPACK_LICENSE_NAME_PREFIX "-_%s.%s", strPreferredLocale.c_str(), strFormat.c_str());
+- else
+- RTStrPrintf(szName, sizeof(szName), VBOX_EXTPACK_LICENSE_NAME_PREFIX ".%s", strFormat.c_str());
+-
+- /*
+- * Effectuate the query.
+- */
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS); /* paranoia */
+-
+- if (!m->fUsable)
+- hrc = setError(E_FAIL, tr("%s"), m->strWhyUnusable.c_str());
+- else
+- {
+- char szPath[RTPATH_MAX];
+- int vrc = RTPathJoin(szPath, sizeof(szPath), m->strExtPackPath.c_str(), szName);
+- if (RT_SUCCESS(vrc))
+- {
+- void *pvFile;
+- size_t cbFile;
+- vrc = RTFileReadAllEx(szPath, 0, RTFOFF_MAX, RTFILE_RDALL_O_DENY_READ, &pvFile, &cbFile);
+- if (RT_SUCCESS(vrc))
+- {
+- Bstr bstrLicense((const char *)pvFile, cbFile);
+- if (bstrLicense.isNotEmpty())
+- {
+- bstrLicense.detachTo(a_pbstrLicense);
+- hrc = S_OK;
+- }
+- else
+- hrc = setError(VBOX_E_IPRT_ERROR, tr("The license file '%s' is empty or contains invalid UTF-8 encoding"),
+- szPath);
+- RTFileReadAllFree(pvFile, cbFile);
+- }
+- else if (vrc == VERR_FILE_NOT_FOUND || vrc == VERR_PATH_NOT_FOUND)
+- hrc = setError(VBOX_E_OBJECT_NOT_FOUND, tr("The license file '%s' was not found in extension pack '%s'"),
+- szName, m->Desc.strName.c_str());
+- else
+- hrc = setError(VBOX_E_FILE_ERROR, tr("Failed to open the license file '%s': %Rrc"), szPath, vrc);
+- }
+- else
+- hrc = setError(VBOX_E_IPRT_ERROR, tr("RTPathJoin failed: %Rrc"), vrc);
+- }
+- }
+- return hrc;
+-}
+-
+-
+-STDMETHODIMP ExtPack::QueryObject(IN_BSTR a_bstrObjectId, IUnknown **a_ppUnknown)
+-{
+- com::Guid ObjectId;
+- CheckComArgGuid(a_bstrObjectId, ObjectId);
+- CheckComArgOutPointerValid(a_ppUnknown);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- if ( m->pReg
+- && m->pReg->pfnQueryObject)
+- {
+- void *pvUnknown = m->pReg->pfnQueryObject(m->pReg, ObjectId.raw());
+- if (pvUnknown)
+- *a_ppUnknown = (IUnknown *)pvUnknown;
+- else
+- hrc = E_NOINTERFACE;
+- }
+- else
+- hrc = E_NOINTERFACE;
+- }
+- return hrc;
+-}
+-
+-
+-
+-
+-DEFINE_EMPTY_CTOR_DTOR(ExtPackManager)
+-
+-/**
+- * Called by ComObjPtr::createObject when creating the object.
+- *
+- * Just initialize the basic object state, do the rest in init().
+- *
+- * @returns S_OK.
+- */
+-HRESULT ExtPackManager::FinalConstruct()
+-{
+- m = NULL;
+- return S_OK;
+-}
+-
+-/**
+- * Initializes the extension pack manager.
+- *
+- * @returns COM status code.
+- * @param a_pVirtualBox Pointer to the VirtualBox object.
+- * @param a_enmContext The context we're in.
+- */
+-HRESULT ExtPackManager::initExtPackManager(VirtualBox *a_pVirtualBox, VBOXEXTPACKCTX a_enmContext)
+-{
+- AutoInitSpan autoInitSpan(this);
+- AssertReturn(autoInitSpan.isOk(), E_FAIL);
+-
+- /*
+- * Figure some stuff out before creating the instance data.
+- */
+- char szBaseDir[RTPATH_MAX];
+- int rc = RTPathAppPrivateArchTop(szBaseDir, sizeof(szBaseDir));
+- AssertLogRelRCReturn(rc, E_FAIL);
+- rc = RTPathAppend(szBaseDir, sizeof(szBaseDir), VBOX_EXTPACK_INSTALL_DIR);
+- AssertLogRelRCReturn(rc, E_FAIL);
+-
+- char szCertificatDir[RTPATH_MAX];
+- rc = RTPathAppPrivateNoArch(szCertificatDir, sizeof(szCertificatDir));
+- AssertLogRelRCReturn(rc, E_FAIL);
+- rc = RTPathAppend(szCertificatDir, sizeof(szCertificatDir), VBOX_EXTPACK_CERT_DIR);
+- AssertLogRelRCReturn(rc, E_FAIL);
+-
+- /*
+- * Allocate and initialize the instance data.
+- */
+- m = new Data;
+- m->strBaseDir = szBaseDir;
+- m->strCertificatDirPath = szCertificatDir;
+- m->pVirtualBox = a_pVirtualBox;
+- m->enmContext = a_enmContext;
+-
+- /*
+- * Slurp in VBoxVMM which is used by VBoxPuelMain.
+- */
+-#if !defined(RT_OS_WINDOWS) && !defined(RT_OS_DARWIN)
+- if (a_enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON)
+- {
+- int vrc = SUPR3HardenedLdrLoadAppPriv("VBoxVMM", &m->hVBoxVMM, RTLDRLOAD_FLAGS_GLOBAL, NULL);
+- if (RT_FAILURE(vrc))
+- m->hVBoxVMM = NIL_RTLDRMOD;
+- /* cleanup in ::uninit()? */
+- }
+-#endif
+-
+- /*
+- * Go looking for extensions. The RTDirOpen may fail if nothing has been
+- * installed yet, or if root is paranoid and has revoked our access to them.
+- *
+- * We ASSUME that there are no files, directories or stuff in the directory
+- * that exceed the max name length in RTDIRENTRYEX.
+- */
+- HRESULT hrc = S_OK;
+- PRTDIR pDir;
+- int vrc = RTDirOpen(&pDir, szBaseDir);
+- if (RT_SUCCESS(vrc))
+- {
+- for (;;)
+- {
+- RTDIRENTRYEX Entry;
+- vrc = RTDirReadEx(pDir, &Entry, NULL /*pcbDirEntry*/, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK);
+- if (RT_FAILURE(vrc))
+- {
+- AssertLogRelMsg(vrc == VERR_NO_MORE_FILES, ("%Rrc\n", vrc));
+- break;
+- }
+- if ( RTFS_IS_DIRECTORY(Entry.Info.Attr.fMode)
+- && strcmp(Entry.szName, ".") != 0
+- && strcmp(Entry.szName, "..") != 0
+- && VBoxExtPackIsValidMangledName(Entry.szName) )
+- {
+- /*
+- * All directories are extensions, the shall be nothing but
+- * extensions in this subdirectory.
+- */
+- char szExtPackDir[RTPATH_MAX];
+- vrc = RTPathJoin(szExtPackDir, sizeof(szExtPackDir), m->strBaseDir.c_str(), Entry.szName);
+- AssertLogRelRC(vrc);
+- if (RT_SUCCESS(vrc))
+- {
+- RTCString *pstrName = VBoxExtPackUnmangleName(Entry.szName, RTSTR_MAX);
+- AssertLogRel(pstrName);
+- if (pstrName)
+- {
+- ComObjPtr<ExtPack> NewExtPack;
+- HRESULT hrc2 = NewExtPack.createObject();
+- if (SUCCEEDED(hrc2))
+- hrc2 = NewExtPack->initWithDir(a_enmContext, pstrName->c_str(), szExtPackDir);
+- delete pstrName;
+- if (SUCCEEDED(hrc2))
+- m->llInstalledExtPacks.push_back(NewExtPack);
+- else if (SUCCEEDED(rc))
+- hrc = hrc2;
+- }
+- else
+- hrc = E_UNEXPECTED;
+- }
+- else
+- hrc = E_UNEXPECTED;
+- }
+- }
+- RTDirClose(pDir);
+- }
+- /* else: ignore, the directory probably does not exist or something. */
+-
+- if (SUCCEEDED(hrc))
+- autoInitSpan.setSucceeded();
+- return hrc;
+-}
+-
+-/**
+- * COM cruft.
+- */
+-void ExtPackManager::FinalRelease()
+-{
+- uninit();
+-}
+-
+-/**
+- * Do the actual cleanup.
+- */
+-void ExtPackManager::uninit()
+-{
+- /* Enclose the state transition Ready->InUninit->NotReady */
+- AutoUninitSpan autoUninitSpan(this);
+- if (!autoUninitSpan.uninitDone() && m != NULL)
+- {
+- delete m;
+- m = NULL;
+- }
+-}
+-
+-
+-STDMETHODIMP ExtPackManager::COMGETTER(InstalledExtPacks)(ComSafeArrayOut(IExtPack *, a_paExtPacks))
+-{
+- CheckComArgOutSafeArrayPointerValid(a_paExtPacks);
+- Assert(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+-
+- SafeIfaceArray<IExtPack> SaExtPacks(m->llInstalledExtPacks);
+- SaExtPacks.detachTo(ComSafeArrayOutArg(a_paExtPacks));
+- }
+-
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackManager::Find(IN_BSTR a_bstrName, IExtPack **a_pExtPack)
+-{
+- CheckComArgNotNull(a_bstrName);
+- CheckComArgOutPointerValid(a_pExtPack);
+- Utf8Str strName(a_bstrName);
+- Assert(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+-
+- ComPtr<ExtPack> ptrExtPack = findExtPack(strName.c_str());
+- if (!ptrExtPack.isNull())
+- ptrExtPack.queryInterfaceTo(a_pExtPack);
+- else
+- hrc = VBOX_E_OBJECT_NOT_FOUND;
+- }
+-
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackManager::OpenExtPackFile(IN_BSTR a_bstrTarballAndDigest, IExtPackFile **a_ppExtPackFile)
+-{
+- CheckComArgNotNull(a_bstrTarballAndDigest);
+- CheckComArgOutPointerValid(a_ppExtPackFile);
+- AssertReturn(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON, E_UNEXPECTED);
+-
+- /* The API can optionally take a ::SHA-256=<hex-digest> attribute at the
+- end of the file name. This is just a temporary measure for
+- backporting, in 4.2 we'll add another parameter to the method. */
+- Utf8Str strTarball;
+- Utf8Str strDigest;
+- Utf8Str strTarballAndDigest(a_bstrTarballAndDigest);
+- size_t offSha256 = strTarballAndDigest.find("::SHA-256=");
+- if (offSha256 == Utf8Str::npos)
+- strTarball = strTarballAndDigest;
+- else
+- {
+- strTarball = strTarballAndDigest.substr(0, offSha256);
+- strDigest = strTarballAndDigest.substr(offSha256 + sizeof("::SHA-256=") - 1);
+- }
+-
+- ComObjPtr<ExtPackFile> NewExtPackFile;
+- HRESULT hrc = NewExtPackFile.createObject();
+- if (SUCCEEDED(hrc))
+- hrc = NewExtPackFile->initWithFile(strTarball.c_str(), strDigest.c_str(), this, m->pVirtualBox);
+- if (SUCCEEDED(hrc))
+- NewExtPackFile.queryInterfaceTo(a_ppExtPackFile);
+-
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackManager::Uninstall(IN_BSTR a_bstrName, BOOL a_fForcedRemoval, IN_BSTR a_bstrDisplayInfo,
+- IProgress **a_ppProgress)
+-{
+- CheckComArgNotNull(a_bstrName);
+- if (a_ppProgress)
+- *a_ppProgress = NULL;
+- Assert(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- PEXTPACKUNINSTALLJOB pJob = NULL;
+- try
+- {
+- pJob = new EXTPACKUNINSTALLJOB;
+- pJob->ptrExtPackMgr = this;
+- pJob->strName = a_bstrName;
+- pJob->fForcedRemoval = a_fForcedRemoval != FALSE;
+- pJob->strDisplayInfo = a_bstrDisplayInfo;
+- hrc = pJob->ptrProgress.createObject();
+- if (SUCCEEDED(hrc))
+- {
+- Bstr bstrDescription = tr("Uninstalling extension pack");
+- hrc = pJob->ptrProgress->init(
+-#ifndef VBOX_COM_INPROC
+- m->pVirtualBox,
+-#endif
+- static_cast<IExtPackManager *>(this),
+- bstrDescription.raw(),
+- FALSE /*aCancelable*/,
+- NULL /*aId*/);
+- }
+- if (SUCCEEDED(hrc))
+- {
+- ComPtr<Progress> ptrProgress = pJob->ptrProgress;
+- int vrc = RTThreadCreate(NULL /*phThread*/, ExtPackManager::doUninstallThreadProc, pJob, 0,
+- RTTHREADTYPE_DEFAULT, 0 /*fFlags*/, "ExtPackUninst");
+- if (RT_SUCCESS(vrc))
+- {
+- pJob = NULL; /* the thread deletes it */
+- ptrProgress.queryInterfaceTo(a_ppProgress);
+- }
+- else
+- hrc = setError(VBOX_E_IPRT_ERROR, tr("RTThreadCreate failed with %Rrc"), vrc);
+- }
+- }
+- catch (std::bad_alloc)
+- {
+- hrc = E_OUTOFMEMORY;
+- }
+- if (pJob)
+- delete pJob;
+- }
+-
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackManager::Cleanup(void)
+-{
+- Assert(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- /*
+- * Run the set-uid-to-root binary that performs the cleanup.
+- *
+- * Take the write lock to prevent conflicts with other calls to this
+- * VBoxSVC instance.
+- */
+- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+- hrc = runSetUidToRootHelper(NULL,
+- "cleanup",
+- "--base-dir", m->strBaseDir.c_str(),
+- (const char *)NULL);
+- }
+-
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackManager::QueryAllPlugInsForFrontend(IN_BSTR a_bstrFrontend, ComSafeArrayOut(BSTR, a_pabstrPlugInModules))
+-{
+- CheckComArgNotNull(a_bstrFrontend);
+- Utf8Str strName(a_bstrFrontend);
+- CheckComArgOutSafeArrayPointerValid(a_pabstrPlugInModules);
+- Assert(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- com::SafeArray<BSTR> saPaths((size_t)0);
+- /** @todo implement plug-ins */
+- saPaths.detachTo(ComSafeArrayOutArg(a_pabstrPlugInModules));
+- }
+- return hrc;
+-}
+-
+-STDMETHODIMP ExtPackManager::IsExtPackUsable(IN_BSTR a_bstrExtPack, BOOL *aUsable)
+-{
+- CheckComArgNotNull(a_bstrExtPack);
+- Utf8Str strExtPack(a_bstrExtPack);
+- *aUsable = isExtPackUsable(strExtPack.c_str());
+- return S_OK;
+-}
+-
+-/**
+- * Finds the success indicator string in the stderr output ofr hte helper app.
+- *
+- * @returns Pointer to the indicator.
+- * @param psz The stderr output string. Can be NULL.
+- * @param cch The size of the string.
+- */
+-static char *findSuccessIndicator(char *psz, size_t cch)
+-{
+- static const char s_szSuccessInd[] = "rcExit=RTEXITCODE_SUCCESS";
+- Assert(!cch || strlen(psz) == cch);
+- if (cch < sizeof(s_szSuccessInd) - 1)
+- return NULL;
+- char *pszInd = &psz[cch - sizeof(s_szSuccessInd) + 1];
+- if (strcmp(s_szSuccessInd, pszInd))
+- return NULL;
+- return pszInd;
+-}
+-
+-/**
+- * Runs the helper application that does the privileged operations.
+- *
+- * @returns S_OK or a failure status with error information set.
+- * @param a_pstrDisplayInfo Platform specific display info hacks.
+- * @param a_pszCommand The command to execute.
+- * @param ... The argument strings that goes along with the
+- * command. Maximum is about 16. Terminated by a
+- * NULL.
+- */
+-HRESULT ExtPackManager::runSetUidToRootHelper(Utf8Str const *a_pstrDisplayInfo, const char *a_pszCommand, ...)
+-{
+- /*
+- * Calculate the path to the helper application.
+- */
+- char szExecName[RTPATH_MAX];
+- int vrc = RTPathAppPrivateArch(szExecName, sizeof(szExecName));
+- AssertLogRelRCReturn(vrc, E_UNEXPECTED);
+-
+- vrc = RTPathAppend(szExecName, sizeof(szExecName), VBOX_EXTPACK_HELPER_NAME);
+- AssertLogRelRCReturn(vrc, E_UNEXPECTED);
+-
+- /*
+- * Convert the variable argument list to a RTProcCreate argument vector.
+- */
+- const char *apszArgs[20];
+- unsigned cArgs = 0;
+-
+- LogRel(("ExtPack: Executing '%s'", szExecName));
+- apszArgs[cArgs++] = &szExecName[0];
+-
+- if ( a_pstrDisplayInfo
+- && a_pstrDisplayInfo->isNotEmpty())
+- {
+- LogRel((" '--display-info-hack' '%s'", a_pstrDisplayInfo->c_str()));
+- apszArgs[cArgs++] = "--display-info-hack";
+- apszArgs[cArgs++] = a_pstrDisplayInfo->c_str();
+- }
+-
+- LogRel(("'%s'", a_pszCommand));
+- apszArgs[cArgs++] = a_pszCommand;
+-
+- va_list va;
+- va_start(va, a_pszCommand);
+- const char *pszLastArg;
+- for (;;)
+- {
+- AssertReturn(cArgs < RT_ELEMENTS(apszArgs) - 1, E_UNEXPECTED);
+- pszLastArg = va_arg(va, const char *);
+- if (!pszLastArg)
+- break;
+- LogRel((" '%s'", pszLastArg));
+- apszArgs[cArgs++] = pszLastArg;
+- };
+- va_end(va);
+-
+- LogRel(("\n"));
+- apszArgs[cArgs] = NULL;
+-
+- /*
+- * Create a PIPE which we attach to stderr so that we can read the error
+- * message on failure and report it back to the caller.
+- */
+- RTPIPE hPipeR;
+- RTHANDLE hStdErrPipe;
+- hStdErrPipe.enmType = RTHANDLETYPE_PIPE;
+- vrc = RTPipeCreate(&hPipeR, &hStdErrPipe.u.hPipe, RTPIPE_C_INHERIT_WRITE);
+- AssertLogRelRCReturn(vrc, E_UNEXPECTED);
+-
+- /*
+- * Spawn the process.
+- */
+- HRESULT hrc;
+- RTPROCESS hProcess;
+- vrc = RTProcCreateEx(szExecName,
+- apszArgs,
+- RTENV_DEFAULT,
+- 0 /*fFlags*/,
+- NULL /*phStdIn*/,
+- NULL /*phStdOut*/,
+- &hStdErrPipe,
+- NULL /*pszAsUser*/,
+- NULL /*pszPassword*/,
+- &hProcess);
+- if (RT_SUCCESS(vrc))
+- {
+- vrc = RTPipeClose(hStdErrPipe.u.hPipe);
+- hStdErrPipe.u.hPipe = NIL_RTPIPE;
+-
+- /*
+- * Read the pipe output until the process completes.
+- */
+- RTPROCSTATUS ProcStatus = { -42, RTPROCEXITREASON_ABEND };
+- size_t cbStdErrBuf = 0;
+- size_t offStdErrBuf = 0;
+- char *pszStdErrBuf = NULL;
+- do
+- {
+- /*
+- * Service the pipe. Block waiting for output or the pipe breaking
+- * when the process terminates.
+- */
+- if (hPipeR != NIL_RTPIPE)
+- {
+- char achBuf[1024];
+- size_t cbRead;
+- vrc = RTPipeReadBlocking(hPipeR, achBuf, sizeof(achBuf), &cbRead);
+- if (RT_SUCCESS(vrc))
+- {
+- /* grow the buffer? */
+- size_t cbBufReq = offStdErrBuf + cbRead + 1;
+- if ( cbBufReq > cbStdErrBuf
+- && cbBufReq < _256K)
+- {
+- size_t cbNew = RT_ALIGN_Z(cbBufReq, 16); // 1024
+- void *pvNew = RTMemRealloc(pszStdErrBuf, cbNew);
+- if (pvNew)
+- {
+- pszStdErrBuf = (char *)pvNew;
+- cbStdErrBuf = cbNew;
+- }
+- }
+-
+- /* append if we've got room. */
+- if (cbBufReq <= cbStdErrBuf)
+- {
+- memcpy(&pszStdErrBuf[offStdErrBuf], achBuf, cbRead);
+- offStdErrBuf = offStdErrBuf + cbRead;
+- pszStdErrBuf[offStdErrBuf] = '\0';
+- }
+- }
+- else
+- {
+- AssertLogRelMsg(vrc == VERR_BROKEN_PIPE, ("%Rrc\n", vrc));
+- RTPipeClose(hPipeR);
+- hPipeR = NIL_RTPIPE;
+- }
+- }
+-
+- /*
+- * Service the process. Block if we have no pipe.
+- */
+- if (hProcess != NIL_RTPROCESS)
+- {
+- vrc = RTProcWait(hProcess,
+- hPipeR == NIL_RTPIPE ? RTPROCWAIT_FLAGS_BLOCK : RTPROCWAIT_FLAGS_NOBLOCK,
+- &ProcStatus);
+- if (RT_SUCCESS(vrc))
+- hProcess = NIL_RTPROCESS;
+- else
+- AssertLogRelMsgStmt(vrc == VERR_PROCESS_RUNNING, ("%Rrc\n", vrc), hProcess = NIL_RTPROCESS);
+- }
+- } while ( hPipeR != NIL_RTPIPE
+- || hProcess != NIL_RTPROCESS);
+-
+- LogRel(("ExtPack: enmReason=%d iStatus=%d stderr='%s'\n",
+- ProcStatus.enmReason, ProcStatus.iStatus, offStdErrBuf ? pszStdErrBuf : ""));
+-
+- /*
+- * Look for rcExit=RTEXITCODE_SUCCESS at the end of the error output,
+- * cut it as it is only there to attest the success.
+- */
+- if (offStdErrBuf > 0)
+- {
+- RTStrStripR(pszStdErrBuf);
+- offStdErrBuf = strlen(pszStdErrBuf);
+- }
+-
+- char *pszSuccessInd = findSuccessIndicator(pszStdErrBuf, offStdErrBuf);
+- if (pszSuccessInd)
+- {
+- *pszSuccessInd = '\0';
+- offStdErrBuf = pszSuccessInd - pszStdErrBuf;
+- }
+- else if ( ProcStatus.enmReason == RTPROCEXITREASON_NORMAL
+- && ProcStatus.iStatus == 0)
+- ProcStatus.iStatus = offStdErrBuf ? 667 : 666;
+-
+- /*
+- * Compose the status code and, on failure, error message.
+- */
+- if ( ProcStatus.enmReason == RTPROCEXITREASON_NORMAL
+- && ProcStatus.iStatus == 0)
+- hrc = S_OK;
+- else if (ProcStatus.enmReason == RTPROCEXITREASON_NORMAL)
+- {
+- AssertMsg(ProcStatus.iStatus != 0, ("%s\n", pszStdErrBuf));
+- hrc = setError(E_FAIL, tr("The installer failed with exit code %d: %s"),
+- ProcStatus.iStatus, offStdErrBuf ? pszStdErrBuf : "");
+- }
+- else if (ProcStatus.enmReason == RTPROCEXITREASON_SIGNAL)
+- hrc = setError(E_UNEXPECTED, tr("The installer was killed by signal #d (stderr: %s)"),
+- ProcStatus.iStatus, offStdErrBuf ? pszStdErrBuf : "");
+- else if (ProcStatus.enmReason == RTPROCEXITREASON_ABEND)
+- hrc = setError(E_UNEXPECTED, tr("The installer aborted abnormally (stderr: %s)"),
+- offStdErrBuf ? pszStdErrBuf : "");
+- else
+- hrc = setError(E_UNEXPECTED, tr("internal error: enmReason=%d iStatus=%d stderr='%s'"),
+- ProcStatus.enmReason, ProcStatus.iStatus, offStdErrBuf ? pszStdErrBuf : "");
+-
+- RTMemFree(pszStdErrBuf);
+- }
+- else
+- hrc = setError(VBOX_E_IPRT_ERROR, tr("Failed to launch the helper application '%s' (%Rrc)"), szExecName, vrc);
+-
+- RTPipeClose(hPipeR);
+- RTPipeClose(hStdErrPipe.u.hPipe);
+-
+- return hrc;
+-}
+-
+-/**
+- * Finds an installed extension pack.
+- *
+- * @returns Pointer to the extension pack if found, NULL if not. (No reference
+- * counting problem here since the caller must be holding the lock.)
+- * @param a_pszName The name of the extension pack.
+- */
+-ExtPack *ExtPackManager::findExtPack(const char *a_pszName)
+-{
+- size_t cchName = strlen(a_pszName);
+-
+- for (ExtPackList::iterator it = m->llInstalledExtPacks.begin();
+- it != m->llInstalledExtPacks.end();
+- it++)
+- {
+- ExtPack::Data *pExtPackData = (*it)->m;
+- if ( pExtPackData
+- && pExtPackData->Desc.strName.length() == cchName
+- && pExtPackData->Desc.strName.equalsIgnoreCase(a_pszName))
+- return (*it);
+- }
+- return NULL;
+-}
+-
+-/**
+- * Removes an installed extension pack from the internal list.
+- *
+- * The package is expected to exist!
+- *
+- * @param a_pszName The name of the extension pack.
+- */
+-void ExtPackManager::removeExtPack(const char *a_pszName)
+-{
+- size_t cchName = strlen(a_pszName);
+-
+- for (ExtPackList::iterator it = m->llInstalledExtPacks.begin();
+- it != m->llInstalledExtPacks.end();
+- it++)
+- {
+- ExtPack::Data *pExtPackData = (*it)->m;
+- if ( pExtPackData
+- && pExtPackData->Desc.strName.length() == cchName
+- && pExtPackData->Desc.strName.equalsIgnoreCase(a_pszName))
+- {
+- m->llInstalledExtPacks.erase(it);
+- return;
+- }
+- }
+- AssertMsgFailed(("%s\n", a_pszName));
+-}
+-
+-/**
+- * Refreshes the specified extension pack.
+- *
+- * This may remove the extension pack from the list, so any non-smart pointers
+- * to the extension pack object may become invalid.
+- *
+- * @returns S_OK and *a_ppExtPack on success, COM status code and error
+- * message on failure. Note that *a_ppExtPack can be NULL.
+- *
+- * @param a_pszName The extension to update..
+- * @param a_fUnusableIsError If @c true, report an unusable extension pack
+- * as an error.
+- * @param a_ppExtPack Where to store the pointer to the extension
+- * pack of it is still around after the refresh.
+- * This is optional.
+- *
+- * @remarks Caller holds the extension manager lock.
+- * @remarks Only called in VBoxSVC.
+- */
+-HRESULT ExtPackManager::refreshExtPack(const char *a_pszName, bool a_fUnusableIsError, ExtPack **a_ppExtPack)
+-{
+- Assert(m->pVirtualBox != NULL); /* Only called from VBoxSVC. */
+-
+- HRESULT hrc;
+- ExtPack *pExtPack = findExtPack(a_pszName);
+- if (pExtPack)
+- {
+- /*
+- * Refresh existing object.
+- */
+- bool fCanDelete;
+- hrc = pExtPack->refresh(&fCanDelete);
+- if (SUCCEEDED(hrc))
+- {
+- if (fCanDelete)
+- {
+- removeExtPack(a_pszName);
+- pExtPack = NULL;
+- }
+- }
+- }
+- else
+- {
+- /*
+- * Do this check here, otherwise VBoxExtPackCalcDir() will fail with a strange
+- * error.
+- */
+- bool fValid = VBoxExtPackIsValidName(a_pszName);
+- if (!fValid)
+- return setError(E_FAIL, "Invalid extension pack name specified");
+-
+- /*
+- * Does the dir exist? Make some special effort to deal with case
+- * sensitivie file systems (a_pszName is case insensitive and mangled).
+- */
+- char szDir[RTPATH_MAX];
+- int vrc = VBoxExtPackCalcDir(szDir, sizeof(szDir), m->strBaseDir.c_str(), a_pszName);
+- AssertLogRelRCReturn(vrc, E_FAIL);
+-
+- RTDIRENTRYEX Entry;
+- RTFSOBJINFO ObjInfo;
+- vrc = RTPathQueryInfoEx(szDir, &ObjInfo, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK);
+- bool fExists = RT_SUCCESS(vrc) && RTFS_IS_DIRECTORY(ObjInfo.Attr.fMode);
+- if (!fExists)
+- {
+- PRTDIR pDir;
+- vrc = RTDirOpen(&pDir, m->strBaseDir.c_str());
+- if (RT_SUCCESS(vrc))
+- {
+- const char *pszMangledName = RTPathFilename(szDir);
+- for (;;)
+- {
+- vrc = RTDirReadEx(pDir, &Entry, NULL /*pcbDirEntry*/, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK);
+- if (RT_FAILURE(vrc))
+- {
+- AssertLogRelMsg(vrc == VERR_NO_MORE_FILES, ("%Rrc\n", vrc));
+- break;
+- }
+- if ( RTFS_IS_DIRECTORY(Entry.Info.Attr.fMode)
+- && !RTStrICmp(Entry.szName, pszMangledName))
+- {
+- /*
+- * The installed extension pack has a uses different case.
+- * Update the name and directory variables.
+- */
+- vrc = RTPathJoin(szDir, sizeof(szDir), m->strBaseDir.c_str(), Entry.szName); /* not really necessary */
+- AssertLogRelRCReturnStmt(vrc, RTDirClose(pDir), E_UNEXPECTED);
+- a_pszName = Entry.szName;
+- fExists = true;
+- break;
+- }
+- }
+- RTDirClose(pDir);
+- }
+- }
+- if (fExists)
+- {
+- /*
+- * We've got something, create a new extension pack object for it.
+- */
+- ComObjPtr<ExtPack> ptrNewExtPack;
+- hrc = ptrNewExtPack.createObject();
+- if (SUCCEEDED(hrc))
+- hrc = ptrNewExtPack->initWithDir(m->enmContext, a_pszName, szDir);
+- if (SUCCEEDED(hrc))
+- {
+- m->llInstalledExtPacks.push_back(ptrNewExtPack);
+- if (ptrNewExtPack->m->fUsable)
+- LogRel(("ExtPackManager: Found extension pack '%s'.\n", a_pszName));
+- else
+- LogRel(("ExtPackManager: Found bad extension pack '%s': %s\n",
+- a_pszName, ptrNewExtPack->m->strWhyUnusable.c_str() ));
+- pExtPack = ptrNewExtPack;
+- }
+- }
+- else
+- hrc = S_OK;
+- }
+-
+- /*
+- * Report error if not usable, if that is desired.
+- */
+- if ( SUCCEEDED(hrc)
+- && pExtPack
+- && a_fUnusableIsError
+- && !pExtPack->m->fUsable)
+- hrc = setError(E_FAIL, "%s", pExtPack->m->strWhyUnusable.c_str());
+-
+- if (a_ppExtPack)
+- *a_ppExtPack = pExtPack;
+- return hrc;
+-}
+-
+-/**
+- * Thread wrapper around doInstall.
+- *
+- * @returns VINF_SUCCESS (ignored)
+- * @param hThread The thread handle (ignored).
+- * @param pvJob The job structure.
+- */
+-/*static*/ DECLCALLBACK(int) ExtPackManager::doInstallThreadProc(RTTHREAD hThread, void *pvJob)
+-{
+- PEXTPACKINSTALLJOB pJob = (PEXTPACKINSTALLJOB)pvJob;
+- HRESULT hrc = pJob->ptrExtPackMgr->doInstall(pJob->ptrExtPackFile, pJob->fReplace, &pJob->strDisplayInfo);
+- pJob->ptrProgress->notifyComplete(hrc);
+- delete pJob;
+-
+- NOREF(hThread);
+- return VINF_SUCCESS;
+-}
+-
+-/**
+- * Worker for IExtPackFile::Install.
+- *
+- * Called on a worker thread via doInstallThreadProc.
+- *
+- * @returns COM status code.
+- * @param a_pExtPackFile The extension pack file, caller checks that
+- * it's usable.
+- * @param a_fReplace Whether to replace any existing extpack or just
+- * fail.
+- * @param a_pstrDisplayInfo Host specific display information hacks.
+- * @param a_ppProgress Where to return a progress object some day. Can
+- * be NULL.
+- */
+-HRESULT ExtPackManager::doInstall(ExtPackFile *a_pExtPackFile, bool a_fReplace, Utf8Str const *a_pstrDisplayInfo)
+-{
+- AssertReturn(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON, E_UNEXPECTED);
+- RTCString const * const pStrName = &a_pExtPackFile->m->Desc.strName;
+- RTCString const * const pStrTarball = &a_pExtPackFile->m->strExtPackFile;
+- RTCString const * const pStrTarballDigest = &a_pExtPackFile->m->strDigest;
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+-
+- /*
+- * Refresh the data we have on the extension pack as it
+- * may be made stale by direct meddling or some other user.
+- */
+- ExtPack *pExtPack;
+- hrc = refreshExtPack(pStrName->c_str(), false /*a_fUnusableIsError*/, &pExtPack);
+- if (SUCCEEDED(hrc))
+- {
+- if (pExtPack && a_fReplace)
+- hrc = pExtPack->callUninstallHookAndClose(m->pVirtualBox, false /*a_ForcedRemoval*/);
+- else if (pExtPack)
+- hrc = setError(E_FAIL,
+- tr("Extension pack '%s' is already installed."
+- " In case of a reinstallation, please uninstall it first"),
+- pStrName->c_str());
+- }
+- if (SUCCEEDED(hrc))
+- {
+- /*
+- * Run the privileged helper binary that performs the actual
+- * installation. Then create an object for the packet (we do this
+- * even on failure, to be on the safe side).
+- */
+- hrc = runSetUidToRootHelper(a_pstrDisplayInfo,
+- "install",
+- "--base-dir", m->strBaseDir.c_str(),
+- "--cert-dir", m->strCertificatDirPath.c_str(),
+- "--name", pStrName->c_str(),
+- "--tarball", pStrTarball->c_str(),
+- "--sha-256", pStrTarballDigest->c_str(),
+- pExtPack ? "--replace" : (const char *)NULL,
+- (const char *)NULL);
+- if (SUCCEEDED(hrc))
+- {
+- hrc = refreshExtPack(pStrName->c_str(), true /*a_fUnusableIsError*/, &pExtPack);
+- if (SUCCEEDED(hrc) && pExtPack)
+- {
+- RTERRINFOSTATIC ErrInfo;
+- RTErrInfoInitStatic(&ErrInfo);
+- pExtPack->callInstalledHook(m->pVirtualBox, &autoLock, &ErrInfo.Core);
+- if (RT_SUCCESS(ErrInfo.Core.rc))
+- LogRel(("ExtPackManager: Successfully installed extension pack '%s'.\n", pStrName->c_str()));
+- else
+- {
+- LogRel(("ExtPackManager: Installated hook for '%s' failed: %Rrc - %s\n",
+- pStrName->c_str(), ErrInfo.Core.rc, ErrInfo.Core.pszMsg));
+-
+- /*
+- * Uninstall the extpack if the error indicates that.
+- */
+- if (ErrInfo.Core.rc == VERR_EXTPACK_UNSUPPORTED_HOST_UNINSTALL)
+- runSetUidToRootHelper(a_pstrDisplayInfo,
+- "uninstall",
+- "--base-dir", m->strBaseDir.c_str(),
+- "--name", pStrName->c_str(),
+- "--forced",
+- (const char *)NULL);
+- hrc = setError(E_FAIL, tr("The installation hook failed: %Rrc - %s"),
+- ErrInfo.Core.rc, ErrInfo.Core.pszMsg);
+- }
+- }
+- else if (SUCCEEDED(hrc))
+- hrc = setError(E_FAIL, tr("Installing extension pack '%s' failed under mysterious circumstances"),
+- pStrName->c_str());
+- }
+- else
+- {
+- ErrorInfoKeeper Eik;
+- refreshExtPack(pStrName->c_str(), false /*a_fUnusableIsError*/, NULL);
+- }
+- }
+-
+- /*
+- * Do VirtualBoxReady callbacks now for any freshly installed
+- * extension pack (old ones will not be called).
+- */
+- if (m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON)
+- {
+- autoLock.release();
+- callAllVirtualBoxReadyHooks();
+- }
+- }
+-
+- return hrc;
+-}
+-
+-/**
+- * Thread wrapper around doUninstall.
+- *
+- * @returns VINF_SUCCESS (ignored)
+- * @param hThread The thread handle (ignored).
+- * @param pvJob The job structure.
+- */
+-/*static*/ DECLCALLBACK(int) ExtPackManager::doUninstallThreadProc(RTTHREAD hThread, void *pvJob)
+-{
+- PEXTPACKUNINSTALLJOB pJob = (PEXTPACKUNINSTALLJOB)pvJob;
+- HRESULT hrc = pJob->ptrExtPackMgr->doUninstall(&pJob->strName, pJob->fForcedRemoval, &pJob->strDisplayInfo);
+- pJob->ptrProgress->notifyComplete(hrc);
+- delete pJob;
+-
+- NOREF(hThread);
+- return VINF_SUCCESS;
+-}
+-
+-/**
+- * Worker for IExtPackManager::Uninstall.
+- *
+- * Called on a worker thread via doUninstallThreadProc.
+- *
+- * @returns COM status code.
+- * @param a_pstrName The name of the extension pack to uninstall.
+- * @param a_fForcedRemoval Whether to be skip and ignore certain bits of
+- * the extpack feedback. To deal with misbehaving
+- * extension pack hooks.
+- * @param a_pstrDisplayInfo Host specific display information hacks.
+- */
+-HRESULT ExtPackManager::doUninstall(Utf8Str const *a_pstrName, bool a_fForcedRemoval, Utf8Str const *a_pstrDisplayInfo)
+-{
+- Assert(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON);
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+-
+- /*
+- * Refresh the data we have on the extension pack as it may be made
+- * stale by direct meddling or some other user.
+- */
+- ExtPack *pExtPack;
+- hrc = refreshExtPack(a_pstrName->c_str(), false /*a_fUnusableIsError*/, &pExtPack);
+- if (SUCCEEDED(hrc))
+- {
+- if (!pExtPack)
+- {
+- LogRel(("ExtPackManager: Extension pack '%s' is not installed, so nothing to uninstall.\n", a_pstrName->c_str()));
+- hrc = S_OK; /* nothing to uninstall */
+- }
+- else
+- {
+- /*
+- * Call the uninstall hook and unload the main dll.
+- */
+- hrc = pExtPack->callUninstallHookAndClose(m->pVirtualBox, a_fForcedRemoval);
+- if (SUCCEEDED(hrc))
+- {
+- /*
+- * Run the set-uid-to-root binary that performs the
+- * uninstallation. Then refresh the object.
+- *
+- * This refresh is theorically subject to races, but it's of
+- * the don't-do-that variety.
+- */
+- const char *pszForcedOpt = a_fForcedRemoval ? "--forced" : NULL;
+- hrc = runSetUidToRootHelper(a_pstrDisplayInfo,
+- "uninstall",
+- "--base-dir", m->strBaseDir.c_str(),
+- "--name", a_pstrName->c_str(),
+- pszForcedOpt, /* Last as it may be NULL. */
+- (const char *)NULL);
+- if (SUCCEEDED(hrc))
+- {
+- hrc = refreshExtPack(a_pstrName->c_str(), false /*a_fUnusableIsError*/, &pExtPack);
+- if (SUCCEEDED(hrc))
+- {
+- if (!pExtPack)
+- LogRel(("ExtPackManager: Successfully uninstalled extension pack '%s'.\n", a_pstrName->c_str()));
+- else
+- hrc = setError(E_FAIL,
+- tr("Uninstall extension pack '%s' failed under mysterious circumstances"),
+- a_pstrName->c_str());
+- }
+- }
+- else
+- {
+- ErrorInfoKeeper Eik;
+- refreshExtPack(a_pstrName->c_str(), false /*a_fUnusableIsError*/, NULL);
+- }
+- }
+- }
+- }
+-
+- /*
+- * Do VirtualBoxReady callbacks now for any freshly installed
+- * extension pack (old ones will not be called).
+- */
+- if (m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON)
+- {
+- autoLock.release();
+- callAllVirtualBoxReadyHooks();
+- }
+- }
+-
+- return hrc;
+-}
+-
+-
+-/**
+- * Calls the pfnVirtualBoxReady hook for all working extension packs.
+- *
+- * @remarks The caller must not hold any locks.
+- */
+-void ExtPackManager::callAllVirtualBoxReadyHooks(void)
+-{
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (FAILED(hrc))
+- return;
+- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+- ComPtr<ExtPackManager> ptrSelfRef = this;
+-
+- for (ExtPackList::iterator it = m->llInstalledExtPacks.begin();
+- it != m->llInstalledExtPacks.end();
+- /* advancing below */)
+- {
+- if ((*it)->callVirtualBoxReadyHook(m->pVirtualBox, &autoLock))
+- it = m->llInstalledExtPacks.begin();
+- else
+- it++;
+- }
+-}
+-
+-/**
+- * Calls the pfnConsoleReady hook for all working extension packs.
+- *
+- * @param a_pConsole The console interface.
+- * @remarks The caller must not hold any locks.
+- */
+-void ExtPackManager::callAllConsoleReadyHooks(IConsole *a_pConsole)
+-{
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (FAILED(hrc))
+- return;
+- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+- ComPtr<ExtPackManager> ptrSelfRef = this;
+-
+- for (ExtPackList::iterator it = m->llInstalledExtPacks.begin();
+- it != m->llInstalledExtPacks.end();
+- /* advancing below */)
+- {
+- if ((*it)->callConsoleReadyHook(a_pConsole, &autoLock))
+- it = m->llInstalledExtPacks.begin();
+- else
+- it++;
+- }
+-}
+-
+-/**
+- * Calls the pfnVMCreated hook for all working extension packs.
+- *
+- * @param a_pMachine The machine interface of the new VM.
+- */
+-void ExtPackManager::callAllVmCreatedHooks(IMachine *a_pMachine)
+-{
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (FAILED(hrc))
+- return;
+- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+- ComPtr<ExtPackManager> ptrSelfRef = this; /* paranoia */
+- ExtPackList llExtPacks = m->llInstalledExtPacks;
+-
+- for (ExtPackList::iterator it = llExtPacks.begin(); it != llExtPacks.end(); it++)
+- (*it)->callVmCreatedHook(m->pVirtualBox, a_pMachine, &autoLock);
+-}
+-
+-/**
+- * Calls the pfnVMConfigureVMM hook for all working extension packs.
+- *
+- * @returns VBox status code. Stops on the first failure, expecting the caller
+- * to signal this to the caller of the CFGM constructor.
+- * @param a_pConsole The console interface for the VM.
+- * @param a_pVM The VM handle.
+- */
+-int ExtPackManager::callAllVmConfigureVmmHooks(IConsole *a_pConsole, PVM a_pVM)
+-{
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (FAILED(hrc))
+- return Global::vboxStatusCodeFromCOM(hrc);
+- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+- ComPtr<ExtPackManager> ptrSelfRef = this; /* paranoia */
+- ExtPackList llExtPacks = m->llInstalledExtPacks;
+-
+- for (ExtPackList::iterator it = llExtPacks.begin(); it != llExtPacks.end(); it++)
+- {
+- int vrc;
+- (*it)->callVmConfigureVmmHook(a_pConsole, a_pVM, &autoLock, &vrc);
+- if (RT_FAILURE(vrc))
+- return vrc;
+- }
+-
+- return VINF_SUCCESS;
+-}
+-
+-/**
+- * Calls the pfnVMPowerOn hook for all working extension packs.
+- *
+- * @returns VBox status code. Stops on the first failure, expecting the caller
+- * to not power on the VM.
+- * @param a_pConsole The console interface for the VM.
+- * @param a_pVM The VM handle.
+- */
+-int ExtPackManager::callAllVmPowerOnHooks(IConsole *a_pConsole, PVM a_pVM)
+-{
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (FAILED(hrc))
+- return Global::vboxStatusCodeFromCOM(hrc);
+- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+- ComPtr<ExtPackManager> ptrSelfRef = this; /* paranoia */
+- ExtPackList llExtPacks = m->llInstalledExtPacks;
+-
+- for (ExtPackList::iterator it = llExtPacks.begin(); it != llExtPacks.end(); it++)
+- {
+- int vrc;
+- (*it)->callVmPowerOnHook(a_pConsole, a_pVM, &autoLock, &vrc);
+- if (RT_FAILURE(vrc))
+- return vrc;
+- }
+-
+- return VINF_SUCCESS;
+-}
+-
+-/**
+- * Calls the pfnVMPowerOff hook for all working extension packs.
+- *
+- * @param a_pConsole The console interface for the VM.
+- * @param a_pVM The VM handle. Can be NULL.
+- */
+-void ExtPackManager::callAllVmPowerOffHooks(IConsole *a_pConsole, PVM a_pVM)
+-{
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (FAILED(hrc))
+- return;
+- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+- ComPtr<ExtPackManager> ptrSelfRef = this; /* paranoia */
+- ExtPackList llExtPacks = m->llInstalledExtPacks;
+-
+- for (ExtPackList::iterator it = llExtPacks.begin(); it != llExtPacks.end(); it++)
+- (*it)->callVmPowerOffHook(a_pConsole, a_pVM, &autoLock);
+-}
+-
+-
+-/**
+- * Checks that the specified extension pack contains a VRDE module and that it
+- * is shipshape.
+- *
+- * @returns S_OK if ok, appropriate failure status code with details.
+- * @param a_pstrExtPack The name of the extension pack.
+- */
+-HRESULT ExtPackManager::checkVrdeExtPack(Utf8Str const *a_pstrExtPack)
+-{
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+-
+- ExtPack *pExtPack = findExtPack(a_pstrExtPack->c_str());
+- if (pExtPack)
+- hrc = pExtPack->checkVrde();
+- else
+- hrc = setError(VBOX_E_OBJECT_NOT_FOUND, tr("No extension pack by the name '%s' was found"), a_pstrExtPack->c_str());
+- }
+-
+- return hrc;
+-}
+-
+-/**
+- * Gets the full path to the VRDE library of the specified extension pack.
+- *
+- * This will do extacly the same as checkVrdeExtPack and then resolve the
+- * library path.
+- *
+- * @returns S_OK if a path is returned, COM error status and message return if
+- * not.
+- * @param a_pstrExtPack The extension pack.
+- * @param a_pstrVrdeLibrary Where to return the path.
+- */
+-int ExtPackManager::getVrdeLibraryPathForExtPack(Utf8Str const *a_pstrExtPack, Utf8Str *a_pstrVrdeLibrary)
+-{
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+-
+- ExtPack *pExtPack = findExtPack(a_pstrExtPack->c_str());
+- if (pExtPack)
+- hrc = pExtPack->getVrdpLibraryName(a_pstrVrdeLibrary);
+- else
+- hrc = setError(VBOX_E_OBJECT_NOT_FOUND, tr("No extension pack by the name '%s' was found"), a_pstrExtPack->c_str());
+- }
+-
+- return hrc;
+-}
+-
+-/**
+- * Gets the name of the default VRDE extension pack.
+- *
+- * @returns S_OK or some COM error status on red tape failure.
+- * @param a_pstrExtPack Where to return the extension pack name. Returns
+- * empty if no extension pack wishes to be the default
+- * VRDP provider.
+- */
+-HRESULT ExtPackManager::getDefaultVrdeExtPack(Utf8Str *a_pstrExtPack)
+-{
+- a_pstrExtPack->setNull();
+-
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (SUCCEEDED(hrc))
+- {
+- AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+-
+- for (ExtPackList::iterator it = m->llInstalledExtPacks.begin();
+- it != m->llInstalledExtPacks.end();
+- it++)
+- {
+- if ((*it)->wantsToBeDefaultVrde())
+- {
+- *a_pstrExtPack = (*it)->m->Desc.strName;
+- break;
+- }
+- }
+- }
+- return hrc;
+-}
+-
+-/**
+- * Checks if an extension pack is (present and) usable.
+- *
+- * @returns @c true if it is, otherwise @c false.
+- * @param a_pszExtPack The name of the extension pack.
+- */
+-bool ExtPackManager::isExtPackUsable(const char *a_pszExtPack)
+-{
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (FAILED(hrc))
+- return false;
+- AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+-
+- ExtPack *pExtPack = findExtPack(a_pszExtPack);
+- return pExtPack != NULL
+- && pExtPack->m->fUsable;
+-}
+-
+-/**
+- * Dumps all extension packs to the release log.
+- */
+-void ExtPackManager::dumpAllToReleaseLog(void)
+-{
+- AutoCaller autoCaller(this);
+- HRESULT hrc = autoCaller.rc();
+- if (FAILED(hrc))
+- return;
+- AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS);
+-
+- LogRel(("Installed Extension Packs:\n"));
+- for (ExtPackList::iterator it = m->llInstalledExtPacks.begin();
+- it != m->llInstalledExtPacks.end();
+- it++)
+- {
+- ExtPack::Data *pExtPackData = (*it)->m;
+- if (pExtPackData)
+- {
+- if (pExtPackData->fUsable)
+- LogRel((" %s (Version: %s r%u%s%s; VRDE Module: %s)\n",
+- pExtPackData->Desc.strName.c_str(),
+- pExtPackData->Desc.strVersion.c_str(),
+- pExtPackData->Desc.uRevision,
+- pExtPackData->Desc.strEdition.isEmpty() ? "" : " ",
+- pExtPackData->Desc.strEdition.c_str(),
+- pExtPackData->Desc.strVrdeModule.c_str() ));
+- else
+- LogRel((" %s (Version: %s r%u%s%s; VRDE Module: %s unusable because of '%s')\n",
+- pExtPackData->Desc.strName.c_str(),
+- pExtPackData->Desc.strVersion.c_str(),
+- pExtPackData->Desc.uRevision,
+- pExtPackData->Desc.strEdition.isEmpty() ? "" : " ",
+- pExtPackData->Desc.strEdition.c_str(),
+- pExtPackData->Desc.strVrdeModule.c_str(),
+- pExtPackData->strWhyUnusable.c_str() ));
+- }
+- else
+- LogRel((" pExtPackData is NULL\n"));
+- }
+-
+- if (!m->llInstalledExtPacks.size())
+- LogRel((" None installed!\n"));
+-}
+-
+-/* vi: set tabstop=4 shiftwidth=4 expandtab: */
+--- VirtualBox-4.1.18.orig/src/VBox/Main/src-all/ExtPackUtil.cpp 2012-06-20 10:17:34.000000000 -0300
++++ /dev/null 2012-07-24 14:48:18.638572110 -0300
+@@ -1,1385 +0,0 @@
+-/* $Id: ExtPackUtil.cpp $ */
+-/** @file
+- * VirtualBox Main - Extension Pack Utilities and definitions, VBoxC, VBoxSVC, ++.
+- */
+-
+-/*
+- * Copyright (C) 2010-2012 Oracle Corporation
+- *
+- * This file is part of VirtualBox Open Source Edition (OSE), as
+- * available from http://www.virtualbox.org. This file is free software;
+- * you can redistribute it and/or modify it under the terms of the GNU
+- * General Public License (GPL) as published by the Free Software
+- * Foundation, in version 2 as it comes in the "COPYING" file of the
+- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+- */
+-
+-
+-/*******************************************************************************
+-* Header Files *
+-*******************************************************************************/
+-#include "../include/ExtPackUtil.h"
+-
+-#include <iprt/ctype.h>
+-#include <iprt/dir.h>
+-#include <iprt/file.h>
+-#include <iprt/manifest.h>
+-#include <iprt/param.h>
+-#include <iprt/path.h>
+-#include <iprt/sha.h>
+-#include <iprt/string.h>
+-#include <iprt/vfs.h>
+-#include <iprt/tar.h>
+-#include <iprt/zip.h>
+-#include <iprt/cpp/xml.h>
+-
+-#include <VBox/log.h>
+-
+-
+-/**
+- * Worker for VBoxExtPackLoadDesc that loads the plug-in descriptors.
+- *
+- * @returns Same as VBoxExtPackLoadDesc.
+- * @param pVBoxExtPackElm
+- * @param pcPlugIns Where to return the number of plug-ins in the
+- * array.
+- * @param paPlugIns Where to return the plug-in descriptor array.
+- * (RTMemFree it even on failure)
+- */
+-static RTCString *
+-vboxExtPackLoadPlugInDescs(const xml::ElementNode *pVBoxExtPackElm,
+- uint32_t *pcPlugIns, PVBOXEXTPACKPLUGINDESC *paPlugIns)
+-{
+- *pcPlugIns = 0;
+- *paPlugIns = NULL;
+-
+- /** @todo plug-ins */
+- NOREF(pVBoxExtPackElm);
+-
+- return NULL;
+-}
+-
+-/**
+- * Clears the extension pack descriptor.
+- *
+- * @param a_pExtPackDesc The descriptor to clear.
+- */
+-static void vboxExtPackClearDesc(PVBOXEXTPACKDESC a_pExtPackDesc)
+-{
+- a_pExtPackDesc->strName.setNull();
+- a_pExtPackDesc->strDescription.setNull();
+- a_pExtPackDesc->strVersion.setNull();
+- a_pExtPackDesc->strEdition.setNull();
+- a_pExtPackDesc->uRevision = 0;
+- a_pExtPackDesc->strMainModule.setNull();
+- a_pExtPackDesc->strVrdeModule.setNull();
+- a_pExtPackDesc->cPlugIns = 0;
+- a_pExtPackDesc->paPlugIns = NULL;
+- a_pExtPackDesc->fShowLicense = false;
+-}
+-
+-/**
+- * Initializes an extension pack descriptor so that it's safe to call free on
+- * it whatever happens later on.
+- *
+- * @param a_pExtPackDesc The descirptor to initialize.
+- */
+-void VBoxExtPackInitDesc(PVBOXEXTPACKDESC a_pExtPackDesc)
+-{
+- vboxExtPackClearDesc(a_pExtPackDesc);
+-}
+-
+-
+-/**
+- * Load the extension pack descriptor from an XML document.
+- *
+- * @returns NULL on success, pointer to an error message on failure (caller
+- * deletes it).
+- * @param a_pDoc Pointer to the the XML document.
+- * @param a_pExtPackDesc Where to store the extension pack descriptor.
+- */
+-static RTCString *vboxExtPackLoadDescFromDoc(xml::Document *a_pDoc, PVBOXEXTPACKDESC a_pExtPackDesc)
+-{
+- /*
+- * Get the main element and check its version.
+- */
+- const xml::ElementNode *pVBoxExtPackElm = a_pDoc->getRootElement();
+- if ( !pVBoxExtPackElm
+- || strcmp(pVBoxExtPackElm->getName(), "VirtualBoxExtensionPack") != 0)
+- return new RTCString("No VirtualBoxExtensionPack element");
+-
+- RTCString strFormatVersion;
+- if (!pVBoxExtPackElm->getAttributeValue("version", strFormatVersion))
+- return new RTCString("Missing format version");
+- if (!strFormatVersion.equals("1.0"))
+- return &(new RTCString("Unsupported format version: "))->append(strFormatVersion);
+-
+- /*
+- * Read and validate mandatory bits.
+- */
+- const xml::ElementNode *pNameElm = pVBoxExtPackElm->findChildElement("Name");
+- if (!pNameElm)
+- return new RTCString("The 'Name' element is missing");
+- const char *pszName = pNameElm->getValue();
+- if (!VBoxExtPackIsValidName(pszName))
+- return &(new RTCString("Invalid name: "))->append(pszName);
+-
+- const xml::ElementNode *pDescElm = pVBoxExtPackElm->findChildElement("Description");
+- if (!pDescElm)
+- return new RTCString("The 'Description' element is missing");
+- const char *pszDesc = pDescElm->getValue();
+- if (!pszDesc || *pszDesc == '\0')
+- return new RTCString("The 'Description' element is empty");
+- if (strpbrk(pszDesc, "\n\r\t\v\b") != NULL)
+- return new RTCString("The 'Description' must not contain control characters");
+-
+- const xml::ElementNode *pVersionElm = pVBoxExtPackElm->findChildElement("Version");
+- if (!pVersionElm)
+- return new RTCString("The 'Version' element is missing");
+- const char *pszVersion = pVersionElm->getValue();
+- if (!pszVersion || *pszVersion == '\0')
+- return new RTCString("The 'Version' element is empty");
+- if (!VBoxExtPackIsValidVersionString(pszVersion))
+- return &(new RTCString("Invalid version string: "))->append(pszVersion);
+-
+- uint32_t uRevision;
+- if (!pVersionElm->getAttributeValue("revision", uRevision))
+- uRevision = 0;
+-
+- const char *pszEdition;
+- if (!pVersionElm->getAttributeValue("edition", pszEdition))
+- pszEdition = "";
+- if (!VBoxExtPackIsValidEditionString(pszEdition))
+- return &(new RTCString("Invalid edition string: "))->append(pszEdition);
+-
+- const xml::ElementNode *pMainModuleElm = pVBoxExtPackElm->findChildElement("MainModule");
+- if (!pMainModuleElm)
+- return new RTCString("The 'MainModule' element is missing");
+- const char *pszMainModule = pMainModuleElm->getValue();
+- if (!pszMainModule || *pszMainModule == '\0')
+- return new RTCString("The 'MainModule' element is empty");
+- if (!VBoxExtPackIsValidModuleString(pszMainModule))
+- return &(new RTCString("Invalid main module string: "))->append(pszMainModule);
+-
+- /*
+- * The VRDE module, optional.
+- * Accept both none and empty as tokens of no VRDE module.
+- */
+- const char *pszVrdeModule = NULL;
+- const xml::ElementNode *pVrdeModuleElm = pVBoxExtPackElm->findChildElement("VRDEModule");
+- if (pVrdeModuleElm)
+- {
+- pszVrdeModule = pVrdeModuleElm->getValue();
+- if (!pszVrdeModule || *pszVrdeModule == '\0')
+- pszVrdeModule = NULL;
+- else if (!VBoxExtPackIsValidModuleString(pszVrdeModule))
+- return &(new RTCString("Invalid VRDE module string: "))->append(pszVrdeModule);
+- }
+-
+- /*
+- * Whether to show the license, optional. (presense is enough here)
+- */
+- const xml::ElementNode *pShowLicenseElm = pVBoxExtPackElm->findChildElement("ShowLicense");
+- bool fShowLicense = pShowLicenseElm != NULL;
+-
+- /*
+- * Parse plug-in descriptions (last because of the manual memory management).
+- */
+- uint32_t cPlugIns = 0;
+- PVBOXEXTPACKPLUGINDESC paPlugIns = NULL;
+- RTCString *pstrRet = vboxExtPackLoadPlugInDescs(pVBoxExtPackElm, &cPlugIns, &paPlugIns);
+- if (pstrRet)
+- {
+- RTMemFree(paPlugIns);
+- return pstrRet;
+- }
+-
+- /*
+- * Everything seems fine, fill in the return values and return successfully.
+- */
+- a_pExtPackDesc->strName = pszName;
+- a_pExtPackDesc->strDescription = pszDesc;
+- a_pExtPackDesc->strVersion = pszVersion;
+- a_pExtPackDesc->strEdition = pszEdition;
+- a_pExtPackDesc->uRevision = uRevision;
+- a_pExtPackDesc->strMainModule = pszMainModule;
+- a_pExtPackDesc->strVrdeModule = pszVrdeModule;
+- a_pExtPackDesc->cPlugIns = cPlugIns;
+- a_pExtPackDesc->paPlugIns = paPlugIns;
+- a_pExtPackDesc->fShowLicense = fShowLicense;
+-
+- return NULL;
+-}
+-
+-/**
+- * Reads the extension pack descriptor.
+- *
+- * @returns NULL on success, pointer to an error message on failure (caller
+- * deletes it).
+- * @param a_pszDir The directory containing the description file.
+- * @param a_pExtPackDesc Where to store the extension pack descriptor.
+- * @param a_pObjInfo Where to store the object info for the file (unix
+- * attribs). Optional.
+- */
+-RTCString *VBoxExtPackLoadDesc(const char *a_pszDir, PVBOXEXTPACKDESC a_pExtPackDesc, PRTFSOBJINFO a_pObjInfo)
+-{
+- vboxExtPackClearDesc(a_pExtPackDesc);
+-
+- /*
+- * Validate, open and parse the XML file.
+- */
+- char szFilePath[RTPATH_MAX];
+- int vrc = RTPathJoin(szFilePath, sizeof(szFilePath), a_pszDir, VBOX_EXTPACK_DESCRIPTION_NAME);
+- if (RT_FAILURE(vrc))
+- return new RTCString("RTPathJoin failed with %Rrc", vrc);
+-
+- RTFSOBJINFO ObjInfo;
+- vrc = RTPathQueryInfoEx(szFilePath, &ObjInfo, RTFSOBJATTRADD_UNIX, RTPATH_F_ON_LINK);
+- if (RT_FAILURE(vrc))
+- return &(new RTCString())->printf("RTPathQueryInfoEx failed with %Rrc", vrc);
+- if (a_pObjInfo)
+- *a_pObjInfo = ObjInfo;
+- if (!RTFS_IS_FILE(ObjInfo.Attr.fMode))
+- {
+- if (RTFS_IS_SYMLINK(ObjInfo.Attr.fMode))
+- return new RTCString("The XML file is symlinked, that is not allowed");
+- return &(new RTCString)->printf("The XML file is not a file (fMode=%#x)", ObjInfo.Attr.fMode);
+- }
+-
+- xml::Document Doc;
+- {
+- xml::XmlFileParser Parser;
+- try
+- {
+- Parser.read(szFilePath, Doc);
+- }
+- catch (xml::XmlError Err)
+- {
+- return new RTCString(Err.what());
+- }
+- }
+-
+- /*
+- * Hand the xml doc over to the common code.
+- */
+- return vboxExtPackLoadDescFromDoc(&Doc, a_pExtPackDesc);
+-}
+-
+-/**
+- * Reads the extension pack descriptor.
+- *
+- * @returns NULL on success, pointer to an error message on failure (caller
+- * deletes it).
+- * @param a_pszDir The directory containing the description file.
+- * @param a_pExtPackDesc Where to store the extension pack descriptor.
+- * @param a_pObjInfo Where to store the object info for the file (unix
+- * attribs). Optional.
+- */
+-RTCString *VBoxExtPackLoadDescFromVfsFile(RTVFSFILE hVfsFile, PVBOXEXTPACKDESC a_pExtPackDesc, PRTFSOBJINFO a_pObjInfo)
+-{
+- vboxExtPackClearDesc(a_pExtPackDesc);
+-
+- /*
+- * Query the object info.
+- */
+- RTFSOBJINFO ObjInfo;
+- int rc = RTVfsFileQueryInfo(hVfsFile, &ObjInfo, RTFSOBJATTRADD_UNIX);
+- if (RT_FAILURE(rc))
+- return &(new RTCString)->printf("RTVfsFileQueryInfo failed: %Rrc", rc);
+- if (a_pObjInfo)
+- *a_pObjInfo = ObjInfo;
+-
+- /*
+- * The simple approach, read the whole thing into memory and pass this to
+- * the XML parser.
+- */
+-
+- /* Check the file size. */
+- if (ObjInfo.cbObject > _1M || ObjInfo.cbObject < 0)
+- return &(new RTCString)->printf("The XML file is too large (%'RU64 bytes)", ObjInfo.cbObject);
+- size_t const cbFile = (size_t)ObjInfo.cbObject;
+-
+- /* Rewind to the start of the file. */
+- rc = RTVfsFileSeek(hVfsFile, 0, RTFILE_SEEK_BEGIN, NULL);
+- if (RT_FAILURE(rc))
+- return &(new RTCString)->printf("RTVfsFileSeek(,0,BEGIN) failed: %Rrc", rc);
+-
+- /* Allocate memory and read the file content into it. */
+- void *pvFile = RTMemTmpAlloc(cbFile);
+- if (!pvFile)
+- return &(new RTCString)->printf("RTMemTmpAlloc(%zu) failed", cbFile);
+-
+- RTCString *pstrErr = NULL;
+- rc = RTVfsFileRead(hVfsFile, pvFile, cbFile, NULL);
+- if (RT_FAILURE(rc))
+- pstrErr = &(new RTCString)->printf("RTVfsFileRead failed: %Rrc", rc);
+-
+- /*
+- * Parse the file.
+- */
+- xml::Document Doc;
+- if (RT_SUCCESS(rc))
+- {
+- xml::XmlMemParser Parser;
+- RTCString strFileName = VBOX_EXTPACK_DESCRIPTION_NAME;
+- try
+- {
+- Parser.read(pvFile, cbFile, strFileName, Doc);
+- }
+- catch (xml::XmlError Err)
+- {
+- pstrErr = new RTCString(Err.what());
+- rc = VERR_PARSE_ERROR;
+- }
+- }
+- RTMemTmpFree(pvFile);
+-
+- /*
+- * Hand the xml doc over to the common code.
+- */
+- if (RT_SUCCESS(rc))
+- pstrErr = vboxExtPackLoadDescFromDoc(&Doc, a_pExtPackDesc);
+-
+- return pstrErr;
+-}
+-
+-/**
+- * Frees all resources associated with a extension pack descriptor.
+- *
+- * @param a_pExtPackDesc The extension pack descriptor which members
+- * should be freed.
+- */
+-void VBoxExtPackFreeDesc(PVBOXEXTPACKDESC a_pExtPackDesc)
+-{
+- if (!a_pExtPackDesc)
+- return;
+-
+- a_pExtPackDesc->strName.setNull();
+- a_pExtPackDesc->strDescription.setNull();
+- a_pExtPackDesc->strVersion.setNull();
+- a_pExtPackDesc->strEdition.setNull();
+- a_pExtPackDesc->uRevision = 0;
+- a_pExtPackDesc->strMainModule.setNull();
+- a_pExtPackDesc->strVrdeModule.setNull();
+- a_pExtPackDesc->cPlugIns = 0;
+- RTMemFree(a_pExtPackDesc->paPlugIns);
+- a_pExtPackDesc->paPlugIns = NULL;
+- a_pExtPackDesc->fShowLicense = false;
+-}
+-
+-/**
+- * Extract the extension pack name from the tarball path.
+- *
+- * @returns String containing the name on success, the caller must delete it.
+- * NULL if no valid name was found or if we ran out of memory.
+- * @param pszTarball The path to the tarball.
+- */
+-RTCString *VBoxExtPackExtractNameFromTarballPath(const char *pszTarball)
+-{
+- /*
+- * Skip ahead to the filename part and count the number of characters
+- * that matches the criteria for a mangled extension pack name.
+- */
+- const char *pszSrc = RTPathFilename(pszTarball);
+- if (!pszSrc)
+- return NULL;
+-
+- size_t off = 0;
+- while (RT_C_IS_ALNUM(pszSrc[off]) || pszSrc[off] == '_')
+- off++;
+-
+- /*
+- * Check min and max name limits.
+- */
+- if ( off > VBOX_EXTPACK_NAME_MAX_LEN
+- || off < VBOX_EXTPACK_NAME_MIN_LEN)
+- return NULL;
+-
+- /*
+- * Return the unmangled name.
+- */
+- return VBoxExtPackUnmangleName(pszSrc, off);
+-}
+-
+-/**
+- * Validates the extension pack name.
+- *
+- * @returns true if valid, false if not.
+- * @param pszName The name to validate.
+- * @sa VBoxExtPackExtractNameFromTarballPath
+- */
+-bool VBoxExtPackIsValidName(const char *pszName)
+-{
+- if (!pszName)
+- return false;
+-
+- /*
+- * Check the characters making up the name, only english alphabet
+- * characters, decimal digits and spaces are allowed.
+- */
+- size_t off = 0;
+- while (pszName[off])
+- {
+- if (!RT_C_IS_ALNUM(pszName[off]) && pszName[off] != ' ')
+- return false;
+- off++;
+- }
+-
+- /*
+- * Check min and max name limits.
+- */
+- if ( off > VBOX_EXTPACK_NAME_MAX_LEN
+- || off < VBOX_EXTPACK_NAME_MIN_LEN)
+- return false;
+-
+- return true;
+-}
+-
+-/**
+- * Checks if an alledged manged extension pack name.
+- *
+- * @returns true if valid, false if not.
+- * @param pszMangledName The mangled name to validate.
+- * @param cchMax The max number of chars to test.
+- * @sa VBoxExtPackMangleName
+- */
+-bool VBoxExtPackIsValidMangledName(const char *pszMangledName, size_t cchMax /*= RTSTR_MAX*/)
+-{
+- if (!pszMangledName)
+- return false;
+-
+- /*
+- * Check the characters making up the name, only english alphabet
+- * characters, decimal digits and underscores (=space) are allowed.
+- */
+- size_t off = 0;
+- while (off < cchMax && pszMangledName[off])
+- {
+- if (!RT_C_IS_ALNUM(pszMangledName[off]) && pszMangledName[off] != '_')
+- return false;
+- off++;
+- }
+-
+- /*
+- * Check min and max name limits.
+- */
+- if ( off > VBOX_EXTPACK_NAME_MAX_LEN
+- || off < VBOX_EXTPACK_NAME_MIN_LEN)
+- return false;
+-
+- return true;
+-}
+-
+-/**
+- * Mangle an extension pack name so it can be used by a directory or file name.
+- *
+- * @returns String containing the mangled name on success, the caller must
+- * delete it. NULL on failure.
+- * @param pszName The unmangled name.
+- * @sa VBoxExtPackUnmangleName, VBoxExtPackIsValidMangledName
+- */
+-RTCString *VBoxExtPackMangleName(const char *pszName)
+-{
+- AssertReturn(VBoxExtPackIsValidName(pszName), NULL);
+-
+- char szTmp[VBOX_EXTPACK_NAME_MAX_LEN + 1];
+- size_t off = 0;
+- char ch;
+- while ((ch = pszName[off]) != '\0')
+- {
+- if (ch == ' ')
+- ch = '_';
+- szTmp[off++] = ch;
+- }
+- szTmp[off] = '\0';
+- Assert(VBoxExtPackIsValidMangledName(szTmp));
+-
+- return new RTCString(szTmp, off);
+-}
+-
+-/**
+- * Unmangle an extension pack name (reverses VBoxExtPackMangleName).
+- *
+- * @returns String containing the mangled name on success, the caller must
+- * delete it. NULL on failure.
+- * @param pszMangledName The mangled name.
+- * @param cchMax The max name length. RTSTR_MAX is fine.
+- * @sa VBoxExtPackMangleName, VBoxExtPackIsValidMangledName
+- */
+-RTCString *VBoxExtPackUnmangleName(const char *pszMangledName, size_t cchMax)
+-{
+- AssertReturn(VBoxExtPackIsValidMangledName(pszMangledName, cchMax), NULL);
+-
+- char szTmp[VBOX_EXTPACK_NAME_MAX_LEN + 1];
+- size_t off = 0;
+- char ch;
+- while ( off < cchMax
+- && (ch = pszMangledName[off]) != '\0')
+- {
+- if (ch == '_')
+- ch = ' ';
+- else
+- AssertReturn(RT_C_IS_ALNUM(ch) || ch == ' ', NULL);
+- szTmp[off++] = ch;
+- }
+- szTmp[off] = '\0';
+- AssertReturn(VBoxExtPackIsValidName(szTmp), NULL);
+-
+- return new RTCString(szTmp, off);
+-}
+-
+-/**
+- * Constructs the extension pack directory path.
+- *
+- * A combination of RTPathJoin and VBoxExtPackMangleName.
+- *
+- * @returns IPRT status code like RTPathJoin.
+- * @param pszExtPackDir Where to return the directory path.
+- * @param cbExtPackDir The size of the return buffer.
+- * @param pszParentDir The parent directory (".../Extensions").
+- * @param pszName The extension pack name, unmangled.
+- */
+-int VBoxExtPackCalcDir(char *pszExtPackDir, size_t cbExtPackDir, const char *pszParentDir, const char *pszName)
+-{
+- AssertReturn(VBoxExtPackIsValidName(pszName), VERR_INTERNAL_ERROR_5);
+-
+- RTCString *pstrMangledName = VBoxExtPackMangleName(pszName);
+- if (!pstrMangledName)
+- return VERR_INTERNAL_ERROR_4;
+-
+- int vrc = RTPathJoin(pszExtPackDir, cbExtPackDir, pszParentDir, pstrMangledName->c_str());
+- delete pstrMangledName;
+-
+- return vrc;
+-}
+-
+-
+-/**
+- * Validates the extension pack version string.
+- *
+- * @returns true if valid, false if not.
+- * @param pszVersion The version string to validate.
+- */
+-bool VBoxExtPackIsValidVersionString(const char *pszVersion)
+-{
+- if (!pszVersion || *pszVersion == '\0')
+- return false;
+-
+- /* 1.x.y.z... */
+- for (;;)
+- {
+- if (!RT_C_IS_DIGIT(*pszVersion))
+- return false;
+- do
+- pszVersion++;
+- while (RT_C_IS_DIGIT(*pszVersion));
+- if (*pszVersion != '.')
+- break;
+- pszVersion++;
+- }
+-
+- /* upper case string + numbers indicating the build type */
+- if (*pszVersion == '-' || *pszVersion == '_')
+- {
+- /** @todo Should probably restrict this to known build types (alpha,
+- * beta, rc, ++). */
+- do
+- pszVersion++;
+- while ( RT_C_IS_DIGIT(*pszVersion)
+- || RT_C_IS_UPPER(*pszVersion)
+- || *pszVersion == '-'
+- || *pszVersion == '_');
+- }
+-
+- return *pszVersion == '\0';
+-}
+-
+-/**
+- * Validates the extension pack edition string.
+- *
+- * @returns true if valid, false if not.
+- * @param pszEdition The edition string to validate.
+- */
+-bool VBoxExtPackIsValidEditionString(const char *pszEdition)
+-{
+- if (*pszEdition)
+- {
+- if (!RT_C_IS_UPPER(*pszEdition))
+- return false;
+-
+- do
+- pszEdition++;
+- while ( RT_C_IS_UPPER(*pszEdition)
+- || RT_C_IS_DIGIT(*pszEdition)
+- || *pszEdition == '-'
+- || *pszEdition == '_');
+- }
+- return *pszEdition == '\0';
+-}
+-
+-/**
+- * Validates an extension pack module string.
+- *
+- * @returns true if valid, false if not.
+- * @param pszModule The module string to validate.
+- */
+-bool VBoxExtPackIsValidModuleString(const char *pszModule)
+-{
+- if (!pszModule || *pszModule == '\0')
+- return false;
+-
+- /* Restricted charset, no extensions (dots). */
+- while ( RT_C_IS_ALNUM(*pszModule)
+- || *pszModule == '-'
+- || *pszModule == '_')
+- pszModule++;
+-
+- return *pszModule == '\0';
+-}
+-
+-/**
+- * RTStrPrintfv wrapper.
+- *
+- * @returns @a rc
+- * @param rc The status code to return.
+- * @param pszError The error buffer.
+- * @param cbError The size of the buffer.
+- * @param pszFormat The error message format string.
+- * @param ... Format arguments.
+- */
+-static int vboxExtPackReturnError(int rc, char *pszError, size_t cbError, const char *pszFormat, ...)
+-{
+- va_list va;
+- va_start(va, pszFormat);
+- RTStrPrintfV(pszError, cbError, pszFormat, va);
+- va_end(va);
+- return rc;
+-}
+-
+-/**
+- * RTStrPrintfv wrapper.
+- *
+- * @param pszError The error buffer.
+- * @param cbError The size of the buffer.
+- * @param pszFormat The error message format string.
+- * @param ... Format arguments.
+- */
+-static void vboxExtPackSetError(char *pszError, size_t cbError, const char *pszFormat, ...)
+-{
+- va_list va;
+- va_start(va, pszFormat);
+- RTStrPrintfV(pszError, cbError, pszFormat, va);
+- va_end(va);
+-}
+-
+-/**
+- * Verifies the manifest and its signature.
+- *
+- * @returns VBox status code, failures with message.
+- * @param hManifestFile The xml from the extension pack.
+- * @param pszExtPackName The expected extension pack name. This can be
+- * NULL, in which we don't have any expectations.
+- * @param pszError Where to store an error message on failure.
+- * @param cbError The size of the buffer @a pszError points to.
+- */
+-static int vboxExtPackVerifyXml(RTVFSFILE hXmlFile, const char *pszExtPackName, char *pszError, size_t cbError)
+-{
+- /*
+- * Load the XML.
+- */
+- VBOXEXTPACKDESC ExtPackDesc;
+- RTCString *pstrErr = VBoxExtPackLoadDescFromVfsFile(hXmlFile, &ExtPackDesc, NULL);
+- if (pstrErr)
+- {
+- RTStrCopy(pszError, cbError, pstrErr->c_str());
+- delete pstrErr;
+- return VERR_PARSE_ERROR;
+- }
+-
+- /*
+- * Check the name.
+- */
+- /** @todo drop this restriction after the old install interface is
+- * dropped. */
+- int rc = VINF_SUCCESS;
+- if ( pszExtPackName
+- && !ExtPackDesc.strName.equalsIgnoreCase(pszExtPackName))
+- rc = vboxExtPackReturnError(VERR_NOT_EQUAL, pszError, cbError,
+- "The name of the downloaded file and the name stored inside the extension pack does not match"
+- " (xml='%s' file='%s')", ExtPackDesc.strName.c_str(), pszExtPackName);
+- return rc;
+-}
+-
+-/**
+- * Verifies the manifest and its signature.
+- *
+- * @returns VBox status code, failures with message.
+- * @param hOurManifest The manifest we compiled.
+- * @param hManifestFile The manifest file in the extension pack.
+- * @param hSignatureFile The manifest signature file.
+- * @param pszError Where to store an error message on failure.
+- * @param cbError The size of the buffer @a pszError points to.
+- */
+-static int vboxExtPackVerifyManifestAndSignature(RTMANIFEST hOurManifest, RTVFSFILE hManifestFile, RTVFSFILE hSignatureFile,
+- char *pszError, size_t cbError)
+-{
+- /*
+- * Read the manifest from the extension pack.
+- */
+- int rc = RTVfsFileSeek(hManifestFile, 0, RTFILE_SEEK_BEGIN, NULL);
+- if (RT_FAILURE(rc))
+- return vboxExtPackReturnError(rc, pszError, cbError, "RTVfsFileSeek failed: %Rrc", rc);
+-
+- RTMANIFEST hTheirManifest;
+- rc = RTManifestCreate(0 /*fFlags*/, &hTheirManifest);
+- if (RT_FAILURE(rc))
+- return vboxExtPackReturnError(rc, pszError, cbError, "RTManifestCreate failed: %Rrc", rc);
+-
+- RTVFSIOSTREAM hVfsIos = RTVfsFileToIoStream(hManifestFile);
+- rc = RTManifestReadStandard(hTheirManifest, hVfsIos);
+- RTVfsIoStrmRelease(hVfsIos);
+- if (RT_SUCCESS(rc))
+- {
+- /*
+- * Compare the manifests.
+- */
+- static const char *s_apszIgnoreEntries[] =
+- {
+- VBOX_EXTPACK_MANIFEST_NAME,
+- VBOX_EXTPACK_SIGNATURE_NAME,
+- "./" VBOX_EXTPACK_MANIFEST_NAME,
+- "./" VBOX_EXTPACK_SIGNATURE_NAME,
+- NULL
+- };
+- char szError[RTPATH_MAX];
+- rc = RTManifestEqualsEx(hOurManifest, hTheirManifest, &s_apszIgnoreEntries[0], NULL,
+- RTMANIFEST_EQUALS_IGN_MISSING_ATTRS /*fFlags*/,
+- szError, sizeof(szError));
+- if (RT_SUCCESS(rc))
+- {
+- /*
+- * Validate the manifest file signature.
+- */
+- /** @todo implement signature stuff */
+- NOREF(hSignatureFile);
+-
+- }
+- else if (rc == VERR_NOT_EQUAL && szError[0])
+- vboxExtPackSetError(pszError, cbError, "Manifest mismatch: %s", szError);
+- else
+- vboxExtPackSetError(pszError, cbError, "RTManifestEqualsEx failed: %Rrc", rc);
+-#if 0
+- RTVFSIOSTREAM hVfsIosStdOut = NIL_RTVFSIOSTREAM;
+- RTVfsIoStrmFromStdHandle(RTHANDLESTD_OUTPUT, RTFILE_O_WRITE, true, &hVfsIosStdOut);
+- RTVfsIoStrmWrite(hVfsIosStdOut, "Our:\n", sizeof("Our:\n") - 1, true, NULL);
+- RTManifestWriteStandard(hOurManifest, hVfsIosStdOut);
+- RTVfsIoStrmWrite(hVfsIosStdOut, "Their:\n", sizeof("Their:\n") - 1, true, NULL);
+- RTManifestWriteStandard(hTheirManifest, hVfsIosStdOut);
+-#endif
+- }
+- else
+- vboxExtPackSetError(pszError, cbError, "Error parsing '%s': %Rrc", VBOX_EXTPACK_MANIFEST_NAME, rc);
+-
+- RTManifestRelease(hTheirManifest);
+- return rc;
+-}
+-
+-
+-/**
+- * Verifies the file digest (if specified) and returns the SHA-256 of the file.
+- *
+- * @returns
+- * @param hFileManifest Manifest containing a SHA-256 digest of the file
+- * that was calculated as the file was processed.
+- * @param pszFileDigest SHA-256 digest of the file.
+- * @param pStrDigest Where to return the SHA-256 digest. Optional.
+- * @param pszError Where to write an error message on failure.
+- * @param cbError The size of the @a pszError buffer.
+- */
+-static int vboxExtPackVerifyFileDigest(RTMANIFEST hFileManifest, const char *pszFileDigest,
+- RTCString *pStrDigest, char *pszError, size_t cbError)
+-{
+- /*
+- * Extract the SHA-256 entry for the extpack file.
+- */
+- char szCalculatedDigest[RTSHA256_DIGEST_LEN + 1];
+- int rc = RTManifestEntryQueryAttr(hFileManifest, "extpack", NULL /*no name*/, RTMANIFEST_ATTR_SHA256,
+- szCalculatedDigest, sizeof(szCalculatedDigest), NULL);
+- if (RT_SUCCESS(rc))
+- {
+- /*
+- * Convert the two strings to binary form before comparing.
+- * We convert the calculated hash even if we don't have anything to
+- * compare with, just to validate it.
+- */
+- uint8_t abCalculatedHash[RTSHA256_HASH_SIZE];
+- rc = RTSha256FromString(szCalculatedDigest, abCalculatedHash);
+- if (RT_SUCCESS(rc))
+- {
+- if ( pszFileDigest
+- && *pszFileDigest != '\0')
+- {
+- uint8_t abFileHash[RTSHA256_HASH_SIZE];
+- rc = RTSha256FromString(pszFileDigest, abFileHash);
+- if (RT_SUCCESS(rc))
+- {
+- if (memcmp(abFileHash, abCalculatedHash, sizeof(abFileHash)))
+- {
+- vboxExtPackSetError(pszError, cbError, "The extension pack file has changed (SHA-256 mismatch)");
+- rc = VERR_NOT_EQUAL;
+- }
+- }
+- else
+- vboxExtPackSetError(pszError, cbError, "Bad SHA-256 '%s': %Rrc", szCalculatedDigest, rc);
+- }
+-
+- /*
+- * Set the output hash on success.
+- */
+- if (pStrDigest && RT_SUCCESS(rc))
+- {
+- try
+- {
+- *pStrDigest = szCalculatedDigest;
+- }
+- catch (std::bad_alloc)
+- {
+- rc = VERR_NO_MEMORY;
+- }
+- }
+- }
+- else
+- vboxExtPackSetError(pszError, cbError, "Bad SHA-256 '%s': %Rrc", szCalculatedDigest, rc);
+- }
+- else
+- vboxExtPackSetError(pszError, cbError, "RTManifestEntryGetAttr: %Rrc", rc);
+- return rc;
+-}
+-
+-
+-
+-/**
+- * Validates a standard file.
+- *
+- * Generally all files are
+- *
+- * @returns VBox status code, failure message in @a pszError.
+- * @param pszAdjName The adjusted member name.
+- * @param enmType The VFS object type.
+- * @param phVfsObj The pointer to the VFS object handle variable.
+- * This is both input and output.
+- * @param phVfsFile Where to store the handle to the memorized
+- * file. This is NULL for license files.
+- * @param pszError Where to write an error message on failure.
+- * @param cbError The size of the @a pszError buffer.
+- */
+-static int VBoxExtPackValidateStandardFile(const char *pszAdjName, RTVFSOBJTYPE enmType,
+- PRTVFSOBJ phVfsObj, PRTVFSFILE phVfsFile, char *pszError, size_t cbError)
+-{
+- int rc;
+-
+- /*
+- * Make sure it's a file and that it isn't too large.
+- */
+- if (phVfsFile && *phVfsFile != NIL_RTVFSFILE)
+- rc = vboxExtPackReturnError(VERR_DUPLICATE, pszError, cbError,
+- "There can only be one '%s'", pszAdjName);
+- else if (enmType != RTVFSOBJTYPE_IO_STREAM && enmType != RTVFSOBJTYPE_FILE)
+- rc = vboxExtPackReturnError(VERR_NOT_A_FILE, pszError, cbError,
+- "Standard member '%s' is not a file", pszAdjName);
+- else
+- {
+- RTFSOBJINFO ObjInfo;
+- rc = RTVfsObjQueryInfo(*phVfsObj, &ObjInfo, RTFSOBJATTRADD_NOTHING);
+- if (RT_SUCCESS(rc))
+- {
+- if (!RTFS_IS_FILE(ObjInfo.Attr.fMode))
+- rc = vboxExtPackReturnError(VERR_NOT_A_FILE, pszError, cbError,
+- "Standard member '%s' is not a file", pszAdjName);
+- else if (ObjInfo.cbObject >= _1M)
+- rc = vboxExtPackReturnError(VERR_OUT_OF_RANGE, pszError, cbError,
+- "Standard member '%s' is too large: %'RU64 bytes (max 1 MB)",
+- pszAdjName, (uint64_t)ObjInfo.cbObject);
+- else
+- {
+- /*
+- * Make an in memory copy of the stream and check that the file
+- * is UTF-8 clean.
+- */
+- RTVFSIOSTREAM hVfsIos = RTVfsObjToIoStream(*phVfsObj);
+- RTVFSFILE hVfsFile;
+- rc = RTVfsMemorizeIoStreamAsFile(hVfsIos, RTFILE_O_READ, &hVfsFile);
+- if (RT_SUCCESS(rc))
+- {
+- rc = RTVfsIoStrmValidateUtf8Encoding(hVfsIos,
+- RTVFS_VALIDATE_UTF8_BY_RTC_3629 | RTVFS_VALIDATE_UTF8_NO_NULL,
+- NULL);
+- if (RT_SUCCESS(rc))
+- {
+- /*
+- * Replace *phVfsObj with the memorized file.
+- */
+- rc = RTVfsFileSeek(hVfsFile, 0, RTFILE_SEEK_BEGIN, NULL);
+- if (RT_SUCCESS(rc))
+- {
+- RTVfsObjRelease(*phVfsObj);
+- *phVfsObj = RTVfsObjFromFile(hVfsFile);
+- }
+- else
+- vboxExtPackSetError(pszError, cbError, "RTVfsFileSeek failed on '%s': %Rrc", pszAdjName, rc);
+- }
+-
+- if (phVfsFile && RT_SUCCESS(rc))
+- *phVfsFile = hVfsFile;
+- else
+- RTVfsFileRelease(hVfsFile);
+- }
+- else
+- vboxExtPackSetError(pszError, cbError, "RTVfsMemorizeIoStreamAsFile failed on '%s': %Rrc", pszAdjName, rc);
+- RTVfsIoStrmRelease(hVfsIos);
+- }
+- }
+- else
+- vboxExtPackSetError(pszError, cbError, "RTVfsObjQueryInfo failed on '%s': %Rrc", pszAdjName, rc);
+- }
+- return rc;
+-}
+-
+-
+-/**
+- * Validates a name in an extension pack.
+- *
+- * We restrict the charset to try make sure the extension pack can be unpacked
+- * on all file systems.
+- *
+- * @returns VBox status code, failures with message.
+- * @param pszName The name to validate.
+- * @param pszError Where to store an error message on failure.
+- * @param cbError The size of the buffer @a pszError points to.
+- */
+-static int vboxExtPackValidateMemberName(const char *pszName, char *pszError, size_t cbError)
+-{
+- if (RTPathStartsWithRoot(pszName))
+- return vboxExtPackReturnError(VERR_PATH_IS_NOT_RELATIVE, pszError, cbError, "'%s': starts with root spec", pszName);
+-
+- const char *pszErr = NULL;
+- const char *psz = pszName;
+- int ch;
+- while ((ch = *psz) != '\0')
+- {
+- /* Character set restrictions. */
+- if (ch < 0 || ch >= 128)
+- {
+- pszErr = "Only 7-bit ASCII allowed";
+- break;
+- }
+- if (ch <= 31 || ch == 127)
+- {
+- pszErr = "No control characters are not allowed";
+- break;
+- }
+- if (ch == '\\')
+- {
+- pszErr = "Only backward slashes are not allowed";
+- break;
+- }
+- if (strchr("'\":;*?|[]<>(){}", ch))
+- {
+- pszErr = "The characters ', \", :, ;, *, ?, |, [, ], <, >, (, ), { and } are not allowed";
+- break;
+- }
+-
+- /* Take the simple way out and ban all ".." sequences. */
+- if ( ch == '.'
+- && psz[1] == '.')
+- {
+- pszErr = "Double dot sequence are not allowed";
+- break;
+- }
+-
+- /* Keep the tree shallow or the hardening checks will fail. */
+- if (psz - pszName > VBOX_EXTPACK_MAX_MEMBER_NAME_LENGTH)
+- {
+- pszErr = "Too long";
+- break;
+- }
+-
+- /* advance */
+- psz++;
+- }
+-
+- if (pszErr)
+- return vboxExtPackReturnError(VERR_INVALID_NAME, pszError, cbError,
+- "Bad member name '%s' (pos %zu): %s", pszName, (size_t)(psz - pszName), pszErr);
+- return RTEXITCODE_SUCCESS;
+-}
+-
+-
+-/**
+- * Validates a file in an extension pack.
+- *
+- * @returns VBox status code, failures with message.
+- * @param pszName The name of the file.
+- * @param hVfsObj The VFS object.
+- * @param pszError Where to store an error message on failure.
+- * @param cbError The size of the buffer @a pszError points to.
+- */
+-static int vboxExtPackValidateMemberFile(const char *pszName, RTVFSOBJ hVfsObj, char *pszError, size_t cbError)
+-{
+- int rc = vboxExtPackValidateMemberName(pszName, pszError, cbError);
+- if (RT_SUCCESS(rc))
+- {
+- RTFSOBJINFO ObjInfo;
+- rc = RTVfsObjQueryInfo(hVfsObj, &ObjInfo, RTFSOBJATTRADD_NOTHING);
+- if (RT_SUCCESS(rc))
+- {
+- if (ObjInfo.cbObject >= 9*_1G64)
+- rc = vboxExtPackReturnError(VERR_OUT_OF_RANGE, pszError, cbError,
+- "'%s': too large (%'RU64 bytes)",
+- pszName, (uint64_t)ObjInfo.cbObject);
+- if (!RTFS_IS_FILE(ObjInfo.Attr.fMode))
+- rc = vboxExtPackReturnError(VERR_NOT_A_FILE, pszError, cbError,
+- "The alleged file '%s' has a mode mask stating otherwise (%RTfmode)",
+- pszName, ObjInfo.Attr.fMode);
+- }
+- else
+- vboxExtPackSetError(pszError, cbError, "RTVfsObjQueryInfo failed on '%s': %Rrc", pszName, rc);
+- }
+- return rc;
+-}
+-
+-
+-/**
+- * Validates a directory in an extension pack.
+- *
+- * @returns VBox status code, failures with message.
+- * @param pszName The name of the directory.
+- * @param hVfsObj The VFS object.
+- * @param pszError Where to store an error message on failure.
+- * @param cbError The size of the buffer @a pszError points to.
+- */
+-static int vboxExtPackValidateMemberDir(const char *pszName, RTVFSOBJ hVfsObj, char *pszError, size_t cbError)
+-{
+- int rc = vboxExtPackValidateMemberName(pszName, pszError, cbError);
+- if (RT_SUCCESS(rc))
+- {
+- RTFSOBJINFO ObjInfo;
+- rc = RTVfsObjQueryInfo(hVfsObj, &ObjInfo, RTFSOBJATTRADD_NOTHING);
+- if (RT_SUCCESS(rc))
+- {
+- if (!RTFS_IS_DIRECTORY(ObjInfo.Attr.fMode))
+- rc = vboxExtPackReturnError(VERR_NOT_A_DIRECTORY, pszError, cbError,
+- "The alleged directory '%s' has a mode mask saying differently (%RTfmode)",
+- pszName, ObjInfo.Attr.fMode);
+- }
+- else
+- vboxExtPackSetError(pszError, cbError, "RTVfsObjQueryInfo failed on '%s': %Rrc", pszName, rc);
+- }
+- return rc;
+-}
+-
+-/**
+- * Validates a member of an extension pack.
+- *
+- * @returns VBox status code, failures with message.
+- * @param pszName The name of the directory.
+- * @param enmType The object type.
+- * @param hVfsObj The VFS object.
+- * @param pszError Where to store an error message on failure.
+- * @param cbError The size of the buffer @a pszError points to.
+- */
+-int VBoxExtPackValidateMember(const char *pszName, RTVFSOBJTYPE enmType, RTVFSOBJ hVfsObj, char *pszError, size_t cbError)
+-{
+- Assert(cbError > 0);
+- *pszError = '\0';
+-
+- int rc;
+- if ( enmType == RTVFSOBJTYPE_FILE
+- || enmType == RTVFSOBJTYPE_IO_STREAM)
+- rc = vboxExtPackValidateMemberFile(pszName, hVfsObj, pszError, cbError);
+- else if ( enmType == RTVFSOBJTYPE_DIR
+- || enmType == RTVFSOBJTYPE_BASE)
+- rc = vboxExtPackValidateMemberDir(pszName, hVfsObj, pszError, cbError);
+- else
+- rc = vboxExtPackReturnError(VERR_UNEXPECTED_FS_OBJ_TYPE, pszError, cbError,
+- "'%s' is not a file or directory (enmType=%d)", pszName, enmType);
+- return rc;
+-}
+-
+-
+-/**
+- * Rewinds the tarball file handle and creates a gunzip | tar chain that
+- * results in a filesystem stream.
+- *
+- * @returns VBox status code, failures with message.
+- * @param hTarballFile The handle to the tarball file.
+- * @param pszError Where to store an error message on failure.
+- * @param cbError The size of the buffer @a pszError points to.
+- * @param phTarFss Where to return the filesystem stream handle.
+- * @param phFileManifest Where to return a manifest where the tarball is
+- * gettting hashed. The entry will be called
+- * "extpack" and be ready when the file system
+- * stream is at an end. Optional.
+- */
+-int VBoxExtPackOpenTarFss(RTFILE hTarballFile, char *pszError, size_t cbError, PRTVFSFSSTREAM phTarFss, PRTMANIFEST phFileManifest)
+-{
+- Assert(cbError > 0);
+- *pszError = '\0';
+- *phTarFss = NIL_RTVFSFSSTREAM;
+-
+- /*
+- * Rewind the file and set up a VFS chain for it.
+- */
+- int rc = RTFileSeek(hTarballFile, 0, RTFILE_SEEK_BEGIN, NULL);
+- if (RT_FAILURE(rc))
+- return vboxExtPackReturnError(rc, pszError, cbError, "Failed seeking to the start of the tarball: %Rrc", rc);
+-
+- RTVFSIOSTREAM hTarballIos;
+- rc = RTVfsIoStrmFromRTFile(hTarballFile, RTFILE_O_READ | RTFILE_O_DENY_WRITE | RTFILE_O_OPEN, true /*fLeaveOpen*/,
+- &hTarballIos);
+- if (RT_FAILURE(rc))
+- return vboxExtPackReturnError(rc, pszError, cbError, "RTVfsIoStrmFromRTFile failed: %Rrc", rc);
+-
+- RTMANIFEST hFileManifest = NIL_RTMANIFEST;
+- rc = RTManifestCreate(0 /*fFlags*/, &hFileManifest);
+- if (RT_SUCCESS(rc))
+- {
+- RTVFSIOSTREAM hPtIos;
+- rc = RTManifestEntryAddPassthruIoStream(hFileManifest, hTarballIos, "extpack", RTMANIFEST_ATTR_SHA256, true /*read*/, &hPtIos);
+- if (RT_SUCCESS(rc))
+- {
+- RTVFSIOSTREAM hGunzipIos;
+- rc = RTZipGzipDecompressIoStream(hPtIos, 0 /*fFlags*/, &hGunzipIos);
+- if (RT_SUCCESS(rc))
+- {
+- RTVFSFSSTREAM hTarFss;
+- rc = RTZipTarFsStreamFromIoStream(hGunzipIos, 0 /*fFlags*/, &hTarFss);
+- if (RT_SUCCESS(rc))
+- {
+- RTVfsIoStrmRelease(hPtIos);
+- RTVfsIoStrmRelease(hGunzipIos);
+- RTVfsIoStrmRelease(hTarballIos);
+- *phTarFss = hTarFss;
+- if (phFileManifest)
+- *phFileManifest = hFileManifest;
+- else
+- RTManifestRelease(hFileManifest);
+- return VINF_SUCCESS;
+- }
+-
+- vboxExtPackSetError(pszError, cbError, "RTZipTarFsStreamFromIoStream failed: %Rrc", rc);
+- RTVfsIoStrmRelease(hGunzipIos);
+- }
+- else
+- vboxExtPackSetError(pszError, cbError, "RTZipGzipDecompressIoStream failed: %Rrc", rc);
+- RTVfsIoStrmRelease(hPtIos);
+- }
+- else
+- vboxExtPackSetError(pszError, cbError, "RTManifestEntryAddPassthruIoStream failed: %Rrc", rc);
+- RTManifestRelease(hFileManifest);
+- }
+- else
+- vboxExtPackSetError(pszError, cbError, "RTManifestCreate failed: %Rrc", rc);
+-
+- RTVfsIoStrmRelease(hTarballIos);
+- return rc;
+-}
+-
+-
+-/**
+- * Validates the extension pack tarball prior to unpacking.
+- *
+- * Operations performed:
+- * - Mandatory files.
+- * - Manifest check.
+- * - Manifest seal check.
+- * - XML check, match name.
+- *
+- * @returns VBox status code, failures with message.
+- * @param hTarballFile The handle to open the @a pszTarball file.
+- * @param pszExtPackName The name of the extension pack name. NULL if
+- * the name is not fixed.
+- * @param pszTarball The name of the tarball in case we have to
+- * complain about something.
+- * @param pszTarballDigest The SHA-256 digest of the tarball. Empty string
+- * if no digest available.
+- * @param pszError Where to store an error message on failure.
+- * @param cbError The size of the buffer @a pszError points to.
+- * @param phValidManifest Where to optionally return the handle to fully
+- * validated the manifest for the extension pack.
+- * This includes all files.
+- * @param phXmlFile Where to optionally return the memorized XML
+- * file.
+- * @param pStrDigest Where to return the digest of the file.
+- * Optional.
+- */
+-int VBoxExtPackValidateTarball(RTFILE hTarballFile, const char *pszExtPackName,
+- const char *pszTarball, const char *pszTarballDigest,
+- char *pszError, size_t cbError,
+- PRTMANIFEST phValidManifest, PRTVFSFILE phXmlFile, RTCString *pStrDigest)
+-{
+- /*
+- * Clear return values.
+- */
+- if (phValidManifest)
+- *phValidManifest = NIL_RTMANIFEST;
+- if (phXmlFile)
+- *phXmlFile = NIL_RTVFSFILE;
+- Assert(cbError > 1);
+- *pszError = '\0';
+- NOREF(pszTarball);
+-
+- /*
+- * Open the tar.gz filesystem stream and set up an manifest in-memory file.
+- */
+- RTMANIFEST hFileManifest;
+- RTVFSFSSTREAM hTarFss;
+- int rc = VBoxExtPackOpenTarFss(hTarballFile, pszError, cbError, &hTarFss, &hFileManifest);
+- if (RT_FAILURE(rc))
+- return rc;
+-
+- RTMANIFEST hOurManifest;
+- rc = RTManifestCreate(0 /*fFlags*/, &hOurManifest);
+- if (RT_SUCCESS(rc))
+- {
+- /*
+- * Process the tarball (would be nice to move this to a function).
+- */
+- RTVFSFILE hXmlFile = NIL_RTVFSFILE;
+- RTVFSFILE hManifestFile = NIL_RTVFSFILE;
+- RTVFSFILE hSignatureFile = NIL_RTVFSFILE;
+- for (;;)
+- {
+- /*
+- * Get the next stream object.
+- */
+- char *pszName;
+- RTVFSOBJ hVfsObj;
+- RTVFSOBJTYPE enmType;
+- rc = RTVfsFsStrmNext(hTarFss, &pszName, &enmType, &hVfsObj);
+- if (RT_FAILURE(rc))
+- {
+- if (rc != VERR_EOF)
+- vboxExtPackSetError(pszError, cbError, "RTVfsFsStrmNext failed: %Rrc", rc);
+- else
+- rc = VINF_SUCCESS;
+- break;
+- }
+- const char *pszAdjName = pszName[0] == '.' && pszName[1] == '/' ? &pszName[2] : pszName;
+-
+- /*
+- * Check the type & name validity, performing special tests on
+- * standard extension pack member files.
+- *
+- * N.B. We will always reach the end of the loop before breaking on
+- * failure - cleanup reasons.
+- */
+- rc = VBoxExtPackValidateMember(pszName, enmType, hVfsObj, pszError, cbError);
+- if (RT_SUCCESS(rc))
+- {
+- PRTVFSFILE phVfsFile = NULL;
+- if (!strcmp(pszAdjName, VBOX_EXTPACK_DESCRIPTION_NAME))
+- phVfsFile = &hXmlFile;
+- else if (!strcmp(pszAdjName, VBOX_EXTPACK_MANIFEST_NAME))
+- phVfsFile = &hManifestFile;
+- else if (!strcmp(pszAdjName, VBOX_EXTPACK_SIGNATURE_NAME))
+- phVfsFile = &hSignatureFile;
+- else if (!strncmp(pszAdjName, VBOX_EXTPACK_LICENSE_NAME_PREFIX, sizeof(VBOX_EXTPACK_LICENSE_NAME_PREFIX) - 1))
+- rc = VBoxExtPackValidateStandardFile(pszAdjName, enmType, &hVfsObj, NULL, pszError, cbError);
+- if (phVfsFile)
+- rc = VBoxExtPackValidateStandardFile(pszAdjName, enmType, &hVfsObj, phVfsFile, pszError, cbError);
+- }
+-
+- /*
+- * Add any I/O stream to the manifest
+- */
+- if ( RT_SUCCESS(rc)
+- && ( enmType == RTVFSOBJTYPE_FILE
+- || enmType == RTVFSOBJTYPE_IO_STREAM))
+- {
+- RTVFSIOSTREAM hVfsIos = RTVfsObjToIoStream(hVfsObj);
+- rc = RTManifestEntryAddIoStream(hOurManifest, hVfsIos, pszAdjName, RTMANIFEST_ATTR_SIZE | RTMANIFEST_ATTR_SHA256);
+- if (RT_FAILURE(rc))
+- vboxExtPackSetError(pszError, cbError, "RTManifestEntryAddIoStream failed on '%s': %Rrc", pszAdjName, rc);
+- RTVfsIoStrmRelease(hVfsIos);
+- }
+-
+- /*
+- * Clean up and break out on failure.
+- */
+- RTVfsObjRelease(hVfsObj);
+- RTStrFree(pszName);
+- if (RT_FAILURE(rc))
+- break;
+- }
+-
+- /*
+- * Check the integrity of the tarball file.
+- */
+- if (RT_SUCCESS(rc))
+- {
+- RTVfsFsStrmRelease(hTarFss);
+- hTarFss = NIL_RTVFSFSSTREAM;
+- rc = vboxExtPackVerifyFileDigest(hFileManifest, pszTarballDigest, pStrDigest, pszError, cbError);
+- }
+-
+- /*
+- * If we've successfully processed the tarball, verify that the
+- * mandatory files are present.
+- */
+- if (RT_SUCCESS(rc))
+- {
+- if (hXmlFile == NIL_RTVFSFILE)
+- rc = vboxExtPackReturnError(VERR_MISSING, pszError, cbError, "Mandator file '%s' is missing", VBOX_EXTPACK_DESCRIPTION_NAME);
+- if (hManifestFile == NIL_RTVFSFILE)
+- rc = vboxExtPackReturnError(VERR_MISSING, pszError, cbError, "Mandator file '%s' is missing", VBOX_EXTPACK_MANIFEST_NAME);
+- if (hSignatureFile == NIL_RTVFSFILE)
+- rc = vboxExtPackReturnError(VERR_MISSING, pszError, cbError, "Mandator file '%s' is missing", VBOX_EXTPACK_SIGNATURE_NAME);
+- }
+-
+- /*
+- * Check the manifest and it's signature.
+- */
+- if (RT_SUCCESS(rc))
+- rc = vboxExtPackVerifyManifestAndSignature(hOurManifest, hManifestFile, hSignatureFile, pszError, cbError);
+-
+- /*
+- * Check the XML.
+- */
+- if (RT_SUCCESS(rc))
+- rc = vboxExtPackVerifyXml(hXmlFile, pszExtPackName, pszError, cbError);
+-
+- /*
+- * Returns objects.
+- */
+- if (RT_SUCCESS(rc))
+- {
+- if (phValidManifest)
+- {
+- RTManifestRetain(hOurManifest);
+- *phValidManifest = hOurManifest;
+- }
+- if (phXmlFile)
+- {
+- RTVfsFileRetain(hXmlFile);
+- *phXmlFile = hXmlFile;
+- }
+- }
+-
+- /*
+- * Release our object references.
+- */
+- RTManifestRelease(hOurManifest);
+- RTVfsFileRelease(hXmlFile);
+- RTVfsFileRelease(hManifestFile);
+- RTVfsFileRelease(hSignatureFile);
+- }
+- else
+- vboxExtPackSetError(pszError, cbError, "RTManifestCreate failed: %Rrc", rc);
+- RTVfsFsStrmRelease(hTarFss);
+- RTManifestRelease(hFileManifest);
+-
+- return rc;
+-}
+-
+--- VirtualBox-4.1.18.orig/include/Makefile.kmk 2012-06-20 10:07:49.000000000 -0300
++++ VirtualBox-4.1.18/include/Makefile.kmk 2012-07-24 21:11:57.007068865 -0300
+@@ -51,7 +51,6 @@
+ VBox/vd-cache-plugin.h \
+ VBox/vmm/uvm.h \
+ VBox/vscsi.h \
+- $(wildcard VBox/ExtPack/*.h ) \
+ iprt/alloca.h \
+ iprt/tcp.h \
+ iprt/localipc.h \
+--- VirtualBox-4.1.18.orig/src/Makefile.kmk 2012-06-20 10:07:57.000000000 -0300
++++ VirtualBox-4.1.18/src/Makefile.kmk 2012-07-24 22:51:10.206996034 -0300
+@@ -26,14 +26,6 @@
+ include $(PATH_SUB_CURRENT)/VBox/Makefile.kmk
+ include $(PATH_SUB_CURRENT)/libs/Makefile.kmk
+
+-else if defined(VBOX_ONLY_EXTPACKS)
+- include $(PATH_SUB_CURRENT)/bldprogs/Makefile.kmk
+- include $(PATH_SUB_CURRENT)/VBox/Makefile.kmk
+- include $(PATH_SUB_CURRENT)/libs/Makefile.kmk
+- ifndef VBOX_ONLY_EXTPACKS_USE_IMPLIBS
+- include $(PATH_SUB_CURRENT)/recompiler/Makefile.kmk
+- endif
+-
+ else if defined(VBOX_ONLY_TESTSUITE)
+ include $(PATH_SUB_CURRENT)/libs/Makefile.kmk
+ include $(PATH_SUB_CURRENT)/VBox/Makefile.kmk
+--- VirtualBox-4.1.18.orig/src/VBox/Makefile.kmk 2012-07-24 21:19:55.565641784 -0300
++++ VirtualBox-4.1.18/src/VBox/Makefile.kmk 2012-07-24 22:12:55.429156962 -0300
+@@ -33,19 +33,6 @@
+ include $(PATH_SUB_CURRENT)/HostDrivers/Makefile.kmk
+ include $(PATH_SUB_CURRENT)/Frontends/Makefile.kmk
+
+-else ifdef VBOX_ONLY_EXTPACKS
+- include $(PATH_SUB_CURRENT)/Runtime/Makefile.kmk
+- include $(PATH_SUB_CURRENT)/Devices/Makefile.kmk
+- include $(PATH_SUB_CURRENT)/HostDrivers/Makefile.kmk
+- include $(PATH_SUB_CURRENT)/ExtPacks/Makefile.kmk
+- ifdef VBOX_WITH_VRDP
+- include $(PATH_SUB_CURRENT)/RDP/Makefile.kmk
+- endif
+- include $(PATH_SUB_CURRENT)/VMM/Makefile.kmk
+- ifndef VBOX_ONLY_EXTPACKS_USE_IMPLIBS
+- include $(PATH_SUB_CURRENT)/Disassembler/Makefile.kmk
+- endif
+-
+ else ifdef VBOX_ONLY_SDK
+ include $(PATH_SUB_CURRENT)/Main/Makefile.kmk
+ ifdef VBOX_WITH_VRDP
+@@ -92,9 +79,6 @@
+ if1of ($(KBUILD_TARGET_ARCH), amd64 x86)
+ include $(PATH_SUB_CURRENT)/NetworkServices/Makefile.kmk
+ endif
+- ifndef VBOX_OSE
+- include $(PATH_SUB_CURRENT)/ExtPacks/Makefile.kmk
+- endif
+ ifdef VBOX_WITH_INSTALLER
+ include $(PATH_SUB_CURRENT)/Installer/Makefile.kmk # Keep this last.
+ endif
+--- VirtualBox-4.1.18/src/libs/Makefile.kmk.orig 2012-07-24 21:23:26.938013023 -0300
++++ VirtualBox-4.1.18/src/libs/Makefile.kmk 2012-07-24 21:43:42.557911752 -0300
+@@ -48,13 +48,6 @@
+ include $(PATH_SUB_CURRENT)/kStuff/Makefile.kmk
+ endif
+
+-# OpenSSL.
+-if !defined(VBOX_ONLY_SDK) \
+- && ( "$(SDK_VBOX_OPENSSL_INCS)" == "$(SDK_VBOX_OPENSSL_VBOX_DEFAULT_INCS)" \
+- || defined(VBOX_WITH_EXTPACK_PUEL_BUILD))
+- include $(PATH_SUB_CURRENT)/openssl-0.9.8t/Makefile.kmk
+-endif
+-
+ # libjpeg for VRDP video redirection
+ if defined(VBOX_WITH_VRDP) && defined(VBOX_WITH_VRDP_VIDEO_CHANNEL)
+ include $(PATH_SUB_CURRENT)/jpeg-8a/Makefile.kmk
+--- VirtualBox-4.1.18.orig/src/VBox/Devices/Makefile.kmk 2012-07-24 23:06:45.916276235 -0300
++++ VirtualBox-4.1.18/src/VBox/Devices/Makefile.kmk 2012-07-24 23:17:00.202963228 -0300
+@@ -21,9 +21,7 @@
+
+ # Include sub-makefiles.
+ include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
+-if defined(VBOX_WITH_INTEL_PXE) || defined(VBOX_ONLY_EXTPACKS)
+- include $(PATH_SUB_CURRENT)/PC/PXE/Makefile.kmk
+-else if defined(VBOX_WITH_PXE_ROM) && !defined(VBOX_WITHOUT_ETHERBOOT)
++if defined(VBOX_WITH_PXE_ROM) && !defined(VBOX_WITHOUT_ETHERBOOT)
+ include $(PATH_SUB_CURRENT)/PC/Etherboot-src/Makefile.kmk
+ endif
+ if !defined(VBOX_ONLY_EXTPACKS) # Goes on almost to the end of the file.
+@@ -57,9 +55,6 @@
+ ifdef VBOX_WITH_USB
+ VBoxDDU_DEFS += VBOX_WITH_USB IN_USBLIB
+ VBoxDDU_SDKS.win = WINPSDK W2K3DDK
+- if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
+- VBoxDDU_DEFS += VBOX_WITH_EHCI_IMPL
+- endif
+ ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
+ VBoxDDU_DEFS.darwin += VBOX_WITH_NEW_USB_CODE_ON_DARWIN
+ endif
+@@ -122,9 +117,6 @@
+ VBoxDD_DEFS = VBOX_ACPI
+ ifdef VBOX_WITH_USB
+ VBoxDD_DEFS += VBOX_WITH_USB
+- if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
+- VBoxDD_DEFS += VBOX_WITH_EHCI_IMPL
+- endif
+ endif
+ ifdef VBOX_WITH_VUSB
+ VBoxDD_DEFS += VBOX_WITH_VUSB
+@@ -446,11 +438,6 @@
+ endif
+ ifdef VBOX_WITH_USB
+ DevicesR3_DEFS += VBOX_WITH_USB
+- if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
+- DevicesR3_DEFS += VBOX_WITH_EHCI_IMPL
+- DevicesR3_SOURCES += \
+- USB/DevEHCI.cpp
+- endif
+ endif
+ if defined(VBOX_WITH_PCI_PASSTHROUGH_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
+ DevicesR3_DEFS += VBOX_WITH_PCI_PASSTHROUGH_IMPL
+@@ -607,11 +594,6 @@
+
+ ifdef VBOX_WITH_USB
+ VBoxDDGC_DEFS += VBOX_WITH_USB
+- if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
+- VBoxDDGC_DEFS += VBOX_WITH_EHCI_IMPL
+- VBoxDDGC_SOURCES += \
+- USB/DevEHCI.cpp
+- endif
+ endif
+
+ ifdef VBOX_WITH_VIDEOHWACCEL
+@@ -711,11 +693,6 @@
+ endif
+ ifdef VBOX_WITH_USB
+ VBoxDDR0_DEFS += VBOX_WITH_USB
+- if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
+- VBoxDDR0_DEFS += VBOX_WITH_EHCI_IMPL
+- VBoxDDR0_SOURCES += \
+- USB/DevEHCI.cpp
+- endif
+ endif
+
+ if defined(VBOX_WITH_PCI_PASSTHROUGH_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
+@@ -1204,49 +1181,5 @@
+
+ endif # !VBOX_ONLY_EXTPACKS
+
+-if defined(VBOX_WITH_EXTPACK_PUEL) && defined(VBOX_WITH_EXTPACK_PUEL_BUILD)
+- #
+- # The EHCI (USB 2.0) Extension Pack Modules.
+- #
+- if defined(VBOX_WITH_USB)
+- DLLS += VBoxEhciR3
+- VBoxEhciR3_TEMPLATE = VBoxR3ExtPackPuel
+- VBoxEhciR3_SOURCES = USB/DevEHCI.cpp
+-
+- SYSMODS += VBoxEhciR0
+- VBoxEhciR0_TEMPLATE = VBoxR0ExtPackPuel
+- VBoxEhciR0_SOURCES = USB/DevEHCI.cpp
+-
+- ifdef VBOX_WITH_RAW_MODE
+- SYSMODS += VBoxEhciRC
+- VBoxEhciRC_TEMPLATE = VBoxRcExtPackPuel
+- VBoxEhciRC_SOURCES = USB/DevEHCI.cpp
+- endif
+- endif
+-
+- if defined(VBOX_WITH_PCI_PASSTHROUGH)
+- DLLS += VBoxPciRawR3
+- VBoxPciRawR3_TEMPLATE = VBoxR3ExtPackPuel
+- VBoxPciRawR3_SOURCES = Bus/DevPciRaw.cpp
+-
+- DLLS += VBoxPciRawDrv
+- VBoxPciRawDrv_TEMPLATE = VBoxR3ExtPackPuel
+- VBoxPciRawDrv_SOURCES = Bus/DrvPciRaw.cpp
+-
+- SYSMODS += VBoxPciRawR0
+- VBoxPciRawR0_TEMPLATE = VBoxR0ExtPackPuel
+- VBoxPciRawR0_SOURCES = Bus/DevPciRaw.cpp
+-
+- Bus/DevPciRaw.cpp_INCS = Bus
+- endif
+-
+- #
+- # The Intel PXE rom.
+- #
+- INSTALLS += VBoxExtPackPuelInsRoms
+- VBoxExtPackPuelInsRoms_TEMPLATE = VBoxInsExtPackPuel
+- VBoxExtPackPuelInsRoms_SOURCES = PC/PXE/PXE-Intel.rom=>PXE-Intel.rom
+-endif # VBOX_WITH_EXTPACK_PUEL
+-
+ include $(KBUILD_PATH)/subfooter.kmk
+
+--- VirtualBox-4.1.18.orig/src/VBox/Main/Makefile.kmk 2012-07-24 23:38:25.304126039 -0300
++++ VirtualBox-4.1.18/src/VBox/Main/Makefile.kmk 2012-07-24 23:38:25.350789964 -0300
+@@ -230,14 +230,12 @@
+ $(if $(VBOX_USB_WITH_SYSFS),VBOX_USB_WITH_SYSFS,) \
+ $(if $(VBOX_USB_WITH_INOTIFY),VBOX_USB_WITH_INOTIFY,) \
+ $(if $(VBOX_WITH_LIVE_MIGRATION),VBOX_WITH_LIVE_MIGRATION,) \
+- $(if $(VBOX_WITH_EXTPACK),VBOX_WITH_EXTPACK,) \
+ $(if $(VBOX_WITH_VUSB),VBOX_WITH_VUSB,) \
+ $(if $(VBOX_WITH_S3),VBOX_WITH_S3,) \
+ $(if $(VBOX_WITH_PCI_PASSTHROUGH),VBOX_WITH_PCI_PASSTHROUGH,)
+ ifdef VBOX_WITH_USB
+ VBoxSVC_DEFS += \
+ VBOX_WITH_USB \
+- $(if $(VBOX_WITH_EHCI),VBOX_WITH_EHCI,) \
+ $(if $(VBOX_WITH_NEW_USB_CODE_ON_DARWIN),VBOX_WITH_NEW_USB_CODE_ON_DARWIN,)
+ endif
+ VBoxSVC_DEFS.win += VBOX_COM_OUTOFPROC_MODULE
+@@ -290,7 +288,6 @@
+ src-all/SharedFolderImpl.cpp \
+ src-all/VirtualBoxBase.cpp \
+ src-all/VirtualBoxErrorInfoImpl.cpp \
+- $(if $(VBOX_WITH_EXTPACK),src-all/ExtPackManagerImpl.cpp src-all/ExtPackUtil.cpp,) \
+ src-server/ApplianceImpl.cpp \
+ src-server/ApplianceImplExport.cpp \
+ src-server/ApplianceImplImport.cpp \
+@@ -543,8 +540,6 @@
+ $(if $(VBOX_WITH_HGSMI),VBOX_WITH_HGSMI,) \
+ $(if $(VBOX_WITH_VIDEOHWACCEL),VBOX_WITH_VIDEOHWACCEL,) \
+ $(if $(VBOX_WITH_USB),VBOX_WITH_USB,) \
+- $(if-expr defined(VBOX_WITH_EHCI) && defined(VBOX_WITH_USB),VBOX_WITH_EHCI,) \
+- $(if $(VBOX_WITH_EXTPACK),VBOX_WITH_EXTPACK,) \
+ $(if $(VBOX_WITH_PCI_PASSTHROUGH),VBOX_WITH_PCI_PASSTHROUGH,)
+
+ VBoxC_DEFS.darwin.x86 = VBOX_WITH_2X_4GB_ADDR_SPACE
+@@ -602,7 +597,6 @@
+ src-all/SharedFolderImpl.cpp \
+ src-all/VirtualBoxBase.cpp \
+ src-all/VirtualBoxErrorInfoImpl.cpp \
+- $(if $(VBOX_WITH_EXTPACK),src-all/ExtPackManagerImpl.cpp src-all/ExtPackUtil.cpp,) \
+ $(if $(VBOX_WITH_USB_VIDEO),src-client/UsbWebcamInterface.cpp,) \
+ $(if $(VBOX_WITH_USB_CARDREADER),src-client/UsbCardReader.cpp,) \
+ src-client/AdditionsFacilityImpl.cpp \
+@@ -711,22 +705,6 @@
+ endif # !win
+
+
+-#
+-# The VBoxExtPackHelperApp.
+-#
+-ifdef VBOX_WITH_EXTPACK
+- PROGRAMS += VBoxExtPackHelperApp
+- VBoxExtPackHelperApp_TEMPLATE = VBoxR3SetUidToRoot
+- VBoxExtPackHelperApp_LDFLAGS.darwin = -framework Security
+- VBoxExtPackHelperApp_LDFLAGS.win = /SUBSYSTEM:windows
+- VBoxExtPackHelperApp_SOURCES = \
+- src-helper-apps/VBoxExtPackHelperApp.cpp \
+- src-all/ExtPackUtil.cpp
+- VBoxExtPackHelperApp_LIBS = \
+- $(LIB_RUNTIME)
+-endif # VBOX_WITH_EXTPACK
+-
+-
+ endif # !VBOX_ONLY_SDK (the ifndef is far above)
+
+
+--- VirtualBox-4.1.18.orig/src/VBox/Frontends/VirtualBox/Makefile.kmk 2012-07-24 23:25:04.575825175 -0300
++++ VirtualBox-4.1.18/src/VBox/Frontends/VirtualBox/Makefile.kmk 2012-07-24 23:25:04.619156084 -0300
+@@ -888,7 +888,6 @@
+ $(VBOX_MACOSX_ICON_FILE)=>Resources/virtualbox.icns \
+ $(VBOX_BRAND_GUI_VBOX_64PX_PNG)=>Resources/virtualbox.png \
+ $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-vbox.icns=>Resources/virtualbox-vbox.icns \
+- $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-vbox-extpack.icns=>Resources/virtualbox-vbox-extpack.icns \
+ $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-ovf.icns=>Resources/virtualbox-ovf.icns \
+ $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-ova.icns=>Resources/virtualbox-ova.icns \
+ $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-vdi.icns=>Resources/virtualbox-vdi.icns \
+--- VirtualBox-4.1.18.orig/src/VBox/Frontends/VirtualBox/VirtualBox2.qrc 2012-07-24 23:28:17.985011038 -0300
++++ VirtualBox-4.1.18/src/VBox/Frontends/VirtualBox/VirtualBox2.qrc 2012-07-24 23:28:18.051673913 -0300
+@@ -167,18 +167,6 @@
+ <file alias="status_check_32px.png">images/status_check_32px.png</file>
+ <file alias="status_error_16px.png">images/status_error_16px.png</file>
+ <file alias="status_error_32px.png">images/status_error_32px.png</file>
+- <file alias="extension_pack_16px.png">images/extension_pack_16px.png</file>
+- <file alias="extension_pack_disabled_16px.png">images/extension_pack_disabled_16px.png</file>
+- <file alias="extension_pack_32px.png">images/extension_pack_32px.png</file>
+- <file alias="extension_pack_disabled_32px.png">images/extension_pack_disabled_32px.png</file>
+- <file alias="extension_pack_install_16px.png">images/extension_pack_install_16px.png</file>
+- <file alias="extension_pack_install_disabled_16px.png">images/extension_pack_install_disabled_16px.png</file>
+- <file alias="extension_pack_install_32px.png">images/extension_pack_install_32px.png</file>
+- <file alias="extension_pack_install_disabled_32px.png">images/extension_pack_install_disabled_32px.png</file>
+- <file alias="extension_pack_uninstall_16px.png">images/extension_pack_uninstall_16px.png</file>
+- <file alias="extension_pack_uninstall_disabled_16px.png">images/extension_pack_uninstall_disabled_16px.png</file>
+- <file alias="extension_pack_uninstall_32px.png">images/extension_pack_uninstall_32px.png</file>
+- <file alias="extension_pack_uninstall_disabled_32px.png">images/extension_pack_uninstall_disabled_32px.png</file>
+ <file alias="proxy_16px.png">images/proxy_16px.png</file>
+ <file alias="proxy_disabled_16px.png">images/proxy_disabled_16px.png</file>
+ <file alias="proxy_32px.png">images/proxy_32px.png</file>
+--- VirtualBox-4.1.18.orig/src/VBox/Installer/linux/Makefile.kmk 2012-07-25 00:32:00.780012664 -0300
++++ VirtualBox-4.1.18/src/VBox/Installer/linux/Makefile.kmk 2012-07-25 00:32:00.806677728 -0300
+@@ -170,11 +170,6 @@
+ VBox.sh \
+ VBox.png
+
+-ifdef VBOX_WITH_EXTPACK
+- VBOX_LNX_STRIP_BIN += \
+- VBoxExtPackHelperApp
+-endif
+-
+ # Qt4 GUI
+ ifdef VBOX_WITH_QTGUI
+ include $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk
+@@ -286,7 +281,7 @@
+
+ VBOX_MIME_ICONS = \
+ $(addprefix $(PATH_ROOT)/src/VBox/Resources/other/,\
+- $(foreach f,ova ovf vbox vbox-extpack vdi vmdk vhd hdd, \
++ $(foreach f,ova ovf vbox vdi vmdk vhd hdd, \
+ $(foreach s,16 20 24 32 48 64 72 96 128 256,\
+ virtualbox-$(f)-$(s)px.png=>$(s)x$(s)/virtualbox-$(f).png)))
+
+--- VirtualBox-4.1.18.orig/src/VBox/Installer/win/Makefile.kmk 2012-07-25 00:34:52.253398525 -0300
++++ VirtualBox-4.1.18/src/VBox/Installer/win/Makefile.kmk 2012-07-25 00:34:52.300062531 -0300
+@@ -435,7 +435,6 @@
+ -E 'VBOX_WITH_DEBUGGER_GUI=$(if-expr defined(VBOX_WITH_DEBUGGER_GUI) && defined(VBOX_WITH_QTGUI),yes,no)' \
+ -E 'VBOX_WITH_DOCS_PACKING=$(if $(VBOX_WITH_DOCS_PACKING),yes,no)' \
+ -E 'VBOX_WITH_EFIFW_PACKING=$(if $(VBOX_WITH_EFIFW_PACKING),yes,no)' \
+- -E 'VBOX_WITH_EXTPACK=$(if $(VBOX_WITH_EXTPACK),yes,no)' \
+ -E 'VBOX_WITH_GUEST_CONTROL=$(if $(VBOX_WITH_GUEST_CONTROL),yes,no)' \
+ -E 'VBOX_WITH_GUEST_PROPS=$(if $(VBOX_WITH_GUEST_PROPS),yes,no)' \
+ -E 'VBOX_WITH_NETFLT=$(if $(VBOX_WITH_NETFLT),yes,no)' \
+--- VirtualBox-4.1.18.orig/src/VBox/Installer/darwin/Makefile.kmk 2012-07-25 00:36:55.929571374 -0300
++++ VirtualBox-4.1.18/src/VBox/Installer/darwin/Makefile.kmk 2012-07-25 00:36:55.959569630 -0300
+@@ -629,7 +629,6 @@
+ MacOS/VirtualBoxVM \
+ MacOS/VBoxNetAdpCtl \
+ MacOS/VBoxNetDHCP \
+- MacOS/VBoxExtPackHelperApp \
+ MacOS/VBoxBalloonCtrl
+ ifdef VBOX_WITH_WEBSERVICES
+ VBOX_DI_VBAPP_PROGS += \
+@@ -659,7 +658,6 @@
+ Resources/virtualbox.icns \
+ Resources/virtualbox.png \
+ Resources/virtualbox-vbox.icns \
+- Resources/virtualbox-vbox-extpack.icns \
+ Resources/virtualbox-ovf.icns \
+ Resources/virtualbox-ova.icns \
+ Resources/virtualbox-vdi.icns \
+--- VirtualBox-4.1.18/src/VBox/Installer/solaris/Makefile.kmk.orig 2012-07-25 00:38:48.476398293 -0300
++++ VirtualBox-4.1.18/src/VBox/Installer/solaris/Makefile.kmk 2012-07-25 00:38:48.516396159 -0300
+@@ -185,12 +185,12 @@
+
+ VBOX_MIME_ICONS = \
+ $(addprefix $(PATH_ROOT)/src/VBox/Resources/other/,\
+- $(foreach f,ova ovf vbox vbox-extpack vdi vmdk vhd hdd, \
++ $(foreach f,ova ovf vbox vdi vmdk vhd hdd, \
+ $(foreach s,16 20 24 32 48 64 72 96 128 256,\
+ virtualbox-$(f)-$(s)px.png=>$(s)x$(s)/mimetypes/virtualbox-$(f).png)))
+
+ SOLARIS_COMMON_ICONS = \
+- $(foreach f,ova ovf vbox vbox-extpack vdi vmdk vhd hdd, \
++ $(foreach f,ova ovf vbox vdi vmdk vhd hdd, \
+ $(foreach s,16 20 24 32 48 64 72 96 128 256,\
+ $(s)x$(s)/mimetypes/virtualbox-$(f).png))
+
+@@ -210,7 +210,6 @@
+ $(if $(VBOX_WITH_VBOXSDL),VBoxSDL,) \
+ $(if $(VBOX_WITH_NETADP),VBoxNetAdpCtl,) \
+ VBoxNetDHCP \
+- $(if $(VBOX_WITH_EXTPACK),VBoxExtPackHelperApp,) \
+ VBoxSVC \
+ $(if $(VBOX_WITH_CROGL),VBoxTestOGL,) \
+ VBoxXPCOMIPCD \
+--- VirtualBox-4.1.18.orig/src/VBox/Runtime/Makefile.kmk 2012-07-25 00:40:58.745522450 -0300
++++ VirtualBox-4.1.18/src/VBox/Runtime/Makefile.kmk 2012-07-25 00:40:58.782186960 -0300
+@@ -53,15 +53,6 @@
+ #
+ LIBRARIES += RuntimeR3 RuntimeBldProg
+
+-else ifdef VBOX_ONLY_EXTPACKS_USE_IMPLIBS
+- #
+- # Build docs only - need just regular R3 runtime.
+- #
+- LIBRARIES += RuntimeBldProg
+- LIBRARIES.solaris += RuntimeR0Stub
+- LIBRARIES.win += RuntimeR0Stub RuntimeRCStub
+- include $(PATH_SUB_CURRENT)/tools/Makefile.kmk
+-
+ else # !VBOX_ONLY_ADDITIONS && !VBOX_ONLY_TESTSUITE && !VBOX_ONLY_DOCS
+
+ #
diff --git a/libre/virtualbox-libre/os_blag.png b/libre/virtualbox-libre/os_blag.png
new file mode 100644
index 000000000..61995ca10
--- /dev/null
+++ b/libre/virtualbox-libre/os_blag.png
Binary files differ
diff --git a/libre/virtualbox-libre/os_blag_64.png b/libre/virtualbox-libre/os_blag_64.png
new file mode 100644
index 000000000..aa4463a97
--- /dev/null
+++ b/libre/virtualbox-libre/os_blag_64.png
Binary files differ
diff --git a/libre/virtualbox-libre/os_dragora.png b/libre/virtualbox-libre/os_dragora.png
new file mode 100644
index 000000000..d1df45880
--- /dev/null
+++ b/libre/virtualbox-libre/os_dragora.png
Binary files differ
diff --git a/libre/virtualbox-libre/os_dragora_64.png b/libre/virtualbox-libre/os_dragora_64.png
new file mode 100644
index 000000000..64bcecf20
--- /dev/null
+++ b/libre/virtualbox-libre/os_dragora_64.png
Binary files differ
diff --git a/libre/virtualbox-libre/os_dynebolic.png b/libre/virtualbox-libre/os_dynebolic.png
new file mode 100644
index 000000000..67b07d4c0
--- /dev/null
+++ b/libre/virtualbox-libre/os_dynebolic.png
Binary files differ
diff --git a/libre/virtualbox-libre/os_gnewsense.png b/libre/virtualbox-libre/os_gnewsense.png
new file mode 100644
index 000000000..76d9e38b3
--- /dev/null
+++ b/libre/virtualbox-libre/os_gnewsense.png
Binary files differ
diff --git a/libre/virtualbox-libre/os_gnewsense_64.png b/libre/virtualbox-libre/os_gnewsense_64.png
new file mode 100644
index 000000000..8859c34e8
--- /dev/null
+++ b/libre/virtualbox-libre/os_gnewsense_64.png
Binary files differ
diff --git a/libre/virtualbox-libre/os_gnu.png b/libre/virtualbox-libre/os_gnu.png
new file mode 100644
index 000000000..26c4550f9
--- /dev/null
+++ b/libre/virtualbox-libre/os_gnu.png
Binary files differ
diff --git a/libre/virtualbox-libre/os_gnu_64.png b/libre/virtualbox-libre/os_gnu_64.png
new file mode 100644
index 000000000..4161634e9
--- /dev/null
+++ b/libre/virtualbox-libre/os_gnu_64.png
Binary files differ
diff --git a/libre/virtualbox-libre/os_gnuhurd.png b/libre/virtualbox-libre/os_gnuhurd.png
new file mode 100644
index 000000000..26c4550f9
--- /dev/null
+++ b/libre/virtualbox-libre/os_gnuhurd.png
Binary files differ
diff --git a/libre/virtualbox-libre/os_gnulinux.png b/libre/virtualbox-libre/os_gnulinux.png
new file mode 100644
index 000000000..26c4550f9
--- /dev/null
+++ b/libre/virtualbox-libre/os_gnulinux.png
Binary files differ
diff --git a/libre/virtualbox-libre/os_gnulinux_64.png b/libre/virtualbox-libre/os_gnulinux_64.png
new file mode 100644
index 000000000..4161634e9
--- /dev/null
+++ b/libre/virtualbox-libre/os_gnulinux_64.png
Binary files differ
diff --git a/libre/virtualbox-libre/os_musix.png b/libre/virtualbox-libre/os_musix.png
new file mode 100644
index 000000000..fb7b94577
--- /dev/null
+++ b/libre/virtualbox-libre/os_musix.png
Binary files differ
diff --git a/libre/virtualbox-libre/os_musix_64.png b/libre/virtualbox-libre/os_musix_64.png
new file mode 100644
index 000000000..a1bbbbf3a
--- /dev/null
+++ b/libre/virtualbox-libre/os_musix_64.png
Binary files differ
diff --git a/libre/virtualbox-libre/os_os64base.png b/libre/virtualbox-libre/os_os64base.png
new file mode 100644
index 000000000..7aec20314
--- /dev/null
+++ b/libre/virtualbox-libre/os_os64base.png
Binary files differ
diff --git a/libre/virtualbox-libre/os_os64base.xcf b/libre/virtualbox-libre/os_os64base.xcf
new file mode 100644
index 000000000..d8e28e35e
--- /dev/null
+++ b/libre/virtualbox-libre/os_os64base.xcf
Binary files differ
diff --git a/libre/virtualbox-libre/os_osbase.png b/libre/virtualbox-libre/os_osbase.png
new file mode 100644
index 000000000..00f197fca
--- /dev/null
+++ b/libre/virtualbox-libre/os_osbase.png
Binary files differ
diff --git a/libre/virtualbox-libre/os_osbase.xcf b/libre/virtualbox-libre/os_osbase.xcf
new file mode 100644
index 000000000..c4463c857
--- /dev/null
+++ b/libre/virtualbox-libre/os_osbase.xcf
Binary files differ
diff --git a/libre/virtualbox-libre/os_parabola.png b/libre/virtualbox-libre/os_parabola.png
new file mode 100644
index 000000000..757abc484
--- /dev/null
+++ b/libre/virtualbox-libre/os_parabola.png
Binary files differ
diff --git a/libre/virtualbox-libre/os_parabola_64.png b/libre/virtualbox-libre/os_parabola_64.png
new file mode 100644
index 000000000..5ac7c2767
--- /dev/null
+++ b/libre/virtualbox-libre/os_parabola_64.png
Binary files differ
diff --git a/libre/virtualbox-libre/os_trisquel.png b/libre/virtualbox-libre/os_trisquel.png
new file mode 100644
index 000000000..c6f0d3d7a
--- /dev/null
+++ b/libre/virtualbox-libre/os_trisquel.png
Binary files differ
diff --git a/libre/virtualbox-libre/os_trisquel_64.png b/libre/virtualbox-libre/os_trisquel_64.png
new file mode 100644
index 000000000..ebca3dd43
--- /dev/null
+++ b/libre/virtualbox-libre/os_trisquel_64.png
Binary files differ
diff --git a/libre/virtualbox-libre/os_ututo.png b/libre/virtualbox-libre/os_ututo.png
new file mode 100644
index 000000000..e1dffb575
--- /dev/null
+++ b/libre/virtualbox-libre/os_ututo.png
Binary files differ
diff --git a/libre/virtualbox-libre/os_ututo_64.png b/libre/virtualbox-libre/os_ututo_64.png
new file mode 100644
index 000000000..158468e0a
--- /dev/null
+++ b/libre/virtualbox-libre/os_ututo_64.png
Binary files differ
diff --git a/libre/virtualbox-libre/os_venenux.png b/libre/virtualbox-libre/os_venenux.png
new file mode 100644
index 000000000..5e0c1585d
--- /dev/null
+++ b/libre/virtualbox-libre/os_venenux.png
Binary files differ
diff --git a/libre/virtualbox-libre/vboxservice.conf b/libre/virtualbox-libre/vboxservice.conf
new file mode 100644
index 000000000..9d4ec629f
--- /dev/null
+++ b/libre/virtualbox-libre/vboxservice.conf
@@ -0,0 +1,2 @@
+# VBoxService -h
+VBOX_SERVICE_OPTION=""
diff --git a/libre/virtualbox-libre/vboxservice.rc b/libre/virtualbox-libre/vboxservice.rc
new file mode 100644
index 000000000..5a62d69a3
--- /dev/null
+++ b/libre/virtualbox-libre/vboxservice.rc
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/${0##*/}
+
+name=VBoxService
+PID=$(pidof -o %PPID $name)
+
+case "$1" in
+ start)
+ stat_busy 'Starting VirtualBox Guest Service'
+ [[ -z "$PID" ]] && ${name} $VBOX_SERVICE_OPTION &>/dev/null \
+ && { add_daemon ${0##*/}; stat_done; } \
+ || { stat_fail; exit 1; }
+ ;;
+ stop)
+ stat_busy 'Stopping VirtualBox Guest Service'
+ [[ -n "$PID" ]] && kill $PID &>/dev/null \
+ && { rm_daemon ${0##*/}; stat_done; } \
+ || { stat_fail; exit 1; }
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ status)
+ stat_busy 'Checking VirtualBox Guest Service status'
+ ck_status ${0##*/}
+ ;;
+ *)
+ echo "usage: ${0##*/} {start|stop|restart|status}" >&2
+ exit 1
+esac
+
+exit 0
+
+# vim:set ts=2 sw=2 ft=sh et:
diff --git a/libre/virtualbox-libre/vboxservice.service b/libre/virtualbox-libre/vboxservice.service
new file mode 100644
index 000000000..bbd61617d
--- /dev/null
+++ b/libre/virtualbox-libre/vboxservice.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=VirtualBox Guest Service
+ConditionVirtualization=oracle
+
+[Service]
+ExecStart=/usr/bin/VBoxService -f
+
+[Install]
+WantedBy=multi-user.target
diff --git a/libre/virtualbox-libre/vboxweb.service b/libre/virtualbox-libre/vboxweb.service
new file mode 100644
index 000000000..303381597
--- /dev/null
+++ b/libre/virtualbox-libre/vboxweb.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=VirtualBox Web Service
+After=network.target
+
+[Service]
+Type=forking
+PIDFile=/run/vboxweb.pid
+ExecStart=/usr/bin/vboxwebsrv --pidfile /run/vboxweb.pid --background
+
+[Install]
+WantedBy=multi-user.target
diff --git a/libre/virtualbox-libre/virtualbox-libre-parabola-additions.install b/libre/virtualbox-libre/virtualbox-libre-parabola-additions.install
new file mode 100644
index 000000000..38bbe807d
--- /dev/null
+++ b/libre/virtualbox-libre/virtualbox-libre-parabola-additions.install
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+# arg 1: the new package version
+post_install() {
+ getent group vboxsf > /dev/null || groupadd -g 109 vboxsf
+ true
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ post_install "$1"
+ # rename /etc/rc.d/vboxservice
+ if [ "`vercmp $2 4.1.18-3`" -lt 0 ]; then
+ cat << EOF
+==> rc.d vbox-service script was renamed to vboxservice.
+EOF
+ fi
+ # fix gid of vboxsf
+ if [ "`vercmp $2 4.1.18-4`" -lt 0 ]; then
+ groupmod -g 109 vboxsf
+ fi
+ true
+}
+
+# arg 1: the old package version
+post_remove() {
+ groupdel vboxsf >/dev/null 2>&1 || true
+}
+
+# vim:set ts=2 sw=2 ft=sh et:
diff --git a/libre/virtualbox-libre/virtualbox-libre-parabola-source.install b/libre/virtualbox-libre/virtualbox-libre-parabola-source.install
new file mode 100644
index 000000000..966fb5681
--- /dev/null
+++ b/libre/virtualbox-libre/virtualbox-libre-parabola-source.install
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+# arg 1: the new package version
+post_install() {
+ cat << EOF
+==> To build and install your modules run dkms install vboxguest/${1%-*}
+==> To do this automatically at startup you can add dkms in your DAEMONS
+EOF
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+pre_upgrade() {
+ pre_remove "$2"
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ post_install "$1"
+}
+
+# arg 1: the old package version
+pre_remove() {
+ # Remove modules using dkms
+ [ -n "${1%-*}" ] && dkms remove vboxguest/${1%-*} --all >/dev/null || true
+}
+
+# vim:set ts=2 sw=2 ft=sh et:
diff --git a/libre/virtualbox-libre/virtualbox-libre-source.install b/libre/virtualbox-libre/virtualbox-libre-source.install
new file mode 100644
index 000000000..6a3994c8d
--- /dev/null
+++ b/libre/virtualbox-libre/virtualbox-libre-source.install
@@ -0,0 +1,29 @@
+#/bin/sh
+
+# arg 1: the new package version
+post_install() {
+ cat << EOF
+==> To build and install your modules run dkms install vboxhost/${1%-*}
+==> To do this automatically at startup you can add dkms in your DAEMONS
+EOF
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+pre_upgrade() {
+ pre_remove "$2"
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ post_install "$1"
+}
+
+# arg 1: the old package version
+pre_remove() {
+ # Remove modules using dkms
+ [ -n "${1%-*}" ] && dkms remove vboxhost/${1%-*} --all >/dev/null || true
+}
+
+# vim:set ts=2 sw=2 ft=sh et:
diff --git a/libre/virtualbox-libre/virtualbox-libre.install b/libre/virtualbox-libre/virtualbox-libre.install
new file mode 100644
index 000000000..6913fe2ed
--- /dev/null
+++ b/libre/virtualbox-libre/virtualbox-libre.install
@@ -0,0 +1,45 @@
+#!/bin/sh
+
+utils() {
+ if [ -x usr/bin/update-mime-database ]; then
+ update-mime-database usr/share/mime > /dev/null 2>&1
+ fi
+
+ if [ -x usr/bin/xdg-icon-resource ]; then
+ xdg-icon-resource forceupdate --theme hicolor > /dev/null 2>&1
+ fi
+
+ if [ -x usr/bin/update-desktop-database ]; then
+ usr/bin/update-desktop-database -q
+ fi
+
+ if [ -x usr/bin/udevadm ]; then
+ usr/bin/udevadm control --reload
+ fi
+}
+
+# arg 1: the new package version
+post_install() {
+ getent group vboxusers >/dev/null || usr/sbin/groupadd -g 108 vboxusers
+ utils
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ post_install "$1"
+ if [ "$(vercmp $2 4.1.6-1)" -lt 0 ]; then
+ cat << EOF
+===> Starting with virtualbox version 4.1.6-1, kernel modules handling is done by virtualbox-modules.
+===> Use virtualbox-source package if you don't use our stock linux package.
+EOF
+ fi
+}
+
+# arg 1: the old package version
+post_remove() {
+ groupdel vboxusers >/dev/null 2>&1 || true
+ utils
+}
+
+# vim:set ts=2 sw=2 ft=sh et:
diff --git a/libre/virtualbox-modules/PKGBUILD b/libre/virtualbox-modules/PKGBUILD
index f965869f7..5e0feec6d 100644
--- a/libre/virtualbox-modules/PKGBUILD
+++ b/libre/virtualbox-modules/PKGBUILD
@@ -6,7 +6,7 @@
pkgbase=virtualbox-modules
pkgname=('virtualbox-modules' 'virtualbox-parabola-modules')
pkgver=4.1.18
-pkgrel=4
+pkgrel=5
arch=('i686' 'x86_64')
url='http://virtualbox.org'
license=('GPL')
@@ -18,7 +18,7 @@ md5sums=('38db0a87cba659b484af868b0c2bd3ac'
'4c88bd122677a35f68abd76eb01b378b'
'ed1341881437455d9735875ddf455fbe')
-_extramodules=extramodules-3.4-LIBRE
+_extramodules=extramodules-3.5-LIBRE
_kernver="$(cat /usr/lib/modules/${_extramodules}/version || true)"
export KERN_DIR=/usr/lib/modules/${_kernver}/build
@@ -53,7 +53,7 @@ package_virtualbox-parabola-modules(){
pkgdesc="Additions only for Parabola guests (kernel modules)"
license=('GPL')
install=virtualbox-parabola-modules.install
- depends=('linux-libre>=3.4' 'linux-libre<3.5')
+ depends=('linux-libre>=3.5' 'linux-libre<3.6')
replaces=('virtualbox-archlinux-modules')
conflicts=('virtualbox-archlinux-modules')
provides=("virtualbox-archlinux-modules=$pkgver")
@@ -79,7 +79,7 @@ package_virtualbox-modules(){
pkgdesc="Kernel modules for VirtualBox"
license=('GPL')
install=virtualbox-modules.install
- depends=('linux-libre>=3.4' 'linux-libre<3.5')
+ depends=('linux-libre>=3.5' 'linux-libre<3.6')
source "$srcdir/VirtualBox-${pkgver}/env.sh"
diff --git a/libre/virtualbox-modules/virtualbox-modules.install b/libre/virtualbox-modules/virtualbox-modules.install
index b178686e2..3f2a12a3f 100644
--- a/libre/virtualbox-modules/virtualbox-modules.install
+++ b/libre/virtualbox-modules/virtualbox-modules.install
@@ -3,17 +3,17 @@ post_install() {
===> You must load vboxdrv module before starting VirtualBox:
===> # modprobe vboxdrv
EOF
- EXTRAMODULES='extramodules-3.4-LIBRE'
+ EXTRAMODULES='extramodules-3.5-LIBRE'
depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
}
post_upgrade() {
- EXTRAMODULES='extramodules-3.4-LIBRE'
+ EXTRAMODULES='extramodules-3.5-LIBRE'
depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
echo 'In order to use the new version, reload all virtualbox modules manually.'
}
post_remove() {
- EXTRAMODULES='extramodules-3.4-LIBRE'
+ EXTRAMODULES='extramodules-3.5-LIBRE'
depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
}
diff --git a/libre/virtualbox-modules/virtualbox-parabola-modules.install b/libre/virtualbox-modules/virtualbox-parabola-modules.install
index 31575fb9d..c3419c991 100644
--- a/libre/virtualbox-modules/virtualbox-parabola-modules.install
+++ b/libre/virtualbox-modules/virtualbox-parabola-modules.install
@@ -2,16 +2,16 @@ post_install() {
cat << EOF
===> You may want to load vboxguest, vboxsf and vboxvideo
EOF
- EXTRAMODULES='extramodules-3.4-LIBRE'
+ EXTRAMODULES='extramodules-3.5-LIBRE'
depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
}
post_upgrade() {
- EXTRAMODULES='extramodules-3.4-LIBRE'
+ EXTRAMODULES='extramodules-3.5-LIBRE'
depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
}
post_remove() {
- EXTRAMODULES='extramodules-3.4-LIBRE'
+ EXTRAMODULES='extramodules-3.5-LIBRE'
depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
}
diff --git a/libre/xulrunner-libre/Bug-756390-Make-the-Reset-Firefox-feature-more-gener.patch b/libre/xulrunner-libre/Bug-756390-Make-the-Reset-Firefox-feature-more-gener.patch
index 4da03a569..4a0507271 100644
--- a/libre/xulrunner-libre/Bug-756390-Make-the-Reset-Firefox-feature-more-gener.patch
+++ b/libre/xulrunner-libre/Bug-756390-Make-the-Reset-Firefox-feature-more-gener.patch
@@ -2,35 +2,20 @@ From: Mike Hommey <mh@glandium.org>
Date: Tue, 5 Jun 2012 08:57:06 +0200
Subject: Bug 756390 - Make the "Reset Firefox" feature more generic
----
- browser/components/migration/content/migration.js | 15 ++++++++++-----
- browser/components/migration/content/migration.xul | 2 +-
- .../migration/src/BrowserProfileMigrators.manifest | 2 +-
- .../components/migration/src/FirefoxProfileMigrator.js | 2 +-
- browser/components/migration/src/ProfileMigrator.js | 4 ++++
- .../en-US/chrome/browser/migration/migration.dtd | 2 --
- .../en-US/chrome/browser/migration/migration.properties | 11 +++++------
- toolkit/content/aboutSupport.js | 8 ++++----
- toolkit/content/jar.mn | 2 +-
- toolkit/content/resetProfile.js | 6 ++----
- toolkit/profile/nsIProfileMigrator.idl | 10 +++++++++-
- toolkit/xre/nsAppRunner.cpp | 2 +-
- 83 files changed, 394 insertions(+), 382 deletions(-)
-
diff --git a/browser/components/migration/content/migration.js b/browser/components/migration/content/migration.js
-index ffb0c34..442a5ff 100644
+index 0e8ccf5..fa46c08 100644
--- a/browser/components/migration/content/migration.js
+++ b/browser/components/migration/content/migration.js
-@@ -314,7 +314,7 @@ var MigrationWizard = {
+@@ -249,7 +249,7 @@ var MigrationWizard = {
}
- var bundle = document.getElementById("brandBundle");
+ var brandBundle = document.getElementById("brandBundle");
- // These strings don't exist when not using official branding. If that's
+ // These strings may not exist when not using official branding. If that's
// the case, just skip this page.
try {
- var pageTitle = bundle.getString("homePageMigrationPageTitle");
-@@ -346,8 +346,8 @@ var MigrationWizard = {
+ var pageTitle = brandBundle.getString("homePageMigrationPageTitle");
+@@ -281,8 +281,8 @@ var MigrationWizard = {
case "chrome":
source = "sourceNameChrome";
break;
@@ -41,75 +26,107 @@ index ffb0c34..442a5ff 100644
break;
}
-@@ -357,8 +357,13 @@ var MigrationWizard = {
+@@ -292,7 +292,12 @@ var MigrationWizard = {
var oldHomePageURL = this._migrator.sourceHomePageURL;
if (oldHomePageURL && source) {
-- var bundle2 = document.getElementById("bundle");
-- var appName = bundle2.getString(source);
+- var appName = MigrationUtils.getLocalizedString(source);
+ var appName;
+ if (source == "brand") {
-+ appName = bundle.GetStringFromName("brandFullName");
++ appName = brandBundle.GetStringFromName("brandFullName");
+ } else {
-+ var bundle2 = document.getElementById("bundle");
-+ appName = bundle2.getString(source);
++ appName = MigrationUtils.getLocalizedString(source);
+ }
- var oldHomePageLabel = bundle.getFormattedString("homePageImport",
- [appName]);
+ var oldHomePageLabel =
+ brandBundle.getFormattedString("homePageImport", [appName]);
var oldHomePage = document.getElementById("oldHomePage");
diff --git a/browser/components/migration/content/migration.xul b/browser/components/migration/content/migration.xul
-index f8653b1..f3ac62a 100644
+index 4bcc1d9..c4db956 100644
--- a/browser/components/migration/content/migration.xul
+++ b/browser/components/migration/content/migration.xul
-@@ -76,7 +76,7 @@
- #endif
- #endif
+@@ -74,7 +74,7 @@
+ #elifdef XP_UNIX
<radio id="chrome" label="&importFromChrome.label;" accesskey="&importFromChrome.accesskey;"/>
+ #endif
- <radio id="firefox" label="&importFromFirefox.label;" accesskey="&importFromFirefox.accesskey;"/>
+ <radio id="self" hidden="true"/>
- <radio id="fromfile" label="&importFromHTMLFile.label;" accesskey="&importFromHTMLFile.accesskey;" hidden="true"/>
<radio id="nothing" label="&importFromNothing.label;" accesskey="&importFromNothing.accesskey;" hidden="true"/>
</radiogroup>
+ <label id="noSources" hidden="true">&noMigrationSources.label;</label>
diff --git a/browser/components/migration/src/BrowserProfileMigrators.manifest b/browser/components/migration/src/BrowserProfileMigrators.manifest
-index f49e481..e490ddf 100644
+index 527771f..782b38f 100644
--- a/browser/components/migration/src/BrowserProfileMigrators.manifest
+++ b/browser/components/migration/src/BrowserProfileMigrators.manifest
-@@ -3,4 +3,4 @@ contract @mozilla.org/toolkit/profile-migrator;1 {6F8BB968-C14F-4D6F-9733-6C6737
+@@ -3,7 +3,7 @@ contract @mozilla.org/toolkit/profile-migrator;1 {6F8BB968-C14F-4D6F-9733-6C6737
component {4cec1de4-1671-4fc3-a53e-6c539dc77a26} ChromeProfileMigrator.js
contract @mozilla.org/profile/migrator;1?app=browser&type=chrome {4cec1de4-1671-4fc3-a53e-6c539dc77a26}
component {91185366-ba97-4438-acba-48deaca63386} FirefoxProfileMigrator.js
-contract @mozilla.org/profile/migrator;1?app=browser&type=firefox {91185366-ba97-4438-acba-48deaca63386}
+contract @mozilla.org/profile/migrator;1?app=browser&type=self {91185366-ba97-4438-acba-48deaca63386}
+ component {3d2532e3-4932-4774-b7ba-968f5899d3a4} IEProfileMigrator.js
+ contract @mozilla.org/profile/migrator;1?app=browser&type=ie {3d2532e3-4932-4774-b7ba-968f5899d3a4}
+ component {4b609ecf-60b2-4655-9df4-dc149e474da1} SafariProfileMigrator.js
diff --git a/browser/components/migration/src/FirefoxProfileMigrator.js b/browser/components/migration/src/FirefoxProfileMigrator.js
-index 7b4a6e4..add5bc4 100644
+index 8f14f49..8dc175d 100644
--- a/browser/components/migration/src/FirefoxProfileMigrator.js
+++ b/browser/components/migration/src/FirefoxProfileMigrator.js
-@@ -448,7 +448,7 @@ FirefoxProfileMigrator.prototype = {
- ]),
+@@ -88,7 +88,7 @@ Object.defineProperty(FirefoxProfileMigrator.prototype, "startupOnlyMigrator", {
- classDescription: "Firefox Profile Migrator",
-- contractID: "@mozilla.org/profile/migrator;1?app=browser&type=firefox",
-+ contractID: "@mozilla.org/profile/migrator;1?app=browser&type=self",
- classID: Components.ID("{91185366-ba97-4438-acba-48deaca63386}")
- };
-diff --git a/browser/components/migration/src/ProfileMigrator.js b/browser/components/migration/src/ProfileMigrator.js
-index ea66675..fe4df10 100644
---- a/browser/components/migration/src/ProfileMigrator.js
-+++ b/browser/components/migration/src/ProfileMigrator.js
-@@ -51,6 +51,10 @@ ProfileMigrator.prototype = {
- params);
+ FirefoxProfileMigrator.prototype.classDescription = "Firefox Profile Migrator";
+-FirefoxProfileMigrator.prototype.contractID = "@mozilla.org/profile/migrator;1?app=browser&type=firefox";
++FirefoxProfileMigrator.prototype.contractID = "@mozilla.org/profile/migrator;1?app=browser&type=self";
+ FirefoxProfileMigrator.prototype.classID = Components.ID("{91185366-ba97-4438-acba-48deaca63386}");
+
+ const NSGetFactory = XPCOMUtils.generateNSGetFactory([FirefoxProfileMigrator]);
+diff --git a/browser/components/migration/src/MigrationUtils.jsm b/browser/components/migration/src/MigrationUtils.jsm
+index 9460e6d..8db6827 100644
+--- a/browser/components/migration/src/MigrationUtils.jsm
++++ b/browser/components/migration/src/MigrationUtils.jsm
+@@ -403,11 +403,6 @@ let MigrationUtils = Object.freeze({
+ * @see nsIStringBundle
+ */
+ getLocalizedString: function MU_getLocalizedString(aKey, aReplacements) {
+- const OVERRIDES = {
+- "4_firefox": "4_firefox_history_and_bookmarks"
+- };
+- aKey = OVERRIDES[aKey] || aKey;
+-
+ if (aReplacements === undefined)
+ return getMigrationBundle().GetStringFromName(aKey);
+ return getMigrationBundle().formatStringFromName(
+@@ -622,6 +617,17 @@ let MigrationUtils = Object.freeze({
},
-+ canMigrate: function PM__canMigrate(aMigratorKey) {
+ /**
++ * Returns whether a given migration type is supported.
++ *
++ * @param aKey Migrator key
++ * @returns whether the migrator key is supported.
++ */
++ canMigrate:
++ function MU_canMigrate(aMigratorKey) {
+ return "@mozilla.org/profile/migrator;1?app=browser&type=" + aMigratorKey in Cc;
+ },
+
- _toCString: function PM__toCString(aStr) {
- let cstr = Cc["@mozilla.org/supports-cstring;1"].
- createInstance(Ci.nsISupportsCString);
++ /**
+ * Cleans up references to migrators and nsIProfileInstance instances.
+ */
+ finishMigration: function MU_finishMigration() {
+diff --git a/browser/components/migration/src/ProfileMigrator.js b/browser/components/migration/src/ProfileMigrator.js
+index 744f117..59e5a4c 100644
+--- a/browser/components/migration/src/ProfileMigrator.js
++++ b/browser/components/migration/src/ProfileMigrator.js
+@@ -12,6 +12,7 @@ function ProfileMigrator() {
+
+ ProfileMigrator.prototype = {
+ migrate: MigrationUtils.startupMigration.bind(MigrationUtils),
++ canMigrate: MigrationUtils.canMigrate.bind(MigrationUtils),
+ QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsIProfileMigrator]),
+ classDescription: "Profile Migrator",
+ contractID: "@mozilla.org/toolkit/profile-migrator;1",
diff --git a/browser/locales/en-US/chrome/browser/migration/migration.dtd b/browser/locales/en-US/chrome/browser/migration/migration.dtd
-index 86e9d0b..8df7864 100644
+index 0b4b776..ce26fbd 100644
--- a/browser/locales/en-US/chrome/browser/migration/migration.dtd
+++ b/browser/locales/en-US/chrome/browser/migration/migration.dtd
@@ -13,8 +13,6 @@
@@ -118,11 +135,11 @@ index 86e9d0b..8df7864 100644
<!ENTITY importFromChrome.accesskey "C">
-<!ENTITY importFromFirefox.label "Firefox">
-<!ENTITY importFromFirefox.accesskey "X">
- <!ENTITY importFromHTMLFile.label "From an HTML File">
- <!ENTITY importFromHTMLFile.accesskey "F">
+
+ <!ENTITY noMigrationSources.label "No programs that contain bookmarks, history or password data could be found.">
diff --git a/browser/locales/en-US/chrome/browser/migration/migration.properties b/browser/locales/en-US/chrome/browser/migration/migration.properties
-index 495ed78..0272654 100644
+index f522a66..be26460 100644
--- a/browser/locales/en-US/chrome/browser/migration/migration.properties
+++ b/browser/locales/en-US/chrome/browser/migration/migration.properties
@@ -4,7 +4,6 @@ profileName_format=%S %S
@@ -132,8 +149,8 @@ index 495ed78..0272654 100644
-sourceNameFirefox=Mozilla Firefox
importedBookmarksFolder=From %S
- importedSearchURLsFolder=Keyword Searches (From %S)
-@@ -21,27 +20,27 @@ importedSafariBookmarks=From Safari
+
+@@ -18,29 +17,29 @@ importedSafariReadingList=Reading List (From Safari)
2_ie=Cookies
2_safari=Cookies
2_chrome=Cookies
@@ -143,8 +160,8 @@ index 495ed78..0272654 100644
4_ie=Browsing History
4_safari=Browsing History
4_chrome=Browsing History
--4_firefox=Browsing History
-+4_self=Browsing History
+-4_firefox_history_and_bookmarks=Browsing History and Bookmarks
++4_self=Browsing History and Bookmarks
8_ie=Saved Form History
8_safari=Saved Form History
@@ -166,11 +183,14 @@ index 495ed78..0272654 100644
64_ie=Other Data
64_safari=Other Data
+ 64_chrome=Other Data
+-64_firefox=Bookmarks Backups
++64_self=Bookmarks Backups
diff --git a/toolkit/content/aboutSupport.js b/toolkit/content/aboutSupport.js
-index c86d80c..ff1ccfe 100644
+index 957d4d8..1af3629 100644
--- a/toolkit/content/aboutSupport.js
+++ b/toolkit/content/aboutSupport.js
-@@ -608,13 +608,13 @@ function populateResetBox() {
+@@ -616,13 +616,13 @@ function populateResetBox() {
.getService(Ci.nsIToolkitProfileService);
let currentProfileDir = Services.dirsvc.get("ProfD", Ci.nsIFile);
@@ -188,46 +208,43 @@ index c86d80c..ff1ccfe 100644
return;
document.getElementById("reset-box").style.visibility = "visible";
} catch (e) {
-diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn
-index 6f0d2d6..da7342b 100644
---- a/toolkit/content/jar.mn
-+++ b/toolkit/content/jar.mn
-@@ -38,7 +38,7 @@ toolkit.jar:
- + content/global/mozilla.xhtml (mozilla.xhtml)
- *+ content/global/nsDragAndDrop.js (nsDragAndDrop.js)
- content/global/resetProfile.css (resetProfile.css)
--* content/global/resetProfile.js (resetProfile.js)
-+ content/global/resetProfile.js (resetProfile.js)
- * content/global/resetProfile.xul (resetProfile.xul)
- * content/global/treeUtils.js (treeUtils.js)
- *+ content/global/viewZoomOverlay.js (viewZoomOverlay.js)
diff --git a/toolkit/content/resetProfile.js b/toolkit/content/resetProfile.js
-index 975a9ed..d8e46b1 100644
+index 84de6cd..3126da6 100644
--- a/toolkit/content/resetProfile.js
+++ b/toolkit/content/resetProfile.js
-@@ -6,12 +6,10 @@ Components.utils.import("resource://gre/modules/Services.jsm");
+@@ -6,6 +6,7 @@ Components.utils.import("resource://gre/modules/Services.jsm");
// based on onImportItemsPageShow from migration.js
function onResetProfileLoad() {
--#expand const MOZ_BUILD_APP = "__MOZ_BUILD_APP__";
--#expand const MOZ_APP_NAME = "__MOZ_APP_NAME__";
- const MAX_MIGRATED_TYPES = 16;
++<<<<<<< HEAD
+ #expand const MOZ_BUILD_APP = "__MOZ_BUILD_APP__";
+ #expand const MOZ_APP_NAME = "__MOZ_APP_NAME__";
+
+@@ -16,16 +17,22 @@ function onResetProfileLoad() {
+ "8_" + MOZ_APP_NAME, // Form History
+ "2_" + MOZ_APP_NAME, // Cookies
+ ];
++=======
++ Components.utils.import("resource:///modules/MigrationUtils.jsm");
++ const MAX_MIGRATED_TYPES = 16;
++>>>>>>> Bug 756390 - Make the "Reset Firefox" feature more generic
var migratedItems = document.getElementById("migratedItems");
- var bundle = Services.strings.createBundle("chrome://" + MOZ_BUILD_APP +
-+ var bundle = Services.strings.createBundle("chrome://browser" +
- "/locale/migration/migration.properties");
+- "/locale/migration/migration.properties");
- // Loop over possible data to migrate to give the user a list of what will be preserved. This
-@@ -21,7 +19,7 @@ function onResetProfileLoad() {
- var itemID = Math.pow(2, i);
+ // Loop over possible data to migrate to give the user a list of what will be preserved.
+ for (var itemStringName of MIGRATED_TYPES) {
try {
var checkbox = document.createElement("label");
-- checkbox.setAttribute("value", bundle.GetStringFromName(itemID + "_" + MOZ_APP_NAME));
-+ checkbox.setAttribute("value", bundle.GetStringFromName(itemID + "_self"));
++<<<<<<< HEAD
+ checkbox.setAttribute("value", bundle.GetStringFromName(itemStringName));
++=======
++ checkbox.setAttribute("value", MigrationUtils.getLocalizedString(itemID + "_self"));
++>>>>>>> Bug 756390 - Make the "Reset Firefox" feature more generic
migratedItems.appendChild(checkbox);
} catch (x) {
- // Catch exceptions when the string for a data type doesn't exist because it's not migrated
+ // Catch exceptions when the string for a data type doesn't exist.
diff --git a/toolkit/profile/nsIProfileMigrator.idl b/toolkit/profile/nsIProfileMigrator.idl
index e941336..5b264af 100644
--- a/toolkit/profile/nsIProfileMigrator.idl
@@ -257,15 +274,15 @@ index e941336..5b264af 100644
%{C++
diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp
-index 32eef5c..dbe1580 100644
+index d2db0e2..45a4b0d 100644
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
-@@ -3561,7 +3561,7 @@ XRE_main(int argc, char* argv[], const nsXREAppData* aAppData)
- if (gDoProfileReset) {
- // Automatically migrate from the current application if we just
- // reset the profile.
-- aKey = MOZ_APP_NAME;
-+ aKey = "self";
- pm->Migrate(&dirProvider, aKey);
- // Set the new profile as the default after migration.
- rv = SetCurrentProfileAsDefault(profileSvc, profD);
+@@ -3642,7 +3642,7 @@ XREMain::XRE_mainRun()
+ if (gDoProfileReset) {
+ // Automatically migrate from the current application if we just
+ // reset the profile.
+- aKey = MOZ_APP_NAME;
++ aKey = "self";
+ pm->Migrate(&mDirProvider, aKey);
+ // Set the new profile as the default after migration.
+ rv = SetCurrentProfileAsDefault(mProfileSvc, mProfD);
diff --git a/libre/xulrunner-libre/PKGBUILD b/libre/xulrunner-libre/PKGBUILD
index 001eb5f48..8c332db12 100644
--- a/libre/xulrunner-libre/PKGBUILD
+++ b/libre/xulrunner-libre/PKGBUILD
@@ -4,10 +4,10 @@
# With many changes from iceweasel-libre.
-# We're getting this from Debian Sid
+# We're getting this from Debian Experimental
_debname=iceweasel
-_debver=13.0
-_debrel=1
+_debver=14.0.1
+_debrel=2
_debrepo=http://ftp.debian.org/debian/pool/main/
debfile() { echo $@|sed -r 's@(.).*@\1/&/&@'; }
@@ -23,7 +23,6 @@ makedepends=('zip' 'unzip' 'pkg-config' 'diffutils' 'wireless_tools' 'yasm' 'mes
url="http://wiki.mozilla.org/XUL:Xul_Runner"
source=("${_debrepo}/`debfile ${_debname}`_${_debver}.orig.tar.bz2"
"${_debrepo}/`debfile ${_debname}`_${_debver}-${_debrel}.debian.tar.gz"
- "${_debrepo}/`debfile ${_debname}`_${_debver}-${_debrel}.dsc"
mozconfig
mozilla-pkgconfig.patch
Bug-756390-Make-the-Reset-Firefox-feature-more-gener.patch)
@@ -31,15 +30,13 @@ options=('!emptydirs')
conflicts=('xulrunner')
provides=("xulrunner=${_debver}")
replaces=('xulrunner-oss' 'xulrunner')
-md5sums=('e440446bb92dc1c0311346c68024590b'
- 'cb8bfb543002a5d78db7e8661f9f87ec'
- 'a9848e41461776bc4bf8d2de824b1204'
+md5sums=('8e4f3987d37c8e73b168948d0771b872'
+ '8689c150a4d3a0a688ad2db6044feac6'
'f2f4f4a573f549e8b494e33b3ad226bc'
'27271ce647a83906ef7a24605e840d61'
- '41ce105f0c1877fe22e0c0ec45e09565')
+ '88350bc611361a1ff635f5c960c6d6ee')
-dpkg-source() {
- # This will simulate dpkg-source -x ${_debname}_${_debver}-${_debrel}.dsc
+build() {
export QUILT_PATCHES=debian/patches
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
export QUILT_DIFF_ARGS='--no-timestamps'
@@ -47,31 +44,18 @@ dpkg-source() {
mv debian "${_debname}-${_debver}"
cd "${_debname}-${_debver}"
-# Doesn't apply and seems unimportant
+ # Doesn't apply and seems unimportant
rm -v debian/patches/l10n/Place-google-and-gmail-before-yandex.patch || true
-# This patch doesn't works in some parts due that has patches for others locales languages, source code doesn't has it
+ # This patch doesn't works in some parts due that has patches for others locales languages, source code doesn't has it
rm -v debian/patches/debian-hacks/Bug-756390-Make-the-Reset-Firefox-feature-more-gener.patch || true
quilt push -a
find .pc -name .timestamp -delete # why isn't "--no-timestamps" doing this?
- cd ..
-}
-
-build() {
-# Don't run this if we're using -e
-if [ $NOEXTRACT -eq 0 ]; then
- msg2 "Applying Debian patches..."
- cd "${srcdir}"
- dpkg-source -x ${_debname}_${_debver}-${_debrel}.dsc
-
- msg2 "Starting normal build..."
- mv "${_debname}-${_debver}" "$srcdir/mozilla-release"
- cd "$srcdir/mozilla-release"
cp "$srcdir/mozconfig" .mozconfig
-# Adding fixed Bug-756390-Make-the-Reset-Firefox-feature-more-gener.patch
+ # Adding fixed Bug-756390-Make-the-Reset-Firefox-feature-more-gener.patch
patch -Np1 -i "$srcdir/Bug-756390-Make-the-Reset-Firefox-feature-more-gener.patch"
# Fails, claiming the page size to have changed.
@@ -79,29 +63,28 @@ if [ $NOEXTRACT -eq 0 ]; then
#fix libdir/sdkdir - fedora
patch -Np1 -i "$srcdir/mozilla-pkgconfig.patch"
-fi
- export LDFLAGS="$LDFLAGS -Wl,-rpath,/usr/lib/xulrunner-${_debver}"
+ export LDFLAGS="$LDFLAGS -Wl,-rpath,/usr/lib/xulrunner-${_debver::4}"
export PYTHON="/usr/bin/python2"
make -j1 -f client.mk build MOZ_MAKE_FLAGS="$MAKEFLAGS"
}
package() {
- cd "$srcdir/mozilla-release"
+ cd "${_debname}-${_debver}"
make -j1 -f client.mk DESTDIR="$pkgdir" install
- rm -rf "$pkgdir"/usr/lib/xulrunner-$pkgver/{dictionaries,hyphenation}
- ln -sf /usr/share/hunspell "$pkgdir/usr/lib/xulrunner-${_debver}/dictionaries"
- ln -sf /usr/share/hyphen "$pkgdir/usr/lib/xulrunner-${_debver}/hyphenation"
+ rm -rf "$pkgdir"/usr/lib/xulrunner-${_debver::4}/{dictionaries,hyphenation}
+ ln -sf /usr/share/hunspell "$pkgdir/usr/lib/xulrunner-${_debver::4}/dictionaries"
+ ln -sf /usr/share/hyphen "$pkgdir/usr/lib/xulrunner-${_debver::4}/hyphenation"
# add xulrunner library path to ld.so.conf
install -d $pkgdir/etc/ld.so.conf.d
- echo "/usr/lib/xulrunner-${_debver}" > $pkgdir/etc/ld.so.conf.d/xulrunner.conf
+ echo "/usr/lib/xulrunner-${_debver::4}" > $pkgdir/etc/ld.so.conf.d/xulrunner.conf
- chmod +x "${pkgdir}/usr/lib/xulrunner-devel-${_debver}/sdk/bin/xpt.py"
- sed -i 's|!/usr/bin/env python|!/usr/bin/env python2|' "$pkgdir/usr/lib/xulrunner-devel-${_debver}/sdk/bin/xpt.py"
- sed -i 's|!/usr/bin/env python|!/usr/bin/env python2|' "$pkgdir/usr/lib/xulrunner-devel-${_debver}/sdk/bin/header.py"
- sed -i 's|!/usr/bin/env python|!/usr/bin/env python2|' "$pkgdir/usr/lib/xulrunner-devel-${_debver}/sdk/bin/typelib.py"
- sed -i 's|!/usr/bin/env python|!/usr/bin/env python2|' "$pkgdir/usr/lib/xulrunner-devel-${_debver}/sdk/bin/xpidl.py"
+ chmod +x "${pkgdir}/usr/lib/xulrunner-devel-${_debver::4}/sdk/bin/xpt.py"
+ sed -i 's|!/usr/bin/env python|!/usr/bin/env python2|' "$pkgdir/usr/lib/xulrunner-devel-${_debver::4}/sdk/bin/xpt.py"
+ sed -i 's|!/usr/bin/env python|!/usr/bin/env python2|' "$pkgdir/usr/lib/xulrunner-devel-${_debver::4}/sdk/bin/header.py"
+ sed -i 's|!/usr/bin/env python|!/usr/bin/env python2|' "$pkgdir/usr/lib/xulrunner-devel-${_debver::4}/sdk/bin/typelib.py"
+ sed -i 's|!/usr/bin/env python|!/usr/bin/env python2|' "$pkgdir/usr/lib/xulrunner-devel-${_debver::4}/sdk/bin/xpidl.py"
}
diff --git a/pcr/kervalasquish-hg/PKGBUILD b/pcr/kervalasquish-hg/PKGBUILD
new file mode 100644
index 000000000..e5e489950
--- /dev/null
+++ b/pcr/kervalasquish-hg/PKGBUILD
@@ -0,0 +1,72 @@
+# Maintainer: Jorge Araya <jorgean@lavabit.com>
+
+pkgname=kervalasquish-hg
+pkgver=220
+pkgrel=2
+pkgdesc="Free Software DXT compression library, kervala's version"
+arch=('i686' 'x86_64')
+url="http://code.google.com/p/libsquish/"
+license=('MIT')
+makedepends=('mercurial' 'gcc-libs' 'cmake')
+provides=('libsquish')
+conflicts=('libsquish'
+ 'kervala_libsquish-hg'
+ 'kervalasquish-hg')
+
+_hgroot="http://hg.kervala.net"
+_hgrepo="packaging"
+cmakerepo="cmake"
+
+build() {
+ cd "$srcdir"
+ msg "Connecting to Kervala's Mercurial server for libsquish..."
+
+ if [[ -d "$_hgrepo" ]]; then
+ cd "$_hgrepo"
+ hg pull -u
+ msg "The local files are updated."
+ else
+ hg clone "${_hgroot}/${_hgrepo}"
+ fi
+
+ msg "Connecting to Kervala's Mercurial server for cmake modules..."
+
+ if [[ -d $srcdir/$cmakerepo ]]; then
+ cd $srcdir/$cmakerepo
+ hg pull -u
+ msg "The local files are updated."
+ else
+ cd $srcdir
+ hg clone ${_hgroot}/${cmakerepo}
+ fi
+
+ msg "Mercurial checkout done or server timeout"
+ msg "Starting build..."
+
+ if [[ -d $_hgrepo-build ]]; then
+ rm -rf "$srcdir/$_hgrepo-build"
+ fi
+
+ cp -r "$srcdir/$_hgrepo/squish" "$srcdir/$_hgrepo-build"
+
+ if [[ ! -d $_hgrepo-build/CMakeModules ]]; then
+ mkdir "$srcdir/$_hgrepo-build/CMakeModules"
+ cp $srcdir/cmake/modules/common.cmake $srcdir/$_hgrepo-build/CMakeModules/
+ fi
+
+ if [[ -d $srcdir/$_hgrepo-build/build ]]; then
+ rm -rf $srcdir/$_hgrepo-build/build
+ fi
+
+ mkdir "$srcdir/$_hgrepo-build/build"
+ cd "$srcdir/$_hgrepo-build/build"
+ cmake -DCMAKE_INSTALL_PREFIX=/usr ..
+ make
+}
+
+package() {
+ cd "$srcdir/$_hgrepo-build/build"
+ make DESTDIR="${pkgdir}" install
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/pcr/ryzom-client/PKGBUILD b/pcr/ryzom-client/PKGBUILD
index d3d077d4f..371137029 100644
--- a/pcr/ryzom-client/PKGBUILD
+++ b/pcr/ryzom-client/PKGBUILD
@@ -6,7 +6,7 @@ arch=('x86_64' 'i686')
url="http://www.ryzom.com"
license=('AGPL3')
pkgdesc="An awesome free software 3D MMORPG game"
-depends=('ryzom-data' 'ryzom-nel')
+depends=('ryzom-data' 'ryzom-nel' 'luabind')
conflicts=('ryzom-client')
groups=('ryzom')
options=(!strip)
@@ -15,10 +15,9 @@ makedepends=('kervala_libsquish-hg' 'cmake' 'bison'
'boost' 'ryzom-nel')
auser="shackra"
-achangeset="3222b96eed75"
+achangeset="1af2b43d7297"
source=("https://bitbucket.org/$auser/ryzom/get/$achangeset.tar.gz")
-sha256sums=('95b5944db8b71b75e95becd8125b0437de5a88691b89e32c1ceb42454a62c568')
build() {
cd "$srcdir/$auser-ryzom-$achangeset/code"
@@ -39,3 +38,5 @@ package() {
cd "$srcdir/$auser-ryzom-$achangeset/code/$pkgname"
make DESTDIR="$pkgdir" install
}
+
+sha256sums=('1e2c3f9675b5193029945bb7e4941b3ff82e3c5a03cd32cb8049c8f79348099d')
diff --git a/pcr/ryzom-nel/PKGBUILD b/pcr/ryzom-nel/PKGBUILD
index aff8ec5e4..001e00dd2 100644
--- a/pcr/ryzom-nel/PKGBUILD
+++ b/pcr/ryzom-nel/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Jorge Araya Navarro <jorgean@lavabit.com>
pkgname='ryzom-nel'
pkgver=0.8.0
-pkgrel=7
+pkgrel=8
arch=('x86_64' 'i686')
conflicts=('ryzom-nel')
groups=('ryzom')
@@ -20,10 +20,10 @@ depends=('freetype2'
'libxml2'
'libjpeg'
'rrdtool' )
-makedepends=('cmake' 'bison' 'kervala_libsquish-hg')
+makedepends=('cmake' 'bison' 'kervalasquish-hg')
auser="shackra"
-achangeset="3222b96eed75"
+achangeset="1af2b43d7297"
source=("https://bitbucket.org/$auser/ryzom/get/$achangeset.tar.gz")
@@ -49,4 +49,3 @@ package() {
cd "$srcdir/$auser-ryzom-$achangeset/code/$pkgname"
make DESTDIR="$pkgdir" install
}
-sha256sums=('95b5944db8b71b75e95becd8125b0437de5a88691b89e32c1ceb42454a62c568')
diff --git a/testing/btrfs-progs/70-btrfs.rules b/testing/btrfs-progs/70-btrfs.rules
new file mode 100644
index 000000000..c0e8c776c
--- /dev/null
+++ b/testing/btrfs-progs/70-btrfs.rules
@@ -0,0 +1 @@
+ACTION!="remove", SUBSYSTEM=="block", ENV{ID_FS_TYPE}=="btrfs", RUN+="/usr/bin/btrfs device scan /dev/%k"
diff --git a/testing/btrfs-progs/PKGBUILD b/testing/btrfs-progs/PKGBUILD
new file mode 100644
index 000000000..e7252b7ec
--- /dev/null
+++ b/testing/btrfs-progs/PKGBUILD
@@ -0,0 +1,46 @@
+# $Id: PKGBUILD 164015 2012-07-24 01:22:05Z dreisner $
+# Maintainer: Tom Gundersen <teg@jklm.no>
+# Contributor: Tobias Powalowski <tpowa@archlinux.org>
+pkgname=btrfs-progs
+pkgver=0.19.20120328
+pkgrel=4
+pkgdesc="btrfs filesystem utilities"
+arch=(i686 x86_64)
+depends=('glibc' 'e2fsprogs')
+url="http://btrfs.wiki.kernel.org/"
+replaces=('btrfs-progs-unstable')
+conflicts=('btrfs-progs-unstable')
+provides=('btrfs-progs-unstable')
+license=('GPL2')
+source=(ftp://ftp.archlinux.org/other/$pkgname/$pkgname-$pkgver.tar.xz
+ 70-btrfs.rules
+ initcpio-install-btrfs
+ initcpio-hook-btrfs)
+md5sums=('f4504e73cf9254779b78d5b2318ac570'
+ '345c62c8b267082361729ca5b647518f'
+ 'e5186ec3fe8a809b7473470128d1c4ab'
+ '9fb35142755b477a96cb7292f3d64839')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ make CFLAGS="$CFLAGS"
+}
+
+package() {
+ cd $srcdir/$pkgname-$pkgver
+ make prefix=$pkgdir/usr install
+ # fix manpage
+ mkdir -p $pkgdir/usr/share/
+ mv $pkgdir/usr/man $pkgdir/usr/share/man
+ mkdir -p ${pkgdir}/sbin
+ ln -sf /usr/bin/btrfs ${pkgdir}/sbin/btrfs
+
+ # add udev rule
+ install -Dm644 "$srcdir/70-btrfs.rules" "$pkgdir/usr/lib/udev/rules.d/70-btrfs.rules"
+
+ # install mkinitcpio hooks
+ install -Dm644 "$srcdir/initcpio-install-btrfs" \
+ "$pkgdir/usr/lib/initcpio/install/btrfs"
+ install -Dm644 "$srcdir/initcpio-hook-btrfs" \
+ "$pkgdir/usr/lib/initcpio/hooks/btrfs"
+}
diff --git a/testing/btrfs-progs/initcpio-hook-btrfs b/testing/btrfs-progs/initcpio-hook-btrfs
new file mode 100644
index 000000000..913cec528
--- /dev/null
+++ b/testing/btrfs-progs/initcpio-hook-btrfs
@@ -0,0 +1,10 @@
+#!/usr/bin/ash
+
+run_hook() {
+ # if udevd is running, this is done async by add/change events
+ if [ "$udevd_running" -ne 1 ]; then
+ btrfs device scan
+ fi
+}
+
+# vim: set ft=sh ts=4 sw=4 et:
diff --git a/testing/btrfs-progs/initcpio-install-btrfs b/testing/btrfs-progs/initcpio-install-btrfs
new file mode 100644
index 000000000..aad263378
--- /dev/null
+++ b/testing/btrfs-progs/initcpio-install-btrfs
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+build() {
+ add_module btrfs
+ add_binary btrfs
+ add_runscript
+
+ add_file /usr/lib/udev/rules.d/70-btrfs.rules
+}
+
+help() {
+ cat <<HELPEOF
+This hook provides support for multi-device btrfs volumes.
+HELPEOF
+}
+
+# vim: set ft=sh ts=4 sw=4 et:
diff --git a/testing/ddrescue/PKGBUILD b/testing/ddrescue/PKGBUILD
new file mode 100644
index 000000000..13824ccab
--- /dev/null
+++ b/testing/ddrescue/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD 163956 2012-07-22 18:33:26Z schiv $
+# Maintainer: Ray Rashif <schiv@archlinux.org>
+# Contributor: Pierre Schmitz <pierre@archlinux.de>
+# Contributor: Paul Mattal <paul@archlinux.org>
+
+pkgname=ddrescue
+pkgver=1.16
+pkgrel=2
+pkgdesc="GNU data recovery tool"
+arch=('i686' 'x86_64')
+url="http://www.gnu.org/software/ddrescue/ddrescue.html"
+license=('GPL3')
+depends=('gcc-libs')
+install=$pkgname.install
+source=("http://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.gz"
+ "http://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.gz.sig")
+md5sums=('57b67407e882c6418531d48a2f20d16b'
+ 'bf072280587665d82829be15eb6fc9ad')
+
+build() {
+ cd "$srcdir"/$pkgname-$pkgver
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "$srcdir"/$pkgname-$pkgver
+ make DESTDIR="$pkgdir" install install-man
+ rm "$pkgdir"/usr/share/info/dir
+}
diff --git a/testing/ddrescue/ddrescue.install b/testing/ddrescue/ddrescue.install
new file mode 100644
index 000000000..9e2afa74e
--- /dev/null
+++ b/testing/ddrescue/ddrescue.install
@@ -0,0 +1,22 @@
+infodir=/usr/share/info
+filelist=(ddrescue.info)
+
+post_install() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info $infodir/$file $infodir/dir 2> /dev/null
+ done
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info --delete $infodir/$file $infodir/dir 2> /dev/null
+ done
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/testing/iptables/0503-extension_cppflags.patch b/testing/iptables/0503-extension_cppflags.patch
new file mode 100644
index 000000000..0eb645731
--- /dev/null
+++ b/testing/iptables/0503-extension_cppflags.patch
@@ -0,0 +1,13 @@
+Index: b/extensions/GNUmakefile.in
+===================================================================
+--- a/extensions/GNUmakefile.in 2012-03-27 12:14:05.000000000 -0400
++++ b/extensions/GNUmakefile.in 2012-03-27 16:03:48.378790221 -0400
+@@ -21,7 +21,7 @@
+ kinclude_CPPFLAGS = @kinclude_CPPFLAGS@
+
+ AM_CFLAGS = ${regular_CFLAGS}
+-AM_CPPFLAGS = ${regular_CPPFLAGS} -I${top_builddir}/include -I${top_builddir} -I${top_srcdir}/include ${kinclude_CPPFLAGS}
++AM_CPPFLAGS = ${CPPFLAGS} ${regular_CPPFLAGS} -I${top_builddir}/include -I${top_builddir} -I${top_srcdir}/include ${kinclude_CPPFLAGS}
+ AM_DEPFLAGS = -Wp,-MMD,$(@D)/.$(@F).d,-MT,$@
+ AM_LDFLAGS = @noundef_LDFLAGS@
+
diff --git a/testing/iptables/ip6tables.service b/testing/iptables/ip6tables.service
new file mode 100644
index 000000000..9a695f31e
--- /dev/null
+++ b/testing/iptables/ip6tables.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=IPv6 Packet Filtering Framework
+
+[Service]
+Type=oneshot
+ExecStart=/usr/sbin/ip6tables-restore /etc/iptables/ip6tables.rules
+ExecStop=/usr/lib/systemd/scripts/iptables-flush 6
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/testing/iptables/iptables-1.4.12-fixresore.patch b/testing/iptables/iptables-1.4.12-fixresore.patch
new file mode 100644
index 000000000..94358f779
--- /dev/null
+++ b/testing/iptables/iptables-1.4.12-fixresore.patch
@@ -0,0 +1,28 @@
+diff -Nur iptables-1.4.12.2/iptables/ip6tables-restore.c iptables-1.4.12.2-fixrestore/iptables/ip6tables-restore.c
+--- iptables-1.4.12.2/iptables/ip6tables-restore.c 2012-01-03 02:19:09.000000000 +0900
++++ iptables-1.4.12.2-fixrestore/iptables/ip6tables-restore.c 2012-03-01 10:56:10.000000000 +0900
+@@ -380,9 +380,9 @@
+ quote_open = 0;
+ escaped = 0;
+ param_len = 0;
++ char param_buffer[1024];
+
+ for (curchar = parsestart; *curchar; curchar++) {
+- char param_buffer[1024];
+
+ if (quote_open) {
+ if (escaped) {
+diff -Nur iptables-1.4.12.2/iptables/iptables-restore.c iptables-1.4.12.2-fixrestore/iptables/iptables-restore.c
+--- iptables-1.4.12.2/iptables/iptables-restore.c 2012-01-03 02:19:09.000000000 +0900
++++ iptables-1.4.12.2-fixrestore/iptables/iptables-restore.c 2012-03-01 10:56:00.000000000 +0900
+@@ -377,9 +377,9 @@
+ quote_open = 0;
+ escaped = 0;
+ param_len = 0;
++ char param_buffer[1024];
+
+ for (curchar = parsestart; *curchar; curchar++) {
+- char param_buffer[1024];
+
+ if (quote_open) {
+ if (escaped) {
diff --git a/testing/iptables/iptables-flush b/testing/iptables/iptables-flush
new file mode 100755
index 000000000..e6fafe950
--- /dev/null
+++ b/testing/iptables/iptables-flush
@@ -0,0 +1,18 @@
+#!/bin/bash
+#
+# Usage: iptables-flush [6]
+#
+
+iptables=ip$1tables
+if ! type -p "$iptables"; then
+ echo "error: invalid argument"
+ exit 1
+fi
+
+while read -r table; do
+ tables+=("/var/lib/$iptables/empty-$table.rules")
+done <"/proc/net/ip$1_tables_names"
+
+if (( ${#tables[*]} )); then
+ cat "${tables[@]}" | "$iptables-restore"
+fi
diff --git a/testing/iptables/iptables.service b/testing/iptables/iptables.service
new file mode 100644
index 000000000..3084f53b7
--- /dev/null
+++ b/testing/iptables/iptables.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Packet Filtering Framework
+
+[Service]
+Type=oneshot
+ExecStart=/usr/sbin/iptables-restore /etc/iptables/iptables.rules
+ExecStop=/usr/lib/systemd/scripts/iptables-flush
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/testing/libwacom/PKGBUILD b/testing/libwacom/PKGBUILD
new file mode 100644
index 000000000..5080168da
--- /dev/null
+++ b/testing/libwacom/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 164040 2012-07-24 23:12:01Z eric $
+# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
+
+pkgname=libwacom
+pkgver=0.6
+pkgrel=1
+pkgdesc="Library to identify Wacom tablets and their features"
+arch=('x86_64' 'i686')
+url="http://sourceforge.net/apps/mediawiki/linuxwacom/index.php?title=Libwacom"
+license=('MIT')
+depends=('glib2' 'systemd-tools')
+options=('!libtool')
+source=(http://sourceforge.net/projects/linuxwacom/files/libwacom/$pkgname-$pkgver.tar.bz2)
+sha256sums=('7115690698edc87deec482f0b2526567b858475d2135b5f8ccc946e5e76ec01d')
+
+build() {
+ cd $pkgname-$pkgver
+ ./configure --prefix=/usr --disable-static
+ make
+}
+
+check() {
+ cd $pkgname-$pkgver
+ make check
+}
+
+package() {
+ cd $pkgname-$pkgver
+ make DESTDIR="$pkgdir" install
+ install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/testing/qjackctl/PKGBUILD b/testing/qjackctl/PKGBUILD
new file mode 100644
index 000000000..0884a6587
--- /dev/null
+++ b/testing/qjackctl/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 163957 2012-07-22 18:36:11Z schiv $
+# Maintainer: Ray Rashif <schiv@archlinux.org>
+# Contributor: Tobias Kieslich <tobias@archlinux.org>
+
+pkgname=qjackctl
+pkgver=0.3.9
+pkgrel=2
+pkgdesc="A Qt front-end for the JACK low-latency audio server"
+url="http://qjackctl.sourceforge.net/"
+arch=('i686' 'x86_64')
+license=('GPL')
+depends=('jack' 'qt')
+options=('!makeflags')
+source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz")
+md5sums=('f932c916f43ba3251d3a9ed62a448e43')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ ./configure --prefix=/usr
+
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ make DESTDIR="$pkgdir" install
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/testing/rosegarden/PKGBUILD b/testing/rosegarden/PKGBUILD
new file mode 100644
index 000000000..3fefe02e1
--- /dev/null
+++ b/testing/rosegarden/PKGBUILD
@@ -0,0 +1,43 @@
+# $Id: PKGBUILD 163958 2012-07-22 18:37:45Z schiv $
+# Maintainer: Ray Rashif <schiv@archlinux.org>
+# Contributor: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: damir <damir@archlinux.org>
+# Contributor: Robert Emil Berge <robert@rebi.no>
+
+pkgname=rosegarden
+pkgver=12.04
+pkgrel=2
+pkgdesc="MIDI/audio sequencer and notation editor"
+arch=('i686' 'x86_64')
+url="http://www.rosegardenmusic.com/"
+license=('GPL')
+depends=('liblrdf' 'dssi' 'fftw' 'lirc-utils'
+ 'perl' 'qt' 'shared-mime-info')
+makedepends=('imake')
+optdepends=('lilypond: notation display'
+ 'cups: printing support'
+ 'okular: print preview, or any other PDF viewer'
+ 'timidity++: MIDI playback, or any other softsynth'
+ 'flac'
+ 'wavpack')
+[ "$CARCH" = "i686" ] && optdepends+=('dssi-vst: win32 VST support')
+install=$pkgname.install
+source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2")
+md5sums=('b11f4fcad69df45365d2125181524559')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ # lrdf + raptor2 compatibility
+ export lrdf_CFLAGS="$(pkg-config --cflags raptor2)"
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ make DESTDIR="$pkgdir" install
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/testing/rosegarden/rosegarden.install b/testing/rosegarden/rosegarden.install
new file mode 100644
index 000000000..5119faec2
--- /dev/null
+++ b/testing/rosegarden/rosegarden.install
@@ -0,0 +1,14 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-mime-database usr/share/mime &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
+
+# vim:set ts=2 sw=2 et: