%define _disable_ld_no_undefined 1 # configure options %define with_snmp 0 %define with_vtysh 1 %define with_ospf_te 1 %define with_opaque_lsa 1 %define with_tcp_zebra 0 %define with_vtysh 1 %define with_pam 1 %define with_ipv6 1 %define with_ospfclient 0 %define with_ospfapi 0 %define with_irdp 1 %define with_isisd 1 %define with_multipath 64 %define quagga_user quagga %define vty_group quaggavt # path defines %define zeb_src %{_builddir}/%{name}-%{version} %define zeb_rh_src %{zeb_src}/redhat %define zeb_docs %{zeb_src}/doc %define major 0 %define libname %mklibname %{name} %{major} %define develname %mklibname %{name} -d Summary: Routing daemon Name: quagga Version: 0.99.22.4 %define subrel 2 Release: %mkrel 4 License: GPLv2+ Group: System/Servers URL: http://www.quagga.net Source0: http://download.savannah.gnu.org/releases/quagga/%{name}-%{version}.tar.xz Source1: http://download.savannah.gnu.org/releases/quagga/%{name}-%{version}.tar.asc Source2: %{name}-tmpfiles.conf Source10: babeld.service Source11: ripngd.service Source12: ospf6d.service Source13: isisd.service Source14: ospfd.service Source15: ripd.service Source16: bgpd.service Source17: zebra.service Source18: watchquagga.service # patch to ignore netlik message not coing from kernel # not sure if this is still needed # likely related to http://osvdb.org/show/osvdb/55382 # to be sent upstream Patch0: quagga-0.99.11-netlink.patch Patch1: quagga-CVE-2016-2342-VPNv4-NLRI-memcpy-stack-overflow.patch Patch2: quagga-CVE-2016-4049.patch BuildRequires: texinfo BuildRequires: texi2html BuildRequires: tetex BuildRequires: pam-devel BuildRequires: libpcap-devel BuildRequires: chrpath >= 0.12 BuildRequires: automake BuildRequires: autoconf2.5 %if %{with_snmp} Requires: net-snmp-mibs BuildRequires: net-snmp-devel BuildRequires: openssl-devel %endif %if %{with_vtysh} BuildRequires: readline-devel BuildRequires: ncurses-devel %endif Requires(post): systemd >= %{systemd_required_version} Requires(pre): rpm-helper Requires(post): rpm-helper Requires(preun): rpm-helper Requires(postun): rpm-helper Requires(pre): ncurses readline pam Requires(preun): info-install Requires(post): info-install Requires: %{libname} = %{version} %description Quagga is a free software that manages TCP/IP based routing protocol. It takes multi-server and multi-thread approach to resolve the current complexity of the Internet. Quagga supports BGP4, BGP4+, OSPFv2, OSPFv3, RIPv1, RIPv2, and RIPng. Quagga is intended to be used as a Route Server and a Route Reflector. It is not a toolkit, it provides full routing power under a new architecture. Quagga by design has a process for each protocol. Quagga is a fork of GNU Zebra. %package contrib Summary: Tools for quagga Group: System/Servers %description contrib Contributed/3rd party tools which may be of use with quagga. %package -n %{libname} Summary: Shared %{name} library Group: System/Libraries %description -n %{libname} This package provides the shared %{name} library. %package -n %{develname} Summary: Header and object files for quagga development Group: Development/C Requires: %{libname} = %{version} Provides: %{name}-devel = %{version} Provides: lib%{name}-devel = %{version} Obsoletes: %{mklibname quagga 0 -d} %description -n %{develname} The quagga-devel package contains the header and object files necessary for developing OSPF-API and quagga applications. %prep %setup -q %patch0 -p1 -b .netlink %patch1 -p1 -b .CVE-2016-2342 %patch2 -p1 -b .CVE-2016-4049 %build export CFLAGS="%{optflags} -fPIC" %serverbuild autoreconf -fi %configure2_5x \ --sysconfdir=%{_sysconfdir}/quagga \ --localstatedir=/run/quagga \ %if %{with_ipv6} --enable-ipv6 \ %endif %if %{with_snmp} --enable-snmp \ %endif %if %{with_multipath} --enable-multipath=%{with_multipath} \ %endif %if %{with_tcp_zebra} --enable-tcp-zebra \ %endif %if %{with_opaque_lsa} --enable-opaque-lsa \ %endif %if %{with_ospf_te} --enable-ospf-te \ %endif %if %{with_vtysh} --enable-vtysh \ %endif %if %{with_ospfclient} --enable-ospfclient=yes \ %else --enable-ospfclient=no\ %endif %if %{with_ospfapi} --enable-ospfapi=yes \ %else --enable-ospfapi=no \ %endif %if %{with_irdp} --enable-irdp=yes \ %else --enable-irdp=no \ %endif %if %{with_isisd} --enable-isisd \ %else --disable-isisd \ %endif %if %{with_pam} --with-libpam \ %endif --enable-user=%{quagga_user} \ --enable-group=%{quagga_user} \ --enable-vty-group=%{vty_group} \ --with-cflags="%{optflags}" \ --enable-netlink %make MAKEINFO="makeinfo --no-split" pushd doc texi2html quagga.texi popd %install # don't fiddle with the initscript! export DONT_GPRINTIFY=1 install -d %{buildroot}%{_sysconfdir}/sysconfig install -d %{buildroot}%{_sysconfdir}/logrotate.d install -d %{buildroot}%{_sysconfdir}/pam.d install -d %{buildroot}/var/log/quagga install -D -p -m 0644 %{SOURCE2} %{buildroot}%{_tmpfilesdir}/%{name}.conf install -d %{buildroot}%{_infodir} %makeinstall_std # Remove this file, as it is uninstalled and causes errors when building on RH9 rm -rf %{buildroot}/usr/share/info/dir mkdir -p %{buildroot}%{_unitdir} install -m 644 %{SOURCE16} %{buildroot}%{_unitdir} install -m 644 %{SOURCE17} %{buildroot}%{_unitdir} install -m 644 %{SOURCE14} %{buildroot}%{_unitdir} install -m 644 %{SOURCE15} %{buildroot}%{_unitdir} install -m 644 %{SOURCE18} %{buildroot}%{_unitdir} %if %{with_ipv6} install -m 644 %{SOURCE11} %{buildroot}%{_unitdir} install -m 644 %{SOURCE12} %{buildroot}%{_unitdir} %endif %if %{with_isisd} install -m 644 %{SOURCE13} %{buildroot}%{_unitdir} %endif install -m644 %{zeb_rh_src}/quagga.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/quagga install -m644 %{zeb_rh_src}/quagga.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/quagga # fix conditional pam config file install -m644 %{zeb_rh_src}/quagga.pam %{buildroot}%{_sysconfdir}/pam.d/quagga # nuke rpath chrpath -d %{buildroot}%{_bindir}/* chrpath -d %{buildroot}%{_sbindir}/* %pre # add vty_group %_pre_groupadd %{vty_group} # add quagga user and group %_pre_useradd %{quagga_user} %{_localstatedir}/lib /sbin/nologin %post %_tmpfilescreate %{name} %_post_service zebra %_post_service ripd %if %{with_ipv6} %_post_service ospf6d %_post_service ripngd %endif %_post_service ospfd %_post_service bgpd %_post_service watchquagga %_install_info %{name}.info # Create dummy files if they don't exist so basic functions can be used. if [ ! -e %{_sysconfdir}/quagga/zebra.conf ]; then echo "hostname `hostname`" > %{_sysconfdir}/quagga/zebra.conf chown %{quagga_user}:%{quagga_user} %{_sysconfdir}/quagga/zebra.conf chmod 640 %{_sysconfdir}/quagga/zebra.conf fi if [ ! -e %{_sysconfdir}/quagga/vtysh.conf ]; then touch %{_sysconfdir}/quagga/vtysh.conf chmod 640 %{_sysconfdir}/quagga/vtysh.conf fi %preun %_preun_service zebra %_preun_service ripd %if %{with_ipv6} %_preun_service ripngd %endif %_preun_service ospfd %if %{with_ipv6} %_preun_service ospf6d %endif %_preun_service bgpd %_preun_service watchquagga %_remove_install_info %{name}.info %postun %_postun_userdel %{quagga_user} %files %doc */*.sample* AUTHORS COPYING doc/quagga.html doc/mpls %doc ChangeLog INSTALL NEWS README REPORTING-BUGS SERVICES TODO # %dir %attr(0751,%{quagga_user},%{quagga_user}) %{_sysconfdir}/quagga %dir %attr(0750,%{quagga_user},%{quagga_user}) /var/log/quagga %{_tmpfilesdir}/%{name}.conf # %attr(0640,%{quagga_user},%{vty_group}) %config(noreplace) %{_sysconfdir}/quagga/vtysh.conf* # %config(noreplace) %{_sysconfdir}/pam.d/quagga %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/* %config(noreplace) %{_sysconfdir}/sysconfig/quagga %config(noreplace) %{_sysconfdir}/quagga/bgpd.conf* %config(noreplace) %{_sysconfdir}/quagga/ospf6d.conf* %config(noreplace) %{_sysconfdir}/quagga/ospfd.conf* %config(noreplace) %{_sysconfdir}/quagga/ripd.conf* %config(noreplace) %{_sysconfdir}/quagga/ripngd.conf* %config(noreplace) %{_sysconfdir}/quagga/zebra.conf* %config(noreplace) %{_sysconfdir}/quagga/babeld.conf* # %{_unitdir}/*.service # %{_sbindir}/bgpd %{_sbindir}/ospf6d %if %{with_ospfclient} %{_sbindir}/ospfclient %endif %{_sbindir}/ospfd %{_sbindir}/ripd %{_sbindir}/ripngd %{_sbindir}/watchquagga %{_sbindir}/zebra %{_sbindir}/babeld # %if %{with_vtysh} %{_bindir}/vtysh %attr(0644,root,root) %{_mandir}/man1/vtysh.1* %endif # %if %{with_isisd} %{_sbindir}/isisd %attr(0644,root,root) %{_mandir}/man8/isisd.8* %config(noreplace) %{_sysconfdir}/quagga/isisd.conf* %endif # %attr(0644,root,root) %{_mandir}/man8/bgpd.8* %attr(0644,root,root) %{_mandir}/man8/ospf6d.8* %attr(0644,root,root) %{_mandir}/man8/ospfd.8* %attr(0644,root,root) %{_mandir}/man8/ripd.8* %attr(0644,root,root) %{_mandir}/man8/ripngd.8* %attr(0644,root,root) %{_mandir}/man8/zebra.8* %if %{with_ospfclient} %attr(0644,root,root) %{_mandir}/man8/ospfclient.8* %endif %attr(0644,root,root) %{_mandir}/man8/watchquagga.8* %{_infodir}/*info* %files contrib %doc tools %files -n %{libname} %{_libdir}/*.so.%{major} %{_libdir}/*.so.%{major}.* %files -n %{develname} %{_libdir}/*.so %{_libdir}/*.a %{_libdir}/*.la %{_includedir}/quagga/ %changelog * Mon May 02 2016 philippem <philippem> 0.99.22.4-4.2.mga5 + Revision: 1008790 - add patch for CVE-2016-4049 mga#18280 + luigiwalser <luigiwalser> - add patch from opensuse to fix CVE-2016-2342 * Wed Oct 15 2014 umeabot <umeabot> 0.99.22.4-4.mga5 + Revision: 743229 - Second Mageia 5 Mass Rebuild * Tue Sep 16 2014 umeabot <umeabot> 0.99.22.4-3.mga5 + Revision: 688573 - Mageia 5 Mass Rebuild + wally <wally> - fix license * Mon Oct 21 2013 umeabot <umeabot> 0.99.22.4-2.mga4 + Revision: 541003 - Mageia 4 Mass Rebuild * Thu Oct 10 2013 luigiwalser <luigiwalser> 0.99.22.4-1.mga4 + Revision: 494825 - 0.99.22.4 - disable ospfapi and ospfclient (CVE-2013-2236) - update source URLs * Sat May 25 2013 nanardon <nanardon> 0.99.22.1-1.mga4 + Revision: 427293 - 0.99.22.1 - switch to systemd managment * Sun Mar 24 2013 colin <colin> 0.99.20.1-9.mga3 + Revision: 404859 - Add systemd requires and general post/pre fixes (mga#9302) * Sun Jan 13 2013 umeabot <umeabot> 0.99.20.1-8.mga3 + Revision: 380083 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Wed Jan 09 2013 cjw <cjw> 0.99.20.1-7.mga3 + Revision: 343472 - patch7: fix build with automake 1.13 * Sat Dec 15 2012 colin <colin> 0.99.20.1-6.mga3 + Revision: 331295 - Switch to tmpfiles for /run dirs - Remove conditionals in spec file (conflict with shipped tmpfile conf) * Tue Dec 11 2012 nanardon <nanardon> 0.99.20.1-5.mga3 + Revision: 329766 - move /var/run to /run * Tue Jun 19 2012 luigiwalser <luigiwalser> 0.99.20.1-4.mga3 + Revision: 261982 - add patch to fix CVE-2012-1820 (from fedora) * Sat May 12 2012 colin <colin> 0.99.20.1-3.mga2 + Revision: 235398 - Add LSB headers to initscripts (mga#5262) * Mon Apr 23 2012 luigiwalser <luigiwalser> 0.99.20.1-2.mga2 + Revision: 232970 - fix edge case for virtual links (from upstream) * Thu Apr 05 2012 fwang <fwang> 0.99.20.1-1.mga2 + Revision: 228658 - new version 0.99.20.1 * Mon Mar 05 2012 misc <misc> 0.99.20-1.mga2 + Revision: 218771 - fix file list to get all files in /usr/include - fix non existant filename build - also remove switch for nssa, option no longer exist in configure - compile rtadv by default ( since that's upstream default ) - new version 0.99.20, with security fix - remove two patches applied upstream - do not ship the .asc, since upstream didn't ship it * Tue Sep 27 2011 ovitters <ovitters> 0.99.18-2.mga2 + Revision: 149661 - fix requires - clean spec * Sun Apr 17 2011 misc <misc> 0.99.18-1.mga1 + Revision: 87048 - add 2 patchs to fix build, one from upstream, another one for format string errors - clean old Obsoletes - remove requires on initscripts, and on library already required - clean buildRequires - remove patch 4, already applied upstream - update to 0.99.18 * Wed Mar 09 2011 ennael <ennael> 0.99.17-2.mga1 + Revision: 66800 - more cleaning - clean spec file - imported package quagga