X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=redhat%2Ffrr.spec.in;h=670bc6f4c91060b7c6f1bb4dd8d721866be7149d;hb=b561326a2e1ffea8b407dadbb9cd6a78266b29f2;hp=78b1f7c87c2bfc3979969fb54f184a714d818474;hpb=8f88441d717c0ded412543cceabf0ddd93ee9f09;p=mirror_frr.git diff --git a/redhat/frr.spec.in b/redhat/frr.spec.in index 78b1f7c87..670bc6f4c 100644 --- a/redhat/frr.spec.in +++ b/redhat/frr.spec.in @@ -1,6 +1,6 @@ # configure options # -# Some can be overriden on rpmbuild commandline with: +# Some can be overridden on rpmbuild commandline with: # rpmbuild --define 'variable value' # (use any value, ie 1 for flag "with_XXXX" definitions) # @@ -24,6 +24,7 @@ %{!?with_pam: %global with_pam 0 } %{!?with_pbrd: %global with_pbrd 1 } %{!?with_pimd: %global with_pimd 1 } +%{!?with_vrrpd: %global with_vrrpd 1 } %{!?with_rpki: %global with_rpki 0 } %{!?with_rtadv: %global with_rtadv 1 } %{!?with_watchfrr: %global with_watchfrr 1 } @@ -43,12 +44,6 @@ # defines for configure %define rundir %{_localstatedir}/run/%{name} -# define for sphinx-build binary -%if 0%{?rhel} && 0%{?rhel} < 7 - %define sphinx sphinx-build2.7 -%else - %define sphinx sphinx-build -%endif ############################################################################ #### Version String tweak @@ -124,6 +119,12 @@ %define daemon_babeld "" %endif +%if %{with_vrrpd} + %define daemon_vrrpd vrrpd +%else + %define daemon_vrrpd "" +%endif + %if %{with_watchfrr} %define daemon_watchfrr watchfrr %else @@ -136,7 +137,7 @@ %define daemon_bfdd "" %endif -%define all_daemons %{daemon_list} %{daemon_ldpd} %{daemon_pimd} %{daemon_nhrpd} %{daemon_eigrpd} %{daemon_babeld} %{daemon_watchfrr} %{daemon_pbrd} %{daemon_bfdd} +%define all_daemons %{daemon_list} %{daemon_ldpd} %{daemon_pimd} %{daemon_nhrpd} %{daemon_eigrpd} %{daemon_babeld} %{daemon_watchfrr} %{daemon_pbrd} %{daemon_bfdd} %{daemon_vrrpd} #release sub-revision (the two digits after the CONFDATE) %{!?release_rev: %global release_rev 01 } @@ -168,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 @@ -216,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 @@ -306,6 +318,11 @@ developing OSPF-API and frr applications. %else --disable-babeld \ %endif +%if %{with_vrrpd} + --enable-vrrpd \ +%else + --disable-vrrpd \ +%endif %if %{with_pam} --with-libpam \ %endif @@ -348,7 +365,7 @@ developing OSPF-API and frr applications. %else --disable-bfdd \ %endif - SPHINXBUILD=%{sphinx} + # end make %{?_smp_mflags} MAKEINFO="makeinfo --no-split" @@ -376,15 +393,13 @@ rm -vf %{buildroot}%{_libdir}/frr/libyang_plugins/*.la # install /etc sources %if "%{initsystem}" == "systemd" mkdir -p %{buildroot}%{_unitdir} -install -m644 %{zeb_rh_src}/frr.service %{buildroot}%{_unitdir}/frr.service -install %{zeb_rh_src}/frr.init %{buildroot}%{_sbindir}/frr +install -m644 %{zeb_src}/tools/frr.service %{buildroot}%{_unitdir}/frr.service %else mkdir -p %{buildroot}%{_initddir} -install %{zeb_rh_src}/frr.init %{buildroot}%{_sbindir}/frr -ln -s %{_sbindir}/frr %{buildroot}%{_initddir}/frr +ln -s %{_sbindir}/frrinit.sh %{buildroot}%{_initddir}/frr %endif -install %{zeb_rh_src}/daemons %{buildroot}%{_sysconfdir}/frr +install %{zeb_src}/tools/etc/frr/daemons %{buildroot}%{_sysconfdir}/frr # add rpki module to daemon %if %{with_rpki} sed -i -e 's/^\(bgpd_options=\)\(.*\)\(".*\)/\1\2 -M rpki\3/' %{buildroot}%{_sysconfdir}/frr/daemons @@ -393,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 @@ -424,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 } @@ -463,6 +483,9 @@ zebra_spec_add_service isisd 2608/tcp "ISISd vty" zebra_spec_add_service bfdd 2617/tcp "BFDd vty" %endif zebra_spec_add_service fabricd 2618/tcp "Fabricd vty" +%if %{with_vrrpd} + zebra_spec_add_service vrrpd 2619/tcp "VRRPd vty" +%endif %if "%{initsystem}" == "systemd" for daemon in %all_daemons ; do @@ -474,7 +497,7 @@ zebra_spec_add_service fabricd 2618/tcp "Fabricd vty" # Fix bad path in previous config files # Config files won't get replaced by default, so we do this ugly hack to fix it -%__sed -i 's|/etc/init.d/|%{_sbindir}/|g' %{configdir}/daemons 2> /dev/null || true +%__sed -i 's|watchfrr_options=|#watchfrr_options=|g' %{configdir}/daemons 2> /dev/null || true # With systemd, watchfrr is mandatory. Fix config to make sure it's enabled if # we install or upgrade to a frr built with systemd @@ -598,6 +621,9 @@ fi %if %{with_pbrd} %{_sbindir}/pbrd %endif +%if %{with_vrrpd} + %{_sbindir}/vrrpd +%endif %{_sbindir}/isisd %{_sbindir}/fabricd %if %{with_ldpd} @@ -623,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 @@ -632,7 +660,6 @@ fi %else %{_initddir}/frr %endif -%{_sbindir}/frr %config(noreplace) %{_sysconfdir}/pam.d/frr %config(noreplace) %{_sysconfdir}/logrotate.d/frr %{_sbindir}/frr-reload @@ -646,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 @@ -668,7 +698,10 @@ fi %changelog -* Sun May 28 2018 Rafael Zalamena - %{version} +* Fri Dec 27 2019 Donatas Abraitis +- Add CentOS 8 support + +* Mon May 28 2018 Rafael Zalamena - %{version} - Add BFDd support * Sun May 20 2018 Martin Winter