summaryrefslogtreecommitdiffstats
path: root/source/l/hal
diff options
context:
space:
mode:
Diffstat (limited to 'source/l/hal')
-rwxr-xr-xsource/l/hal/hal.SlackBuild15
-rw-r--r--source/l/hal/patches/fix-build-with-automake-1.11.1.patch27
-rw-r--r--source/l/hal/patches/fix-hal-segfault.patch33
-rw-r--r--source/l/hal/patches/ignore_internal_dm_devices.diff47
4 files changed, 120 insertions, 2 deletions
diff --git a/source/l/hal/hal.SlackBuild b/source/l/hal/hal.SlackBuild
index 967136868..57d9e3bc6 100755
--- a/source/l/hal/hal.SlackBuild
+++ b/source/l/hal/hal.SlackBuild
@@ -23,7 +23,7 @@
PKGNAM=hal
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
NUMJOBS=${NUMJOBS:--j7}
@@ -90,6 +90,17 @@ zcat $CWD/patches/fix_ioperm_arguments.patch.gz | patch -p1 --verbose || exit 1
# Fix segfaults from not calling dbus_error_init() early enough
zcat $CWD/patches/fix_segfault-dbus_error_init.patch.gz | patch -p1 --verbose || exit 1
+# Ignore internal DM devices with new DM udev rules
+# https://bugzilla.redhat.com/show_bug.cgi?id=613909
+# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=586286
+zcat $CWD/patches/ignore_internal_dm_devices.diff.gz | patch -p1 --verbose || exit 1
+
+# Fix build with automake 1.11.1
+zcat $CWD/patches/fix-build-with-automake-1.11.1.patch | patch -p1 --verbose || exit 1
+
+# Fix segfault in hald/linux/device.c
+zcat $CWD/patches/fix-hal-segfault.patch | patch -p1 --verbose || exit 1
+
autoconf
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -107,7 +118,7 @@ CXXFLAGS="$SLKCFLAGS" \
--with-pid-file=/var/run/hald/pid \
--enable-parted \
--disable-policy-kit \
- --disable-console-kit \
+ --enable-console-kit \
--disable-acl-management \
--enable-umount-helper \
--enable-sonypic \
diff --git a/source/l/hal/patches/fix-build-with-automake-1.11.1.patch b/source/l/hal/patches/fix-build-with-automake-1.11.1.patch
new file mode 100644
index 000000000..13d1817ce
--- /dev/null
+++ b/source/l/hal/patches/fix-build-with-automake-1.11.1.patch
@@ -0,0 +1,27 @@
+From ce8422fc8ec4881c5e54b651af3ef4ce2ca96847 Mon Sep 17 00:00:00 2001
+From: Bernhard Rosenkraenzer <bero@arklinux.org>
+Date: Mon, 23 Aug 2010 14:50:40 +0200
+Subject: [PATCH] fix build with automake 1.11.1
+
+Fixed build with automake 1.11.1: whitespace following trailing backslash.
+fd.o#29085
+---
+ policy/Makefile.am | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/policy/Makefile.am b/policy/Makefile.am
+index b506a08..503e9f3 100644
+--- a/policy/Makefile.am
++++ b/policy/Makefile.am
+@@ -24,7 +24,7 @@ check:
+ then \
+ echo ok; \
+ else \
+- echo failed; \
++ echo failed; \
+ exit 1; \
+ fi; \
+ done;
+--
+1.7.3.2
+
diff --git a/source/l/hal/patches/fix-hal-segfault.patch b/source/l/hal/patches/fix-hal-segfault.patch
new file mode 100644
index 000000000..4e409e318
--- /dev/null
+++ b/source/l/hal/patches/fix-hal-segfault.patch
@@ -0,0 +1,33 @@
+From fc9571c07a81aba8a8fdaa8014d4034b6456d203 Mon Sep 17 00:00:00 2001
+From: Michael Schroeder <mls@novell.com>
+Date: Mon, 23 Aug 2010 16:13:13 +0200
+Subject: [PATCH] fix hal segfault
+
+Fixed hal segfault. It crashes because strlen() gets called with a
+NULL pointer (ppdev_compute_udi calls hal_util_get_last_element
+with a NULL pointer).
+
+bnc#556485
+---
+ hald/linux/device.c | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/hald/linux/device.c b/hald/linux/device.c
+index 8570d46..401dc44 100644
+--- a/hald/linux/device.c
++++ b/hald/linux/device.c
+@@ -2287,9 +2287,10 @@ ppdev_compute_udi (HalDevice *d)
+ gchar udi[256];
+ const char *name;
+
+- name = hal_util_get_last_element( hal_device_property_get_string(d, "linux.device_file"));
++ name = hal_device_property_get_string (d, "linux.device_file");
+
+ if (name) {
++ name = hal_util_get_last_element (name);
+ hald_compute_udi (udi, sizeof (udi), "/org/freedesktop/Hal/devices/ppdev_%s", name);
+ } else {
+ hald_compute_udi (udi, sizeof (udi), "/org/freedesktop/Hal/devices/ppdev");
+--
+1.7.3.2
+
diff --git a/source/l/hal/patches/ignore_internal_dm_devices.diff b/source/l/hal/patches/ignore_internal_dm_devices.diff
new file mode 100644
index 000000000..735a45f3d
--- /dev/null
+++ b/source/l/hal/patches/ignore_internal_dm_devices.diff
@@ -0,0 +1,47 @@
+From 6f16321da13f6a7cbd9c424ddba2e727e434fa25 Mon Sep 17 00:00:00 2001
+From: Milan Broz <mbroz@redhat.com>
+Date: Tue, 13 Jul 2010 16:07:32 +0200
+Subject: [PATCH] HAL: Ignore internal DM devices with new DM udev rules
+
+With new device-mapper udev rules are /dev/mapper/* symlinks
+to basic device name /dev/dm-X.
+(Change requested by udev upstream.)
+
+This change breaks temporary-cryptsetup workaround inside hal.
+
+With new dm-udev rules (uncluded since device-mapper 1.02.39)
+there is DM_UDEV_DISABLE_OTHER_RULES_FLAG variable
+which controls that scan should be ignored for this device
+(it is set for all internal devices, including temporary cryptsetup,
+internal parts of lvm devices etc.)
+
+Ignore device if this flag is set.
+
+See bugs
+https://bugzilla.redhat.com/show_bug.cgi?id=613909
+http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=586286
+
+Signed-off-by: Milan Broz <mbroz@redhat.com>
+---
+ hald/linux/osspec.c | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+diff --git a/hald/linux/osspec.c b/hald/linux/osspec.c
+index a8233fd..6d616bc 100644
+--- a/hald/linux/osspec.c
++++ b/hald/linux/osspec.c
+@@ -215,6 +215,11 @@ hald_udev_data (GIOChannel *source, GIOCondition condition, gpointer user_data)
+ g_free (str);
+ }
+ g_free (dstr);
++ } else if (strncmp(key, "DM_UDEV_DISABLE_OTHER_RULES_FLAG=", 33) == 0) {
++ if (strtoul(&key[33], NULL, 10) == 1) {
++ HAL_INFO (("ignoring device requested by DM udev rules"));
++ goto invalid;
++ }
+ }
+ }
+
+--
+1.7.3.2
+