scripts/pkgdep: Add support for rocky|centos 9

Also, shuffle DAOS pieces a bit to keep repo handling in one place.
Also, also switch ceph repo to an actively supported release, common
and available for both centos|rocky 8|9 (i.e. pacific).

Change-Id: Idb19e4a5ff80770c7d6f9e6db85f983e163958e6
Signed-off-by: Michal Berger <michal.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17661
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
This commit is contained in:
Michal Berger 2023-04-20 12:02:30 +02:00 committed by David Ko
parent 6216f996c1
commit 3f593969ed
2 changed files with 45 additions and 17 deletions

View File

@ -37,7 +37,7 @@ 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 || $ID == rocky ]]; then
repos=() enable=("epel" "elrepo" "elrepo-testing")
repos=() enable=("epel" "elrepo" "elrepo-testing") add=()
[[ $ID == centos || $ID == rocky ]] && enable+=("extras")
if [[ $VERSION_ID == 7* ]]; then
repos+=("https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm")
@ -49,18 +49,40 @@ if [[ $ID == centos || $ID == rhel || $ID == rocky ]]; then
echo "Liburing not supported on ${ID}$VERSION_ID, disabling"
INSTALL_LIBURING=false
fi
add+=("https://packages.daos.io/v2.0/CentOS7/packages/x86_64/daos_packages.repo")
enable+=("daos-packages")
fi
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 || $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 || $ID == rocky ]]; then
is_repo "PowerTools" && enable+=("PowerTools")
is_repo "powertools" && enable+=("powertools")
fi
add+=("https://packages.daos.io/v2.0/EL8/packages/x86_64/daos_packages.repo")
enable+=("daos-packages")
fi
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")
fi
# Add PowerTools needed for install CUnit-devel
if [[ ($ID == centos || $ID == rocky) && $VERSION_ID =~ ^[89].* ]]; then
is_repo "PowerTools" && enable+=("PowerTools")
is_repo "powertools" && enable+=("powertools")
repos+=("centos-release-ceph-pacific.noarch")
enable+=("centos-ceph-pacific")
fi
if [[ $ID == rocky ]]; then
enable+=("devel")
fi
if ((${#add[@]} > 0)); then
for _repo in "${add[@]}"; do
yum-config-manager --add-repo "$_repo"
done
fi
if ((${#repos[@]} > 0)); then
yum install -y "${repos[@]}" yum-utils
yum-config-manager --enable "${enable[@]}"
@ -170,16 +192,10 @@ if [[ $INSTALL_DOCS == "true" ]]; then
yum install -y doxygen graphviz
fi
if [[ $INSTALL_DAOS == "true" ]]; then
if [[ $ID == centos || $ID == rocky ]]; then
if ! hash yum-config-manager &> /dev/null; then
yum install -y yum-utils
fi
[[ $VERSION_ID == 7* ]] && yum-config-manager --add-repo "https://packages.daos.io/v2.0/CentOS7/packages/x86_64/daos_packages.repo"
[[ $VERSION_ID == 8* ]] && yum-config-manager --add-repo "https://packages.daos.io/v2.0/EL8/packages/x86_64/daos_packages.repo"
yum-config-manager --enable "daos-packages"
if [[ ($ID == centos || $ID == rocky) && $VERSION_ID =~ ^[78].* ]]; then
yum install -y daos-devel
else
echo "Skipping installation of DAOS bdev dependencies. It is supported only for CentOS 7, CentOS 8 and Rocky 8"
echo "Skipping installation of DAOS bdev dependencies. Supported only under centos, rocky (variants 7-8)."
fi
fi
# Additional dependencies for Avahi

View File

@ -63,10 +63,22 @@ packages=(
xfsprogs
)
if [[ $OSID != centos && $OSID != rocky ]] || [[ $OSVERSION != 8* ]]; then
if [[ $OSID != centos && $OSID != rocky ]]; then
packages+=(btrfs-progs)
packages+=(avahi)
packages+=(avahi-tools)
elif [[ $OSID == rocky ]]; then
# 8 and 9 comes with a kernel which does not support btrfs
packages+=(avahi)
packages+=(avahi-tools) # from the devel repo
elif [[ $OSID == centos ]]; then
packages+=(avahi)
# 8 comes with a kernel which does not support btrfs.
# 8 does not come with any common repos that include avahi-tools.
if [[ $OSVERSION == 7* ]]; then
packages+=(avahi-tools)
packages+=(btrfs-progs)
fi
fi
if [[ $OSID == centos && $OSVERSION == 8* ]]; then