aboutsummaryrefslogtreecommitdiffstats
path: root/package/utils/f2fs-tools/patches
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2016-09-06 13:12:17 +0200
committerFelix Fietkau <nbd@nbd.name>2016-09-08 15:28:38 +0200
commitdbbd5eef58fb5617b45802f98b5a73981fc4f4f2 (patch)
tree83b6f69191d3126f9b2cb1fbc84cf6c50ff285ab /package/utils/f2fs-tools/patches
parent03cd41679597364ca0b382646b35cb5d06465d1b (diff)
downloadupstream-dbbd5eef58fb5617b45802f98b5a73981fc4f4f2.tar.gz
upstream-dbbd5eef58fb5617b45802f98b5a73981fc4f4f2.tar.bz2
upstream-dbbd5eef58fb5617b45802f98b5a73981fc4f4f2.zip
f2fs-tools: import from packages, clean up, and update to latest
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/utils/f2fs-tools/patches')
-rw-r--r--package/utils/f2fs-tools/patches/001-compile.patch19
-rw-r--r--package/utils/f2fs-tools/patches/010-include-byteswap-h.patch10
-rw-r--r--package/utils/f2fs-tools/patches/020-no_selinux.patch55
3 files changed, 84 insertions, 0 deletions
diff --git a/package/utils/f2fs-tools/patches/001-compile.patch b/package/utils/f2fs-tools/patches/001-compile.patch
new file mode 100644
index 0000000000..2ff6ee832d
--- /dev/null
+++ b/package/utils/f2fs-tools/patches/001-compile.patch
@@ -0,0 +1,19 @@
+--- 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])
diff --git a/package/utils/f2fs-tools/patches/010-include-byteswap-h.patch b/package/utils/f2fs-tools/patches/010-include-byteswap-h.patch
new file mode 100644
index 0000000000..ff7e4e7d3e
--- /dev/null
+++ b/package/utils/f2fs-tools/patches/010-include-byteswap-h.patch
@@ -0,0 +1,10 @@
+--- a/include/f2fs_fs.h
++++ b/include/f2fs_fs.h
+@@ -15,6 +15,7 @@
+ #include <inttypes.h>
+ #include <linux/types.h>
+ #include <sys/types.h>
++#include <byteswap.h>
+
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
diff --git a/package/utils/f2fs-tools/patches/020-no_selinux.patch b/package/utils/f2fs-tools/patches/020-no_selinux.patch
new file mode 100644
index 0000000000..dcb3bd24c4
--- /dev/null
+++ b/package/utils/f2fs-tools/patches/020-no_selinux.patch
@@ -0,0 +1,55 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -49,7 +49,7 @@ AC_PATH_PROG([LDCONFIG], [ldconfig],
+
+ # Checks for libraries.
+ PKG_CHECK_MODULES([libuuid], [uuid])
+-PKG_CHECK_MODULES([libselinux], [libselinux])
++# PKG_CHECK_MODULES([libselinux], [libselinux])
+
+ # Checks for header files.
+ AC_CHECK_HEADERS([linux/fs.h fcntl.h mntent.h stdlib.h string.h \
+--- a/fsck/sload.c
++++ b/fsck/sload.c
+@@ -16,10 +16,11 @@
+ #include <libgen.h>
+ #include <dirent.h>
+ #include <mntent.h>
++
++#ifdef WITH_ANDROID
+ #include <selinux/selinux.h>
+ #include <selinux/label.h>
+
+-#ifdef WITH_ANDROID
+ #include <selinux/label.h>
+ #include <private/android_filesystem_config.h>
+
+@@ -110,10 +111,12 @@ static int build_directory(struct f2fs_s
+ handle_selabel(dentries + i, S_ISDIR(stat.st_mode),
+ target_out_dir);
+
++#ifdef WITH_ANDROID
+ 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;
+
+@@ -218,6 +221,7 @@ int f2fs_sload(struct f2fs_sb_info *sbi,
+ return ret;
+ }
+
++#ifdef WITH_ANDROID
+ if (sehnd) {
+ char *secontext = NULL;
+
+@@ -233,6 +237,7 @@ int f2fs_sload(struct f2fs_sb_info *sbi,
+ }
+ free(secontext);
+ }
++#endif
+
+ /* update curseg info; can update sit->types */
+ move_curseg_info(sbi, SM_I(sbi)->main_blkaddr);