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