mdadm: update to 2.6.9
authorRichard van Paasen <rvpaasen@t3i.nl>
Mon, 14 Dec 2009 21:56:10 +0000 (22:56 +0100)
committerPeter Korsgaard <jacmet@sunsite.dk>
Mon, 22 Mar 2010 22:57:34 +0000 (23:57 +0100)
Closes #805

This patch updates mdadm to 2.6.9 and uses the new makefile template.

Signed-off-by: Richard van Paasen <rvpaasen@t3i.nl>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
CHANGES
package/mdadm/mdadm-2.6.1-001.uclibc-and-ftw-fixup.patch [deleted file]
package/mdadm/mdadm-2.6.1-002.uclibc-not-lfs-fixup.patch [deleted file]
package/mdadm/mdadm-2.6.1-003.uclibc-dont-force-largefile.patch [deleted file]
package/mdadm/mdadm-2.6.9-001.uclibc-dont-force-largefile.patch [new file with mode: 0644]
package/mdadm/mdadm-2.6.9-002.install-without-manpages.patch [new file with mode: 0644]
package/mdadm/mdadm.mk

diff --git a/CHANGES b/CHANGES
index d7927cfd8712d8125227bb91269dc1e6c5abfc76..effddab35b0584adf4890ce7fb868d0f65e79db6 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -8,12 +8,13 @@
        New packages: librsync
 
        Updated/fixed packages: busybox, dosfstools, e2fsprogs, iperf,
-       libglib2, libpng, memstat, mtd-utils, pppd, setserial,
+       libglib2, libpng, mdadm, memstat, mtd-utils, pppd, setserial,
        squashfs, wget
 
        Issues resolved (http://bugs.uclibc.org):
 
        #800: [PATCH] iperf update to 2.0.4
+       #805: [PATCH] mdadm - version update
        #1111: Bump wget to 1.12 and migrate to Makefile.autotools.in
        #1129: Bump memstat to 0.8 and migrate to Makefile.package.in
        #1273: BR2_INET_IPV6 does not enable IPv6 in pppd
diff --git a/package/mdadm/mdadm-2.6.1-001.uclibc-and-ftw-fixup.patch b/package/mdadm/mdadm-2.6.1-001.uclibc-and-ftw-fixup.patch
deleted file mode 100644 (file)
index cabf62e..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-diff -rdup mdadm-2.6.1.orig/mdadm.h mdadm-2.6.1/mdadm.h
---- mdadm-2.6.1.orig/mdadm.h   2007-02-22 04:59:28.000000000 +0100
-+++ mdadm-2.6.1/mdadm.h        2007-04-16 20:53:53.000000000 +0200
-@@ -382,7 +382,7 @@ struct stat64;
- #define HAVE_NFTW  we assume
- #define HAVE_FTW
--#ifdef UCLIBC
-+#if defined __UCLIBC__ || /* older did use that? */ defined UCLIBC
- # include <features.h>
- # ifndef  __UCLIBC_HAS_FTW__
- #  undef HAVE_FTW
-
diff --git a/package/mdadm/mdadm-2.6.1-002.uclibc-not-lfs-fixup.patch b/package/mdadm/mdadm-2.6.1-002.uclibc-not-lfs-fixup.patch
deleted file mode 100644 (file)
index 6c88bc9..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-diff -rdup mdadm-2.6.1-001/mdadm.h mdadm-2.6.1/mdadm.h
---- mdadm-2.6.1-001/mdadm.h    2007-04-17 17:41:04.000000000 +0200
-+++ mdadm-2.6.1/mdadm.h        2007-04-17 17:38:43.000000000 +0200
-@@ -388,6 +388,9 @@ struct stat64;
- #  undef HAVE_FTW
- #  undef HAVE_NFTW
- # endif
-+# ifndef __UCLIBC_HAS_LFS__
-+#  define lseek64 lseek
-+# endif
- #endif
- #ifdef __dietlibc__
diff --git a/package/mdadm/mdadm-2.6.1-003.uclibc-dont-force-largefile.patch b/package/mdadm/mdadm-2.6.1-003.uclibc-dont-force-largefile.patch
deleted file mode 100644 (file)
index c671437..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-[PATCH] mdadm: don't enable largefile support unconditionally on uClibc
-
-uClibc can be compiled without largefile support (and errors out if
-_FILE_OFFSET_BITS is set to 64), so don't define it if that combination
-is detected.
-
-Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
----
- mdadm.h |    4 ++++
- 1 file changed, 4 insertions(+)
-
-Index: mdadm-2.6.7.1/mdadm.h
-===================================================================
---- mdadm-2.6.7.1.orig/mdadm.h
-+++ mdadm-2.6.7.1/mdadm.h
-@@ -28,7 +28,11 @@
-  */
- #define       _GNU_SOURCE
-+#include <features.h>
-+/* uclibc without largefile support #errors on _FILE_OFFSET_BITS=64 */
-+#if !(defined(__UCLIBC__) && !defined(__UCLIBC_HAS_LFS__))
- #define _FILE_OFFSET_BITS 64
-+#endif
- #include      <unistd.h>
- #if !defined(__dietlibc__) && !defined(__KLIBC__)
- extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence));
diff --git a/package/mdadm/mdadm-2.6.9-001.uclibc-dont-force-largefile.patch b/package/mdadm/mdadm-2.6.9-001.uclibc-dont-force-largefile.patch
new file mode 100644 (file)
index 0000000..c671437
--- /dev/null
@@ -0,0 +1,27 @@
+[PATCH] mdadm: don't enable largefile support unconditionally on uClibc
+
+uClibc can be compiled without largefile support (and errors out if
+_FILE_OFFSET_BITS is set to 64), so don't define it if that combination
+is detected.
+
+Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
+---
+ mdadm.h |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+Index: mdadm-2.6.7.1/mdadm.h
+===================================================================
+--- mdadm-2.6.7.1.orig/mdadm.h
++++ mdadm-2.6.7.1/mdadm.h
+@@ -28,7 +28,11 @@
+  */
+ #define       _GNU_SOURCE
++#include <features.h>
++/* uclibc without largefile support #errors on _FILE_OFFSET_BITS=64 */
++#if !(defined(__UCLIBC__) && !defined(__UCLIBC_HAS_LFS__))
+ #define _FILE_OFFSET_BITS 64
++#endif
+ #include      <unistd.h>
+ #if !defined(__dietlibc__) && !defined(__KLIBC__)
+ extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence));
diff --git a/package/mdadm/mdadm-2.6.9-002.install-without-manpages.patch b/package/mdadm/mdadm-2.6.9-002.install-without-manpages.patch
new file mode 100644 (file)
index 0000000..7ab1a7b
--- /dev/null
@@ -0,0 +1,15 @@
+diff -Naur mdadm-2.6.9/Makefile mdadm-2.6.9-patched/Makefile
+--- mdadm-2.6.9/Makefile       2009-03-10 07:01:17.000000000 +0100
++++ mdadm-2.6.9-patched/Makefile       2009-10-10 15:53:13.329068128 +0200
+@@ -161,7 +161,9 @@
+ sha1.o : sha1.c sha1.h md5.h
+       $(CC) $(CFLAGS) -DHAVE_STDINT_H -o sha1.o -c sha1.c
+-install : mdadm install-man
++install : install-mdadm install-man
++
++install-mdadm : mdadm
+       $(INSTALL) -D $(STRIP) -m 755 mdadm $(DESTDIR)$(BINDIR)/mdadm
+ install-static : mdadm.static install-man
+
index 225d438d3d5a7a07122f327d11566f37a2678589..8dabddfa331897615f0e98c42ef35adbb76523a8 100644 (file)
@@ -3,63 +3,27 @@
 # mdadm
 #
 #############################################################
-MDADM_VERSION:=2.6.7.1
-MDADM_SOURCE:=mdadm_$(MDADM_VERSION).orig.tar.gz
-MDADM_PATCH:=mdadm_$(MDADM_VERSION)-1.diff.gz
-MDADM_CAT:=$(ZCAT)
-MDADM_SITE:=$(BR2_DEBIAN_MIRROR)/debian/pool/main/m/mdadm
-MDADM_DIR:=$(BUILD_DIR)/mdadm-$(MDADM_VERSION)
-MDADM_BINARY:=mdadm
-MDADM_TARGET_BINARY:=sbin/mdadm
+MDADM_VERSION:=2.6.9
+MDADM_SOURCE:=mdadm-$(MDADM_VERSION).tar.bz2
+MDADM_SITE:=http://www.kernel.org/pub/linux/utils/raid/mdadm
 
-ifneq ($(MDADM_PATCH),)
-MDADM_PATCH_FILE:=$(DL_DIR)/$(MDADM_PATCH)
-$(MDADM_PATCH_FILE):
-       $(call DOWNLOAD,$(MDADM_SITE),$(MDADM_PATCH))
-endif
+MDADM_AUTORECONF = NO
+MDADM_LIBTOOL_PATCH = NO
 
-$(DL_DIR)/$(MDADM_SOURCE): $(MDADM_PATCH_FILE)
-       $(call DOWNLOAD,$(MDADM_SITE),$(MDADM_SOURCE))
-       touch -c $@
+MDADM_INSTALL_STAGING = NO
+MDADM_INSTALL_TARGET = YES
 
-$(MDADM_DIR)/.unpacked: $(DL_DIR)/$(MDADM_SOURCE)
-       $(MDADM_CAT) $(DL_DIR)/$(MDADM_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
-ifneq ($(MDADM_PATCH),)
-       (cd $(MDADM_DIR) && $(MDADM_CAT) $(MDADM_PATCH_FILE) | patch -p1)
-       if [ -d $(MDADM_DIR)/debian/patches ]; then \
-         toolchain/patch-kernel.sh $(MDADM_DIR) $(MDADM_DIR)/debian/patches \*patch; \
-       fi
-endif
-       #toolchain/patch-kernel.sh $(MDADM_DIR) package/mdadm mdadm-$(MDADM_VERSION)\*.patch
-       toolchain/patch-kernel.sh $(MDADM_DIR) package/mdadm mdadm-\*.patch
-       touch $@
+MDADM_MAKE_OPT = \
+       CFLAGS="$(TARGET_CFLAGS)" CC=$(TARGET_CC) -C $(MDADM_DIR) mdadm
 
-$(MDADM_DIR)/$(MDADM_BINARY): $(MDADM_DIR)/.unpacked
-       $(MAKE) CFLAGS="$(TARGET_CFLAGS)" CC=$(TARGET_CC) -C $(MDADM_DIR)
+MDADM_INSTALL_TARGET_OPT = \
+       DESTDIR=$(TARGET_DIR)/usr -C $(MDADM_DIR) install-mdadm
 
-$(TARGET_DIR)/$(MDADM_TARGET_BINARY): $(MDADM_DIR)/$(MDADM_BINARY)
-       $(MAKE) DESTDIR=$(TARGET_DIR) -C $(MDADM_DIR) install
-       rm -Rf $(TARGET_DIR)/usr/share/man
-       $(STRIPCMD) $(STRIP_STRIP_ALL) $@
+MDADM_UNINSTALL_TARGET_OPT = \
+       DESTDIR=$(TARGET_DIR)/usr -C $(MDADM_DIR) uninstall
 
-mdadm-source: $(DL_DIR)/$(MDADM_SOURCE) $(MDADM_PATCH_FILE)
+$(eval $(call AUTOTARGETS,package,mdadm))
 
-mdadm-unpacked: $(MDADM_DIR)/.unpacked
-
-mdadm: $(TARGET_DIR)/$(MDADM_TARGET_BINARY)
-
-mdadm-clean:
-       $(MAKE) DESTDIR=$(TARGET_DIR) -C $(MDADM_DIR) uninstall
-       -$(MAKE) -C $(MDADM_DIR) clean
-
-mdadm-dirclean:
-       rm -rf $(MDADM_DIR)
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_MDADM),y)
-TARGETS+=mdadm
-endif
+$(MDADM_TARGET_CONFIGURE):
+       $(call MESSAGE,"Configuring")
+       $(Q)touch $@