Merge "Introduce the DIB_ namespace for build-time config."
This commit is contained in:
commit
66b563e466
@ -98,6 +98,13 @@ of the element directory describing what it is for.
|
||||
Writing an element
|
||||
-----------------
|
||||
|
||||
Conform to the following conventions:
|
||||
|
||||
* Use the environment for overridable defaults, prefixing environment variable
|
||||
names with "DIB\_". For example: DIB\_MYDEFAULT=${DIB\_MYDEFAULT:-default}
|
||||
If you do not use the DIB\_ prefix you may find that your overrides are
|
||||
discarded as the build environment is sanitised.
|
||||
|
||||
Make as many of the following subdirectories as you need, depending on what
|
||||
part of the process you need to customise:
|
||||
|
||||
|
@ -94,9 +94,9 @@ echo "If prompted for sudo, install sudoers.d/img-build-sudoers into /etc/sudoer
|
||||
ensure_nbd
|
||||
|
||||
mk_build_dir
|
||||
eval_run_d block-device-size "IMAGE_SIZE="
|
||||
eval_run_d block-device-size "DIB_IMAGE_SIZE="
|
||||
|
||||
qemu-img create -f qcow2 -o preallocation=metadata $TMP_IMAGE_PATH ${IMAGE_SIZE}G
|
||||
qemu-img create -f qcow2 -o preallocation=metadata $TMP_IMAGE_PATH ${DIB_IMAGE_SIZE}G
|
||||
|
||||
# Should have a grab-next-dev helper ?
|
||||
NBD_DEV=/dev/nbd0
|
||||
|
@ -19,7 +19,7 @@ FS_TYPE=${FS_TYPE:-ext4}
|
||||
# Used to set the file extension only at this stage.
|
||||
IMAGE_TYPE=${IMAGE_TYPE:-qcow2}
|
||||
IMAGE_NAME=${IMAGE_NAME:-image}
|
||||
export IMAGE_SIZE=${IMAGE_SIZE:-2} # N.B. This size is in GB
|
||||
export DIB_IMAGE_SIZE=${DIB_IMAGE_SIZE:-2} # N.B. This size is in GB
|
||||
# Set via the CLI normally.
|
||||
# IMAGE_ELEMENT=
|
||||
_BASE_ELEMENT_DIR=$(dirname $0)/../elements
|
||||
|
Loading…
Reference in New Issue
Block a user