fix e2fsprogs and systemd-machine-units
cover fix e2fsprogs and systemd-machine-units
The following changes since commit 7b501954198c2a810b2c03096accb27339cfd1f9:
runqemu: let qemuparams override previous settings (2017-09-14 02:11:35 -0700)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib rbt/2fixes
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=rbt/2fixes
Robert Yang (2):
e2fsprogs: set dir's mode correctly
systemd-machine-units: update LIC_FILES_CHKSUM
.../systemd/systemd-machine-units_1.0.bb | 2 +- ...c-create_inode.c-set-dir-s-mode-correctly.patch | 41 ++++++++++++++++++++++ .../recipes-devtools/e2fsprogs/e2fsprogs_1.43.5.bb | 1 + 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-misc-create_inode.c-set-dir-s-mode-correctly.patch
Signature · 1 line
2.10.2
PATCH 1/2 e2fsprogs: set dir's mode correctly
Fixed:
1) in pkg_postinst task set wanted file permissions:
---> chmod -R 521 "$D/opt/my_folder"
2) generate the rootfs image
Results:my_folder hasn't correct permissions on rootfs ext4 image -> permissions are changed to 721
But it should be 521.
[YOCTO #11652]
--- ...c-create_inode.c-set-dir-s-mode-correctly.patch | 41 ++++++++++++++++++++++ .../recipes-devtools/e2fsprogs/e2fsprogs_1.43.5.bb | 1 + 2 files changed, 42 insertions(+) create mode 100644 meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-misc-create_inode.c-set-dir-s-mode-correctly.patch
meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-misc-create_inode.c-set-dir-s-mode-correctly.patch new file +41 -0
@@ -0,0 +1,41 @@ +From f6d188580c2c9599319076fee22f2424652c711c Mon Sep 17 00:00:00 2001 +From: Robert Yang <[email protected]> +Date: Wed, 13 Sep 2017 19:55:35 -0700 +Subject: [PATCH] misc/create_inode.c: set dir's mode correctly + +The dir's mode has been set by ext2fs_mkdir() with umask, so +reset it to the source's mode in set_inode_extra(). + +Fixed when source dir's mode is 521, but tarball would be 721, this was +incorrect. + +Upstream-Status: Submitted + +Signed-off-by: Robert Yang <[email protected]> +--- + misc/create_inode.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/misc/create_inode.c b/misc/create_inode.c +index 8ce3faf..50fbaa8 100644 +--- a/misc/create_inode.c ++++ b/misc/create_inode.c +@@ -116,7 +116,14 @@ static errcode_t set_inode_extra(ext2_filsys fs, ext2_ino_t ino, + + inode.i_uid = st->st_uid; + inode.i_gid = st->st_gid; +- inode.i_mode |= st->st_mode; ++ /* ++ * The dir's mode has been set by ext2fs_mkdir() with umask, so ++ * reset it to the source's mode ++ */ ++ if S_ISDIR(st->st_mode) ++ inode.i_mode = LINUX_S_IFDIR | st->st_mode; ++ else ++ inode.i_mode |= st->st_mode; + inode.i_atime = st->st_atime; + inode.i_mtime = st->st_mtime; + inode.i_ctime = st->st_ctime; +-- +2.10.2 +
meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.5.bb +1 -0
@@ -9,6 +9,7 @@ SRC_URI += "file://acinclude.m4 \ file://Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch \ file://mkdir_p.patch \ file://reproducible-doc.patch \ + file://0001-misc-create_inode.c-set-dir-s-mode-correctly.patch \ " SRC_URI_append_class-native = " file://e2fsprogs-fix-missing-check-for-permission-denied.patch"
Signature · 1 line
2.10.2
PATCH 2/2 systemd-machine-units: update LIC_FILES_CHKSUM
In reply to Robert YangFixed:
WARNING: systemd-machine-units-1.0-r19 do_populate_lic: ${COREBASE}/LICENSE is not a valid license file, please use '${COMMON_LICENSE_DIR}/MIT' for a MIT License file in LIC_FILES_CHKSUM. This will become an error in the future
--- meta/recipes-core/systemd/systemd-machine-units_1.0.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/systemd/systemd-machine-units_1.0.bb +1 -1
@@ -1,7 +1,7 @@ SUMMARY = "Machine specific systemd units" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" PACKAGE_ARCH = "${MACHINE_ARCH}"
Signature · 1 line
2.10.2