summaryrefslogtreecommitdiff
path: root/scripts/build
diff options
context:
space:
mode:
authorLyndon Brown <jnqnfe@gmail.com>2020-04-06 16:49:08 +0100
committerRaphaël Hertzog <hertzog@debian.org>2020-04-23 16:54:31 +0000
commitc441c39efe636a76e496f0e5c36401b6b0750496 (patch)
tree5f2ee55fcc35180a210920a0aa6131403595cdce /scripts/build
parentbf63762721ddfa497e1b6e4b311178fd68a0b012 (diff)
downloadvyos-live-build-c441c39efe636a76e496f0e5c36401b6b0750496.tar.gz
vyos-live-build-c441c39efe636a76e496f0e5c36401b6b0750496.zip
config: revert partial format conversion
back in v4.0~a6-1 a transition process was started to move the live-build config to a new format. the new format was INI style, and required parsing functions to read/write values, compared to the existing format which was just shell script code setting variables. this partial transition is the explanation for the existence of the `New_configuration()` function, and understanding this is important to understanding the purpose of it - it is not in fact intended for creating a new configuration, it is just related to the new config format transition. the positives of the new format were that it was somewhat cleaner looking, while the negative was the terrible relative efficiency. the file `config/build` was created to hold options in this new format. the transition was only ever completed for a handful of config options: - architecture - archive areas and parent archive areas - live image name - live image type a 'configuration version' attribute was also saved, which is not used by anything. the bootstrap-mirror and parent-bootstrap-mirror attributes are pointlessly stored in it seemingly resulting from work done in v4.0~a17-1. (they are also stored in another config file from which the value is actually used). it in fact seems to have been a source of confusion for Raphaël in authoring 44b9b0a6501476de594ce3783cea5df0c141478c, since the new `[parent]-distribution-{chroot|binary}` options it introduced were stored both in `config/bootstrap` and in `config/build`, while only used from the former. i expect, understandably, that he thought that `config/build` was just an information file. Gbp-Dch: Short
Diffstat (limited to 'scripts/build')
-rwxr-xr-xscripts/build/config48
1 files changed, 18 insertions, 30 deletions
diff --git a/scripts/build/config b/scripts/build/config
index ea65d42ab..bc8aa7e64 100755
--- a/scripts/build/config
+++ b/scripts/build/config
@@ -973,6 +973,9 @@ fi
cat > config/common << EOF
# config/common - common options for live-build(7)
+# \$LIVE_CONFIGURATION_VERSION: version of live-build used to build config (config format version)
+LIVE_CONFIGURATION_VERSION="${LIVE_CONFIGURATION_VERSION}"
+
# \$LB_APT: set package manager
LB_APT="${LB_APT}"
@@ -1027,6 +1030,9 @@ LB_MODE="${LB_MODE}"
# \$LB_SYSTEM: set system type
LB_SYSTEM="${LB_SYSTEM}"
+# \$LIVE_IMAGE_NAME: set base name of the image
+LIVE_IMAGE_NAME="${LIVE_IMAGE_NAME}"
+
# live-build options
# \$_BREAKPOINTS: enable breakpoints
@@ -1066,6 +1072,9 @@ EOF
cat > config/bootstrap << EOF
# config/bootstrap - options for live-build(7), bootstrap stage
+# \$LB_ARCHITECTURE: select architecture to use
+LB_ARCHITECTURE="${LB_ARCHITECTURE}"
+
# \$LB_DISTRIBUTION: select distribution to use
LB_DISTRIBUTION="${LB_DISTRIBUTION}"
@@ -1087,6 +1096,12 @@ LB_PARENT_DISTRIBUTION_BINARY="${LB_PARENT_DISTRIBUTION_BINARY}"
# \$LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION: select parent distribution for debian-installer to use
LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION="${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}"
+# \$LB_ARCHIVE_AREAS: select archive areas to use
+LB_ARCHIVE_AREAS="${LB_ARCHIVE_AREAS}"
+
+# \$LB_PARENT_ARCHIVE_AREAS: select parent archive areas to use
+LB_PARENT_ARCHIVE_AREAS="${LB_PARENT_ARCHIVE_AREAS}"
+
# \$LB_PARENT_MIRROR_BOOTSTRAP: set parent mirror to bootstrap from
LB_PARENT_MIRROR_BOOTSTRAP="${LB_PARENT_MIRROR_BOOTSTRAP}"
@@ -1183,6 +1198,9 @@ mkdir -p config/bootloaders
cat > config/binary << EOF
# config/binary - options for live-build(7), binary stage
+# \$LIVE_IMAGE_TYPE: set image type
+LIVE_IMAGE_TYPE="${LIVE_IMAGE_TYPE}"
+
# \$LB_BINARY_FILESYSTEM: set image filesystem
LB_BINARY_FILESYSTEM="${LB_BINARY_FILESYSTEM}"
@@ -1360,35 +1378,5 @@ esac
fi
-cat > config/build << EOF
-[Image]
-Architecture: ${LB_ARCHITECTURE}
-Archive-Areas: ${LB_ARCHIVE_AREAS}
-Distribution-Chroot: ${LB_DISTRIBUTION_CHROOT}
-Distribution-Binary: ${LB_DISTRIBUTION_BINARY}
-Mirror-Bootstrap: ${LB_MIRROR_BOOTSTRAP}
-EOF
-
-if [ "${LB_DERIVATIVE}" = "true" ]
-then
-
-cat >> config/build << EOF
-
-Parent-Archive-Areas: ${LB_PARENT_ARCHIVE_AREAS}
-Parent-Distribution-Chroot: ${LB_PARENT_DISTRIBUTION_CHROOT}
-Parent-Distribution-Binary: ${LB_PARENT_DISTRIBUTION_BINARY}
-Parent-Mirror-Bootstrap: ${LB_PARENT_MIRROR_BOOTSTRAP}
-EOF
-
-fi
-
-cat >> config/build << EOF
-
-[FIXME]
-Configuration-Version: ${LIVE_CONFIGURATION_VERSION}
-Name: ${LIVE_IMAGE_NAME}
-Type: ${LIVE_IMAGE_TYPE}
-EOF
-
# Creating stage file
Create_stagefile