build: support anolis8 operation for vpp 13/42113/2
authorfenglei <[email protected]>
Thu, 9 Jan 2025 10:01:53 +0000 (18:01 +0800)
committerDave Wallace <[email protected]>
Thu, 23 Jan 2025 05:37:28 +0000 (05:37 +0000)
Type: improvement

support anolis8 operation for vpp executing make install-deps command

Change-Id: I854d0d1b4768c0df5898ab61a4f22d9d02ed2397
Signed-off-by: fenglei <[email protected]>
Makefile

index c637ec1..8ee12bc 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -70,12 +70,16 @@ endif
 
 ifeq ($(filter ubuntu debian linuxmint,$(OS_ID)),$(OS_ID))
 PKG=deb
-else ifeq ($(filter rhel centos fedora opensuse-leap rocky almalinux,$(OS_ID)),$(OS_ID))
+else ifeq ($(filter rhel centos fedora opensuse-leap rocky almalinux anolis,$(OS_ID)),$(OS_ID))
 PKG=rpm
 else ifeq ($(filter freebsd,$(OS_ID)),$(OS_ID))
 PKG=pkg
 endif
 
+ifeq ($(filter anolis,$(OS_ID)),$(OS_ID))
+OS_VERSION_ID= $(shell grep '^VERSION_ID=' /etc/os-release | cut -f2 -d= | sed -e 's/\"//g' | cut -d. -f1)
+endif
+
 # +libganglia1-dev if building the gmond plugin
 
 DEB_DEPENDS  = curl build-essential autoconf automake ccache
@@ -199,6 +203,15 @@ else ifeq ($(OS_ID)-$(OS_VERSION_ID),centos-8)
        RPM_DEPENDS += infiniband-diags libibumad
        RPM_DEPENDS += libpcap-devel llvm-toolset
        RPM_DEPENDS_GROUPS = 'Development Tools'
+else ifeq ($(OS_ID)-$(OS_VERSION_ID),anolis-8)
+       RPM_DEPENDS += yum-utils
+       RPM_DEPENDS += compat-openssl10 openssl-devel
+       RPM_DEPENDS += python2-devel python36-devel python3-ply
+       RPM_DEPENDS += python3-virtualenv python3-jsonschema
+       RPM_DEPENDS += libarchive cmake
+       RPM_DEPENDS += libpcap-devel llvm-toolset git-clang-format python3-pyyaml
+       RPM_DEPENDS_GROUPS = 'Development Tools'
+       export CLANG_FORMAT_VER=15
 else
        RPM_DEPENDS += yum-utils
        RPM_DEPENDS += openssl-devel
@@ -418,6 +431,12 @@ else ifeq ($(OS_ID),fedora)
        @sudo -E dnf install $(CONFIRM) $(RPM_DEPENDS)
        @sudo -E debuginfo-install $(CONFIRM) glibc openssl-libs zlib
 endif
+else ifeq ($(OS_ID)-$(OS_VERSION_ID),anolis-8)
+       @sudo -E dnf install $(CONFIRM) dnf-plugins-core epel-release
+       @sudo -E dnf config-manager --set-enabled \
+          $(shell dnf repolist all 2>/dev/null|grep -i powertools|cut -d' ' -f1|grep -v source)
+       @sudo -E dnf groupinstall $(CONFIRM) $(RPM_DEPENDS_GROUPS)
+       @sudo -E dnf install --skip-broken $(CONFIRM) $(RPM_DEPENDS)
 else ifeq ($(filter opensuse-leap-15.3 opensuse-leap-15.4 ,$(OS_ID)-$(OS_VERSION_ID)),$(OS_ID)-$(OS_VERSION_ID))
        @sudo -E zypper refresh
        @sudo -E zypper install  -y $(RPM_SUSE_DEPENDS)