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