mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 21:09:03 +02:00
wic/isoimage-isohybrid.py: change cpio generated uid&gid to root
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. (From OE-Core rev: 28910ee2eacc15cf42b5e58bd43b3bd15c34eb97) Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
5cabf3b061
commit
31a10cb6af
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user