diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-01-29 10:48:46 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-01-29 10:48:46 +0000 |
commit | 87733febce67553d6e0c150919ac5f0a531a780b (patch) | |
tree | 0f48a0a61f7d54fb9e21ede8cb0d65c5c82149ea /package/system/utils/xfsprogs | |
parent | 4b5cd16c55ea53b347805c6bf2c10db5f133d0d2 (diff) |
move a few packages to system/utils
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35375 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/system/utils/xfsprogs')
7 files changed, 331 insertions, 0 deletions
diff --git a/package/system/utils/xfsprogs/Makefile b/package/system/utils/xfsprogs/Makefile new file mode 100644 index 0000000000..a7a865a0eb --- /dev/null +++ b/package/system/utils/xfsprogs/Makefile @@ -0,0 +1,87 @@ +# +# Copyright (C) 2006-2012 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:=xfsprogs +PKG_RELEASE:=1 +PKG_VERSION:=3.1.7 +PKG_SOURCE_URL:=ftp://oss.sgi.com/projects/xfs/previous/ +PKG_MD5SUM:=049cf9873794ea49d0bb3f12d45748a4 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_INSTALL:=1 +PKG_FIXUP:=autoreconf + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/xfsprogs/default + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libuuid +libpthread +librt + URL:=http://oss.sgi.com/projects/xfs +endef + +define Package/xfs-mkfs +$(call Package/xfsprogs/default) + TITLE:=Utility for creating XFS filesystems +endef + +define Package/xfs-fsck +$(call Package/xfsprogs/default) + TITLE:=Utilities for checking and repairing XFS filesystems +endef + +define Package/xfs-growfs +$(call Package/xfsprogs/default) + TITLE:=Utility for increasing the size of XFS filesystems +endef + +CONFIGURE_ARGS += \ + --enable-gettext=no \ + --enable-lib64=no + +TARGET_CFLAGS += \ + -I$(STAGING_DIR)/usr/include \ + -D_LARGEFILE64_SOURCE \ + -D_FILE_OFFSET_BITS=64 \ + -D_GNU_SOURCE + +MAKE_FLAGS += \ + DEBUG= Q= \ + PCFLAGS="-Wall" \ + PKG_PLATFORM=linux \ + ENABLE_GETTEXT=no \ + prefix=$(PKG_INSTALL_DIR)/usr \ + exec_prefix=$(PKG_INSTALL_DIR)/usr \ + PKG_SBIN_DIR=$(PKG_INSTALL_DIR)/usr/sbin \ + PKG_ROOT_SBIN_DIR=$(PKG_INSTALL_DIR)/sbin \ + PKG_MAN_DIR=$(PKG_INSTALL_DIR)/usr/man \ + PKG_LOCALE_DIR=$(PKG_INSTALL_DIR)/usr/share/locale \ + PKG_ROOT_LIB_DIR=$(PKG_INSTALL_DIR)/lib \ + PKG_DOC_DIR=$(PKG_INSTALL_DIR)/usr/share/doc/xfsprogs + +define Package/xfs-mkfs/install + mkdir -p $(1)/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/mkfs.xfs $(1)/sbin +endef + +define Package/xfs-fsck/install + mkdir -p $(1)/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/xfs_repair $(1)/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/xfs_db $(1)/sbin +endef + +define Package/xfs-growfs/install + mkdir -p $(1)/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/xfs_growfs $(1)/sbin +endef + +$(eval $(call BuildPackage,xfs-mkfs)) +$(eval $(call BuildPackage,xfs-fsck)) +$(eval $(call BuildPackage,xfs-growfs)) diff --git a/package/system/utils/xfsprogs/patches/001-automake-compat.patch b/package/system/utils/xfsprogs/patches/001-automake-compat.patch new file mode 100644 index 0000000000..3003d6d210 --- /dev/null +++ b/package/system/utils/xfsprogs/patches/001-automake-compat.patch @@ -0,0 +1,84 @@ +commit 2222aa77e11b959e0e5a0ded3482e56799593bc2 +Author: Jens Muecke <jens@nons.de> +Date: Thu Jan 26 00:34:15 2012 +0100 + + 001-automake-compat + +diff --git a/configure.in b/configure.in +index 664c0e9..d91b6ec 100644 +--- a/configure.in ++++ b/configure.in +@@ -2,7 +2,8 @@ AC_INIT(include/libxfs.h) + AC_PREREQ(2.50) + AC_CONFIG_AUX_DIR([.]) + AC_CONFIG_MACRO_DIR([m4]) +-AC_CONFIG_HEADER(include/platform_defs.h) ++# Put a dummy here (http://www.mail-archive.com/automake@gnu.org/msg09241.html) ++AC_CONFIG_HEADERS([doesnotexist.h include/platform_defs.h]) + AC_PREFIX_DEFAULT(/usr) + + AC_PROG_LIBTOOL +diff --git a/include/builddefs.in b/include/builddefs.in +index 81ebfcd..5a4a0e8 100644 +--- a/include/builddefs.in ++++ b/include/builddefs.in +@@ -20,6 +20,8 @@ + ifndef _BUILDDEFS_INCLUDED_ + _BUILDDEFS_INCLUDED_ = 1 + ++SHELL = @SHELL@ ++ + DEBUG = @debug_build@ + OPTIMIZER = @opt_build@ + MALLOCLIB = @malloc_lib@ +diff --git a/m4/package_types.m4 b/m4/package_types.m4 +index 0a0e087..66a136a 100644 +--- a/m4/package_types.m4 ++++ b/m4/package_types.m4 +@@ -9,7 +9,7 @@ AC_DEFUN([AC_TYPE_PSINT], + #include <stddef.h> + ], [ + __psint_t psint; +- ], AC_DEFINE(HAVE___PSINT_T) AC_MSG_RESULT(yes) , AC_MSG_RESULT(no)) ++ ], AC_DEFINE([HAVE___PSINT_T], [1], [Define if __psint_t exists]) AC_MSG_RESULT(yes) , AC_MSG_RESULT(no)) + ]) + + # +@@ -23,7 +23,7 @@ AC_DEFUN([AC_TYPE_PSUNSIGNED], + #include <stddef.h> + ], [ + __psunsigned_t psuint; +- ], AC_DEFINE(HAVE___PSUNSIGNED_T) AC_MSG_RESULT(yes) , AC_MSG_RESULT(no)) ++ ], AC_DEFINE([HAVE___PSUNSIGNED_T], [1], [Define if __psunsigned_t exists]) AC_MSG_RESULT(yes) , AC_MSG_RESULT(no)) + ]) + + # +@@ -37,7 +37,7 @@ AC_DEFUN([AC_TYPE_U32], + #include <stddef.h> + ], [ + __u32 u32; +- ], AC_DEFINE(HAVE___U32) AC_MSG_RESULT(yes) , AC_MSG_RESULT(no)) ++ ], AC_DEFINE([HAVE___U32], [1], [Define if __u32 exists]) AC_MSG_RESULT(yes) , AC_MSG_RESULT(no)) + ]) + + # +@@ -50,15 +50,15 @@ AC_DEFUN([AC_SIZEOF_POINTERS_AND_LONG], + AC_CHECK_SIZEOF(long, 4) + AC_CHECK_SIZEOF(char *, 4) + if test $ac_cv_sizeof_long -eq 4 -o $ac_cv_sizeof_long -eq 0; then +- AC_DEFINE(HAVE_32BIT_LONG) ++ AC_DEFINE([HAVE_32BIT_LONG], [1], [Define if long is 32bit]) + fi + if test $ac_cv_sizeof_long -eq 8; then +- AC_DEFINE(HAVE_64BIT_LONG) ++ AC_DEFINE([HAVE_64BIT_LONG], [1], [Define if long is 64bit]) + fi + if test $ac_cv_sizeof_char_p -eq 4 -o $ac_cv_sizeof_char_p -eq 0; then +- AC_DEFINE(HAVE_32BIT_PTR) ++ AC_DEFINE([HAVE_32BIT_PTR], [1], [Define if char* is 32bit]) + fi + if test $ac_cv_sizeof_char_p -eq 8; then +- AC_DEFINE(HAVE_64BIT_PTR) ++ AC_DEFINE([HAVE_64BIT_PTR], [1], [Define if char* is 64bit]) + fi + ]) diff --git a/package/system/utils/xfsprogs/patches/100-no_aio.patch b/package/system/utils/xfsprogs/patches/100-no_aio.patch new file mode 100644 index 0000000000..30d36b4da8 --- /dev/null +++ b/package/system/utils/xfsprogs/patches/100-no_aio.patch @@ -0,0 +1,21 @@ +commit e72b7bd12fdef06c3494b919376bfe886aa8bb4d +Author: Jens Muecke <jens@nons.de> +Date: Thu Jan 26 00:35:43 2012 +0100 + + 100-no_aio + +diff --git a/configure.in b/configure.in +index d91b6ec..8dc8b4a 100644 +--- a/configure.in ++++ b/configure.in +@@ -92,8 +92,8 @@ AC_PACKAGE_GLOBALS(xfsprogs) + AC_PACKAGE_UTILITIES(xfsprogs) + AC_MULTILIB($enable_lib64) + +-AC_PACKAGE_NEED_AIO_H +-AC_PACKAGE_NEED_LIO_LISTIO ++librt="-lrt" ++AC_SUBST(librt) + + AC_PACKAGE_NEED_UUID_H + AC_PACKAGE_NEED_UUIDCOMPARE diff --git a/package/system/utils/xfsprogs/patches/110-uclibc_no_ustat.patch b/package/system/utils/xfsprogs/patches/110-uclibc_no_ustat.patch new file mode 100644 index 0000000000..c46e8025cd --- /dev/null +++ b/package/system/utils/xfsprogs/patches/110-uclibc_no_ustat.patch @@ -0,0 +1,36 @@ +commit 7b1d0a98e779170232c0a81b4749ab934ec67a7e +Author: Jens Muecke <jens@nons.de> +Date: Thu Jan 26 00:36:42 2012 +0100 + + 110-uclibc_no_ustat + +diff --git a/libxfs/linux.c b/libxfs/linux.c +index 2e07d54..6a6c905 100644 +--- a/libxfs/linux.c ++++ b/libxfs/linux.c +@@ -21,7 +21,9 @@ + #include <mntent.h> + #include <sys/stat.h> + #undef ustat ++#ifndef __UCLIBC__ + #include <sys/ustat.h> ++#endif + #include <sys/mount.h> + #include <sys/ioctl.h> + #include <sys/sysinfo.h> +@@ -49,6 +51,7 @@ static int max_block_alignment; + int + platform_check_ismounted(char *name, char *block, struct stat64 *s, int verbose) + { ++#ifndef __UCLIBC__ + /* Pad ust; pre-2.6.28 linux copies out too much in 32bit compat mode */ + struct ustat ust[2]; + struct stat64 st; +@@ -68,6 +71,7 @@ platform_check_ismounted(char *name, char *block, struct stat64 *s, int verbose) + progname, name); + return 1; + } ++#endif + return 0; + } + diff --git a/package/system/utils/xfsprogs/patches/120-portability.patch b/package/system/utils/xfsprogs/patches/120-portability.patch new file mode 100644 index 0000000000..1e9b533654 --- /dev/null +++ b/package/system/utils/xfsprogs/patches/120-portability.patch @@ -0,0 +1,47 @@ +commit d2aef8b3967e53fe58178f5af50fef488ee0faed +Author: Jens Muecke <jens@nons.de> +Date: Thu Jan 26 00:37:52 2012 +0100 + + 120-portability + +diff --git a/copy/xfs_copy.c b/copy/xfs_copy.c +index c01e0b9..2e2f320 100644 +--- a/copy/xfs_copy.c ++++ b/copy/xfs_copy.c +@@ -463,6 +463,15 @@ read_ag_header(int fd, xfs_agnumber_t agno, wbuf *buf, ag_header_t *ag, + } + + ++static void sig_mask(int type) ++{ ++ sigset_t mask; ++ sigemptyset(&mask); ++ sigaddset(&mask, SIGCHLD); ++ sigprocmask(type, &mask, NULL); ++} ++ ++ + void + write_wbuf(void) + { +@@ -478,9 +487,9 @@ write_wbuf(void) + if (target[i].state != INACTIVE) + pthread_mutex_unlock(&targ[i].wait); /* wake up */ + +- sigrelse(SIGCHLD); ++ sig_mask(SIG_UNBLOCK); + pthread_mutex_lock(&mainwait); +- sighold(SIGCHLD); ++ sig_mask(SIG_BLOCK); + } + + +@@ -847,7 +856,7 @@ main(int argc, char **argv) + /* set up sigchild signal handler */ + + signal(SIGCHLD, handler); +- sighold(SIGCHLD); ++ sig_mask(SIG_BLOCK); + + /* make children */ + diff --git a/package/system/utils/xfsprogs/patches/130-uclibc_no_xattr.patch b/package/system/utils/xfsprogs/patches/130-uclibc_no_xattr.patch new file mode 100644 index 0000000000..b1ecda71e5 --- /dev/null +++ b/package/system/utils/xfsprogs/patches/130-uclibc_no_xattr.patch @@ -0,0 +1,36 @@ +commit 10d6058b24f18cb31889154f830b191849f45106 +Author: Jens Muecke <jens@nons.de> +Date: Thu Jan 26 00:38:27 2012 +0100 + + 130-uclibc_no_xattr + +diff --git a/fsr/xfs_fsr.c b/fsr/xfs_fsr.c +index 40c2e6f..4f54059 100644 +--- a/fsr/xfs_fsr.c ++++ b/fsr/xfs_fsr.c +@@ -35,7 +35,9 @@ + #include <sys/wait.h> + #include <sys/vfs.h> + #include <sys/statvfs.h> ++#ifndef __UCLIBC__ + #include <sys/xattr.h> ++#endif + + + #ifndef XFS_XFLAG_NODEFRAG +@@ -990,6 +992,7 @@ fsr_setup_attr_fork( + int tfd, + xfs_bstat_t *bstatp) + { ++#ifndef __UCLIBC__ + struct stat64 tstatbuf; + int i; + int last_forkoff = 0; +@@ -1108,6 +1111,7 @@ fsr_setup_attr_fork( + out: + if (dflag) + fsrprintf(_("set temp attr\n")); ++#endif + return 0; + } + diff --git a/package/system/utils/xfsprogs/patches/140-no_po.patch b/package/system/utils/xfsprogs/patches/140-no_po.patch new file mode 100644 index 0000000000..f915a9cf27 --- /dev/null +++ b/package/system/utils/xfsprogs/patches/140-no_po.patch @@ -0,0 +1,20 @@ +diff -urN xfsprogs-3.1.7/Makefile xfsprogs-3.1.7.new/Makefile +--- xfsprogs-3.1.7/Makefile 2011-11-18 00:30:24.000000000 +0100 ++++ xfsprogs-3.1.7.new/Makefile 2012-04-20 14:15:48.641722955 +0200 +@@ -41,7 +41,7 @@ + + LIB_SUBDIRS = libxfs libxlog libxcmd libhandle libdisk + TOOL_SUBDIRS = copy db estimate fsck fsr growfs io logprint mkfs quota \ +- mdrestore repair rtcp m4 man doc po debian ++ mdrestore repair rtcp m4 man doc debian + + SUBDIRS = include $(LIB_SUBDIRS) $(TOOL_SUBDIRS) + +@@ -135,7 +135,6 @@ + $(Q)$(MAKE) $(MAKEOPTS) -C . $@ + else + $(Q)$(MAKE) $(MAKEOPTS) $(SRCDIR) +- $(Q)$(MAKE) $(MAKEOPTS) -C po + $(Q)$(MAKE) $(MAKEOPTS) source-link + $(Q)cd $(SRCDIR) && dpkg-buildpackage + endif |