aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/android-tools/android-tools/extras
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2018-10-02 17:33:59 +0000
committerKhem Raj <raj.khem@gmail.com>2018-10-02 17:17:10 -0700
commit7ea8156eeaebd845321dd2189ef0c9c6b408acd5 (patch)
tree7826818d7fb7b893f19eb4d2acd40002fecdcbff /meta-oe/recipes-devtools/android-tools/android-tools/extras
parentff5549841c5c5debae0180574643281d25d4c037 (diff)
downloadmeta-openembedded-contrib-7ea8156eeaebd845321dd2189ef0c9c6b408acd5.tar.gz
android-tools: refresh patches with devtool
* devtool isn't able to regenerate them completely, it generates only top level commit which says that submodules were changed, like this: From c8fa114325e4e532657499b9bb6fd23cb6536eaa Mon Sep 17 00:00:00 2001 From: OpenEmbedded <oe.patch@oe> Date: Tue, 2 Oct 2018 16:46:55 +0000 Subject: [PATCH] Committing changes from do_patch --- external/libselinux | 2 +- system/core | 2 +- system/extras | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) .. but it still creates relatively good commits in each submodule and after small manual cleanup they can be exported with git format-patch --no-numbered --no-signature * rename .gitignore to prevent git ignoring the changes in .patch files in meta-oe already (we want to use it only later during the build) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-devtools/android-tools/android-tools/extras')
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/extras/0001-ext4_utils-remove-selinux-extensions.patch39
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/extras/0002-ext4_utils-add-o-argument-to-preserve-ownership.patch78
2 files changed, 117 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/extras/0001-ext4_utils-remove-selinux-extensions.patch b/meta-oe/recipes-devtools/android-tools/android-tools/extras/0001-ext4_utils-remove-selinux-extensions.patch
new file mode 100644
index 0000000000..4a19a5d65a
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-tools/android-tools/extras/0001-ext4_utils-remove-selinux-extensions.patch
@@ -0,0 +1,39 @@
+From 354604da9d152f1931e91991d3f34197fc8fc759 Mon Sep 17 00:00:00 2001
+From: Sergio Schvezov <sergio.schvezov@canonical.com>
+Date: Tue, 2 Oct 2018 16:36:54 +0000
+Subject: [PATCH] ext4_utils: remove selinux extensions
+
+* drop useless includes of Android SELINUX extensions
+* avoids having to clone another module
+* this should be sent upstream
+
+Upstream-Status: Inappropriate
+---
+ ext4_utils/make_ext4fs.c | 1 -
+ ext4_utils/make_ext4fs_main.c | 1 -
+ 2 files changed, 2 deletions(-)
+
+diff --git a/ext4_utils/make_ext4fs.c b/ext4_utils/make_ext4fs.c
+index 2f89ae8a0..732afbed7 100644
+--- a/ext4_utils/make_ext4fs.c
++++ b/ext4_utils/make_ext4fs.c
+@@ -62,7 +62,6 @@
+
+ #include <selinux/selinux.h>
+ #include <selinux/label.h>
+-#include <selinux/android.h>
+
+ #define O_BINARY 0
+
+diff --git a/ext4_utils/make_ext4fs_main.c b/ext4_utils/make_ext4fs_main.c
+index a6c5f6160..f8e7b9da9 100644
+--- a/ext4_utils/make_ext4fs_main.c
++++ b/ext4_utils/make_ext4fs_main.c
+@@ -32,7 +32,6 @@
+ #ifndef USE_MINGW
+ #include <selinux/selinux.h>
+ #include <selinux/label.h>
+-#include <selinux/android.h>
+ #else
+ struct selabel_handle;
+ #endif
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/extras/0002-ext4_utils-add-o-argument-to-preserve-ownership.patch b/meta-oe/recipes-devtools/android-tools/android-tools/extras/0002-ext4_utils-add-o-argument-to-preserve-ownership.patch
new file mode 100644
index 0000000000..3b50ffbf36
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-tools/android-tools/extras/0002-ext4_utils-add-o-argument-to-preserve-ownership.patch
@@ -0,0 +1,78 @@
+From b9254539811ce912bfd16dd1d185eba7a10cceff Mon Sep 17 00:00:00 2001
+From: Markus Mayer <mmayer@mmayer.net>
+Date: Wed, 7 Sep 2016 12:58:47 +0300
+Subject: [PATCH] ext4_utils: add -o argument to preserve ownership
+
+See also https://android-review.googlesource.com/#/c/100312/
+
+Upstream-Status: Inappropriate
+---
+ ext4_utils/make_ext4fs.c | 6 ++++++
+ ext4_utils/make_ext4fs_main.c | 10 ++++++++--
+ 2 files changed, 14 insertions(+), 2 deletions(-)
+
+diff --git a/ext4_utils/make_ext4fs.c b/ext4_utils/make_ext4fs.c
+index 732afbed7..2cbf04399 100644
+--- a/ext4_utils/make_ext4fs.c
++++ b/ext4_utils/make_ext4fs.c
+@@ -67,6 +67,8 @@
+
+ #endif
+
++int preserve_owner = 0;
++
+ /* TODO: Not implemented:
+ Allocating blocks in the same block group as the file inode
+ Hash or binary tree directories
+@@ -185,6 +187,10 @@ static u32 build_directory_structure(const char *full_path, const char *dir_path
+ } else {
+ dentries[i].mtime = fixed_time;
+ }
++ if (preserve_owner) {
++ dentries[i].uid = stat.st_uid;
++ dentries[i].gid = stat.st_gid;
++ }
+ uint64_t capabilities;
+ if (fs_config_func != NULL) {
+ #ifdef ANDROID
+diff --git a/ext4_utils/make_ext4fs_main.c b/ext4_utils/make_ext4fs_main.c
+index f8e7b9da9..e82d43277 100644
+--- a/ext4_utils/make_ext4fs_main.c
++++ b/ext4_utils/make_ext4fs_main.c
+@@ -47,13 +47,15 @@ struct selabel_handle;
+ extern struct fs_info info;
+
+
++extern int preserve_owner;
++
+ static void usage(char *path)
+ {
+ fprintf(stderr, "%s [ -l <len> ] [ -j <journal size> ] [ -b <block_size> ]\n", basename(path));
+ fprintf(stderr, " [ -g <blocks per group> ] [ -i <inodes> ] [ -I <inode size> ]\n");
+ fprintf(stderr, " [ -L <label> ] [ -f ] [ -a <android mountpoint> ]\n");
+ fprintf(stderr, " [ -S file_contexts ] [ -C fs_config ] [ -T timestamp ]\n");
+- fprintf(stderr, " [ -z | -s ] [ -w ] [ -c ] [ -J ] [ -v ] [ -B <block_list_file> ]\n");
++ fprintf(stderr, " [ -z | -s ] [ -w ] [ -c ] [ -J ] [ -o ] [ -v ] [ -B <block_list_file> ]\n");
+ fprintf(stderr, " <filename> [<directory>]\n");
+ }
+
+@@ -79,7 +81,7 @@ int main(int argc, char **argv)
+ struct selinux_opt seopts[] = { { SELABEL_OPT_PATH, "" } };
+ #endif
+
+- while ((opt = getopt(argc, argv, "l:j:b:g:i:I:L:a:S:T:C:B:fwzJsctv")) != -1) {
++ while ((opt = getopt(argc, argv, "l:j:b:g:i:I:L:a:S:T:C:B:fwzJsctov")) != -1) {
+ switch (opt) {
+ case 'l':
+ info.len = parse_num(optarg);
+@@ -142,6 +144,10 @@ int main(int argc, char **argv)
+ }
+ #endif
+ break;
++ case 'o':
++ preserve_owner = 1;
++ printf("Warning: Enabling 'preserve ownership', this is an unofficial feature!\n");
++ break;
+ case 'v':
+ verbose = 1;
+ break;