Merge remote-tracking branch 'origin/stable/2.0'

This commit is contained in:
Donald Sharp 2017-01-06 12:48:32 -05:00
commit b89e46b2e2
26 changed files with 214 additions and 213 deletions

View File

@ -1676,7 +1676,7 @@ AC_CONFIG_FILES([Makefile lib/Makefile qpb/Makefile zebra/Makefile ripd/Makefile
cumulus/Makefile cumulus/Makefile
pkgsrc/Makefile pkgsrc/Makefile
fpm/Makefile fpm/Makefile
redhat/quagga.spec redhat/frr.spec
lib/version.h lib/version.h
doc/defines.texi doc/defines.texi
doc/bgpd.8 doc/bgpd.8

View File

@ -1,5 +1,5 @@
sbin_PROGRAMS = ssd sbin_PROGRAMS = ssd
EXTRA_DIST = etc/quagga/debian.conf etc/quagga/daemons etc/default/quagga EXTRA_DIST = etc/frr/debian.conf etc/frr/daemons etc/default/frr
ssd_SOURCES = start-stop-daemon.c ssd_SOURCES = start-stop-daemon.c

2
cumulus/etc/frr/Frr.conf Normal file
View File

@ -0,0 +1,2 @@
log file /var/log/frr/frr.log
log timestamp precision 6

View File

@ -1,25 +1,25 @@
# This file tells the quagga package which daemons to start. # This file tells the frr package which daemons to start.
# #
# Entries are in the format: <daemon>=(yes|no|priority) # Entries are in the format: <daemon>=(yes|no|priority)
# 0, "no" = disabled # 0, "no" = disabled
# 1, "yes" = highest priority # 1, "yes" = highest priority
# 2 .. 10 = lower priorities # 2 .. 10 = lower priorities
# Read /usr/share/doc/quagga/README.Debian for details. # Read /usr/share/doc/frr/README.Debian for details.
# #
# Sample configurations for these daemons can be found in # Sample configurations for these daemons can be found in
# /usr/share/doc/quagga/examples/. # /usr/share/doc/frr/examples/.
# #
# ATTENTION: # ATTENTION:
# #
# When activation a daemon at the first time, a config file, even if it is # When activation a daemon at the first time, a config file, even if it is
# empty, has to be present *and* be owned by the user and group "quagga", else # empty, has to be present *and* be owned by the user and group "frr", else
# the daemon will not be started by /etc/init.d/quagga. The permissions should # the daemon will not be started by /etc/init.d/frr. The permissions should
# be u=rw,g=r,o=. # be u=rw,g=r,o=.
# When using "vtysh" such a config file is also needed. It should be owned by # When using "vtysh" such a config file is also needed. It should be owned by
# group "quaggavty" and set to ug=rw,o= though. Check /etc/pam.d/quagga, too. # group "frrvty" and set to ug=rw,o= though. Check /etc/pam.d/frr, too.
# #
# The watchfrr daemon is always started. Per default in monitoring-only but # The watchfrr daemon is always started. Per default in monitoring-only but
# that can be changed via /etc/quagga/debian.conf. # that can be changed via /etc/frr/debian.conf.
# #
zebra=no zebra=no
bgpd=no bgpd=no

View File

@ -1,7 +1,7 @@
# #
# If this option is set the /etc/init.d/quagga script automatically loads # If this option is set the /etc/init.d/frr script automatically loads
# the config via "vtysh -b" when the servers are started. # the config via "vtysh -b" when the servers are started.
# Check /etc/pam.d/quagga if you intend to use "vtysh"! # Check /etc/pam.d/frr if you intend to use "vtysh"!
# #
vtysh_enable=yes vtysh_enable=yes
zebra_options=" -s 90000000 --daemon -A 127.0.0.1" zebra_options=" -s 90000000 --daemon -A 127.0.0.1"
@ -15,4 +15,4 @@ pimd_options=" --daemon -A 127.0.0.1"
# The list of daemons to watch is automatically generated by the init script. # The list of daemons to watch is automatically generated by the init script.
watchfrr_enable=yes watchfrr_enable=yes
watchfrr_options=(-adz -r /usr/sbin/servicebBquaggabBrestartbB%s -s /usr/sbin/servicebBquaggabBstartbB%s -k /usr/sbin/servicebBquaggabBstopbB%s -b bB -t 30) watchfrr_options=(-adz -r /usr/sbin/servicebBfrrbBrestartbB%s -s /usr/sbin/servicebBfrrbBstartbB%s -k /usr/sbin/servicebBfrrbBstopbB%s -b bB -t 30)

View File

@ -1,2 +0,0 @@
log file /var/log/quagga/quagga.log
log timestamp precision 6

View File

@ -1,7 +1,7 @@
Defaults env_keep += VTYSH_PAGER Defaults env_keep += VTYSH_PAGER
# Allow user in group quagga to run vtysh show commands # Allow user in group frr to run vtysh show commands
# without a password by uncommenting the "%quagga" line below. # without a password by uncommenting the "%frr" line below.
# Subshell commands need to be disallowed, including # Subshell commands need to be disallowed, including
# preventing the user passing command line args like 'start-shell' # preventing the user passing command line args like 'start-shell'
@ -11,5 +11,5 @@ Defaults env_keep += VTYSH_PAGER
# Instead, use NOEXEC, to prevent any exec'ed commands. # Instead, use NOEXEC, to prevent any exec'ed commands.
Cmnd_Alias VTY_SHOW = /usr/bin/vtysh -c show * Cmnd_Alias VTY_SHOW = /usr/bin/vtysh -c show *
# %quagga ALL = (root) NOPASSWD:NOEXEC: VTY_SHOW # %frr ALL = (root) NOPASSWD:NOEXEC: VTY_SHOW

View File

@ -1,8 +1,8 @@
EXTRA_DIST = bgpd.init isisd.init \ EXTRA_DIST = bgpd.init isisd.init \
ospf6d.init ospfd.init ldpd.init \ ospf6d.init ospfd.init ldpd.init \
quagga.logrotate quagga.pam quagga.spec \ frr.logrotate frr.pam frr.spec \
quagga.sysconfig ripd.init ripngd.init \ frr.sysconfig ripd.init ripngd.init \
watchfrr.init pimd.init zebra.init \ watchfrr.init pimd.init zebra.init \
README.rpm_build.md README.rpm_build.md

View File

@ -1,5 +1,5 @@
Building your own Quagga RPM Building your own FreeRangeRouting RPM
============================ ======================================
(Tested on CentOS 6, CentOS 7 and Fedora 22.) (Tested on CentOS 6, CentOS 7 and Fedora 22.)
1. Install the following packages to build the RPMs: 1. Install the following packages to build the RPMs:
@ -10,13 +10,13 @@ Building your own Quagga RPM
(use `dnf install` on new Fedora instead of `yum install `) (use `dnf install` on new Fedora instead of `yum install `)
2. Checkout Quagga under a **unpriviledged** user account 2. Checkout FRR under a **unpriviledged** user account
git clone git://git.savannah.nongnu.org/quagga.git quagga git clone https://github.com/freerangerouting/frr.git frr
3. Run Bootstrap and make distribution tar.gz 3. Run Bootstrap and make distribution tar.gz
cd quagga cd frr
./bootstrap.sh ./bootstrap.sh
./configure --with-pkg-extra-version=-MyRPMVersion ./configure --with-pkg-extra-version=-MyRPMVersion
make dist make dist
@ -31,13 +31,13 @@ Building your own Quagga RPM
mkdir rpmbuild/SOURCES mkdir rpmbuild/SOURCES
mkdir rpmbuild/SPECS mkdir rpmbuild/SPECS
cp redhat/*.spec rpmbuild/SPECS/ cp redhat/*.spec rpmbuild/SPECS/
cp quagga*.tar.gz rpmbuild/SOURCES/ cp frr*.tar.gz rpmbuild/SOURCES/
5. Edit rpm/SPECS/quagga.spec with configuration as needed 5. Edit rpm/SPECS/frr.spec with configuration as needed
Look at the beginning of the file and adjust the following parameters to enable Look at the beginning of the file and adjust the following parameters to enable
or disable features as required: or disable features as required:
################# Quagga configure options #################### ################# frr configure options ####################
# with-feature options # with-feature options
%{!?with_snmp: %global with_snmp 1 } %{!?with_snmp: %global with_snmp 1 }
%{!?with_vtysh: %global with_vtysh 1 } %{!?with_vtysh: %global with_vtysh 1 }
@ -56,14 +56,14 @@ Building your own Quagga RPM
%{!?with_ldpd: %global with_ldpd 0 } %{!?with_ldpd: %global with_ldpd 0 }
%{!?with_shared: %global with_shared 1 } %{!?with_shared: %global with_shared 1 }
%{!?with_multipath: %global with_multipath 64 } %{!?with_multipath: %global with_multipath 64 }
%{!?quagga_user: %global quagga_user quagga } %{!?frr_user: %global frr_user frr }
%{!?vty_group: %global vty_group quaggavt } %{!?vty_group: %global vty_group frrvt }
%{!?with_fpm: %global with_fpm 0 } %{!?with_fpm: %global with_fpm 0 }
%{!?with_watchfrr: %global with_watchfrr 1 } %{!?with_watchfrr: %global with_watchfrr 1 }
6. Build the RPM 6. Build the RPM
rpmbuild --define "_topdir `pwd`/rpmbuild" -ba rpmbuild/SPECS/quagga.spec rpmbuild --define "_topdir `pwd`/rpmbuild" -ba rpmbuild/SPECS/frr.spec
DONE. DONE.
@ -84,7 +84,7 @@ Enabling daemons after installation of the package:
chkconfig bgpd on chkconfig bgpd on
... etc ... etc
2. If you want to run `watchfrr`, then configure `/etc/sysconfig/quagga` 2. If you want to run `watchfrr`, then configure `/etc/sysconfig/frr`
and uncomment the line with the daemons for `watchfrr` to monitor, and uncomment the line with the daemons for `watchfrr` to monitor,
then enable watchfrr then enable watchfrr
@ -100,7 +100,7 @@ allowed.
service ospfd start service ospfd start
... etc ... etc
Configuration is stored in `/etc/quagga/*.conf` files. Configuration is stored in `/etc/frr/*.conf` files.
### systemd based systems (ie CentOS 7, Fedora 22) ### systemd based systems (ie CentOS 7, Fedora 22)
@ -126,5 +126,5 @@ allowed.
systemctl start ospfd systemctl start ospfd
... etc ... etc
Configuration is stored in `/etc/quagga/*.conf` files. Configuration is stored in `/etc/frr/*.conf` files.

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# chkconfig: - 16 84 # chkconfig: - 16 84
# config: /etc/quagga/bgpd.conf # config: /etc/frr/bgpd.conf
### BEGIN INIT INFO ### BEGIN INIT INFO
# Provides: bgpd # Provides: bgpd
@ -14,14 +14,14 @@
# Get network config # Get network config
. /etc/sysconfig/network . /etc/sysconfig/network
# quagga command line options # frr command line options
. /etc/sysconfig/quagga . /etc/sysconfig/frr
RETVAL=0 RETVAL=0
PROG="bgpd" PROG="bgpd"
cmd=bgpd cmd=bgpd
LOCK_FILE=/var/lock/subsys/bgpd LOCK_FILE=/var/lock/subsys/bgpd
CONF_FILE=/etc/quagga/bgpd.conf CONF_FILE=/etc/frr/bgpd.conf
case "$1" in case "$1" in
start) start)

63
redhat/frr.logrotate Normal file
View File

@ -0,0 +1,63 @@
/var/log/frr/zebra.log {
notifempty
missingok
postrotate
/bin/kill -USR1 `cat /var/run/frr/zebra.pid 2> /dev/null` 2> /dev/null || true
endscript
}
/var/log/frr/bgpd.log {
notifempty
missingok
postrotate
/bin/kill -USR1 `cat /var/run/frr/bgpd.pid 2> /dev/null` 2> /dev/null || true
endscript
}
/var/log/frr/isisd.log {
notifempty
missingok
postrotate
/bin/kill -USR1 `cat /var/run/frr/isisd.pid 2> /dev/null` 2> /dev/null || true
endscript
}
/var/log/frr/ospfd.log {
notifempty
missingok
postrotate
/bin/kill -USR1 `cat /var/run/frr/ospfd.pid 2> /dev/null` 2> /dev/null || true
endscript
}
/var/log/frr/ospf6d.log {
notifempty
missingok
postrotate
/bin/kill -USR1 `cat /var/run/frr/ospf6d.pid 2> /dev/null` 2> /dev/null || true
endscript
}
/var/log/frr/ripd.log {
notifempty
missingok
postrotate
/bin/kill -USR1 `cat /var/run/frr/ripd.pid 2> /dev/null` 2> /dev/null || true
endscript
}
/var/log/frr/ripngd.log {
notifempty
missingok
postrotate
/bin/kill -USR1 `cat /var/run/frr/ripngd.pid 2> /dev/null` 2> /dev/null || true
endscript
}
/var/log/frr/ldpd.log {
notifempty
missingok
postrotate
/bin/kill -USR1 `cat /var/run/frr/ldpd.pid 2> /dev/null` 2> /dev/null || true
endscript
}

View File

@ -1,7 +1,7 @@
#%PAM-1.0 #%PAM-1.0
# #
##### if running quagga as root: ##### if running frr as root:
# Only allow root (and possibly wheel) to use this because enable access # Only allow root (and possibly wheel) to use this because enable access
# is unrestricted. # is unrestricted.
auth sufficient pam_rootok.so auth sufficient pam_rootok.so
@ -12,7 +12,7 @@ auth sufficient pam_rootok.so
#auth required pam_wheel.so use_uid #auth required pam_wheel.so use_uid
########################################################### ###########################################################
# If using quagga privileges and with a seperate group for vty access, then # If using frr privileges and with a seperate group for vty access, then
# access can be controlled via the vty access group, and pam can simply # access can be controlled via the vty access group, and pam can simply
# check for valid user/password, eg: # check for valid user/password, eg:
# #

View File

@ -8,7 +8,7 @@
# rpms again and again on the same day, so the newer rpms can be installed. # rpms again and again on the same day, so the newer rpms can be installed.
# bumping the number each time. # bumping the number each time.
####################### Quagga configure options ######################### ####################### FreeRangeRouting (FRR) configure options #########################
# with-feature options # with-feature options
%{!?with_tcp_zebra: %global with_tcp_zebra 0 } %{!?with_tcp_zebra: %global with_tcp_zebra 0 }
%{!?with_pam: %global with_pam 0 } %{!?with_pam: %global with_pam 0 }
@ -20,29 +20,29 @@
%{!?with_ldpd: %global with_ldpd 0 } %{!?with_ldpd: %global with_ldpd 0 }
%{!?with_shared: %global with_shared 1 } %{!?with_shared: %global with_shared 1 }
%{!?with_multipath: %global with_multipath 256 } %{!?with_multipath: %global with_multipath 256 }
%{!?quagga_user: %global quagga_user quagga } %{!?frr_user: %global frr_user frr }
%{!?vty_group: %global vty_group quaggavty } %{!?vty_group: %global vty_group frrvty }
%{!?with_fpm: %global with_fpm 0 } %{!?with_fpm: %global with_fpm 0 }
%{!?with_watchfrr: %global with_watchfrr 1 } %{!?with_watchfrr: %global with_watchfrr 1 }
%{!?with_bgp_vnc: %global with_bgp_vnc 0 } %{!?with_bgp_vnc: %global with_bgp_vnc 0 }
# path defines # path defines
%define _sysconfdir /etc/quagga %define _sysconfdir /etc/frr
%define _sbindir /usr/lib/quagga %define _sbindir /usr/lib/frr
%define zeb_src %{_builddir}/%{name}-%{quaggaversion} %define zeb_src %{_builddir}/%{name}-%{frrversion}
%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
%define quagga_tools %{zeb_src}/tools %define frr_tools %{zeb_src}/tools
%define cumulus_dir %{zeb_src}/cumulus/etc %define cumulus_dir %{zeb_src}/cumulus/etc
# defines for configure # defines for configure
%define _localstatedir /var/run/quagga %define _localstatedir /var/run/frr
############################################################################ ############################################################################
#### Version String tweak #### Version String tweak
# Remove invalid characters form version string and replace with _ # Remove invalid characters form version string and replace with _
%{expand: %%global rpmversion %(echo '@VERSION@' | tr [:blank:]- _ )} %{expand: %%global rpmversion %(echo '@VERSION@' | tr [:blank:]- _ )}
%define quaggaversion @VERSION@ %define frrversion @VERSION@
#### Check version of texi2html #### Check version of texi2html
# Old versions don't support "--number-footnotes" option. # Old versions don't support "--number-footnotes" option.
@ -68,8 +68,8 @@
%endif %endif
# misc internal defines # misc internal defines
%{!?quagga_uid: %global quagga_uid 92 } %{!?frr_uid: %global frr_uid 92 }
%{!?quagga_gid: %global quagga_gid 92 } %{!?frr_gid: %global frr_gid 92 }
%{!?vty_gid: %global vty_gid 85 } %{!?vty_gid: %global vty_gid 85 }
%define daemon_list zebra ripd ospfd bgpd isisd pimd ripngd ospfd6d %define daemon_list zebra ripd ospfd bgpd isisd pimd ripngd ospfd6d
@ -95,19 +95,20 @@
%{!?release_rev: %global release_rev 01 } %{!?release_rev: %global release_rev 01 }
Summary: Routing daemon Summary: Routing daemon
Name: quagga Name: frr
Version: %{rpmversion} Version: %{rpmversion}
Release: @CONFDATE@%{release_rev}%{?dist} Release: @CONFDATE@%{release_rev}%{?dist}
License: GPLv2+ License: GPLv2+
Group: System Environment/Daemons Group: System Environment/Daemons
Source0: http://download.savannah.gnu.org/releases/quagga/%{name}-%{quaggaversion}.tar.gz Source0: http://www.freerangerouting.org/releases/frr/%{name}-%{frrversion}.tar.gz
URL: http://www.quagga.net URL: http://www.freerangerouting.org
Requires: ncurses Requires: ncurses json-c
Requires(pre): /sbin/install-info Requires(pre): /sbin/install-info
Requires(preun): /sbin/install-info Requires(preun): /sbin/install-info
Requires(post): /sbin/install-info Requires(post): /sbin/install-info
BuildRequires: texi2html texinfo autoconf patch libcap-devel groff BuildRequires: texi2html texinfo autoconf patch libcap-devel groff
BuildRequires: readline readline-devel ncurses ncurses-devel BuildRequires: readline readline-devel ncurses ncurses-devel
BuildRequires: json-c-devel bison flex
Requires: ncurses initscripts Requires: ncurses initscripts
%if %{with_pam} %if %{with_pam}
BuildRequires: pam-devel BuildRequires: pam-devel
@ -124,39 +125,36 @@ Requires(pre): initscripts >= 5.60
%endif %endif
Provides: routingdaemon = %{version}-%{release} Provides: routingdaemon = %{version}-%{release}
BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRoot: %{_tmppath}/%{name}-%{version}-root
Obsoletes: bird gated mrt zebra quagga-sysvinit Obsoletes: bird gated mrt zebra frr-sysvinit
%description %description
Quagga is a free software that manages TCP/IP based routing FreeRangeRouting 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, OSPFv2, OSPFv3, ISIS, RIP, RIPng and PIM. FreeRangeRouting supports BGP4, OSPFv2, OSPFv3, ISIS, RIP, RIPng, PIM
and LDP
Quagga is intended to be used as a Route Server and a Route Reflector. It is FreeRangeRouting is a fork of Quagga.
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 %package contrib
Summary: contrib tools for quagga Summary: contrib tools for frr
Group: System Environment/Daemons Group: System Environment/Daemons
%description contrib %description contrib
Contributed/3rd party tools which may be of use with quagga. Contributed/3rd party tools which may be of use with frr.
%package devel %package devel
Summary: Header and object files for quagga development Summary: Header and object files for frr development
Group: System Environment/Daemons Group: System Environment/Daemons
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
%description devel %description devel
The quagga-devel package contains the header and object files neccessary for The frr-devel package contains the header and object files neccessary for
developing OSPF-API and quagga applications. developing OSPF-API and frr applications.
%prep %prep
%setup -q -n quagga-%{quaggaversion} %setup -q -n frr-%{frrversion}
%build %build
@ -220,9 +218,9 @@ developing OSPF-API and quagga applications.
%if %{with_pam} %if %{with_pam}
--with-libpam \ --with-libpam \
%endif %endif
%if 0%{?quagga_user:1} %if 0%{?frr_user:1}
--enable-user=%quagga_user \ --enable-user=%frr_user \
--enable-group=%quagga_user \ --enable-group=%frr_user \
%endif %endif
%if 0%{?vty_group:1} %if 0%{?vty_group:1}
--enable-vty-group=%vty_group \ --enable-vty-group=%vty_group \
@ -251,15 +249,15 @@ make %{?_smp_mflags} MAKEINFO="makeinfo --no-split"
pushd doc pushd doc
%if %{texi2htmlversion} < 5 %if %{texi2htmlversion} < 5
texi2html --number-sections quagga.texi texi2html --number-sections frr.texi
%else %else
texi2html --number-footnotes --number-sections quagga.texi texi2html --number-footnotes --number-sections frr.texi
%endif %endif
popd popd
%install %install
mkdir -p %{buildroot}/etc/{quagga,sysconfig,logrotate.d,pam.d,default} \ mkdir -p %{buildroot}/etc/{frr,sysconfig,logrotate.d,pam.d,default} \
%{buildroot}/var/log/quagga %{buildroot}%{_infodir} %{buildroot}/var/log/frr %{buildroot}%{_infodir}
make DESTDIR=%{buildroot} INSTALL="install -p" CP="cp -p" install make DESTDIR=%{buildroot} INSTALL="install -p" CP="cp -p" install
# 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
@ -269,7 +267,7 @@ rm -rf %{buildroot}/usr/share/info/dir
# install /etc sources # install /etc sources
%if "%{initsystem}" == "systemd" %if "%{initsystem}" == "systemd"
mkdir -p %{buildroot}%{_unitdir} mkdir -p %{buildroot}%{_unitdir}
install %{quagga_tools}/frr.service \ install %{frr_tools}/frr.service \
%{buildroot}%{_unitdir}/frr.service %{buildroot}%{_unitdir}/frr.service
%else %else
mkdir -p %{buildroot}/etc/rc.d/init.d mkdir -p %{buildroot}/etc/rc.d/init.d
@ -281,14 +279,14 @@ for daemon in %{all_daemons} ; do
done done
%endif %endif
install %{cumulus_dir}/quagga/debian.conf %{buildroot}/etc/quagga install %{cumulus_dir}/frr/debian.conf %{buildroot}/etc/frr
install %{cumulus_dir}/quagga/daemons %{buildroot}/etc/quagga install %{cumulus_dir}/frr/daemons %{buildroot}/etc/frr
install -m644 %{cumulus_dir}/default/quagga %{buildroot}/etc/default install -m644 %{cumulus_dir}/default/frr %{buildroot}/etc/default
install -m644 %{zeb_rh_src}/quagga.pam \ install -m644 %{zeb_rh_src}/frr.pam \
%{buildroot}/etc/pam.d/quagga %{buildroot}/etc/pam.d/frr
install -m644 %{zeb_rh_src}/quagga.logrotate \ install -m644 %{zeb_rh_src}/frr.logrotate \
%{buildroot}/etc/logrotate.d/quagga %{buildroot}/etc/logrotate.d/frr
install -d -m750 %{buildroot}/var/run/quagga install -d -m750 %{buildroot}/var/run/frr
%pre %pre
# add vty_group # add vty_group
@ -297,19 +295,19 @@ if getent group %vty_group > /dev/null ; then : ; else \
/usr/sbin/groupadd -r -g %vty_gid %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 frr user and group
%if 0%{?quagga_user:1} %if 0%{?frr_user:1}
# Ensure that quagga_gid gets correctly allocated # Ensure that frr_gid gets correctly allocated
if getent group %quagga_user >/dev/null; then : ; else \ if getent group %frr_user >/dev/null; then : ; else \
/usr/sbin/groupadd -g %quagga_gid %quagga_user > /dev/null || : ; \ /usr/sbin/groupadd -g %frr_gid %frr_user > /dev/null || : ; \
fi fi
if getent passwd %quagga_user >/dev/null ; then : ; else \ if getent passwd %frr_user >/dev/null ; then : ; else \
/usr/sbin/useradd -u %quagga_uid -g %quagga_gid \ /usr/sbin/useradd -u %frr_uid -g %frr_gid \
-M -r -s /sbin/nologin -c "Quagga routing suite" \ -M -r -s /sbin/nologin -c "FreeRangeRouting suite" \
-d %_localstatedir %quagga_user 2> /dev/null || : ; \ -d %_localstatedir %frr_user 2> /dev/null || : ; \
fi fi
%if 0%{?vty_group:1} %if 0%{?vty_group:1}
/usr/sbin/usermod -a -G %vty_group %quagga_user /usr/sbin/usermod -a -G %vty_group %frr_user
%endif %endif
%endif %endif
@ -353,26 +351,26 @@ for daemon in %all_daemons ; do
done done
%endif %endif
/sbin/install-info %{_infodir}/quagga.info.gz %{_infodir}/dir /sbin/install-info %{_infodir}/frr.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 0%{?quagga_user:1} %if 0%{?frr_user:1}
chown %quagga_user:%quagga_user %{_sysconfdir}/zebra.conf* chown %frr_user:%frr_user %{_sysconfdir}/zebra.conf*
%endif %endif
chmod 640 %{_sysconfdir}/zebra.conf chmod 640 %{_sysconfdir}/zebra.conf
fi fi
for daemon in %{all_daemons} ; do for daemon in %{all_daemons} ; do
if [ ! -e %{_sysconfdir}/${daemon}.conf ]; then if [ ! -e %{_sysconfdir}/${daemon}.conf ]; then
touch %{_sysconfdir}/${daemon}.conf touch %{_sysconfdir}/${daemon}.conf
%if 0%{?quagga_user:1} %if 0%{?frr_user:1}
chown %quagga_user:%quagga_user %{_sysconfdir}/${daemon}.conf* chown %frr_user:%frr_user %{_sysconfdir}/${daemon}.conf*
%endif %endif
fi fi
done done
%if %{with_watchfrr} %if %{with_watchfrr}
# No config for watchfrr - this is part of /etc/sysconfig/quagga # No config for watchfrr - this is part of /etc/sysconfig/frr
rm -f %{_sysconfdir}/watchfrr.* rm -f %{_sysconfdir}/watchfrr.*
%endif %endif
@ -380,7 +378,7 @@ 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} %if 0%{?vty_group:1}
chown quagga:%{vty_group} %{_sysconfdir}/vtysh.conf* chown frr:%{vty_group} %{_sysconfdir}/vtysh.conf*
%endif %endif
fi fi
@ -477,7 +475,7 @@ fi
done done
fi fi
%endif %endif
/sbin/install-info --delete %{_infodir}/quagga.info.gz %{_infodir}/dir /sbin/install-info --delete %{_infodir}/frr.info.gz %{_infodir}/dir
%clean %clean
%if !0%{?keep_build:1} %if !0%{?keep_build:1}
@ -487,29 +485,29 @@ rm -rf %{buildroot}
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%doc */*.sample* AUTHORS COPYING %doc */*.sample* AUTHORS COPYING
%doc doc/quagga.html %doc doc/frr.html
%doc doc/mpls %doc doc/mpls
%doc ChangeLog INSTALL NEWS README REPORTING-BUGS SERVICES %doc ChangeLog INSTALL NEWS README REPORTING-BUGS SERVICES
%if 0%{?quagga_user:1} %if 0%{?frr_user:1}
%dir %attr(751,%quagga_user,%quagga_user) %{_sysconfdir} %dir %attr(751,%frr_user,%frr_user) %{_sysconfdir}
%dir %attr(750,%quagga_user,%quagga_user) /var/log/quagga %dir %attr(750,%frr_user,%frr_user) /var/log/frr
%dir %attr(751,%quagga_user,%quagga_user) /var/run/quagga %dir %attr(751,%frr_user,%frr_user) /var/run/frr
%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/frr
%dir %attr(750,root,root) /var/run/quagga %dir %attr(750,root,root) /var/run/frr
%endif %endif
%if 0%{?vty_group:1} %if 0%{?vty_group:1}
%attr(750,%quagga_user,%vty_group) %{_sysconfdir}/vtysh.conf.sample %attr(750,%frr_user,%vty_group) %{_sysconfdir}/vtysh.conf.sample
%endif %endif
%{_infodir}/quagga.info.gz %{_infodir}/frr.info.gz
%{_mandir}/man*/* %{_mandir}/man*/*
%{_sbindir}/zebra %{_sbindir}/zebra
%{_sbindir}/ospfd %{_sbindir}/ospfd
%{_sbindir}/ripd %{_sbindir}/ripd
%{_sbindir}/bgpd %{_sbindir}/bgpd
%{_sbindir}/ssd %{_sbindir}/ssd
%{_sbindir}/quagga %{_sbindir}/frr
%{_sbindir}/frr-reload.py %{_sbindir}/frr-reload.py
%{_sbindir}/frr-reload.pyc %{_sbindir}/frr-reload.pyc
%{_sbindir}/frr-reload.pyo %{_sbindir}/frr-reload.pyo
@ -528,7 +526,7 @@ rm -rf %{buildroot}
%attr(755,root,root) %{_libdir}/lib*.so.* %attr(755,root,root) %{_libdir}/lib*.so.*
%endif %endif
%{_bindir}/* %{_bindir}/*
%config /etc/quagga/[!v]* %config /etc/frr/[!v]*
%if "%{initsystem}" == "systemd" %if "%{initsystem}" == "systemd"
%config %{_unitdir}/frr.service %config %{_unitdir}/frr.service
%else %else
@ -547,8 +545,8 @@ rm -rf %{buildroot}
%config /etc/rc.d/init.d/ldpd %config /etc/rc.d/init.d/ldpd
%endif %endif
%endif %endif
%config(noreplace) /etc/default/quagga %config(noreplace) /etc/default/frr
%config(noreplace) /etc/pam.d/quagga %config(noreplace) /etc/pam.d/frr
%config(noreplace) %attr(640,root,root) /etc/logrotate.d/* %config(noreplace) %attr(640,root,root) /etc/logrotate.d/*
%files contrib %files contrib
@ -572,6 +570,9 @@ rm -rf %{buildroot}
%endif %endif
%changelog %changelog
* Fri Jan 6 2017 Martin Winter <mwinter@opensourcerouting.org>
- Renamed to frr for FreeRangeRouting fork of Quagga
* Thu Feb 11 2016 Paul Jakma <paul@jakma.org> - %{version} * Thu Feb 11 2016 Paul Jakma <paul@jakma.org> - %{version}
- remove with_ipv6 conditionals, always build v6 - remove with_ipv6 conditionals, always build v6
- Fix UTF-8 char in spec changelog - Fix UTF-8 char in spec changelog

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# chkconfig: - 16 84 # chkconfig: - 16 84
# config: /etc/quagga/isisd.conf # config: /etc/frr/isisd.conf
### BEGIN INIT INFO ### BEGIN INIT INFO
# Provides: isisd # Provides: isisd
@ -14,14 +14,14 @@
# Get network config # Get network config
. /etc/sysconfig/network . /etc/sysconfig/network
# quagga command line options # frr command line options
. /etc/sysconfig/quagga . /etc/sysconfig/frr
RETVAL=0 RETVAL=0
PROG="isisd" PROG="isisd"
cmd=isisd cmd=isisd
LOCK_FILE=/var/lock/subsys/isisd LOCK_FILE=/var/lock/subsys/isisd
CONF_FILE=/etc/quagga/isisd.conf CONF_FILE=/etc/frr/isisd.conf
case "$1" in case "$1" in
start) start)

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# chkconfig: - 16 84 # chkconfig: - 16 84
# config: /etc/quagga/ldpd.conf # config: /etc/frr/ldpd.conf
### BEGIN INIT INFO ### BEGIN INIT INFO
# Provides: ldpd # Provides: ldpd
@ -14,14 +14,14 @@
# Get network config # Get network config
. /etc/sysconfig/network . /etc/sysconfig/network
# quagga command line options # frr command line options
. /etc/sysconfig/quagga . /etc/sysconfig/frr
RETVAL=0 RETVAL=0
PROG="ldpd" PROG="ldpd"
cmd=ldpd cmd=ldpd
LOCK_FILE=/var/lock/subsys/ldpd LOCK_FILE=/var/lock/subsys/ldpd
CONF_FILE=/etc/quagga/ldpd.conf CONF_FILE=/etc/frr/ldpd.conf
case "$1" in case "$1" in
start) start)

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# chkconfig: - 16 84 # chkconfig: - 16 84
# config: /etc/quagga/ospf6d.conf # config: /etc/frr/ospf6d.conf
### BEGIN INIT INFO ### BEGIN INIT INFO
# Provides: ospf6d # Provides: ospf6d
@ -14,14 +14,14 @@
# Get network config # Get network config
. /etc/sysconfig/network . /etc/sysconfig/network
# quagga command line options # frr command line options
. /etc/sysconfig/quagga . /etc/sysconfig/frr
RETVAL=0 RETVAL=0
PROG="ospf6d" PROG="ospf6d"
cmd=ospf6d cmd=ospf6d
LOCK_FILE=/var/lock/subsys/ospf6d LOCK_FILE=/var/lock/subsys/ospf6d
CONF_FILE=/etc/quagga/ospf6d.conf CONF_FILE=/etc/frr/ospf6d.conf
case "$1" in case "$1" in
start) start)

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# chkconfig: - 16 84 # chkconfig: - 16 84
# config: /etc/quagga/ospfd.conf # config: /etc/frr/ospfd.conf
### BEGIN INIT INFO ### BEGIN INIT INFO
# Provides: ospfd # Provides: ospfd
@ -14,14 +14,14 @@
# Get network config # Get network config
. /etc/sysconfig/network . /etc/sysconfig/network
# quagga command line options # frr command line options
. /etc/sysconfig/quagga . /etc/sysconfig/frr
RETVAL=0 RETVAL=0
PROG="ospfd" PROG="ospfd"
cmd=ospfd cmd=ospfd
LOCK_FILE=/var/lock/subsys/ospfd LOCK_FILE=/var/lock/subsys/ospfd
CONF_FILE=/etc/quagga/ospfd.conf CONF_FILE=/etc/frr/ospfd.conf
case "$1" in case "$1" in
start) start)

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# chkconfig: - 16 84 # chkconfig: - 16 84
# config: /etc/quagga/pimd.conf # config: /etc/frr/pimd.conf
### BEGIN INIT INFO ### BEGIN INIT INFO
# Provides: pimd # Provides: pimd
@ -14,14 +14,14 @@
# Get network config # Get network config
. /etc/sysconfig/network . /etc/sysconfig/network
# quagga command line options # frr command line options
. /etc/sysconfig/quagga . /etc/sysconfig/frr
RETVAL=0 RETVAL=0
PROG="pimd" PROG="pimd"
cmd=pimd cmd=pimd
LOCK_FILE=/var/lock/subsys/pimd LOCK_FILE=/var/lock/subsys/pimd
CONF_FILE=/etc/quagga/pimd.conf CONF_FILE=/etc/frr/pimd.conf
case "$1" in case "$1" in
start) start)

View File

@ -1,63 +0,0 @@
/var/log/quagga/zebra.log {
notifempty
missingok
postrotate
/bin/kill -USR1 `cat /var/run/quagga/zebra.pid 2> /dev/null` 2> /dev/null || true
endscript
}
/var/log/quagga/bgpd.log {
notifempty
missingok
postrotate
/bin/kill -USR1 `cat /var/run/quagga/bgpd.pid 2> /dev/null` 2> /dev/null || true
endscript
}
/var/log/quagga/isisd.log {
notifempty
missingok
postrotate
/bin/kill -USR1 `cat /var/run/quagga/isisd.pid 2> /dev/null` 2> /dev/null || true
endscript
}
/var/log/quagga/ospfd.log {
notifempty
missingok
postrotate
/bin/kill -USR1 `cat /var/run/quagga/ospfd.pid 2> /dev/null` 2> /dev/null || true
endscript
}
/var/log/quagga/ospf6d.log {
notifempty
missingok
postrotate
/bin/kill -USR1 `cat /var/run/quagga/ospf6d.pid 2> /dev/null` 2> /dev/null || true
endscript
}
/var/log/quagga/ripd.log {
notifempty
missingok
postrotate
/bin/kill -USR1 `cat /var/run/quagga/ripd.pid 2> /dev/null` 2> /dev/null || true
endscript
}
/var/log/quagga/ripngd.log {
notifempty
missingok
postrotate
/bin/kill -USR1 `cat /var/run/quagga/ripngd.pid 2> /dev/null` 2> /dev/null || true
endscript
}
/var/log/quagga/ldpd.log {
notifempty
missingok
postrotate
/bin/kill -USR1 `cat /var/run/quagga/ldpd.pid 2> /dev/null` 2> /dev/null || true
endscript
}

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# chkconfig: - 16 84 # chkconfig: - 16 84
# config: /etc/quagga/ripd.conf # config: /etc/frr/ripd.conf
### BEGIN INIT INFO ### BEGIN INIT INFO
# Provides: ripd # Provides: ripd
@ -14,14 +14,14 @@
# Get network config # Get network config
. /etc/sysconfig/network . /etc/sysconfig/network
# quagga command line options # frr command line options
. /etc/sysconfig/quagga . /etc/sysconfig/frr
RETVAL=0 RETVAL=0
PROG="ripd" PROG="ripd"
cmd=ripd cmd=ripd
LOCK_FILE=/var/lock/subsys/ripd LOCK_FILE=/var/lock/subsys/ripd
CONF_FILE=/etc/quagga/ripd.conf CONF_FILE=/etc/frr/ripd.conf
case "$1" in case "$1" in
start) start)

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# chkconfig: - 16 84 # chkconfig: - 16 84
# config: /etc/quagga/ripngd.conf # config: /etc/frr/ripngd.conf
### BEGIN INIT INFO ### BEGIN INIT INFO
# Provides: ripngd # Provides: ripngd
@ -14,14 +14,14 @@
# Get network config # Get network config
. /etc/sysconfig/network . /etc/sysconfig/network
# quagga command line options # frr command line options
. /etc/sysconfig/quagga . /etc/sysconfig/frr
RETVAL=0 RETVAL=0
PROG="ripngd" PROG="ripngd"
cmd=ripngd cmd=ripngd
LOCK_FILE=/var/lock/subsys/ripngd LOCK_FILE=/var/lock/subsys/ripngd
CONF_FILE=/etc/quagga/ripngd.conf CONF_FILE=/etc/frr/ripngd.conf
case "$1" in case "$1" in
start) start)

View File

@ -14,7 +14,7 @@
. /etc/sysconfig/network . /etc/sysconfig/network
# frr command line options # frr command line options
. /etc/sysconfig/quagga . /etc/sysconfig/frr
RETVAL=0 RETVAL=0
PROG="watchfrr" PROG="watchfrr"

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# chkconfig: - 15 85 # chkconfig: - 15 85
# config: /etc/quagga/zebra.conf # config: /etc/frr/zebra.conf
### BEGIN INIT INFO ### BEGIN INIT INFO
# Provides: zebra # Provides: zebra
@ -14,14 +14,14 @@
# Get network config # Get network config
. /etc/sysconfig/network . /etc/sysconfig/network
# quagga command line options # frr command line options
. /etc/sysconfig/quagga . /etc/sysconfig/frr
RETVAL=0 RETVAL=0
PROG="zebra" PROG="zebra"
cmd=zebra cmd=zebra
LOCK_FILE=/var/lock/subsys/zebra LOCK_FILE=/var/lock/subsys/zebra
CONF_FILE=/etc/quagga/zebra.conf CONF_FILE=/etc/frr/zebra.conf
case "$1" in case "$1" in
start) start)