]>
Commit | Line | Data |
---|---|---|
edd7c245 | 1 | # configure options |
b64d92a8 | 2 | # |
3 | # Some can be overriden on rpmbuild commandline with: | |
4 | # rpmbuild --define 'variable value' | |
31442577 | 5 | # (use any value, ie 1 for flag "with_XXXX" definitions) |
b64d92a8 | 6 | # |
a5ca2047 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 | |
1189075b | 11 | ####################### Quagga configure options ######################### |
12 | # with-feature options | |
31442577 MW |
13 | %{!?with_vtysh: %global with_vtysh 1 } |
14 | %{!?with_tcp_zebra: %global with_tcp_zebra 0 } | |
31442577 MW |
15 | %{!?with_pam: %global with_pam 1 } |
16 | %{!?with_ospfclient: %global with_ospfclient 1 } | |
17 | %{!?with_ospfapi: %global with_ospfapi 1 } | |
18 | %{!?with_irdp: %global with_irdp 1 } | |
19 | %{!?with_rtadv: %global with_rtadv 1 } | |
20 | %{!?with_isisd: %global with_isisd 1 } | |
21 | %{!?with_pimd: %global with_pimd 1 } | |
22 | %{!?with_shared: %global with_shared 1 } | |
23 | %{!?with_multipath: %global with_multipath 64 } | |
24 | %{!?quagga_user: %global quagga_user quagga } | |
c161bb74 | 25 | %{!?vty_group: %global vty_group quaggavty } |
31442577 MW |
26 | %{!?with_fpm: %global with_fpm 0 } |
27 | %{!?with_watchquagga: %global with_watchquagga 1 } | |
30b9d89b | 28 | |
29 | # path defines | |
6bd8fd3b | 30 | %define _sysconfdir /etc/quagga |
31442577 | 31 | %define zeb_src %{_builddir}/%{name}-%{quaggaversion} |
8f754983 | 32 | %define zeb_rh_src %{zeb_src}/redhat |
33 | %define zeb_docs %{zeb_src}/doc | |
788cdc6d | 34 | |
e0626854 | 35 | # defines for configure |
6bd8fd3b | 36 | %define _localstatedir /var/run/quagga |
1189075b | 37 | ############################################################################ |
38 | ||
31442577 MW |
39 | #### Version String tweak |
40 | # Remove invalid characters form version string and replace with _ | |
41 | %{expand: %%define rpmversion %(echo '@VERSION@' | tr [:blank:]- _ )} | |
42 | %define quaggaversion @VERSION@ | |
1189075b | 43 | |
31442577 MW |
44 | #### Check version of texi2html |
45 | # Old versions don't support "--number-footnotes" option. | |
46 | %{expand: %%global texi2htmlversion %(rpm -q --qf '%%{VERSION}' texi2html | cut -d. -f1 )} | |
1189075b | 47 | |
31442577 MW |
48 | #### Check for systemd or init.d (upstart) |
49 | # Check for init.d (upstart) as used in CentOS 6 or systemd (ie CentOS 7) | |
50 | %{expand: %%global initsystem %(if [[ `/sbin/init --version 2> /dev/null` =~ upstart ]]; then echo upstart; elif [[ `systemctl` =~ -\.mount ]]; then echo systemd; fi)} | |
51 | # | |
52 | # If init system is systemd, then always disable watchquagga | |
53 | # | |
54 | %if "%{initsystem}" == "systemd" | |
55 | # Note: For systems with systemd, watchquagga will NOT be built. Systemd | |
56 | # takes over the role of restarting crashed processes. Value will | |
57 | # be overwritten with 0 below for systemd independent on the setting here | |
58 | %global with_watchquagga 0 | |
59 | %endif | |
f104b1d9 | 60 | |
31442577 MW |
61 | # if FPM is enabled, then enable tcp_zebra as well |
62 | # | |
63 | %if %{with_fpm} | |
64 | %global with_tcp_zebra 1 | |
65 | %endif | |
e0626854 | 66 | |
15d74e93 | 67 | # misc internal defines |
b64d92a8 | 68 | %{!?quagga_uid: %define quagga_uid 92 } |
69 | %{!?quagga_gid: %define quagga_gid 92 } | |
31442577 MW |
70 | %{!?vty_gid: %define vty_gid 85 } |
71 | ||
54b25dca | 72 | %define daemon_list zebra ripd ospfd bgpd |
0df63b52 | 73 | |
41d9cc6a | 74 | %define daemonv6_list ripngd ospf6d |
0df63b52 | 75 | |
54b25dca | 76 | %if %{with_isisd} |
31442577 | 77 | %define daemon_isisd isisd |
69f5d260 | 78 | %else |
31442577 | 79 | %define daemon_isisd "" |
15d74e93 | 80 | %endif |
81 | ||
31442577 MW |
82 | %if %{with_pimd} |
83 | %define daemon_pimd pimd | |
84 | %else | |
85 | %define daemon_pimd "" | |
86 | %endif | |
87 | ||
88 | %if %{with_watchquagga} | |
89 | %define daemon_watchquagga watchquagga | |
90 | %else | |
91 | %define daemon_watchquagga "" | |
92 | %endif | |
93 | ||
94 | %define all_daemons %{daemon_list} %{daemonv6_list} %{daemon_isisd} %{daemon_pimd} %{daemon_watchquagga} | |
b3324e27 | 95 | |
b5f310cb | 96 | # allow build dir to be kept |
31442577 | 97 | %{!?keep_build: %global keep_build 0 } |
b5f310cb | 98 | |
4859e20c | 99 | #release sub-revision (the two digits after the CONFDATE) |
100 | %{!?release_rev: %define release_rev 01 } | |
101 | ||
788cdc6d | 102 | Summary: Routing daemon |
31442577 MW |
103 | Name: quagga |
104 | Version: %{rpmversion} | |
105 | Release: @CONFDATE@%{release_rev}%{?dist} | |
106 | License: GPLv2+ | |
107 | Group: System Environment/Daemons | |
108 | Source0: http://download.savannah.gnu.org/releases/quagga/%{name}-%{quaggaversion}.tar.gz | |
109 | URL: http://www.quagga.net | |
110 | Requires: ncurses | |
111 | Requires(pre): /sbin/install-info | |
112 | Requires(preun): /sbin/install-info | |
113 | Requires(post): /sbin/install-info | |
114 | BuildRequires: texi2html texinfo autoconf patch libcap-devel groff | |
54b25dca | 115 | %if %{with_vtysh} |
30b9d89b | 116 | BuildRequires: readline readline-devel ncurses ncurses-devel |
31442577 | 117 | Requires: ncurses |
d7ccae28 | 118 | %endif |
31442577 MW |
119 | %if %{with_pam} |
120 | BuildRequires: pam-devel | |
121 | Requires: pam | |
122 | %endif | |
123 | %if "%{initsystem}" == "systemd" | |
124 | BuildRequires: systemd | |
125 | Requires(post): systemd | |
126 | Requires(preun): systemd | |
127 | Requires(postun): systemd | |
128 | %else | |
788cdc6d | 129 | # Initscripts > 5.60 is required for IPv6 support |
fa75585d | 130 | Requires(pre): initscripts >= 5.60 |
31442577 MW |
131 | %endif |
132 | Provides: routingdaemon = %{version}-%{release} | |
133 | BuildRoot: %{_tmppath}/%{name}-%{version}-root | |
134 | Obsoletes: bird gated mrt zebra quagga-sysvinit | |
788cdc6d | 135 | |
136 | %description | |
6bd8fd3b | 137 | Quagga is a free software that manages TCP/IP based routing |
788cdc6d | 138 | protocol. It takes multi-server and multi-thread approach to resolve |
139 | the current complexity of the Internet. | |
140 | ||
31442577 | 141 | Quagga supports BGP4, OSPFv2, OSPFv3, ISIS, RIP, RIPng and PIM. |
788cdc6d | 142 | |
6bd8fd3b | 143 | Quagga is intended to be used as a Route Server and a Route Reflector. It is |
144 | not a toolkit, it provides full routing power under a new architecture. | |
145 | Quagga by design has a process for each protocol. | |
146 | ||
147 | Quagga is a fork of GNU Zebra. | |
788cdc6d | 148 | |
448ed4a2 | 149 | %package contrib |
6bd8fd3b | 150 | Summary: contrib tools for quagga |
448ed4a2 | 151 | Group: System Environment/Daemons |
152 | ||
153 | %description contrib | |
6bd8fd3b | 154 | Contributed/3rd party tools which may be of use with quagga. |
448ed4a2 | 155 | |
e0626854 | 156 | %package devel |
6bd8fd3b | 157 | Summary: Header and object files for quagga development |
e0626854 | 158 | Group: System Environment/Daemons |
31442577 | 159 | Requires: %{name} = %{version}-%{release} |
e0626854 | 160 | |
161 | %description devel | |
6bd8fd3b | 162 | The quagga-devel package contains the header and object files neccessary for |
163 | developing OSPF-API and quagga applications. | |
e0626854 | 164 | |
788cdc6d | 165 | %prep |
31442577 | 166 | %setup -q -n quagga-%{quaggaversion} |
788cdc6d | 167 | |
168 | %build | |
7966b97c | 169 | |
170 | # For standard gcc verbosity, uncomment these lines: | |
171 | #CFLAGS="%{optflags} -Wall -Wsign-compare -Wpointer-arith" | |
172 | #CFLAGS="${CFLAGS} -Wbad-function-cast -Wwrite-strings" | |
173 | ||
174 | # For ultra gcc verbosity, uncomment these lines also: | |
175 | #CFLAGS="${CFLAGS} -W -Wcast-qual -Wstrict-prototypes" | |
176 | #CFLAGS="${CFLAGS} -Wmissing-declarations -Wmissing-noreturn" | |
177 | #CFLAGS="${CFLAGS} -Wmissing-format-attribute -Wunreachable-code" | |
178 | #CFLAGS="${CFLAGS} -Wpacked -Wpadded" | |
179 | ||
788cdc6d | 180 | %configure \ |
31442577 MW |
181 | --sysconfdir=%{_sysconfdir} \ |
182 | --libdir=%{_libdir} \ | |
183 | --libexecdir=%{_libexecdir} \ | |
184 | --localstatedir=%{_localstatedir} \ | |
185 | --disable-werror \ | |
54b25dca | 186 | %if !%{with_shared} |
187 | --disable-shared \ | |
188 | %endif | |
54b25dca | 189 | %if %{with_multipath} |
190 | --enable-multipath=%{with_multipath} \ | |
788cdc6d | 191 | %endif |
54b25dca | 192 | %if %{with_tcp_zebra} |
788cdc6d | 193 | --enable-tcp-zebra \ |
194 | %endif | |
54b25dca | 195 | %if %{with_vtysh} |
788cdc6d | 196 | --enable-vtysh \ |
197 | %endif | |
54b25dca | 198 | %if %{with_ospfclient} |
68980084 | 199 | --enable-ospfclient=yes \ |
200 | %else | |
201 | --enable-ospfclient=no\ | |
202 | %endif | |
54b25dca | 203 | %if %{with_ospfapi} |
68980084 | 204 | --enable-ospfapi=yes \ |
205 | %else | |
206 | --enable-ospfapi=no \ | |
207 | %endif | |
54b25dca | 208 | %if %{with_irdp} |
5b819262 | 209 | --enable-irdp=yes \ |
210 | %else | |
211 | --enable-irdp=no \ | |
212 | %endif | |
e7cd37bf | 213 | %if %{with_rtadv} |
214 | --enable-rtadv=yes \ | |
215 | %else | |
216 | --enable-rtadv=no \ | |
217 | %endif | |
54b25dca | 218 | %if %{with_isisd} |
219 | --enable-isisd \ | |
220 | %else | |
69f5d260 | 221 | --disable-isisd \ |
54b25dca | 222 | %endif |
223 | %if %{with_pam} | |
edd7c245 | 224 | --with-libpam \ |
788cdc6d | 225 | %endif |
31442577 | 226 | %if 0%{?quagga_user:1} |
6bd8fd3b | 227 | --enable-user=%quagga_user \ |
228 | --enable-group=%quagga_user \ | |
edd7c245 | 229 | %endif |
31442577 | 230 | %if 0%{?vty_group:1} |
edd7c245 | 231 | --enable-vty-group=%vty_group \ |
232 | %endif | |
31442577 MW |
233 | %if %{with_fpm} |
234 | --enable-fpm \ | |
235 | %else | |
236 | --disable-fpm \ | |
237 | %endif | |
238 | %if %{with_watchquagga} | |
239 | --enable-watchquagga \ | |
240 | %else | |
241 | --disable-watchquagga \ | |
242 | %endif | |
243 | --enable-gcc-rdynamic | |
788cdc6d | 244 | |
245 | make %{?_smp_mflags} MAKEINFO="makeinfo --no-split" | |
246 | ||
247 | pushd doc | |
31442577 MW |
248 | %if %{texi2htmlversion} < 5 |
249 | texi2html --number-sections quagga.texi | |
250 | %else | |
f104b1d9 | 251 | texi2html --number-footnotes --number-sections quagga.texi |
31442577 | 252 | %endif |
788cdc6d | 253 | popd |
254 | ||
255 | %install | |
31442577 MW |
256 | mkdir -p %{buildroot}/etc/{quagga,sysconfig,logrotate.d,pam.d} \ |
257 | %{buildroot}/var/log/quagga %{buildroot}%{_infodir} | |
258 | make DESTDIR=%{buildroot} INSTALL="install -p" CP="cp -p" install | |
788cdc6d | 259 | |
9a344b74 | 260 | # Remove this file, as it is uninstalled and causes errors when building on RH9 |
31442577 | 261 | rm -rf %{buildroot}/usr/share/info/dir |
9a344b74 | 262 | |
31442577 MW |
263 | # install /etc sources |
264 | %if "%{initsystem}" == "systemd" | |
265 | mkdir -p %{buildroot}%{_unitdir} | |
266 | for daemon in %{all_daemons} ; do | |
267 | if [ x"${daemon}" != x"" ] ; then | |
268 | install %{zeb_rh_src}/${daemon}.service \ | |
269 | %{buildroot}%{_unitdir}/${daemon}.service | |
270 | fi | |
271 | done | |
272 | %else | |
273 | mkdir -p %{buildroot}/etc/rc.d/init.d | |
b3324e27 | 274 | for daemon in %{all_daemons} ; do |
da29c6b0 | 275 | if [ x"${daemon}" != x"" ] ; then |
276 | install %{zeb_rh_src}/${daemon}.init \ | |
31442577 | 277 | %{buildroot}/etc/rc.d/init.d/${daemon} |
da29c6b0 | 278 | fi |
15d74e93 | 279 | done |
31442577 MW |
280 | %endif |
281 | ||
a5ca2047 | 282 | install -m644 %{zeb_rh_src}/quagga.pam \ |
31442577 | 283 | %{buildroot}/etc/pam.d/quagga |
15d74e93 | 284 | install -m644 %{zeb_rh_src}/quagga.logrotate \ |
31442577 | 285 | %{buildroot}/etc/logrotate.d/quagga |
15d74e93 | 286 | install -m644 %{zeb_rh_src}/quagga.sysconfig \ |
31442577 MW |
287 | %{buildroot}/etc/sysconfig/quagga |
288 | install -d -m750 %{buildroot}/var/run/quagga | |
edd7c245 | 289 | |
290 | %pre | |
291 | # add vty_group | |
31442577 | 292 | %if 0%{?vty_group:1} |
e7cd37bf | 293 | if getent group %vty_group > /dev/null ; then : ; else \ |
31442577 | 294 | /usr/sbin/groupadd -r -g %vty_gid %vty_group > /dev/null || : ; fi |
edd7c245 | 295 | %endif |
e7cd37bf | 296 | |
6bd8fd3b | 297 | # add quagga user and group |
31442577 | 298 | %if 0%{?quagga_user:1} |
e7cd37bf | 299 | # Ensure that quagga_gid gets correctly allocated |
300 | if getent group %quagga_user >/dev/null; then : ; else \ | |
301 | /usr/sbin/groupadd -g %quagga_gid %quagga_user > /dev/null || : ; \ | |
302 | fi | |
303 | if getent passwd %quagga_user >/dev/null ; then : ; else \ | |
304 | /usr/sbin/useradd -u %quagga_uid -g %quagga_gid \ | |
305 | -M -r -s /sbin/nologin -c "Quagga routing suite" \ | |
306 | -d %_localstatedir %quagga_user 2> /dev/null || : ; \ | |
307 | fi | |
edd7c245 | 308 | %endif |
788cdc6d | 309 | |
788cdc6d | 310 | %post |
30b9d89b | 311 | # zebra_spec_add_service <service name> <port/proto> <comment> |
788cdc6d | 312 | # e.g. zebra_spec_add_service zebrasrv 2600/tcp "zebra service" |
313 | ||
314 | zebra_spec_add_service () | |
315 | { | |
316 | # Add port /etc/services entry if it isn't already there | |
6b637e96 | 317 | if [ -f /etc/services ] && \ |
318 | ! %__sed -e 's/#.*$//' /etc/services | %__grep -wq $1 ; then | |
788cdc6d | 319 | echo "$1 $2 # $3" >> /etc/services |
320 | fi | |
321 | } | |
322 | ||
323 | zebra_spec_add_service zebrasrv 2600/tcp "zebra service" | |
324 | zebra_spec_add_service zebra 2601/tcp "zebra vty" | |
325 | zebra_spec_add_service ripd 2602/tcp "RIPd vty" | |
326 | zebra_spec_add_service ripngd 2603/tcp "RIPngd vty" | |
327 | zebra_spec_add_service ospfd 2604/tcp "OSPFd vty" | |
328 | zebra_spec_add_service bgpd 2605/tcp "BGPd vty" | |
329 | zebra_spec_add_service ospf6d 2606/tcp "OSPF6d vty" | |
54b25dca | 330 | %if %{with_ospfapi} |
7021c425 | 331 | zebra_spec_add_service ospfapi 2607/tcp "OSPF-API" |
332 | %endif | |
54b25dca | 333 | %if %{with_isisd} |
5a514b14 | 334 | zebra_spec_add_service isisd 2608/tcp "ISISd vty" |
54b25dca | 335 | %endif |
788cdc6d | 336 | |
31442577 MW |
337 | %if "%{initsystem}" == "systemd" |
338 | for daemon in %all_daemons ; do | |
339 | %systemd_post ${daemon}.service | |
340 | done | |
341 | %else | |
342 | for daemon in %all_daemons ; do | |
15d74e93 | 343 | /sbin/chkconfig --add ${daemon} |
344 | done | |
31442577 | 345 | %endif |
788cdc6d | 346 | |
6bd8fd3b | 347 | /sbin/install-info %{_infodir}/quagga.info.gz %{_infodir}/dir |
788cdc6d | 348 | |
349 | # Create dummy files if they don't exist so basic functions can be used. | |
350 | if [ ! -e %{_sysconfdir}/zebra.conf ]; then | |
351 | echo "hostname `hostname`" > %{_sysconfdir}/zebra.conf | |
31442577 MW |
352 | %if 0%{?quagga_user:1} |
353 | chown %quagga_user:%quagga_user %{_sysconfdir}/zebra.conf* | |
e7cd37bf | 354 | %endif |
788cdc6d | 355 | chmod 640 %{_sysconfdir}/zebra.conf |
356 | fi | |
31442577 MW |
357 | for daemon in %{all_daemons} ; do |
358 | if [ ! -e %{_sysconfdir}/${daemon}.conf ]; then | |
359 | touch %{_sysconfdir}/${daemon}.conf | |
360 | %if 0%{?quagga_user:1} | |
361 | chown %quagga_user:%quagga_user %{_sysconfdir}/${daemon}.conf* | |
362 | %endif | |
363 | fi | |
364 | done | |
365 | %if %{with_watchquagga} | |
366 | # No config for watchquagga - this is part of /etc/sysconfig/quagga | |
367 | rm -f %{_sysconfdir}/watchquagga.* | |
368 | %endif | |
369 | ||
788cdc6d | 370 | if [ ! -e %{_sysconfdir}/vtysh.conf ]; then |
371 | touch %{_sysconfdir}/vtysh.conf | |
372 | chmod 640 %{_sysconfdir}/vtysh.conf | |
31442577 MW |
373 | %if 0%{?vty_group:1} |
374 | chown quagga:%{vty_group} %{_sysconfdir}/vtysh.conf* | |
375 | %endif | |
788cdc6d | 376 | fi |
377 | ||
378 | %postun | |
fc43ecc7 | 379 | if [ "$1" -ge 1 ]; then |
380 | # Find out which daemons need to be restarted. | |
b3324e27 | 381 | for daemon in %all_daemons ; do |
31442577 MW |
382 | if [ -f /var/lock/subsys/${daemon} ]; then |
383 | eval restart_${daemon}=yes | |
fc43ecc7 | 384 | else |
31442577 | 385 | eval restart_${daemon}=no |
fc43ecc7 | 386 | fi |
15d74e93 | 387 | done |
fc43ecc7 | 388 | # Rename restart flags for daemons handled specially. |
389 | running_zebra="$restart_zebra" | |
390 | restart_zebra=no | |
31442577 MW |
391 | %if %{with_watchquagga} |
392 | running_watchquagga="$restart_watchquagga" | |
393 | restart_watchquagga=no | |
394 | %endif | |
395 | ||
396 | %if "%{initsystem}" == "systemd" | |
397 | ## | |
398 | ## Systemd Version | |
399 | ## | |
400 | # No watchquagga for systemd version | |
401 | # | |
402 | # Stop all daemons other than zebra. | |
403 | for daemon in %all_daemons ; do | |
404 | eval restart=\$restart_${daemon} | |
405 | [ "$restart" = yes ] && \ | |
406 | %systemd_postun ${daemon}.service | |
407 | done | |
408 | # Restart zebra. | |
409 | [ "$running_zebra" = yes ] && \ | |
410 | %systemd_postun_with_restart $daemon.service | |
411 | # Start all daemons other than zebra. | |
412 | for daemon in %all_daemons ; do | |
413 | eval restart=\$restart_${daemon} | |
414 | [ "$restart" = yes ] && \ | |
415 | %systemd_post ${daemon}.service | |
416 | done | |
417 | %else | |
418 | ## | |
419 | ## init.d Version | |
420 | ## | |
421 | %if %{with_watchquagga} | |
422 | # Stop watchquagga first. | |
423 | [ "$running_watchquagga" = yes ] && \ | |
424 | /etc/rc.d/init.d/watchquagga stop >/dev/null 2>&1 | |
425 | %endif | |
426 | # Stop all daemons other than zebra and watchquagga. | |
427 | for daemon in %all_daemons ; do | |
428 | eval restart=\$restart_${daemon} | |
429 | [ "$restart" = yes ] && \ | |
430 | /etc/rc.d/init.d/${daemon} stop >/dev/null 2>&1 | |
431 | done | |
432 | # Restart zebra. | |
433 | [ "$running_zebra" = yes ] && \ | |
434 | /etc/rc.d/init.d/zebra restart >/dev/null 2>&1 | |
435 | # Start all daemons other than zebra and watchquagga. | |
436 | for daemon in %all_daemons ; do | |
437 | eval restart=\$restart_${daemon} | |
438 | [ "$restart" = yes ] && \ | |
439 | /etc/rc.d/init.d/${daemon} start >/dev/null 2>&1 | |
440 | done | |
441 | %if %{with_watchquagga} | |
442 | # Start watchquagga last. | |
443 | # Avoid postun scriptlet error if watchquagga is not running. | |
444 | [ "$running_watchquagga" = yes ] && \ | |
445 | /etc/rc.d/init.d/watchquagga start >/dev/null 2>&1 || : | |
446 | %endif | |
447 | %endif | |
788cdc6d | 448 | fi |
788cdc6d | 449 | |
450 | %preun | |
31442577 MW |
451 | %if "%{initsystem}" == "systemd" |
452 | ## | |
453 | ## Systemd Version | |
454 | ## | |
455 | if [ "$1" = "0" ]; then | |
456 | for daemon in %all_daemons ; do | |
457 | %systemd_preun ${daemon}.service | |
458 | done | |
459 | fi | |
460 | %else | |
461 | ## | |
462 | ## init.d Version | |
463 | ## | |
464 | if [ "$1" = "0" ]; then | |
465 | for daemon in %all_daemons ; do | |
466 | /etc/rc.d/init.d/${daemon} stop >/dev/null 2>&1 | |
467 | /sbin/chkconfig --del ${daemon} | |
468 | done | |
469 | fi | |
470 | %endif | |
471 | /sbin/install-info --delete %{_infodir}/quagga.info.gz %{_infodir}/dir | |
788cdc6d | 472 | |
473 | %clean | |
31442577 MW |
474 | %if !0%{?keep_build:1} |
475 | rm -rf %{buildroot} | |
b5f310cb | 476 | %endif |
788cdc6d | 477 | |
478 | %files | |
479 | %defattr(-,root,root) | |
448ed4a2 | 480 | %doc */*.sample* AUTHORS COPYING |
6bd8fd3b | 481 | %doc doc/quagga.html |
30b9d89b | 482 | %doc doc/mpls |
8f754983 | 483 | %doc ChangeLog INSTALL NEWS README REPORTING-BUGS SERVICES TODO |
31442577 | 484 | %if 0%{?quagga_user:1} |
6bd8fd3b | 485 | %dir %attr(751,%quagga_user,%quagga_user) %{_sysconfdir} |
486 | %dir %attr(750,%quagga_user,%quagga_user) /var/log/quagga | |
487 | %dir %attr(751,%quagga_user,%quagga_user) /var/run/quagga | |
edd7c245 | 488 | %else |
788cdc6d | 489 | %dir %attr(750,root,root) %{_sysconfdir} |
6bd8fd3b | 490 | %dir %attr(750,root,root) /var/log/quagga |
6bd8fd3b | 491 | %dir %attr(750,root,root) /var/run/quagga |
edd7c245 | 492 | %endif |
31442577 | 493 | %if 0%{?vty_group:1} |
6bd8fd3b | 494 | %attr(750,%quagga_user,%vty_group) %{_sysconfdir}/vtysh.conf.sample |
edd7c245 | 495 | %endif |
31442577 | 496 | %{_infodir}/quagga.info.gz |
788cdc6d | 497 | %{_mandir}/man*/* |
54b25dca | 498 | %{_sbindir}/zebra |
499 | %{_sbindir}/ospfd | |
500 | %{_sbindir}/ripd | |
501 | %{_sbindir}/bgpd | |
31442577 MW |
502 | %if %{with_watchquagga} |
503 | %{_sbindir}/watchquagga | |
504 | %endif | |
54b25dca | 505 | %{_sbindir}/ripngd |
506 | %{_sbindir}/ospf6d | |
a5ca2047 PJ |
507 | %if %{with_pimd} |
508 | %{_sbindir}/pimd | |
54b25dca | 509 | %endif |
510 | %if %{with_isisd} | |
511 | %{_sbindir}/isisd | |
512 | %endif | |
28f79728 | 513 | %if %{with_shared} |
31442577 MW |
514 | %attr(755,root,root) %{_libdir}/lib*.so |
515 | %attr(755,root,root) %{_libdir}/lib*.so.* | |
54b25dca | 516 | %endif |
517 | %if %{with_vtysh} | |
788cdc6d | 518 | %{_bindir}/* |
d7ccae28 | 519 | %endif |
6bd8fd3b | 520 | %config /etc/quagga/[!v]* |
31442577 MW |
521 | %if "%{initsystem}" == "systemd" |
522 | %config %{_unitdir}/*.service | |
523 | %else | |
524 | %config /etc/rc.d/init.d/zebra | |
525 | %if %{with_watchquagga} | |
526 | %config /etc/rc.d/init.d/watchquagga | |
527 | %endif | |
528 | %config /etc/rc.d/init.d/ripd | |
529 | %config /etc/rc.d/init.d/ospfd | |
530 | %config /etc/rc.d/init.d/bgpd | |
531 | %config /etc/rc.d/init.d/ripngd | |
532 | %config /etc/rc.d/init.d/ospf6d | |
533 | %if %{with_isisd} | |
534 | %config /etc/rc.d/init.d/isisd | |
535 | %endif | |
536 | %if %{with_pimd} | |
537 | %config /etc/rc.d/init.d/pimd | |
538 | %endif | |
539 | %endif | |
15d74e93 | 540 | %config(noreplace) /etc/sysconfig/quagga |
6bd8fd3b | 541 | %config(noreplace) /etc/pam.d/quagga |
788cdc6d | 542 | %config(noreplace) %attr(640,root,root) /etc/logrotate.d/* |
543 | ||
448ed4a2 | 544 | %files contrib |
545 | %defattr(-,root,root) | |
546 | %doc tools | |
547 | ||
e0626854 | 548 | %files devel |
549 | %defattr(-,root,root) | |
da29c6b0 | 550 | %if %{with_ospfclient} |
551 | %{_sbindir}/ospfclient | |
552 | %endif | |
28f79728 | 553 | %{_libdir}/*.a |
554 | %{_libdir}/*.la | |
cfc1842b | 555 | %dir %attr(755,root,root) %{_includedir}/%{name} |
28f79728 | 556 | %{_includedir}/%name/*.h |
cfc1842b | 557 | %dir %attr(755,root,root) %{_includedir}/%{name}/ospfd |
28f79728 | 558 | %{_includedir}/%name/ospfd/*.h |
54b25dca | 559 | %if %{with_ospfapi} |
cfc1842b | 560 | %dir %attr(755,root,root) %{_includedir}/%{name}/ospfapi |
28f79728 | 561 | %{_includedir}/%name/ospfapi/*.h |
68980084 | 562 | %endif |
e0626854 | 563 | |
788cdc6d | 564 | %changelog |
31442577 | 565 | * Thu Feb 11 2016 Paul Jakma <paul@jakma.org> - %{version} |
a5ca2047 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 | ||
31442577 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 | |
579 | - Only allow use of watchquagga for non-systemd systems. no need with systemd | |
580 | ||
581 | * Fri Sep 4 2015 Paul Jakma <paul@jakma.org> | |
f104b1d9 PJ |
582 | - buildreq updates |
583 | - add a default define for with_pimd | |
584 | ||
31442577 | 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> |
600 | - watchquagga added | |
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) | |
31442577 | 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 | ||
31442577 | 650 | * Thu Mar 20 2003 Paul Jakma <paul@dishone.st> |
edd7c245 | 651 | - zebra privileges support |
652 | ||
31442577 | 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 | |
31442577 | 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 | ||
31442577 | 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. |