]> git.proxmox.com Git - mirror_frr.git/blame - redhat/frr.spec.in
redhat: Fix previously added centos6/redhat6 check
[mirror_frr.git] / redhat / frr.spec.in
CommitLineData
edd7c245 1# configure options
b64d92a8 2#
3# Some can be overriden on rpmbuild commandline with:
4# rpmbuild --define 'variable value'
f755bf6d 5# (use any value, ie 1 for flag "with_XXXX" definitions)
b64d92a8 6#
30da4585
PJ
7# E.g. rpmbuild --define 'release_rev 02' may be useful if building
8# rpms again and again on the same day, so the newer rpms can be installed.
9# bumping the number each time.
b64d92a8 10
447a8fe9 11####################### FRRouting (FRR) configure options #########################
1189075b 12# with-feature options
192c13ac
MW
13%{!?with_tcp_zebra: %global with_tcp_zebra 0 }
14%{!?with_pam: %global with_pam 0 }
15%{!?with_ospfclient: %global with_ospfclient 1 }
16%{!?with_ospfapi: %global with_ospfapi 1 }
17%{!?with_irdp: %global with_irdp 1 }
18%{!?with_rtadv: %global with_rtadv 1 }
19%{!?with_mpls: %global with_mpls 0 }
20%{!?with_ldpd: %global with_ldpd 0 }
21%{!?with_nhrpd: %global with_nhrpd 1 }
22%{!?with_shared: %global with_shared 1 }
23%{!?with_multipath: %global with_multipath 256 }
24%{!?frr_user: %global frr_user frr }
25%{!?vty_group: %global vty_group frrvty }
26%{!?with_fpm: %global with_fpm 0 }
27%{!?with_watchfrr: %global with_watchfrr 1 }
28%{!?with_bgp_vnc: %global with_bgp_vnc 0 }
63ef966e 29%{!?with_pimd: %global with_pimd 1 }
30b9d89b 30
31# path defines
192c13ac
MW
32%define _sysconfdir /etc/frr
33%define _sbindir /usr/lib/frr
34%define zeb_src %{_builddir}/%{name}-%{frrversion}
35%define zeb_rh_src %{zeb_src}/redhat
36%define zeb_docs %{zeb_src}/doc
37%define frr_tools %{zeb_src}/tools
38%define cumulus_dir %{zeb_src}/cumulus/etc
788cdc6d 39
e0626854 40# defines for configure
192c13ac 41%define _localstatedir /var/run/frr
1189075b 42############################################################################
43
f755bf6d
MW
44#### Version String tweak
45# Remove invalid characters form version string and replace with _
d4fbc1de 46%{expand: %%global rpmversion %(echo '@VERSION@' | tr [:blank:]- _ )}
c115e4a4 47%define frrversion @VERSION@
1189075b 48
f755bf6d
MW
49#### Check version of texi2html
50# Old versions don't support "--number-footnotes" option.
d4fbc1de 51%{expand: %%global texi2htmlversion %(/usr/bin/texi2html --version | cut -d. -f1)}
1189075b 52
f755bf6d
MW
53#### Check for systemd or init.d (upstart)
54# Check for init.d (upstart) as used in CentOS 6 or systemd (ie CentOS 7)
55%{expand: %%global initsystem %(if [[ `/sbin/init --version 2> /dev/null` =~ upstart ]]; then echo upstart; elif [[ `systemctl` =~ -\.mount ]]; then echo systemd; fi)}
56#
9473e340 57# If init system is systemd, then always disable watchfrr
f755bf6d
MW
58#
59%if "%{initsystem}" == "systemd"
192c13ac
MW
60 # Note: For systems with systemd, watchfrr will NOT be built. Systemd
61 # takes over the role of restarting crashed processes. Value will
62 # be overwritten with 0 below for systemd independent on the setting here
63 %global with_watchfrr 1
f755bf6d 64%endif
7c08d77f 65
63ef966e
MW
66#### Check for RedHat 6.x or CentOS 6.x - they are too old to support PIM.
67#### Always disable it on these old systems unconditionally
414ec6e9 68%{expand: %%global redhat6 %(if [[ `cat /etc/redhat-release 2> /dev/null` =~ release\ 6\. ]]; then echo 6; else echo 0; fi)}
63ef966e
MW
69#
70# if CentOS 6 / RedHat 6, then disable PIMd
71%if "%{redhat6}" == "6"
72 %global with_pimd 0
73%endif
74
75# if FPM is enabled, then enable tcp_zebra as well
f755bf6d
MW
76#
77%if %{with_fpm}
192c13ac 78 %global with_tcp_zebra 1
f755bf6d 79%endif
e0626854 80
15d74e93 81# misc internal defines
192c13ac
MW
82%{!?frr_uid: %global frr_uid 92 }
83%{!?frr_gid: %global frr_gid 92 }
84%{!?vty_gid: %global vty_gid 85 }
f755bf6d 85
63ef966e 86%define daemon_list zebra ripd ospfd bgpd isisd ripngd ospf6d
0df63b52 87
b021388f 88%if %{with_ldpd}
192c13ac 89%define daemon_ldpd ldpd
b021388f 90%else
192c13ac 91%define daemon_ldpd ""
b021388f
RW
92%endif
93
729f041c 94%if %{with_nhrpd}
63ef966e
MW
95%define daemon_nhrpd nhrpd
96%else
97%define daemon_nhrpd ""
98%endif
99
100%if %{with_pimd}
101%define daemon_pimd pimd
729f041c 102%else
63ef966e 103%define daemon_pimd ""
729f041c
TT
104%endif
105
9473e340 106%if %{with_watchfrr}
192c13ac 107%define daemon_watchfrr watchfrr
f755bf6d 108%else
192c13ac 109%define daemon_watchfrr ""
f755bf6d
MW
110%endif
111
63ef966e 112%define all_daemons %{daemon_list} %{daemon_ldpd} %{daemon_nhrpd} %{daemon_pimd} %{daemon_watchfrr}
b3324e27 113
b5f310cb 114# allow build dir to be kept
192c13ac 115%{!?keep_build: %global keep_build 0 }
b5f310cb 116
4859e20c 117#release sub-revision (the two digits after the CONFDATE)
192c13ac 118%{!?release_rev: %global release_rev 01 }
4859e20c 119
788cdc6d 120Summary: Routing daemon
192c13ac
MW
121Name: frr
122Version: %{rpmversion}
123Release: @CONFDATE@%{release_rev}%{?dist}
124License: GPLv2+
125Group: System Environment/Daemons
126Source0: http://www.frrouting.org/releases/frr/%{name}-%{frrversion}.tar.gz
127URL: http://www.frrouting.org
128Requires: ncurses json-c
129Requires(pre): /sbin/install-info
f755bf6d 130Requires(preun): /sbin/install-info
192c13ac 131Requires(post): /sbin/install-info
d75d3b87 132BuildRequires: texi2html texinfo autoconf automake patch libcap-devel groff
192c13ac 133BuildRequires: readline readline-devel ncurses ncurses-devel
d75d3b87 134BuildRequires: json-c-devel bison >= 2.7 flex
192c13ac 135Requires: ncurses initscripts
f755bf6d 136%if %{with_pam}
192c13ac
MW
137BuildRequires: pam-devel
138Requires: pam
f755bf6d
MW
139%endif
140%if "%{initsystem}" == "systemd"
d75d3b87 141BuildRequires: systemd systemd-devel
192c13ac
MW
142Requires(post): systemd
143Requires(preun): systemd
144Requires(postun): systemd
f755bf6d 145%else
788cdc6d 146# Initscripts > 5.60 is required for IPv6 support
192c13ac 147Requires(pre): initscripts >= 5.60
f755bf6d 148%endif
192c13ac
MW
149Provides: routingdaemon = %{version}-%{release}
150BuildRoot: %{_tmppath}/%{name}-%{version}-root
151Obsoletes: bird gated mrt zebra frr-sysvinit
788cdc6d 152
153%description
447a8fe9 154FRRouting is a free software that manages TCP/IP based routing
788cdc6d 155protocol. It takes multi-server and multi-thread approach to resolve
156the current complexity of the Internet.
157
3e7c8d04
DL
158FRRouting supports BGP4, OSPFv2, OSPFv3, ISIS, RIP, RIPng, PIM, LDP
159and NHRP.
788cdc6d 160
447a8fe9 161FRRouting is a fork of Quagga.
788cdc6d 162
448ed4a2 163%package contrib
c115e4a4 164Summary: contrib tools for frr
448ed4a2 165Group: System Environment/Daemons
166
167%description contrib
c115e4a4 168Contributed/3rd party tools which may be of use with frr.
448ed4a2 169
52134ac6
MW
170%package pythontools
171Summary: python tools for frr
172Requires: python >= 2.7 python-ipaddr
173Group: System Environment/Daemons
174
175%description pythontools
176Contributed python 2.7 tools which may be of use with frr.
177
e0626854 178%package devel
c115e4a4 179Summary: Header and object files for frr development
e0626854 180Group: System Environment/Daemons
f755bf6d 181Requires: %{name} = %{version}-%{release}
e0626854 182
183%description devel
c115e4a4
MW
184The frr-devel package contains the header and object files neccessary for
185developing OSPF-API and frr applications.
e0626854 186
788cdc6d 187%prep
c115e4a4 188%setup -q -n frr-%{frrversion}
788cdc6d 189
190%build
7966b97c 191
192# For standard gcc verbosity, uncomment these lines:
193#CFLAGS="%{optflags} -Wall -Wsign-compare -Wpointer-arith"
194#CFLAGS="${CFLAGS} -Wbad-function-cast -Wwrite-strings"
195
196# For ultra gcc verbosity, uncomment these lines also:
197#CFLAGS="${CFLAGS} -W -Wcast-qual -Wstrict-prototypes"
198#CFLAGS="${CFLAGS} -Wmissing-declarations -Wmissing-noreturn"
199#CFLAGS="${CFLAGS} -Wmissing-format-attribute -Wunreachable-code"
200#CFLAGS="${CFLAGS} -Wpacked -Wpadded"
201
788cdc6d 202%configure \
c63f5f2c 203 --sbindir=%{_sbindir} \
f755bf6d
MW
204 --sysconfdir=%{_sysconfdir} \
205 --libdir=%{_libdir} \
206 --libexecdir=%{_libexecdir} \
207 --localstatedir=%{_localstatedir} \
192c13ac 208 --disable-werror \
54b25dca 209%if !%{with_shared}
192c13ac 210 --disable-shared \
54b25dca 211%endif
54b25dca 212%if %{with_multipath}
192c13ac 213 --enable-multipath=%{with_multipath} \
788cdc6d 214%endif
54b25dca 215%if %{with_tcp_zebra}
192c13ac 216 --enable-tcp-zebra \
788cdc6d 217%endif
192c13ac 218 --enable-vtysh \
54b25dca 219%if %{with_ospfclient}
192c13ac 220 --enable-ospfclient=yes \
68980084 221%else
192c13ac 222 --enable-ospfclient=no\
68980084 223%endif
54b25dca 224%if %{with_ospfapi}
192c13ac 225 --enable-ospfapi=yes \
68980084 226%else
192c13ac 227 --enable-ospfapi=no \
68980084 228%endif
54b25dca 229%if %{with_irdp}
192c13ac 230 --enable-irdp=yes \
5b819262 231%else
192c13ac 232 --enable-irdp=no \
5b819262 233%endif
e7cd37bf 234%if %{with_rtadv}
192c13ac 235 --enable-rtadv=yes \
e7cd37bf 236%else
192c13ac 237 --enable-rtadv=no \
e7cd37bf 238%endif
b021388f 239%if %{with_mpls}
192c13ac 240 --enable-mpls=yes \
b021388f 241%else
192c13ac 242 --disable-mpls \
b021388f
RW
243%endif
244%if %{with_ldpd}
192c13ac 245 --enable-ldpd \
b021388f 246%else
192c13ac 247 --disable-ldpd \
b021388f 248%endif
729f041c 249%if %{with_nhrpd}
63ef966e 250 --enable-nhrpd \
729f041c 251%else
63ef966e
MW
252 --disable-nhrpd \
253%endif
254%if %{with_pimd}
255 --enable-pimd \
256%else
257 --disable-pimd \
729f041c 258%endif
54b25dca 259%if %{with_pam}
192c13ac 260 --with-libpam \
788cdc6d 261%endif
c115e4a4 262%if 0%{?frr_user:1}
192c13ac
MW
263 --enable-user=%frr_user \
264 --enable-group=%frr_user \
edd7c245 265%endif
f755bf6d 266%if 0%{?vty_group:1}
192c13ac 267 --enable-vty-group=%vty_group \
edd7c245 268%endif
f755bf6d 269%if %{with_fpm}
192c13ac 270 --enable-fpm \
f755bf6d 271%else
192c13ac 272 --disable-fpm \
f755bf6d 273%endif
9473e340 274%if %{with_watchfrr}
192c13ac 275 --enable-watchfrr \
f755bf6d 276%else
192c13ac 277 --disable-watchfrr \
65efcfce
LB
278%endif
279%if %{with_bgp_vnc}
192c13ac 280 --enable-bgp-vnc \
65efcfce 281%else
192c13ac 282 --disable-bgp-vnc \
f755bf6d 283%endif
192c13ac
MW
284 --enable-gcc-rdynamic \
285 --enable-isisd=yes \
d75d3b87 286%if "%{initsystem}" == "systemd"
192c13ac 287 --enable-systemd=yes \
d75d3b87 288%endif
192c13ac 289 --enable-poll=yes
788cdc6d 290
291make %{?_smp_mflags} MAKEINFO="makeinfo --no-split"
292
293pushd doc
f755bf6d 294%if %{texi2htmlversion} < 5
c115e4a4 295texi2html --number-sections frr.texi
f755bf6d 296%else
c115e4a4 297texi2html --number-footnotes --number-sections frr.texi
f755bf6d 298%endif
788cdc6d 299popd
300
301%install
c115e4a4
MW
302mkdir -p %{buildroot}/etc/{frr,sysconfig,logrotate.d,pam.d,default} \
303 %{buildroot}/var/log/frr %{buildroot}%{_infodir}
f755bf6d 304make DESTDIR=%{buildroot} INSTALL="install -p" CP="cp -p" install
788cdc6d 305
9a344b74 306# Remove this file, as it is uninstalled and causes errors when building on RH9
f755bf6d 307rm -rf %{buildroot}/usr/share/info/dir
9a344b74 308
c63f5f2c 309
f755bf6d
MW
310# install /etc sources
311%if "%{initsystem}" == "systemd"
312mkdir -p %{buildroot}%{_unitdir}
c115e4a4 313install %{frr_tools}/frr.service \
192c13ac 314 %{buildroot}%{_unitdir}/frr.service
f755bf6d
MW
315%else
316mkdir -p %{buildroot}/etc/rc.d/init.d
b3324e27 317for daemon in %{all_daemons} ; do
192c13ac
MW
318 if [ x"${daemon}" != x"" ] ; then
319 install %{zeb_rh_src}/${daemon}.init \
320 %{buildroot}/etc/rc.d/init.d/${daemon}
321 fi
15d74e93 322done
f755bf6d
MW
323%endif
324
c115e4a4
MW
325install %{cumulus_dir}/frr/debian.conf %{buildroot}/etc/frr
326install %{cumulus_dir}/frr/daemons %{buildroot}/etc/frr
327install -m644 %{cumulus_dir}/default/frr %{buildroot}/etc/default
328install -m644 %{zeb_rh_src}/frr.pam \
192c13ac 329 %{buildroot}/etc/pam.d/frr
c115e4a4 330install -m644 %{zeb_rh_src}/frr.logrotate \
192c13ac 331 %{buildroot}/etc/logrotate.d/frr
c115e4a4 332install -d -m750 %{buildroot}/var/run/frr
edd7c245 333
334%pre
335# add vty_group
f755bf6d 336%if 0%{?vty_group:1}
e7cd37bf 337if getent group %vty_group > /dev/null ; then : ; else \
f755bf6d 338 /usr/sbin/groupadd -r -g %vty_gid %vty_group > /dev/null || : ; fi
edd7c245 339%endif
e7cd37bf 340
c115e4a4
MW
341# add frr user and group
342%if 0%{?frr_user:1}
343# Ensure that frr_gid gets correctly allocated
344if getent group %frr_user >/dev/null; then : ; else \
345 /usr/sbin/groupadd -g %frr_gid %frr_user > /dev/null || : ; \
e7cd37bf 346fi
c115e4a4
MW
347if getent passwd %frr_user >/dev/null ; then : ; else \
348 /usr/sbin/useradd -u %frr_uid -g %frr_gid \
447a8fe9 349 -M -r -s /sbin/nologin -c "FRRouting suite" \
c115e4a4 350 -d %_localstatedir %frr_user 2> /dev/null || : ; \
e7cd37bf 351fi
f676b06e 352%if 0%{?vty_group:1}
c115e4a4 353/usr/sbin/usermod -a -G %vty_group %frr_user
edd7c245 354%endif
f676b06e
DS
355%endif
356
788cdc6d 357
788cdc6d 358%post
30b9d89b 359# zebra_spec_add_service <service name> <port/proto> <comment>
788cdc6d 360# e.g. zebra_spec_add_service zebrasrv 2600/tcp "zebra service"
361
362zebra_spec_add_service ()
363{
192c13ac
MW
364 # Add port /etc/services entry if it isn't already there
365 if [ -f /etc/services ] && \
366 ! %__sed -e 's/#.*$//' /etc/services | %__grep -wq $1 ; then
367 echo "$1 $2 # $3" >> /etc/services
368 fi
788cdc6d 369}
370
371zebra_spec_add_service zebrasrv 2600/tcp "zebra service"
372zebra_spec_add_service zebra 2601/tcp "zebra vty"
373zebra_spec_add_service ripd 2602/tcp "RIPd vty"
374zebra_spec_add_service ripngd 2603/tcp "RIPngd vty"
375zebra_spec_add_service ospfd 2604/tcp "OSPFd vty"
376zebra_spec_add_service bgpd 2605/tcp "BGPd vty"
377zebra_spec_add_service ospf6d 2606/tcp "OSPF6d vty"
54b25dca 378%if %{with_ospfapi}
7021c425 379zebra_spec_add_service ospfapi 2607/tcp "OSPF-API"
380%endif
5a514b14 381zebra_spec_add_service isisd 2608/tcp "ISISd vty"
729f041c
TT
382%if %{with_nhrpd}
383zebra_spec_add_service nhrpd 2610/tcp "NHRPd vty"
384%endif
63ef966e 385%if %{with_pimd}
12e41d03 386zebra_spec_add_service pimd 2611/tcp "PIMd vty"
63ef966e 387%endif
b021388f
RW
388%if %{with_ldpd}
389zebra_spec_add_service ldpd 2612/tcp "LDPd vty"
390%endif
788cdc6d 391
f755bf6d
MW
392%if "%{initsystem}" == "systemd"
393for daemon in %all_daemons ; do
192c13ac 394 %systemd_post frr.service
f755bf6d
MW
395done
396%else
397for daemon in %all_daemons ; do
da69cb8e
MW
398 if [ x"${daemon}" != x"" ] ; then
399 /sbin/chkconfig --add ${daemon}
400 fi
15d74e93 401done
f755bf6d 402%endif
788cdc6d 403
c115e4a4 404/sbin/install-info %{_infodir}/frr.info.gz %{_infodir}/dir
788cdc6d 405
406# Create dummy files if they don't exist so basic functions can be used.
407if [ ! -e %{_sysconfdir}/zebra.conf ]; then
192c13ac 408 echo "hostname `hostname`" > %{_sysconfdir}/zebra.conf
c115e4a4 409%if 0%{?frr_user:1}
192c13ac 410 chown %frr_user:%frr_user %{_sysconfdir}/zebra.conf*
e7cd37bf 411%endif
192c13ac 412 chmod 640 %{_sysconfdir}/zebra.conf
788cdc6d 413fi
f755bf6d 414for daemon in %{all_daemons} ; do
da69cb8e
MW
415 if [ x"${daemon}" != x"" ] ; then
416 if [ ! -e %{_sysconfdir}/${daemon}.conf ]; then
417 touch %{_sysconfdir}/${daemon}.conf
418 %if 0%{?frr_user:1}
419 chown %frr_user:%frr_user %{_sysconfdir}/${daemon}.conf*
420 %endif
421 fi
192c13ac 422 fi
f755bf6d 423done
9473e340 424%if %{with_watchfrr}
192c13ac
MW
425 # No config for watchfrr - this is part of /etc/sysconfig/frr
426 rm -f %{_sysconfdir}/watchfrr.*
f755bf6d
MW
427%endif
428
788cdc6d 429if [ ! -e %{_sysconfdir}/vtysh.conf ]; then
192c13ac
MW
430 touch %{_sysconfdir}/vtysh.conf
431 chmod 640 %{_sysconfdir}/vtysh.conf
f755bf6d 432%if 0%{?vty_group:1}
c115e4a4 433 chown frr:%{vty_group} %{_sysconfdir}/vtysh.conf*
f755bf6d 434%endif
788cdc6d 435fi
436
437%postun
fc43ecc7 438if [ "$1" -ge 1 ]; then
192c13ac
MW
439 # Find out which daemons need to be restarted.
440 for daemon in %all_daemons ; do
da69cb8e
MW
441 if [ x"${daemon}" != x"" ] ; then
442 if [ -f /var/lock/subsys/${daemon} ]; then
443 eval restart_${daemon}=yes
444 else
445 eval restart_${daemon}=no
446 fi
192c13ac
MW
447 fi
448 done
449 # Rename restart flags for daemons handled specially.
450 running_zebra="$restart_zebra"
451 restart_zebra=no
452 %if %{with_watchfrr}
453 running_watchfrr="$restart_watchfrr"
454 restart_watchfrr=no
455 %endif
456
457 %if "%{initsystem}" == "systemd"
458 ##
459 ## Systemd Version
460 ##
461 # No watchfrr for systemd version
462 #
463 # Stop all daemons other than zebra.
464 for daemon in %all_daemons ; do
da69cb8e
MW
465 if [ x"${daemon}" != x"" ] ; then
466 eval restart=\$restart_${daemon}
467 [ "$restart" = yes ] && \
468 %systemd_postun ${daemon}.service
469 :
470 fi
192c13ac
MW
471 done
472 # Restart zebra.
473 [ "$running_zebra" = yes ] && \
474 %systemd_postun_with_restart $daemon.service
475 # Start all daemons other than zebra.
476 for daemon in %all_daemons ; do
da69cb8e
MW
477 if [ x"${daemon}" != x"" ] ; then
478 eval restart=\$restart_${daemon}
479 [ "$restart" = yes ] && \
480 %systemd_post ${daemon}.service
481 :
482 fi
192c13ac
MW
483 done
484 %else
485 ##
486 ## init.d Version
487 ##
488 %if %{with_watchfrr}
489 # Stop watchfrr first.
490 [ "$running_watchfrr" = yes ] && \
491 /etc/rc.d/init.d/watchfrr stop >/dev/null 2>&1
492 %endif
493 # Stop all daemons other than zebra and watchfrr.
494 for daemon in %all_daemons ; do
da69cb8e
MW
495 if [ x"${daemon}" != x"" ] ; then
496 eval restart=\$restart_${daemon}
497 [ "$restart" = yes ] && \
498 /etc/rc.d/init.d/${daemon} stop >/dev/null 2>&1
499 fi
192c13ac
MW
500 done
501 # Restart zebra.
502 [ "$running_zebra" = yes ] && \
503 /etc/rc.d/init.d/zebra restart >/dev/null 2>&1
504 # Start all daemons other than zebra and watchfrr.
505 for daemon in %all_daemons ; do
da69cb8e
MW
506 if [ x"${daemon}" != x"" ] ; then
507 eval restart=\$restart_${daemon}
508 [ "$restart" = yes ] && \
509 /etc/rc.d/init.d/${daemon} start >/dev/null 2>&1
510 fi
192c13ac
MW
511 done
512 %if %{with_watchfrr}
513 # Start watchfrr last.
514 # Avoid postun scriptlet error if watchfrr is not running.
515 [ "$running_watchfrr" = yes ] && \
516 /etc/rc.d/init.d/watchfrr start >/dev/null 2>&1 || :
517 %endif
518 %endif
788cdc6d 519fi
788cdc6d 520
521%preun
f755bf6d 522%if "%{initsystem}" == "systemd"
192c13ac
MW
523 ##
524 ## Systemd Version
525 ##
526 if [ "$1" = "0" ]; then
527 for daemon in %all_daemons ; do
da69cb8e
MW
528 if [ x"${daemon}" != x"" ] ; then
529 %systemd_preun ${daemon}.service
530 fi
192c13ac
MW
531 done
532 fi
f755bf6d 533%else
192c13ac
MW
534 ##
535 ## init.d Version
536 ##
537 if [ "$1" = "0" ]; then
538 for daemon in %all_daemons ; do
da69cb8e
MW
539 if [ x"${daemon}" != x"" ] ; then
540 /etc/rc.d/init.d/${daemon} stop >/dev/null 2>&1
541 /sbin/chkconfig --del ${daemon}
542 fi
192c13ac
MW
543 done
544 fi
f755bf6d 545%endif
c115e4a4 546/sbin/install-info --delete %{_infodir}/frr.info.gz %{_infodir}/dir
788cdc6d 547
548%clean
f755bf6d
MW
549%if !0%{?keep_build:1}
550rm -rf %{buildroot}
b5f310cb 551%endif
788cdc6d 552
553%files
554%defattr(-,root,root)
448ed4a2 555%doc */*.sample* AUTHORS COPYING
c115e4a4 556%doc doc/frr.html
30b9d89b 557%doc doc/mpls
6d19ff21 558%doc ChangeLog INSTALL NEWS README REPORTING-BUGS SERVICES
c115e4a4
MW
559%if 0%{?frr_user:1}
560%dir %attr(751,%frr_user,%frr_user) %{_sysconfdir}
561%dir %attr(750,%frr_user,%frr_user) /var/log/frr
562%dir %attr(751,%frr_user,%frr_user) /var/run/frr
edd7c245 563%else
788cdc6d 564%dir %attr(750,root,root) %{_sysconfdir}
c115e4a4
MW
565%dir %attr(750,root,root) /var/log/frr
566%dir %attr(750,root,root) /var/run/frr
edd7c245 567%endif
f755bf6d 568%if 0%{?vty_group:1}
c115e4a4 569%attr(750,%frr_user,%vty_group) %{_sysconfdir}/vtysh.conf.sample
edd7c245 570%endif
c115e4a4 571%{_infodir}/frr.info.gz
788cdc6d 572%{_mandir}/man*/*
54b25dca 573%{_sbindir}/zebra
574%{_sbindir}/ospfd
575%{_sbindir}/ripd
576%{_sbindir}/bgpd
c63f5f2c 577%{_sbindir}/ssd
c115e4a4 578%{_sbindir}/frr
9473e340 579%if %{with_watchfrr}
192c13ac 580 %{_sbindir}/watchfrr
f755bf6d 581%endif
54b25dca 582%{_sbindir}/ripngd
583%{_sbindir}/ospf6d
63ef966e
MW
584%if %{with_pimd}
585 %{_sbindir}/pimd
586%endif
54b25dca 587%{_sbindir}/isisd
b021388f
RW
588%if %{with_ldpd}
589%{_sbindir}/ldpd
590%endif
729f041c
TT
591%if %{with_nhrpd}
592%{_sbindir}/nhrpd
593%endif
28f79728 594%if %{with_shared}
167a5efe
MW
595%{_libdir}/lib*.so
596%{_libdir}/lib*.so.0
597%attr(755,root,root) %{_libdir}/lib*.so.0.*
54b25dca 598%endif
788cdc6d 599%{_bindir}/*
c115e4a4 600%config /etc/frr/[!v]*
f755bf6d 601%if "%{initsystem}" == "systemd"
192c13ac 602 %config %{_unitdir}/frr.service
f755bf6d 603%else
192c13ac
MW
604 %config /etc/rc.d/init.d/zebra
605 %if %{with_watchfrr}
606 %config /etc/rc.d/init.d/watchfrr
607 %endif
608 %config /etc/rc.d/init.d/ripd
609 %config /etc/rc.d/init.d/ospfd
610 %config /etc/rc.d/init.d/bgpd
611 %config /etc/rc.d/init.d/ripngd
612 %config /etc/rc.d/init.d/ospf6d
613 %config /etc/rc.d/init.d/isisd
63ef966e
MW
614 %if %{with_pimd}
615 %config /etc/rc.d/init.d/pimd
616 %endif
192c13ac
MW
617 %if %{with_ldpd}
618 %config /etc/rc.d/init.d/ldpd
619 %endif
620 %if %{with_nhrpd}
621 %config /etc/rc.d/init.d/nhrpd
622 %endif
f755bf6d 623%endif
c115e4a4
MW
624%config(noreplace) /etc/default/frr
625%config(noreplace) /etc/pam.d/frr
788cdc6d 626%config(noreplace) %attr(640,root,root) /etc/logrotate.d/*
627
448ed4a2 628%files contrib
629%defattr(-,root,root)
630%doc tools
631
52134ac6
MW
632%files pythontools
633%defattr(-,root,root)
634%{_sbindir}/frr-reload.py
635%{_sbindir}/frr-reload.pyc
636%{_sbindir}/frr-reload.pyo
637
e0626854 638%files devel
639%defattr(-,root,root)
da29c6b0 640%if %{with_ospfclient}
641%{_sbindir}/ospfclient
642%endif
28f79728 643%{_libdir}/*.a
644%{_libdir}/*.la
cfc1842b 645%dir %attr(755,root,root) %{_includedir}/%{name}
28f79728 646%{_includedir}/%name/*.h
cfc1842b 647%dir %attr(755,root,root) %{_includedir}/%{name}/ospfd
28f79728 648%{_includedir}/%name/ospfd/*.h
54b25dca 649%if %{with_ospfapi}
cfc1842b 650%dir %attr(755,root,root) %{_includedir}/%{name}/ospfapi
28f79728 651%{_includedir}/%name/ospfapi/*.h
68980084 652%endif
e0626854 653
788cdc6d 654%changelog
729f041c
TT
655* Tue Feb 14 2017 Timo Teräs <timo.teras@iki.fi> - %{version}
656- add nhrpd
657
f89f4f10 658* Fri Jan 6 2017 Martin Winter <mwinter@opensourcerouting.org> - %{version}
63ef966e
MW
659* Thu Apr 13 2017 Martin Winter <mwinter@opensourcerouting.org> - %{version}
660- new subpackage frr-pythontools with python 2.7 restart script
661- remove PIMd from CentOS/RedHat 6 RPM packages (won't work - too old)
662- Various other RPM package fixes for FRR 2.0
663
664* Fri Jan 6 2017 Martin Winter <mwinter@opensourcerouting.org>
447a8fe9 665- Renamed to frr for FRRouting fork of Quagga
c115e4a4 666
f89f4f10 667* Thu Feb 11 2016 Paul Jakma <paul@jakma.org>
30da4585
PJ
668- remove with_ipv6 conditionals, always build v6
669- Fix UTF-8 char in spec changelog
670- remove quagga.pam.stack, long deprecated.
671
f755bf6d
MW
672* Thu Oct 22 2015 Martin Winter <mwinter@opensourcerouting.org>
673- Cleanup configure: remove --enable-ipv6 (default now), --enable-nssa,
674 --enable-netlink
675- Remove support for old fedora 4/5
676- Fix for package nameing
677- Fix Weekdays of previous changelogs (bogus dates)
678- Add conditional logic to only build tex footnotes with supported texi2html
679- Added pimd to files section and fix double listing of /var/lib*/quagga
680- Numerous fixes to unify upstart/systemd startup into same spec file
9473e340 681- Only allow use of watchfrr for non-systemd systems. no need with systemd
f755bf6d
MW
682
683* Fri Sep 4 2015 Paul Jakma <paul@jakma.org>
7c08d77f
PJ
684- buildreq updates
685- add a default define for with_pimd
686
f755bf6d 687* Mon Sep 12 2005 Paul Jakma <paul@dishone.st>
e7cd37bf 688- Steal some changes from Fedora spec file:
689- Add with_rtadv variable
690- Test for groups/users with getent before group/user adding
691- Readline need not be an explicit prerequisite
692- install-info delete should be postun, not preun
693
fc43ecc7 694* Wed Jan 12 2005 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
695- on package upgrade, implement careful, phased restart logic
696- use gcc -rdynamic flag when linking for better backtraces
697
f3931751 698* Wed Dec 22 2004 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
699- daemonv6_list should contain only IPv6 daemons
700
b3324e27 701* Wed Dec 22 2004 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
9473e340 702- watchfrr added
b3324e27 703- on upgrade, all daemons should be condrestart'ed
704- on removal, all daemons should be stopped
705
36002ae5 706* Mon Nov 08 2004 Paul Jakma <paul@dishone.st>
707- Use makeinfo --html to generate quagga.html
708
0df63b52 709* Sun Nov 07 2004 Paul Jakma <paul@dishone.st>
710- Fix with_ipv6 set to 0 build
711
cfc1842b 712* Sat Oct 23 2004 Paul Jakma <paul@dishone.st>
713- Update to 0.97.2
714
715* Sat Oct 23 2004 Andrew J. Schorr <aschorr@telemetry-investments.com>
716- Make directories be owned by the packages concerned
717- Update logrotate scripts to use correct path to killall and use pid files
718
da29c6b0 719* Fri Oct 08 2004 Paul Jakma <paul@dishone.st>
720- Update to 0.97.0
721
54b25dca 722* Wed Sep 15 2004 Paul Jakma <paul@dishone.st>
723- build snmp support by default
724- build irdp support
725- build with shared libs
726- devel subpackage for archives and headers
727
00bc5603 728* Thu Jan 08 2004 Paul Jakma <paul@dishone.st>
729- updated sysconfig files to specify local dir
730- added ospf_dump.c crash quick fix patch
731- added ospfd persistent interface configuration patch
732
15d74e93 733* Tue Dec 30 2003 Paul Jakma <paul@dishone.st>
734- sync to CVS
735- integrate RH sysconfig patch to specify daemon options (RH)
736- default to have vty listen only to 127.1 (RH)
737- add user with fixed UID/GID (RH)
738- create user with shell /sbin/nologin rather than /bin/false (RH)
739- stop daemons on uninstall (RH)
f755bf6d 740- delete info file on preun, not postun to avoid deletion on upgrade. (RH)
15d74e93 741- isisd added
742- cleanup tasks carried out for every daemon
743
406f7000 744* Sun Nov 2 2003 Paul Jakma <paul@dishone.st>
745- Fix -devel package to include all files
746- Sync to 0.96.4
747
6bd8fd3b 748* Tue Aug 12 2003 Paul Jakma <paul@dishone.st>
749- Renamed to Quagga
750- Sync to Quagga release 0.96
751
f755bf6d 752* Thu Mar 20 2003 Paul Jakma <paul@dishone.st>
edd7c245 753- zebra privileges support
754
f755bf6d 755* Tue Mar 18 2003 Paul Jakma <paul@dishone.st>
e0626854 756- Fix mem leak in 'show thread cpu'
757- Ralph Keller's OSPF-API
758- Amir: Fix configure.ac for net-snmp
759
448ed4a2 760* Sat Mar 1 2003 Paul Jakma <paul@dishone.st>
761- ospfd IOS prefix to interface matching for 'network' statement
762- temporary fix for PtP and IPv6
763- sync to zebra.org CVS
764
8f754983 765* Mon Jan 20 2003 Paul Jakma <paul@dishone.st>
766- update to latest cvs
767- Yon's "show thread cpu" patch - 17217
768- walk up tree - 17218
769- ospfd NSSA fixes - 16681
770- ospfd nsm fixes - 16824
771- ospfd OLSA fixes and new feature - 16823
772- KAME and ifindex fixes - 16525
773- spec file changes to allow redhat files to be in tree
774
d7ccae28 775* Sat Dec 28 2002 Alexander Hoogerhuis <alexh@ihatent.com>
776- Added conditionals for building with(out) IPv6, vtysh, RIP, BGP
777- Fixed up some build requirements (patch)
778- Added conditional build requirements for vtysh / snmp
f755bf6d 779- Added conditional to files for _bindir depending on vtysh
d7ccae28 780
788cdc6d 781* Mon Nov 11 2002 Paul Jakma <paulj@alphyra.ie>
782- update to latest CVS
783- add Greg Troxel's md5 buffer copy/dup fix
784- add RIPv1 fix
785- add Frank's multicast flag fix
786
787* Wed Oct 09 2002 Paul Jakma <paulj@alphyra.ie>
788- update to latest CVS
789- timestamped crypt_seqnum patch
790- oi->on_write_q fix
791
792* Mon Sep 30 2002 Paul Jakma <paulj@alphyra.ie>
793- update to latest CVS
794- add vtysh 'write-config (integrated|daemon)' patch
795- always 'make rebuild' in vtysh/ to catch new commands
796
797* Fri Sep 13 2002 Paul Jakma <paulj@alphyra.ie>
798- update to 0.93b
799
800* Wed Sep 11 2002 Paul Jakma <paulj@alphyra.ie>
801- update to latest CVS
802- add "/sbin/ip route flush proto zebra" to zebra RH init on startup
803
804* Sat Aug 24 2002 Paul Jakma <paulj@alphyra.ie>
805- update to current CVS
806- add OSPF point to multipoint patch
807- add OSPF bugfixes
808- add BGP hash optimisation patch
809
810* Fri Jun 14 2002 Paul Jakma <paulj@alphyra.ie>
811- update to 0.93-pre1 / CVS
812- add link state detection support
813- add generic PtP and RFC3021 support
814- various bug fixes
815
816* Thu Aug 09 2001 Elliot Lee <sopwith@redhat.com> 0.91a-6
817- Fix bug #51336
818
f755bf6d 819* Wed Aug 1 2001 Trond Eivind Glomsrød <teg@redhat.com> 0.91a-5
788cdc6d 820- Use generic initscript strings instead of initscript specific
821 ( "Starting foo: " -> "Starting $prog:" )
822
823* Fri Jul 27 2001 Elliot Lee <sopwith@redhat.com> 0.91a-4
824- Bump the release when rebuilding into the dist.
825
826* Tue Feb 6 2001 Tim Powers <timp@redhat.com>
827- built for Powertools
828
829* Sun Feb 4 2001 Pekka Savola <pekkas@netcore.fi>
830- Hacked up from PLD Linux 0.90-1, Mandrake 0.90-1mdk and one from zebra.org.
831- Update to 0.91a
832- Very heavy modifications to init.d/*, .spec, pam, i18n, logrotate, etc.
833- Should be quite Red Hat'isque now.