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