From a5ecb8225388941a95fdc3d8dd2f16a0736cb956 Mon Sep 17 00:00:00 2001
From: Cecil Hugh Watson <knoppmyth@gmail.com>
Date: Sat, 4 Sep 2010 16:00:44 -0700
Subject: hal:Bumped/Updated for LinHES 7.

---
 abs/core-testing/hal/PKGBUILD                      | 104 ++++++----
 abs/core-testing/hal/dbus-error-init.patch         | 231 +++++++++++++++++++++
 abs/core-testing/hal/fix-libusb-detection.patch    |  66 ++++++
 abs/core-testing/hal/hal-HDAPS-blacklist.patch     |  30 +++
 abs/core-testing/hal/hal-KVM-evdev.patch           |  36 ++++
 .../hal/hal-remove-dell-killswitch.patch           | 201 ++++++++++++++++++
 abs/core-testing/hal/hal-use-at-console.patch      |  45 ++++
 abs/core-testing/hal/hal-xen-unignore-axes.patch   |  39 ++++
 abs/core-testing/hal/hal.install                   |  15 +-
 abs/core-testing/hal/handle-input-touchpad.patch   | 101 +++++++++
 abs/core-testing/hal/macbook-fix-ioperm.patch      |  41 ++++
 abs/core-testing/hal/path-max.patch                |  31 +++
 12 files changed, 892 insertions(+), 48 deletions(-)
 create mode 100644 abs/core-testing/hal/dbus-error-init.patch
 create mode 100644 abs/core-testing/hal/fix-libusb-detection.patch
 create mode 100644 abs/core-testing/hal/hal-HDAPS-blacklist.patch
 create mode 100644 abs/core-testing/hal/hal-KVM-evdev.patch
 create mode 100644 abs/core-testing/hal/hal-remove-dell-killswitch.patch
 create mode 100644 abs/core-testing/hal/hal-use-at-console.patch
 create mode 100644 abs/core-testing/hal/hal-xen-unignore-axes.patch
 create mode 100644 abs/core-testing/hal/handle-input-touchpad.patch
 create mode 100644 abs/core-testing/hal/macbook-fix-ioperm.patch
 create mode 100644 abs/core-testing/hal/path-max.patch

diff --git a/abs/core-testing/hal/PKGBUILD b/abs/core-testing/hal/PKGBUILD
index f3e48cc..6e928fd 100644
--- a/abs/core-testing/hal/PKGBUILD
+++ b/abs/core-testing/hal/PKGBUILD
@@ -1,59 +1,83 @@
-# $Id: PKGBUILD 12450 2008-09-14 10:49:05Z pierre $
+# $Id: PKGBUILD 82401 2010-06-10 21:48:17Z thomas $
 # Maintainer: Jan de Groot <jgc@archlinux.org>
 # Contributor: Link Dupont <link@subpop.net>
 
 pkgname=hal
-pkgver=0.5.11
-pkgrel=5
+pkgver=0.5.14
+pkgrel=4
 pkgdesc="Hardware Abstraction Layer"
 arch=(i686 x86_64)
 license=('GPL' 'custom')
 url="http://www.freedesktop.org/wiki/Software/hal"
-depends=('dbus-glib>=0.74' 'dbus>=1.2.1' 'libusb>=0.1.12' 'udev>=118' 'filesystem>=0.7.1-5' 'hal-info>=0.20080508' 'eject' 'libsmbios>=2.0.2' 'dmidecode' 'pciutils>=2.2.8-3' 'usbutils>=0.73-5' 'pm-utils>=1.1.2')
+depends=('dbus-glib>=0.82' 'libusb>=0.1.12' 'udev>=146' 'filesystem>=0.7.1-5' 'hal-info>=0.20090716' 'eject' 'dmidecode' 'pciutils>=3.0.2' 'usbutils>=0.73-5' 'pm-utils>=1.2.5' 'consolekit>=0.4.1' 'util-linux-ng>=2.16')
 makedepends=('pkgconfig' 'gperf')
-options=('!libtool')
+options=('!libtool' '!makeflags')
 install=hal.install
-source=(http://hal.freedesktop.org/releases/${pkgname}-${pkgver}.tar.bz2
-	hal
-	hal-policy.patch
-	cryptsetup_location.patch
-	hal-0.5.9-hide-diagnostic.patch
-	ntfs3g-valid-options.patch
-	fix-udev-compatibility.patch
-	ntfs-mount-fix.patch)
-md5sums=('5e8935ab61bcb14afd2d4548084aace0'
+source=(http://hal.freedesktop.org/releases/${pkgname}-${pkgver}.tar.gz
+        hal
+        hal-0.5.9-hide-diagnostic.patch
+        hal-remove-dell-killswitch.patch
+        hal-KVM-evdev.patch
+        hal-HDAPS-blacklist.patch
+        hal-xen-unignore-axes.patch
+        hal-use-at-console.patch
+        fix-libusb-detection.patch
+        dbus-error-init.patch
+        path-max.patch
+        handle-input-touchpad.patch
+        macbook-fix-ioperm.patch)
+md5sums=('e9163df591a6f38f59fdbfe33e73bf20'
          '277e96ac130d7bfce0b30f0b80db8782'
-         '18dcdaa79952e2057c2e4745fbc8ad52'
-         'c688a3c6574699365926f4fef7441545'
          '4d4b6801a1cedca22b8bdd9db73b16fb'
-         '4242a2c78885e396f639d0cd5e33218c'
-         '1a33d73fa422df2f05b7e3483836f778'
-         '96cf8835c30dc581c4fcf72b6ad7675e')
+         '6d87c3e63184ae3a69caafc846f538a3'
+         '6507e5091ee2d11a87ae738a8e2caecb'
+         '1171c2d83b76059f2da7a3538e08fa4e'
+         '52bd305299aa22ae07f1a862c22d30fa'
+         '3f11234fb5e5044fbfc5199ec65b182c'
+         'da088f12cfc2d190bbf95b747e19ab9e'
+         '634f4ec2203eff7de8fa2ed2c6b9cbe0'
+         'f8c9b3a40d03907b498feef571d42466'
+         '0575677614db0632b17b1a719798c7e0'
+         '46a5db3ff896ee37762aa8d7e70942c4')
 
 build() {
-  cd ${startdir}/src/${pkgname}-${pkgver}
-  patch -Np1 -i ${startdir}/src/hal-policy.patch || return 1
-  patch -Np1 -i ${startdir}/src/cryptsetup_location.patch || return 1
-  patch -Np1 -i ${startdir}/src/hal-0.5.9-hide-diagnostic.patch || return 1
-  patch -Np0 -i ${startdir}/src/ntfs3g-valid-options.patch || return 1
-  # Fix compatibility with udev 126 and later
-  patch -Np1 -i ${startdir}/src/fix-udev-compatibility.patch || return 1
-  patch -p0 -i ${srcdir}/ntfs-mount-fix.patch || return 1
+  cd "${srcdir}/${pkgname}-${pkgver}"
+  patch -Np1 -i "${srcdir}/hal-0.5.9-hide-diagnostic.patch" || return 1
+  patch -Np1 -i "${srcdir}/hal-remove-dell-killswitch.patch" || return 1
+  patch -Np1 -i "${srcdir}/hal-KVM-evdev.patch" || return 1
+  patch -Np1 -i "${srcdir}/hal-HDAPS-blacklist.patch" || return 1
+  patch -Np1 -i "${srcdir}/hal-xen-unignore-axes.patch" || return 1
+  patch -Np1 -i "${srcdir}/hal-use-at-console.patch" || return 1
+  patch -Np1 -i "${srcdir}/fix-libusb-detection.patch" || return 1
+  patch -Np1 -i "${srcdir}/dbus-error-init.patch" || return 1
+  patch -Np1 -i "${srcdir}/path-max.patch" || return 1
+  patch -Np1 -i "${srcdir}/handle-input-touchpad.patch" || return 1
+  patch -Np1 -i "${srcdir}/macbook-fix-ioperm.patch" || return 1
+  
+  libtoolize --force || return 1
+  aclocal || return 1
+  autoconf || return 1
+  automake || return 1
 
   ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
-              --libexecdir=/usr/lib/hal --enable-static=no \
-	      --enable-acpi-ibm --enable-acpi-toshiba \
-              --disable-docbook-docs --disable-doxygen-docs \
-	      --with-hal-user=hal --with-hal-group=hal \
-	      --with-pid-file=/var/run/hald.pid \
-	      --enable-policy-kit=no || return 1
-  sed -e 's/device-manager//' -i tools/Makefile || return 1
+      --libexecdir=/usr/lib/hal --with-udev-prefix=/etc \
+      --enable-static=no --disable-acpi-ibm \
+      --disable-docbook-docs --disable-console-kit \
+      --disable-policy-kit --disable-acl-management \
+      --enable-umount-helper --disable-smbios \
+      --with-hal-user=hal --with-hal-group=hal \
+      --with-pid-file=/var/run/hald.pid \
+      --disable-gtk-doc || return 1
   make || return 1
-  make DESTDIR=${startdir}/pkg install || return 1
-  install -m755 -d ${startdir}/pkg/etc/rc.d
-  install -m755 -d ${startdir}/pkg/media || return 1
-  install -m 755 ${startdir}/src/hal ${startdir}/pkg/etc/rc.d/hal || return 1
+  make DESTDIR="${pkgdir}" install || return 1
+  install -m755 -d "${pkgdir}/etc/rc.d"
+  install -m755 -d "${pkgdir}/media" || return 1
+  install -m755 "${srcdir}/hal" "${pkgdir}/etc/rc.d/" || return 1
 
-  install -m755 -d ${startdir}/pkg/usr/share/licenses/${pkgname}
-  install -m644 COPYING ${startdir}/pkg/usr/share/licenses/${pkgname}/ || return 1
+  install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
+  install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/" || return 1
+  
+  # Fix udev rule location
+  install -d -m755 "${pkgdir}/lib"
+  mv "${pkgdir}/etc/udev" "${pkgdir}/lib/"
 }
diff --git a/abs/core-testing/hal/dbus-error-init.patch b/abs/core-testing/hal/dbus-error-init.patch
new file mode 100644
index 0000000..fb3ad02
--- /dev/null
+++ b/abs/core-testing/hal/dbus-error-init.patch
@@ -0,0 +1,231 @@
+From dcb2829b8eff61463b0869614ddb07b1c86cecaa Mon Sep 17 00:00:00 2001
+From: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
+Date: Wed, 30 Dec 2009 11:42:52 +0000
+Subject: linux/probe-input: don't use error prio init
+
+it may happen in the out: case that LIBHAL_FREE_DBUS_ERROR (&error) is
+called before the error structure is initialized via
+dbus_error_init (&error). This could lead to a segfault during startup
+as seen in dmesg:
+
+|Intel AES-NI instructions are not detected.
+|padlock: VIA PadLock not detected.
+|hald-probe-inpu[1793]: segfault at 2 ip 00007f656fb68969 sp 00007fff39eeb950 error 4 in libc-2.10.2.so[7f656faf3000+14a000]
+|hald-probe-inpu[1796]: segfault at 2 ip 00007fa2c3293969 sp 00007fffd92a5dd0 error 4 in libc-2.10.2.so[7fa2c321e000+14a000]
+|hald-probe-inpu[1797]: segfault at 2 ip 00007f1d08ba2969 sp 00007fff34244e30 error 4 in libc-2.10.2.so[7f1d08b2d000+14a000]
+|hald-probe-inpu[1799]: segfault at 2 ip 00007f35c0e3d969 sp 00007fffe5ec7ee0 error 4 in libc-2.10.2.so[7f35c0dc8000+14a000]
+|hald-probe-inpu[1800]: segfault at 2 ip 00007f931c556969 sp 00007fffe1825b60 error 4 in libc-2.10.2.so[7f931c4e1000+14a000]
+|hald-probe-inpu[1801]: segfault at 2 ip 00007f5156d9a969 sp 00007fff4e620af0 error 4 in libc-2.10.2.so[7f5156d25000+14a000]
+|RPC: Registered udp transport module.
+|RPC: Registered tcp transport module.
+
+What I run into seems to be reported as Debian #562068 [0]. This patch
+makes the segfault go away on my machine.
+
+[0] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=562068
+
+Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
+Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
+---
+diff --git a/hald/linux/probing/probe-input.c b/hald/linux/probing/probe-input.c
+index 94e9929..cad47d3 100644
+--- a/hald/linux/probing/probe-input.c
++++ b/hald/linux/probing/probe-input.c
+@@ -70,6 +70,7 @@ main (int argc, char *argv[])
+ 	fd = -1;
+ 
+ 	setup_logger ();
++	dbus_error_init (&error);
+ 
+ 	button_type = getenv ("HAL_PROP_BUTTON_TYPE");
+ 	if (button_type == NULL)
+@@ -96,7 +97,6 @@ main (int argc, char *argv[])
+ 	if (udi == NULL)
+ 		goto out;
+ 
+-	dbus_error_init (&error);
+ 	if ((ctx = libhal_ctx_init_direct (&error)) == NULL)
+ 		goto out;
+ 
+--
+cgit v0.8.3-6-g21f6
+From baa61a879985d63f549854518ef14efd40e62e8c Mon Sep 17 00:00:00 2001
+From: Peter Jones <pjones@redhat.com>
+Date: Wed, 24 Feb 2010 16:19:28 +0000
+Subject: Make sure dbus_error_init() is called before LIBHAL_FREE_DBUS_ERROR()
+
+If dbus_error_init() is not called before LIBHAL_FREE_DBUS_ERROR() is
+called on that error, then it is uninitialized and may segfault.  This
+means that dbus_error_init() must be called before any "goto out" if
+"out:" calls LIBHAL_FREE_DBUS_ERROR().
+
+Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
+---
+diff --git a/hald/linux/probing/probe-hiddev.c b/hald/linux/probing/probe-hiddev.c
+index 45d2084..bffc040 100644
+--- a/hald/linux/probing/probe-hiddev.c
++++ b/hald/linux/probing/probe-hiddev.c
+@@ -57,11 +57,12 @@ main (int argc, char *argv[])
+ 	/* assume failure */
+ 	ret = 1;
+ 
++	dbus_error_init (&error);
++
+ 	udi = getenv ("UDI");
+ 	if (udi == NULL)
+ 		goto out;
+ 
+-	dbus_error_init (&error);
+ 	if ((ctx = libhal_ctx_init_direct (&error)) == NULL)
+ 		goto out;
+ 
+diff --git a/hald/linux/probing/probe-ieee1394-unit.c b/hald/linux/probing/probe-ieee1394-unit.c
+index 70b0f86..aaa92e2 100644
+--- a/hald/linux/probing/probe-ieee1394-unit.c
++++ b/hald/linux/probing/probe-ieee1394-unit.c
+@@ -388,6 +388,8 @@ int main (int argc, char *argv[])
+ 
+ 	setup_logger ();
+ 
++	dbus_error_init (&error);
++
+ 	udi = getenv ("UDI");
+ 	if (udi == NULL)
+ 		goto out;
+@@ -396,7 +398,6 @@ int main (int argc, char *argv[])
+ 	if (ieee1394_udi == NULL)
+ 		goto out;
+ 
+-	dbus_error_init (&error);
+ 	if ((ctx = libhal_ctx_init_direct (&error)) == NULL)
+ 		goto out;
+ 
+diff --git a/hald/linux/probing/probe-net-bluetooth.c b/hald/linux/probing/probe-net-bluetooth.c
+index 0b1b912..e911eea 100644
+--- a/hald/linux/probing/probe-net-bluetooth.c
++++ b/hald/linux/probing/probe-net-bluetooth.c
+@@ -141,6 +141,8 @@ main (int argc, char *argv[])
+ 	DBusMessage *reply = NULL;
+ 	DBusError error;
+ 
++	dbus_error_init (&error);
++
+ 	udi = getenv ("UDI");
+ 	if (udi == NULL)
+ 		goto out;
+@@ -151,8 +153,6 @@ main (int argc, char *argv[])
+ 
+ 	HAL_INFO (("Investigating '%s'", iface));
+ 
+-	dbus_error_init (&error);
+-
+ 	if ((conn = dbus_bus_get (DBUS_BUS_SYSTEM, &error)) == NULL)
+ 		goto out;
+ 
+diff --git a/hald/linux/probing/probe-printer.c b/hald/linux/probing/probe-printer.c
+index 91ed7bc..7c6d1c6 100644
+--- a/hald/linux/probing/probe-printer.c
++++ b/hald/linux/probing/probe-printer.c
+@@ -66,6 +66,8 @@ main (int argc, char *argv[])
+ 	ret = 1;
+ 
+ 	setup_logger ();
++
++	dbus_error_init (&error);
+ 	
+ 	udi = getenv ("UDI");
+ 	if (udi == NULL) {
+@@ -73,7 +75,6 @@ main (int argc, char *argv[])
+ 		goto out;
+ 	}
+ 
+-	dbus_error_init (&error);
+ 	if ((ctx = libhal_ctx_init_direct (&error)) == NULL) {
+ 		HAL_ERROR (("ctx init failed"));
+ 		goto out;
+diff --git a/hald/linux/probing/probe-smbios.c b/hald/linux/probing/probe-smbios.c
+index 0bc9689..15c0d4f 100644
+--- a/hald/linux/probing/probe-smbios.c
++++ b/hald/linux/probing/probe-smbios.c
+@@ -129,6 +129,8 @@ main (int argc, char *argv[])
+ 	ret = 1;
+ 
+ 	setup_logger ();
++
++	dbus_error_init (&error);
+ 	
+ 	udi = getenv ("UDI");
+ 	if (udi == NULL) {
+@@ -136,7 +138,6 @@ main (int argc, char *argv[])
+ 		goto out;
+ 	}
+ 
+-	dbus_error_init (&error);
+ 	if ((ctx = libhal_ctx_init_direct (&error)) == NULL) {
+ 		HAL_ERROR (("ctx init failed"));
+ 		goto out;
+diff --git a/hald/linux/probing/probe-storage.c b/hald/linux/probing/probe-storage.c
+index 824a82e..dd524ca 100644
+--- a/hald/linux/probing/probe-storage.c
++++ b/hald/linux/probing/probe-storage.c
+@@ -109,6 +109,8 @@ main (int argc, char *argv[])
+ 	/* assume failure */
+ 	ret = 1;
+ 
++	dbus_error_init (&error);
++
+ 	if ((udi = getenv ("UDI")) == NULL)
+ 		goto out;
+ 	if ((device_file = getenv ("HAL_PROP_BLOCK_DEVICE")) == NULL)
+@@ -127,7 +129,6 @@ main (int argc, char *argv[])
+ 	else
+ 		only_check_for_fs = FALSE;
+ 
+-	dbus_error_init (&error);
+ 	if ((ctx = libhal_ctx_init_direct (&error)) == NULL)
+ 		goto out;
+ 
+diff --git a/hald/linux/probing/probe-video4linux.c b/hald/linux/probing/probe-video4linux.c
+index cf913c0..7bc13e8 100644
+--- a/hald/linux/probing/probe-video4linux.c
++++ b/hald/linux/probing/probe-video4linux.c
+@@ -58,6 +58,8 @@ main (int argc, char *argv[])
+ 
+ 	setup_logger ();
+ 
++	dbus_error_init (&error);
++
+ 	device_file = getenv ("HAL_PROP_VIDEO4LINUX_DEVICE");
+ 	if (device_file == NULL)
+ 		goto out;
+@@ -66,7 +68,6 @@ main (int argc, char *argv[])
+ 	if (udi == NULL)
+ 		goto out;
+ 
+-	dbus_error_init (&error);
+ 	ctx = libhal_ctx_init_direct (&error);
+ 	if (ctx == NULL)
+ 		goto out;
+diff --git a/hald/linux/probing/probe-volume.c b/hald/linux/probing/probe-volume.c
+index 0de1b91..7268fff 100644
+--- a/hald/linux/probing/probe-volume.c
++++ b/hald/linux/probing/probe-volume.c
+@@ -318,6 +318,8 @@ main (int argc, char *argv[])
+ 	/* assume failure */
+ 	ret = 1;
+ 
++	dbus_error_init (&error);
++
+ 	if ((udi = getenv ("UDI")) == NULL)
+ 		goto out;
+ 	if ((device_file = getenv ("HAL_PROP_BLOCK_DEVICE")) == NULL)
+@@ -346,7 +348,6 @@ main (int argc, char *argv[])
+ 
+ 	fsusage = getenv ("HAL_PROP_VOLUME_FSUSAGE");
+ 
+-	dbus_error_init (&error);
+ 	if ((ctx = libhal_ctx_init_direct (&error)) == NULL)
+ 		goto out;
+ 
+--
+cgit v0.8.3-6-g21f6
diff --git a/abs/core-testing/hal/fix-libusb-detection.patch b/abs/core-testing/hal/fix-libusb-detection.patch
new file mode 100644
index 0000000..d4f966d
--- /dev/null
+++ b/abs/core-testing/hal/fix-libusb-detection.patch
@@ -0,0 +1,66 @@
+From fce91df8ba7f305c624baf1f06961c040b088ecc Mon Sep 17 00:00:00 2001
+From: Joe Marcus Clarke <marcus@FreeBSD.org>
+Date: Tue, 08 Dec 2009 00:05:27 +0000
+Subject: Fix libusb detection on Linux
+
+Adjust the FreeBSD libusb20 code so that it does not interfere with the
+Linux libusb detection.
+
+Reported by:	Robby Workman <rw@rlworkman.net>
+---
+diff --git a/configure.in b/configure.in
+index a8fda51..8363595 100644
+--- a/configure.in
++++ b/configure.in
+@@ -479,9 +479,6 @@ if test "x$with_libpci" != xno ; then
+ fi 
+ AM_CONDITIONAL([HAVE_LIBPCI], [test "x$USE_LIBPCI" = "xyes"])
+ 
+-USE_LIBUSB20=no
+-USE_LIBUSB=no
+-LIBUSB20_LIBS=""
+ AC_ARG_WITH([backend],
+ 	    AS_HELP_STRING([--with-backend=<name>],
+ 	                   [backend to use (linux/solaris/freebsd/dummy)]),
+@@ -510,21 +507,25 @@ AM_CONDITIONAL(HALD_COMPILE_FREEBSD, [test x$HALD_BACKEND = xfreebsd], [Compilin
+ AM_CONDITIONAL(HALD_COMPILE_SOLARIS, [test x$HALD_BACKEND = xsolaris], [Compiling for Solaris])
+ AC_SUBST(HALD_BACKEND)
+ if test "x$HALD_BACKEND" = "xfreebsd"; then
+-    AC_CHECK_LIB([usb20], [libusb20_dev_get_info], [USE_LIBUSB20=yes], [USE_LIBUSB20=no])
+-fi
+-if test "x$USE_LIBUSB20" = "xno"; then
+-    AC_CHECK_LIB([usb], [libusb20_dev_get_info], [USE_LIBUSB=yes], [USE_LIBUSB=no])
+-fi
+-AM_CONDITIONAL([HAVE_LIBUSB20],[test "x$USE_LIBUSB20" = "xyes"])
+-AM_CONDITIONAL([HAVE_LIBUSB20],[test "x$USE_LIBUSB" = "xyes"])
+-if test "x$USE_LIBUSB20" = "xyes"; then
+-    AC_DEFINE(HAVE_LIBUSB20, 1, [Set if we need libusb20])
+-    LIBUSB20_LIBS="-lusb20"
+-elif test "x$USE_LIBUSB" = "xyes"; then
+-    AC_DEFINE(HAVE_LIBUSB20, 1, [Set if we need libsub20])
+-    LIBUSB20_LIBS="-lusb"
++    USE_BSDLIBUSB20=no
++    USE_BSDLIBUSB=no
++    LIBUSB20_LIBS=""
++    AC_CHECK_LIB([usb20], [libusb20_dev_get_info], [USE_BSDLIBUSB20=yes], [USE_BSDLIBUSB20=no])
++    if test "x$USE_BSDLIBUSB20" = "xno"; then
++        AC_CHECK_LIB([usb], [libusb20_dev_get_info], [USE_BSDLIBUSB=yes], [USE_BSDLIBUSB=no])
++    fi
++    AM_CONDITIONAL([HAVE_LIBUSB20],[test "x$USE_BSDLIBUSB20" = "xyes" -o "x$USE_BSDLIBUSB" = "xyes"])
++    if test "x$USE_BSDLIBUSB20" = "xyes"; then
++        AC_DEFINE(HAVE_LIBUSB20, 1, [Set if we need libusb20])
++        LIBUSB20_LIBS="-lusb20"
++    elif test "x$USE_BSDLIBUSB" = "xyes"; then
++        AC_DEFINE(HAVE_LIBUSB20, 1, [Set if we need libsub20])
++        LIBUSB20_LIBS="-lusb"
++    fi
++    AC_SUBST(LIBUSB20_LIBS)
++else
++    AM_CONDITIONAL([HAVE_LIBUSB20], [false])
+ fi
+-AC_SUBST(LIBUSB20_LIBS)
+ 
+ dnl DBUS API is subject to changes
+ AC_DEFINE_UNQUOTED(DBUS_API_SUBJECT_TO_CHANGE, [], [DBUS API is subject to change])
+--
+cgit v0.8.3-6-g21f6
diff --git a/abs/core-testing/hal/hal-HDAPS-blacklist.patch b/abs/core-testing/hal/hal-HDAPS-blacklist.patch
new file mode 100644
index 0000000..8a68228
--- /dev/null
+++ b/abs/core-testing/hal/hal-HDAPS-blacklist.patch
@@ -0,0 +1,30 @@
+From e1f85fe0cdfa7e4d4ce7a811d0b0c90bf38fba0c Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Thu, 25 Jun 2009 09:47:27 +1000
+Subject: [PATCH] Blacklist HDAPS accelerometer device from being picked up in X.
+
+This device posts accelerometer data through ABS_X/ABS_Y, making X unusable
+if it's controlling the pointer.
+---
+ fdi/policy/10osvendor/10-x11-input.fdi |    6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+diff --git a/fdi/policy/10osvendor/10-x11-input.fdi b/fdi/policy/10osvendor/10-x11-input.fdi
+index a342421..89ba672 100644
+--- a/fdi/policy/10osvendor/10-x11-input.fdi
++++ b/fdi/policy/10osvendor/10-x11-input.fdi
+@@ -38,5 +38,11 @@
+         <merge key="input.x11_driver" type="string">evdev</merge>
+       </match>
+     </match>
++
++    <!-- http://bugs.freedesktop.org/show_bug.cgi?id=22442 
++         Posts accel data through ABS_X/ABS_Y, makes X unusable -->
++    <match key="info.product" contains="ThinkPad HDAPS accelerometer data">
++        <remove key="input.x11_driver" />
++    </match>
+   </device>
+ </deviceinfo>
+-- 
+1.6.3.rc1.2.g0164.dirty
+
diff --git a/abs/core-testing/hal/hal-KVM-evdev.patch b/abs/core-testing/hal/hal-KVM-evdev.patch
new file mode 100644
index 0000000..917655e
--- /dev/null
+++ b/abs/core-testing/hal/hal-KVM-evdev.patch
@@ -0,0 +1,36 @@
+From 7618498eec840cb26474dc47821e083957772706 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Fri, 20 Mar 2009 14:37:24 +1000
+Subject: [PATCH] Add x11_driver for American Megatrends KVM.
+
+This device exposes only ABS_X, ABS_Y and buttons. It gets input.joystick
+assigned but not input.mouse, hence the default evdev mapping doesn't pick up
+on it.
+
+Red Hat Bug 484776 <https://bugzilla.redhat.com/show_bug.cgi?id=484776>
+
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+---
+ fdi/policy/10osvendor/10-x11-input.fdi |    6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+diff --git a/fdi/policy/10osvendor/10-x11-input.fdi b/fdi/policy/10osvendor/10-x11-input.fdi
+index 769f75b..eb9767e 100644
+--- a/fdi/policy/10osvendor/10-x11-input.fdi
++++ b/fdi/policy/10osvendor/10-x11-input.fdi
+@@ -2,6 +2,12 @@
+ <deviceinfo version="0.2">
+   <device>
+ 
++    <!-- This KVMS has abs x/y and buttons. It only has inputInfo.joystick
++         set by hal and doesn't get picked up by default -->
++    <match key="input.product" contains="American Megatrends Inc. Virtual Keyboard and Mouse">
++       <merge key="input.x11_driver" type="string">evdev</merge>
++    </match>
++
+     <!-- KVM emulates a USB graphics tablet which works in absolute coordinate mode -->
+     <match key="input.product" contains="QEMU USB Tablet">
+        <merge key="input.x11_driver" type="string">evdev</merge>
+-- 
+1.6.0.6
+
diff --git a/abs/core-testing/hal/hal-remove-dell-killswitch.patch b/abs/core-testing/hal/hal-remove-dell-killswitch.patch
new file mode 100644
index 0000000..ae0cf7a
--- /dev/null
+++ b/abs/core-testing/hal/hal-remove-dell-killswitch.patch
@@ -0,0 +1,201 @@
+diff -upr hal-0.5.12/tools/linux/hal-system-killswitch-get-power-linux hal-0.5.12.new/tools/linux/hal-system-killswitch-get-power-linux
+--- hal-0.5.12/tools/linux/hal-system-killswitch-get-power-linux	2008-08-22 07:34:47.000000000 +0100
++++ hal-0.5.12.new/tools/linux/hal-system-killswitch-get-power-linux	2009-03-03 10:45:20.000000000 +0000
+@@ -8,11 +8,6 @@
+ # the Free Software Foundation; either version 2 of the License, or
+ # (at your option) any later version.
+ 
+-DELL_WCTL=/usr/bin/dellWirelessCtl
+-if [ -x "/usr/sbin/dellWirelessCtl" ]; then
+-  DELL_WCTL=/usr/sbin/dellWirelessCtl
+-fi
+-
+ if [ "$HAL_PROP_KILLSWITCH_TYPE" = "bluetooth" ]; then
+     if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "sonypic" ]; then
+ 	value="`hal-system-sonypic getbluetooth`"
+@@ -22,25 +17,6 @@ if [ "$HAL_PROP_KILLSWITCH_TYPE" = "blue
+ 	    exit 1
+ 	fi
+ 	exit ${value}
+-    elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" ]; then
+-	if [ -x "$DELL_WCTL" ]; then
+-	    # TODO: write our own binary that links with libsmbios?
+-	    $DELL_WCTL --st_bt
+-	    value=$?
+-	    if [ "$value" = "0" ]; then
+-	        exit 1
+-	    elif [ "$value" = "1" ]; then
+-	        exit 0
+-	    else
+-	        echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
+-	        echo "dellWirelessCtl returned $value" >&2
+-                exit 1
+-	    fi
+-        else
+-	    echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
+-	    echo "dellWirelessCtl ($DELL_WCTL) not available or executable" >&2
+-	    exit 1
+-	fi
+     elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = thinkpad -a -r "$HAL_PROP_LINUX_SYSFS_PATH" ]; then
+ 	read value < $HAL_PROP_LINUX_SYSFS_PATH 2> /dev/null
+ 	if [ $? -eq 0 ]; then
+@@ -55,56 +31,6 @@ if [ "$HAL_PROP_KILLSWITCH_TYPE" = "blue
+ 	echo "Access type not supported" >&2
+ 	exit 1
+     fi
+-elif [ "$HAL_PROP_KILLSWITCH_TYPE" = "wlan" ]; then
+-    if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" ]; then
+-	if [ -x "$DELL_WCTL" ]; then
+- 	    # TODO: write our own binary that links with libsmbios?
+-	    $DELL_WCTL --st_wlan
+-	    value=$?
+-	    if [ "$value" = "0" ]; then
+-	        exit 1
+-	    elif [ "$value" = "1" ]; then
+-	        exit 0
+-	    else
+-	        echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
+-	        echo "dellWirelessCtl returned $value" >&2
+-                exit 1
+-	    fi
+-	else 
+-	    echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
+-	    echo "dellWirelessCtl ($DELL_WCTL) not available or executable" >&2
+-	    exit 1
+-	fi
+-    else
+-	echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
+-	echo "Access type not supported" >&2
+-	exit 1
+-    fi
+-elif [ "$HAL_PROP_KILLSWITCH_TYPE" = "wwan" ]; then
+-    if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" ]; then
+-	if [ -x "$DELL_WCTL" ]; then
+-   	    # TODO: write our own binary that links with libsmbios?
+-	    $DELL_WCTL --st_wwan
+-	    value=$?
+-	    if [ "$value" = "0" ]; then
+-	        exit 1
+-	    elif [ "$value" = "1" ]; then
+-	        exit 0
+-	    else
+-	        echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
+-	        echo "dellWirelessCtl returned $value" >&2
+-                exit 1
+-	    fi
+-	else 
+-	    echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
+-	    echo "dellWirelessCtl ($DELL_WCTL) not available or executable" >&2
+-	    exit 1
+-	fi
+-    else
+-	echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
+-	echo "Access type not supported" >&2
+-	exit 1
+-    fi
+ else
+     echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
+     echo "Killswitch type not supported" >&2
+diff -upr hal-0.5.12/tools/linux/hal-system-killswitch-set-power-linux hal-0.5.12.new/tools/linux/hal-system-killswitch-set-power-linux
+--- hal-0.5.12/tools/linux/hal-system-killswitch-set-power-linux	2008-10-24 09:45:54.000000000 +0100
++++ hal-0.5.12.new/tools/linux/hal-system-killswitch-set-power-linux	2009-03-03 10:44:49.000000000 +0000
+@@ -8,11 +8,6 @@
+ # the Free Software Foundation; either version 2 of the License, or
+ # (at your option) any later version.
+ 
+-DELL_WCTL=/usr/bin/dellWirelessCtl
+-if [ -x "/usr/sbin/dellWirelessCtl" ]; then
+-    DELL_WCTL=/usr/sbin/dellWirelessCtl
+-fi
+-
+ if [ "$HAL_PROP_KILLSWITCH_TYPE" = "bluetooth" ]; then
+     if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "sonypic" ]; then
+ 	hal-system-sonypic setbluetooth $value
+@@ -23,26 +18,6 @@ if [ "$HAL_PROP_KILLSWITCH_TYPE" = "blue
+ 	    exit 1
+ 	fi
+ 	exit 0
+-    elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" ]; then
+-	if [ -x "$DELL_WCTL" ]; then
+-	    # TODO: write our own binary that links with libsmbios?
+-	    if [ "$value" = "true" ]; then
+-	        $DELL_WCTL --bt 1
+-	        ret=$?
+-	    else
+-	        $DELL_WCTL --bt 0
+-	        ret=$?
+-	    fi
+-	    if [ "$ret" != "0" ]; then
+-	        echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
+-	        echo "dellWirelessCtl returned $ret" >&2
+-	        exit 1
+-	    fi
+-        else
+-            echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
+-            echo "dellWirelessCtl ($DELL_WCTL) not available or executable" >&2
+-            exit 1
+-        fi
+     elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = thinkpad -a -w "$HAL_PROP_LINUX_SYSFS_PATH" ]; then
+         if [ "$value" = "true" ]; then 
+ 	    bit=1; 
+@@ -61,60 +36,6 @@ if [ "$HAL_PROP_KILLSWITCH_TYPE" = "blue
+ 	echo "Access type not supported" >&2
+ 	exit 1
+     fi
+-elif [ "$HAL_PROP_KILLSWITCH_TYPE" = "wlan" ]; then
+-    if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" ]; then
+-	if [ -x "$DELL_WCTL" ]; then
+-	    # As a side effect we disable the physical kill switch
+-	    # TODO: write our own binary that links with libsmbios?
+-	    if [ "$value" = "true" ]; then
+-	        $DELL_WCTL --sw_wlan 0 --wlan 1
+-	        ret=$?
+-	    else
+-	        $DELL_WCTL --sw_wlan 0 --wlan 0
+-	        ret=$?
+-	    fi
+-	    if [ "$ret" != "0" ]; then
+-	        echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
+-	        echo "dellWirelessCtl returned $ret" >&2
+-                exit 1
+-	    fi
+-        else
+-            echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
+-            echo "dellWirelessCtl ($DELL_WCTL) not available or executable" >&2
+-            exit 1
+-        fi
+-    else
+-	echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
+-	echo "Access type not supported" >&2
+-	exit 1
+-    fi
+-elif [ "$HAL_PROP_KILLSWITCH_TYPE" = "wwan" ]; then
+-    if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" ]; then 
+-	if [ -x "$DELL_WCTL" ]; then
+-	    # As a side effect we disable the physical kill switch
+-	    # TODO: write our own binary that links with libsmbios?
+-	    if [ "$value" = "true" ]; then
+-	        $DELL_WCTL --sw_wwan 0 --wwan 1
+-	        ret=$?
+-	    else
+-	        $DELL_WCTL --sw_wwan 0 --wwan 0
+-	        ret=$?
+-	    fi
+-	    if [ "$ret" != "0" ]; then
+-	        echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
+-	        echo "dellWirelessCtl returned $ret" >&2
+-                exit 1
+-	    fi
+-        else
+-            echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
+-            echo "dellWirelessCtl ($DELL_WCTL) not available or executable" >&2
+-            exit 1
+-        fi
+-    else
+-	echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
+-	echo "Access type not supported" >&2
+-	exit 1
+-    fi
+ else
+     echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
+     echo "Killswitch type not supported" >&2
diff --git a/abs/core-testing/hal/hal-use-at-console.patch b/abs/core-testing/hal/hal-use-at-console.patch
new file mode 100644
index 0000000..0b32f17
--- /dev/null
+++ b/abs/core-testing/hal/hal-use-at-console.patch
@@ -0,0 +1,45 @@
+diff -up hal-0.5.13/hal.conf.in.drop-polkit hal-0.5.13/hal.conf.in
+--- hal-0.5.13/hal.conf.in.drop-polkit	2009-02-04 17:07:23.000000000 -0500
++++ hal-0.5.13/hal.conf.in	2009-07-29 23:15:16.866766074 -0400
+@@ -25,7 +25,41 @@
+            send_interface="org.freedesktop.Hal.Device"/>
+     <allow send_destination="org.freedesktop.Hal"
+            send_interface="org.freedesktop.Hal.Manager"/>
++  </policy>
++
++  <!-- Only allow users at the local console to manipulate devices -->
++  <policy at_console="true">
++    <allow send_destination="org.freedesktop.Hal"
++           send_interface="org.freedesktop.Hal.Device.CPUFreq"/>
++    <allow send_destination="org.freedesktop.Hal"
++    	   send_interface="org.freedesktop.Hal.Device.DockStation"/>
++    <allow send_destination="org.freedesktop.Hal"
++    	   send_interface="org.freedesktop.Hal.Device.KillSwitch"/>
++    <allow send_destination="org.freedesktop.Hal"
++    	   send_interface="org.freedesktop.Hal.Device.KeyboardBacklight"/>
++    <allow send_destination="org.freedesktop.Hal"
++    	   send_interface="org.freedesktop.Hal.Device.LaptopPanel"/>
++    <allow send_destination="org.freedesktop.Hal"
++    	   send_interface="org.freedesktop.Hal.Device.Leds"/>
++    <allow send_destination="org.freedesktop.Hal"
++    	   send_interface="org.freedesktop.Hal.Device.LightSensor"/>
++    <allow send_destination="org.freedesktop.Hal"
++    	   send_interface="org.freedesktop.Hal.Device.Storage"/>
++    <allow send_destination="org.freedesktop.Hal"
++    	   send_interface="org.freedesktop.Hal.Device.Storage.Removable"/>
++    <allow send_destination="org.freedesktop.Hal"
++    	   send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>
++    <allow send_destination="org.freedesktop.Hal"
++    	   send_interface="org.freedesktop.Hal.Device.Volume"/>
++    <allow send_destination="org.freedesktop.Hal"
++    	   send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
++    <allow send_destination="org.freedesktop.Hal"
++    	   send_interface="org.freedesktop.Hal.Device.WakeOnLan"/>
++
++  </policy>
+ 
++  <!-- well,...and root too -->
++  <policy user="root">
+     <allow send_destination="org.freedesktop.Hal"
+            send_interface="org.freedesktop.Hal.Device.CPUFreq"/>
+     <allow send_destination="org.freedesktop.Hal"
diff --git a/abs/core-testing/hal/hal-xen-unignore-axes.patch b/abs/core-testing/hal/hal-xen-unignore-axes.patch
new file mode 100644
index 0000000..b248639
--- /dev/null
+++ b/abs/core-testing/hal/hal-xen-unignore-axes.patch
@@ -0,0 +1,39 @@
+From e48f59d2b9bcb43ea8a7b8c884dcb73c8f65b170 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Mon, 19 Oct 2009 14:27:20 +1000
+Subject: [PATCH] Un-ignore absolute axes for the Xen Virtual Pointer.
+
+The evdev-internal axis type picking fails for the Xen Virtual Pointer as it
+exposes both relative and absolute axes. Evdev picks the relative axes by
+default, leading to a immovable pointer if the Xen backend only sends
+absolute coordinates.
+
+Explicitly tell evdev to not ignore the absolute axes.
+
+https://bugzilla.redhat.com/show_bug.cgi?id=523914
+
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+---
+ fdi/policy/10osvendor/10-x11-input.fdi |    7 +++++++
+ 1 files changed, 7 insertions(+), 0 deletions(-)
+
+diff --git a/fdi/policy/10osvendor/10-x11-input.fdi b/fdi/policy/10osvendor/10-x11-input.fdi
+index 89ba672..752c4ab 100644
+--- a/fdi/policy/10osvendor/10-x11-input.fdi
++++ b/fdi/policy/10osvendor/10-x11-input.fdi
+@@ -44,5 +44,12 @@
+     <match key="info.product" contains="ThinkPad HDAPS accelerometer data">
+         <remove key="input.x11_driver" />
+     </match>
++
++    <!-- https://bugzilla.redhat.com/show_bug.cgi?id=523914
++         Mouse does not move in PV Xen guest -->
++    <match key="info.product" contains="Xen Virtual Pointer">
++      <merge key="input.x11_options.IgnoreAbsoluteAxes" type="string">false</merge>
++      <merge key="input.x11_options.IgnoreRelativeAxes" type="string">false</merge>
++    </match>
+   </device>
+ </deviceinfo>
+-- 
+1.6.2.5
+
diff --git a/abs/core-testing/hal/hal.install b/abs/core-testing/hal/hal.install
index d3f3686..d6afee3 100644
--- a/abs/core-testing/hal/hal.install
+++ b/abs/core-testing/hal/hal.install
@@ -14,12 +14,11 @@ post_upgrade() {
 }
 
 # arg 1:  the old package version
-pre_remove() {
-  usr/sbin/userdel hal &>/dev/null
-  usr/sbin/groupdel hal &>/dev/null
+post_remove() {
+  if getent passwd hal &>/dev/null; then
+    usr/sbin/userdel hal
+  fi
+  if getent group hal &>/dev/null; then
+    usr/sbin/groupdel hal
+  fi
 }
-
-op=$1
-shift
-
-$op $*
diff --git a/abs/core-testing/hal/handle-input-touchpad.patch b/abs/core-testing/hal/handle-input-touchpad.patch
new file mode 100644
index 0000000..9cd6464
--- /dev/null
+++ b/abs/core-testing/hal/handle-input-touchpad.patch
@@ -0,0 +1,101 @@
+From 6dccf8e3ad181e8f56b1d2a994ec50a1953a1c2d Mon Sep 17 00:00:00 2001
+From: Michael Witten <mfwitten@gmail.com>
+Date: Wed, 06 Jan 2010 00:53:17 +0000
+Subject: Policy: handle `input.touchpad' explicitly
+
+This commit essentially duplicates the policy for:
+
+   <match key="info.capabilities" contains="input.mouse">
+
+and then changes `input.mouse' to `input.touchpad'. This
+is necessary because in Linus Torvalds's Linux repo:
+
+    git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
+
+the following commit:
+
+    commit 7105d2ea73e1391b681d0e1212c42f561c64d429
+    Author: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+    Date:   Fri Dec 11 23:54:54 2009 -0800
+
+        Input: ALPS - do not set REL_X/REL_Y capabilities on the touchpad
+
+        Relative events are only reported via secondary device therefore device
+        associated with the touchpad should not advertise these capabilities.
+
+        Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
+
+made these few changes:
+
+    diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
+    index a3f492a..b03e7e0 100644
+    /--- a/drivers/input/mouse/alps.c
+    /+++ b/drivers/input/mouse/alps.c
+    /@@ -487,6 +487,17 @@ int alps_init(struct psmouse *psmouse)
+     	if (alps_hw_init(psmouse))
+     		goto init_fail;
+
+    +	/*
+    +	 * Undo part of setup done for us by psmouse core since touchpad
+    +	 * is not a relative device.
+    +	 */
+    +	__clear_bit(EV_REL, dev1->evbit);
+    +	__clear_bit(REL_X, dev1->relbit);
+    +	__clear_bit(REL_Y, dev1->relbit);
+    +
+    +	/*
+    +	 * Now set up our capabilities.
+    +	 */
+     	dev1->evbit[BIT_WORD(EV_KEY)] |= BIT_MASK(EV_KEY);
+     	dev1->keybit[BIT_WORD(BTN_TOUCH)] |= BIT_MASK(BTN_TOUCH);
+     	dev1->keybit[BIT_WORD(BTN_TOOL_FINGER)] |= BIT_MASK(BTN_TOOL_FINGER);
+
+so that HAL no longer adds:
+
+    input.mouse
+
+to an ALPS touchpad's:
+
+    info.capabilities
+
+so that HAL no longer marks the ALPS touchpad with:
+
+    input.x11_driver = 'evdev'
+
+because the policy file:
+
+    fdi/policy/10osvendor/10-x11-input.fdi
+
+doesn't define the policy for:
+
+    <match key="info.capabilities" contains="input.touchpad">
+
+which was previous unnecessary because everything used to
+be caught by the policy for:
+
+    <match key="info.capabilities" contains="input.mouse">
+
+Signed-off-by: Michael Witten <mfwitten@gmail.com>
+Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
+---
+diff --git a/fdi/policy/10osvendor/10-x11-input.fdi b/fdi/policy/10osvendor/10-x11-input.fdi
+index cff8fc5..8bbe263 100644
+--- a/fdi/policy/10osvendor/10-x11-input.fdi
++++ b/fdi/policy/10osvendor/10-x11-input.fdi
+@@ -16,6 +16,14 @@
+       </match>
+     </match>
+ 
++    <match key="info.capabilities" contains="input.touchpad">
++      <merge key="input.x11_driver" type="string">mouse</merge>
++      <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
++             string="Linux">
++        <merge key="input.x11_driver" type="string">evdev</merge>
++      </match>
++    </match>
++
+     <match key="info.capabilities" contains="input.tablet">
+       <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
+              string="Linux">
+--
+cgit v0.8.3-6-g21f6
diff --git a/abs/core-testing/hal/macbook-fix-ioperm.patch b/abs/core-testing/hal/macbook-fix-ioperm.patch
new file mode 100644
index 0000000..14d0b39
--- /dev/null
+++ b/abs/core-testing/hal/macbook-fix-ioperm.patch
@@ -0,0 +1,41 @@
+From 597c1ffffd61a15a334ce42f2a569c59f0270bcb Mon Sep 17 00:00:00 2001
+From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Date: Thu, 25 Feb 2010 10:25:18 +0000
+Subject: Fix incorrect arguments to ioperm() call
+
+The second argument of ioperm() is not the last port to be accessed
+but rather length of the port range [port, port + len).
+
+Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
+Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
+---
+diff --git a/hald/linux/addons/addon-imac-backlight.c b/hald/linux/addons/addon-imac-backlight.c
+index e869192..54e4ea3 100644
+--- a/hald/linux/addons/addon-imac-backlight.c
++++ b/hald/linux/addons/addon-imac-backlight.c
+@@ -158,7 +158,8 @@ main (int argc, char **argv)
+ 		goto out;
+ 	}
+ 
+-	if (ioperm(0xB2, 0xB3, 1) < 0)
++	/* Allow access to ports 0xB2 and 0xB3 */
++	if (ioperm(0xB2, 2, 1) < 0)
+ 	{
+ 		HAL_ERROR (("ioperm failed (you should be root)."));
+ 		exit(1);
+diff --git a/hald/linux/addons/addon-macbookpro-backlight.c b/hald/linux/addons/addon-macbookpro-backlight.c
+index 2a6fef6..c1bbbac 100644
+--- a/hald/linux/addons/addon-macbookpro-backlight.c
++++ b/hald/linux/addons/addon-macbookpro-backlight.c
+@@ -507,7 +507,8 @@ main (int argc, char *argv[])
+  	state = INREG(0x7ae4);
+  	OUTREG(0x7ae4, state);
+ 
+-	if (ioperm (0x300, 0x304, 1) < 0) {
++	/* Allow access to porta 0x300 through 0x304 */
++	if (ioperm (0x300, 5, 1) < 0) {
+ 		HAL_ERROR (("ioperm failed (you should be root)."));
+ 		exit(1);
+ 	}
+--
+cgit v0.8.3-6-g21f6
diff --git a/abs/core-testing/hal/path-max.patch b/abs/core-testing/hal/path-max.patch
new file mode 100644
index 0000000..304185d
--- /dev/null
+++ b/abs/core-testing/hal/path-max.patch
@@ -0,0 +1,31 @@
+From a2c3dd5a04d79265772c09c4280606d5c2ed72c6 Mon Sep 17 00:00:00 2001
+From: Martin Pitt <martin.pitt@ubuntu.com>
+Date: Mon, 04 Jan 2010 15:56:13 +0000
+Subject: Bump HAL_PATH_MAX to 4096
+
+Some bits in the code use realpath() with destination paths of size
+HAL_PATH_MAX. This potentially breaks on systems where PATH_MAX is bigger than
+HAL_PATH_MAX (which was 512 until now).
+
+Since we can't use PATH_MAX directly (due to platforms like GNU/Hurd, which
+apparently don't have it), just bump HAL_PATH_MAX to 4096 (as PATH_MAX is on
+Linux), to avoid potential buffer overflows and also fix hal on Linux when
+enabling FORTIFY in gcc.
+
+https://bugs.freedesktop.org/show_bug.cgi?id=25888
+---
+diff --git a/hald/util.h b/hald/util.h
+index c2a1584..7883333 100644
+--- a/hald/util.h
++++ b/hald/util.h
+@@ -38,7 +38,7 @@
+ #endif
+ 
+ #define HAL_NAME_MAX 256
+-#define HAL_PATH_MAX 512
++#define HAL_PATH_MAX 4096
+ 
+ gboolean hal_util_remove_trailing_slash (gchar *path);
+ 
+--
+cgit v0.8.3-6-g21f6
-- 
cgit v0.12

