summaryrefslogtreecommitdiff
path: root/package
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
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')
-rw-r--r--package/Config.in3
-rw-r--r--package/Makefile1
-rw-r--r--package/mdadm/Config.in6
-rw-r--r--package/mdadm/Makefile27
-rw-r--r--package/mdadm/patches/patch-platform-intel_c34
5 files changed, 70 insertions, 1 deletions
diff --git a/package/Config.in b/package/Config.in
index 5bf106ca2..6fef6b82c 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -47,11 +47,12 @@ source "package/nano/Config.in"
source "package/vim/Config.in"
endmenu
-menu "Filesystem utilities"
+menu "Filesystem / Blockdevice utilities"
source "package/aufs2-util/Config.in"
source "package/dosfstools/Config.in"
source "package/e2fsprogs/Config.in"
source "package/fuse/Config.in"
+source "package/mdadm/Config.in"
source "package/lvm/Config.in"
source "package/util-linux-ng/Config.in"
source "package/wdfs/Config.in"
diff --git a/package/Makefile b/package/Makefile
index d03516789..f416319d4 100644
--- a/package/Makefile
+++ b/package/Makefile
@@ -245,6 +245,7 @@ package-$(ADK_PACKAGE_MAKE) += make
package-$(ADK_PACKAGE_MARADNS) += maradns
package-$(ADK_PACKAGE_MGETTY) += mgetty
package-$(ADK_PACKAGE_MC) += mc
+package-$(ADK_PACKAGE_MDADM) += mdadm
package-$(ADK_PACKAGE_MIAU) += miau
package-$(ADK_PACKAGE_MIAX) += miax
package-$(ADK_PACKAGE_MICROPERL) += microperl
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)