commit
ef8402fafd
5 changed files with 156 additions and 0 deletions
93
utils/xfsprogs/Makefile
Normal file
93
utils/xfsprogs/Makefile
Normal file
|
@ -0,0 +1,93 @@
|
||||||
|
#
|
||||||
|
# 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_VERSION:=5.5.0
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||||
|
PKG_SOURCE_URL:=@KERNEL/linux/utils/fs/xfs/xfsprogs
|
||||||
|
PKG_HASH:=cfbb0b136799c48cb79435facd0969c5a60a587a458e2d16f9752771027efbec
|
||||||
|
|
||||||
|
PKG_INSTALL:=1
|
||||||
|
PKG_BUILD_PARALLEL:=1
|
||||||
|
PKG_CPE_ID:=cpe:/a:sgi:xfsprogs
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/xfsprogs/default
|
||||||
|
SECTION:=utils
|
||||||
|
CATEGORY:=Utilities
|
||||||
|
SUBMENU:=Filesystem
|
||||||
|
DEPENDS:=+libuuid +libpthread
|
||||||
|
URL:=https://xfs.org/
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/xfs-admin
|
||||||
|
$(call Package/xfsprogs/default)
|
||||||
|
TITLE:=Utilities for changing parameters of an XFS filesystems
|
||||||
|
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 += \
|
||||||
|
--disable-gettext \
|
||||||
|
--disable-blkid \
|
||||||
|
--disable-readline \
|
||||||
|
--disable-editline \
|
||||||
|
--disable-termcap \
|
||||||
|
--disable-lib64 \
|
||||||
|
--disable-librt \
|
||||||
|
--disable-ubisan \
|
||||||
|
--disable-addrsan \
|
||||||
|
--disable-threadsan \
|
||||||
|
--disable-scrub \
|
||||||
|
--disable-libicu
|
||||||
|
|
||||||
|
TARGET_CFLAGS += -DHAVE_MAP_SYNC
|
||||||
|
|
||||||
|
define Package/xfs-admin/install
|
||||||
|
$(INSTALL_DIR) $(1)/sbin
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/xfs_db $(1)/sbin
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/xfs_admin $(1)/sbin
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/xfs-mkfs/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/sbin
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/mkfs.xfs $(1)/usr/sbin
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/xfs-fsck/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/sbin
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/xfs_repair $(1)/usr/sbin
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/xfs_db $(1)/usr/sbin
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/xfs-growfs/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/sbin
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/xfs_growfs $(1)/usr/sbin
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,xfs-admin))
|
||||||
|
$(eval $(call BuildPackage,xfs-mkfs))
|
||||||
|
$(eval $(call BuildPackage,xfs-fsck))
|
||||||
|
$(eval $(call BuildPackage,xfs-growfs))
|
12
utils/xfsprogs/patches/110-subdirs.patch
Normal file
12
utils/xfsprogs/patches/110-subdirs.patch
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -62,8 +62,7 @@ HDR_SUBDIRS = include libxfs
|
||||||
|
LIBFROG_SUBDIR = libfrog
|
||||||
|
DLIB_SUBDIRS = libxlog libxcmd libhandle
|
||||||
|
LIB_SUBDIRS = libxfs $(DLIB_SUBDIRS)
|
||||||
|
-TOOL_SUBDIRS = copy db estimate fsck fsr growfs io logprint mkfs quota \
|
||||||
|
- mdrestore repair rtcp m4 man doc debian spaceman
|
||||||
|
+TOOL_SUBDIRS = db fsck growfs io mkfs repair
|
||||||
|
|
||||||
|
ifeq ("$(ENABLE_SCRUB)","yes")
|
||||||
|
TOOL_SUBDIRS += scrub
|
12
utils/xfsprogs/patches/120-disable_assert.patch
Normal file
12
utils/xfsprogs/patches/120-disable_assert.patch
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
--- a/libxfs/libxfs_priv.h
|
||||||
|
+++ b/libxfs/libxfs_priv.h
|
||||||
|
@@ -85,9 +85,6 @@ struct iomap;
|
||||||
|
/* for all the support code that uses progname in error messages */
|
||||||
|
extern char *progname;
|
||||||
|
|
||||||
|
-#undef ASSERT
|
||||||
|
-#define ASSERT(ex) assert(ex)
|
||||||
|
-
|
||||||
|
/*
|
||||||
|
* We have no need for the "linux" dev_t in userspace, so these
|
||||||
|
* are no-ops, and an xfs_dev_t is stored in VFS_I(ip)->i_rdev
|
|
@ -0,0 +1,26 @@
|
||||||
|
From 930f9aa8f08759fa739dd6e615ba8b3a1890008d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Rosen Penev <rosenp@gmail.com>
|
||||||
|
Date: Mon, 6 May 2019 13:56:13 -0700
|
||||||
|
Subject: [PATCH] db/malloc: Use posix_memalign instead of deprecated valloc
|
||||||
|
|
||||||
|
valloc is not available with uClibc-ng as well as being deprecated, which
|
||||||
|
causes compilation errors. aligned_alloc is not available before C11 so
|
||||||
|
used posix_memalign.'
|
||||||
|
|
||||||
|
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
||||||
|
---
|
||||||
|
db/malloc.c | 3 +--
|
||||||
|
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||||
|
|
||||||
|
--- a/db/malloc.c
|
||||||
|
+++ b/db/malloc.c
|
||||||
|
@@ -44,8 +44,7 @@ xmalloc(
|
||||||
|
{
|
||||||
|
void *ptr;
|
||||||
|
|
||||||
|
- ptr = valloc(size);
|
||||||
|
- if (ptr)
|
||||||
|
+ if(!posix_memalign(&ptr, sysconf(_SC_PAGESIZE), size))
|
||||||
|
return ptr;
|
||||||
|
badmalloc();
|
||||||
|
/* NOTREACHED */
|
13
utils/xfsprogs/patches/140-mman.patch
Normal file
13
utils/xfsprogs/patches/140-mman.patch
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
--- a/io/mmap.c
|
||||||
|
+++ b/io/mmap.c
|
||||||
|
@@ -11,6 +11,10 @@
|
||||||
|
#include "init.h"
|
||||||
|
#include "io.h"
|
||||||
|
|
||||||
|
+#ifndef MAP_SYNC
|
||||||
|
+#define MAP_SYNC 0
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
static cmdinfo_t mmap_cmd;
|
||||||
|
static cmdinfo_t mread_cmd;
|
||||||
|
static cmdinfo_t msync_cmd;
|
Loading…
Reference in a new issue