Bug 6558

Summary: Allow rootfs to be constructed outside of the build system
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Paul Eggleton <bluelightning>
Component: coreAssignee: Ed Bartosh <eduard.bartosh>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: Medium CC: bash65, eduard.bartosh, meta.mr.watcher, meta.watcher, philip
Version: 1.9   
Target Milestone: Future   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Paul Eggleton 2014-07-21 07:57:18 UTC
For image construction tools like wic, it would be beneficial to be able to do the rootfs construction (i.e. the process that normally happens during do_rootfs) from outside of the build system, assuming the inputs to that process (packages) have already been built.

In practical terms, with the rewrite of the image code in Python we've already done a lot of the work that would have been needed here, we just need to decouple it a little further so that it can be used externally. (There is also still some code in image.bbclass which may need to be extracted out or re-implemented such that it is able to be called in both cases.)
Comment 1 Ed Bartosh 2015-03-17 07:32:42 UTC
Moving to 1.9 as some clarifications are still needed on this.
I was trying to fully detach it from yocto tools and build system, but it means that all build dependencies should be provided by host, which is tricky as we have local modifications for some tools. mkfs.ex4 is one of the examples.

I'll discuss this with Paul and Richard.
Comment 2 Phlip Balister 2015-04-05 19:12:22 UTC
So wic doesn't work with packages, rather it uses the rootfs created during image creation. In fact, you have make sure rm_work is skipped during image creation, so asking wic to function also the build system means a complete rewrite.

If we want to build images from packages outside the build system, a new tool should be created.
Comment 3 Ed Bartosh 2015-04-06 10:32:16 UTC
The idea how I understood it is to run bitbake rootfs from wic to make a rootfs out of package feed and then use produced artifacts to make an image.

I aready made a working prototype of this by slightly modifying and packaging bitbake, createrepo, wic, pseudo and other tools for OpenSUSE. I was able to produce rootfs this way.

During that work I faced one major issue: I don't know how to properly bring local modifications made in Yocto to the host. For example, mkfs.ext4 in Yocto supports -d option. To bring this functionality to host e2fsprog package has to be modified. However, it's not easy to maintain as this package belongs to base system.
The same thing with other tools. Even if we find a way to package them(for example putting them under /opt) it would require a lot of work to keep them in sync with supported distros.

Let's discuss this further here and decide how we proceed and if it makes to continue this work.
Comment 4 Paul Eggleton 2015-04-07 08:18:23 UTC
Obviously it's not an immediate solution, but has anyone poked e2fsprogs upstream to see when they plan on doing a proper release containing this functionality?
Comment 5 Ed Bartosh 2015-05-05 15:54:59 UTC
Due to low interest showed by customers I'm moving it to the future. We have much more important things to do for wic.
Comment 6 Ed Bartosh 2015-06-17 08:56:57 UTC
The more I think about this feature the more it looks like it doesn't worth the time spent on implementation and especially on maintenance. Maintaining Yocto specific changes for several target distros doesn't make sense to me.

Please, speak up if you have any objections.
Comment 7 Ed Bartosh 2015-06-24 11:14:56 UTC
This feature doesn't worth the time spent on implementation and especially on maintenance. Maintaining Yocto specific changes for several target distros doesn't make make much sense from my point of view.