Comment 22 for bug 751531

Revision history for this message
Mattias Backman (mabac) wrote : Re: [Bug 751531] Re: Add support for rootfs post-processing in l-m-c

On Thu, Jan 19, 2012 at 11:55 PM, Alexandros Frantzis <email address hidden> wrote:
> What is blocking us here is the implementation of the "lb modify"
> command that l-m-c is supposed to call to modify the rootfs. I am not
> sure how far the implementation has progressed.

Oh, I didn't realize that 'lb modify' isn't available yet. You
probably told me at the Connect that it needs implementing, but I must
have forgotten that and thought this fix was good to use.

>
> In case "lb modify" implementation and deployment is too far away, and a
> solution is needed now, I think the most versatile way forward is option
> 1 as described in comment #2. That is, just call a user script providing
> all the related paths in some way, and let it do whatever it wants,
> including running "lb modify" if/when support for it lands.

So this should be changed to just running a generic script then by
just executing the file the user has supplied, would that be good
enough?

    sudo ${user-script} --chroot-path ${chroot_path}

I re-read Ricardo's comment now about adding two separate hooks and
that seems to be needed again. So we should be able to provide a
pre-hwpack-install script as well as a post-install script. Any other
options that we should pass to the hook scripts?

>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/751531
>
> Title:
>  Add support for rootfs post-processing in l-m-c
>
> Status in LAVA Dispatcher:
>  New
> Status in Linaro Image Tools:
>  Triaged
> Status in Linaro Ubuntu Evaluation Builds:
>  Confirmed
>
> Bug description:
>  It is currently tedious to customize the produced images each time
>  they are created. This deters developers from changing and testing
>  images often, especially when they want to use images for development
>  or complicated testing. Needed customizations include everything from
>  installing packages to adding configuration files (ssh, network,
>  editors).
>
>  A simple but effective solution is for l-m-c to allow the execution of
>  a user shell script after the rootfs has been populated. l-m-c should
>  pass all necessary information to the script (location of rootfs,
>  default user etc). The script can then do whatever it wants to
>  customize the image according to each user's needs (copy files into
>  the rootfs, chroot and install packages etc).
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/lava-dispatcher/+bug/751531/+subscriptions