scripts/pkgdep: add support for Rocky Linux

Add Rocky Linux as another supported OS
Adjust package dependencies

Signed-off-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Change-Id: Ide4f5075a224e9eb37cb99ae5e138ebf91e4ad5b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11994
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Michal Berger <michallinuxstuff@gmail.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
This commit is contained in:
Kamil Godzwon 2022-03-21 08:58:25 -04:00 committed by Konrad Sztyber
parent 68184a5030
commit 9cdadbea09
4 changed files with 17 additions and 17 deletions

View File

@ -109,7 +109,7 @@ install_markdownlint() {
if [[ $INSTALL_DEV_TOOLS == true ]]; then if [[ $INSTALL_DEV_TOOLS == true ]]; then
install_shfmt install_shfmt
install_spdk_bash_completion install_spdk_bash_completion
if [[ $ID != centos ]]; then if [[ $ID != centos && $ID != rocky ]]; then
install_markdownlint install_markdownlint
else else
echo "mdl not supported on $ID, disabling" echo "mdl not supported on $ID, disabling"

View File

@ -31,9 +31,9 @@ disclaimer
# First, add extra EPEL, ELRepo, Ceph repos to have a chance of covering most of the packages # First, add extra EPEL, ELRepo, Ceph repos to have a chance of covering most of the packages
# on the enterprise systems, like RHEL. # 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") repos=() enable=("epel" "elrepo" "elrepo-testing")
[[ $ID == centos ]] && enable+=("extras") [[ $ID == centos || $ID == rocky ]] && enable+=("extras")
if [[ $VERSION_ID == 7* ]]; then if [[ $VERSION_ID == 7* ]]; then
repos+=("https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm") 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") 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 if [[ $VERSION_ID == 8* ]]; then
repos+=("https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm") 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") 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 # 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")
is_repo "powertools" && enable+=("powertools") is_repo "powertools" && enable+=("powertools")
fi 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 if echo "$ID $VERSION_ID" | grep -E -q 'centos 7|rhel 7'; then
yum install -y openssl11-devel yum install -y openssl11-devel
fi 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 yum install -y python36 python36-devel
#Create hard link to use in SPDK as python #Create hard link to use in SPDK as python
if [[ ! -e /usr/bin/python && -e /etc/alternatives/python3 ]]; then 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 yum install -y systemtap-sdt-devel
if [[ $INSTALL_DEV_TOOLS == "true" ]]; then if [[ $INSTALL_DEV_TOOLS == "true" ]]; then
# Tools for developers # 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 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 else
yum install -y python-pycodestyle lcov ShellCheck yum install -y python-pycodestyle lcov ShellCheck
fi fi

View File

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

View File

@ -4,15 +4,14 @@ pre_install() {
# installation failed. # installation failed.
install tsocks || echo "Installation of the tsocks package failed, proxy may not be available" install tsocks || echo "Installation of the tsocks package failed, proxy may not be available"
fi 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 nbd || {
install wget 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 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 install nbd.rpm
fi
} }
fi
} }