From 8a34b074db1e60dbdd46c64120ab01eb17252b90 Mon Sep 17 00:00:00 2001 From: steev Date: Thu, 5 Feb 2009 14:23:38 -0600 Subject: Add patches and examples --- README | 4 + ...y80211-instead-of-wiphy-symlink-to-detect.patch | 50 ++++++++ ...ioctl-instead-of-sysfs-to-detect-wireless.patch | 72 ++++++++++++ ...0003-don-t-leak-file-descriptor-on-umount.patch | 31 +++++ ...include-config.h-before-any-other-headers.patch | 41 +++++++ ...mory-leaks-related-to-usage-of-g_strsplit.patch | 58 +++++++++ ...d-ThinkPad-events-to-acpi-addon-for-IBM-L.patch | 42 +++++++ .../0007-fixed-fdi.dtd-for-the-remove-rule.patch | 27 +++++ .../0008-add-libtool-2.2-support.patch | 27 +++++ ...i-support-to-hal-system-power-suspend-lin.patch | 25 ++++ ...lume.num_blocks-can-become-larger-than-2G.patch | 34 ++++++ ...battery-and-AC-handling-with-power_supply.patch | 66 +++++++++++ .../0012-fixed-possible-memory-leak.patch | 28 +++++ .../0013-fixed-merge-for-uint64.patch | 28 +++++ .../0014-fixed-device-removage.patch | 32 +++++ .../0015-make-hal-start-a-lot-faster.patch | 57 +++++++++ hal-0.5.11-patches/0016-fixed-Lock-handling.patch | 129 +++++++++++++++++++++ .../0017-unify-directory-usage-under-var-run.patch | 28 +++++ ...-check-for-ConsoleKit-v0.3.1-to-configure.patch | 39 +++++++ ...dapt-new-CK-library-version-v0.3.1-to-HAL.patch | 79 +++++++++++++ ...trospection-for-org.freedesktop.Hal.Manag.patch | 50 ++++++++ ...se-udevadm-instead-of-deprecated-udevinfo.patch | 43 +++++++ ...-sysfs-path-at-the-right-position-for-cal.patch | 27 +++++ ...ol-don-t-free-strings-that-are-not-suppos.patch | 36 ++++++ ...x-issue-on-64bit-big-endian-architectures.patch | 41 +++++++ ...-from-automounting-Dell-recovery-partitio.patch | 31 +++++ .../0026-fix-some-configure-issues.patch | 68 +++++++++++ .../0027-fix-Dell-bluetooth-killswitch.patch | 59 ++++++++++ ...forced-removal-of-the-trailing-newline-to.patch | 58 +++++++++ .../0029-fix-building-on-Linux-2.6.28.patch | 27 +++++ ...030-install-udev-rule-to-lib-udev-rules.d.patch | 24 ++++ ...calling-KillSwitch-methods-in-D-Bus-confi.patch | 36 ++++++ ...32-put-policy-rules-in-alphabetical-order.patch | 50 ++++++++ ...for-org.freedesktop.Hal.Device.KillSwitch.patch | 27 +++++ ...olicy-rule-for-org.freedesktop.Hal.Device.patch | 34 ++++++ ...olicy-rule-for-org.freedesktop.Hal.Device.patch | 34 ++++++ ...olicy-rule-for-org.freedesktop.Hal.Device.patch | 34 ++++++ ...olicy-rule-for-org.freedesktop.Hal.Device.patch | 34 ++++++ ...olicy-rule-for-org.freedesktop.Hal.Device.patch | 34 ++++++ ...edesktop.Hal.Device.WakeOnLan-to-HAL-D-Bu.patch | 35 ++++++ ...eedesktop.Hal.Device.Storage-to-HAL-D-Bus.patch | 35 ++++++ ...eedesktop.Hal.Device.DockStation-to-HAL-D.patch | 35 ++++++ ...-all-receive_-lines-from-HAL-D-Bus-config.patch | 64 ++++++++++ ...D-Bus-config-added-send_destination-for-a.patch | 87 ++++++++++++++ .../0044-check-udi-in-hal-get-property.patch | 47 ++++++++ ...e-retval-of-hal-device-correctly-on-error.patch | 55 +++++++++ hal-0.5.11-patches/0046-add-exhebro-policies.patch | 84 ++++++++++++++ .../0047-add-with-udev-scripts-dir.patch | 44 +++++++ .../0048-use-evdev-for-touchpads-for-linux.patch | 33 ++++++ hal-config-examples/migrate-xorg-to-fdi.py | 69 +++++++++++ hal-config-examples/use-estonian-layout.fdi | 12 ++ hal-config-examples/use-kbd-driver.fdi | 17 +++ hal-config-examples/use-mouse-driver.fdi | 16 +++ .../use-multiple-layouts-with-kbd.fdi | 17 +++ hal-config-examples/use-multiple-layouts.fdi | 20 ++++ 55 files changed, 2314 insertions(+) create mode 100644 hal-0.5.11-patches/0001-use-phy80211-instead-of-wiphy-symlink-to-detect.patch create mode 100644 hal-0.5.11-patches/0002-use-wext-ioctl-instead-of-sysfs-to-detect-wireless.patch create mode 100644 hal-0.5.11-patches/0003-don-t-leak-file-descriptor-on-umount.patch create mode 100644 hal-0.5.11-patches/0004-include-config.h-before-any-other-headers.patch create mode 100644 hal-0.5.11-patches/0005-fixed-memory-leaks-related-to-usage-of-g_strsplit.patch create mode 100644 hal-0.5.11-patches/0006-add-zoom-and-ThinkPad-events-to-acpi-addon-for-IBM-L.patch create mode 100644 hal-0.5.11-patches/0007-fixed-fdi.dtd-for-the-remove-rule.patch create mode 100644 hal-0.5.11-patches/0008-add-libtool-2.2-support.patch create mode 100644 hal-0.5.11-patches/0009-add-save-pci-support-to-hal-system-power-suspend-lin.patch create mode 100644 hal-0.5.11-patches/0010-volume.num_blocks-can-become-larger-than-2G.patch create mode 100644 hal-0.5.11-patches/0011-fix-PMU-battery-and-AC-handling-with-power_supply.patch create mode 100644 hal-0.5.11-patches/0012-fixed-possible-memory-leak.patch create mode 100644 hal-0.5.11-patches/0013-fixed-merge-for-uint64.patch create mode 100644 hal-0.5.11-patches/0014-fixed-device-removage.patch create mode 100644 hal-0.5.11-patches/0015-make-hal-start-a-lot-faster.patch create mode 100644 hal-0.5.11-patches/0016-fixed-Lock-handling.patch create mode 100644 hal-0.5.11-patches/0017-unify-directory-usage-under-var-run.patch create mode 100644 hal-0.5.11-patches/0018-added-check-for-ConsoleKit-v0.3.1-to-configure.patch create mode 100644 hal-0.5.11-patches/0019-adapt-new-CK-library-version-v0.3.1-to-HAL.patch create mode 100644 hal-0.5.11-patches/0020-fix-DBus-introspection-for-org.freedesktop.Hal.Manag.patch create mode 100644 hal-0.5.11-patches/0021-use-udevadm-instead-of-deprecated-udevinfo.patch create mode 100644 hal-0.5.11-patches/0022-inserts-the-sysfs-path-at-the-right-position-for-cal.patch create mode 100644 hal-0.5.11-patches/0023-hal-acl-tool-don-t-free-strings-that-are-not-suppos.patch create mode 100644 hal-0.5.11-patches/0024-fix-issue-on-64bit-big-endian-architectures.patch create mode 100644 hal-0.5.11-patches/0025-prevent-hal-from-automounting-Dell-recovery-partitio.patch create mode 100644 hal-0.5.11-patches/0026-fix-some-configure-issues.patch create mode 100644 hal-0.5.11-patches/0027-fix-Dell-bluetooth-killswitch.patch create mode 100644 hal-0.5.11-patches/0028-remove-the-forced-removal-of-the-trailing-newline-to.patch create mode 100644 hal-0.5.11-patches/0029-fix-building-on-Linux-2.6.28.patch create mode 100644 hal-0.5.11-patches/0030-install-udev-rule-to-lib-udev-rules.d.patch create mode 100644 hal-0.5.11-patches/0031-aallowllow-calling-KillSwitch-methods-in-D-Bus-confi.patch create mode 100644 hal-0.5.11-patches/0032-put-policy-rules-in-alphabetical-order.patch create mode 100644 hal-0.5.11-patches/0033-fix-policy-for-org.freedesktop.Hal.Device.KillSwitch.patch create mode 100644 hal-0.5.11-patches/0034-add-DBus-policy-rule-for-org.freedesktop.Hal.Device.patch create mode 100644 hal-0.5.11-patches/0035-add-DBus-policy-rule-for-org.freedesktop.Hal.Device.patch create mode 100644 hal-0.5.11-patches/0036-add-DBus-policy-rule-for-org.freedesktop.Hal.Device.patch create mode 100644 hal-0.5.11-patches/0037-add-D-Bus-policy-rule-for-org.freedesktop.Hal.Device.patch create mode 100644 hal-0.5.11-patches/0038-add-D-Bus-policy-rule-for-org.freedesktop.Hal.Device.patch create mode 100644 hal-0.5.11-patches/0039-add-org.freedesktop.Hal.Device.WakeOnLan-to-HAL-D-Bu.patch create mode 100644 hal-0.5.11-patches/0040-add-org.freedesktop.Hal.Device.Storage-to-HAL-D-Bus.patch create mode 100644 hal-0.5.11-patches/0041-add-org.freedesktop.Hal.Device.DockStation-to-HAL-D.patch create mode 100644 hal-0.5.11-patches/0042-remove-all-receive_-lines-from-HAL-D-Bus-config.patch create mode 100644 hal-0.5.11-patches/0043-fixed-HAL-D-Bus-config-added-send_destination-for-a.patch create mode 100644 hal-0.5.11-patches/0044-check-udi-in-hal-get-property.patch create mode 100644 hal-0.5.11-patches/0045-set-the-retval-of-hal-device-correctly-on-error.patch create mode 100644 hal-0.5.11-patches/0046-add-exhebro-policies.patch create mode 100644 hal-0.5.11-patches/0047-add-with-udev-scripts-dir.patch create mode 100644 hal-0.5.11-patches/0048-use-evdev-for-touchpads-for-linux.patch create mode 100755 hal-config-examples/migrate-xorg-to-fdi.py create mode 100644 hal-config-examples/use-estonian-layout.fdi create mode 100644 hal-config-examples/use-kbd-driver.fdi create mode 100644 hal-config-examples/use-mouse-driver.fdi create mode 100644 hal-config-examples/use-multiple-layouts-with-kbd.fdi create mode 100644 hal-config-examples/use-multiple-layouts.fdi diff --git a/README b/README index e69de29b..0bb71e6f 100644 --- a/README +++ b/README @@ -0,0 +1,4 @@ +Gentoo patches for HAL based on the latest from Compnerd's new exherbo patchset. + +TODO: +Compare exherbo policies (0046) to Gentoo policies and see if/how they differ. 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 +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 +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 + #endif + ++/* for wireless extensions */ ++#include ++#include ++ + #include + #include + +@@ -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 +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 +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 ++#endif ++ + #include + #include + #include +@@ -39,10 +43,6 @@ + #include "partutil.h" + + +-#ifdef HAVE_CONFIG_H +-# include +-#endif +- + + #ifdef USE_PARTED + #include +-- +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 +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, + " \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 +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 +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 @@ + + + + +-- +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?= +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 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 +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, + " \n" + " \n" +- " \n" ++ " \n" + " \n" + " \n" +- " \n" ++ " \n" + " \n" + " \n" + " \n" +- " \n" ++ " \n" + " \n" + " \n" +- " \n" ++ " \n" + " \n" + " \n" + " \n" + " \n" +- " \n" ++ " \n" + " \n" + " \n" + " \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 +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 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?= +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 +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 +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 +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 @@ + + + ++ ++ ++ true ++ ++ ++ + + + +-- +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?= +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 +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 ]: +> 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 +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 +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 ++#include + #include + #include + #include +-- +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 +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 +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 @@ + + + ++ + + + + + ++ + + +-- +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 +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 @@ + + +- ++ + +- ++ ++ + ++ + +- ++ + ++ + +- + +- ++ + ++ + + +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 @@ + + + ++ + + +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 @@ + + + ++ + + + +@@ -37,6 +38,8 @@ + receive_sender="org.freedesktop.Hal"/> + ++ + + +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 @@ + + ++ + + + +@@ -34,6 +35,8 @@ + + + ++ + + +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 @@ + + + ++ + + + +@@ -43,6 +44,8 @@ + receive_sender="org.freedesktop.Hal"/> + ++ + + +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 @@ + + + ++ + + + +@@ -38,6 +39,8 @@ + + ++ + + +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 @@ + + + ++ + + + +@@ -49,6 +50,8 @@ + receive_sender="org.freedesktop.Hal"/> + ++ + + +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 @@ + + + ++ + + +@@ -58,6 +59,8 @@ + receive_sender="org.freedesktop.Hal"/> + ++ + + + + + +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 @@ + + +- +- ++ ++ + +- +- +- +- +- +- +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +-- +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 +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 +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 +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 @@ + + + ++ ++ ++ true ++ ++ + + + +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 @@ ++ ++ ++ ++ ++ ++ ++ true ++ ++ ++ ++ ++ +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 @@ + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + +-- +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 +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 ]) + fi + ++AC_ARG_WITH([udev-scripts-dir], ++ AS_HELP_STRING([--with-udev-scripts-dir=], ++ [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 +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 @@ + + + ++ ++ mouse ++ ++ evdev ++ ++ ++ + + +-- +1.6.1.2 + diff --git a/hal-config-examples/migrate-xorg-to-fdi.py b/hal-config-examples/migrate-xorg-to-fdi.py new file mode 100755 index 00000000..5b0ec9c8 --- /dev/null +++ b/hal-config-examples/migrate-xorg-to-fdi.py @@ -0,0 +1,69 @@ +#!/usr/bin/env python +# -*- encoding: utf-8 -*- +# Copyright (c) 2008 Saleem Abdulrasool + +# Very simple script which converts the InputDevice section for keyboards into a +# FDI rule. Any time a specific model is present, we ignore it and set it to +# evdev, as that will be the driver used. + +import sys +import xf86config +from xf86config import XF86SectionMissing + +def xkb_model(value): + model = ' ' % (value,) + '\n' + model += ' evdev' + + return model + +def xkb_rules(value): + return ' %s' % (value,) + +def xkb_layout(value): + return ' %s' % (value,) + +def xkb_options(values): + options = ' %s' % (values.split(',')[0]) + for value in values.split(',')[1:]: + options += '\n' + ' %s' % (value,) + + return options + +def xkb_variant(value): + return ' %s' % (value,) + +if __name__ == '__main__': + OptionHandlers = { + 'XkbModel' : xkb_model, + 'XkbRules' : xkb_rules, + 'XkbLayout' : xkb_layout, + 'XkbOptions' : xkb_options, + 'XkbVariant' : xkb_variant, + } + + (configuration, path) = xf86config.readConfigFile() + + if not configuration: + sys.stderr.write("Failed to read xorg.conf\n") + sys.exit(-1) + + try: + keyboard = xf86config.getCoreKeyboard(configuration) + except XF86SectionMissing: + sys.stderr.write("No CoreKeyboard\n") + sys.exit(-1) + + rule = '' + '\n' + rule += '' + '\n' + rule += ' ' + '\n' + for option in keyboard.options: + if option.name in OptionHandlers: + rule += OptionHandlers[option.name](option.val) + '\n' + else: + sys.stderr.write('Failed to translate: %s %s\n' % (option.name, option.val)) + rule += ' ' + '\n' + rule += '' + '\n' + + print rule + +# vim: set ts=3 sw=3 et nowrap: diff --git a/hal-config-examples/use-estonian-layout.fdi b/hal-config-examples/use-estonian-layout.fdi new file mode 100644 index 00000000..4a3e087b --- /dev/null +++ b/hal-config-examples/use-estonian-layout.fdi @@ -0,0 +1,12 @@ + + + + + ee + + diff --git a/hal-config-examples/use-kbd-driver.fdi b/hal-config-examples/use-kbd-driver.fdi new file mode 100644 index 00000000..836e8a32 --- /dev/null +++ b/hal-config-examples/use-kbd-driver.fdi @@ -0,0 +1,17 @@ + + + + + + + + kbd + + diff --git a/hal-config-examples/use-mouse-driver.fdi b/hal-config-examples/use-mouse-driver.fdi new file mode 100644 index 00000000..08ea1d78 --- /dev/null +++ b/hal-config-examples/use-mouse-driver.fdi @@ -0,0 +1,16 @@ + + + + + + + mouse + + diff --git a/hal-config-examples/use-multiple-layouts-with-kbd.fdi b/hal-config-examples/use-multiple-layouts-with-kbd.fdi new file mode 100644 index 00000000..2034e907 --- /dev/null +++ b/hal-config-examples/use-multiple-layouts-with-kbd.fdi @@ -0,0 +1,17 @@ + + + + + pc105 + en,fr + grp:shift_toggle + + diff --git a/hal-config-examples/use-multiple-layouts.fdi b/hal-config-examples/use-multiple-layouts.fdi new file mode 100644 index 00000000..e9f289e4 --- /dev/null +++ b/hal-config-examples/use-multiple-layouts.fdi @@ -0,0 +1,20 @@ + + + + + gb,pl + ,winkeys + grp:caps_toggle + grp_led:caps + compose:ralt + + -- cgit v1.2.3-65-gdbad