summaryrefslogtreecommitdiff
path: root/package/mdadm
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2009-09-02 19:58:34 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2009-09-02 19:58:34 +0200
commit56ececf52f92d6357e42042ada6bb13935e3f68c (patch)
treeeafcfa8a17d0c4aa694f797c08da75a7d1acfea9 /package/mdadm
parent7ce477a75de28972161939a27c62cdc04f0f11a1 (diff)
mdadm package
useful package for software raid under linux. my realpath patch might be bad, but at least I could generate a raid0 on my new shuttle pc.
Diffstat (limited to 'package/mdadm')
-rw-r--r--package/mdadm/Config.in6
-rw-r--r--package/mdadm/Makefile27
-rw-r--r--package/mdadm/patches/patch-platform-intel_c34
3 files changed, 67 insertions, 0 deletions
diff --git a/package/mdadm/Config.in b/package/mdadm/Config.in
new file mode 100644
index 000000000..e0d55a950
--- /dev/null
+++ b/package/mdadm/Config.in
@@ -0,0 +1,6 @@
+config ADK_PACKAGE_MDADM
+ prompt "mdadm............................. tool for managing Linux Software RAID arrays. "
+ tristate
+ default n
+ help
+ http://neil.brown.name/blog/mdadm
diff --git a/package/mdadm/Makefile b/package/mdadm/Makefile
new file mode 100644
index 000000000..3efb1572c
--- /dev/null
+++ b/package/mdadm/Makefile
@@ -0,0 +1,27 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include ${TOPDIR}/rules.mk
+
+PKG_NAME:= mdadm
+PKG_VERSION:= 3.0
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 1eb89885b2b881562fc79ed2f5e1a056
+PKG_DESCR:= tool for managing Linux Software RAID arrays
+PKG_SECTION:= utils
+PKG_URL:= http://neil.brown.name/blog/mdadm
+PKG_SITES:= ${MASTER_SITE_KERNEL:=utils/raid/mdadm/}
+
+include ${TOPDIR}/mk/package.mk
+
+$(eval $(call PKG_template,MDADM,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+
+XAKE_FLAGS+= CROSS_COMPILE="${TARGET_CROSS}"
+BUILD_STYLE:= auto
+INSTALL_STYLE:= auto
+
+post-install:
+ ${INSTALL_DIR} ${IDIR_MDADM}/usr/sbin
+ ${INSTALL_BIN} ${WRKINST}/sbin/mdadm ${IDIR_MDADM}/usr/sbin
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/mdadm/patches/patch-platform-intel_c b/package/mdadm/patches/patch-platform-intel_c
new file mode 100644
index 000000000..1e6e113a1
--- /dev/null
+++ b/package/mdadm/patches/patch-platform-intel_c
@@ -0,0 +1,34 @@
+--- mdadm-3.0.orig/platform-intel.c 2009-06-02 07:48:29.000000000 +0200
++++ mdadm-3.0/platform-intel.c 2009-09-02 19:30:09.000000000 +0200
+@@ -47,6 +47,7 @@ struct sys_dev *find_driver_devices(cons
+ char path[256];
+ char link[256];
+ char *c;
++ char *rpath;
+ DIR *driver_dir;
+ struct dirent *de;
+ struct sys_dev *head = NULL;
+@@ -87,7 +88,9 @@ struct sys_dev *find_driver_devices(cons
+ /* 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);
++
++ rpath = malloc(PATH_MAX);
++ list->path = realpath(path, rpath);
+ list->next = NULL;
+ }
+
+@@ -198,9 +201,11 @@ const struct imsm_orom *find_imsm_orom(v
+ char *devt_to_devpath(dev_t dev)
+ {
+ char device[40];
++ char *rpath;
+
+ sprintf(device, "/sys/dev/block/%d:%d/device", major(dev), minor(dev));
+- return canonicalize_file_name(device);
++ rpath = malloc(PATH_MAX);
++ return realpath(device, rpath);
+ }
+
+ static char *diskfd_to_devpath(int fd)