pkgdep: add support for openEuler Linux

OpenEuler Linux although is not compatible with RHEL, but it uses the
same package manager DNF as RHEL and references the package naming of
RHEL.

OpenEuler Linux is becoming the mainstream linux distro in China. So
adding support for it makes sense. For more details about it see:
https://www.openeuler.org/en/.

Fixes: #2713
Change-Id: Ife38a1f897bf6170a0c3ed0a5238ceda018a41f2
Signed-off-by: Xinliang Liu <xinliang.liu@linaro.org>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14639
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: wanghailiang <hailiangx.e.wang@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Michal Berger <michal.berger@intel.com>
This commit is contained in:
Xinliang Liu 2022-09-23 03:38:01 +00:00 committed by Konrad Sztyber
parent 23ed60ea31
commit ecbdca493e
2 changed files with 10 additions and 3 deletions

1
scripts/pkgdep/openeuler.sh Symbolic link
View File

@ -0,0 +1 @@
rhel.sh

View File

@ -124,13 +124,19 @@ 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
devtool_pkgs=(git sg3_utils pciutils libabigail bash-completion ruby-devel)
if echo "$ID $VERSION_ID" | grep -E -q 'centos 8|rocky 8'; then if echo "$ID $VERSION_ID" | grep -E -q 'centos 8|rocky 8'; then
yum install -y python3-pycodestyle devtool_pkgs+=(python3-pycodestyle astyle)
echo "Centos 8 and Rocky 8 do not have lcov and ShellCheck dependencies" echo "Centos 8 and Rocky 8 do not have lcov and ShellCheck dependencies"
elif [[ $ID == openeuler ]]; then
devtool_pkgs+=(python3-pycodestyle)
echo "openEuler does not have astyle, lcov and ShellCheck dependencies"
else else
yum install -y python-pycodestyle lcov ShellCheck devtool_pkgs+=(python-pycodestyle astyle lcov ShellCheck)
fi fi
yum install -y git astyle sg3_utils pciutils libabigail bash-completion ruby-devel
yum install -y "${devtool_pkgs[@]}"
fi fi
if [[ $INSTALL_PMEM == "true" ]]; then if [[ $INSTALL_PMEM == "true" ]]; then
# Additional dependencies for building pmem based backends # Additional dependencies for building pmem based backends