rpms/hal/F-11 hal-fix-segfault-in-mdraid.patch, NONE, 1.1 hal.spec, 1.191, 1.192

Richard Hughes rhughes at fedoraproject.org
Wed Aug 12 08:54:31 UTC 2009


Author: rhughes

Update of /cvs/pkgs/rpms/hal/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv18350

Modified Files:
	hal.spec 
Added Files:
	hal-fix-segfault-in-mdraid.patch 
Log Message:
* Wed Aug 12 2009 Richard Hughes <rhughes at redhat.com> - 0.5.12-29.20090226git
- Backport a commit from git master to fix mdraid detection.
- Fixes #507782


hal-fix-segfault-in-mdraid.patch:
 blockdev.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- NEW FILE hal-fix-segfault-in-mdraid.patch ---
commit 141ca8cd7b768ddefa1bfaa563cbef4337e32b7c
Author: Martin Poole <mpoole at redhat.com>
Date:   Wed Jul 29 14:20:45 2009 +0100

    Fix a segfault in the mdraid code -- see rh#507782 for more info
    
    Signed-off-by: Richard Hughes <richard at hughsie.com>

diff --git a/hald/linux/blockdev.c b/hald/linux/blockdev.c
index 69ba026..7b47431 100644
--- a/hald/linux/blockdev.c
+++ b/hald/linux/blockdev.c
@@ -878,7 +878,7 @@ error:
 }
 
 
-void
+
 hotplug_event_begin_add_blockdev (const gchar *sysfs_path, const gchar *device_file, gboolean is_partition,
 				  HalDevice *parent, void *end_token)
 {
@@ -893,6 +893,7 @@ hotplug_event_begin_add_blockdev (const gchar *sysfs_path, const gchar *device_f
         gboolean is_md_device;
 	gboolean is_cciss_device;
         int md_number;
+	char tc;
 
 	is_device_mapper = FALSE;
         is_fakevolume = FALSE;
@@ -911,7 +912,7 @@ hotplug_event_begin_add_blockdev (const gchar *sysfs_path, const gchar *device_f
 		HAL_INFO (("Handling %s as fakevolume - sysfs_path_real=%s", device_file, sysfs_path_real));
 		is_fakevolume = TRUE;
 		sysfs_path_real = hal_util_get_parent_path (sysfs_path);
-        } else if (sscanf (hal_util_get_last_element (sysfs_path), "md%d", &md_number) == 1) {
+        } else if (sscanf (hal_util_get_last_element (sysfs_path), "md%d%c", &md_number, &tc) == 1) {
 		HAL_INFO (("Handling %s as MD device", device_file));
                 is_md_device = TRUE;
 		sysfs_path_real = g_strdup (sysfs_path);


Index: hal.spec
===================================================================
RCS file: /cvs/pkgs/rpms/hal/F-11/hal.spec,v
retrieving revision 1.191
retrieving revision 1.192
diff -u -p -r1.191 -r1.192
--- hal.spec	3 Aug 2009 14:37:20 -0000	1.191
+++ hal.spec	12 Aug 2009 08:54:31 -0000	1.192
@@ -28,7 +28,7 @@ Summary: Hardware Abstraction Layer
 Name: hal
 Version: 0.5.12
 #Release: 14%{?dist}
-Release: 28.%{?alphatag}%{?dist}
+Release: 29.%{?alphatag}%{?dist}
 URL: http://www.freedesktop.org/Software/hal
 #Source0: http://hal.freedesktop.org/releases/%{name}-%{version}rc1.tar.bz2
 Source0: http://hal.freedesktop.org/releases/%{name}-%{version}-%{?alphatag}.tar.gz
@@ -54,6 +54,9 @@ Patch9: hal-KVM-evdev.patch
 # upstream, f710e0fda727d102291a44d1ce153ea22eac6c3e
 Patch10: hal-0.5.12-fix-imebus-devices.patch
 
+# upstream, 141ca8cd7b768ddefa1bfaa563cbef4337e32b7c
+Patch11: hal-fix-segfault-in-mdraid.patch
+
 License: AFL or GPLv2
 Group: System Environment/Libraries
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 
@@ -151,6 +154,7 @@ API docs for HAL.
 %patch8 -p1 -b .fix-udev
 %patch9 -p1 -b .kvm-evdev
 %patch10 -p1 -b .ehea-devices
+%patch11 -p1 -b .fix-mdraid
 
 %build
 %configure                                  \
@@ -302,6 +306,10 @@ fi
 %{_datadir}/gtk-doc/html/libhal-storage/*
 
 %changelog
+* Wed Aug 12 2009 Richard Hughes <rhughes at redhat.com> - 0.5.12-29.20090226git
+- Backport a commit from git master to fix mdraid detection.
+- Fixes #507782
+
 * Mon Aug 03 2009 Richard Hughes <rhughes at redhat.com> - 0.5.12-28.20090226git
 - Actually apply the patch from the last commit.
 - Fixes #496820




More information about the fedora-extras-commits mailing list