aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsteev <steev@cypher.ubersekret.info>2009-02-05 14:23:38 -0600
committersteev <steev@cypher.ubersekret.info>2009-02-05 14:23:38 -0600
commit8a34b074db1e60dbdd46c64120ab01eb17252b90 (patch)
tree2911bab58cb712c73c9e79b671c427231517a5c2 /hal-0.5.11-patches
parentinitialize repository (diff)
downloadgentoo-hal-master.tar.gz
gentoo-hal-master.tar.bz2
gentoo-hal-master.zip
Add patches and examplesHEADmaster
Diffstat (limited to 'hal-0.5.11-patches')
-rw-r--r--hal-0.5.11-patches/0001-use-phy80211-instead-of-wiphy-symlink-to-detect.patch50
-rw-r--r--hal-0.5.11-patches/0002-use-wext-ioctl-instead-of-sysfs-to-detect-wireless.patch72
-rw-r--r--hal-0.5.11-patches/0003-don-t-leak-file-descriptor-on-umount.patch31
-rw-r--r--hal-0.5.11-patches/0004-include-config.h-before-any-other-headers.patch41
-rw-r--r--hal-0.5.11-patches/0005-fixed-memory-leaks-related-to-usage-of-g_strsplit.patch58
-rw-r--r--hal-0.5.11-patches/0006-add-zoom-and-ThinkPad-events-to-acpi-addon-for-IBM-L.patch42
-rw-r--r--hal-0.5.11-patches/0007-fixed-fdi.dtd-for-the-remove-rule.patch27
-rw-r--r--hal-0.5.11-patches/0008-add-libtool-2.2-support.patch27
-rw-r--r--hal-0.5.11-patches/0009-add-save-pci-support-to-hal-system-power-suspend-lin.patch25
-rw-r--r--hal-0.5.11-patches/0010-volume.num_blocks-can-become-larger-than-2G.patch34
-rw-r--r--hal-0.5.11-patches/0011-fix-PMU-battery-and-AC-handling-with-power_supply.patch66
-rw-r--r--hal-0.5.11-patches/0012-fixed-possible-memory-leak.patch28
-rw-r--r--hal-0.5.11-patches/0013-fixed-merge-for-uint64.patch28
-rw-r--r--hal-0.5.11-patches/0014-fixed-device-removage.patch32
-rw-r--r--hal-0.5.11-patches/0015-make-hal-start-a-lot-faster.patch57
-rw-r--r--hal-0.5.11-patches/0016-fixed-Lock-handling.patch129
-rw-r--r--hal-0.5.11-patches/0017-unify-directory-usage-under-var-run.patch28
-rw-r--r--hal-0.5.11-patches/0018-added-check-for-ConsoleKit-v0.3.1-to-configure.patch39
-rw-r--r--hal-0.5.11-patches/0019-adapt-new-CK-library-version-v0.3.1-to-HAL.patch79
-rw-r--r--hal-0.5.11-patches/0020-fix-DBus-introspection-for-org.freedesktop.Hal.Manag.patch50
-rw-r--r--hal-0.5.11-patches/0021-use-udevadm-instead-of-deprecated-udevinfo.patch43
-rw-r--r--hal-0.5.11-patches/0022-inserts-the-sysfs-path-at-the-right-position-for-cal.patch27
-rw-r--r--hal-0.5.11-patches/0023-hal-acl-tool-don-t-free-strings-that-are-not-suppos.patch36
-rw-r--r--hal-0.5.11-patches/0024-fix-issue-on-64bit-big-endian-architectures.patch41
-rw-r--r--hal-0.5.11-patches/0025-prevent-hal-from-automounting-Dell-recovery-partitio.patch31
-rw-r--r--hal-0.5.11-patches/0026-fix-some-configure-issues.patch68
-rw-r--r--hal-0.5.11-patches/0027-fix-Dell-bluetooth-killswitch.patch59
-rw-r--r--hal-0.5.11-patches/0028-remove-the-forced-removal-of-the-trailing-newline-to.patch58
-rw-r--r--hal-0.5.11-patches/0029-fix-building-on-Linux-2.6.28.patch27
-rw-r--r--hal-0.5.11-patches/0030-install-udev-rule-to-lib-udev-rules.d.patch24
-rw-r--r--hal-0.5.11-patches/0031-aallowllow-calling-KillSwitch-methods-in-D-Bus-confi.patch36
-rw-r--r--hal-0.5.11-patches/0032-put-policy-rules-in-alphabetical-order.patch50
-rw-r--r--hal-0.5.11-patches/0033-fix-policy-for-org.freedesktop.Hal.Device.KillSwitch.patch27
-rw-r--r--hal-0.5.11-patches/0034-add-DBus-policy-rule-for-org.freedesktop.Hal.Device.patch34
-rw-r--r--hal-0.5.11-patches/0035-add-DBus-policy-rule-for-org.freedesktop.Hal.Device.patch34
-rw-r--r--hal-0.5.11-patches/0036-add-DBus-policy-rule-for-org.freedesktop.Hal.Device.patch34
-rw-r--r--hal-0.5.11-patches/0037-add-D-Bus-policy-rule-for-org.freedesktop.Hal.Device.patch34
-rw-r--r--hal-0.5.11-patches/0038-add-D-Bus-policy-rule-for-org.freedesktop.Hal.Device.patch34
-rw-r--r--hal-0.5.11-patches/0039-add-org.freedesktop.Hal.Device.WakeOnLan-to-HAL-D-Bu.patch35
-rw-r--r--hal-0.5.11-patches/0040-add-org.freedesktop.Hal.Device.Storage-to-HAL-D-Bus.patch35
-rw-r--r--hal-0.5.11-patches/0041-add-org.freedesktop.Hal.Device.DockStation-to-HAL-D.patch35
-rw-r--r--hal-0.5.11-patches/0042-remove-all-receive_-lines-from-HAL-D-Bus-config.patch64
-rw-r--r--hal-0.5.11-patches/0043-fixed-HAL-D-Bus-config-added-send_destination-for-a.patch87
-rw-r--r--hal-0.5.11-patches/0044-check-udi-in-hal-get-property.patch47
-rw-r--r--hal-0.5.11-patches/0045-set-the-retval-of-hal-device-correctly-on-error.patch55
-rw-r--r--hal-0.5.11-patches/0046-add-exhebro-policies.patch84
-rw-r--r--hal-0.5.11-patches/0047-add-with-udev-scripts-dir.patch44
-rw-r--r--hal-0.5.11-patches/0048-use-evdev-for-touchpads-for-linux.patch33
48 files changed, 2159 insertions, 0 deletions
diff --git a/hal-0.5.11-patches/0001-use-phy80211-instead-of-wiphy-symlink-to-detect.patch b/hal-0.5.11-patches/0001-use-phy80211-instead-of-wiphy-symlink-to-detect.patch
new file mode 100644
index 00000000..7f52e4f3
--- /dev/null
+++ b/hal-0.5.11-patches/0001-use-phy80211-instead-of-wiphy-symlink-to-detect.patch
@@ -0,0 +1,50 @@
+From 8525124a99bccff0d6b54f5e681ae4b42da8d078 Mon Sep 17 00:00:00 2001
+From: Johannes Berg <johannes@sipsolutions.net>
+Date: Fri, 23 May 2008 17:29:47 +0200
+Subject: [PATCH 01/48] use 'phy80211' instead of 'wiphy' symlink to detect wireless
+
+When hal wants to determine whether a device is wireless or not,
+it looks up the 'wiphy' symlink that only existed in unreleased
+versions of cfg80211, mainline uses 'phy80211' now.
+---
+ hald/linux/device.c | 9 +++++----
+ 1 files changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/hald/linux/device.c b/hald/linux/device.c
+index e48548e..596e113 100644
+--- a/hald/linux/device.c
++++ b/hald/linux/device.c
+@@ -533,7 +533,7 @@ net_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *parent_de
+ const char *parent_subsys;
+ char bridge_path[HAL_PATH_MAX];
+ char wireless_path[HAL_PATH_MAX];
+- char wiphy_path[HAL_PATH_MAX];
++ char phy80211_path[HAL_PATH_MAX];
+ struct stat s;
+ dbus_uint64_t mac_address = 0;
+
+@@ -554,9 +554,10 @@ net_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *parent_de
+ }
+
+ snprintf (bridge_path, HAL_PATH_MAX, "%s/bridge", sysfs_path);
++ /* wireless extensions */
+ snprintf (wireless_path, HAL_PATH_MAX, "%s/wireless", sysfs_path);
+- /* wireless dscape stack e.g. from rt2500pci driver*/
+- snprintf (wiphy_path, HAL_PATH_MAX, "%s/wiphy", sysfs_path);
++ /* cfg80211 */
++ snprintf (phy80211_path, HAL_PATH_MAX, "%s/phy80211", sysfs_path);
+ parent_subsys = hal_device_property_get_string (parent_dev, "info.subsystem");
+
+ if (parent_subsys && strcmp(parent_subsys, "bluetooth") == 0) {
+@@ -565,7 +566,7 @@ net_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *parent_de
+ hal_device_add_capability (d, "net.bluetooth");
+ hal_device_property_set_uint64 (d, "net.bluetooth.mac_address", mac_address);
+ } else if ((stat (wireless_path, &s) == 0 && (s.st_mode & S_IFDIR)) ||
+- (stat (wiphy_path, &s) == 0 && (s.st_mode & S_IFDIR))) {
++ (stat (phy80211_path, &s) == 0 && (s.st_mode & S_IFDIR))) {
+ hal_device_property_set_string (d, "info.product", "WLAN Interface");
+ hal_device_property_set_string (d, "info.category", "net.80211");
+ hal_device_add_capability (d, "net.80211");
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0002-use-wext-ioctl-instead-of-sysfs-to-detect-wireless.patch b/hal-0.5.11-patches/0002-use-wext-ioctl-instead-of-sysfs-to-detect-wireless.patch
new file mode 100644
index 00000000..307139b6
--- /dev/null
+++ b/hal-0.5.11-patches/0002-use-wext-ioctl-instead-of-sysfs-to-detect-wireless.patch
@@ -0,0 +1,72 @@
+From 32b8adc895fa4cf76cb4fc4c4eed3f39aaa72654 Mon Sep 17 00:00:00 2001
+From: Johannes Berg <johannes@sipsolutions.net>
+Date: Fri, 23 May 2008 17:31:51 +0200
+Subject: [PATCH 02/48] use wext ioctl instead of sysfs to detect wireless
+
+The canonical way to check whether a network interface has wireless
+extensions is to try calling the SIOCGIWNAME ioctl on it.
+---
+ hald/linux/device.c | 16 ++++++++++++----
+ 1 files changed, 12 insertions(+), 4 deletions(-)
+
+diff --git a/hald/linux/device.c b/hald/linux/device.c
+index 596e113..cf884e1 100644
+--- a/hald/linux/device.c
++++ b/hald/linux/device.c
+@@ -45,6 +45,10 @@
+ #include <linux/input.h>
+ #endif
+
++/* for wireless extensions */
++#include <linux/if.h>
++#include <linux/wireless.h>
++
+ #include <dbus/dbus.h>
+ #include <dbus/dbus-glib.h>
+
+@@ -532,10 +536,14 @@ net_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *parent_de
+ const char *addr;
+ const char *parent_subsys;
+ char bridge_path[HAL_PATH_MAX];
+- char wireless_path[HAL_PATH_MAX];
+ char phy80211_path[HAL_PATH_MAX];
+ struct stat s;
+ dbus_uint64_t mac_address = 0;
++ int ioctl_fd;
++ struct iwreq iwr;
++
++ ioctl_fd = socket (PF_INET, SOCK_DGRAM, 0);
++ strncpy (iwr.ifr_ifrn.ifrn_name, ifname, IFNAMSIZ);
+
+ addr = hal_device_property_get_string (d, "net.address");
+ if (addr != NULL) {
+@@ -554,8 +562,6 @@ net_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *parent_de
+ }
+
+ snprintf (bridge_path, HAL_PATH_MAX, "%s/bridge", sysfs_path);
+- /* wireless extensions */
+- snprintf (wireless_path, HAL_PATH_MAX, "%s/wireless", sysfs_path);
+ /* cfg80211 */
+ snprintf (phy80211_path, HAL_PATH_MAX, "%s/phy80211", sysfs_path);
+ parent_subsys = hal_device_property_get_string (parent_dev, "info.subsystem");
+@@ -565,7 +571,7 @@ net_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *parent_de
+ hal_device_property_set_string (d, "info.category", "net.bluetooth");
+ hal_device_add_capability (d, "net.bluetooth");
+ hal_device_property_set_uint64 (d, "net.bluetooth.mac_address", mac_address);
+- } else if ((stat (wireless_path, &s) == 0 && (s.st_mode & S_IFDIR)) ||
++ } else if ((ioctl (ioctl_fd, SIOCGIWNAME, &iwr) == 0) ||
+ (stat (phy80211_path, &s) == 0 && (s.st_mode & S_IFDIR))) {
+ hal_device_property_set_string (d, "info.product", "WLAN Interface");
+ hal_device_property_set_string (d, "info.category", "net.80211");
+@@ -582,6 +588,8 @@ net_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *parent_de
+ hal_device_add_capability (d, "net.80203");
+ hal_device_property_set_uint64 (d, "net.80203.mac_address", mac_address);
+ }
++
++ close (ioctl_fd);
+ } else if (media_type == ARPHRD_IRDA) {
+ hal_device_property_set_string (d, "info.product", "Networking Interface");
+ hal_device_property_set_string (d, "info.category", "net.irda");
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0003-don-t-leak-file-descriptor-on-umount.patch b/hal-0.5.11-patches/0003-don-t-leak-file-descriptor-on-umount.patch
new file mode 100644
index 00000000..bc3ef1a2
--- /dev/null
+++ b/hal-0.5.11-patches/0003-don-t-leak-file-descriptor-on-umount.patch
@@ -0,0 +1,31 @@
+From 56f627caf0f8990faed67dcadbf6d8ef1ddd7e2d Mon Sep 17 00:00:00 2001
+From: Daniel Walsh <dwalsh@redhat.com>
+Date: Fri, 13 Jun 2008 08:14:39 +0100
+Subject: [PATCH 03/48] don't leak file descriptor on umount
+
+I think this is a leaked file descriptor from hal. Hal opens the lock
+file for write and then fails to call fcntl(fd,F_SETFD, FD_CLOSEXEC)
+
+When the confined mount program runs, the SELinux kernel notices the open file
+descriptor, checks the domain to see if it has access, then closes it with the
+error.
+---
+ tools/hal-storage-shared.c | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/tools/hal-storage-shared.c b/tools/hal-storage-shared.c
+index b10be10..422f00e 100644
+--- a/tools/hal-storage-shared.c
++++ b/tools/hal-storage-shared.c
+@@ -706,6 +706,8 @@ lock_hal_mtab (void)
+ if (lock_mtab_fd < 0)
+ return FALSE;
+
++ fcntl(lock_mtab_fd, F_SETFD, FD_CLOEXEC);
++
+ tryagain:
+ #if sun
+ if (lockf (lock_mtab_fd, F_LOCK, 0) != 0) {
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0004-include-config.h-before-any-other-headers.patch b/hal-0.5.11-patches/0004-include-config.h-before-any-other-headers.patch
new file mode 100644
index 00000000..337fe55c
--- /dev/null
+++ b/hal-0.5.11-patches/0004-include-config.h-before-any-other-headers.patch
@@ -0,0 +1,41 @@
+From b3dc9dac9328f05988a4c8ada886932e59d72e06 Mon Sep 17 00:00:00 2001
+From: Makoto Dei <makoto@turbolinux.co.jp>
+Date: Tue, 17 Jun 2008 19:41:07 +0200
+Subject: [PATCH 04/48] include config.h before any other headers
+
+Include config.h before any other headers in partutil.c otherwise,
+for example, _FILE_OFFSET_BITS defined in config.h does not affect
+these headers.
+---
+ partutil/partutil.c | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/partutil/partutil.c b/partutil/partutil.c
+index 9c2930f..42280af 100644
+--- a/partutil/partutil.c
++++ b/partutil/partutil.c
+@@ -21,6 +21,10 @@
+ *
+ **************************************************************************/
+
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
+ #include <string.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+@@ -39,10 +43,6 @@
+ #include "partutil.h"
+
+
+-#ifdef HAVE_CONFIG_H
+-# include <config.h>
+-#endif
+-
+
+ #ifdef USE_PARTED
+ #include <parted/parted.h>
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0005-fixed-memory-leaks-related-to-usage-of-g_strsplit.patch b/hal-0.5.11-patches/0005-fixed-memory-leaks-related-to-usage-of-g_strsplit.patch
new file mode 100644
index 00000000..ee7f8d99
--- /dev/null
+++ b/hal-0.5.11-patches/0005-fixed-memory-leaks-related-to-usage-of-g_strsplit.patch
@@ -0,0 +1,58 @@
+From 1302e611dcd0d081fe1adf92b162aed16561dc8d Mon Sep 17 00:00:00 2001
+From: Danny Kukawka <danny.kukawka@web.de>
+Date: Tue, 17 Jun 2008 19:54:50 +0200
+Subject: [PATCH 05/48] fixed memory leaks related to usage of g_strsplit
+
+Fixed two memory leaks related to usage of g_strsplit, free
+returned char** after usage with g_strfreev() as pointed out
+by Tomasz Ostrowski in fd.o #16376.
+---
+ hald/hald_dbus.c | 3 ++-
+ hald/linux/device.c | 3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/hald/hald_dbus.c b/hald/hald_dbus.c
+index 819ab9c..6889275 100644
+--- a/hald/hald_dbus.c
++++ b/hald/hald_dbus.c
+@@ -4679,7 +4679,7 @@ do_introspect (DBusConnection *connection,
+ const char *name;
+ const char *sig;
+ const char *argnames;
+- char **args;
++ gchar **args;
+ unsigned int n;
+ unsigned int m;
+
+@@ -4722,6 +4722,7 @@ do_introspect (DBusConnection *connection,
+ xml,
+ " </method>\n");
+
++ g_strfreev(args);
+ }
+
+
+diff --git a/hald/linux/device.c b/hald/linux/device.c
+index cf884e1..8bbe949 100644
+--- a/hald/linux/device.c
++++ b/hald/linux/device.c
+@@ -93,7 +93,7 @@ static int
+ input_str_to_bitmask (const char *s, long *bitmask, size_t max_size)
+ {
+ int i, j;
+- char **v;
++ gchar **v;
+ int num_bits_set = 0;
+
+ memset (bitmask, 0, max_size);
+@@ -109,6 +109,7 @@ input_str_to_bitmask (const char *s, long *bitmask, size_t max_size)
+ val &= (val - 1);
+ }
+ }
++ g_strfreev(v);
+
+ return num_bits_set;
+ }
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0006-add-zoom-and-ThinkPad-events-to-acpi-addon-for-IBM-L.patch b/hal-0.5.11-patches/0006-add-zoom-and-ThinkPad-events-to-acpi-addon-for-IBM-L.patch
new file mode 100644
index 00000000..7d8d778e
--- /dev/null
+++ b/hal-0.5.11-patches/0006-add-zoom-and-ThinkPad-events-to-acpi-addon-for-IBM-L.patch
@@ -0,0 +1,42 @@
+From 825b88b6a64bdbd995a1e37b27be413ec1717648 Mon Sep 17 00:00:00 2001
+From: Paul Bolle <pebolle@tiscali.nl>
+Date: Tue, 17 Jun 2008 20:03:44 +0200
+Subject: [PATCH 06/48] add zoom and ThinkPad events to acpi addon for IBM/Lenovo
+
+Add "zoom" ("Fn+Space") and "ThinkPad" (a.k.a. "Access IBM" and
+"ThinkVantage") button events to the acpi addon for IBM/LENOVO ThinkPads.
+As of kernel 2.6.25 there are acpi events generated for these buttons too.
+
+Fixed a trivial typo too ("Fn=Insert").
+
+(Note: fix/close bug fd.o #16335)
+---
+ hald/linux/addons/addon-acpi.c | 8 +++++++-
+ 1 files changed, 7 insertions(+), 1 deletions(-)
+
+diff --git a/hald/linux/addons/addon-acpi.c b/hald/linux/addons/addon-acpi.c
+index ea4ad30..fb4847d 100644
+--- a/hald/linux/addons/addon-acpi.c
++++ b/hald/linux/addons/addon-acpi.c
+@@ -143,11 +143,17 @@ handle_ibm_acpi_events (LibHalContext *ctx, int type, int event)
+ button = "Fn+Backspace";
+ break;
+ case 4110: /* Fn+Insert*/
+- button = "Fn=Insert";
++ button = "Fn+Insert";
+ break;
+ case 4111: /* Fn+Delete*/
+ button = "Fn+Delete";
+ break;
++ case 4116: /* Fn+Space */
++ button = "zoom";
++ break;
++ case 4120: /* ThinkPad */
++ button = "ThinkPad";
++ break;
+ case 20489: /* Tablet rotated */
+ button = "tabletpc_rotate_180";
+ break;
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0007-fixed-fdi.dtd-for-the-remove-rule.patch b/hal-0.5.11-patches/0007-fixed-fdi.dtd-for-the-remove-rule.patch
new file mode 100644
index 00000000..388e2e70
--- /dev/null
+++ b/hal-0.5.11-patches/0007-fixed-fdi.dtd-for-the-remove-rule.patch
@@ -0,0 +1,27 @@
+From 4ee180ce6d5e14fe3a514120d51c32a2a022e9ef Mon Sep 17 00:00:00 2001
+From: Danny Kukawka <danny.kukawka@web.de>
+Date: Tue, 17 Jun 2008 23:11:22 +0200
+Subject: [PATCH 07/48] fixed fdi.dtd for the remove rule
+
+Fixed fdi.dtd for the remove rule, type= is only needed for
+strlist keys. Set the check to #IMPLIED instead of #REQUIRED.
+---
+ fdi/fdi.dtd | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/fdi/fdi.dtd b/fdi/fdi.dtd
+index 3658ea9..7682805 100644
+--- a/fdi/fdi.dtd
++++ b/fdi/fdi.dtd
+@@ -65,7 +65,7 @@
+ <!ELEMENT remove (#PCDATA) >
+ <!ATTLIST remove
+ key CDATA #REQUIRED
+- type (strlist) #REQUIRED
++ type (strlist) #IMPLIED
+ >
+
+ <!ELEMENT spawn (#PCDATA) >
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0008-add-libtool-2.2-support.patch b/hal-0.5.11-patches/0008-add-libtool-2.2-support.patch
new file mode 100644
index 00000000..170ebe96
--- /dev/null
+++ b/hal-0.5.11-patches/0008-add-libtool-2.2-support.patch
@@ -0,0 +1,27 @@
+From 7fd4ac6c0d5d57539488b84886ce1a02a54a98d3 Mon Sep 17 00:00:00 2001
+From: =?utf-8?q?R=C3=A9mi=20Cardona?= <remi@gentoo.org>
+Date: Sat, 9 Aug 2008 17:04:07 +0200
+Subject: [PATCH 08/48] add libtool-2.2 support
+
+Fix for aclocal to work properly with libtool 2.2 which no longer
+checks for C++ automatically (this patch is of course backwards
+compatible with libtool 1.5.x)
+---
+ configure.in | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index e76ff51..faa910b 100644
+--- a/configure.in
++++ b/configure.in
+@@ -29,6 +29,7 @@ AC_SUBST(LT_AGE)
+
+ AC_ISC_POSIX
+ AC_PROG_CC
++AC_PROG_CXX
+ AM_PROG_CC_C_O
+ AC_HEADER_STDC
+ AC_PROG_LIBTOOL
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0009-add-save-pci-support-to-hal-system-power-suspend-lin.patch b/hal-0.5.11-patches/0009-add-save-pci-support-to-hal-system-power-suspend-lin.patch
new file mode 100644
index 00000000..5d98b43a
--- /dev/null
+++ b/hal-0.5.11-patches/0009-add-save-pci-support-to-hal-system-power-suspend-lin.patch
@@ -0,0 +1,25 @@
+From 44cf93aea23c9697ecdef30aa618499a62f70ce2 Mon Sep 17 00:00:00 2001
+From: Philipp Ittershagen <philipp@gate-nine.de>
+Date: Sun, 10 Aug 2008 10:11:36 +0200
+Subject: [PATCH 09/48] add save-pci support to hal-system-power-suspend-linux
+
+Add --quirk-save-pci support to hal-system-power-suspend-linux.
+---
+ tools/linux/hal-system-power-suspend-linux | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/tools/linux/hal-system-power-suspend-linux b/tools/linux/hal-system-power-suspend-linux
+index 157201f..76c5800 100755
+--- a/tools/linux/hal-system-power-suspend-linux
++++ b/tools/linux/hal-system-power-suspend-linux
+@@ -28,6 +28,7 @@ QUIRKS=""
+ [ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VBE_POST" = "true" ] && QUIRKS="$QUIRKS --quirk-vbe-post"
+ [ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_RADEON_OFF" = "true" ] && QUIRKS="$QUIRKS --quirk-radeon-off"
+ [ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_RESET_BRIGHTNESS" = "true" ] && QUIRKS="$QUIRKS --quirk-reset-brightness"
++[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_SAVE_PCI" = "true" ] && QUIRKS="$QUIRKS --quirk-save-pci"
+ [ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_NONE" = "true" ] && QUIRKS="$QUIRKS --quirk-none"
+
+ # Urh. Do any BIOSen handle this correctly?
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0010-volume.num_blocks-can-become-larger-than-2G.patch b/hal-0.5.11-patches/0010-volume.num_blocks-can-become-larger-than-2G.patch
new file mode 100644
index 00000000..76b1d3a1
--- /dev/null
+++ b/hal-0.5.11-patches/0010-volume.num_blocks-can-become-larger-than-2G.patch
@@ -0,0 +1,34 @@
+From 7230a63d5564e78ee61000cf5fc816d21d454a94 Mon Sep 17 00:00:00 2001
+From: Martin Pitt <martin.pitt@ubuntu.com>
+Date: Sun, 10 Aug 2008 15:52:36 +0200
+Subject: [PATCH 10/48] volume.num_blocks can become larger than 2G
+
+Fix mounting of devices with a very large number of reported blocks by
+making it a 64 bit property. (https://launchpad.net/bugs/209483)
+---
+ hald/linux/blockdev.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/hald/linux/blockdev.c b/hald/linux/blockdev.c
+index 6042558..d88a815 100644
+--- a/hald/linux/blockdev.c
++++ b/hald/linux/blockdev.c
+@@ -1436,13 +1436,13 @@ hotplug_event_begin_add_blockdev (const gchar *sysfs_path, const gchar *device_f
+ * (block size requires opening the device file)
+ */
+ hal_device_property_set_int (d, "volume.block_size", 512);
+- if (!hal_util_set_int_from_file (d, "volume.num_blocks", sysfs_path_real, "size", 0)) {
++ if (!hal_util_set_uint64_from_file (d, "volume.num_blocks", sysfs_path_real, "size", 0)) {
+ HAL_INFO (("Ignoring hotplug event - cannot read 'size'"));
+ goto error;
+ }
+ hal_device_property_set_uint64 (
+ d, "volume.size",
+- ((dbus_uint64_t)(512)) * ((dbus_uint64_t)(hal_device_property_get_int (d, "volume.num_blocks"))));
++ ((dbus_uint64_t)(512)) * ((dbus_uint64_t)(hal_device_property_get_uint64 (d, "volume.num_blocks"))));
+ /* TODO: move to prober? */
+ if (is_physical_partition) {
+ guint64 start_block;
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0011-fix-PMU-battery-and-AC-handling-with-power_supply.patch b/hal-0.5.11-patches/0011-fix-PMU-battery-and-AC-handling-with-power_supply.patch
new file mode 100644
index 00000000..70e77677
--- /dev/null
+++ b/hal-0.5.11-patches/0011-fix-PMU-battery-and-AC-handling-with-power_supply.patch
@@ -0,0 +1,66 @@
+From 6c4bc8a7d166b952143fd1817b58baf5cc792536 Mon Sep 17 00:00:00 2001
+From: Danny Kukawka <danny.kukawka@web.de>
+Date: Mon, 11 Aug 2008 11:39:18 +0200
+Subject: [PATCH 11/48] fix PMU battery and AC handling with power_supply
+
+Fixed PMU battery and AC handling if they are exposed via the
+power_supply interface. This prevents double the battery and AC
+devices by handling the proc and sysfs interfaces.
+
+Should fix fd.o bug #15482.
+---
+ hald/linux/pmu.c | 21 ++++++++++++++-------
+ 1 files changed, 14 insertions(+), 7 deletions(-)
+
+diff --git a/hald/linux/pmu.c b/hald/linux/pmu.c
+index 71f94cf..6870d50 100644
+--- a/hald/linux/pmu.c
++++ b/hald/linux/pmu.c
+@@ -39,6 +39,7 @@
+
+ #include "hotplug.h"
+ #include "osspec_linux.h"
++#include "device.h"
+
+ #include "pmu.h"
+
+@@ -357,16 +358,18 @@ pmu_synthesize_hotplug_events (void)
+ pmu_synthesize_item ("/proc/pmu/info", PMU_TYPE_LAPTOP_PANEL);
+ }
+
+- /* setup timer for things that we need to poll */
++ if (!_have_sysfs_power_supply) {
++ /* setup timer for things that we need to poll */
+ #ifdef HAVE_GLIB_2_14
+- g_timeout_add_seconds (PMU_POLL_INTERVAL,
+- pmu_poll,
+- NULL);
++ g_timeout_add_seconds (PMU_POLL_INTERVAL,
++ pmu_poll,
++ NULL);
+ #else
+- g_timeout_add (1000 * PMU_POLL_INTERVAL,
+- pmu_poll,
+- NULL);
++ g_timeout_add (1000 * PMU_POLL_INTERVAL,
++ pmu_poll,
++ NULL);
+ #endif
++ }
+
+ out:
+ return ret;
+@@ -376,6 +379,10 @@ static HalDevice *
+ pmu_generic_add (const gchar *pmu_path, HalDevice *parent, PMUDevHandler *handler)
+ {
+ HalDevice *d;
++
++ if (((handler->pmu_type == PMU_TYPE_BATTERY) || (handler->pmu_type == PMU_TYPE_AC_ADAPTER)) && _have_sysfs_power_supply)
++ return NULL;
++
+ d = hal_device_new ();
+ hal_device_property_set_string (d, "linux.pmu_path", pmu_path);
+ hal_device_property_set_int (d, "linux.pmu_type", handler->pmu_type);
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0012-fixed-possible-memory-leak.patch b/hal-0.5.11-patches/0012-fixed-possible-memory-leak.patch
new file mode 100644
index 00000000..f98e028b
--- /dev/null
+++ b/hal-0.5.11-patches/0012-fixed-possible-memory-leak.patch
@@ -0,0 +1,28 @@
+From 76b577e4a727f19926bad156a99628bc160e85a0 Mon Sep 17 00:00:00 2001
+From: Danny Kukawka <danny.kukawka@web.de>
+Date: Mon, 11 Aug 2008 12:08:09 +0200
+Subject: [PATCH 12/48] fixed possible memory leak
+
+Fixed possible memory leak due to usage of g_strsplit().
+---
+ hald/linux/acpi.c | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+diff --git a/hald/linux/acpi.c b/hald/linux/acpi.c
+index a7892ea..6f76af6 100644
+--- a/hald/linux/acpi.c
++++ b/hald/linux/acpi.c
+@@ -530,6 +530,10 @@ get_processor_model_name (gint proc_num)
+ }
+ }
+ }
++
++ if (lines) {
++ g_strfreev (lines);
++ }
+ }
+ else {
+ HAL_ERROR (("Couldn't open /proc/cpuinfo: %s", error->message));
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0013-fixed-merge-for-uint64.patch b/hal-0.5.11-patches/0013-fixed-merge-for-uint64.patch
new file mode 100644
index 00000000..ec0caaeb
--- /dev/null
+++ b/hal-0.5.11-patches/0013-fixed-merge-for-uint64.patch
@@ -0,0 +1,28 @@
+From 67cdc16dd9a3344c7445b4a16df1294fa578b0fc Mon Sep 17 00:00:00 2001
+From: Danny Kukawka <danny.kukawka@web.de>
+Date: Mon, 11 Aug 2008 16:00:55 +0200
+Subject: [PATCH 13/48] fixed merge for uint64
+
+Fixed typo to get merge working again with type=uint64.
+
+Should fix fd.o bug #16575.
+---
+ hald/create_cache.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/hald/create_cache.c b/hald/create_cache.c
+index cdc8c9a..d52f834 100644
+--- a/hald/create_cache.c
++++ b/hald/create_cache.c
+@@ -159,7 +159,7 @@ get_merge_type (const char *str)
+ return MERGE_BOOLEAN;
+ if (strcmp (str, "int") == 0)
+ return MERGE_INT32;
+- if (strcmp (str, "unint64") == 0)
++ if (strcmp (str, "uint64") == 0)
+ return MERGE_UINT64;
+ if (strcmp (str, "double") == 0)
+ return MERGE_DOUBLE;
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0014-fixed-device-removage.patch b/hal-0.5.11-patches/0014-fixed-device-removage.patch
new file mode 100644
index 00000000..5cec3740
--- /dev/null
+++ b/hal-0.5.11-patches/0014-fixed-device-removage.patch
@@ -0,0 +1,32 @@
+From c211f841d9b1d377256b5f8338910aa30e3ffa58 Mon Sep 17 00:00:00 2001
+From: Danny Kukawka <danny.kukawka@web.de>
+Date: Mon, 11 Aug 2008 16:12:45 +0200
+Subject: [PATCH 14/48] fixed device removage
+
+Fixed device removage. Remove childs maually only if they have no
+sysfs_path which means they are spawned normaly.
+---
+ hald/linux/device.c | 7 +++++--
+ 1 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/hald/linux/device.c b/hald/linux/device.c
+index 8bbe949..20cbb06 100644
+--- a/hald/linux/device.c
++++ b/hald/linux/device.c
+@@ -4505,8 +4505,11 @@ hotplug_event_begin_remove_dev (const gchar *subsystem, const gchar *sysfs_path,
+
+ for (tmp = children; tmp != NULL; tmp = g_slist_next (tmp)) {
+ child = HAL_DEVICE (tmp->data);
+- HAL_INFO(("Remove now: %s as child of: %s", hal_device_get_udi(child), hal_device_get_udi(d)));
+- hal_util_callout_device_remove (child, dev_callouts_remove_child_done, NULL, NULL);
++ /* find childs without sysfs path as e.g. spawned devices*/
++ if (hal_device_property_get_string(child, "linux.sysfs_path") == NULL) {
++ HAL_INFO(("Remove now: %s as child of: %s", hal_device_get_udi(child), hal_device_get_udi(d)));
++ hal_util_callout_device_remove (child, dev_callouts_remove_child_done, NULL, NULL);
++ }
+ }
+ g_slist_free (children);
+
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0015-make-hal-start-a-lot-faster.patch b/hal-0.5.11-patches/0015-make-hal-start-a-lot-faster.patch
new file mode 100644
index 00000000..79a79329
--- /dev/null
+++ b/hal-0.5.11-patches/0015-make-hal-start-a-lot-faster.patch
@@ -0,0 +1,57 @@
+From df0551bd5925329b37b0f7d50bcf6e01028014cb Mon Sep 17 00:00:00 2001
+From: Arjan van de Ven <arjan@infradead.org>
+Date: Wed, 20 Aug 2008 20:03:56 +0200
+Subject: [PATCH 15/48] make hal start a lot faster
+
+Hal is a significant part of the boot time of (optimized) systems,
+so optimizing hal to start faster is certainly worthwhile.
+
+The patch below cuts the start time of hal by about one third,
+by reducing the number of calls to hal_device_get_udi() from
+well over 700.000 to below 100.000.
+---
+ hald/device_info.c | 19 ++++++++++++-------
+ 1 files changed, 12 insertions(+), 7 deletions(-)
+
+diff --git a/hald/device_info.c b/hald/device_info.c
+index 2381612..e378a2e 100644
+--- a/hald/device_info.c
++++ b/hald/device_info.c
+@@ -273,22 +273,27 @@ handle_match (struct rule *rule, HalDevice *d)
+ char prop_to_check[HAL_PATH_MAX];
+ const char *key = rule->key;
+ const char *value = (char *)RULES_PTR(rule->value_offset);
++ const char *d_udi;
++
++ d_udi = hal_device_get_udi (d);
+
+ /* Resolve key paths like 'someudi/foo/bar/baz:prop.name' '@prop.here.is.an.udi:with.prop.name' */
+ if (!resolve_udiprop_path (key,
+- hal_device_get_udi (d),
++ d_udi,
+ udi_to_check, sizeof (udi_to_check),
+ prop_to_check, sizeof (prop_to_check))) {
+ /*HAL_ERROR (("Could not resolve keypath '%s' on udi '%s'", key, value));*/
+ return FALSE;
+ }
+
+- d = hal_device_store_find (hald_get_gdl (), udi_to_check);
+- if (d == NULL)
+- d = hal_device_store_find (hald_get_tdl (), udi_to_check);
+- if (d == NULL) {
+- HAL_ERROR (("Could not find device with udi '%s'", udi_to_check));
+- return FALSE;
++ if (strcmp(udi_to_check, d_udi)) {
++ d = hal_device_store_find (hald_get_gdl (), udi_to_check);
++ if (d == NULL)
++ d = hal_device_store_find (hald_get_tdl (), udi_to_check);
++ if (d == NULL) {
++ HAL_ERROR (("Could not find device with udi '%s'", udi_to_check));
++ return FALSE;
++ }
+ }
+
+ switch (rule->type_match) {
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0016-fixed-Lock-handling.patch b/hal-0.5.11-patches/0016-fixed-Lock-handling.patch
new file mode 100644
index 00000000..6fdd6faf
--- /dev/null
+++ b/hal-0.5.11-patches/0016-fixed-Lock-handling.patch
@@ -0,0 +1,129 @@
+From 0c584a62e3393b0a92c297b422c819b2d7ccde17 Mon Sep 17 00:00:00 2001
+From: Danny Kukawka <danny.kukawka@web.de>
+Date: Mon, 25 Aug 2008 12:54:08 +0200
+Subject: [PATCH 16/48] fixed Lock() handling
+
+Fixed Lock() handling.
+
+The current code store the lock information for a lock owner into a
+hash-table with these info: key=service_name of the lock owner and
+as value the device which was locked. Unfortunately this don't work
+if a service request more than one lock, because the old one get
+overwritten in the hash table. Use instead of the device a GSList
+with devices. This should solve
+
+If the lock owner dies, remove the locks of the old_service_name and
+not of the new_service_name (otherwise the locks get never released).
+---
+ hald/hald_dbus.c | 67 +++++++++++++++++++++++++++++++++++++++++-------------
+ 1 files changed, 51 insertions(+), 16 deletions(-)
+
+diff --git a/hald/hald_dbus.c b/hald/hald_dbus.c
+index 6889275..51dd7ae 100644
+--- a/hald/hald_dbus.c
++++ b/hald/hald_dbus.c
+@@ -2580,6 +2580,51 @@ device_release_global_interface_lock (DBusConnection *connection, DBusMessage *m
+
+ static GHashTable *services_with_locks = NULL;
+
++static void
++services_with_locks_add_lock (const char* lock_owner, HalDevice *device) {
++
++ GSList *devices;
++
++ devices = g_hash_table_lookup (services_with_locks, lock_owner);
++
++ devices = g_slist_prepend (devices, device);
++
++ g_hash_table_insert (services_with_locks, strdup(lock_owner), devices);
++}
++
++static void
++services_with_locks_remove_lock (const char* lock_owner, HalDevice *device) {
++
++ GSList *devices;
++
++ devices = g_hash_table_lookup (services_with_locks, lock_owner);
++
++ devices = g_slist_remove (devices, device);
++
++ g_hash_table_insert (services_with_locks, strdup(lock_owner), devices);
++}
++
++static void
++services_with_locks_remove_lockowner (const char* lock_owner) {
++
++ GSList *devices;
++
++ devices = g_hash_table_lookup (services_with_locks, lock_owner);
++
++ if (devices != NULL) {
++ GSList *iter;
++
++ for (iter = devices; iter != NULL; iter = iter->next) {
++ HalDevice *d = iter->data;
++ hal_device_property_remove (d, "info.locked");
++ hal_device_property_remove (d, "info.locked.reason");
++ hal_device_property_remove (d, "info.locked.dbus_name");
++ }
++ }
++ g_hash_table_remove (services_with_locks, lock_owner);
++}
++
++
+ /**
+ * device_lock:
+ * @connection: D-BUS connection
+@@ -2655,8 +2700,7 @@ device_lock (DBusConnection * connection,
+ g_object_unref);
+ }
+
+- g_hash_table_insert (services_with_locks, g_strdup (sender),
+- g_object_ref (d));
++ services_with_locks_add_lock (sender, d);
+
+ if (!dbus_connection_send (connection, reply, NULL))
+ DIE (("No memory"));
+@@ -2741,9 +2785,9 @@ device_unlock (DBusConnection *connection,
+ return DBUS_HANDLER_RESULT_HANDLED;
+ }
+
+- if (g_hash_table_lookup (services_with_locks, sender))
+- g_hash_table_remove (services_with_locks, sender);
+- else {
++ if (g_hash_table_lookup (services_with_locks, sender)) {
++ services_with_locks_remove_lock (sender, d);
++ } else {
+ HAL_WARNING (("Service '%s' was not in the list of services "
+ "with locks!", sender));
+ }
+@@ -5181,7 +5225,6 @@ hald_dbus_filter_function (DBusConnection * connection,
+ char *name;
+ char *old_service_name;
+ char *new_service_name;
+- HalDevice *d;
+
+ if (!dbus_message_get_args (message, NULL,
+ DBUS_TYPE_STRING, &name,
+@@ -5196,16 +5239,8 @@ hald_dbus_filter_function (DBusConnection * connection,
+
+ ci_tracker_name_owner_changed (ci_tracker, name, old_service_name, new_service_name);
+
+- if (services_with_locks != NULL) {
+- d = g_hash_table_lookup (services_with_locks, new_service_name);
+- if (d != NULL) {
+- hal_device_property_remove (d, "info.locked");
+- hal_device_property_remove (d, "info.locked.reason");
+- hal_device_property_remove (d, "info.locked.dbus_name");
+-
+- g_hash_table_remove (services_with_locks, new_service_name);
+- }
+- }
++ if (services_with_locks != NULL)
++ services_with_locks_remove_lockowner(old_service_name);
+
+ if (strlen (old_service_name) > 0)
+ hal_device_client_disconnected (old_service_name);
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0017-unify-directory-usage-under-var-run.patch b/hal-0.5.11-patches/0017-unify-directory-usage-under-var-run.patch
new file mode 100644
index 00000000..c4195592
--- /dev/null
+++ b/hal-0.5.11-patches/0017-unify-directory-usage-under-var-run.patch
@@ -0,0 +1,28 @@
+From a5904fbd9223009752d0c5ed49aae1d9a0b16be7 Mon Sep 17 00:00:00 2001
+From: Danny Kukawka <danny.kukawka@web.de>
+Date: Mon, 25 Aug 2008 12:56:39 +0200
+Subject: [PATCH 17/48] unify directory usage under /var/run
+
+Unified directory usage under /var/run. Use now always /var/run/hald
+and no longer /var/run/hal (there was only one place in the code
+where this path was used).
+---
+ hald/linux/hotplug_helper.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/hald/linux/hotplug_helper.h b/hald/linux/hotplug_helper.h
+index f92a4fe..65898f3 100644
+--- a/hald/linux/hotplug_helper.h
++++ b/hald/linux/hotplug_helper.h
+@@ -27,7 +27,7 @@
+ #define HALD_HELPER_H
+
+ #define HALD_HELPER_MAGIC 0x68616c64
+-#define HALD_HELPER_SOCKET_PATH "/var/run/hal/hotplug_socket2"
++#define HALD_HELPER_SOCKET_PATH "/var/run/hald/hotplug_socket2"
+ #define HALD_HELPER_STRLEN 256
+
+ struct hald_helper_msg
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0018-added-check-for-ConsoleKit-v0.3.1-to-configure.patch b/hal-0.5.11-patches/0018-added-check-for-ConsoleKit-v0.3.1-to-configure.patch
new file mode 100644
index 00000000..a79543b3
--- /dev/null
+++ b/hal-0.5.11-patches/0018-added-check-for-ConsoleKit-v0.3.1-to-configure.patch
@@ -0,0 +1,39 @@
+From 34b08efe694cd7c4125dc0254df89dd7ac3c5e77 Mon Sep 17 00:00:00 2001
+From: Danny Kukawka <danny.kukawka@web.de>
+Date: Mon, 25 Aug 2008 12:58:43 +0200
+Subject: [PATCH 18/48] added check for ConsoleKit >= v0.3.1 to configure
+
+Added check for ConsoleKit >= v0.3.1 to configure to be able
+to differ between the versions due to API breakage.
+---
+ configure.in | 14 ++++++++++++++
+ 1 files changed, 14 insertions(+), 0 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index faa910b..112fc33 100644
+--- a/configure.in
++++ b/configure.in
+@@ -486,6 +486,20 @@ if test "x$enable_console_kit" != "xno"; then
+ AM_CONDITIONAL(HAVE_CONKIT, true)
+ AC_DEFINE(HAVE_CONKIT, [], [Set if we use ConsoleKit])
+ msg_conkit=yes
++ # yes this is ugly, but there is no other way to get the version of CK
++ AC_MSG_CHECKING([if ConsoleKit version 0.3.0 or newer])
++ if $PKG_CONFIG --atleast-version=0.3.0 ck-connector; then
++ AC_MSG_RESULT([yes])
++ AC_DEFINE(HAVE_CK_0_3, 1, [Define to 1 if ConsoleKit is v0.3.0 or newer])
++ else
++ if $PKG_CONFIG --max-version=0.2.10 ck-connector; then
++ AC_MSG_RESULT([no])
++ else
++ #assume we have the latest version
++ AC_MSG_WARN([Couldn't detect ConsoleKit version, install the devel package, assume for now you use >= 0.3.0])
++ AC_DEFINE(HAVE_CK_0_3, 1, [Define to 1 if ConsoleKit is v0.3.0 or newer])
++ fi
++ fi
+ fi
+
+ AC_PATH_PROG(GPERF, [gperf], [no])
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0019-adapt-new-CK-library-version-v0.3.1-to-HAL.patch b/hal-0.5.11-patches/0019-adapt-new-CK-library-version-v0.3.1-to-HAL.patch
new file mode 100644
index 00000000..3e74e418
--- /dev/null
+++ b/hal-0.5.11-patches/0019-adapt-new-CK-library-version-v0.3.1-to-HAL.patch
@@ -0,0 +1,79 @@
+From 21b640b8182d9532d1a33d4a093395320085378f Mon Sep 17 00:00:00 2001
+From: Frederic Crozat <fcrozat@mandriva.com>
+Date: Mon, 25 Aug 2008 13:02:19 +0200
+Subject: [PATCH 19/48] adapt new CK library version (>= v0.3.1) to HAL
+
+Adapted new CK library version (>= v0.3.1) to HAL. Adopted
+patch from Ben Gamari <bgamari@gmail.com> to work with old
+and new ConsoleKit versions.
+---
+ hald/ck-tracker.c | 20 ++++++++++++++++++++
+ 1 files changed, 20 insertions(+), 0 deletions(-)
+
+diff --git a/hald/ck-tracker.c b/hald/ck-tracker.c
+index 34aa640..eb76dbb 100644
+--- a/hald/ck-tracker.c
++++ b/hald/ck-tracker.c
+@@ -256,7 +256,11 @@ ck_session_get_info (CKTracker *tracker, CKSession *session)
+ goto error;
+ }
+ if (!dbus_message_get_args (reply, NULL,
++#ifdef HAVE_CK_0_3
++ DBUS_TYPE_UINT32, &(session->user),
++#else
+ DBUS_TYPE_INT32, &(session->user),
++#endif
+ DBUS_TYPE_INVALID)) {
+ HAL_ERROR (("Invalid GetUnixUser reply from CK"));
+ goto error;
+@@ -531,7 +535,11 @@ ck_tracker_process_system_bus_message (CKTracker *tracker, DBusMessage *message)
+ seat_objpath = dbus_message_get_path (message);
+
+ if (!dbus_message_get_args (message, NULL,
++#ifdef HAVE_CK_0_3
++ DBUS_TYPE_OBJECT_PATH, &seat_objpath,
++#else
+ DBUS_TYPE_STRING, &seat_objpath,
++#endif
+ DBUS_TYPE_INVALID)) {
+ HAL_ERROR (("Invalid SeatAdded signal from CK"));
+ goto out;
+@@ -558,7 +566,11 @@ ck_tracker_process_system_bus_message (CKTracker *tracker, DBusMessage *message)
+ seat_objpath = dbus_message_get_path (message);
+
+ if (!dbus_message_get_args (message, NULL,
++#ifdef HAVE_CK_0_3
++ DBUS_TYPE_OBJECT_PATH, &seat_objpath,
++#else
+ DBUS_TYPE_STRING, &seat_objpath,
++#endif
+ DBUS_TYPE_INVALID)) {
+ HAL_ERROR (("Invalid SeatRemoved signal from CK"));
+ goto out;
+@@ -588,7 +600,11 @@ ck_tracker_process_system_bus_message (CKTracker *tracker, DBusMessage *message)
+ seat_objpath = dbus_message_get_path (message);
+
+ if (!dbus_message_get_args (message, NULL,
++#ifdef HAVE_CK_0_3
++ DBUS_TYPE_OBJECT_PATH, &session_objpath,
++#else
+ DBUS_TYPE_STRING, &session_objpath,
++#endif
+ DBUS_TYPE_INVALID)) {
+ HAL_ERROR (("Invalid SessionAdded signal from CK"));
+ goto out;
+@@ -624,7 +640,11 @@ ck_tracker_process_system_bus_message (CKTracker *tracker, DBusMessage *message)
+ seat_objpath = dbus_message_get_path (message);
+
+ if (!dbus_message_get_args (message, NULL,
++#ifdef HAVE_CK_0_3
++ DBUS_TYPE_OBJECT_PATH, &session_objpath,
++#else
+ DBUS_TYPE_STRING, &session_objpath,
++#endif
+ DBUS_TYPE_INVALID)) {
+ HAL_ERROR (("Invalid SessionRemoved signal from CK"));
+ goto out;
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0020-fix-DBus-introspection-for-org.freedesktop.Hal.Manag.patch b/hal-0.5.11-patches/0020-fix-DBus-introspection-for-org.freedesktop.Hal.Manag.patch
new file mode 100644
index 00000000..48d21129
--- /dev/null
+++ b/hal-0.5.11-patches/0020-fix-DBus-introspection-for-org.freedesktop.Hal.Manag.patch
@@ -0,0 +1,50 @@
+From 443b7649d5a1daec09f1ed34907fa81fe0000459 Mon Sep 17 00:00:00 2001
+From: Danny Kukawka <danny.kukawka@web.de>
+Date: Mon, 25 Aug 2008 21:02:07 +0200
+Subject: [PATCH 20/48] fix DBus introspection for org.freedesktop.Hal.Manager
+
+Fixed DBus introspection for org.freedesktop.Hal.Manager.
+Some methodes used as argument type object path (ao/oa/o) but
+the code used DBUS_TYPE_STRING_AS_STRING or DBUS_TYPE_STRING.
+
+Changed the introspection code to use string as type to prevent
+API breakages, since everyone use currently what the code says.
+---
+ hald/hald_dbus.c | 10 +++++-----
+ 1 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/hald/hald_dbus.c b/hald/hald_dbus.c
+index 51dd7ae..697fb75 100644
+--- a/hald/hald_dbus.c
++++ b/hald/hald_dbus.c
+@@ -4445,22 +4445,22 @@ do_introspect (DBusConnection *connection,
+ xml = g_string_append (xml,
+ " <interface name=\"org.freedesktop.Hal.Manager\">\n"
+ " <method name=\"GetAllDevices\">\n"
+- " <arg name=\"devices\" direction=\"out\" type=\"ao\"/>\n"
++ " <arg name=\"devices\" direction=\"out\" type=\"as\"/>\n"
+ " </method>\n"
+ " <method name=\"GetAllDevicesWithProperties\">\n"
+- " <arg name=\"devices_with_props\" direction=\"out\" type=\"a(oa{sv})\"/>\n"
++ " <arg name=\"devices_with_props\" direction=\"out\" type=\"a(sa{sv})\"/>\n"
+ " </method>\n"
+ " <method name=\"DeviceExists\">\n"
+ " <arg name=\"does_it_exist\" direction=\"out\" type=\"b\"/>\n"
+- " <arg name=\"udi\" direction=\"in\" type=\"o\"/>\n"
++ " <arg name=\"udi\" direction=\"in\" type=\"s\"/>\n"
+ " </method>\n"
+ " <method name=\"FindDeviceStringMatch\">\n"
+- " <arg name=\"devices\" direction=\"out\" type=\"ao\"/>\n"
++ " <arg name=\"devices\" direction=\"out\" type=\"as\"/>\n"
+ " <arg name=\"key\" direction=\"in\" type=\"s\"/>\n"
+ " <arg name=\"value\" direction=\"in\" type=\"s\"/>\n"
+ " </method>\n"
+ " <method name=\"FindDeviceByCapability\">\n"
+- " <arg name=\"devices\" direction=\"out\" type=\"ao\"/>\n"
++ " <arg name=\"devices\" direction=\"out\" type=\"as\"/>\n"
+ " <arg name=\"capability\" direction=\"in\" type=\"s\"/>\n"
+ " </method>\n"
+ " <method name=\"NewDevice\">\n"
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0021-use-udevadm-instead-of-deprecated-udevinfo.patch b/hal-0.5.11-patches/0021-use-udevadm-instead-of-deprecated-udevinfo.patch
new file mode 100644
index 00000000..a1f3d998
--- /dev/null
+++ b/hal-0.5.11-patches/0021-use-udevadm-instead-of-deprecated-udevinfo.patch
@@ -0,0 +1,43 @@
+From 5bec8e97d9ea7aabd432497e5ae36cd23e1309d5 Mon Sep 17 00:00:00 2001
+From: Danny Kukawka <danny.kukawka@web.de>
+Date: Wed, 27 Aug 2008 21:24:33 +0200
+Subject: [PATCH 21/48] use udevadm instead of (deprecated) udevinfo
+
+Use udevadm instead of (deprecated) udevinfo. Adapted/fixed version
+of a patch contributed by Lucas Hazel <lucas@die.net.au> via HAL ML.
+---
+ hald/linux/blockdev.c | 2 +-
+ hald/linux/coldplug.c | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/hald/linux/blockdev.c b/hald/linux/blockdev.c
+index d88a815..5a52141 100644
+--- a/hald/linux/blockdev.c
++++ b/hald/linux/blockdev.c
+@@ -1750,7 +1750,7 @@ udev_get_device_file_for_sysfs_path (const char *sysfs_path)
+ char *ret;
+ char *u_stdout;
+ int u_exit_status;
+- const char *argv[] = {"/usr/bin/udevinfo", "--root", "--query", "name", "--path", NULL, NULL};
++ const char *argv[] = {"/sbin/udevadm", "info", "--root", "--query", "name", "--path", NULL, NULL};
+ GError *g_error;
+
+ ret = NULL;
+diff --git a/hald/linux/coldplug.c b/hald/linux/coldplug.c
+index 18eae78..d77a114 100644
+--- a/hald/linux/coldplug.c
++++ b/hald/linux/coldplug.c
+@@ -149,8 +149,8 @@ udev_info_to_hotplug_event (const UdevInfo *info)
+ static gboolean
+ hal_util_init_sysfs_to_udev_map (void)
+ {
+- char *udevdb_export_argv[] = { "/usr/bin/udevinfo", "-e", NULL };
+- char *udevroot_argv[] = { "/usr/bin/udevinfo", "-r", NULL };
++ char *udevdb_export_argv[] = { "/sbin/udevadm", "info", "-e", NULL };
++ char *udevroot_argv[] = { "/sbin/udevadm", "info", "-r", NULL };
+ int udevinfo_exitcode;
+ UdevInfo *info = NULL;
+ char *p;
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0022-inserts-the-sysfs-path-at-the-right-position-for-cal.patch b/hal-0.5.11-patches/0022-inserts-the-sysfs-path-at-the-right-position-for-cal.patch
new file mode 100644
index 00000000..85c91142
--- /dev/null
+++ b/hal-0.5.11-patches/0022-inserts-the-sysfs-path-at-the-right-position-for-cal.patch
@@ -0,0 +1,27 @@
+From e218ef435e1d49bb62a80a98a2da66096c0b0db4 Mon Sep 17 00:00:00 2001
+From: =?utf-8?q?J=C3=BCrg=20Billeter?= <j@bitron.ch>
+Date: Tue, 9 Sep 2008 16:39:45 +0200
+Subject: [PATCH 22/48] inserts the sysfs path at the right position for call udevadm
+
+The inserts the sysfs path at the right position when calling
+udevadm info.
+---
+ hald/linux/blockdev.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/hald/linux/blockdev.c b/hald/linux/blockdev.c
+index 5a52141..20c66bd 100644
+--- a/hald/linux/blockdev.c
++++ b/hald/linux/blockdev.c
+@@ -1754,7 +1754,7 @@ udev_get_device_file_for_sysfs_path (const char *sysfs_path)
+ GError *g_error;
+
+ ret = NULL;
+- argv[5] = sysfs_path;
++ argv[6] = sysfs_path;
+
+ g_error = NULL;
+
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0023-hal-acl-tool-don-t-free-strings-that-are-not-suppos.patch b/hal-0.5.11-patches/0023-hal-acl-tool-don-t-free-strings-that-are-not-suppos.patch
new file mode 100644
index 00000000..d4ee8891
--- /dev/null
+++ b/hal-0.5.11-patches/0023-hal-acl-tool-don-t-free-strings-that-are-not-suppos.patch
@@ -0,0 +1,36 @@
+From 469e8e3e77b9e12c5d3a6d42513df2d81718a9c6 Mon Sep 17 00:00:00 2001
+From: Ludwig Nussel <ludwig.nussel@suse.de>
+Date: Mon, 22 Sep 2008 20:11:36 -0700
+Subject: [PATCH 23/48] hal-acl-tool: don't free strings that are not supposed to be freed
+
+Fon't free strings that are not supposed to be freed (in hal-acl-tool).
+---
+ tools/hal-acl-tool.c | 6 ------
+ 1 files changed, 0 insertions(+), 6 deletions(-)
+
+diff --git a/tools/hal-acl-tool.c b/tools/hal-acl-tool.c
+index d01a069..db17374 100644
+--- a/tools/hal-acl-tool.c
++++ b/tools/hal-acl-tool.c
+@@ -1085,18 +1085,12 @@ acl_reconfigure_all (void)
+
+ if (device == NULL) {
+ printf ("%d: access_control.file not set for '%s'\n", getpid (), udis[i]);
+- if (type != NULL)
+- libhal_free_string (type);
+ acl_for_device_free (afd);
+ goto skip;
+ }
+
+ if (type == NULL) {
+ printf ("%d: access_control.type not set for '%s'\n", getpid (), udis[i]);
+- if (device != NULL)
+- libhal_free_string (device);
+- if (type != NULL)
+- libhal_free_string (type);
+ acl_for_device_free (afd);
+ goto skip;
+ }
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0024-fix-issue-on-64bit-big-endian-architectures.patch b/hal-0.5.11-patches/0024-fix-issue-on-64bit-big-endian-architectures.patch
new file mode 100644
index 00000000..19e5bb1d
--- /dev/null
+++ b/hal-0.5.11-patches/0024-fix-issue-on-64bit-big-endian-architectures.patch
@@ -0,0 +1,41 @@
+From 510751e4f02f8ae7c887bc04b84448d8aee9831d Mon Sep 17 00:00:00 2001
+From: Markus Rothe <markus@unixforces.net>
+Date: Tue, 30 Sep 2008 16:38:07 +0200
+Subject: [PATCH 24/48] fix issue on 64bit big endian architectures.
+
+On 64bit big endian architectures, PowerPC64 in my case, off_t is 64bit. Now
+rule.jump_position is only 32bit. the pad32_write function call in
+set_jump_position only saves 32bit. On little endian architectures this are
+the "correct" bits, but not on 64bit architectures which are big endian. The
+solution is to type cast off_t to a 32bit value and save this one instead of
+the original variable.
+---
+ hald/create_cache.c | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/hald/create_cache.c b/hald/create_cache.c
+index d52f834..232fe98 100644
+--- a/hald/create_cache.c
++++ b/hald/create_cache.c
+@@ -305,15 +305,17 @@ static void remember_jump_position(struct fdi_context *fdi_ctx)
+ static void set_jump_position(struct fdi_context *fdi_ctx)
+ {
+ off_t offset;
++ u_int32_t offset32;
+
+ if (fdi_ctx->depth <= 0)
+ DIE(("Rule depth underrun"));
+
+ fdi_ctx->depth--;
+ offset = RULES_ROUND(lseek(fdi_ctx->cache_fd, 0, SEEK_END));
++ offset32 = (u_int32_t)offset;
+ pad32_write(fdi_ctx->cache_fd,
+ fdi_ctx->match_at_depth[fdi_ctx->depth] + offsetof(struct rule, jump_position),
+- &offset, sizeof(fdi_ctx->rule.jump_position));
++ &offset32, sizeof(fdi_ctx->rule.jump_position));
+
+ if (haldc_verbose)
+ HAL_INFO(("modify rule=0x%08x, set jump to 0x%08x",
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0025-prevent-hal-from-automounting-Dell-recovery-partitio.patch b/hal-0.5.11-patches/0025-prevent-hal-from-automounting-Dell-recovery-partitio.patch
new file mode 100644
index 00000000..f7658d1c
--- /dev/null
+++ b/hal-0.5.11-patches/0025-prevent-hal-from-automounting-Dell-recovery-partitio.patch
@@ -0,0 +1,31 @@
+From 473cfdedaba4268e1f2266c0393bd394891536d5 Mon Sep 17 00:00:00 2001
+From: Pacho Ramos <pacho@condmat1.ciencias.uniovi.es>
+Date: Wed, 1 Oct 2008 12:19:41 +0200
+Subject: [PATCH 25/48] prevent hal from automounting Dell recovery partition
+
+This patch prevent hal from automounting Dell recovery partition (and
+any ntfs partition with label "RECOVERY")
+---
+ fdi/policy/10osvendor/20-storage-methods.fdi | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+diff --git a/fdi/policy/10osvendor/20-storage-methods.fdi b/fdi/policy/10osvendor/20-storage-methods.fdi
+index e8a8c60..9fbe202 100644
+--- a/fdi/policy/10osvendor/20-storage-methods.fdi
++++ b/fdi/policy/10osvendor/20-storage-methods.fdi
+@@ -132,6 +132,12 @@
+ </match>
+ </match>
+
++ <match key="volume.fstype" string="ntfs">
++ <match key="volume.label" string="RECOVERY">
++ <merge key="volume.ignore" type="bool">true</merge>
++ </match>
++ </match>
++
+ <!-- ASUS ships some desktop with a recovery partition -->
+ <match key="volume.fstype" string="vfat">
+ <match key="volume.label" string="RECOVERY">
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0026-fix-some-configure-issues.patch b/hal-0.5.11-patches/0026-fix-some-configure-issues.patch
new file mode 100644
index 00000000..30c683ca
--- /dev/null
+++ b/hal-0.5.11-patches/0026-fix-some-configure-issues.patch
@@ -0,0 +1,68 @@
+From f4d6db61e4c72a00640abe59c17aea5268b1b8d1 Mon Sep 17 00:00:00 2001
+From: =?utf-8?q?Rafa=C5=82=20Mu=C5=BCy=C5=82o?= <galtgendo@o2.pl>
+Date: Thu, 2 Oct 2008 13:01:15 +0200
+Subject: [PATCH 26/48] fix some configure issues
+
+Fixed some configure issues.
+
+AC_ARG_ENABLE([foobar], ...) adds only --enable-foobar, The AS_HELP_STRING
+part is for help string only, so when you do i.e. AC_ARG_ENABLE([have_acpi],...)
+you create --enable-have_acpi which is not only inconsistent with the
+help string, but simply wrong, cause you check later for enable_acpi
+instead of enable_have_acpi.
+---
+ configure.in | 10 +++++-----
+ 1 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 112fc33..e253a8a 100644
+--- a/configure.in
++++ b/configure.in
+@@ -480,7 +480,7 @@ AC_DEFINE_UNQUOTED(DBUS_API_SUBJECT_TO_CHANGE, [], [DBUS API is subject to chang
+
+ # check for ConsoleKit
+ AM_CONDITIONAL(HAVE_CONKIT, false)
+-AC_ARG_ENABLE(console-kit, [ --enable-console-kit Use ConsoleKit],enable_console_kit=$enableval,enable_console_kit=yes)
++AC_ARG_ENABLE([console-kit], AS_HELP_STRING([--enable-console-kit], [Use ConsoleKit]), [enable_console_kit=$enableval,enable_console_kit=yes])
+ msg_conkit=no
+ if test "x$enable_console_kit" != "xno"; then
+ AM_CONDITIONAL(HAVE_CONKIT, true)
+@@ -594,7 +594,7 @@ if test "x$enable_umount_hal" != "xno"; then
+ fi
+
+ # what extra hotplug backends to use (ACPI, APM, PMU etc)
+-AC_ARG_ENABLE([have_acpi],
++AC_ARG_ENABLE([acpi],
+ AS_HELP_STRING([--disable-acpi], [Build without ACPI support]))
+ msg_acpi=no
+ if test "x$enable_acpi" != "xno"; then
+@@ -602,7 +602,7 @@ if test "x$enable_acpi" != "xno"; then
+ AC_DEFINE(HAVE_ACPI, [], [Set if we have ACPI support])
+ fi
+ AM_CONDITIONAL(HAVE_ACPI, [test x$msg_acpi = xyes], [Compiling ACPI])
+-AC_ARG_ENABLE([have_apm],
++AC_ARG_ENABLE([apm],
+ AS_HELP_STRING([--disable-apm], [Build without APM support]))
+ msg_apm=no
+ if test "x$enable_apm" != "xno"; then
+@@ -610,7 +610,7 @@ if test "x$enable_apm" != "xno"; then
+ AC_DEFINE(HAVE_APM, [], [Set if we have APM support])
+ fi
+ AM_CONDITIONAL(HAVE_APM, [test x$msg_apm = xyes], [Compiling APM])
+-AC_ARG_ENABLE([have_pmu],
++AC_ARG_ENABLE([pmu],
+ AS_HELP_STRING([--disable-pmu], [Build without PMU support]))
+ msg_pmu=no
+ if test "x$enable_pmu" != "xno"; then
+@@ -619,7 +619,7 @@ if test "x$enable_pmu" != "xno"; then
+ fi
+ AM_CONDITIONAL(HAVE_PMU, [test x$msg_pmu = xyes], [Compiling PMU])
+
+-AC_ARG_ENABLE([have_pci],
++AC_ARG_ENABLE([pci],
+ AS_HELP_STRING([--disable-pci], [Build without PCI support]))
+ msg_pci=no
+ if test "x$enable_pci" != "xno"; then
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0027-fix-Dell-bluetooth-killswitch.patch b/hal-0.5.11-patches/0027-fix-Dell-bluetooth-killswitch.patch
new file mode 100644
index 00000000..a49e015b
--- /dev/null
+++ b/hal-0.5.11-patches/0027-fix-Dell-bluetooth-killswitch.patch
@@ -0,0 +1,59 @@
+From e262a200a31ffc0bb90772cbb3fbb84a940eb121 Mon Sep 17 00:00:00 2001
+From: Mario Limonciello <mario_limonciello@dell.com>
+Date: Fri, 24 Oct 2008 10:38:24 +0200
+Subject: [PATCH 27/48] fix Dell bluetooth killswitch
+
+Fixed Dell Bluetooth killswitch handling to not use the --sw_bt command.
+
+From http://thread.gmane.org/gmane.comp.freedesktop.hal/12283:
+
+[Mario Limonciello <mario_limonciello@dell.com>]:
+> I've been trying to track down why on some machines the hardware BT
+> switch suddenly stops working periodically and then figured out what's
+> actually happening. HAL is turning it off every time. Well
+> unfortunately, on a lot of Dell platforms, the software switch simply
+> doesn't work. This is a BIOS limitation on those platforms. What
+> happens then is somehow this kill switch interface gets triggered, turns
+> off the hardware switch, and suddenly the user has no way to turn
+> bluetooth back on. I feel the better solution is to only turn off via
+> the software switch. If the platform ends up supporting it, it will
+> work, if not, nothing happens.
+
+[Michael_E_Brown@dell.com]:
+> I wrote dellWirelessCtl a long time ago and I remember running into
+> one limitation with setting switch settings, but I dont remember the
+> exact details (a BIOS limitation). Something like changing the switch
+> settings always turned BT on or off. It was a BIOS bug or limitation
+> or whatever you want to call it. But the solution would most likely be
+> to adjust what HAL is doing as suggested by Mario. I've been messing
+> with it on my system for a little bit to try to remember what the
+> problem was, but I cant get the exact sequence that hits what I
+> remember hitting.
+---
+ tools/linux/hal-system-killswitch-set-power-linux | 6 ++----
+ 1 files changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/tools/linux/hal-system-killswitch-set-power-linux b/tools/linux/hal-system-killswitch-set-power-linux
+index bc2ed38..d485a70 100755
+--- a/tools/linux/hal-system-killswitch-set-power-linux
++++ b/tools/linux/hal-system-killswitch-set-power-linux
+@@ -25,14 +25,12 @@ if [ "$HAL_PROP_KILLSWITCH_TYPE" = "bluetooth" ]; then
+ exit 0
+ elif [ "$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_bt 0 --bt 1
++ $DELL_WCTL --bt 1
+ ret=$?
+ else
+- $DELL_WCTL --sw_bt 0 --bt 0
++ $DELL_WCTL --bt 0
+ ret=$?
+ fi
+ if [ "$ret" != "0" ]; then
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0028-remove-the-forced-removal-of-the-trailing-newline-to.patch b/hal-0.5.11-patches/0028-remove-the-forced-removal-of-the-trailing-newline-to.patch
new file mode 100644
index 00000000..1065c41e
--- /dev/null
+++ b/hal-0.5.11-patches/0028-remove-the-forced-removal-of-the-trailing-newline-to.patch
@@ -0,0 +1,58 @@
+From 12a6d7c88cfb32cd3f811146d1f9af614d90fec2 Mon Sep 17 00:00:00 2001
+From: Richard Hughes <richard@hughsie.com>
+Date: Mon, 3 Nov 2008 09:07:09 +0000
+Subject: [PATCH 28/48] remove the forced removal of the trailing newline to fix OLPC probing
+
+While doing some patches for OLPC, all the OFW firmware strings are not
+terminated with \n\0 just with \0.
+
+This means that we get results like OLP when we should be getting
+OLPC.
+
+data = OLPC0
+index = 01234
+
+len = 4
+data[len-1] = C
+
+data = IBMn0
+index = 01234
+
+len = 4
+data[len-1] = \n
+
+Now, the isspace check checks for \n, so we can remove the explicit \0
+termination, and rely on the code three lines down. Removing the
+explicit code allows non-newline terminated strings to be got with
+hal_util_get_string_from_file().
+---
+ hald/util.c | 11 ++++++-----
+ 1 files changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/hald/util.c b/hald/util.c
+index 51f5d8a..44645a4 100644
+--- a/hald/util.c
++++ b/hald/util.c
+@@ -305,13 +305,14 @@ hal_util_get_string_from_file (const gchar *directory, const gchar *file)
+ //HAL_ERROR (("Cannot read from '%s'", path));
+ goto out;
+ }
+-
++
++ /* blank file, no data */
+ len = strlen (buf);
+- if (len>0)
+- buf[len-1] = '\0';
++ if (len == 0)
++ goto out;
+
+- /* Clear remaining whitespace */
+- for (i = len - 2; i >= 0; --i) {
++ /* clear remaining whitespace */
++ for (i = len - 1; i >= 0; --i) {
+ if (!g_ascii_isspace (buf[i]))
+ break;
+ buf[i] = '\0';
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0029-fix-building-on-Linux-2.6.28.patch b/hal-0.5.11-patches/0029-fix-building-on-Linux-2.6.28.patch
new file mode 100644
index 00000000..915ac212
--- /dev/null
+++ b/hal-0.5.11-patches/0029-fix-building-on-Linux-2.6.28.patch
@@ -0,0 +1,27 @@
+From 53dd479745a257b85c1f8cafe8420d784dbc1fcb Mon Sep 17 00:00:00 2001
+From: Martin Pitt <martin.pitt@ubuntu.com>
+Date: Thu, 27 Nov 2008 19:32:35 +0100
+Subject: [PATCH 29/48] fix building on Linux 2.6.28
+
+2.6.28 changed linux/serial.h to use __32, which is provided by
+linux/types.h. While arguably a kernel bug, working around it by
+including it explicitly doesn't hurt.
+---
+ hald/linux/probing/probe-serial.c | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/hald/linux/probing/probe-serial.c b/hald/linux/probing/probe-serial.c
+index df5a749..048275f 100644
+--- a/hald/linux/probing/probe-serial.c
++++ b/hald/linux/probing/probe-serial.c
+@@ -29,6 +29,7 @@
+ #endif
+
+ #include <fcntl.h>
++#include <linux/types.h>
+ #include <linux/serial.h>
+ #include <stdint.h>
+ #include <stdio.h>
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0030-install-udev-rule-to-lib-udev-rules.d.patch b/hal-0.5.11-patches/0030-install-udev-rule-to-lib-udev-rules.d.patch
new file mode 100644
index 00000000..7296cce1
--- /dev/null
+++ b/hal-0.5.11-patches/0030-install-udev-rule-to-lib-udev-rules.d.patch
@@ -0,0 +1,24 @@
+From 1f4e2fdc2a43935810f43e9c2795069e6fcca011 Mon Sep 17 00:00:00 2001
+From: Scott James Remnant <scott@canonical.com>
+Date: Wed, 7 Jan 2009 19:23:51 +0100
+Subject: [PATCH 30/48] install udev rule to /lib/udev/rules.d/
+
+---
+ tools/linux/Makefile.am | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/tools/linux/Makefile.am b/tools/linux/Makefile.am
+index 426078d..768c92e 100644
+--- a/tools/linux/Makefile.am
++++ b/tools/linux/Makefile.am
+@@ -1,6 +1,6 @@
+ ## Process this file with automake to produce Makefile.in
+
+-udevrulesdir = $(sysconfdir)/udev/rules.d
++udevrulesdir = /lib/udev/rules.d
+ udevrules_DATA = 90-hal.rules
+
+
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0031-aallowllow-calling-KillSwitch-methods-in-D-Bus-confi.patch b/hal-0.5.11-patches/0031-aallowllow-calling-KillSwitch-methods-in-D-Bus-confi.patch
new file mode 100644
index 00000000..111602fe
--- /dev/null
+++ b/hal-0.5.11-patches/0031-aallowllow-calling-KillSwitch-methods-in-D-Bus-confi.patch
@@ -0,0 +1,36 @@
+From 66aadc368b8fdbf0699e3b6175a47d6001eec350 Mon Sep 17 00:00:00 2001
+From: Colin Walters <walters@verbum.org>
+Date: Wed, 21 Jan 2009 01:24:14 +0100
+Subject: [PATCH 31/48] aallowllow calling KillSwitch methods in D-Bus configuration
+
+hal.conf.in: Update dbus permissions to include KillSwitch, which
+NetworkManager needs. Taken from Fedora:
+http://cvs.fedoraproject.org/viewvc//devel/hal/hal-dbus-perms.patch?view=markup
+---
+ hal.conf.in | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/hal.conf.in b/hal.conf.in
+index ef97b8f..823e40f 100644
+--- a/hal.conf.in
++++ b/hal.conf.in
+@@ -16,6 +16,8 @@
+
+ <!-- Allow anyone to invoke methods on the Manager and Device interfaces -->
+ <policy context="default">
++ <allow send_destination="org.freedesktop.Hal"
++ send_interface="org.freedesktop.DBus.Introspectable"/>
+ <allow send_interface="org.freedesktop.Hal.Manager"/>
+ <allow send_interface="org.freedesktop.Hal.Device"/>
+ <allow receive_interface="org.freedesktop.Hal.Manager"
+@@ -26,6 +28,7 @@
+ <allow send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>
+ <allow send_interface="org.freedesktop.Hal.Device.LaptopPanel"/>
+ <allow send_interface="org.freedesktop.Hal.Device.Volume"/>
++ <allow send_interface="org.freedesktop.Hal.Device.KillSwitch"/>
+ <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
+ <allow receive_interface="org.freedesktop.Hal.Device.SystemPowerManagement"
+ receive_sender="org.freedesktop.Hal"/>
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0032-put-policy-rules-in-alphabetical-order.patch b/hal-0.5.11-patches/0032-put-policy-rules-in-alphabetical-order.patch
new file mode 100644
index 00000000..fd93e4e2
--- /dev/null
+++ b/hal-0.5.11-patches/0032-put-policy-rules-in-alphabetical-order.patch
@@ -0,0 +1,50 @@
+From 3d5242b0ea9d63a821e66638847b63109dc3b68f Mon Sep 17 00:00:00 2001
+From: Danny Kukawka <danny.kukawka@web.de>
+Date: Wed, 21 Jan 2009 19:21:44 +0100
+Subject: [PATCH 32/48] put policy rules in alphabetical order
+
+Put the policy rules in alphabetical order.
+---
+ hal.conf.in | 17 ++++++++++-------
+ 1 files changed, 10 insertions(+), 7 deletions(-)
+
+diff --git a/hal.conf.in b/hal.conf.in
+index 823e40f..67af75b 100644
+--- a/hal.conf.in
++++ b/hal.conf.in
+@@ -18,22 +18,25 @@
+ <policy context="default">
+ <allow send_destination="org.freedesktop.Hal"
+ send_interface="org.freedesktop.DBus.Introspectable"/>
+- <allow send_interface="org.freedesktop.Hal.Manager"/>
++
+ <allow send_interface="org.freedesktop.Hal.Device"/>
+- <allow receive_interface="org.freedesktop.Hal.Manager"
+- receive_sender="org.freedesktop.Hal"/>
++ <allow send_interface="org.freedesktop.Hal.Manager"/>
++
+ <allow receive_interface="org.freedesktop.Hal.Device"
+ receive_sender="org.freedesktop.Hal"/>
++ <allow receive_interface="org.freedesktop.Hal.Manager"
++ receive_sender="org.freedesktop.Hal"/>
+
+- <allow send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>
++ <allow send_interface="org.freedesktop.Hal.Device.KillSwitch"/>
+ <allow send_interface="org.freedesktop.Hal.Device.LaptopPanel"/>
++ <allow send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>
+ <allow send_interface="org.freedesktop.Hal.Device.Volume"/>
+- <allow send_interface="org.freedesktop.Hal.Device.KillSwitch"/>
+ <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
+- <allow receive_interface="org.freedesktop.Hal.Device.SystemPowerManagement"
+- receive_sender="org.freedesktop.Hal"/>
++
+ <allow receive_interface="org.freedesktop.Hal.Device.LaptopPanel"
+ receive_sender="org.freedesktop.Hal"/>
++ <allow receive_interface="org.freedesktop.Hal.Device.SystemPowerManagement"
++ receive_sender="org.freedesktop.Hal"/>
+ <allow receive_interface="org.freedesktop.Hal.Device.Volume"
+ receive_sender="org.freedesktop.Hal"/>
+ <allow receive_interface="org.freedesktop.Hal.Device.Volume.Crypto"
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0033-fix-policy-for-org.freedesktop.Hal.Device.KillSwitch.patch b/hal-0.5.11-patches/0033-fix-policy-for-org.freedesktop.Hal.Device.KillSwitch.patch
new file mode 100644
index 00000000..b9896092
--- /dev/null
+++ b/hal-0.5.11-patches/0033-fix-policy-for-org.freedesktop.Hal.Device.KillSwitch.patch
@@ -0,0 +1,27 @@
+From 60ecd90aa06de3c73a1afcf5b47973f8a639fe89 Mon Sep 17 00:00:00 2001
+From: Danny Kukawka <danny.kukawka@web.de>
+Date: Wed, 21 Jan 2009 19:23:34 +0100
+Subject: [PATCH 33/48] fix policy for org.freedesktop.Hal.Device.KillSwitch
+
+Fixed policy for org.freedesktop.Hal.Device.KillSwitch by adding
+receive_interface and receive_sender="org.freedesktop.Hal".
+---
+ hal.conf.in | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/hal.conf.in b/hal.conf.in
+index 67af75b..fb25a26 100644
+--- a/hal.conf.in
++++ b/hal.conf.in
+@@ -33,6 +33,8 @@
+ <allow send_interface="org.freedesktop.Hal.Device.Volume"/>
+ <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
+
++ <allow receive_interface="org.freedesktop.Hal.Device.KillSwitch"
++ receive_sender="org.freedesktop.Hal"/>
+ <allow receive_interface="org.freedesktop.Hal.Device.LaptopPanel"
+ receive_sender="org.freedesktop.Hal"/>
+ <allow receive_interface="org.freedesktop.Hal.Device.SystemPowerManagement"
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0034-add-DBus-policy-rule-for-org.freedesktop.Hal.Device.patch b/hal-0.5.11-patches/0034-add-DBus-policy-rule-for-org.freedesktop.Hal.Device.patch
new file mode 100644
index 00000000..740f3d70
--- /dev/null
+++ b/hal-0.5.11-patches/0034-add-DBus-policy-rule-for-org.freedesktop.Hal.Device.patch
@@ -0,0 +1,34 @@
+From 0011958b06aaa8d787941050b5437cc6ac00e7aa Mon Sep 17 00:00:00 2001
+From: Danny Kukawka <danny.kukawka@web.de>
+Date: Wed, 21 Jan 2009 19:27:09 +0100
+Subject: [PATCH 34/48] add DBus policy rule for org.freedesktop.Hal.Device.Leds
+
+Added DBus policy rule for org.freedesktop.Hal.Device.Leds.
+---
+ hal.conf.in | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/hal.conf.in b/hal.conf.in
+index fb25a26..17ce41a 100644
+--- a/hal.conf.in
++++ b/hal.conf.in
+@@ -29,6 +29,7 @@
+
+ <allow send_interface="org.freedesktop.Hal.Device.KillSwitch"/>
+ <allow send_interface="org.freedesktop.Hal.Device.LaptopPanel"/>
++ <allow send_interface="org.freedesktop.Hal.Device.Leds"/>
+ <allow send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>
+ <allow send_interface="org.freedesktop.Hal.Device.Volume"/>
+ <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
+@@ -37,6 +38,8 @@
+ receive_sender="org.freedesktop.Hal"/>
+ <allow receive_interface="org.freedesktop.Hal.Device.LaptopPanel"
+ receive_sender="org.freedesktop.Hal"/>
++ <allow receive_interface="org.freedesktop.Hal.Device.Leds"
++ receive_sender="org.freedesktop.Hal"/>
+ <allow receive_interface="org.freedesktop.Hal.Device.SystemPowerManagement"
+ receive_sender="org.freedesktop.Hal"/>
+ <allow receive_interface="org.freedesktop.Hal.Device.Volume"
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0035-add-DBus-policy-rule-for-org.freedesktop.Hal.Device.patch b/hal-0.5.11-patches/0035-add-DBus-policy-rule-for-org.freedesktop.Hal.Device.patch
new file mode 100644
index 00000000..d1f77e18
--- /dev/null
+++ b/hal-0.5.11-patches/0035-add-DBus-policy-rule-for-org.freedesktop.Hal.Device.patch
@@ -0,0 +1,34 @@
+From 3d76b6419067ff6e64eb4ba887546fd0f641f7c2 Mon Sep 17 00:00:00 2001
+From: Danny Kukawka <danny.kukawka@web.de>
+Date: Wed, 21 Jan 2009 19:29:29 +0100
+Subject: [PATCH 35/48] add DBus policy rule for org.freedesktop.Hal.Device.CPUFreq
+
+Added DBus policy rule for org.freedesktop.Hal.Device.CPUFreq.
+---
+ hal.conf.in | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/hal.conf.in b/hal.conf.in
+index 17ce41a..c1e6b16 100644
+--- a/hal.conf.in
++++ b/hal.conf.in
+@@ -27,6 +27,7 @@
+ <allow receive_interface="org.freedesktop.Hal.Manager"
+ receive_sender="org.freedesktop.Hal"/>
+
++ <allow send_interface="org.freedesktop.Hal.Device.CPUFreq"/>
+ <allow send_interface="org.freedesktop.Hal.Device.KillSwitch"/>
+ <allow send_interface="org.freedesktop.Hal.Device.LaptopPanel"/>
+ <allow send_interface="org.freedesktop.Hal.Device.Leds"/>
+@@ -34,6 +35,8 @@
+ <allow send_interface="org.freedesktop.Hal.Device.Volume"/>
+ <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
+
++ <allow receive_interface="org.freedesktop.Hal.Device.CPUFreq"
++ receive_sender="org.freedesktop.Hal"/>
+ <allow receive_interface="org.freedesktop.Hal.Device.KillSwitch"
+ receive_sender="org.freedesktop.Hal"/>
+ <allow receive_interface="org.freedesktop.Hal.Device.LaptopPanel"
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0036-add-DBus-policy-rule-for-org.freedesktop.Hal.Device.patch b/hal-0.5.11-patches/0036-add-DBus-policy-rule-for-org.freedesktop.Hal.Device.patch
new file mode 100644
index 00000000..09dbd23a
--- /dev/null
+++ b/hal-0.5.11-patches/0036-add-DBus-policy-rule-for-org.freedesktop.Hal.Device.patch
@@ -0,0 +1,34 @@
+From 90d394bb8787eb495dcfcdcd4ea0f1e33c23c0ba Mon Sep 17 00:00:00 2001
+From: Danny Kukawka <danny.kukawka@web.de>
+Date: Wed, 21 Jan 2009 19:30:56 +0100
+Subject: [PATCH 36/48] add DBus policy rule for org.freedesktop.Hal.Device.LightSensor
+
+Added DBus policy rule for org.freedesktop.Hal.Device.LightSensor.
+---
+ hal.conf.in | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/hal.conf.in b/hal.conf.in
+index c1e6b16..b7f0600 100644
+--- a/hal.conf.in
++++ b/hal.conf.in
+@@ -31,6 +31,7 @@
+ <allow send_interface="org.freedesktop.Hal.Device.KillSwitch"/>
+ <allow send_interface="org.freedesktop.Hal.Device.LaptopPanel"/>
+ <allow send_interface="org.freedesktop.Hal.Device.Leds"/>
++ <allow send_interface="org.freedesktop.Hal.Device.LightSensor"/>
+ <allow send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>
+ <allow send_interface="org.freedesktop.Hal.Device.Volume"/>
+ <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
+@@ -43,6 +44,8 @@
+ receive_sender="org.freedesktop.Hal"/>
+ <allow receive_interface="org.freedesktop.Hal.Device.Leds"
+ receive_sender="org.freedesktop.Hal"/>
++ <allow receive_interface="org.freedesktop.Hal.Device.LightSensor"
++ receive_sender="org.freedesktop.Hal"/>
+ <allow receive_interface="org.freedesktop.Hal.Device.SystemPowerManagement"
+ receive_sender="org.freedesktop.Hal"/>
+ <allow receive_interface="org.freedesktop.Hal.Device.Volume"
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0037-add-D-Bus-policy-rule-for-org.freedesktop.Hal.Device.patch b/hal-0.5.11-patches/0037-add-D-Bus-policy-rule-for-org.freedesktop.Hal.Device.patch
new file mode 100644
index 00000000..86a2c238
--- /dev/null
+++ b/hal-0.5.11-patches/0037-add-D-Bus-policy-rule-for-org.freedesktop.Hal.Device.patch
@@ -0,0 +1,34 @@
+From 340f7ab78886c353f29dec738cbbbb3d2156fa87 Mon Sep 17 00:00:00 2001
+From: Danny Kukawka <danny.kukawka@web.de>
+Date: Wed, 21 Jan 2009 19:32:16 +0100
+Subject: [PATCH 37/48] add D-Bus policy rule for org.freedesktop.Hal.Device.KeyboardBacklight
+
+Added D-Bus policy rule for org.freedesktop.Hal.Device.KeyboardBacklight
+---
+ hal.conf.in | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/hal.conf.in b/hal.conf.in
+index b7f0600..8f4527a 100644
+--- a/hal.conf.in
++++ b/hal.conf.in
+@@ -29,6 +29,7 @@
+
+ <allow send_interface="org.freedesktop.Hal.Device.CPUFreq"/>
+ <allow send_interface="org.freedesktop.Hal.Device.KillSwitch"/>
++ <allow send_interface="org.freedesktop.Hal.Device.KeyboardBacklight"/>
+ <allow send_interface="org.freedesktop.Hal.Device.LaptopPanel"/>
+ <allow send_interface="org.freedesktop.Hal.Device.Leds"/>
+ <allow send_interface="org.freedesktop.Hal.Device.LightSensor"/>
+@@ -38,6 +39,8 @@
+
+ <allow receive_interface="org.freedesktop.Hal.Device.CPUFreq"
+ receive_sender="org.freedesktop.Hal"/>
++ <allow receive_interface="org.freedesktop.Hal.Device.KeyboardBacklight"
++ receive_sender="org.freedesktop.Hal"/>
+ <allow receive_interface="org.freedesktop.Hal.Device.KillSwitch"
+ receive_sender="org.freedesktop.Hal"/>
+ <allow receive_interface="org.freedesktop.Hal.Device.LaptopPanel"
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0038-add-D-Bus-policy-rule-for-org.freedesktop.Hal.Device.patch b/hal-0.5.11-patches/0038-add-D-Bus-policy-rule-for-org.freedesktop.Hal.Device.patch
new file mode 100644
index 00000000..fb7439ec
--- /dev/null
+++ b/hal-0.5.11-patches/0038-add-D-Bus-policy-rule-for-org.freedesktop.Hal.Device.patch
@@ -0,0 +1,34 @@
+From a2268e26595638e12073e0027a99c3b25cd3d82a Mon Sep 17 00:00:00 2001
+From: Danny Kukawka <danny.kukawka@web.de>
+Date: Wed, 21 Jan 2009 19:36:47 +0100
+Subject: [PATCH 38/48] add D-Bus policy rule for org.freedesktop.Hal.Device.Storage.Removable
+
+Added D-Bus policy rule for org.freedesktop.Hal.Device.Storage.Removable.
+---
+ hal.conf.in | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/hal.conf.in b/hal.conf.in
+index 8f4527a..f6b52f2 100644
+--- a/hal.conf.in
++++ b/hal.conf.in
+@@ -33,6 +33,7 @@
+ <allow send_interface="org.freedesktop.Hal.Device.LaptopPanel"/>
+ <allow send_interface="org.freedesktop.Hal.Device.Leds"/>
+ <allow send_interface="org.freedesktop.Hal.Device.LightSensor"/>
++ <allow send_interface="org.freedesktop.Hal.Device.Storage.Removable"/>
+ <allow send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>
+ <allow send_interface="org.freedesktop.Hal.Device.Volume"/>
+ <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
+@@ -49,6 +50,8 @@
+ receive_sender="org.freedesktop.Hal"/>
+ <allow receive_interface="org.freedesktop.Hal.Device.LightSensor"
+ receive_sender="org.freedesktop.Hal"/>
++ <allow receive_interface="org.freedesktop.Hal.Device.Storage.Removable"
++ receive_sender="org.freedesktop.Hal"/>
+ <allow receive_interface="org.freedesktop.Hal.Device.SystemPowerManagement"
+ receive_sender="org.freedesktop.Hal"/>
+ <allow receive_interface="org.freedesktop.Hal.Device.Volume"
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0039-add-org.freedesktop.Hal.Device.WakeOnLan-to-HAL-D-Bu.patch b/hal-0.5.11-patches/0039-add-org.freedesktop.Hal.Device.WakeOnLan-to-HAL-D-Bu.patch
new file mode 100644
index 00000000..b9d71eef
--- /dev/null
+++ b/hal-0.5.11-patches/0039-add-org.freedesktop.Hal.Device.WakeOnLan-to-HAL-D-Bu.patch
@@ -0,0 +1,35 @@
+From 4d50a74c506cb1d1fa01ca012353a1758450ee64 Mon Sep 17 00:00:00 2001
+From: Danny Kukawka <danny.kukawka@web.de>
+Date: Thu, 22 Jan 2009 12:37:39 +0100
+Subject: [PATCH 39/48] add org.freedesktop.Hal.Device.WakeOnLan to HAL D-Bus config
+
+Added org.freedesktop.Hal.Device.WakeOnLan to HAL D-Bus config/
+policy.
+---
+ hal.conf.in | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/hal.conf.in b/hal.conf.in
+index f6b52f2..d840082 100644
+--- a/hal.conf.in
++++ b/hal.conf.in
+@@ -37,6 +37,7 @@
+ <allow send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>
+ <allow send_interface="org.freedesktop.Hal.Device.Volume"/>
+ <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
++ <allow send_interface="org.freedesktop.Hal.Device.WakeOnLan"/>
+
+ <allow receive_interface="org.freedesktop.Hal.Device.CPUFreq"
+ receive_sender="org.freedesktop.Hal"/>
+@@ -58,6 +59,8 @@
+ receive_sender="org.freedesktop.Hal"/>
+ <allow receive_interface="org.freedesktop.Hal.Device.Volume.Crypto"
+ receive_sender="org.freedesktop.Hal"/>
++ <allow receive_interface="org.freedesktop.Hal.Device.WakeOnLan"
++ receive_sender="org.freedesktop.Hal"/>
+ </policy>
+
+ <!-- Default policy for the exported interfaces; if PolicyKit is not used
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0040-add-org.freedesktop.Hal.Device.Storage-to-HAL-D-Bus.patch b/hal-0.5.11-patches/0040-add-org.freedesktop.Hal.Device.Storage-to-HAL-D-Bus.patch
new file mode 100644
index 00000000..edc9d45f
--- /dev/null
+++ b/hal-0.5.11-patches/0040-add-org.freedesktop.Hal.Device.Storage-to-HAL-D-Bus.patch
@@ -0,0 +1,35 @@
+From 3fecb8fbfd6424c9ca69109fbf1842ecd2693710 Mon Sep 17 00:00:00 2001
+From: Danny Kukawka <danny.kukawka@web.de>
+Date: Thu, 22 Jan 2009 12:39:11 +0100
+Subject: [PATCH 40/48] add org.freedesktop.Hal.Device.Storage to HAL D-Bus config
+
+Added org.freedesktop.Hal.Device.Storage to HAL D-Bus config/
+policy.
+---
+ hal.conf.in | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/hal.conf.in b/hal.conf.in
+index d840082..aee3fa2 100644
+--- a/hal.conf.in
++++ b/hal.conf.in
+@@ -33,6 +33,7 @@
+ <allow send_interface="org.freedesktop.Hal.Device.LaptopPanel"/>
+ <allow send_interface="org.freedesktop.Hal.Device.Leds"/>
+ <allow send_interface="org.freedesktop.Hal.Device.LightSensor"/>
++ <allow send_interface="org.freedesktop.Hal.Device.Storage"/>
+ <allow send_interface="org.freedesktop.Hal.Device.Storage.Removable"/>
+ <allow send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>
+ <allow send_interface="org.freedesktop.Hal.Device.Volume"/>
+@@ -51,6 +52,8 @@
+ receive_sender="org.freedesktop.Hal"/>
+ <allow receive_interface="org.freedesktop.Hal.Device.LightSensor"
+ receive_sender="org.freedesktop.Hal"/>
++ <allow receive_interface="org.freedesktop.Hal.Device.Storage"
++ receive_sender="org.freedesktop.Hal"/>
+ <allow receive_interface="org.freedesktop.Hal.Device.Storage.Removable"
+ receive_sender="org.freedesktop.Hal"/>
+ <allow receive_interface="org.freedesktop.Hal.Device.SystemPowerManagement"
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0041-add-org.freedesktop.Hal.Device.DockStation-to-HAL-D.patch b/hal-0.5.11-patches/0041-add-org.freedesktop.Hal.Device.DockStation-to-HAL-D.patch
new file mode 100644
index 00000000..e9085346
--- /dev/null
+++ b/hal-0.5.11-patches/0041-add-org.freedesktop.Hal.Device.DockStation-to-HAL-D.patch
@@ -0,0 +1,35 @@
+From 68c00fb58713d5dbde18e09fcdf49bb1370e7893 Mon Sep 17 00:00:00 2001
+From: Danny Kukawka <danny.kukawka@web.de>
+Date: Thu, 22 Jan 2009 12:40:10 +0100
+Subject: [PATCH 41/48] add org.freedesktop.Hal.Device.DockStation to HAL D-Bus config
+
+Added org.freedesktop.Hal.Device.DockStation to HAL D-Bus config/
+policy.
+---
+ hal.conf.in | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/hal.conf.in b/hal.conf.in
+index aee3fa2..ccca381 100644
+--- a/hal.conf.in
++++ b/hal.conf.in
+@@ -28,6 +28,7 @@
+ receive_sender="org.freedesktop.Hal"/>
+
+ <allow send_interface="org.freedesktop.Hal.Device.CPUFreq"/>
++ <allow send_interface="org.freedesktop.Hal.Device.DockStation"/>
+ <allow send_interface="org.freedesktop.Hal.Device.KillSwitch"/>
+ <allow send_interface="org.freedesktop.Hal.Device.KeyboardBacklight"/>
+ <allow send_interface="org.freedesktop.Hal.Device.LaptopPanel"/>
+@@ -42,6 +43,8 @@
+
+ <allow receive_interface="org.freedesktop.Hal.Device.CPUFreq"
+ receive_sender="org.freedesktop.Hal"/>
++ <allow receive_interface="org.freedesktop.Hal.Device.DockStation"
++ receive_sender="org.freedesktop.Hal"/>
+ <allow receive_interface="org.freedesktop.Hal.Device.KeyboardBacklight"
+ receive_sender="org.freedesktop.Hal"/>
+ <allow receive_interface="org.freedesktop.Hal.Device.KillSwitch"
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0042-remove-all-receive_-lines-from-HAL-D-Bus-config.patch b/hal-0.5.11-patches/0042-remove-all-receive_-lines-from-HAL-D-Bus-config.patch
new file mode 100644
index 00000000..63b4a3fb
--- /dev/null
+++ b/hal-0.5.11-patches/0042-remove-all-receive_-lines-from-HAL-D-Bus-config.patch
@@ -0,0 +1,64 @@
+From 7d8b1da364ee95ec49fd1e13b96b14469cef8448 Mon Sep 17 00:00:00 2001
+From: Danny Kukawka <danny.kukawka@web.de>
+Date: Thu, 22 Jan 2009 14:16:09 +0100
+Subject: [PATCH 42/48] remove all receive_* lines from HAL D-Bus config
+
+Fixed HAL D-Bus config due to D-Bus changes caused by CVE-2008-4311.
+Removed all all receive_* lines from HAL D-Bus config as recommended
+here: https://bugs.launchpad.net/ubuntu/+source/avahi/+bug/318783
+---
+ hal.conf.in | 31 -------------------------------
+ 1 files changed, 0 insertions(+), 31 deletions(-)
+
+diff --git a/hal.conf.in b/hal.conf.in
+index ccca381..6790ee9 100644
+--- a/hal.conf.in
++++ b/hal.conf.in
+@@ -22,11 +22,6 @@
+ <allow send_interface="org.freedesktop.Hal.Device"/>
+ <allow send_interface="org.freedesktop.Hal.Manager"/>
+
+- <allow receive_interface="org.freedesktop.Hal.Device"
+- receive_sender="org.freedesktop.Hal"/>
+- <allow receive_interface="org.freedesktop.Hal.Manager"
+- receive_sender="org.freedesktop.Hal"/>
+-
+ <allow send_interface="org.freedesktop.Hal.Device.CPUFreq"/>
+ <allow send_interface="org.freedesktop.Hal.Device.DockStation"/>
+ <allow send_interface="org.freedesktop.Hal.Device.KillSwitch"/>
+@@ -41,32 +36,6 @@
+ <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
+ <allow send_interface="org.freedesktop.Hal.Device.WakeOnLan"/>
+
+- <allow receive_interface="org.freedesktop.Hal.Device.CPUFreq"
+- receive_sender="org.freedesktop.Hal"/>
+- <allow receive_interface="org.freedesktop.Hal.Device.DockStation"
+- receive_sender="org.freedesktop.Hal"/>
+- <allow receive_interface="org.freedesktop.Hal.Device.KeyboardBacklight"
+- receive_sender="org.freedesktop.Hal"/>
+- <allow receive_interface="org.freedesktop.Hal.Device.KillSwitch"
+- receive_sender="org.freedesktop.Hal"/>
+- <allow receive_interface="org.freedesktop.Hal.Device.LaptopPanel"
+- receive_sender="org.freedesktop.Hal"/>
+- <allow receive_interface="org.freedesktop.Hal.Device.Leds"
+- receive_sender="org.freedesktop.Hal"/>
+- <allow receive_interface="org.freedesktop.Hal.Device.LightSensor"
+- receive_sender="org.freedesktop.Hal"/>
+- <allow receive_interface="org.freedesktop.Hal.Device.Storage"
+- receive_sender="org.freedesktop.Hal"/>
+- <allow receive_interface="org.freedesktop.Hal.Device.Storage.Removable"
+- receive_sender="org.freedesktop.Hal"/>
+- <allow receive_interface="org.freedesktop.Hal.Device.SystemPowerManagement"
+- receive_sender="org.freedesktop.Hal"/>
+- <allow receive_interface="org.freedesktop.Hal.Device.Volume"
+- receive_sender="org.freedesktop.Hal"/>
+- <allow receive_interface="org.freedesktop.Hal.Device.Volume.Crypto"
+- receive_sender="org.freedesktop.Hal"/>
+- <allow receive_interface="org.freedesktop.Hal.Device.WakeOnLan"
+- receive_sender="org.freedesktop.Hal"/>
+ </policy>
+
+ <!-- Default policy for the exported interfaces; if PolicyKit is not used
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0043-fixed-HAL-D-Bus-config-added-send_destination-for-a.patch b/hal-0.5.11-patches/0043-fixed-HAL-D-Bus-config-added-send_destination-for-a.patch
new file mode 100644
index 00000000..c1f45034
--- /dev/null
+++ b/hal-0.5.11-patches/0043-fixed-HAL-D-Bus-config-added-send_destination-for-a.patch
@@ -0,0 +1,87 @@
+From 88691aea52226043552837ef8bd0375786ea9f86 Mon Sep 17 00:00:00 2001
+From: Danny Kukawka <danny.kukawka@web.de>
+Date: Thu, 22 Jan 2009 14:21:15 +0100
+Subject: [PATCH 43/48] fixed HAL D-Bus config: added send_destination for all interfaces
+
+Fixed HAL D-Bus config due to D-Bus changes caused by CVE-2008-4311.
+Added send_destination="org.freedesktop.Hal" for all exported
+interfaces as recommended here:
+https://bugs.launchpad.net/ubuntu/+source/avahi/+bug/318783
+
+" [...]
+*IMPORTANT* you MUST include send_destination on ALL allow or deny
+tags. Omitting it is a SERIOUS bug!
+
+ <!-- !! SERIOUS BUG !! -->
+ <allow send_interface="x.y.z" />
+
+This allows any service to receive method calls of the given
+interface, not just your own service!
+
+It also implicitly allows any service to receive method calls
+with no interface specified, in case they match this interface!
+[...] "
+---
+ hal.conf.in | 45 ++++++++++++++++++++++++++++++---------------
+ 1 files changed, 30 insertions(+), 15 deletions(-)
+
+diff --git a/hal.conf.in b/hal.conf.in
+index 6790ee9..bfd6511 100644
+--- a/hal.conf.in
++++ b/hal.conf.in
+@@ -19,22 +19,37 @@
+ <allow send_destination="org.freedesktop.Hal"
+ send_interface="org.freedesktop.DBus.Introspectable"/>
+
+- <allow send_interface="org.freedesktop.Hal.Device"/>
+- <allow send_interface="org.freedesktop.Hal.Manager"/>
++ <allow send_destination="org.freedesktop.Hal"
++ send_interface="org.freedesktop.Hal.Device"/>
++ <allow send_destination="org.freedesktop.Hal"
++ send_interface="org.freedesktop.Hal.Manager"/>
+
+- <allow send_interface="org.freedesktop.Hal.Device.CPUFreq"/>
+- <allow send_interface="org.freedesktop.Hal.Device.DockStation"/>
+- <allow send_interface="org.freedesktop.Hal.Device.KillSwitch"/>
+- <allow send_interface="org.freedesktop.Hal.Device.KeyboardBacklight"/>
+- <allow send_interface="org.freedesktop.Hal.Device.LaptopPanel"/>
+- <allow send_interface="org.freedesktop.Hal.Device.Leds"/>
+- <allow send_interface="org.freedesktop.Hal.Device.LightSensor"/>
+- <allow send_interface="org.freedesktop.Hal.Device.Storage"/>
+- <allow send_interface="org.freedesktop.Hal.Device.Storage.Removable"/>
+- <allow send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>
+- <allow send_interface="org.freedesktop.Hal.Device.Volume"/>
+- <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
+- <allow send_interface="org.freedesktop.Hal.Device.WakeOnLan"/>
++ <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>
+
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0044-check-udi-in-hal-get-property.patch b/hal-0.5.11-patches/0044-check-udi-in-hal-get-property.patch
new file mode 100644
index 00000000..7401a9bb
--- /dev/null
+++ b/hal-0.5.11-patches/0044-check-udi-in-hal-get-property.patch
@@ -0,0 +1,47 @@
+From b0a511392a712b89017bd3dbf7b1c17d25c9df3c Mon Sep 17 00:00:00 2001
+From: Richard Hughes <richard@hughsie.com>
+Date: Thu, 29 Jan 2009 08:33:00 +0000
+Subject: [PATCH 44/48] check udi in hal-get-property
+
+We are not checking if a UDI is valid in hal-get-property
+which means getting a horrible DBUS error if the entry
+is not a valid DBUS path.
+---
+ tools/hal_get_property.c | 14 ++++++++++++++
+ 1 files changed, 14 insertions(+), 0 deletions(-)
+
+diff --git a/tools/hal_get_property.c b/tools/hal_get_property.c
+index ecaa6ce..d31261a 100644
+--- a/tools/hal_get_property.c
++++ b/tools/hal_get_property.c
+@@ -84,6 +84,7 @@ main (int argc, char *argv[])
+ dbus_bool_t is_hex = FALSE;
+ dbus_bool_t is_verbose = FALSE;
+ dbus_bool_t is_version = FALSE;
++ dbus_bool_t udi_exists;
+ char *str;
+ DBusError error;
+
+@@ -168,6 +169,19 @@ main (int argc, char *argv[])
+ return 1;
+ }
+
++ /* check UDI exists */
++ udi_exists = libhal_device_exists (hal_ctx, udi, &error);
++ if (!udi_exists) {
++ fprintf (stderr, "error: UDI %s does not exist\n", udi);
++ return 1;
++ }
++ if (dbus_error_is_set(&error)) {
++ fprintf (stderr, "error: libhal_device_exists: %s: %s\n", error.name, error.message);
++ LIBHAL_FREE_DBUS_ERROR (&error);
++ return 1;
++ }
++
++ /* get type */
+ type = libhal_device_get_property_type (hal_ctx, udi, key, &error);
+ if (type == LIBHAL_PROPERTY_TYPE_INVALID) {
+ fprintf (stderr, "error: libhal_device_get_property_type: %s: %s\n", error.name, error.message);
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0045-set-the-retval-of-hal-device-correctly-on-error.patch b/hal-0.5.11-patches/0045-set-the-retval-of-hal-device-correctly-on-error.patch
new file mode 100644
index 00000000..60cf881b
--- /dev/null
+++ b/hal-0.5.11-patches/0045-set-the-retval-of-hal-device-correctly-on-error.patch
@@ -0,0 +1,55 @@
+From 0d526db56322d39707afadcd1f4a5133b724287a Mon Sep 17 00:00:00 2001
+From: Richard Hughes <richard@hughsie.com>
+Date: Thu, 29 Jan 2009 08:34:16 +0000
+Subject: [PATCH 45/48] set the retval of hal-device correctly on error
+
+At the moment hal-device always returns success.
+Only return success if a device was matched.
+---
+ tools/hal-device.c | 9 ++++++++-
+ 1 files changed, 8 insertions(+), 1 deletions(-)
+
+diff --git a/tools/hal-device.c b/tools/hal-device.c
+index e8bf348..38458a5 100644
+--- a/tools/hal-device.c
++++ b/tools/hal-device.c
+@@ -189,6 +189,7 @@ int dump_devices(LibHalContext *hal_ctx, char *arg)
+ {
+ int i;
+ int num_devices;
++ int retval;
+ char **device_names;
+ DBusError error;
+ char *udi = NULL;
+@@ -222,6 +223,9 @@ int dump_devices(LibHalContext *hal_ctx, char *arg)
+ num_devices = 1;
+ }
+
++ /* if _any_ device matches, we return success */
++ retval = 1;
++
+ for(i = 0; i < num_devices; i++) {
+ LibHalPropertySet *props;
+ LibHalPropertySetIterator it;
+@@ -233,6 +237,9 @@ int dump_devices(LibHalContext *hal_ctx, char *arg)
+ continue;
+ }
+
++ /* we got some properties */
++ retval = 0;
++
+ if (!udi)
+ printf("%d: ", i);
+ printf("udi = '%s'\n", device_names[i]);
+@@ -298,7 +305,7 @@ int dump_devices(LibHalContext *hal_ctx, char *arg)
+ libhal_free_string_array(device_names);
+ dbus_error_free(&error);
+
+- return 0;
++ return retval;
+ }
+
+
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0046-add-exhebro-policies.patch b/hal-0.5.11-patches/0046-add-exhebro-policies.patch
new file mode 100644
index 00000000..9f680bae
--- /dev/null
+++ b/hal-0.5.11-patches/0046-add-exhebro-policies.patch
@@ -0,0 +1,84 @@
+From a4d4c67a87e859d5a3099c79fb555084e51c5288 Mon Sep 17 00:00:00 2001
+From: Saleem Abdulrasool <compnerd@compnerd.org>
+Date: Sat, 31 Jan 2009 14:44:24 -0800
+Subject: [PATCH 46/48] add exhebro policies
+
+---
+ fdi/policy/10osvendor/20-storage-methods.fdi | 5 +++++
+ .../10osvendor/99-storage-policy-fixed-drives.fdi | 12 ++++++++++++
+ fdi/policy/10osvendor/Makefile.am | 3 ++-
+ hal.conf.in | 10 ++++++++++
+ 4 files changed, 29 insertions(+), 1 deletions(-)
+ create mode 100644 fdi/policy/10osvendor/99-storage-policy-fixed-drives.fdi
+
+diff --git a/fdi/policy/10osvendor/20-storage-methods.fdi b/fdi/policy/10osvendor/20-storage-methods.fdi
+index 9fbe202..8373ba8 100644
+--- a/fdi/policy/10osvendor/20-storage-methods.fdi
++++ b/fdi/policy/10osvendor/20-storage-methods.fdi
+@@ -153,6 +153,11 @@
+ </match>
+ </match>
+
++ <!-- Hide partitons marked as compaq diagnostics -->
++ <match key="volume.partition.type" string="0x12">
++ <merge key="volume.ignore" type="bool">true</merge>
++ </match>
++
+ <!-- EFI firmware partitions -->
+ <match key="volume.fstype" string="vfat">
+ <match key="volume.label" string="EFI">
+diff --git a/fdi/policy/10osvendor/99-storage-policy-fixed-drives.fdi b/fdi/policy/10osvendor/99-storage-policy-fixed-drives.fdi
+new file mode 100644
+index 0000000..1c4d201
+--- /dev/null
++++ b/fdi/policy/10osvendor/99-storage-policy-fixed-drives.fdi
+@@ -0,0 +1,12 @@
++<?xml version="1.0" encoding="UTF-8"?><!-- -*- SGML -*- -->
++
++<deviceinfo version="0.2">
++ <device>
++ <match key="@block.storage_device:storage.hotpluggable" bool="false">
++ <match key="@block.storage_device:storage.removable" bool="false">
++ <merge key="volume.ignore" type="bool">true</merge>
++ </match>
++ </match>
++ </device>
++</deviceinfo>
++
+diff --git a/fdi/policy/10osvendor/Makefile.am b/fdi/policy/10osvendor/Makefile.am
+index a30aac0..816b0a9 100644
+--- a/fdi/policy/10osvendor/Makefile.am
++++ b/fdi/policy/10osvendor/Makefile.am
+@@ -11,7 +11,8 @@ dist_fdi_DATA = \
+ 10-x11-input.fdi \
+ 15-storage-luks.fdi \
+ 20-storage-methods.fdi \
+- 30-wol.fdi
++ 30-wol.fdi \
++ 99-storage-policy-fixed-drives.fdi
+
+ if BUILD_KEYMAPS
+ dist_fdi_DATA += 10-keymap.fdi
+diff --git a/hal.conf.in b/hal.conf.in
+index bfd6511..a84f720 100644
+--- a/hal.conf.in
++++ b/hal.conf.in
+@@ -63,5 +63,15 @@
+ <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
+ </policy>
+
++ <!-- exherbo policies -->
++ <!-- allow plugdev to manage volumes and power management -->
++ <policy group="plugdev">
++ <allow send_interface="org.freedesktop.Hal.Device.Volume"/>
++ <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
++
++ <allow send_interface="org.freedesktop.Device.LaptopPanel"/>
++ <allow send_interface="org.freedesktop.Device.SystemPowerManagement"/>
++ </policy>
++
+ </busconfig>
+
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0047-add-with-udev-scripts-dir.patch b/hal-0.5.11-patches/0047-add-with-udev-scripts-dir.patch
new file mode 100644
index 00000000..3d7516c8
--- /dev/null
+++ b/hal-0.5.11-patches/0047-add-with-udev-scripts-dir.patch
@@ -0,0 +1,44 @@
+From 5bce3fa8cf51a9232761fe59a713ca3188efbfc0 Mon Sep 17 00:00:00 2001
+From: Saleem Abdulrasool <compnerd@compnerd.org>
+Date: Sat, 31 Jan 2009 14:58:28 -0800
+Subject: [PATCH 47/48] add --with-udev-scripts-dir
+
+THis allows installing the udev scripts into a directory other than /lib (say
+/lib64 for pure 64-bit systems).
+---
+ configure.in | 6 ++++++
+ tools/linux/Makefile.am | 2 +-
+ 2 files changed, 7 insertions(+), 1 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index e253a8a..6b16d20 100644
+--- a/configure.in
++++ b/configure.in
+@@ -1000,6 +1000,12 @@ if test "x$with_linux_input_header" != "x"; then
+ AC_DEFINE_UNQUOTED(HAL_LINUX_INPUT_HEADER_H, "$with_linux_input_header", [If set, the header to use instead of <linux/input.h>])
+ fi
+
++AC_ARG_WITH([udev-scripts-dir],
++ AS_HELP_STRING([--with-udev-scripts-dir=<path>],
++ [Use a given path for udev scripts]),
++ [udev_scripts_dir=$withval], [udev_scripts_dir=/lib])
++AC_SUBST([udev_scripts_dir])
++
+ dnl
+ dnl SUBSETTING END
+ dnl
+diff --git a/tools/linux/Makefile.am b/tools/linux/Makefile.am
+index 768c92e..243de32 100644
+--- a/tools/linux/Makefile.am
++++ b/tools/linux/Makefile.am
+@@ -1,6 +1,6 @@
+ ## Process this file with automake to produce Makefile.in
+
+-udevrulesdir = /lib/udev/rules.d
++udevrulesdir = $(udev_scripts_dir)/udev/rules.d
+ udevrules_DATA = 90-hal.rules
+
+
+--
+1.6.1.2
+
diff --git a/hal-0.5.11-patches/0048-use-evdev-for-touchpads-for-linux.patch b/hal-0.5.11-patches/0048-use-evdev-for-touchpads-for-linux.patch
new file mode 100644
index 00000000..177ad5f6
--- /dev/null
+++ b/hal-0.5.11-patches/0048-use-evdev-for-touchpads-for-linux.patch
@@ -0,0 +1,33 @@
+From 71f57f3aaae7c72eab8b1b3dae7d03d3f91ed377 Mon Sep 17 00:00:00 2001
+From: Saleem Abdulrasool <compnerd@compnerd.org>
+Date: Sat, 31 Jan 2009 17:11:16 -0800
+Subject: [PATCH 48/48] use evdev for touchpads for linux
+
+Some touchpads only register as touchpads and not as mice. Ensure they use the
+evdev driver.
+---
+ fdi/policy/10osvendor/10-x11-input.fdi | 8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+diff --git a/fdi/policy/10osvendor/10-x11-input.fdi b/fdi/policy/10osvendor/10-x11-input.fdi
+index 6bd8e76..4a54176 100644
+--- a/fdi/policy/10osvendor/10-x11-input.fdi
++++ b/fdi/policy/10osvendor/10-x11-input.fdi
+@@ -10,6 +10,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.keys">
+ <!-- If we're using Linux, we use evdev by default (falling back to
+ keyboard otherwise). -->
+--
+1.6.1.2
+