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