Permit specification of extra bootstrap packages

This change permits the yum-minimal element to be used in downstream
custom distributions, which may have additional packages containing repo
config or GPG keys needed.

This could also be utilized at a later time to move the
distribution-specific logic in this method to each distribution element
separately.

Change-Id: Ic1434bb2fe7301086cf11ba6bd7f2ee187c5e6c8
This commit is contained in:
Jay Faulkner 2021-07-27 10:45:50 -07:00
parent 03275c2dd4
commit 91da6ab885
3 changed files with 15 additions and 2 deletions

View File

@ -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.

View File

@ -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

View File

@ -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.