|
version 1.1.1.4.2.1, 2013/07/22 00:08:33
|
version 1.1.1.5, 2016/11/02 10:09:12
|
|
Line 2
|
Line 2
|
| # |
# |
| # Some can be overriden on rpmbuild commandline with: |
# Some can be overriden on rpmbuild commandline with: |
| # rpmbuild --define 'variable value' |
# rpmbuild --define 'variable value' |
| |
# (use any value, ie 1 for flag "with_XXXX" definitions) |
| # |
# |
| |
# E.g. rpmbuild --define 'release_rev 02' may be useful if building |
| |
# rpms again and again on the same day, so the newer rpms can be installed. |
| |
# bumping the number each time. |
| |
|
| ####################### Quagga configure options ######################### |
####################### Quagga configure options ######################### |
| # with-feature options |
# with-feature options |
| %{!?with_snmp: %define with_snmp 1 } | %{!?with_snmp: %global with_snmp 1 } |
| %{!?with_vtysh: %define with_vtysh 1 } | %{!?with_vtysh: %global with_vtysh 1 } |
| %{!?with_ospf_te: %define with_ospf_te 1 } | %{!?with_tcp_zebra: %global with_tcp_zebra 0 } |
| %{!?with_nssa: %define with_nssa 1 } | %{!?with_vtysh: %global with_vtysh 1 } |
| %{!?with_opaque_lsa: %define with_opaque_lsa 1 } | %{!?with_pam: %global with_pam 1 } |
| %{!?with_tcp_zebra: %define with_tcp_zebra 0 } | %{!?with_ospfclient: %global with_ospfclient 1 } |
| %{!?with_vtysh: %define with_vtysh 1 } | %{!?with_ospfapi: %global with_ospfapi 1 } |
| %{!?with_pam: %define with_pam 1 } | %{!?with_irdp: %global with_irdp 1 } |
| %{!?with_ipv6: %define with_ipv6 1 } | %{!?with_rtadv: %global with_rtadv 1 } |
| %{!?with_ospfclient: %define with_ospfclient 1 } | %{!?with_isisd: %global with_isisd 1 } |
| %{!?with_ospfapi: %define with_ospfapi 1 } | %{!?with_pimd: %global with_pimd 1 } |
| %{!?with_irdp: %define with_irdp 1 } | %{!?with_shared: %global with_shared 1 } |
| %{!?with_rtadv: %define with_rtadv 1 } | %{!?with_multipath: %global with_multipath 64 } |
| %{!?with_isisd: %define with_isisd 1 } | %{!?quagga_user: %global quagga_user quagga } |
| %{!?with_shared: %define with_shared 1 } | %{!?vty_group: %global vty_group quaggavt } |
| %{!?with_multipath: %define with_multipath 64 } | %{!?with_fpm: %global with_fpm 0 } |
| %{!?quagga_user: %define quagga_user quagga } | %{!?with_watchquagga: %global with_watchquagga 1 } |
| %{!?vty_group: %define vty_group quaggavty } | |
| |
|
| # path defines |
# path defines |
| %define _sysconfdir /etc/quagga |
%define _sysconfdir /etc/quagga |
| %define zeb_src %{_builddir}/%{name}-%{version} | %define zeb_src %{_builddir}/%{name}-%{quaggaversion} |
| %define zeb_rh_src %{zeb_src}/redhat |
%define zeb_rh_src %{zeb_src}/redhat |
| %define zeb_docs %{zeb_src}/doc |
%define zeb_docs %{zeb_src}/doc |
| |
|
| # defines for configure |
# defines for configure |
| %define _libexecdir %{_exec_prefix}/libexec/quagga |
|
| %define _libdir %{_exec_prefix}/%{_lib}/quagga |
|
| %define _includedir %{_prefix}/include |
|
| %define _localstatedir /var/run/quagga |
%define _localstatedir /var/run/quagga |
| ############################################################################ |
############################################################################ |
| |
|
| ####################### distro specific tweaks ############################# | #### Version String tweak |
| # default distro. Override with rpmbuild -D "dist XXX" | # Remove invalid characters form version string and replace with _ |
| %{expand: %%define default_dist %(rpm -q --qf 'fc%%{VERSION}' fedora-release | grep -v 'not installed')} | %{expand: %%define rpmversion %(echo '1.0.20160315' | tr [:blank:]- _ )} |
| %{!?dist: %define dist %{default_dist}} | %define quaggaversion 1.0.20160315 |
| |
|
| # as distros change packages we depend on, our Requires have to change, sadly. | #### Check version of texi2html |
| %define quagga_buildreqs texinfo tetex autoconf pam-devel | # Old versions don't support "--number-footnotes" option. |
| %define quagga_buildreqs %{quagga_buildreqs} patch libcap-devel | %{expand: %%global texi2htmlversion %(rpm -q --qf '%%{VERSION}' texi2html | cut -d. -f1 )} |
| |
|
| # FC4 and 5 split texi2html out of tetex package. | #### Check for systemd or init.d (upstart) |
| %if "%dist" != "fc2" || "%dist" != "fc3" | # Check for init.d (upstart) as used in CentOS 6 or systemd (ie CentOS 7) |
| %define quagga_buildreqs %{quagga_buildreqs} texi2html | %{expand: %%global initsystem %(if [[ `/sbin/init --version 2> /dev/null` =~ upstart ]]; then echo upstart; elif [[ `systemctl` =~ -\.mount ]]; then echo systemd; fi)} |
| | # |
| | # If init system is systemd, then always disable watchquagga |
| | # |
| | %if "%{initsystem}" == "systemd" |
| | # Note: For systems with systemd, watchquagga will NOT be built. Systemd |
| | # takes over the role of restarting crashed processes. Value will |
| | # be overwritten with 0 below for systemd independent on the setting here |
| | %global with_watchquagga 0 |
| %endif |
%endif |
| |
|
| # pam_stack is deprecated in FC5 | # if FPM is enabled, then enable tcp_zebra as well |
| # default to pam_stack, default should be changed later. | # |
| %if "%dist" == "fc4" || "%dist" == "fc3" | %if %{with_fpm} |
| %define quagga_pam_source quagga.pam.stack | %global with_tcp_zebra 1 |
| %else | |
| %define quagga_pam_source quagga.pam | |
| %endif |
%endif |
| ############################################################################ |
|
| |
|
| |
|
| # misc internal defines |
# misc internal defines |
| %{!?quagga_uid: %define quagga_uid 92 } |
%{!?quagga_uid: %define quagga_uid 92 } |
| %{!?quagga_gid: %define quagga_gid 92 } |
%{!?quagga_gid: %define quagga_gid 92 } |
| |
%{!?vty_gid: %define vty_gid 85 } |
| |
|
| %define daemon_list zebra ripd ospfd bgpd |
%define daemon_list zebra ripd ospfd bgpd |
| |
|
| %if %{with_ipv6} |
|
| %define daemonv6_list ripngd ospf6d |
%define daemonv6_list ripngd ospf6d |
| |
|
| |
%if %{with_isisd} |
| |
%define daemon_isisd isisd |
| %else |
%else |
| %define daemonv6_list "" | %define daemon_isisd "" |
| %endif |
%endif |
| |
|
| %if %{with_isisd} | %if %{with_pimd} |
| %define daemon_other isisd | %define daemon_pimd pimd |
| %else |
%else |
| %define daemon_other "" | %define daemon_pimd "" |
| %endif |
%endif |
| |
|
| %define all_daemons %{daemon_list} %{daemonv6_list} %{daemon_other} watchquagga | %if %{with_watchquagga} |
| | %define daemon_watchquagga watchquagga |
| | %else |
| | %define daemon_watchquagga "" |
| | %endif |
| |
|
| |
%define all_daemons %{daemon_list} %{daemonv6_list} %{daemon_isisd} %{daemon_pimd} %{daemon_watchquagga} |
| |
|
| # allow build dir to be kept |
# allow build dir to be kept |
| %{!?keep_build: %define keep_build 0 } | %{!?keep_build: %global keep_build 0 } |
| |
|
| #release sub-revision (the two digits after the CONFDATE) |
#release sub-revision (the two digits after the CONFDATE) |
| %{!?release_rev: %define release_rev 01 } |
%{!?release_rev: %define release_rev 01 } |
| |
|
| Summary: Routing daemon |
Summary: Routing daemon |
| Name: quagga | Name: quagga |
| Version: 0.99.22 | Version: %{rpmversion} |
| Release: 20130722%{release_rev} | Release: 20160315%{release_rev}%{?dist} |
| License: GPL | License: GPLv2+ |
| Group: System Environment/Daemons | Group: System Environment/Daemons |
| Source0: http://www.quagga.net/snapshots/cvs/%{name}-%{version}.tar.gz | Source0: http://download.savannah.gnu.org/releases/quagga/%{name}-%{quaggaversion}.tar.gz |
| URL: http://www.quagga.net | URL: http://www.quagga.net |
| | Requires: ncurses |
| | Requires(pre): /sbin/install-info |
| | Requires(preun): /sbin/install-info |
| | Requires(post): /sbin/install-info |
| | BuildRequires: texi2html texinfo autoconf patch libcap-devel groff |
| %if %{with_snmp} |
%if %{with_snmp} |
| BuildRequires: net-snmp-devel |
BuildRequires: net-snmp-devel |
| Prereq: net-snmp | Requires: net-snmp |
| %endif |
%endif |
| %if %{with_vtysh} |
%if %{with_vtysh} |
| BuildRequires: readline readline-devel ncurses ncurses-devel |
BuildRequires: readline readline-devel ncurses ncurses-devel |
| Prereq: ncurses | Requires: ncurses |
| %endif |
%endif |
| BuildRequires: texinfo tetex autoconf pam-devel patch libcap-devel tetex | %if %{with_pam} |
| | BuildRequires: pam-devel |
| | Requires: pam |
| | %endif |
| | %if "%{initsystem}" == "systemd" |
| | BuildRequires: systemd |
| | Requires(post): systemd |
| | Requires(preun): systemd |
| | Requires(postun): systemd |
| | %else |
| # Initscripts > 5.60 is required for IPv6 support |
# Initscripts > 5.60 is required for IPv6 support |
| Prereq: initscripts >= 5.60 | Requires(pre): initscripts >= 5.60 |
| Prereq: ncurses pam | %endif |
| Prereq: /sbin/install-info | Provides: routingdaemon = %{version}-%{release} |
| Provides: routingdaemon | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
| BuildRoot: %{_tmppath}/%{name}-%{version}-root | Obsoletes: bird gated mrt zebra quagga-sysvinit |
| Obsoletes: bird gated mrt zebra | |
| |
|
| %description |
%description |
| Quagga is a free software that manages TCP/IP based routing |
Quagga is a free software that manages TCP/IP based routing |
| protocol. It takes multi-server and multi-thread approach to resolve |
protocol. It takes multi-server and multi-thread approach to resolve |
| the current complexity of the Internet. |
the current complexity of the Internet. |
| |
|
| Quagga supports BGP4, BGP4+, OSPFv2, OSPFv3, RIPv1, RIPv2, and RIPng. | Quagga supports BGP4, OSPFv2, OSPFv3, ISIS, RIP, RIPng and PIM. |
| |
|
| Quagga is intended to be used as a Route Server and a Route Reflector. It is |
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. |
not a toolkit, it provides full routing power under a new architecture. |
|
Line 135 Contributed/3rd party tools which may be of use with q
|
Line 162 Contributed/3rd party tools which may be of use with q
|
| %package devel |
%package devel |
| Summary: Header and object files for quagga development |
Summary: Header and object files for quagga development |
| Group: System Environment/Daemons |
Group: System Environment/Daemons |
| |
Requires: %{name} = %{version}-%{release} |
| |
|
| %description devel |
%description devel |
| The quagga-devel package contains the header and object files neccessary for |
The quagga-devel package contains the header and object files neccessary for |
| developing OSPF-API and quagga applications. |
developing OSPF-API and quagga applications. |
| |
|
| %prep |
%prep |
| %setup -q | %setup -q -n quagga-%{quaggaversion} |
| |
|
| %build |
%build |
| |
|
|
Line 156 developing OSPF-API and quagga applications.
|
Line 184 developing OSPF-API and quagga applications.
|
| #CFLAGS="${CFLAGS} -Wpacked -Wpadded" |
#CFLAGS="${CFLAGS} -Wpacked -Wpadded" |
| |
|
| %configure \ |
%configure \ |
| |
--sysconfdir=%{_sysconfdir} \ |
| |
--libdir=%{_libdir} \ |
| |
--libexecdir=%{_libexecdir} \ |
| |
--localstatedir=%{_localstatedir} \ |
| |
--disable-werror \ |
| %if !%{with_shared} |
%if !%{with_shared} |
| --disable-shared \ |
--disable-shared \ |
| %endif |
%endif |
| %if %{with_ipv6} |
|
| --enable-ipv6 \ |
|
| %endif |
|
| %if %{with_snmp} |
%if %{with_snmp} |
| --enable-snmp \ |
--enable-snmp \ |
| %endif |
%endif |
|
Line 171 developing OSPF-API and quagga applications.
|
Line 201 developing OSPF-API and quagga applications.
|
| %if %{with_tcp_zebra} |
%if %{with_tcp_zebra} |
| --enable-tcp-zebra \ |
--enable-tcp-zebra \ |
| %endif |
%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} |
%if %{with_vtysh} |
| --enable-vtysh \ |
--enable-vtysh \ |
| %endif |
%endif |
|
Line 211 developing OSPF-API and quagga applications.
|
Line 232 developing OSPF-API and quagga applications.
|
| %if %{with_pam} |
%if %{with_pam} |
| --with-libpam \ |
--with-libpam \ |
| %endif |
%endif |
| %if %quagga_user | %if 0%{?quagga_user:1} |
| --enable-user=%quagga_user \ |
--enable-user=%quagga_user \ |
| --enable-group=%quagga_user \ |
--enable-group=%quagga_user \ |
| %endif |
%endif |
| %if %vty_group | %if 0%{?vty_group:1} |
| --enable-vty-group=%vty_group \ |
--enable-vty-group=%vty_group \ |
| %endif |
%endif |
| --enable-netlink --enable-gcc-rdynamic | %if %{with_fpm} |
| | --enable-fpm \ |
| | %else |
| | --disable-fpm \ |
| | %endif |
| | %if %{with_watchquagga} |
| | --enable-watchquagga \ |
| | %else |
| | --disable-watchquagga \ |
| | %endif |
| | --enable-gcc-rdynamic |
| |
|
| make %{?_smp_mflags} MAKEINFO="makeinfo --no-split" |
make %{?_smp_mflags} MAKEINFO="makeinfo --no-split" |
| |
|
| pushd doc |
pushd doc |
| texi2html -number quagga.texi | %if %{texi2htmlversion} < 5 |
| | texi2html --number-sections quagga.texi |
| | %else |
| | texi2html --number-footnotes --number-sections quagga.texi |
| | %endif |
| popd |
popd |
| |
|
| %install |
%install |
| rm -rf $RPM_BUILD_ROOT | mkdir -p %{buildroot}/etc/{quagga,sysconfig,logrotate.d,pam.d} \ |
| | %{buildroot}/var/log/quagga %{buildroot}%{_infodir} |
| | make DESTDIR=%{buildroot} INSTALL="install -p" CP="cp -p" install |
| |
|
| install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,logrotate.d,pam.d} \ |
|
| $RPM_BUILD_ROOT/var/log/quagga $RPM_BUILD_ROOT%{_infodir} |
|
| |
|
| make install \ |
|
| DESTDIR=$RPM_BUILD_ROOT |
|
| |
|
| # Remove this file, as it is uninstalled and causes errors when building on RH9 |
# Remove this file, as it is uninstalled and causes errors when building on RH9 |
| rm -rf $RPM_BUILD_ROOT/usr/share/info/dir | rm -rf %{buildroot}/usr/share/info/dir |
| |
|
| # install etc sources | # install /etc sources |
| | %if "%{initsystem}" == "systemd" |
| | mkdir -p %{buildroot}%{_unitdir} |
| for daemon in %{all_daemons} ; do |
for daemon in %{all_daemons} ; do |
| if [ x"${daemon}" != x"" ] ; then |
if [ x"${daemon}" != x"" ] ; then |
| |
install %{zeb_rh_src}/${daemon}.service \ |
| |
%{buildroot}%{_unitdir}/${daemon}.service |
| |
fi |
| |
done |
| |
%else |
| |
mkdir -p %{buildroot}/etc/rc.d/init.d |
| |
for daemon in %{all_daemons} ; do |
| |
if [ x"${daemon}" != x"" ] ; then |
| install %{zeb_rh_src}/${daemon}.init \ |
install %{zeb_rh_src}/${daemon}.init \ |
| $RPM_BUILD_ROOT/etc/rc.d/init.d/${daemon} | %{buildroot}/etc/rc.d/init.d/${daemon} |
| fi |
fi |
| done |
done |
| install -m644 %{zeb_rh_src}/%{quagga_pam_source} \ | %endif |
| $RPM_BUILD_ROOT/etc/pam.d/quagga | |
| | install -m644 %{zeb_rh_src}/quagga.pam \ |
| | %{buildroot}/etc/pam.d/quagga |
| install -m644 %{zeb_rh_src}/quagga.logrotate \ |
install -m644 %{zeb_rh_src}/quagga.logrotate \ |
| $RPM_BUILD_ROOT/etc/logrotate.d/quagga | %{buildroot}/etc/logrotate.d/quagga |
| install -m644 %{zeb_rh_src}/quagga.sysconfig \ |
install -m644 %{zeb_rh_src}/quagga.sysconfig \ |
| $RPM_BUILD_ROOT/etc/sysconfig/quagga | %{buildroot}/etc/sysconfig/quagga |
| install -d -m750 $RPM_BUILD_ROOT/var/run/quagga | install -d -m750 %{buildroot}/var/run/quagga |
| |
|
| %pre |
%pre |
| # add vty_group |
# add vty_group |
| %if %vty_group | %if 0%{?vty_group:1} |
| if getent group %vty_group > /dev/null ; then : ; else \ |
if getent group %vty_group > /dev/null ; then : ; else \ |
| /usr/sbin/groupadd -r %vty_group > /dev/null || : ; fi | /usr/sbin/groupadd -r -g %vty_gid %vty_group > /dev/null || : ; fi |
| %endif |
%endif |
| |
|
| # add quagga user and group |
# add quagga user and group |
| %if %quagga_user | %if 0%{?quagga_user:1} |
| # Ensure that quagga_gid gets correctly allocated |
# Ensure that quagga_gid gets correctly allocated |
| if getent group %quagga_user >/dev/null; then : ; else \ |
if getent group %quagga_user >/dev/null; then : ; else \ |
| /usr/sbin/groupadd -g %quagga_gid %quagga_user > /dev/null || : ; \ |
/usr/sbin/groupadd -g %quagga_gid %quagga_user > /dev/null || : ; \ |
|
Line 289 zebra_spec_add_service ()
|
Line 332 zebra_spec_add_service ()
|
| zebra_spec_add_service zebrasrv 2600/tcp "zebra service" |
zebra_spec_add_service zebrasrv 2600/tcp "zebra service" |
| zebra_spec_add_service zebra 2601/tcp "zebra vty" |
zebra_spec_add_service zebra 2601/tcp "zebra vty" |
| zebra_spec_add_service ripd 2602/tcp "RIPd vty" |
zebra_spec_add_service ripd 2602/tcp "RIPd vty" |
| %if %{with_ipv6} |
|
| zebra_spec_add_service ripngd 2603/tcp "RIPngd vty" |
zebra_spec_add_service ripngd 2603/tcp "RIPngd vty" |
| %endif |
|
| zebra_spec_add_service ospfd 2604/tcp "OSPFd vty" |
zebra_spec_add_service ospfd 2604/tcp "OSPFd vty" |
| zebra_spec_add_service bgpd 2605/tcp "BGPd vty" |
zebra_spec_add_service bgpd 2605/tcp "BGPd vty" |
| %if %{with_ipv6} |
|
| zebra_spec_add_service ospf6d 2606/tcp "OSPF6d vty" |
zebra_spec_add_service ospf6d 2606/tcp "OSPF6d vty" |
| %endif |
|
| %if %{with_ospfapi} |
%if %{with_ospfapi} |
| zebra_spec_add_service ospfapi 2607/tcp "OSPF-API" |
zebra_spec_add_service ospfapi 2607/tcp "OSPF-API" |
| %endif |
%endif |
| %if %{with_isisd} |
%if %{with_isisd} |
| zebra_spec_add_service isisd 2608/tcp "ISISd vty" |
zebra_spec_add_service isisd 2608/tcp "ISISd vty" |
| %endif |
%endif |
| |
%if %{with_pimd} |
| |
zebra_spec_add_service pimd 2611/tcp "PIMd vty" |
| |
%endif |
| |
|
| for daemon in %daemon_list ; do | %if "%{initsystem}" == "systemd" |
| | for daemon in %all_daemons ; do |
| | %systemd_post ${daemon}.service |
| | done |
| | %else |
| | for daemon in %all_daemons ; do |
| /sbin/chkconfig --add ${daemon} |
/sbin/chkconfig --add ${daemon} |
| done |
done |
| |
%endif |
| |
|
| /sbin/install-info %{_infodir}/quagga.info.gz %{_infodir}/dir |
/sbin/install-info %{_infodir}/quagga.info.gz %{_infodir}/dir |
| |
|
| # Create dummy files if they don't exist so basic functions can be used. |
# Create dummy files if they don't exist so basic functions can be used. |
| if [ ! -e %{_sysconfdir}/zebra.conf ]; then |
if [ ! -e %{_sysconfdir}/zebra.conf ]; then |
| echo "hostname `hostname`" > %{_sysconfdir}/zebra.conf |
echo "hostname `hostname`" > %{_sysconfdir}/zebra.conf |
| %if %{quagga_user} | %if 0%{?quagga_user:1} |
| chown %quagga_user:%quagga_user %{_sysconfdir}/zebra.conf | chown %quagga_user:%quagga_user %{_sysconfdir}/zebra.conf* |
| %endif |
%endif |
| chmod 640 %{_sysconfdir}/zebra.conf |
chmod 640 %{_sysconfdir}/zebra.conf |
| fi |
fi |
| |
for daemon in %{all_daemons} ; do |
| |
if [ ! -e %{_sysconfdir}/${daemon}.conf ]; then |
| |
touch %{_sysconfdir}/${daemon}.conf |
| |
%if 0%{?quagga_user:1} |
| |
chown %quagga_user:%quagga_user %{_sysconfdir}/${daemon}.conf* |
| |
%endif |
| |
fi |
| |
done |
| |
%if %{with_watchquagga} |
| |
# No config for watchquagga - this is part of /etc/sysconfig/quagga |
| |
rm -f %{_sysconfdir}/watchquagga.* |
| |
%endif |
| |
|
| if [ ! -e %{_sysconfdir}/vtysh.conf ]; then |
if [ ! -e %{_sysconfdir}/vtysh.conf ]; then |
| touch %{_sysconfdir}/vtysh.conf |
touch %{_sysconfdir}/vtysh.conf |
| chmod 640 %{_sysconfdir}/vtysh.conf |
chmod 640 %{_sysconfdir}/vtysh.conf |
| |
%if 0%{?vty_group:1} |
| |
chown quagga:%{vty_group} %{_sysconfdir}/vtysh.conf* |
| |
%endif |
| fi |
fi |
| |
|
| %postun |
%postun |
| if [ "$1" -ge 1 ]; then |
if [ "$1" -ge 1 ]; then |
| # Find out which daemons need to be restarted. |
# Find out which daemons need to be restarted. |
| for daemon in %all_daemons ; do |
for daemon in %all_daemons ; do |
| if [ -f /var/lock/subsys/$daemon ]; then | if [ -f /var/lock/subsys/${daemon} ]; then |
| eval restart_$daemon=yes | eval restart_${daemon}=yes |
| else |
else |
| eval restart_$daemon=no | eval restart_${daemon}=no |
| fi |
fi |
| done |
done |
| # Rename restart flags for daemons handled specially. |
# Rename restart flags for daemons handled specially. |
| running_zebra="$restart_zebra" |
running_zebra="$restart_zebra" |
| restart_zebra=no |
restart_zebra=no |
| running_watchquagga="$restart_watchquagga" | %if %{with_watchquagga} |
| restart_watchquagga=no | running_watchquagga="$restart_watchquagga" |
| # Stop watchquagga first. | restart_watchquagga=no |
| [ "$running_watchquagga" = yes ] && \ | %endif |
| /etc/rc.d/init.d/watchquagga stop >/dev/null 2>&1 | |
| # Stop all daemons other than zebra and watchquagga. | %if "%{initsystem}" == "systemd" |
| for daemon in %all_daemons ; do | ## |
| eval restart=\$restart_${daemon} | ## Systemd Version |
| [ "$restart" = yes ] && \ | ## |
| /etc/rc.d/init.d/$daemon stop >/dev/null 2>&1 | # No watchquagga for systemd version |
| done | # |
| # Restart zebra. | # Stop all daemons other than zebra. |
| [ "$running_zebra" = yes ] && \ | for daemon in %all_daemons ; do |
| /etc/rc.d/init.d/zebra restart >/dev/null 2>&1 | eval restart=\$restart_${daemon} |
| # Start all daemons other than zebra and watchquagga. | [ "$restart" = yes ] && \ |
| for daemon in %all_daemons ; do | %systemd_postun ${daemon}.service |
| eval restart=\$restart_${daemon} | done |
| [ "$restart" = yes ] && \ | # Restart zebra. |
| /etc/rc.d/init.d/$daemon start >/dev/null 2>&1 | [ "$running_zebra" = yes ] && \ |
| done | %systemd_postun_with_restart $daemon.service |
| # Start watchquagga last. | # Start all daemons other than zebra. |
| # Avoid postun scriptlet error if watchquagga is not running. | for daemon in %all_daemons ; do |
| [ "$running_watchquagga" = yes ] && \ | eval restart=\$restart_${daemon} |
| /etc/rc.d/init.d/watchquagga start >/dev/null 2>&1 || : | [ "$restart" = yes ] && \ |
| | %systemd_post ${daemon}.service |
| | done |
| | %else |
| | ## |
| | ## init.d Version |
| | ## |
| | %if %{with_watchquagga} |
| | # Stop watchquagga first. |
| | [ "$running_watchquagga" = yes ] && \ |
| | /etc/rc.d/init.d/watchquagga stop >/dev/null 2>&1 |
| | %endif |
| | # Stop all daemons other than zebra and watchquagga. |
| | for daemon in %all_daemons ; do |
| | eval restart=\$restart_${daemon} |
| | [ "$restart" = yes ] && \ |
| | /etc/rc.d/init.d/${daemon} stop >/dev/null 2>&1 |
| | done |
| | # Restart zebra. |
| | [ "$running_zebra" = yes ] && \ |
| | /etc/rc.d/init.d/zebra restart >/dev/null 2>&1 |
| | # Start all daemons other than zebra and watchquagga. |
| | for daemon in %all_daemons ; do |
| | eval restart=\$restart_${daemon} |
| | [ "$restart" = yes ] && \ |
| | /etc/rc.d/init.d/${daemon} start >/dev/null 2>&1 |
| | done |
| | %if %{with_watchquagga} |
| | # Start watchquagga last. |
| | # Avoid postun scriptlet error if watchquagga is not running. |
| | [ "$running_watchquagga" = yes ] && \ |
| | /etc/rc.d/init.d/watchquagga start >/dev/null 2>&1 || : |
| | %endif |
| | %endif |
| fi |
fi |
| /sbin/install-info --delete %{_infodir}/quagga.info.gz %{_infodir}/dir |
|
| |
|
| %preun |
%preun |
| if [ "$1" = "0" ]; then | %if "%{initsystem}" == "systemd" |
| for daemon in %all_daemons ; do | ## |
| /etc/rc.d/init.d/${daemon} stop >/dev/null 2>&1 | ## Systemd Version |
| /sbin/chkconfig --del ${daemon} | ## |
| done | if [ "$1" = "0" ]; then |
| /sbin/install-info --delete %{_infodir}/quagga.info.gz %{_infodir}/dir | for daemon in %all_daemons ; do |
| fi | %systemd_preun ${daemon}.service |
| | done |
| | fi |
| | %else |
| | ## |
| | ## init.d Version |
| | ## |
| | if [ "$1" = "0" ]; then |
| | for daemon in %all_daemons ; do |
| | /etc/rc.d/init.d/${daemon} stop >/dev/null 2>&1 |
| | /sbin/chkconfig --del ${daemon} |
| | done |
| | fi |
| | %endif |
| | /sbin/install-info --delete %{_infodir}/quagga.info.gz %{_infodir}/dir |
| |
|
| %clean |
%clean |
| %if !%{keep_build} | %if !0%{?keep_build:1} |
| rm -rf $RPM_BUILD_ROOT | rm -rf %{buildroot} |
| %endif |
%endif |
| |
|
| %files |
%files |
|
Line 383 rm -rf $RPM_BUILD_ROOT
|
Line 493 rm -rf $RPM_BUILD_ROOT
|
| %doc doc/quagga.html |
%doc doc/quagga.html |
| %doc doc/mpls |
%doc doc/mpls |
| %doc ChangeLog INSTALL NEWS README REPORTING-BUGS SERVICES TODO |
%doc ChangeLog INSTALL NEWS README REPORTING-BUGS SERVICES TODO |
| %if %{quagga_user} | %if 0%{?quagga_user:1} |
| %dir %attr(751,%quagga_user,%quagga_user) %{_sysconfdir} |
%dir %attr(751,%quagga_user,%quagga_user) %{_sysconfdir} |
| %dir %attr(750,%quagga_user,%quagga_user) /var/log/quagga |
%dir %attr(750,%quagga_user,%quagga_user) /var/log/quagga |
| %dir %attr(751,%quagga_user,%quagga_user) /var/run/quagga |
%dir %attr(751,%quagga_user,%quagga_user) /var/run/quagga |
| %else |
%else |
| %dir %attr(750,root,root) %{_sysconfdir} |
%dir %attr(750,root,root) %{_sysconfdir} |
| %dir %attr(750,root,root) /var/log/quagga |
%dir %attr(750,root,root) /var/log/quagga |
| %dir %attr(755,root,root) /usr/share/info |
|
| %dir %attr(750,root,root) /var/run/quagga |
%dir %attr(750,root,root) /var/run/quagga |
| %endif |
%endif |
| %if %{vty_group} | %if 0%{?vty_group:1} |
| %attr(750,%quagga_user,%vty_group) %{_sysconfdir}/vtysh.conf.sample |
%attr(750,%quagga_user,%vty_group) %{_sysconfdir}/vtysh.conf.sample |
| %endif |
%endif |
| %{_infodir}/*info* | %{_infodir}/quagga.info.gz |
| %{_mandir}/man*/* |
%{_mandir}/man*/* |
| %{_sbindir}/zebra |
%{_sbindir}/zebra |
| %{_sbindir}/ospfd |
%{_sbindir}/ospfd |
| %{_sbindir}/ripd |
%{_sbindir}/ripd |
| %{_sbindir}/bgpd |
%{_sbindir}/bgpd |
| %{_sbindir}/watchquagga | %if %{with_watchquagga} |
| %if %{with_ipv6} | %{_sbindir}/watchquagga |
| | %endif |
| %{_sbindir}/ripngd |
%{_sbindir}/ripngd |
| %{_sbindir}/ospf6d |
%{_sbindir}/ospf6d |
| |
%if %{with_pimd} |
| |
%{_sbindir}/pimd |
| %endif |
%endif |
| %if %{with_isisd} |
%if %{with_isisd} |
| %{_sbindir}/isisd |
%{_sbindir}/isisd |
| %endif |
%endif |
| %dir %attr(755,root,root) %{_libdir} |
|
| %if %{with_shared} |
%if %{with_shared} |
| %dir %{_libdir} | %attr(755,root,root) %{_libdir}/lib*.so |
| %{_libdir}/lib*.so | %attr(755,root,root) %{_libdir}/lib*.so.* |
| %{_libdir}/lib*.so.* | |
| %endif |
%endif |
| %if %{with_vtysh} |
%if %{with_vtysh} |
| %{_bindir}/* |
%{_bindir}/* |
| %endif |
%endif |
| %config /etc/quagga/[!v]* |
%config /etc/quagga/[!v]* |
| %config /etc/rc.d/init.d/* | %if "%{initsystem}" == "systemd" |
| | %config %{_unitdir}/*.service |
| | %else |
| | %config /etc/rc.d/init.d/zebra |
| | %if %{with_watchquagga} |
| | %config /etc/rc.d/init.d/watchquagga |
| | %endif |
| | %config /etc/rc.d/init.d/ripd |
| | %config /etc/rc.d/init.d/ospfd |
| | %config /etc/rc.d/init.d/bgpd |
| | %config /etc/rc.d/init.d/ripngd |
| | %config /etc/rc.d/init.d/ospf6d |
| | %if %{with_isisd} |
| | %config /etc/rc.d/init.d/isisd |
| | %endif |
| | %if %{with_pimd} |
| | %config /etc/rc.d/init.d/pimd |
| | %endif |
| | %endif |
| %config(noreplace) /etc/sysconfig/quagga |
%config(noreplace) /etc/sysconfig/quagga |
| %config(noreplace) /etc/pam.d/quagga |
%config(noreplace) /etc/pam.d/quagga |
| %config(noreplace) %attr(640,root,root) /etc/logrotate.d/* |
%config(noreplace) %attr(640,root,root) /etc/logrotate.d/* |
|
Line 446 rm -rf $RPM_BUILD_ROOT
|
Line 574 rm -rf $RPM_BUILD_ROOT
|
| %endif |
%endif |
| |
|
| %changelog |
%changelog |
| * Thu Sep 12 2005 Paul Jakma <paul@dishone.st> | * Thu Feb 11 2016 Paul Jakma <paul@jakma.org> - %{version} |
| | - remove with_ipv6 conditionals, always build v6 |
| | - Fix UTF-8 char in spec changelog |
| | - remove quagga.pam.stack, long deprecated. |
| | |
| | * Thu Oct 22 2015 Martin Winter <mwinter@opensourcerouting.org> |
| | - Cleanup configure: remove --enable-ipv6 (default now), --enable-nssa, |
| | --enable-netlink |
| | - Remove support for old fedora 4/5 |
| | - Fix for package nameing |
| | - Fix Weekdays of previous changelogs (bogus dates) |
| | - Add conditional logic to only build tex footnotes with supported texi2html |
| | - Added pimd to files section and fix double listing of /var/lib*/quagga |
| | - Numerous fixes to unify upstart/systemd startup into same spec file |
| | - Only allow use of watchquagga for non-systemd systems. no need with systemd |
| | |
| | * Fri Sep 4 2015 Paul Jakma <paul@jakma.org> |
| | - buildreq updates |
| | - add a default define for with_pimd |
| | |
| | * Mon Sep 12 2005 Paul Jakma <paul@dishone.st> |
| - Steal some changes from Fedora spec file: |
- Steal some changes from Fedora spec file: |
| - Add with_rtadv variable |
- Add with_rtadv variable |
| - Test for groups/users with getent before group/user adding |
- Test for groups/users with getent before group/user adding |
|
Line 499 rm -rf $RPM_BUILD_ROOT
|
Line 647 rm -rf $RPM_BUILD_ROOT
|
| - add user with fixed UID/GID (RH) |
- add user with fixed UID/GID (RH) |
| - create user with shell /sbin/nologin rather than /bin/false (RH) |
- create user with shell /sbin/nologin rather than /bin/false (RH) |
| - stop daemons on uninstall (RH) |
- stop daemons on uninstall (RH) |
| - delete info file on %preun, not %postun to avoid deletion on upgrade. (RH) | - delete info file on preun, not postun to avoid deletion on upgrade. (RH) |
| - isisd added |
- isisd added |
| - cleanup tasks carried out for every daemon |
- cleanup tasks carried out for every daemon |
| |
|
|
Line 511 rm -rf $RPM_BUILD_ROOT
|
Line 659 rm -rf $RPM_BUILD_ROOT
|
| - Renamed to Quagga |
- Renamed to Quagga |
| - Sync to Quagga release 0.96 |
- Sync to Quagga release 0.96 |
| |
|
| * Tue Mar 20 2003 Paul Jakma <paul@dishone.st> | * Thu Mar 20 2003 Paul Jakma <paul@dishone.st> |
| - zebra privileges support |
- zebra privileges support |
| |
|
| * Mon Mar 18 2003 Paul Jakma <paul@dishone.st> | * Tue Mar 18 2003 Paul Jakma <paul@dishone.st> |
| - Fix mem leak in 'show thread cpu' |
- Fix mem leak in 'show thread cpu' |
| - Ralph Keller's OSPF-API |
- Ralph Keller's OSPF-API |
| - Amir: Fix configure.ac for net-snmp |
- Amir: Fix configure.ac for net-snmp |
|
Line 538 rm -rf $RPM_BUILD_ROOT
|
Line 686 rm -rf $RPM_BUILD_ROOT
|
| - Added conditionals for building with(out) IPv6, vtysh, RIP, BGP |
- Added conditionals for building with(out) IPv6, vtysh, RIP, BGP |
| - Fixed up some build requirements (patch) |
- Fixed up some build requirements (patch) |
| - Added conditional build requirements for vtysh / snmp |
- Added conditional build requirements for vtysh / snmp |
| - Added conditional to %files for %_bindir depending on vtysh | - Added conditional to files for _bindir depending on vtysh |
| |
|
| * Mon Nov 11 2002 Paul Jakma <paulj@alphyra.ie> |
* Mon Nov 11 2002 Paul Jakma <paulj@alphyra.ie> |
| - update to latest CVS |
- update to latest CVS |
|
Line 578 rm -rf $RPM_BUILD_ROOT
|
Line 726 rm -rf $RPM_BUILD_ROOT
|
| * Thu Aug 09 2001 Elliot Lee <sopwith@redhat.com> 0.91a-6 |
* Thu Aug 09 2001 Elliot Lee <sopwith@redhat.com> 0.91a-6 |
| - Fix bug #51336 |
- Fix bug #51336 |
| |
|
| * Wed Aug 1 2001 Trond Eivind Glomsrød <teg@redhat.com> 0.91a-5 | * Wed Aug 1 2001 Trond Eivind Glomsrød <teg@redhat.com> 0.91a-5 |
| - Use generic initscript strings instead of initscript specific |
- Use generic initscript strings instead of initscript specific |
| ( "Starting foo: " -> "Starting $prog:" ) |
( "Starting foo: " -> "Starting $prog:" ) |
| |
|