- Track installed version in ${zfsbootmenu_module_root}/zbm-release
- Install zbm-release as /etc/zbm-release in ZFSBootMenu images
- Add releng/version.sh to manage repository versioning
- Mark post-release development versions as part of release tagging
- Improve version handling in ZFSBootMenu build containers:
* zbm-builder.sh: allow temporary, writable overlays of /zbm
* releng/docker/build-init.sh: update ZBM version when possible
* releng/docker/image-build.sh: install git in standard images
- Add new hook points: load-key.d and boot-sel.d
- All hooks are installed in hook-point-specific subdirectories of
/libexec/hooks instead of in the top-level /libexec
- User hooks are recognized in level-specific subdirectories of a
zfsbootmenu_hook_root defined for dracut or mkinitcpio
- Deprecate zfsbootmenu_{early_setup,setup,teardown} variables
- Take advantage of zfsbootmenu_hook_root to simplify hooks in container
builds via zbm-builder.sh
- Simplify zbm.hookdir overrides
Closes: #477.
A new `-M` option for `zbm-builder.sh` provides a means to specify mount
options for the `/build` and (if specified) `/zbm` volumes in the build
container. Using, for example, `-M z` allows images to be built on hosts
with SELinux enabled.
This change is documented, along with extra considerations for building
Dracut-based images in containers when SELinux is enabled on the host.
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
Closes: #433.
- "Tiered" configuration simplifies management and allows more targeted
overrides, symlinking configs in `/etc/zfsbootmenu` in the container:
1. First tier comes from `etc/zfsbootmenu` (global defaults)
2. Second tier comes from `etc/zbm-builder` (container defaults)
3. Third tier comes from the build root (build specific)
Configurations in later tiers override those with conflicting names in
earlier tiers.
- Tiered configuration now includes mkinitcpio configuration, allowing
containers to build mkinitcpio images
- Container configuration for mkinitcpio supports dracut-style snippets
in `mkinitcpio.conf.d`
- The builder now looks for an `rc.d` subdirectory in the build root and
will invoke every executable file therein before generating images to
provide a means to "terraform" the build container
- The `zbm-builder.sh` wrapper now supports a configuration file to
allow defaults to be specified; this requires a two-pass getopts to
find and load the configuration file before parsing remaining options
- A new option to `zbm-builder.sh`, `-R`, will remove any existing host
files (`hostid` and `zpool.cache`) from the build root to make sure
they are always up to date with the host versions
- The container entrypoint now configures `generate-zbm` to write its
output directly to the desired output directory rather than staging in
a temporary output directory, allowing `generate-zbm` to manage
version rollovers as it does in host installations
- Remove superfluous arguments from container entrypoint to manage
`hostid`, `zpool.cache` and `config.yaml`; the files either exist in
the build root or the container will use defaults
- Drop `docker-compose.yml` and now-obsolete `config.yaml.default`
- Update documentation to better reflect current build procedure
- Allow container images to include custom Void packages via
image-build.sh
- Allow container instances to include custom Void packages via
zbm-build.sh
- Allow specification of custom Void packages and volume mounts via
user-facing zbm-builder.sh
* Build from a local source tree with `-l`
* Override build directory with `-b`
* Include hooks in $BUILD_DIRECTORY/hooks.{early_setup,setup,teardown}.d
* Update command-line documentation and docs/BUILD.md
Co-authored-by: James R. Todd <toddy@toddy.cloud>
Co-authored-by: Andrew J. Hesford <ajh@sideband.org>
Closes: #282.
Fixes for the `zbm-builder.sh` script.
Unlike Podman, Docker does not accept `.` or `./` as arguments for bind volumes at the command line. Modifying `zbm-builder.sh` to use `${PWD}` instead of `.` works for both Docker and Podman.
A typo in the default `config.yaml` causes `zbm-build.sh` to fail, fixed.
Added option to use a local repository as opposed to a remote one.
Currently, `zbm-build.sh` is hard-coded to pull the required tag from `zbm-dev/zfsbootmenu`. Adding this command line option allows builds using a local repository tree.