From 92b913d99ad43073a9a6a0ab25d7855602064c0e Mon Sep 17 00:00:00 2001 From: fenglei <1579628578@qq.com> Date: Thu, 9 Jan 2025 18:01:53 +0800 Subject: [PATCH] build: support anolis8 operation for vpp Type: improvement support anolis8 operation for vpp executing make install-deps command Change-Id: I854d0d1b4768c0df5898ab61a4f22d9d02ed2397 Signed-off-by: fenglei <1579628578@qq.com> --- Makefile | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c637ec18200..8ee12bcc416 100644 --- 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) -- 2.16.6