%define name quagga %define version 0.98.3 %define major 0 %define libname %mklibname %{name} %{major} # configure options %define with_snmp 0 %define with_vtysh 1 %define with_ospf_te 1 %define with_nssa 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 1 %define with_ospfapi 1 %define with_rtadv 1 %define with_multipath 64 %define quagga_uid 92 %define quagga_gid 92 %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 Summary: Routing daemon Name: %{name} Version: %{version} Release: %mkrel 1 License: GPL Group: System/Servers URL: http://www.quagga.net Source0: http://www.quagga.net/download/%{name}-%{version}.tar.gz Source1: http://www.quagga.net/download/%{name}-%{version}.tar.gz.asc Patch0: quagga-0.97.4-lib64.diff.bz2 Patch1: quagga-0.96.3-netlink.patch.bz2 PreReq: rpm-helper BuildRequires: texinfo BuildRequires: tetex-texi2html BuildRequires: tetex BuildRequires: pam-devel BuildRequires: libpcap-devel BuildRequires: chrpath >= 0.12 BuildRequires: automake1.7 BuildRequires: autoconf2.5 %if %with_snmp Requires: net-snmp-mibs BuildRequires: net-snmp-devel BuildRequires: openssl-devel %endif %if %with_vtysh BuildRequires: readline readline-devel ncurses ncurses-devel Prereq: readline ncurses %endif # Initscripts > 5.60 is required for IPv6 support Prereq: initscripts >= 5.60 Prereq: ncurses readline pam Prereq: /sbin/install-info Provides: routingdaemon Obsoletes: bird gated mrt zebra Provides: bird gated mrt zebra Requires: %{libname} = %{version} BuildRoot: %{_tmppath}/%{name}-%{version}-root %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 %{libname}-devel Summary: Header and object files for quagga development Group: Development/C Provides: %{name}-devel Provides: lib%{name}-devel Requires: %{libname} = %{version} %description -n %{libname}-devel The quagga-devel package contains the header and object files necessary for developing OSPF-API and quagga applications. %prep %setup -q %patch0 -p0 -b .lib64 %patch1 -p1 -b .netlink %build export WANT_AUTOCONF_2_5=1 export CFLAGS="%{optflags} -fPIC" rm -f configure libtoolize --copy --force && aclocal-1.7 && autoconf --force && automake-1.7 && autoheader %configure2_5x \ --sysconfdir=%{_sysconfdir}/quagga \ --localstatedir=%{_var}/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_nssa --enable-nssa \ %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_pam --with-libpam \ %endif %if %quagga_user --enable-user=%quagga_user \ --enable-group=%quagga_user \ %endif %if %vty_group --enable-vty-group=%vty_group \ %endif %if %with_rtadv --with-rtadv \ %endif --with-cflags="%{optflags}" \ --enable-netlink %make MAKEINFO="makeinfo --no-split" pushd doc texi2html quagga.texi popd %install [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} # don't fiddle with the initscript! export DONT_GPRINTIFY=1 install -d %{buildroot}%{_initrddir} 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 %{buildroot}%{_var}/run/quagga 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 install -m755 %{zeb_rh_src}/zebra.init %{buildroot}%{_initrddir}/zebra install -m755 %{zeb_rh_src}/bgpd.init %{buildroot}%{_initrddir}/bgpd %if %with_ipv6 install -m755 %{zeb_rh_src}/ospf6d.init %{buildroot}%{_initrddir}/ospf6d install -m755 %{zeb_rh_src}/ripngd.init %{buildroot}%{_initrddir}/ripngd %endif install -m755 %{zeb_rh_src}/ospfd.init %{buildroot}%{_initrddir}/ospfd install -m755 %{zeb_rh_src}/ripd.init %{buildroot}%{_initrddir}/ripd install -m755 %{zeb_rh_src}/watchquagga.init %{buildroot}%{_initrddir}/watchquagga install -m644 %{zeb_rh_src}/quagga.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/quagga install -m644 %{zeb_rh_src}/quagga.pam %{buildroot}%{_sysconfdir}/pam.d/quagga install -m644 %{zeb_rh_src}/quagga.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/quagga # nuke rpath chrpath -d %{buildroot}%{_bindir}/* chrpath -d %{buildroot}%{_sbindir}/* %pre # add vty_group %if %vty_group groupadd -r %vty_group 2> /dev/null || : %endif # add quagga user and group %if %quagga_user # Ensure that quagga_gid gets correctly allocated if getent group %quagga_user >/dev/null 2>&1 ; then : ; else \ /usr/sbin/groupadd -g %quagga_gid %quagga_user > /dev/null 2>&1 || exit 1 ; fi if getent passwd %quagga_user >/dev/null 2>&1 ; then : ; else \ /usr/sbin/useradd -u %quagga_uid -g %quagga_gid -M -r -s /sbin/nologin \ -c "Quagga routing suite" -d %_localstatedir %quagga_user 2> /dev/null \ || exit 1 ; fi %endif %post # %{_sysconfdir}/services is already populated, so skip this # zebra_spec_add_service <service name> <port/proto> <comment> # e.g. zebra_spec_add_service zebrasrv 2600/tcp "zebra service" # #zebra_spec_add_service () #{ # # Add port %{_sysconfdir}/services entry if it isn't already there # if [ -f %{_sysconfdir}/services ] && ! grep -q "^$1[^a-zA-Z0-9]" %{_sysconfdir}/services ; then # echo "$1 $2 # $3" >> %{_sysconfdir}/services # fi #} # #zebra_spec_add_service zebrasrv 2600/tcp "zebra service" #zebra_spec_add_service zebra 2601/tcp "zebra vty" #zebra_spec_add_service ripd 2602/tcp "RIPd vty" #%if %with_ipv6 #zebra_spec_add_service ripngd 2603/tcp "RIPngd vty" #%endif #zebra_spec_add_service ospfd 2604/tcp "OSPFd vty" #zebra_spec_add_service bgpd 2605/tcp "BGPd vty" #%if %with_ipv6 #zebra_spec_add_service ospf6d 2606/tcp "OSPF6d vty" #%endif #%if %with_ospfapi #zebra_spec_add_service ospfapi 2607/tcp "OSPF-API" #%endif %_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 %if %quagga_user chown %quagga_user:%quagga_user %{_sysconfdir}/quagga/zebra.conf %endif 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 %post -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig %clean [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %files %defattr(-,root,root) %doc */*.sample* AUTHORS COPYING doc/quagga.html doc/mpls %doc ChangeLog INSTALL NEWS README REPORTING-BUGS SERVICES TODO %if %quagga_user %dir %attr(0751,%quagga_user,%quagga_user) %{_sysconfdir}/quagga %dir %attr(0750,%quagga_user,%quagga_user) %{_var}/log/quagga %dir %attr(0751,%quagga_user,%quagga_user) %{_var}/run/quagga %else %dir %attr(0750,root,root) %{_sysconfdir}/quagga %dir %attr(0750,root,root) %{_var}/log/quagga %dir %attr(0750,root,root) %{_var}/run/quagga %endif %if %vty_group %attr(0640,%quagga_user,%vty_group) %config(noreplace) %{_sysconfdir}/quagga/vtysh.conf.sample %endif %{_infodir}/*info* %{_mandir}/man*/* %{_sbindir}/bgpd %{_sbindir}/ospf6d %{_sbindir}/ospfclient %{_sbindir}/ospfd %{_sbindir}/ripd %{_sbindir}/ripngd %{_sbindir}/watchquagga %{_sbindir}/zebra %if %with_vtysh %{_bindir}/vtysh %endif %config(noreplace) %{_sysconfdir}/quagga/[!v]* %attr(0755,root,root) %{_initrddir}/bgpd %attr(0755,root,root) %{_initrddir}/ospf6d %attr(0755,root,root) %{_initrddir}/ospfd %attr(0755,root,root) %{_initrddir}/ripd %attr(0755,root,root) %{_initrddir}/ripngd %attr(0755,root,root) %{_initrddir}/watchquagga %attr(0755,root,root) %{_initrddir}/zebra %config(noreplace) %{_sysconfdir}/pam.d/quagga %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/* %config(noreplace) %{_sysconfdir}/sysconfig/quagga %files contrib %defattr(-,root,root) %doc tools %files -n %{libname} %defattr(-,root,root) %{_libdir}/*.so.* %files -n %{libname}-devel %defattr(-,root,root) %{_libdir}/*.so %{_libdir}/*.a %{_libdir}/*.la %dir %{_includedir}/quagga %{_includedir}/quagga/*.h %dir %{_includedir}/quagga/ospfd/* %if %with_ospfapi %dir %{_includedir}/quagga/ospfapi/* %endif %changelog * Fri Apr 08 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 0.98.3-1mdk - 0.98.3 - use the %%mkrel macro - misc rpmlint fixes * Fri Feb 4 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 0.98.0-2mdk - rebuilt against new readline * Tue Jan 18 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 0.98.0-1mdk - 0.98.0 * Fri Dec 31 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 0.97.4-3mdk - revert latest "lib64 fixes" - fixed the install info error - make it require the explicit libname version * Wed Dec 29 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 0.97.4-2mdk - make it compile on 10.0 * Tue Dec 28 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 0.97.4-1mdk - 0.97.4 - rediffed P0 - added watchquagga - use the %%configure2_5x macro and libifiction - nuke rpath - misc spec file fixes * Tue Aug 17 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 0.96.5-1mdk - quagga-0.96.5 (the zebra fork, fedora import) * Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com> - rebuilt * Tue May 4 2004 Jay Fenlason <fenlason@redhat.com> 0.96.5-0 - New upstream version - Change includedir - Change the pre scriptlet to fail if the useradd command fails. - Remove obsolete patches from this .spec file and renumber the two remaining ones. * Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com> - rebuilt * Fri Feb 13 2004 Jay Fenlason <fenlason@redhat.com> - Add --enable-rtadv, to turn ipv6 router advertisement back on. Closes bugzilla #114691 * Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com> - rebuilt * Mon Nov 3 2003 Jay Fenlason <fenlason@redhat.com> 0.96.4-0 - New upstream version - include .h files in the -devel package. * Wed Oct 15 2003 Jay Fenlason <fenlason@redhat.com> 0.96.3-1 - Patch a remote DoS attack (#107140) - New upstream version - Removed the .libcap patch, which was applied upstream - Renamed the vty group from quaggavty to quaggavt because quaggavty is too long for NIS. - Patch the spec file to fix #106857: /etc/quagga/zebra.conf is created with the wrong owner. - Removed the "med" part of the 0.96.1-warnings patch for . . . - Add a new warnings patch with a fix for #106315. This also updates the "med" part of the previous warnings patch. * Mon Sep 22 2003 Jay Fenlason <fenlason@redhat.com> 0.96.2-5 - merge sysconfig patch from 3E branch. This patch is from Kaj J. Niemi (kajtzu@basen.net), and puts Quagga configuration options in /etc/sysconfig/quagga, and defaults Quagga to listening on 127.0.0.1 only. This closes #104376 - Use /sbin/nologin for the shell of the quagga user. This closes #103320 - Update the quagga-0.96.1-warnings.patch patch to kill a couple more warnings. * Mon Sep 22 2003 Nalin Dahyabhai <nalin@redhat.com> - Remove the directory part of paths for PAM modules in quagga.pam, allowing libpam to search its default directory (needed if a 64-bit libpam needs to look in /lib64/security instead of /lib/security). * Tue Aug 26 2003 Jay Fenlason <fenlason@redhat.com> 0.96.2-1 - New upstream version * Tue Aug 19 2003 Jay Fenlason <fenlason@redhat.com> 0.96.1-3 - Merge from quagga-3E-branch, with a fix for #102673 and a couple more compiler warnings quashed. * Wed Aug 13 2003 Jay Fenlason <fenlason@redhat.com> 0.96-1 - added a patch (libwrap) to allow the generated Makefiles for zebra/ and lib/ to work on AMD64 systems. For some reason make there does not like a dependency on -lcap - added a patch (warnings) to shut up warnings about an undefined structure type in some function prototypes and quiet down all the warnings about assert(ptr) on x86_64. - Modified the upstream quagga-0.96/readhat/quagga.spec to work as an official Red Hat package (remove user and group creation and changes to services) - Trimmed changelog. See the upstream .spec file for previous changelog entries.