From 3f5c15f66a08d36fc116e4238e6647697edb85db Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Mon, 23 Dec 2019 19:24:19 +0200 Subject: [PATCH] packaging: Adopt frr.spec.in to CentOS 8 Signed-off-by: Donatas Abraitis --- redhat/frr.spec.in | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/redhat/frr.spec.in b/redhat/frr.spec.in index 1a374ba26b..cf0786ac4e 100644 --- a/redhat/frr.spec.in +++ b/redhat/frr.spec.in @@ -169,9 +169,15 @@ BuildRequires: libyang-devel >= 0.16.74 BuildRequires: python27-devel BuildRequires: python27-sphinx %else +%if 0%{?rhel} && 0%{?rhel} > 7 +BuildRequires: python2-devel +#platform-python-devel is needed for /usr/bin/pathfix.py +BuildRequires: platform-python-devel +%else BuildRequires: python-devel >= 2.7 BuildRequires: python-sphinx %endif +%endif Requires: initscripts %if %{with_pam} BuildRequires: pam-devel @@ -217,8 +223,13 @@ Contributed/3rd party tools which may be of use with frr. %package pythontools Summary: python tools for frr +%if 0%{?rhel} && 0%{?rhel} > 7 +BuildRequires: python2 +Requires: python2-ipaddress +%else BuildRequires: python Requires: python-ipaddress +%endif Group: System Environment/Daemons %description pythontools @@ -397,6 +408,11 @@ install -m644 %{zeb_rh_src}/frr.pam %{buildroot}%{_sysconfdir}/pam.d/frr install -m644 %{zeb_rh_src}/frr.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/frr install -d -m750 %{buildroot}%{rundir} +%if 0%{?rhel} && 0%{?rhel} > 7 +# avoid `ERROR: ambiguous python shebang in` errors +pathfix.py -pni "%{__python2} %{py2_shbang_opts}" %{buildroot}/usr/lib/frr/*.py +%py_byte_compile %{__python2} %{buildroot}/usr/lib/frr/*.py +%endif %pre # add vty_group @@ -682,6 +698,9 @@ fi %changelog +* Fri Dec 27 2019 Donatas Abraitis +- Add CentOS 8 support + * Sun May 28 2018 Rafael Zalamena - %{version} - Add BFDd support -- 2.39.5