summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile21
-rw-r--r--extras/rpm/vpp.spec17
2 files changed, 31 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index de07171a7b3..88d42dfe433 100644
--- a/Makefile
+++ b/Makefile
@@ -56,7 +56,7 @@ endif
ifeq ($(filter ubuntu debian,$(OS_ID)),$(OS_ID))
PKG=deb
-else ifeq ($(filter rhel centos fedora opensuse-leap,$(OS_ID)),$(OS_ID))
+else ifeq ($(filter rhel centos fedora opensuse-leap rocky,$(OS_ID)),$(OS_ID))
PKG=rpm
endif
@@ -111,7 +111,7 @@ endif
DEB_DEPENDS += $(LIBFFI)
-RPM_DEPENDS = redhat-lsb glibc-static
+RPM_DEPENDS = glibc-static
RPM_DEPENDS += apr-devel
RPM_DEPENDS += numactl-devel
RPM_DEPENDS += check check-devel
@@ -120,7 +120,7 @@ RPM_DEPENDS += ninja-build
RPM_DEPENDS += libuuid-devel
RPM_DEPENDS += ccache
RPM_DEPENDS += xmlto
-RPM_DEPENDS += elfutils-libelf-devel
+RPM_DEPENDS += elfutils-libelf-devel libpcap-devel
RPM_DEPENDS += libnl3-devel libmnl-devel
RPM_DEPENDS += nasm
@@ -133,6 +133,15 @@ ifeq ($(OS_ID),fedora)
RPM_DEPENDS += python3-virtualenv python3-jsonschema
RPM_DEPENDS += cmake
RPM_DEPENDS_GROUPS = 'C Development Tools and Libraries'
+else ifeq ($(OS_ID),rocky)
+ RPM_DEPENDS += yum-utils
+ RPM_DEPENDS += subunit subunit-devel
+ RPM_DEPENDS += openssl-devel
+ RPM_DEPENDS += python3-devel # needed for python3 -m pip install psutil
+ RPM_DEPENDS += python3-ply # for vppapigen
+ RPM_DEPENDS += python3-virtualenv python3-jsonschema
+ RPM_DEPENDS += infiniband-diags llvm clang cmake
+ RPM_DEPENDS_GROUPS = 'Development Tools'
else ifeq ($(OS_ID)-$(OS_VERSION_ID),centos-8)
RPM_DEPENDS += yum-utils
RPM_DEPENDS += compat-openssl10 openssl-devel
@@ -318,6 +327,12 @@ ifeq ($(OS_ID),rhel)
@sudo -E yum groupinstall $(CONFIRM) $(RPM_DEPENDS_GROUPS)
@sudo -E yum install $(CONFIRM) $(RPM_DEPENDS)
@sudo -E debuginfo-install $(CONFIRM) glibc openssl-libs zlib
+else ifeq ($(OS_ID),rocky)
+ @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 crb|cut -d' ' -f1|grep -v source)
+ @sudo -E dnf groupinstall $(CONFIRM) $(RPM_DEPENDS_GROUPS)
+ @sudo -E dnf install $(CONFIRM) $(RPM_DEPENDS)
else ifeq ($(OS_ID)-$(OS_VERSION_ID),centos-8)
@sudo -E dnf install $(CONFIRM) dnf-plugins-core epel-release
@sudo -E dnf config-manager --set-enabled \
diff --git a/extras/rpm/vpp.spec b/extras/rpm/vpp.spec
index 2bd16ca9e25..6bfb12471e2 100644
--- a/extras/rpm/vpp.spec
+++ b/extras/rpm/vpp.spec
@@ -48,23 +48,32 @@ BuildRequires: python3, python36-devel, python3-virtualenv
BuildRequires: cmake
%else
%if 0%{rhel} >= 7
-Requires: vpp-lib = %{_version}-%{_release}, vpp-selinux-policy = %{_version}-%{_release}, net-tools, pciutils, python36
+Requires: vpp-lib = %{_version}-%{_release}, vpp-selinux-policy = %{_version}-%{_release}, net-tools, pciutils
Requires: libffi-devel
BuildRequires: epel-release
BuildREquires: openssl-devel
-BuildRequires: python36-devel
%if 0%{rhel} == 7
+Requires: python36
BuildRequires: devtoolset-9-toolchain
BuildRequires: cmake3
BuildRequires: glibc-static, yum-utils
+BuildRequires: python36-devel
+%else
+%if 0%{rhel} == 8
+Requires: python36
+BuildRequires: cmake
+BuildRequires: dnf-utils
+BuildRequires: python36-devel
%else
+Requires: python3
BuildRequires: cmake
BuildRequires: dnf-utils
+BuildRequires: python3-devel
+%endif
%endif
%endif
%endif
BuildRequires: libffi-devel
-BuildRequires: redhat-lsb
BuildRequires: apr-devel
BuildRequires: numactl-devel
BuildRequires: autoconf automake libtool byacc bison flex
@@ -321,7 +330,7 @@ fi
%postun
-%systemd_postun
+%systemd_postun vpp.service
if [ $1 -eq 0 ] ; then
echo "Uninstalling, unbind user-mode PCI drivers"
# Unbind user-mode PCI drivers