aboutsummaryrefslogtreecommitdiffstats
path: root/tools/e2fsprogs
diff options
context:
space:
mode:
Diffstat (limited to 'tools/e2fsprogs')
-rw-r--r--tools/e2fsprogs/Makefile51
-rw-r--r--tools/e2fsprogs/patches/001-exit_0_on_corrected_errors.patch11
-rw-r--r--tools/e2fsprogs/patches/002-dont-build-e4defrag.patch11
-rw-r--r--tools/e2fsprogs/patches/003-openbsd-compat.patch24
-rw-r--r--tools/e2fsprogs/patches/004-freebsd-compat.patch13
-rw-r--r--tools/e2fsprogs/patches/005-darwin-compat.patch22
6 files changed, 132 insertions, 0 deletions
diff --git a/tools/e2fsprogs/Makefile b/tools/e2fsprogs/Makefile
new file mode 100644
index 0000000..5632e19
--- /dev/null
+++ b/tools/e2fsprogs/Makefile
@@ -0,0 +1,51 @@
+#
+# Copyright (C) 2010-2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=e2fsprogs
+PKG_VERSION:=1.42.8
+PKG_MD5SUM:=8ef664b6eb698aa6b733df59b17b9ed4
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@SF/e2fsprogs
+
+HOST_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/host-build.mk
+
+HOST_CFLAGS += $(FPIC)
+
+HOST_CONFIGURE_ARGS += \
+ --disable-shared \
+ --disable-elf-shlibs \
+ --enable-static \
+ --enable-dynamic-e2fsck \
+ --disable-tls \
+ --disable-nls
+
+define Host/Prepare
+ $(call Host/Prepare/Default)
+ rm -rf $(HOST_BUILD_DIR)/doc
+endef
+
+define Host/Install
+ $(Host/Install/Default)
+ $(MAKE) -C $(HOST_BUILD_DIR)/lib/uuid install
+ mkdir -p $(STAGING_DIR_HOST)/include/e2fsprogs
+ $(CP) $(STAGING_DIR_HOST)/include/uuid $(STAGING_DIR_HOST)/include/e2fsprogs/
+ rm -rf $(STAGING_DIR_HOST)/include/uuid
+ $(INSTALL_DATA) $(HOST_BUILD_DIR)/lib/uuid/libuuid.a $(STAGING_DIR_HOST)/lib/
+endef
+
+define Host/Clean
+ rm -f $(STAGING_DIR_HOST)/bin/e2fsck
+ rm -f $(STAGING_DIR_HOST)/bin/tune2fs
+endef
+
+$(eval $(call HostBuild))
diff --git a/tools/e2fsprogs/patches/001-exit_0_on_corrected_errors.patch b/tools/e2fsprogs/patches/001-exit_0_on_corrected_errors.patch
new file mode 100644
index 0000000..67a30f6
--- /dev/null
+++ b/tools/e2fsprogs/patches/001-exit_0_on_corrected_errors.patch
@@ -0,0 +1,11 @@
+--- a/e2fsck/e2fsck.h
++++ b/e2fsck/e2fsck.h
+@@ -73,7 +73,7 @@
+ * Exit codes used by fsck-type programs
+ */
+ #define FSCK_OK 0 /* No errors */
+-#define FSCK_NONDESTRUCT 1 /* File system errors corrected */
++#define FSCK_NONDESTRUCT 0 /* File system errors corrected */
+ #define FSCK_REBOOT 2 /* System should be rebooted */
+ #define FSCK_UNCORRECTED 4 /* File system errors left uncorrected */
+ #define FSCK_ERROR 8 /* Operational error */
diff --git a/tools/e2fsprogs/patches/002-dont-build-e4defrag.patch b/tools/e2fsprogs/patches/002-dont-build-e4defrag.patch
new file mode 100644
index 0000000..9f6e7b1
--- /dev/null
+++ b/tools/e2fsprogs/patches/002-dont-build-e4defrag.patch
@@ -0,0 +1,11 @@
+--- a/misc/Makefile.in
++++ b/misc/Makefile.in
+@@ -11,7 +11,7 @@ INSTALL = @INSTALL@
+
+ @MCONFIG@
+
+-@DEFRAG_CMT@@LINUX_CMT@E4DEFRAG_PROG= e4defrag
++@DEFRAG_CMT@@LINUX_CMT@E4DEFRAG_PROG=
+ @DEFRAG_CMT@@LINUX_CMT@E4DEFRAG_MAN= e4defrag.8
+
+ @IMAGER_CMT@E2IMAGE_PROG= e2image
diff --git a/tools/e2fsprogs/patches/003-openbsd-compat.patch b/tools/e2fsprogs/patches/003-openbsd-compat.patch
new file mode 100644
index 0000000..1f7cdca
--- /dev/null
+++ b/tools/e2fsprogs/patches/003-openbsd-compat.patch
@@ -0,0 +1,24 @@
+diff -Nur e2fsprogs-1.42.7.orig/lib/blkid/getsize.c e2fsprogs-1.42.7/lib/blkid/getsize.c
+--- e2fsprogs-1.42.7.orig/lib/blkid/getsize.c Fri Nov 30 03:40:18 2012
++++ e2fsprogs-1.42.7/lib/blkid/getsize.c Thu Mar 7 14:21:59 2013
+@@ -26,6 +26,9 @@
+ #include <fcntl.h>
+ #ifdef HAVE_SYS_IOCTL_H
+ #include <sys/ioctl.h>
++#ifdef __OpenBSD__
++#include <sys/dkio.h>
++#endif
+ #endif
+ #ifdef HAVE_LINUX_FD_H
+ #include <linux/fd.h>
+diff -Nur e2fsprogs-1.42.7.orig/lib/quota/mkquota.c e2fsprogs-1.42.7/lib/quota/mkquota.c
+--- e2fsprogs-1.42.7.orig/lib/quota/mkquota.c Wed Jan 2 01:47:20 2013
++++ e2fsprogs-1.42.7/lib/quota/mkquota.c Thu Mar 7 14:21:59 2013
+@@ -8,6 +8,7 @@
+ #include <sys/stat.h>
+ #include <unistd.h>
+ #include <errno.h>
++#include <stdint.h>
+ #include <string.h>
+ #include <fcntl.h>
+
diff --git a/tools/e2fsprogs/patches/004-freebsd-compat.patch b/tools/e2fsprogs/patches/004-freebsd-compat.patch
new file mode 100644
index 0000000..5eff499
--- /dev/null
+++ b/tools/e2fsprogs/patches/004-freebsd-compat.patch
@@ -0,0 +1,13 @@
+diff -Nur e2fsprogs-1.42.7.orig/lib/ext2fs/tdb.c e2fsprogs-1.42.7/lib/ext2fs/tdb.c
+--- e2fsprogs-1.42.7.orig/lib/ext2fs/tdb.c 2012-07-06 15:37:27.000000000 +0200
++++ e2fsprogs-1.42.7/lib/ext2fs/tdb.c 2013-03-07 14:54:59.000000000 +0100
+@@ -56,7 +56,9 @@
+ #include <utime.h>
+ #endif
+ #include <sys/stat.h>
++#ifndef __FreeBSD__
+ #include <sys/file.h>
++#endif
+ #include <fcntl.h>
+
+ #ifdef HAVE_SYS_MMAN_H
diff --git a/tools/e2fsprogs/patches/005-darwin-compat.patch b/tools/e2fsprogs/patches/005-darwin-compat.patch
new file mode 100644
index 0000000..bc81d86
--- /dev/null
+++ b/tools/e2fsprogs/patches/005-darwin-compat.patch
@@ -0,0 +1,22 @@
+--- a/lib/blkid/blkid_types.h.in
++++ b/lib/blkid/blkid_types.h.in
+@@ -9,6 +9,8 @@
+
+ @ASM_TYPES_HEADER@
+
++#include <stdint.h>
++
+ #ifdef __U8_TYPEDEF
+ typedef __U8_TYPEDEF __u8;
+ #else
+--- a/lib/ext2fs/ext2_types.h.in
++++ b/lib/ext2fs/ext2_types.h.in
+@@ -9,6 +9,8 @@
+
+ @ASM_TYPES_HEADER@
+
++#include <stdint.h>
++
+ #ifdef __U8_TYPEDEF
+ typedef __U8_TYPEDEF __u8;
+ #else