From 0c1503b68ab7fd1f7587bf16e27c3b48d2e8473aac336fa562cdf6c8b526bb6e Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 6 Oct 2008 15:46:23 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/mdadm?expand=0&rev=16 --- mdadm.changes | 10 ++++++++ mdadm.spec | 12 ++++++++-- mdmon-ia64-clone.patch | 33 +++++++++++++++++++++++++++ super-intel-undefined-operation.patch | 24 +++++++++++++++++++ 4 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 mdmon-ia64-clone.patch create mode 100644 super-intel-undefined-operation.patch diff --git a/mdadm.changes b/mdadm.changes index a69b4e7..ff84ada 100644 --- a/mdadm.changes +++ b/mdadm.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Fri Oct 3 15:28:49 CEST 2008 - mmarek@suse.cz + +- fixed mdmon's clone_monitor on ia64 + +------------------------------------------------------------------- +Fri Oct 3 14:28:55 CEST 2008 - mmarek@suse.cz + +- fixed byte swapping in super-intel.c on big endian. + ------------------------------------------------------------------- Wed Sep 24 18:24:25 CEST 2008 - ro@suse.de diff --git a/mdadm.spec b/mdadm.spec index 09e5d24..33cfa29 100644 --- a/mdadm.spec +++ b/mdadm.spec @@ -20,7 +20,7 @@ Name: mdadm Version: 3.0 -Release: 2 +Release: 3 %define ver 3.0-devel1 BuildRequires: sgmltool PreReq: %fillup_prereq %insserv_prereq @@ -28,10 +28,12 @@ Obsoletes: raidtools AutoReqProv: on Group: System/Base License: GPL v2 or later -Url: http://www.kernel.org/pub/linux/utils/mdadm/ +Url: http://www.kernel.org/pub/linux/utils/raid/mdadm/ Summary: Utility for Configuring MD Setup BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: %{name}-%{ver}.tar.bz2 +Patch1: super-intel-undefined-operation.patch +Patch2: mdmon-ia64-clone.patch Source1: Software-RAID.HOWTO.tar.bz2 Source2: sysconfig.mdadm Source3: mdadmd @@ -52,6 +54,8 @@ Authors: %prep %setup -q -a1 -n %{name}-%{ver} +%patch1 +%patch2 %build %{suse_update_config -f} @@ -137,6 +141,10 @@ rm -rf $RPM_BUILD_ROOT /lib/mkinitrd/scripts/boot-md.sh %changelog +* Fri Oct 03 2008 mmarek@suse.cz +- fixed mdmon's clone_monitor on ia64 +* Fri Oct 03 2008 mmarek@suse.cz +- fixed byte swapping in super-intel.c on big endian. * Wed Sep 24 2008 ro@suse.de - change "udevsettle" to "udevadm settle" * Fri Sep 19 2008 mmarek@suse.cz diff --git a/mdmon-ia64-clone.patch b/mdmon-ia64-clone.patch new file mode 100644 index 0000000..8a417a3 --- /dev/null +++ b/mdmon-ia64-clone.patch @@ -0,0 +1,33 @@ +ia64 has __clone2 instead of clone() +--- + mdmon.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +--- mdmon.c.orig ++++ mdmon.c +@@ -57,13 +57,25 @@ int run_child(void *v) + return 0; + } + ++#ifdef __ia64__ ++int __clone2(int (*fn)(void *), ++ void *child_stack_base, size_t stack_size, ++ int flags, void *arg, ... ++ /* pid_t *pid, struct user_desc *tls, pid_t *ctid */ ); ++#endif + int clone_monitor(struct supertype *container) + { + static char stack[4096]; + ++#ifdef __ia64__ ++ mon_tid = __clone2(run_child, stack, sizeof(stack), ++ CLONE_FS|CLONE_FILES|CLONE_VM|CLONE_SIGHAND|CLONE_THREAD, ++ container); ++#else + mon_tid = clone(run_child, stack+4096-64, + CLONE_FS|CLONE_FILES|CLONE_VM|CLONE_SIGHAND|CLONE_THREAD, + container); ++#endif + + mgr_tid = syscall(SYS_gettid); + diff --git a/super-intel-undefined-operation.patch b/super-intel-undefined-operation.patch new file mode 100644 index 0000000..c9a26c8 --- /dev/null +++ b/super-intel-undefined-operation.patch @@ -0,0 +1,24 @@ +super-intel.c:284: warning: operation on 'p' may be undefined +super-intel.c:284: warning: operation on 'p' may be undefined +super-intel.c:284: warning: operation on 'p' may be undefined + +The swap macros can evaluate their argument multiple times. +--- + super-intel.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- super-intel.c.orig ++++ super-intel.c +@@ -280,8 +280,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); + }