Bug 3351

Summary: Reimplement RPM rootfs generation using smart
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Paul Eggleton <bluelightning>
Component: coreAssignee: Paul Eggleton <bluelightning>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: Medium+ CC: alexandru.damian, corneliux.stoicescu, meta.mr.watcher, meta.watcher, n3npq, sgw
Version: 1.4   
Target Milestone: 1.4 M2   
Hardware: All   
OS: Multiple   
Whiteboard: Patches sent for review (4 Dec)
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---
Bug Depends on: 3350    
Bug Blocks: 3182    

Description Paul Eggleton 2012-10-29 17:11:20 UTC
Assuming feed generation is handled under bug #3346 and recommends in bug #3350, separately we can implement the rest of image generation using smart. This will involve the following tasks:

* Automatically constructing smart configuration files
* Verifying/extending smart to be able to pass necessary "root" parameter to RPM (done, patches pending)
* Modify package_rpm.bbclass and rootfs_rpm.bbclass to call smart instead of using internal logic for package resolution and installation

Some initial setup hints can be found here:
https://wiki.yoctoproject.org/wiki/Smart

We will need to ensure after this change that the following still work:

* Building standard images (eg. core-image-minimal, core-image-lsb-sdk)
* Building for one machine target then another in the same tree, ensuring correct architectures are used
* Building multilib images - may currently be broken anyway though (see bug 2918)
* Incremental image generation

Buildhistory can be used to verify that the image contents are the same with the old code and the new smart implementation.

It would be useful to get some idea of the performance difference between the two implementations - hopefully this change will result in an improvement.
Comment 1 Jeff Johnson 2012-12-04 17:36:21 UTC
Here is a chroot creator based on smart used in Unity Linux:

    https://github.com/dillj/Unity-Linux/blob/master/pkgutils/scripts/create-basesystem
Comment 2 Paul Eggleton 2012-12-18 10:46:31 UTC
Implementation has now been merged to master:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=019ba25654cd3ae63a6b6c0f2d67da520bf10bc6
(together with commits following this one)
Comment 3 Stoicescu Cornel 2013-02-08 12:28:21 UTC
Verified in master: b07759a20221de575da98d221feb9ea9295f7e6f

-bitbake core-image-minimal produced a working image

-creating 2 core-image-minimal with qemux86-64 and qemuarm targets  produced the correct output:

cornel@NODE1:~/SSD/poky/build$ ls tmp/deploy/images/
bzImage
bzImage--3.4.28+gitAUTOINC+f697e099bc76d5df3a307a5bc0cc25021dd6dfe0_13809f2cfd9be0ce86bd486e1643f9b90bed6f4f-r4.3-qemux86-64-20130206222050.bin
bzImage-qemux86-64.bin
core-image-minimal-qemuarm-20130208123547.rootfs.ext3
core-image-minimal-qemuarm-20130208123547.rootfs.tar.bz2
core-image-minimal-qemuarm.ext3
core-image-minimal-qemuarm.tar.bz2
core-image-minimal-qemux86-64-20130208111914.rootfs.ext3
core-image-minimal-qemux86-64-20130208111914.rootfs.tar.bz2
core-image-minimal-qemux86-64.ext3
core-image-minimal-qemux86-64.tar.bz2
modules--3.4.28+gitAUTOINC+f697e099bc76d5df3a307a5bc0cc25021dd6dfe0_13809f2cfd9be0ce86bd486e1643f9b90bed6f4f-r4.3-qemux86-64-20130206222050.tgz
modules--3.4.28+gitAUTOINC+f697e099bc76d5df3a307a5bc0cc25021dd6dfe0_a720acacc415b3323a3ee9076bf9a621a964af2f-r4.3-qemuarm-20130207222211.tgz
README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt
zImage
zImage--3.4.28+gitAUTOINC+f697e099bc76d5df3a307a5bc0cc25021dd6dfe0_a720acacc415b3323a3ee9076bf9a621a964af2f-r4.3-qemuarm-20130207222211.bin
zImage-qemuarm.bin

cornel@NODE1:~/SSD/poky/build$ ls tmp/deploy/rpm/
all  armv5te  qemuarm  qemux86_64  x86_64

-incremental image generation works as intended
-multilib images is broken atm, this will be covered in bug 2918