diff options
author | root <root@rshg054.dnsready.net> | 2011-08-08 23:14:38 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2011-08-08 23:14:38 +0000 |
commit | 2b6f5a28e2e55b46c1169228e1e56f3b18dd08b5 (patch) | |
tree | ebd7dccec211af75c9dfd55560b3e5f61420b784 /core/mdadm | |
parent | 665308e50fd95e984da057ab8ddb6505b596b841 (diff) |
Mon Aug 8 23:14:38 UTC 2011
Diffstat (limited to 'core/mdadm')
-rw-r--r-- | core/mdadm/PKGBUILD | 13 | ||||
-rw-r--r-- | core/mdadm/linux-3.0.patch | 45 |
2 files changed, 53 insertions, 5 deletions
diff --git a/core/mdadm/PKGBUILD b/core/mdadm/PKGBUILD index 0f9d96fc8..44d4c7c66 100644 --- a/core/mdadm/PKGBUILD +++ b/core/mdadm/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 129978 2011-06-30 18:05:23Z thomas $ +# $Id: PKGBUILD 134363 2011-08-03 06:56:40Z tpowa $ # Maintainer: Tobias Powalowski <tpowa@archlinux.org> # Contributor: Judd Vinet <jvinet@zeroflux.org> pkgname=mdadm pkgver=3.2.2 -pkgrel=2 +pkgrel=3 pkgdesc="A tool for managing/monitoring Linux md device arrays, also known as Software RAID" arch=(i686 x86_64) license=('GPL') @@ -17,7 +17,8 @@ source=(ftp://ftp.kernel.org/pub/linux/utils/raid/mdadm/mdadm-$pkgver.tar.bz2 mdadm.conf mdadm_install mdadm_hook - disable-werror.patch) + disable-werror.patch + linux-3.0.patch) install=mdadm.install replaces=('raidtools') md5sums=('12ee2fbf3beddb60601fb7a4c4905651' @@ -25,12 +26,14 @@ md5sums=('12ee2fbf3beddb60601fb7a4c4905651' '00cbed931db4f15b6ce49e3e7d433966' '4bb000166fb13e82ceaa2422fdfaac7e' '36f7cc564ed3267888d90208e0eb7adc' - '4ad87b74a4bc9a34621280abe0e0c3e4') + '4ad87b74a4bc9a34621280abe0e0c3e4' + 'c499b3edbf2c400c8a1984e18c7ce7fa') build() { cd $srcdir/$pkgname-$pkgver patch -Np0 -i ../disable-werror.patch - make CXFLAGS="$CFLAGS" + patch -Np1 -i ../linux-3.0.patch + make CXiFLAGS="$CFLAGS" } package() { diff --git a/core/mdadm/linux-3.0.patch b/core/mdadm/linux-3.0.patch new file mode 100644 index 000000000..cd9d5473c --- /dev/null +++ b/core/mdadm/linux-3.0.patch @@ -0,0 +1,45 @@ +From f161d047eed634b3380262767f955eb888502e88 Mon Sep 17 00:00:00 2001 +From: NeilBrown <neilb@suse.de> +Date: Fri, 17 Jun 2011 22:49:24 +1000 +Subject: [PATCH 1/1] util: correctly parse shorter linux version numbers. + +The next version of Linux might be 3.0. If it is, get_linux_version +will fail. +So make it more robust. + +Reported-by: Namhyung Kim <namhyung@gmail.com> +Reported-by: Milan Broz <mbroz@redhat.com> +Signed-off-by: NeilBrown <neilb@suse.de> +--- + util.c | 10 +++++----- + 1 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/util.c b/util.c +index 10bbe56..55d171a 100644 +--- a/util.c ++++ b/util.c +@@ -146,16 +146,16 @@ int get_linux_version() + { + struct utsname name; + char *cp; +- int a,b,c; ++ int a = 0, b = 0,c = 0; + if (uname(&name) <0) + return -1; + + cp = name.release; + a = strtoul(cp, &cp, 10); +- if (*cp != '.') return -1; +- b = strtoul(cp+1, &cp, 10); +- if (*cp != '.') return -1; +- c = strtoul(cp+1, NULL, 10); ++ if (*cp == '.') ++ b = strtoul(cp+1, &cp, 10); ++ if (*cp == '.') ++ c = strtoul(cp+1, &cp, 10); + + return (a*1000000)+(b*1000)+c; + } +-- +1.7.2.3 + |