diff options
Diffstat (limited to 'main')
-rw-r--r-- | main/mdadm/APKBUILD | 18 | ||||
-rw-r--r-- | main/mdadm/mdadm-uclibc.patch | 26 |
2 files changed, 38 insertions, 6 deletions
diff --git a/main/mdadm/APKBUILD b/main/mdadm/APKBUILD index eebed1fb7..0dccc35af 100644 --- a/main/mdadm/APKBUILD +++ b/main/mdadm/APKBUILD @@ -1,24 +1,29 @@ # Contributor: Carlo Landmeter <clandmeter at gmail> # Maintainer: Carlo Landmeter <clandmeter at gmail> pkgname=mdadm -pkgver=2.6.9 -pkgrel=1 +pkgver=3.0.3 +pkgrel=0 pkgdesc="a tool for managing Linux Software RAID arrays" url="http://neil.brown.name/blog/mdadm" license="GPL-2" -depends="uclibc" +depends= makedepends="groff" subpackages="$pkgname-doc" source="http://www.kernel.org/pub/linux/utils/raid/${pkgname}/${pkgname}-${pkgver}.tar.gz ${pkgname}.initd ${pkgname}.confd mdadm-raid.initd + mdadm-uclibc.patch " build() { cd "$srcdir/$pkgname-$pkgver" + patch -p1 -i ../mdadm-uclibc.patch || return 1 + make +} - make || return 1 +package() { + cd "$srcdir/$pkgname-$pkgver" make DESTDIR=$pkgdir install install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname @@ -27,7 +32,8 @@ build() { install -m644 -D mdadm.conf-example "$pkgdir"/etc/mdadm.conf } -md5sums="beaa0f066288441d9b3ad1ef67fa0237 mdadm-2.6.9.tar.gz +md5sums="80ef2a544bfe39ac2e47686485f470ef mdadm-3.0.3.tar.gz ce57e798431f7ab89f9b07a7daaa4852 mdadm.initd 16d2b8eb2e17184357db503470fdd8eb mdadm.confd -cf60ee08fc4fbed0450c5a2d4efc4214 mdadm-raid.initd" +cf60ee08fc4fbed0450c5a2d4efc4214 mdadm-raid.initd +aa601f072096fb8bae8b8946f59a561f mdadm-uclibc.patch" diff --git a/main/mdadm/mdadm-uclibc.patch b/main/mdadm/mdadm-uclibc.patch new file mode 100644 index 000000000..abc9969ca --- /dev/null +++ b/main/mdadm/mdadm-uclibc.patch @@ -0,0 +1,26 @@ +--- a/platform-intel.c Mon Nov 9 15:58:52 2009 ++++ b/platform-intel.c Mon Nov 9 16:01:47 2009 +@@ -87,7 +87,9 @@ + /* generate canonical path name for the device */ + sprintf(path, "/sys/bus/%s/drivers/%s/%s", + bus, driver, de->d_name); +- list->path = canonicalize_file_name(path); ++ list->path = malloc(PATH_MAX); ++ if (list->path) ++ realpath(path, list->path); + list->next = NULL; + } + closedir(driver_dir); +@@ -203,9 +205,10 @@ + char *devt_to_devpath(dev_t dev) + { + char device[40]; +- ++ char *tmp = malloc(PATH_MAX); ++ + sprintf(device, "/sys/dev/block/%d:%d/device", major(dev), minor(dev)); +- return canonicalize_file_name(device); ++ return tmp ? realpath(device, tmp) : NULL; + } + + static char *diskfd_to_devpath(int fd) |