By default cpio preserves the uid&guid's of the original user which leads to host contamination and boot failures because commands like mount from initramfs expect to be run by root and the original host user might not even exist on the target.
Signed-off-by: Ioan-Adrian Ratiu <[email protected]> --- scripts/lib/wic/plugins/source/isoimage-isohybrid.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py index de99ad8..bc99283 100644 --- a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py +++ b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py @@ -174,8 +174,8 @@ class IsoImagePlugin(SourcePlugin): else: msger.error("Couldn't find or build initrd, exiting.\n") - exec_cmd("find %s | cpio -o -H newc >%s/initrd.cpio " \ - % (initrd_dir, cr_workdir), as_shell=True) + exec_cmd("cd %s && find . | cpio -o -H newc -R +0:+0 >./initrd.cpio " \ + % initrd_dir, as_shell=True) exec_cmd("gzip -f -9 -c %s/initrd.cpio > %s" \ % (cr_workdir, initrd), as_shell=True) shutil.rmtree(initrd_dir) -- 2.7.4 -- _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
