diskimage-builder/diskimage_builder/elements/yum
Steve Baker 5caeba0c68 Ensure redhat efi packages are reinstalled during finalise
The rhel-8.4 qcow2 base image already has the grub2-efi-x64 package
installed on its single partition which has files installed to
/boot/efi..., however a partitioned image will have an empty /boot/efi
partition when running 50-bootloader. This means dnf will not install
grub2-efi-x64 when requested and /boot/efi will remain empty.

This commit makes the following changes:
- Refactors redhat bootloader pkg-map for the following:
  - Make x86_64/amd64, arm64/aarch64 adjancent so they don't diverge
  - Map grub-efi to packages installed to /usr
  - Map grub-efi-{arch} to packages installed to /boot/efi
- Removes packages grub-efi-{arch} before installing grub-efi and
  grub-efi-{arch}

Change-Id: Ia197feea34f43bd870fed30829b740596e6b2f48
2021-04-21 10:56:37 +12:00
..
bin Ensure redhat efi packages are reinstalled during finalise 2021-04-21 10:56:37 +12:00
cleanup.d Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
extra-data.d Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
post-install.d Use $YUM instead of direct calls in more places 2019-10-03 00:22:18 +00:00
pre-install.d Make DIB_DNF_MODULE_STREAMS part of yum element 2021-04-07 16:06:09 +05:30
root.d Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
element-deps Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
README.rst Improved the documentation for DIB_DNF_MODULE_STREAMS 2021-04-08 11:22:43 +05:30

===
yum
===
Provide yum specific image building glue.

RHEL/Fedora/CentOS and other yum based distributions need specific yum
customizations.

Customizations include caching of downloaded yum packages outside of the build
chroot so that they can be reused by subsequent image builds.  The cache
increases image building speed when building multiple images, especially on
slow connections.  This is more effective than using an HTTP proxy as a yum
cache since the same rpm from different mirrors is often requested.

Custom yum repository configurations can also be applied by defining
`DIB_YUM_REPO_CONF` to a space separated list of repo configuration files. The
files will be copied to /etc/yum.repos.d/ during the image build, and then
removed at the end of the build. Each repo file should be named differently to
avoid a filename collision.

Environment Variables for Module Selection during Image Creation
----------------------------------------------------------------
The following environment variable is used to select module streams to be
enabled during an image build on Yum/DNF based distributions. Any existing
stream for the given module is first disabled prior to enabling
the specified stream.

#### DIB\_DNF\_MODULE\_STREAMS
This is a space-separated list of module streams to enable prior to any
RPMs being installed.

Image Build Module Selection Example
------------------------------------
When using Train release on RHEL/CentOS/Fedora, one must select the appropriate
virt and container-tools module streams:

DIB_DNF_MODULE_STREAMS='virt:8.2 container-tools:3.0'