1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-05 04:44:59 +02:00

add a package for xfsprogs

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@25558 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2011-02-16 18:20:30 +00:00
parent a32bf38770
commit e6d4f9f852
5 changed files with 191 additions and 0 deletions

83
package/xfsprogs/Makefile Normal file
View File

@ -0,0 +1,83 @@
#
# Copyright (C) 2006-2008 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.4
PKG_SOURCE_URL:=http://ftp.debian.org/pool/main/x/xfsprogs
PKG_MD5SUM:=23568a603c913b80076abe3c23521573
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
PKG_INSTALL:=1
PKG_FIXUP = libtool
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
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))

View File

@ -0,0 +1,13 @@
--- a/configure.in
+++ b/configure.in
@@ -87,8 +87,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

View File

@ -0,0 +1,28 @@
--- 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, cha
progname, name);
return 1;
}
+#endif
return 0;
}

View File

@ -0,0 +1,39 @@
--- a/copy/xfs_copy.c
+++ b/copy/xfs_copy.c
@@ -463,6 +463,15 @@ read_ag_header(int fd, xfs_agnumber_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 */

View File

@ -0,0 +1,28 @@
--- 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;
}