Merge pull request #4422 from diizzyy/patch-55
utils/f2fs-tools: Remove from tree
This commit is contained in:
commit
13c670ef78
4 changed files with 0 additions and 219 deletions
|
@ -1,90 +0,0 @@
|
|||
#
|
||||
# Copyright (C) 2014 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:=f2fs-tools
|
||||
PKG_VERSION:=1.7.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_LICENSE:=GPLv2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs-tools.git/snapshot/
|
||||
PKG_MD5SUM:=9db22274264f0c88dbee012f257917b1
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_INSTALL:=1
|
||||
|
||||
PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/f2fs-tools/Default
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=Filesystem
|
||||
DEPENDS:=+libf2fs
|
||||
URL:=http://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs-tools.git
|
||||
endef
|
||||
|
||||
define Package/mkf2fs
|
||||
$(Package/f2fs-tools/Default)
|
||||
TITLE:=Utility for creating a Flash-Friendly File System (F2FS)
|
||||
endef
|
||||
|
||||
define Package/f2fsck
|
||||
$(Package/f2fs-tools/Default)
|
||||
TITLE:=Utility for checking/repairing a Flash-Friendly File System (F2FS)
|
||||
endef
|
||||
|
||||
define Package/f2fs-tools
|
||||
$(Package/f2fs-tools/Default)
|
||||
TITLE:=Tools for Flash-Friendly File System (F2FS)
|
||||
DEPENDS += +mkf2fs +f2fsck
|
||||
endef
|
||||
|
||||
define Package/libf2fs
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=Library for Flash-Friendly File System (F2FS) tools
|
||||
DEPENDS:=+libuuid
|
||||
endef
|
||||
|
||||
define Package/libf2fs/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) \
|
||||
$(PKG_INSTALL_DIR)/usr/lib/libf2fs.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/mkf2fs/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mkfs.f2fs $(1)/usr/sbin
|
||||
endef
|
||||
|
||||
define Package/f2fsck/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fsck.f2fs $(1)/usr/sbin
|
||||
ln -s /usr/sbin/fsck.f2fs $(1)/usr/sbin/defrag.f2fs
|
||||
ln -s /usr/sbin/fsck.f2fs $(1)/usr/sbin/dump.f2fs
|
||||
ln -s /usr/sbin/fsck.f2fs $(1)/usr/sbin/sload.f2fs
|
||||
ln -s /usr/sbin/fsck.f2fs $(1)/usr/sbin/resize.f2fs
|
||||
endef
|
||||
|
||||
define Package/f2fs-tools/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/f2fstat $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fibmap.f2fs $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/parse.f2fs $(1)/usr/sbin
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libf2fs))
|
||||
$(eval $(call BuildPackage,mkf2fs))
|
||||
$(eval $(call BuildPackage,f2fsck))
|
||||
$(eval $(call BuildPackage,f2fs-tools))
|
|
@ -1,19 +0,0 @@
|
|||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -20,14 +20,9 @@ AC_DEFINE([F2FS_MINOR_VERSION], m4_bpats
|
||||
[\([0-9]*\).\([0-9]*\)\(\w\|\W\)*], [\2]),
|
||||
[Minor version for f2fs-tools])
|
||||
|
||||
-AC_CHECK_FILE(.git,
|
||||
- AC_DEFINE([F2FS_TOOLS_DATE],
|
||||
- "m4_bpatsubst(f2fs_tools_gitdate,
|
||||
- [\([0-9-]*\)\(\w\|\W\)*], [\1])",
|
||||
- [f2fs-tools date based on Git commits]),
|
||||
- AC_DEFINE([F2FS_TOOLS_DATE],
|
||||
+AC_DEFINE([F2FS_TOOLS_DATE],
|
||||
"f2fs_tools_date",
|
||||
- [f2fs-tools date based on Source releases]))
|
||||
+ [f2fs-tools date based on Source releases])
|
||||
|
||||
AC_CONFIG_SRCDIR([config.h.in])
|
||||
AC_CONFIG_HEADER([config.h])
|
|
@ -1,10 +0,0 @@
|
|||
--- a/include/f2fs_fs.h
|
||||
+++ b/include/f2fs_fs.h
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <inttypes.h>
|
||||
#include <linux/types.h>
|
||||
#include <sys/types.h>
|
||||
+#include <byteswap.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
|
@ -1,100 +0,0 @@
|
|||
From b0a2386089fd6efade6b89094325ed8a9f8c6fff Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hesse <mail@eworm.de>
|
||||
Date: Sat, 22 Oct 2016 22:06:54 +0200
|
||||
Subject: [PATCH] sload.f2fs: allow to build without libselinux
|
||||
|
||||
Some systems do not have libselinux. Allow to build sload.f2fs without
|
||||
support for selinux.
|
||||
|
||||
Signed-off-by: Christian Hesse <mail@eworm.de>
|
||||
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
||||
---
|
||||
configure.ac | 4 +++-
|
||||
fsck/sload.c | 12 +++++++++++-
|
||||
2 files changed, 14 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index f519790..7a62328 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -54,7 +54,9 @@ AC_PATH_PROG([LDCONFIG], [ldconfig],
|
||||
|
||||
# Checks for libraries.
|
||||
PKG_CHECK_MODULES([libuuid], [uuid])
|
||||
-PKG_CHECK_MODULES([libselinux], [libselinux])
|
||||
+PKG_CHECK_MODULES([libselinux], [libselinux],
|
||||
+ [AC_DEFINE([HAVE_LIBSELINUX], [1], [Use libselinux])],
|
||||
+ [AC_MSG_NOTICE([libselinux not found])])
|
||||
|
||||
# Checks for header files.
|
||||
AC_CHECK_HEADERS([linux/fs.h fcntl.h mntent.h stdlib.h string.h \
|
||||
diff --git a/fsck/sload.c b/fsck/sload.c
|
||||
index ea072d1..68799c1 100644
|
||||
--- a/fsck/sload.c
|
||||
+++ b/fsck/sload.c
|
||||
@@ -16,8 +16,11 @@
|
||||
#include <libgen.h>
|
||||
#include <dirent.h>
|
||||
#include <mntent.h>
|
||||
+
|
||||
+#ifdef HAVE_LIBSELINUX
|
||||
#include <selinux/selinux.h>
|
||||
#include <selinux/label.h>
|
||||
+#endif
|
||||
|
||||
#ifdef WITH_ANDROID
|
||||
#include <selinux/label.h>
|
||||
@@ -110,10 +113,12 @@ static int build_directory(struct f2fs_sb_info *sbi, const char *full_path,
|
||||
handle_selabel(dentries + i, S_ISDIR(stat.st_mode),
|
||||
target_out_dir);
|
||||
|
||||
+#ifdef HAVE_LIBSELINUX
|
||||
if (sehnd && selabel_lookup(sehnd, &dentries[i].secon,
|
||||
dentries[i].path, stat.st_mode) < 0)
|
||||
ERR_MSG("Cannot lookup security context for %s\n",
|
||||
dentries[i].path);
|
||||
+#endif
|
||||
|
||||
dentries[i].pino = dir_ino;
|
||||
|
||||
@@ -174,6 +179,7 @@ static int build_directory(struct f2fs_sb_info *sbi, const char *full_path,
|
||||
MSG(1, "Error unknown file type\n");
|
||||
}
|
||||
|
||||
+#ifdef HAVE_LIBSELINUX
|
||||
if (dentries[i].secon) {
|
||||
inode_set_selinux(sbi, dentries[i].ino, dentries[i].secon);
|
||||
MSG(1, "File = %s \n----->SELinux context = %s\n",
|
||||
@@ -184,10 +190,12 @@ static int build_directory(struct f2fs_sb_info *sbi, const char *full_path,
|
||||
dentries[i].gid, dentries[i].capabilities);
|
||||
}
|
||||
|
||||
+ free(dentries[i].secon);
|
||||
+#endif
|
||||
+
|
||||
free(dentries[i].path);
|
||||
free(dentries[i].full_path);
|
||||
free((void *)dentries[i].name);
|
||||
- free(dentries[i].secon);
|
||||
}
|
||||
|
||||
free(dentries);
|
||||
@@ -218,6 +226,7 @@ int f2fs_sload(struct f2fs_sb_info *sbi, const char *from_dir,
|
||||
return ret;
|
||||
}
|
||||
|
||||
+#ifdef HAVE_LIBSELINUX
|
||||
if (sehnd) {
|
||||
char *secontext = NULL;
|
||||
|
||||
@@ -233,6 +242,7 @@ int f2fs_sload(struct f2fs_sb_info *sbi, const char *from_dir,
|
||||
}
|
||||
free(secontext);
|
||||
}
|
||||
+#endif
|
||||
|
||||
/* update curseg info; can update sit->types */
|
||||
move_curseg_info(sbi, SM_I(sbi)->main_blkaddr);
|
||||
--
|
||||
2.10.0
|
||||
|
Loading…
Reference in a new issue