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