summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/plugins
diff options
context:
space:
mode:
authorIoan-Adrian Ratiu <adrian.ratiu@ni.com>2016-04-01 17:31:20 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-04-03 15:51:36 +0100
commit31a10cb6af4109a346e7df3167f4754a56e32409 (patch)
tree9e2ed86591241da6781dd2c5c88ad03fd5d69103 /scripts/lib/wic/plugins
parent5cabf3b061fd7f3d17d734a1c9ffb831fff15587 (diff)
downloadpoky-31a10cb6af4109a346e7df3167f4754a56e32409.tar.gz
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>
Diffstat (limited to 'scripts/lib/wic/plugins')
-rw-r--r--scripts/lib/wic/plugins/source/isoimage-isohybrid.py4
1 files 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 de99ad8495..bc9928314c 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):
174 else: 174 else:
175 msger.error("Couldn't find or build initrd, exiting.\n") 175 msger.error("Couldn't find or build initrd, exiting.\n")
176 176
177 exec_cmd("find %s | cpio -o -H newc >%s/initrd.cpio " \ 177 exec_cmd("cd %s && find . | cpio -o -H newc -R +0:+0 >./initrd.cpio " \
178 % (initrd_dir, cr_workdir), as_shell=True) 178 % initrd_dir, as_shell=True)
179 exec_cmd("gzip -f -9 -c %s/initrd.cpio > %s" \ 179 exec_cmd("gzip -f -9 -c %s/initrd.cpio > %s" \
180 % (cr_workdir, initrd), as_shell=True) 180 % (cr_workdir, initrd), as_shell=True)
181 shutil.rmtree(initrd_dir) 181 shutil.rmtree(initrd_dir)