From d78ea206d25fbaa9c96e8373e2bd1f80343244c4 Mon Sep 17 00:00:00 2001 From: Doug Ledford Date: Fri, 13 Feb 2009 20:15:04 +0000 Subject: [PATCH] - Update to latest upstream devel release - Use the udev rules file included with mdadm instead of our own - Drop all the no longer relevant patches - Fix a build error in mdopen.c - Fix the udev rules path in Makefile - Fix a compile issue with the __le32_to_cpu() macro usage (bad juju to to operations on the target of the macro as it could get executed multiple times, and gcc now throws an error on that) --- mdadm-3.0-alias.patch | 15 +++++++++++++++ mdadm.spec | 5 +++++ 2 files changed, 20 insertions(+) create mode 100644 mdadm-3.0-alias.patch diff --git a/mdadm-3.0-alias.patch b/mdadm-3.0-alias.patch new file mode 100644 index 0000000..5518301 --- /dev/null +++ b/mdadm-3.0-alias.patch @@ -0,0 +1,15 @@ +--- mdadm-3.0-devel2/super-intel.c.undef 2009-02-13 15:09:40.000000000 -0500 ++++ mdadm-3.0-devel2/super-intel.c 2009-02-13 15:09:58.000000000 -0500 +@@ -271,8 +271,10 @@ static __u32 __gen_imsm_checksum(struct + __u32 *p = (__u32 *) mpb; + __u32 sum = 0; + +- while (end--) +- sum += __le32_to_cpu(*p++); ++ while (end--) { ++ sum += __le32_to_cpu(*p); ++ p++; ++ } + + return sum - __le32_to_cpu(mpb->check_sum); + } diff --git a/mdadm.spec b/mdadm.spec index 641ff5f..26bf7d2 100644 --- a/mdadm.spec +++ b/mdadm.spec @@ -7,6 +7,7 @@ Source1: mdmonitor.init Patch1: mdadm-3.0-udev.patch Patch2: mdadm-3.0-warn.patch Patch3: mdadm-2.5.2-static.patch +Patch4: mdadm-3.0-alias.patch URL: http://www.kernel.org/pub/linux/utils/raid/mdadm/ License: GPLv2+ Group: System Environment/Base @@ -28,6 +29,7 @@ file can be used to help with some common tasks. %patch1 -p1 -b .udev %patch2 -p1 -b .warn %patch3 -p1 -b .static +%patch4 -p1 -b .alias %build make %{?_smp_mflags} CXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" SYSCONFDIR="%{_sysconfdir}" mdadm.static mdadm mdmon @@ -82,6 +84,9 @@ fi - Drop all the no longer relevant patches - Fix a build error in mdopen.c - Fix the udev rules path in Makefile +- Fix a compile issue with the __le32_to_cpu() macro usage (bad juju to + to operations on the target of the macro as it could get executed + multiple times, and gcc now throws an error on that) * Fri Oct 24 2008 Doug Ledford - 2.6.7.1-1 - Updated to latest upstream stable release (#466803)