Merge "Add DIB_YUM_REPO_PACKAGE as an alternative to DIB_YUM_REPO_CONF"
This commit is contained in:
commit
82aa8c516d
@ -1,7 +1,7 @@
|
|||||||
# since RHEL8, dnf is the yum replacement.
|
# since RHEL8, dnf is the yum replacement.
|
||||||
|
|
||||||
if [[ ${DIB_RELEASE} == '8' ]]; then
|
if [[ $DIB_RELEASE == "7" ]]; then
|
||||||
export YUM=dnf
|
|
||||||
elif [[ ${DIB_RELEASE} == '7' ]]; then
|
|
||||||
export YUM=yum
|
export YUM=yum
|
||||||
|
else
|
||||||
|
export YUM=dnf
|
||||||
fi
|
fi
|
||||||
|
@ -18,6 +18,10 @@ 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
|
removed at the end of the build. Each repo file should be named differently to
|
||||||
avoid a filename collision.
|
avoid a filename collision.
|
||||||
|
|
||||||
|
The yum repository can also be configured by defining `DIB_YUM_REPO_PACKAGE` as
|
||||||
|
a yum available package or a URL to an rpm file. This package can install repo
|
||||||
|
files with any associated keys and certificates.
|
||||||
|
|
||||||
Environment Variables for Module Selection during Image Creation
|
Environment Variables for Module Selection during Image Creation
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
The following environment variable is used to select module streams to be
|
The following environment variable is used to select module streams to be
|
||||||
|
11
diskimage_builder/elements/yum/pre-install.d/00-install-repo-package
Executable file
11
diskimage_builder/elements/yum/pre-install.d/00-install-repo-package
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
set -eu
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
if [ -n "${DIB_YUM_REPO_PACKAGE:-}" ] ; then
|
||||||
|
rpm -ivh ${DIB_YUM_REPO_PACKAGE}
|
||||||
|
fi
|
7
releasenotes/notes/repo-package-20fe407795bffd01.yaml
Normal file
7
releasenotes/notes/repo-package-20fe407795bffd01.yaml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
A custom yum repository can now be configured by defining
|
||||||
|
`DIB_YUM_REPO_PACKAGE` as a yum available package or a URL to an rpm file.
|
||||||
|
This package can install repo files with any associated keys and
|
||||||
|
certificates.
|
Loading…
Reference in New Issue
Block a user