-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- "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
- Loading branch information
Showing
7 changed files
with
316 additions
and
214 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Global: | ||
# Set InitCPIO to true to use mkinitcpio for ZBM images | ||
#InitCPIO: true | ||
# The build container *forces* Global.ManageImages | ||
Components: | ||
# Enable only current kernel/initramfs components and a backup | ||
Enabled: true | ||
Versions: false | ||
# The ZBM build container *forces* Components.ImageDir | ||
EFI: | ||
# Enable only current EFI executable and a backup file | ||
Enabled: true | ||
Versions: false | ||
# The ZBM build container *forces* EFI.ImageDir | ||
Kernel: | ||
# Set ZBM command-line options for the EFI bundle here | ||
CommandLine: zfsbootmenu ro quiet loglevel=4 nomodeset |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# This is a specialization of the ZFSBootMenu mkinitcpio.conf file for use in | ||
# the ghcr.io/zbm-dev/zbm-builder container. Most documentation has been | ||
# omitted. For a description of this file, see the manual pages | ||
# | ||
# - zfsbootmenu(7) | ||
# - mkinitcpio(5) | ||
# | ||
# As well as a more thoroughly commented version at the location | ||
# etc/zfsbootmenu/mkinitcpio.conf in the zfsbootmenu git repository. | ||
|
||
# No specific customizations for container builds | ||
MODULES=() | ||
BINARIES=() | ||
FILES=() | ||
|
||
# Because generate-zbm adds the required 'zfsbootmenu' hook, omit it here. | ||
HOOKS=(base udev autodetect modconf block filesystems keyboard) | ||
|
||
# In containers, it is helpful to allow some dynamic configuration. In | ||
# particular, the zbm-builder.sh helper script that configures and runs the | ||
# build container will automatically create configuration entries in the | ||
# subdirectories | ||
# | ||
# dracut.conf.d | ||
# mkinitcpio.conf.d | ||
# | ||
# of the build directory for any hook found in the subdirectories | ||
# | ||
# hooks.early_setup.d | ||
# hooks.setup.d | ||
# hooks.teardown.d | ||
# | ||
# of the same build directory. Support for mkinitcpio.conf.d mimics similar | ||
# support for dracut.conf.d built directly into dracut. | ||
# | ||
# Note that, inside the container, the build directory will be mounted at | ||
# /build, so reference those paths here. | ||
for _zbm_hook in /build/mkinitcpio.conf.d/*; do | ||
[ -r "${_zbm_hook}" ] || continue | ||
. "${_zbm_hook}" | ||
done | ||
unset _zbm_hook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.