Implement buildmodes that allow building bootstrap images
archiso/mkarchiso:
Introduce a buildmodes array, that can be used to build towards more than one output artifact type.
Add a buildmode for building a bootstrap image (a compressed file containing a very minimal Arch installation).
The buildmodes can be set either using a buildmodes
array in a profiledef.sh
or by using the -m
option flag to
mkarchiso and providing a space delimited, quoted list.
The 'iso' buildmode is always the default if no buildmodes are setup.
Implement building a bootstrap image, when using the 'bootstrap' buildmode
, which uses a profile's
'bootstrap_packages.$arch' file to install packages using pacstrap and compressing it to a bootstrap image.
The name of the output file is currently constructed from the iso_name
value by appending -bootstrap
.
Replace the uses of airootfs_dir
with the more generic pacstrap_dir
, as the location denotes where pacstrap is
being used.
Replace uses of img_name
with image_name
and removing it from the global scope, so that it can be overridden per
each buildmode.
Rename _cleanup_airootfs_dir()
to _cleanup_pacstrap_dir()
.
Make _run_once()
more generic by prepending the state files with a string defined by run_once_mode
.
Add _validate_requirements_buildmode_all()
, _validate_requirements_buildmode_bootstrap()
and
_validate_requirements_buildmode_iso()
to validate the general requirements of the different buildmodes.
Add _build_bootstrap_image()
to generate the bootstrap image using bsdtar.
Rename _build_iso()
to _build_iso_image()
to fit the naming of the respective bootstrap function.
Extend _read_profile()
to include the reading of bootstrap image specific packages from a file.
Extend _validate_options()
to include testing of the bootstrap packages and running of validation functions for all
buildmodes.
Change _set_overrides()
to override the buildmodes if they are specified via the -m
option flag.
Change _make_version()
to be used generically in all buildmodes.
Change _make_pkglist()
to be used generically in all buildmodes.
Rename _build_profile()
to _build_buildmode_iso()
and set local variables that are specific to the buildmode, such
as image_name
, pacstrap_dir
, run_once_mode
, buildmode_packages
and buildmode_pkg_list
.
Add _build_buildmode_bootstrap()
and set local variables that are specific to the buildmode, such as image_name
,
pacstrap_dir
, run_once_mode
, buildmode_packages
and buildmode_pkg_list
.
Add the -m
option flag to the list of flags.
Closes #127 (closed)