]> git.proxmox.com Git - mirror_frr.git/blobdiff - redhat/frr.spec.in
packaging: Redirect stderr to /dev/null in %post action (frr.spec.in)
[mirror_frr.git] / redhat / frr.spec.in
index 014cae02ee8840633a7ccb80a5a76b1084546158..670bc6f4c91060b7c6f1bb4dd8d721866be7149d 100644 (file)
@@ -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
@@ -428,7 +444,7 @@ zebra_spec_add_service ()
 {
     # Add port /etc/services entry if it isn't already there
     if [ -f %{_sysconfdir}/services ] && \
-        ! %__sed -e 's/#.*$//' %{_sysconfdir}/services | %__grep -wq $1 ; then
+        ! %__sed -e 's/#.*$//' %{_sysconfdir}/services 2>/dev/null | %__grep -wq $1 ; then
         echo "$1        $2          # $3"  >> %{_sysconfdir}/services
     fi
 }
@@ -633,7 +649,9 @@ fi
 %if %{with_rpki}
     %{_libdir}/frr/modules/bgpd_rpki.so
 %endif
+%{_libdir}/frr/modules/zebra_cumulus_mlag.so
 %{_libdir}/frr/modules/zebra_irdp.so
+%{_libdir}/frr/modules/bgpd_bmp.so
 %{_bindir}/*
 %config(noreplace) %{configdir}/[!v]*.conf*
 %config(noreplace) %attr(750,%{frr_user},%{frr_user}) %{configdir}/daemons
@@ -655,6 +673,9 @@ fi
 
 
 %files pythontools
+%{_sbindir}/generate_support_bundle.py
+%{_sbindir}/generate_support_bundle.pyc
+%{_sbindir}/generate_support_bundle.pyo
 %{_sbindir}/frr-reload.py
 %{_sbindir}/frr-reload.pyc
 %{_sbindir}/frr-reload.pyo
@@ -677,7 +698,10 @@ fi
 
 
 %changelog
-* Sun May 28 2018 Rafael Zalamena <rzalamena@opensourcerouting.org> - %{version}
+* Fri Dec 27 2019 Donatas Abraitis <donatas.abraitis@gmail.com>
+- Add CentOS 8 support
+
+* Mon May 28 2018 Rafael Zalamena <rzalamena@opensourcerouting.org> - %{version}
 - Add BFDd support
 
 * Sun May 20 2018 Martin Winter <mwinter@opensourcerouting.org>