Created attachment 4749 [details] example wks file with --exclude-path parameter After using additional switch "--exclude-path" in wks file, a whole rootfs becomes owned by local user (1000:1000). Affected version poky@5232b03e22a49c368fbf4d79e05519ad5e48db4a Working as expected: poky@6bf90676038a7a6111bbfeaef2f73614c7206b9e
Seems like there's a few cases where in scripts/lib/wic/plugins/source/rootfs.py where a copy of the rootfs is created so that modifications can be done before creating the partitions, this happens if --exclude-path, --include_path or --change-directory is used. This temporary directory is created under ${WORKDIR}/build-wic, and since and since meta/classes/image_types_wic.bbclass has the line: PSEUDO_IGNORE_PATHS .= ",${WORKDIR}/build-wic" it will not use pseudo and the resulting file permissions will not be correct. If I remove ${WORKDIR}/build-wic from PSEUDO_IGNORE_PATHS, the permissions seems ok even when using --exclude-path, but I'm not sure if there's any unwanted side-effects of doing this. If so, maybe it's better to create the the temporary rootfs in some other directory, not in PSEUDO_IGNORE_PATHS.
Seems like I ran into problems later, with pseudo aborting with a link to "https://wiki.yoctoproject.org/wiki/Pseudo_Abort". Looking at pseudo.log it seems like the partition files created in build-wic/ caused the problem.
This would need fixing in gatesgarth as well ...
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=7a2545013cfed710011ab470ed30422e79622dca