From 777b8eaaaeace0640e49c6413330701bc86eabdd Mon Sep 17 00:00:00 2001 From: Philip Tricca Date: Fri, 19 Feb 2016 01:56:36 +0000 Subject: [PATCH] e2fsprogs: Copy xattr for filesystem root directory. Signed-off-by: Philip Tricca --- .../misc_create_inode.c-label_rootfs.patch | 37 +++++++++++++++++++ .../e2fsprogs/e2fsprogs_git.bbappend | 2 + 2 files changed, 39 insertions(+) create mode 100644 recipes-devtools/e2fsprogs/e2fsprogs/misc_create_inode.c-label_rootfs.patch create mode 100644 recipes-devtools/e2fsprogs/e2fsprogs_git.bbappend diff --git a/recipes-devtools/e2fsprogs/e2fsprogs/misc_create_inode.c-label_rootfs.patch b/recipes-devtools/e2fsprogs/e2fsprogs/misc_create_inode.c-label_rootfs.patch new file mode 100644 index 0000000..1de0dde --- /dev/null +++ b/recipes-devtools/e2fsprogs/e2fsprogs/misc_create_inode.c-label_rootfs.patch @@ -0,0 +1,37 @@ +From: Philip Tricca +To: tytso@mit.edu +Cc: liezhi.yang@windriver.com +Date: Sat, 20 Feb 2016 18:58:58 +0000 +Subject: [PATCH] misc/create_inode.c: Copy xattrs from root directory when populating fs. + +When copying a file system using the -d option the xattrs from the root +directory need to be copied before the populate_fs recusion starts. + +Signed-off-by: Philip Tricca +--- + misc/create_inode.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/misc/create_inode.c b/misc/create_inode.c +index 0de5719..ee21186 100644 +--- a/misc/create_inode.c ++++ b/misc/create_inode.c +@@ -890,8 +890,15 @@ errcode_t populate_fs(ext2_filsys fs, ext2_ino_t parent_ino, + return retval; + } + ++ retval = set_inode_xattr(fs, root, source_dir); ++ if (retval) { ++ com_err(__func__, retval, ++ _("while setting xattrs for \"%s\""), source_dir); ++ goto out; ++ } + retval = __populate_fs(fs, parent_ino, source_dir, root, &hdlinks); + ++out: + free(hdlinks.hdl); + return retval; + } +-- +2.1.4 + diff --git a/recipes-devtools/e2fsprogs/e2fsprogs_git.bbappend b/recipes-devtools/e2fsprogs/e2fsprogs_git.bbappend new file mode 100644 index 0000000..7acaf48 --- /dev/null +++ b/recipes-devtools/e2fsprogs/e2fsprogs_git.bbappend @@ -0,0 +1,2 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +SRC_URI += "file://misc_create_inode.c-label_rootfs.patch"