diff --git a/diskimage_builder/elements/yum-minimal/README.rst b/diskimage_builder/elements/yum-minimal/README.rst index 2c4d95f9..2f9ce6be 100644 --- a/diskimage_builder/elements/yum-minimal/README.rst +++ b/diskimage_builder/elements/yum-minimal/README.rst @@ -22,3 +22,8 @@ image. If you wish to include extra repositories, set ``DIB_YUM_MINIMAL_EXTRA_REPOS`` to a directory with the ``.repo`` files. The repo files will not be removed from the final image. + +If you are bootstrapping a custom or unsupported OS, and need to install +additional packages to setup the base chroot, set +``DIB_YUM_MINIMAL_BOOTSTRAP_PACKAGES`` to the list of additional packages to +install. diff --git a/diskimage_builder/elements/yum-minimal/root.d/08-yum-chroot b/diskimage_builder/elements/yum-minimal/root.d/08-yum-chroot index e3f6ac15..8a7556eb 100755 --- a/diskimage_builder/elements/yum-minimal/root.d/08-yum-chroot +++ b/diskimage_builder/elements/yum-minimal/root.d/08-yum-chroot @@ -71,8 +71,8 @@ function _install_repos { # is that they are only installed in one big transaction with the # rest of the system? but we don't want to use yum to do this # (see above) so ... - packages="basesystem filesystem setup " - + packages="${DIB_YUM_MINIMAL_BOOTSTRAP_PACKAGES:-} " + packages+="basesystem filesystem setup " if [[ ${DISTRO_NAME} = fedora && ${DIB_RELEASE} -gt 29 ]]; then packages+="fedora-release-cloud fedora-release-common " else diff --git a/releasenotes/notes/specify-bootstrap-packages-via-env-22f5c6982c09f16a.yaml b/releasenotes/notes/specify-bootstrap-packages-via-env-22f5c6982c09f16a.yaml new file mode 100644 index 00000000..e6aeed93 --- /dev/null +++ b/releasenotes/notes/specify-bootstrap-packages-via-env-22f5c6982c09f16a.yaml @@ -0,0 +1,8 @@ +--- +features: + - | + Now, users of the ``yum-minimal`` element can specify additional packages + to install while creating the initial chroot by setting + ``DIB_YUM_MINIMAL_BOOTSTRAP_PACKAGES``. This can be useful for adding + support for new linux distributions that use yum. +