Debian -->
[ document manifest ]
<< previous TOC next >>
< ^ >

Debian Live Manual

User

6. Managing a configuration

This chapter explains how to manage a live configuration from initial creation, through successive revisions and successive releases of both the live-build software and the live image itself.

6.1 Use auto to manage configuration changes

Live configurations rarely are perfect on the first try. You'll likely need to make a series of revisions until you are satisfied. However, inconsistencies can creep into your configuration from one revision to the next if you aren't careful. The main problem is, once a variable is given a default value, that value will not be recomputed from other variables that may change in later revisions.

For example, when the distribution is first set, many 'dependent' variables are given default values that suit that distribution. However, if you later decide to change the distribution, those dependent variables continue to retain old values that are no longer appropriate.

A second, related problem is that if you run lb config and then upgrade to a new version of live-build that has changed one of the variable names, you will discover this only by manual review of the variables in your config/* files, which you will then need to use to set the appropriate option again.

All of this would be a terrible nuisance if it weren't for auto/* scripts, simple wrappers to the lb config, lb build and lb clean commands that are designed to help you manage your configuration. Simply create an auto/config script containing lb config command with all desired options, and an auto/clean that removes the files containing configuration variable values, and each time you lb config and lb clean, these files will be executed. This will ensure that your configuration is kept internally consistent from one revision to the next and from one live-build release to the next (though you will still have to take care and read the documentation when you upgrade live-build and make adjustments as needed).

6.2 Example auto scripts

Use auto script examples such as the following as the starting point for your new live-build configuration. Take note that when you call the lb command that the auto script wraps, you must specify noauto as its parameter to ensure that the auto script isn't called again, recursively. Also, don't forget to ensure the scripts are executable (e.g. chmod 755 auto/*).

auto/config

#!/bin/sh
lb config noauto \
     --package-lists "standard" \
     "${@}"

auto/clean

#!/bin/sh
lb clean noauto "${@}"
rm -f config/binary config/bootstrap \
     config/chroot config/common config/source
rm -f binary.log

auto/build

#!/bin/sh
lb build noauto "${@}" 2>&1 | tee binary.log

We now ship example auto scripts with live-build based on the examples above. You may copy those as your starting point.

$ cp /usr/share/live/build/examples/auto/* auto/

Edit auto/config, changing or adding any options as you see fit. In the example above, --package-lists standard is set to the default value. Change this to an appropriate value for your image (or delete it if you want to use the default) and add any additional options in continuation lines that follow.


[ document manifest ]
<< previous TOC next >>
< ^ >