a few wic fixes
cover a few wic fixes
For problems noticed while testing.
The following changes since commit 2b5bac02196b8bd30d223d508f5f7d4300889fd7:
poky: Update Version post release (2013-10-14 16:59:12 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib.git tzanussi/wic-fixes-0
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=tzanussi/wic-fixes-0
Tom Zanussi (3):
wic: check for build artifacts
wic: check passed-in build artifact directories
wic: add fakeroot to the populate-extfs step
.../lib/mic/kickstart/custom_commands/partition.py | 2 +- scripts/wic | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-)
Signature · 1 line
1.7.11.4
PATCH 1/3 wic: check for build artifacts
wic needs to be given one form of build artifacts or another - complain if the user doesn't do that.
--- scripts/wic | 8 ++++++++ 1 file changed, 8 insertions(+)
scripts/wic +8 -0
@@ -75,6 +75,14 @@ def wic_create_subcommand(args, usage_str): parser.print_help() sys.exit(1) + if not options.image_name and not (options.rootfs_dir and + options.bootimg_dir and + options.kernel_dir and + options.native_sysroot): + print "Build artifacts not completely specified, exiting." + print " (Use 'wic -e' or 'wic -r -b -k -n' to specify artifacts)" + sys.exit(1) + if not options.image_name: options.build_check = False
Signature · 1 line
1.7.11.4
PATCH 3/3 wic: add fakeroot to the populate-extfs step
Without this, files in the generated filesystem pick up the wrong ownership.
--- scripts/lib/mic/kickstart/custom_commands/partition.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/lib/mic/kickstart/custom_commands/partition.py +1 -1
@@ -216,7 +216,7 @@ class Wic_PartData(Mic_PartData): """ Prepare content for an ext2/3/4 rootfs partition. """ - populate_script = "%s/usr/bin/populate-extfs.sh" % native_sysroot + populate_script = "fakeroot %s/usr/bin/populate-extfs.sh" % native_sysroot image_extra_space = 10240 image_rootfs = rootfs_dir
Signature · 1 line
1.7.11.4
PATCH 2/3 wic: check passed-in build artifact directories
In reply to Tom ZanussiMake sure they exist - complain if they don't.
--- scripts/wic | 12 ++++++++++++ 1 file changed, 12 insertions(+)
scripts/wic +12 -0
@@ -119,6 +119,18 @@ def wic_create_subcommand(args, usage_str): bootimg_dir = options.bootimg_dir kernel_dir = options.kernel_dir native_sysroot = options.native_sysroot + if not os.path.isdir(rootfs_dir): + print "--roofs-dir (-r) not found, exiting\n" + sys.exit(1) + if not os.path.isdir(bootimg_dir): + print "--bootimg-dir (-b) not found, exiting\n" + sys.exit(1) + if not os.path.isdir(kernel_dir): + print "--kernel-dir (-k) not found, exiting\n" + sys.exit(1) + if not os.path.isdir(native_sysroot): + print "--native-sysroot (-n) not found, exiting\n" + sys.exit(1) wic_create(args, wks_file, rootfs_dir, bootimg_dir, kernel_dir, native_sysroot, hdddir, staging_data_dir, scripts_path,
Signature · 1 line
1.7.11.4
Re: [PATCH 3/3] wic: add fakeroot to the populate-extfs step
In reply to Tom ZanussiQuoted 13 lines · Tom Zanussi
Without this, files in the generated filesystem pick up the wrong ownership.
Signed-off-by Tom Zanussi <[email protected]>--- scripts/lib/mic/kickstart/custom_commands/partition.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)scripts/lib/mic/kickstart/custom_commands/partition.py +0
-0
scripts/lib/mic/kickstart/custom_commands/partition.py class Wic_PartData(Mic_PartData): · line 222
Quoted 8 lines
scripts/lib/mic/kickstart/custom_commands/partition.py +1
-1@@ -216,7 +216,7 @@ class Wic_PartData(Mic_PartData): """ Prepare content for an ext2/3/4 rootfs partition. """ - populate_script = "%s/usr/bin/populate-extfs.sh" % native_sysroot + populate_script = "fakeroot %s/usr/bin/populate-extfs.sh" % native_sysroot image_extra_space = 10240 image_rootfs = rootfs_dir
We don't use fakeroot, please use pseudo. If pseudo doesn't work, we need to figure out why and fix it.
Cheers,
Richard
Re: [PATCH 3/3] wic: add fakeroot to the populate-extfs step
Quoted 21 lines · Richard Purdie
Quoted 20 lines · Tom Zanussi
Without this, files in the generated filesystem pick up the wrong ownership.
Signed-off-by Tom Zanussi <[email protected]>--- scripts/lib/mic/kickstart/custom_commands/partition.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)scripts/lib/mic/kickstart/custom_commands/partition.py +1
-1@@ -216,7 +216,7 @@ class Wic_PartData(Mic_PartData): """ Prepare content for an ext2/3/4 rootfs partition. """ - populate_script = "%s/usr/bin/populate-extfs.sh" % native_sysroot + populate_script = "fakeroot %s/usr/bin/populate-extfs.sh" % native_sysroot image_extra_space = 10240
Quoted 5 lines
scripts/lib/mic/kickstart/custom_commands/partition.py class Wic_PartData(Mic_PartData): · line 222
Quoted 1 line
scripts/lib/mic/kickstart/custom_commands/partition.py +0
-0image_rootfs = rootfs_dirWe don't use fakeroot, please use pseudo. If pseudo doesn't work, we need to figure out why and fix it.
Ultimately this needs to work independently from bitbake. Is that practical if we use pseudo here?
Signature · 3 lines
Darren Hart Intel Open Source Technology Center Yocto Project - Linux Kernel
Re: [PATCH 3/3] wic: add fakeroot to the populate-extfs step
Quoted 22 lines · Darren Hart
Quoted 21 lines · Richard Purdie
Quoted 20 lines · Tom Zanussi
Without this, files in the generated filesystem pick up the wrong ownership.
Signed-off-by Tom Zanussi <[email protected]>--- scripts/lib/mic/kickstart/custom_commands/partition.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)scripts/lib/mic/kickstart/custom_commands/partition.py +1
-1@@ -216,7 +216,7 @@ class Wic_PartData(Mic_PartData): """ Prepare content for an ext2/3/4 rootfs partition. """ - populate_script = "%s/usr/bin/populate-extfs.sh" % native_sysroot + populate_script = "fakeroot %s/usr/bin/populate-extfs.sh" % native_sysroot image_extra_space = 10240
Quoted 8 lines
Quoted 5 lines
scripts/lib/mic/kickstart/custom_commands/partition.py class Wic_PartData(Mic_PartData): · line 222
Quoted 1 line
scripts/lib/mic/kickstart/custom_commands/partition.py +0
-0image_rootfs = rootfs_dirWe don't use fakeroot, please use pseudo. If pseudo doesn't work, we need to figure out why and fix it.
Ultimately this needs to work independently from bitbake. Is that practical if we use pseudo here?
pseudo is an independent project and you can build and use it outside of bitbake no problems at all. My worry is we didn't adopt fakeroot for many good reasons. I don't want "fixing fakeroot" to suddenly appear on the agenda. We did that and its called pseudo.
Cheers,
Richard
Re: [PATCH 3/3] wic: add fakeroot to the populate-extfs step
In reply to Darren HartQuoted 22 lines · Darren Hart
Quoted 21 lines · Richard Purdie
Quoted 20 lines · Tom Zanussi
Without this, files in the generated filesystem pick up the wrong ownership.
Signed-off-by Tom Zanussi <[email protected]>--- scripts/lib/mic/kickstart/custom_commands/partition.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)scripts/lib/mic/kickstart/custom_commands/partition.py +1
-1@@ -216,7 +216,7 @@ class Wic_PartData(Mic_PartData): """ Prepare content for an ext2/3/4 rootfs partition. """ - populate_script = "%s/usr/bin/populate-extfs.sh" % native_sysroot + populate_script = "fakeroot %s/usr/bin/populate-extfs.sh" % native_sysroot image_extra_space = 10240
Quoted 8 lines
Quoted 5 lines
scripts/lib/mic/kickstart/custom_commands/partition.py class Wic_PartData(Mic_PartData): · line 222
Quoted 1 line
scripts/lib/mic/kickstart/custom_commands/partition.py +0
-0image_rootfs = rootfs_dirWe don't use fakeroot, please use pseudo. If pseudo doesn't work, we need to figure out why and fix it.
Ultimately this needs to work independently from bitbake. Is that practical if we use pseudo here?
Starting to get a bit out of scope for this discussion, but it does impact the utility of the tool. I don't see a package for pseudo in either Ubuntu or Fedora. The lack of a package would definitely increase the barrier to use (lots of people really dislike having to build their own sources and muck up their filesystem with non-package files).
Has any work already been kicked off to try and get pseudo packaged in the major distributions? Who would the right people be to work with on that?
BTW, I'm not arguing for using fakeroot here, just trying to look at the big picture of using wic and what additional effort might be required to make it successful.
Signature · 3 lines
Darren Hart Intel Open Source Technology Center Yocto Project - Linux Kernel
Re: [PATCH 3/3] wic: add fakeroot to the populate-extfs step
Quoted 38 lines · Darren Hart
Quoted 22 lines · Darren Hart
Quoted 21 lines · Richard Purdie
Quoted 20 lines · Tom Zanussi
Without this, files in the generated filesystem pick up the wrong ownership.
Signed-off-by Tom Zanussi <[email protected]>--- scripts/lib/mic/kickstart/custom_commands/partition.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)scripts/lib/mic/kickstart/custom_commands/partition.py +1
-1@@ -216,7 +216,7 @@ class Wic_PartData(Mic_PartData): """ Prepare content for an ext2/3/4 rootfs partition. """ - populate_script = "%s/usr/bin/populate-extfs.sh" % native_sysroot + populate_script = "fakeroot %s/usr/bin/populate-extfs.sh" % native_sysroot image_extra_space = 10240Quoted 8 lines
Quoted 5 lines
scripts/lib/mic/kickstart/custom_commands/partition.py class Wic_PartData(Mic_PartData): · line 222
Quoted 1 line
scripts/lib/mic/kickstart/custom_commands/partition.py +0
-0image_rootfs = rootfs_dirWe don't use fakeroot, please use pseudo. If pseudo doesn't work, we need to figure out why and fix it.
Ultimately this needs to work independently from bitbake. Is that practical if we use pseudo here?
Starting to get a bit out of scope for this discussion, but it does impact the utility of the tool. I don't see a package for pseudo in either Ubuntu or Fedora. The lack of a package would definitely increase the barrier to use (lots of people really dislike having to build their own sources and muck up their filesystem with non-package files).
Quoted 7 lines
Has any work already been kicked off to try and get pseudo packaged in the major distributions? Who would the right people be to work with on that?
BTW, I'm not arguing for using fakeroot here, just trying to look at the big picture of using wic and what additional effort might be required to make it successful.
I understand that, I'd suggest one solution of pointing people at our standalone buildtools tarball which we can easily include pseudo in. It would also be nice to see it as a tool in its own right in distros.
My main worry is that we did used to run into a lot of weird fakeroot bugs, I really don't want to end up there again...
Cheers,
Richard