Commit 3a0fa0fb authored by Michal Berger's avatar Michal Berger Committed by Tomasz Zawadzki
Browse files

scripts/pkgdep: Adjustments for RHEL9



Change-Id: I9ef852eb48f1d42e2992d402c8cdac697e7c61da
Signed-off-by: default avatarMichal Berger <michal.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/18760


Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
parent a4a04624
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -117,6 +117,11 @@ if [[ $ID == *"suse"* ]]; then
	ID="sles"
fi

# Some distros don't provide these paths in their default $PATH setups, nor
# sudo's secure_path, so add it here. These are needed since gem is most likely
# to put target bins at these locations.
export PATH=$PATH:/usr/local/bin:/usr/local/sbin

for id in $ID $ID_LIKE; do
	if [[ -e $scriptsdir/pkgdep/$id.sh ]]; then
		source "$scriptsdir/pkgdep/$id.sh"
+5 −1
Original line number Diff line number Diff line
@@ -62,7 +62,7 @@ if [[ $ID == centos || $ID == rhel || $ID == rocky ]]; then
	if [[ $VERSION_ID == 9* ]]; then
		repos+=("https://www.elrepo.org/elrepo-release-9.el9.elrepo.noarch.rpm")
		repos+=("https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm")
		enable+=("crb")
		[[ $ID != rhel ]] && enable+=("crb")
	fi

	# Add PowerTools needed for install CUnit-devel
@@ -73,6 +73,9 @@ if [[ $ID == centos || $ID == rhel || $ID == rocky ]]; then
		enable+=("centos-ceph-pacific")
	fi

	[[ $ID == rhel && $VERSION_ID == 8* ]] && repos+=("https://download.ceph.com/rpm-pacific/el8/noarch/ceph-release-1-1.el8.noarch.rpm")
	[[ $ID == rhel && $VERSION_ID == 9* ]] && repos+=("https://download.ceph.com/rpm-reef/el9/noarch/ceph-release-1-1.el9.noarch.rpm")

	if [[ $ID == rocky ]]; then
		enable+=("devel")
	fi
@@ -91,6 +94,7 @@ if [[ $ID == centos || $ID == rhel || $ID == rocky ]]; then
	if [[ $ID == rhel ]]; then
		[[ $VERSION_ID == 7* ]] && sub repos --enable "rhel-*-optional-rpms" --enable "rhel-*-extras-rpms"
		[[ $VERSION_ID == 8* ]] && sub repos --enable codeready-builder-for-rhel-8-x86_64-rpms
		[[ $VERSION_ID == 9* ]] && sub repos --enable codeready-builder-for-rhel-9-x86_64-rpms
	fi
fi

+16 −3
Original line number Diff line number Diff line
@@ -28,7 +28,6 @@ packages=(
	glib2-devel
	iptables
	iscsi-initiator-utils
	isns-utils-devel
	jq
	kernel-devel
	kernel-modules-extra
@@ -49,7 +48,6 @@ packages=(
	pixman-devel
	pmempool
	python3
	python3-pandas
	rpm-build
	rpmdevtools
	ruby-devel
@@ -63,7 +61,7 @@ packages=(
	xfsprogs
)

if [[ $OSID != centos && $OSID != rocky ]]; then
if [[ $OSID != centos && $OSID != rocky && $OSID != rhel ]]; then
	packages+=(btrfs-progs)
	packages+=(avahi)
	packages+=(avahi-tools)
@@ -79,6 +77,21 @@ elif [[ $OSID == centos ]]; then
		packages+=(avahi-tools)
		packages+=(btrfs-progs)
	fi
elif [[ $OSID == rhel ]]; then
	packages+=(avahi)
	if [[ $OSVERSION == 9* ]]; then
		packages+=("https://dl.rockylinux.org/pub/rocky/9/devel/x86_64/os/Packages/i/isns-utils-devel-0.101-4.el9.x86_64.rpm")
	elif [[ $OSVERSION == 8* ]]; then
		packages+=("https://dl.rockylinux.org/pub/rocky/8/BaseOS/x86_64/os/Packages/isns-utils-devel-0.99-1.el8.x86_64.rpm")
	fi
	# FIXME: This does not fit here, but there's no sane alternative. Using RPMs from other sources will fail to meet
	# dependencies anyway.
	pip3 install pandas
fi

if [[ $OSID != rhel ]]; then
	packages+=(isns-utils-devel)
	packages+=(python3-pandas)
fi

if [[ $OSID == centos && $OSVERSION == 8* ]]; then