Commit Graph

9 Commits

Author SHA1 Message Date
Zach Dykstra 91b4b3bc4d De-prioritize Dracut as the primary generator
All core ZFSBootMenu libraries / hooks / binaries have been moved to a
generic 'zfsbootmenu' directory intended to be installed in /usr/share.
The dracut-specific module-setup.sh script has been moved to a 'dracut'
directory and it, along with the 'initcpio' hook scripts, have been
adapted to use common tooling in 'zfsbootmenu/install-helpers.sh'. Both
of these refer to the core components in '/usr/share/zfsbootmenu' when
creating a new image. The zbm-kcl utilit looks there by default.

The testing tools are now capable of producing images with mkinitcpio.

Co-authored-by: Zach Dykstra <dykstra.zachary@gmail.com>
Co-authored-by: Andrew J. Hesford <ajh@sideband.org>
2022-01-27 12:56:11 -05:00
Zach Dykstra 0ab5c33ab0
Correct default image size 2021-08-27 22:23:45 -05:00
Zach Dykstra f022442b27 Testing pool name/file name enhancements
* Add a -r randomized name option, which creates Docker-style (roughly) random names from a dictionary file (words-en).
* Add the -p option to allow setting a pool name from the command line.
* Instead of naming the qemu-img file zfsbootmenu-pool.img, create the file as <pool name>-pool.img. This works cleanly with the default *-pool.img glob with ./run.sh -D <test setup.
* Check for imported pools that match the randomized or user-provided name, or files on disk that match either. If a file is detected with that pool name, or an imported pool matches that name:
 - Append an indexed number to the pool name / file OR
 - Generate a new randomized name

All pool name / file selection logic has been pushed into setup.sh; helpers/image.sh is now strictly responsible for creating a qemu image / pool.

Closes #152
2021-03-07 10:42:46 -06:00
Andrew J. Hesford 095c328d42 Encapsulate test environments within subdirectories
It is sometimes helpful to have multiple active test setups, and it is
also convenient to be able to destroy a test setup with one command
rather than having to delete multiple different files and directories.

This command adds a `-D` argument to setup.sh, allowing all activity in
the setup script to occur within a specified directory. When a
subdirectory is not specified, a default of `test.$(uname -r)` is used.

The run.sh script is also now aware of the test directory, searching for
a default of `test.$(uname -r)` and allowing manual specification by
setting the TESTDIR environment variable. If the TESTDIR does not exist,
run.sh reverts to running from the CWD.

Also, the image-creation script has been pulled out of a heredoc in
setup.sh into a standalone script, making maintenance a little easier.
2020-11-16 15:06:03 -05:00
Zach Dykstra fc79b8ee6e
Fix root: parameter in quickstart guide 2020-10-26 10:12:27 -05:00
Zach Dykstra 78d0faff53 Compartmentalize testing
To further split testing/ apart from the base OS, the following is now
done:

- Create a duplicated dracut modules.d directory with symlinks to system
  modules, and the git zfsbootmenu module
- Create a dracut.conf.d directory, with a default dracut config file
- Update local.yaml to use these two directories by updating
  DracutConfDir and adding a new DracutFlags config option, with the
  --local value passed to dracut
- setup.sh is now able to be run in sections, or as a single pass. It
  internally uses sudo to create the test pool, install an OS onto it
  and configure it.

Closes: #82
2020-09-21 23:05:29 -05:00
Zach Dykstra 4f6790607e Add -n to run.sh, to reuse existing initramfs 2020-09-12 01:01:29 -05:00
Zach Dykstra d84356606e Move local.yaml setup to setup.sh, document software requirements 2020-09-11 10:18:34 -05:00
Zach Dykstra 29e38f0dc7 testing better suits what this directory is for 2020-09-11 10:13:38 -05:00