summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas F Herbert <therbert@redhat.com>2018-11-27 15:57:30 -0500
committerDamjan Marion <dmarion@me.com>2018-12-18 12:43:33 +0000
commit6eb61639de0156a2343ba5825ac535727d6658d0 (patch)
tree9f84b8fa9f02ca247584b85822d7bd06b810e862
parent8006c6aa425126529b4017768a9201e4f03964ad (diff)
Build changes required for Fedora and CentOS
VPP-1511 cmake is the dep for Fedora but cmake3 is for CentOS 7. Centos: explicitly install epel-release on Centos. Epel requirement is now explicit for cmake3, and ninja-build. Remove references to Fedora 25 which is EOL. Change-Id: I1548ddf2e5421097ac0ddc2d99abce7582d0d593 Signed-off-by: Thomas F Herbert <therbert@redhat.com>
-rw-r--r--Makefile23
-rw-r--r--extras/rpm/vpp.spec15
2 files changed, 20 insertions, 18 deletions
diff --git a/Makefile b/Makefile
index d5cc9f3785a..068f73d3145 100644
--- a/Makefile
+++ b/Makefile
@@ -82,33 +82,30 @@ else
DEB_DEPENDS += libssl-dev
endif
-RPM_DEPENDS = redhat-lsb glibc-static java-1.8.0-openjdk-devel yum-utils
+RPM_DEPENDS = redhat-lsb glibc-static java-1.8.0-openjdk-devel
RPM_DEPENDS += apr-devel
RPM_DEPENDS += numactl-devel
RPM_DEPENDS += check check-devel
RPM_DEPENDS += boost boost-devel
RPM_DEPENDS += selinux-policy selinux-policy-devel
-RPM_DEPENDS += cmake3 ninja-build
+RPM_DEPENDS += ninja-build
-ifeq ($(OS_ID)-$(OS_VERSION_ID),fedora-25)
- RPM_DEPENDS += subunit subunit-devel
- RPM_DEPENDS += openssl-devel
- RPM_DEPENDS += python-devel python2-ply
- RPM_DEPENDS += python2-virtualenv
- RPM_DEPENDS += mbedtls-devel
- RPM_DEPENDS_GROUPS = 'C Development Tools and Libraries'
-else ifeq ($(shell if [ "$(OS_ID)" = "fedora" ]; then test $(OS_VERSION_ID) -gt 25; echo $$?; fi),0)
+ifeq ($(OS_ID),fedora)
+ RPM_DEPENDS += dnf-utils
RPM_DEPENDS += subunit subunit-devel
RPM_DEPENDS += compat-openssl10-devel
RPM_DEPENDS += python2-devel python2-ply
RPM_DEPENDS += python2-virtualenv
RPM_DEPENDS += mbedtls-devel
+ RPM_DEPENDS += cmake
RPM_DEPENDS_GROUPS = 'C Development Tools and Libraries'
else
+ RPM_DEPENDS += yum-utils
RPM_DEPENDS += openssl-devel
RPM_DEPENDS += python-devel python-ply
RPM_DEPENDS += python-virtualenv
RPM_DEPENDS += devtoolset-7
+ RPM_DEPENDS += cmake3
RPM_DEPENDS_GROUPS = 'Development Tools'
endif
@@ -299,10 +296,14 @@ ifeq ($(OS_ID),rhel)
@sudo -E yum-config-manager --enable rhel-server-rhscl-7-rpms
else ifeq ($(OS_ID),centos)
@sudo -E yum install $(CONFIRM) centos-release-scl-rh
-endif
@sudo -E yum groupinstall $(CONFIRM) $(RPM_DEPENDS_GROUPS)
@sudo -E yum install $(CONFIRM) $(RPM_DEPENDS)
@sudo -E debuginfo-install $(CONFIRM) glibc openssl-libs mbedtls-devel zlib
+else ifeq ($(OS_ID),fedora)
+ @sudo -E dnf groupinstall $(CONFIRM) $(RPM_DEPENDS_GROUPS)
+ @sudo -E dnf install $(CONFIRM) $(RPM_DEPENDS)
+ @sudo -E debuginfo-install $(CONFIRM) glibc openssl-libs mbedtls-devel zlib
+endif
else ifeq ($(filter opensuse-tumbleweed,$(OS_ID)),$(OS_ID))
@sudo -E zypper refresh
@sudo -E zypper install -y $(RPM_SUSE_DEPENDS)
diff --git a/extras/rpm/vpp.spec b/extras/rpm/vpp.spec
index bf2d83a84c8..ef282237088 100644
--- a/extras/rpm/vpp.spec
+++ b/extras/rpm/vpp.spec
@@ -49,20 +49,18 @@ Release: %{_release}
Requires: vpp-lib = %{_version}-%{_release}, vpp-selinux-policy = %{_version}-%{_release}, net-tools, pciutils, python
BuildRequires: systemd, chrpath
BuildRequires: check, check-devel
-%if 0%{?fedora} >= 26
+%if 0%{?fedora}
BuildRequires: subunit, subunit-devel
BuildRequires: compat-openssl10-devel
BuildRequires: python2-devel, python2-virtualenv, python2-ply
BuildRequires: mbedtls-devel
+BuildRequires: cmake
%else
-%if 0%{?fedora} == 25
-BuildRequires: subunit, subunit-devel
-BuildRequires: openssl-devel
-BuildRequires: python-devel, python2-virtualenv, python2-ply
-BuildRequires: mbedtls-devel
-%else
+%if 0%{rhel} == 7
+BuildRequires: devtoolset-7-toolchain
BuildREquires: openssl-devel
BuildRequires: python-devel, python-virtualenv, python-ply
+BuildRequires: cmake3
%endif
%endif
BuildRequires: libffi-devel
@@ -157,6 +155,9 @@ This package contains a tailored VPP SELinux policy
groupadd -f -r vpp
%build
+%if 0%{?rhel}
+. /opt/rh/devtoolset-7/enable
+%endif
%if %{with aesni}
make bootstrap
make -C build-root PLATFORM=vpp TAG=%{_vpp_tag} install-packages