Merge "added elrepo element"

This commit is contained in:
Zuul 2022-09-16 09:50:21 +00:00 committed by Gerrit Code Review
commit 0c323755bc
3 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,10 @@
======
ELRepo
======
Enables ELRepo, a community based repository for Enterprise Linux Packages with a focus
on drivers for hardware such as network interface cards. RHEL/CentOS versions pior to 8
are not supported.
* ``DIB_ELREPO_KERNEL`` Whether elrepo-kernel repository containing kernel-ml packages
should be enabled (1) or disabled. Default is disabled (0).

View File

@ -0,0 +1,22 @@
#!/bin/bash
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
set -x
fi
set -euo pipefail
case "$DISTRO_NAME" in
centos* | rhel* | rocky*)
dnf install -y elrepo-release.noarch
if [ ${DIB_ELREPO_KERNEL:-0} -eq 1 ]; then
rpm -q dnf-plugins-core || dnf install -y dnf-plugins-core
dnf config-manager --set-enabled "elrepo-kernel"
fi
;;
*)
echo "Distro \"$DISTRO_NAME\" is not supported"
exit 1
;;
esac
exit 0

View File

@ -0,0 +1,4 @@
---
features:
- |
Added ELRepo element.