f2fs-tools: import patch that disables selinux
authorDenis Osvald <redacted>
Fri, 18 Nov 2016 14:38:16 +0000 (15:38 +0100)
committerDenis Osvald <redacted>
Fri, 18 Nov 2016 14:41:14 +0000 (15:41 +0100)
Signed-off-by: Denis Osvald <redacted>
utils/f2fs-tools/Config.in [deleted file]
utils/f2fs-tools/patches/020-no_selinux.patch [new file with mode: 0644]

diff --git a/utils/f2fs-tools/Config.in b/utils/f2fs-tools/Config.in
deleted file mode 100644 (file)
index 0c7ecab..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-menu "Configuration"
-        depends on PACKAGE_f2fs-tools
-
-config F2FS_UTILS_f2fstat
-       bool "Install f2fstat utility"
-       default y
-
-config F2FS_UTILS_fibmap_f2fs
-       bool "Install fibmap.f2fs utility"
-       default y
-
-config F2FS_UTILS_fsck_f2fs
-       bool "Install fsck.f2fs utility"
-       default y
-
-config F2FS_UTILS_dump_f2fs
-       bool "Install dump.f2fs utility"
-       select F2FS_UTILS_fsck_f2fs
-       default y
-
-config F2FS_UTILS_mkfs_f2fs
-       bool "Install mkfs.f2fs utility"
-       default y
-
-endmenu
diff --git a/utils/f2fs-tools/patches/020-no_selinux.patch b/utils/f2fs-tools/patches/020-no_selinux.patch
new file mode 100644 (file)
index 0000000..dcb3bd2
--- /dev/null
@@ -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);
git clone https://git.99rst.org/PROJECT