From ecbdca493ef35179c5eaed91ad6ac976d303ffda Mon Sep 17 00:00:00 2001 From: Xinliang Liu Date: Fri, 23 Sep 2022 03:38:01 +0000 Subject: [PATCH] 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 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14639 Tested-by: SPDK CI Jenkins Community-CI: Mellanox Build Bot Reviewed-by: wanghailiang Reviewed-by: Ben Walker Reviewed-by: Jim Harris Reviewed-by: Konrad Sztyber Reviewed-by: Michal Berger --- scripts/pkgdep/openeuler.sh | 1 + scripts/pkgdep/rhel.sh | 12 +++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) create mode 120000 scripts/pkgdep/openeuler.sh diff --git a/scripts/pkgdep/openeuler.sh b/scripts/pkgdep/openeuler.sh new file mode 120000 index 000000000..0f75e52a1 --- /dev/null +++ b/scripts/pkgdep/openeuler.sh @@ -0,0 +1 @@ +rhel.sh \ No newline at end of file diff --git a/scripts/pkgdep/rhel.sh b/scripts/pkgdep/rhel.sh index bfaeee15d..8e7fe5b7b 100755 --- a/scripts/pkgdep/rhel.sh +++ b/scripts/pkgdep/rhel.sh @@ -124,13 +124,19 @@ yum install -y numactl-devel nasm yum install -y systemtap-sdt-devel if [[ $INSTALL_DEV_TOOLS == "true" ]]; then # 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 - yum install -y python3-pycodestyle + devtool_pkgs+=(python3-pycodestyle astyle) 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 - yum install -y python-pycodestyle lcov ShellCheck + devtool_pkgs+=(python-pycodestyle astyle lcov ShellCheck) fi - yum install -y git astyle sg3_utils pciutils libabigail bash-completion ruby-devel + + yum install -y "${devtool_pkgs[@]}" fi if [[ $INSTALL_PMEM == "true" ]]; then # Additional dependencies for building pmem based backends