diff --git a/crb b/crb index 6e99ddf..376b308 100755 --- a/crb +++ b/crb @@ -46,6 +46,13 @@ enable_disable_repo(){ # Only RHEL has a repo with codeready in it, use subcription-manager subscription-manager repos ${command} ${crb_repo} else + # Determine if dnf-command(config-manager) is installed + if ! rpm -q --whatprovides 'dnf-command(config-manager)' > /dev/null 2>&1 ; then + echo "Error: Please run: dnf install 'dnf-command(config-manager)'" >&2 + echo " before trying to enable/disable the CRB repo." >&2 + echo "Aborting"'!' >&2 + exit 1 + fi # Everything else uses dnf config-manager dnf config-manager ${command} ${crb_repo} fi diff --git a/epel-release.spec b/epel-release.spec index ffefb2a..c33aae0 100644 --- a/epel-release.spec +++ b/epel-release.spec @@ -1,6 +1,6 @@ Name: epel-release Version: 8 -Release: 16%{dist} +Release: 17%{dist} Summary: Extra Packages for Enterprise Linux repository configuration License: GPLv2 @@ -30,6 +30,9 @@ BuildArch: noarch Requires: redhat-release >= %{version} # epel-release is only for enterprise linux, not fedora Conflicts: fedora-release +# crb needs config-manager to run +# But only recommend it, incase people do not need crb +Recommends: dnf-command(config-manager) Recommends: (epel-next-release if centos-stream-release) @@ -95,6 +98,9 @@ fi %changelog +* Tue Aug 09 2022 Troy Dawson - 8-17 +- Tweak crb script, Recommends dnf-command(config-manager) (#2115602) + * Thu Jun 30 2022 Troy Dawson - 8-16 - Add crb script