Commit 9cdadbea authored by Kamil Godzwon's avatar Kamil Godzwon Committed by Konrad Sztyber
Browse files

scripts/pkgdep: add support for Rocky Linux



Add Rocky Linux as another supported OS
Adjust package dependencies

Signed-off-by: default avatarKamil Godzwon <kamilx.godzwon@intel.com>
Change-Id: Ide4f5075a224e9eb37cb99ae5e138ebf91e4ad5b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11994


Reviewed-by: default avatarKarol Latecki <karol.latecki@intel.com>
Reviewed-by: default avatarMichal Berger <michallinuxstuff@gmail.com>
Reviewed-by: default avatarPawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
parent 68184a50
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -109,7 +109,7 @@ install_markdownlint() {
if [[ $INSTALL_DEV_TOOLS == true ]]; then
	install_shfmt
	install_spdk_bash_completion
	if [[ $ID != centos ]]; then
	if [[ $ID != centos && $ID != rocky ]]; then
		install_markdownlint
	else
		echo "mdl not supported on $ID, disabling"
+8 −7
Original line number Diff line number Diff line
@@ -31,9 +31,9 @@ disclaimer

# First, add extra EPEL, ELRepo, Ceph repos to have a chance of covering most of the packages
# on the enterprise systems, like RHEL.
if [[ $ID == centos || $ID == rhel ]]; then
if [[ $ID == centos || $ID == rhel || $ID == rocky ]]; then
	repos=() enable=("epel" "elrepo" "elrepo-testing")
	[[ $ID == centos ]] && enable+=("extras")
	[[ $ID == centos || $ID == rocky ]] && enable+=("extras")
	if [[ $VERSION_ID == 7* ]]; then
		repos+=("https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm")
		repos+=("https://www.elrepo.org/elrepo-release-7.el7.elrepo.noarch.rpm")
@@ -48,9 +48,10 @@ if [[ $ID == centos || $ID == rhel ]]; then
	if [[ $VERSION_ID == 8* ]]; then
		repos+=("https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm")
		repos+=("https://www.elrepo.org/elrepo-release-8.el8.elrepo.noarch.rpm")
		[[ $ID == centos ]] && repos+=("https://download.ceph.com/rpm-nautilus/el8/noarch/ceph-release-1-1.el8.noarch.rpm")
		[[ $ID == centos || $ID == rocky ]] \
			&& repos+=("https://download.ceph.com/rpm-nautilus/el8/noarch/ceph-release-1-1.el8.noarch.rpm")
		# Add PowerTools needed for install CUnit-devel in Centos8
		if [[ $ID == centos ]]; then
		if [[ $ID == centos || $ID == rocky ]]; then
			is_repo "PowerTools" && enable+=("PowerTools")
			is_repo "powertools" && enable+=("powertools")
		fi
@@ -87,7 +88,7 @@ yum install -y gcc gcc-c++ make cmake CUnit-devel libaio-devel openssl-devel \
if echo "$ID $VERSION_ID" | grep -E -q 'centos 7|rhel 7'; then
	yum install -y openssl11-devel
fi
if echo "$ID $VERSION_ID" | grep -E -q 'centos 8|rhel 8'; then
if echo "$ID $VERSION_ID" | grep -E -q 'centos 8|rhel 8|rocky 8'; then
	yum install -y python36 python36-devel
	#Create hard link to use in SPDK as python
	if [[ ! -e /usr/bin/python && -e /etc/alternatives/python3 ]]; then
@@ -115,9 +116,9 @@ yum install -y numactl-devel nasm
yum install -y systemtap-sdt-devel
if [[ $INSTALL_DEV_TOOLS == "true" ]]; then
	# Tools for developers
	if echo "$ID $VERSION_ID" | grep -E -q 'centos 8'; then
	if echo "$ID $VERSION_ID" | grep -E -q 'centos 8|rocky 8'; then
		yum install -y python3-pycodestyle
		echo "Centos 8 does not have lcov and ShellCheck dependencies"
		echo "Centos 8 and Rocky 8 do not have lcov and ShellCheck dependencies"
	else
		yum install -y python-pycodestyle lcov ShellCheck
	fi
+1 −1
Original line number Diff line number Diff line
@@ -62,7 +62,7 @@ packages=(
	llvm
)

if [[ $OSID != centos ]] || ((OSVERSION != 8)); then
if [[ $OSID != centos && $OSID != rocky ]] || [[ $OSVERSION != 8* ]]; then
	packages+=(btrfs-progs)
fi

+7 −8
Original line number Diff line number Diff line
@@ -4,15 +4,14 @@ pre_install() {
		# installation failed.
		install tsocks || echo "Installation of the tsocks package failed, proxy may not be available"
	fi
	if [[ $ID == centos ]] && (( VERSION_ID == 8 )); then
		sudo "$package_manager" update -y --refresh
	fi

        if [[ $ID == centos || $ID == rocky ]] && [[ $VERSION_ID == 8* ]]; then
                sudo "$package_manager" update -y --refresh
	elif [[ $ID == centos ]] && (( $VERSION_ID == 7 )); then
		install nbd || {
			install wget
		if [[ $ID == centos ]] && (( VERSION_ID == 7 )); then
			wget -O nbd.rpm https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/n/nbd-3.24-1.el7.x86_64.rpm
			install nbd.rpm
		fi
		}
	fi
}