From e83588671c6b8a5027ba2ee5049d401ae69e100f Mon Sep 17 00:00:00 2001 From: Doug Ledford Date: Tue, 15 Sep 2009 19:03:58 +0000 Subject: [PATCH] - Update to current head of upstream git repo for various imsm related fixes (fixes bz523262) - Fix display of metadata version in output of Detail mode - Add UUID output to --detail --export (bz523314) --- .cvsignore | 1 + mdadm-3.0-metadata.patch | 29 +++++++++++++++++++++++++++++ mdadm-3.0-uuid.patch | 15 +++++++++++++++ mdadm.spec | 14 ++++++++++++-- sources | 2 +- 5 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 mdadm-3.0-metadata.patch create mode 100644 mdadm-3.0-uuid.patch diff --git a/.cvsignore b/.cvsignore index 5fed6bb..2055b95 100644 --- a/.cvsignore +++ b/.cvsignore @@ -13,3 +13,4 @@ mdadm-2.6.7.1.tar.bz2 mdadm-3.0-devel2.tar.bz2 mdadm-3.0-devel3.tar.bz2 mdadm-3.0.tar.bz2 +mdadm-3.0-0.20090915git.tar.bz2 diff --git a/mdadm-3.0-metadata.patch b/mdadm-3.0-metadata.patch new file mode 100644 index 0000000..5bccae4 --- /dev/null +++ b/mdadm-3.0-metadata.patch @@ -0,0 +1,29 @@ +--- mdadm-3.0/Detail.c.metadata 2009-09-11 02:10:24.000000000 -0400 ++++ mdadm-3.0/Detail.c 2009-09-15 14:54:56.849391192 -0400 +@@ -161,7 +161,7 @@ + if (sra && sra->array.major_version < 0) + printf("MD_METADATA=%s\n", sra->text_version); + else +- printf("MD_METADATA=%d.%02d\n", ++ printf("MD_METADATA=%d.%d\n", + array.major_version, array.minor_version); + } + +@@ -208,7 +208,7 @@ + if (sra && sra->array.major_version < 0) + printf(" metadata=%s", sra->text_version); + else +- printf(" metadata=%d.%02d", ++ printf(" metadata=%d.%d", + array.major_version, array.minor_version); + } + +@@ -241,7 +241,7 @@ + if (sra && sra->array.major_version < 0) + printf(" Version : %s\n", sra->text_version); + else +- printf(" Version : %d.%02d\n", ++ printf(" Version : %d.%d\n", + array.major_version, array.minor_version); + } + diff --git a/mdadm-3.0-uuid.patch b/mdadm-3.0-uuid.patch new file mode 100644 index 0000000..6f0deaf --- /dev/null +++ b/mdadm-3.0-uuid.patch @@ -0,0 +1,15 @@ +diff -up mdadm-3.0/Detail.c~ mdadm-3.0/Detail.c +--- mdadm-3.0/Detail.c~ 2009-06-02 07:48:29.000000000 +0200 ++++ mdadm-3.0/Detail.c 2009-09-14 17:11:15.000000000 +0200 +@@ -185,6 +185,11 @@ int Detail(char *dev, int brief, int exp + if (mp && mp->path && + strncmp(mp->path, "/dev/md/", 8) == 0) + printf("MD_DEVNAME=%s\n", mp->path+8); ++ if (mp && (mp->uuid[0] || mp->uuid[1] || mp->uuid[2] || ++ mp->uuid[3])) ++ printf("MD_UUID=%08x:%08x:%08x:%08x\n", ++ mp->uuid[0], mp->uuid[1], mp->uuid[2], ++ mp->uuid[3]); + } + goto out; + } diff --git a/mdadm.spec b/mdadm.spec index 8bcf9d6..578231b 100644 --- a/mdadm.spec +++ b/mdadm.spec @@ -1,14 +1,16 @@ Summary: The mdadm program controls Linux md devices (software RAID arrays) Name: mdadm Version: 3.0 -Release: 2%{?dist} -Source: http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-%{version}.tar.bz2 +Release: 3%{?dist} +Source: http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-%{version}-0.20090915git.tar.bz2 Source1: mdmonitor.init Source2: raid-check Source3: mdadm.rules Source4: mdadm-raid-check-sysconfig Patch1: mdadm-2.5.2-static.patch Patch2: mdadm-3.0-endian-FAIL.patch +Patch3: mdadm-3.0-metadata.patch +Patch4: mdadm-3.0-uuid.patch URL: http://www.kernel.org/pub/linux/utils/raid/mdadm/ License: GPLv2+ Group: System Environment/Base @@ -31,6 +33,8 @@ file can be used to help with some common tasks. %setup -q %patch1 -p1 -b .static %patch2 -p1 -b .endian +%patch3 -p1 -b .metadata +%patch4 -p1 -b .uuid %build make %{?_smp_mflags} CXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" SYSCONFDIR="%{_sysconfdir}" mdadm.static mdadm mdmon @@ -76,6 +80,12 @@ fi %attr(0700,root,root) %dir /var/run/mdadm %changelog +* Tue Sep 15 2009 Doug Ledford - 3.0-3 +- Update to current head of upstream git repo for various imsm related fixes + (fixes bz523262) +- Fix display of metadata version in output of Detail mode +- Add UUID output to --detail --export (bz523314) + * Fri Jul 24 2009 Doug Ledford - 3.0-2 - Improved raid-check script as well as the ability to configure what devices get checked diff --git a/sources b/sources index 83d08be..7928323 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -bcd27a1359b18e25e61593221d098f6a mdadm-3.0.tar.bz2 +7a1ba5aaaa04e34ef85b85fcadbf2519 mdadm-3.0-0.20090915git.tar.bz2