Enable rootfs modification through lmc + live-build
Problem: You've have a rootfs already installed on media or a newly created one from snapshots and before you do anything, you've got your own customizations in mind you'd like to have performed.
You could:
1) do it manually
2) write a script that grows more hairy in time
3) use this tool / extension to linaro-media-create and live-build
lmc will add 2 new command line parameters:
1) --modify-rootfs <modification script>
2) --slim
live-build will add a new stage called modify:
lb modify will be able to be run from the command line with the form: lb modify [--dir <expanded-
Modification Script syntax:
add-pkgs: <list of packages>
rm-pkgs: <list of packages>
includes: <directory with files to be included>
hooks: <list of hook scripts>
archive: <archive dir>
Modification script will be executed in line order, top to bottom. If you want hooks executed first, put it first in the file.
Lines might be repeated. IE you could have more than one hooks line.
<list of packages> : package list with spaces between each. Ends at newline.
<directory with files to be included: contents of the directory will be directly copied into the the root fs. If you have a file you want to go into etc, then it needs to be located in something like my-includes/
<list of hook scripts> : list of bash scripts which will be run as chroot in the rootfs. They will run as root. They will only have access to what is already installed inside of the rootfs.
<archive dir> : a directory containing both archive name and GPG key which should be added to apt sources.
Whiteboard
[dzin, apr 10, 2012] Moved to wishlist