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