[OS-BUILD PATCHv8 3/4] redhat/scripts/cross-compile: Update download_cross.sh

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Prarit Bhargava <prarit@xxxxxxxxxx>

redhat/scripts/cross-compile: Update download_cross.sh

This script was written for RHEL7.  Update it to install epel-release and
output a better RHEL and Centos Stream warning.

Signed-off-by: Prarit Bhargava <prarit@xxxxxxxxxx>

diff --git a/redhat/scripts/cross-compile/download_cross.sh b/redhat/scripts/cross-compile/download_cross.sh
index blahblah..blahblah 100755
--- a/redhat/scripts/cross-compile/download_cross.sh
+++ b/redhat/scripts/cross-compile/download_cross.sh
@@ -26,7 +26,7 @@ fi
 
 # if we're not root, all we can do now is see what's installed
 if [ "$(whoami)" != "root" ]; then
-	echo "Checking for RHEL7 cross compile packages.  If this fails, run \"make dist-cross-download\" as root."
+	echo "Checking for RHEL/Centos Stream cross compile packages.  If this fails, run \"make dist-cross-download\" as root."
 	if rpm -q "$@" >& /dev/null; then
 		echo "Compilers found."
 		exit 0
@@ -40,12 +40,11 @@ fi
 rpm -q "$@" && exit 0
 
 # install epel-release if necessary
+dnf -y install /usr/lib/rpm/redhat/dist.sh
 
-if ! rpm -q epel-release >& /dev/null; then
-	wget -nd -r -l1 --no-parent -A "epel-release*.rpm" http://dl.fedoraproject.org/pub/epel/7/x86_64/e/
-	rpm -ivh epel-release*.rpm
-	# clean up
-	rm -f epel-release*.rpm
+if [ -x /usr/lib/rpm/redhat/dist.sh ]; then
+	dist=$(/usr/lib/rpm/redhat/dist.sh)
+	[ "$dist" == el* ] && dnf -y install epel-release
 fi
 
 # install list of rpms for cross compile

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2613
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux