]>
Commit | Line | Data |
---|---|---|
edd7c245 | 1 | # configure options |
68980084 | 2 | %define with_snmp 0 |
788cdc6d | 3 | %define with_vtysh 1 |
4 | %define with_ospf_te 1 | |
5 | %define with_nssa 1 | |
6 | %define with_opaque_lsa 1 | |
7 | %define with_tcp_zebra 0 | |
8 | %define with_vtysh 1 | |
9 | %define with_pam 1 | |
10 | %define with_ipv6 1 | |
55ea381f | 11 | %define with_ospfclient 1 |
12 | %define with_ospfapi 1 | |
8f754983 | 13 | %define with_multipath 64 |
6bd8fd3b | 14 | %define quagga_user quagga |
45315b5d | 15 | %define vty_group quaggavty |
30b9d89b | 16 | |
17 | # path defines | |
6bd8fd3b | 18 | %define _sysconfdir /etc/quagga |
8f754983 | 19 | %define zeb_src %{_builddir}/%{name}-%{version} |
20 | %define zeb_rh_src %{zeb_src}/redhat | |
21 | %define zeb_docs %{zeb_src}/doc | |
788cdc6d | 22 | |
e0626854 | 23 | # defines for configure |
6bd8fd3b | 24 | %define _libexecdir %{_exec_prefix}/libexec/quagga |
6bd8fd3b | 25 | %define _libdir %{_exec_prefix}/%{_lib}/quagga |
15d74e93 | 26 | %define _includedir %{_prefix}/include |
6bd8fd3b | 27 | %define _localstatedir /var/run/quagga |
e0626854 | 28 | |
15d74e93 | 29 | # misc internal defines |
30 | %define quagga_uid 92 | |
31 | %define quagga_gid 92 | |
32 | %if %with_ipv6 | |
33 | %define daemon_list zebra ripd isisd ospfd ripngd ospf6d bgpd | |
34 | %else | |
35 | %define daemon_list zebra ripd isisd ospfd bgpd | |
36 | %endif | |
37 | ||
788cdc6d | 38 | Summary: Routing daemon |
6bd8fd3b | 39 | Name: quagga |
6382b6f8 | 40 | Version: @VERSION@ |
edd7c245 | 41 | Release: @CONFDATE@01 |
788cdc6d | 42 | License: GPL |
43 | Group: System Environment/Daemons | |
6bd8fd3b | 44 | Source0: http://www.quagga.net/snapshots/cvs/%{name}-%{version}.tar.gz |
45 | URL: http://www.quagga.net | |
788cdc6d | 46 | %if %with_snmp |
15d74e93 | 47 | BuildRequires: ucd-snmp-devel |
788cdc6d | 48 | Prereq: ucd-snmp |
49 | %endif | |
d7ccae28 | 50 | %if %with_vtysh |
30b9d89b | 51 | BuildRequires: readline readline-devel ncurses ncurses-devel |
d7ccae28 | 52 | Prereq: readline ncurses |
53 | %endif | |
15d74e93 | 54 | BuildRequires: texinfo tetex autoconf pam-devel patch libcap-devel |
788cdc6d | 55 | # Initscripts > 5.60 is required for IPv6 support |
30b9d89b | 56 | Prereq: initscripts >= 5.60 |
45315b5d | 57 | Prereq: ncurses readline pam |
788cdc6d | 58 | Prereq: /sbin/install-info |
59 | Provides: routingdaemon | |
60 | BuildRoot: %{_tmppath}/%{name}-%{version}-root | |
6bd8fd3b | 61 | Obsoletes: bird gated mrt zebra |
788cdc6d | 62 | |
63 | %description | |
6bd8fd3b | 64 | Quagga is a free software that manages TCP/IP based routing |
788cdc6d | 65 | protocol. It takes multi-server and multi-thread approach to resolve |
66 | the current complexity of the Internet. | |
67 | ||
6bd8fd3b | 68 | Quagga supports BGP4, BGP4+, OSPFv2, OSPFv3, RIPv1, RIPv2, and RIPng. |
788cdc6d | 69 | |
6bd8fd3b | 70 | Quagga is intended to be used as a Route Server and a Route Reflector. It is |
71 | not a toolkit, it provides full routing power under a new architecture. | |
72 | Quagga by design has a process for each protocol. | |
73 | ||
74 | Quagga is a fork of GNU Zebra. | |
788cdc6d | 75 | |
448ed4a2 | 76 | %package contrib |
6bd8fd3b | 77 | Summary: contrib tools for quagga |
448ed4a2 | 78 | Group: System Environment/Daemons |
79 | ||
80 | %description contrib | |
6bd8fd3b | 81 | Contributed/3rd party tools which may be of use with quagga. |
448ed4a2 | 82 | |
e0626854 | 83 | %package devel |
6bd8fd3b | 84 | Summary: Header and object files for quagga development |
e0626854 | 85 | Group: System Environment/Daemons |
86 | ||
87 | %description devel | |
6bd8fd3b | 88 | The quagga-devel package contains the header and object files neccessary for |
89 | developing OSPF-API and quagga applications. | |
e0626854 | 90 | |
788cdc6d | 91 | %prep |
92 | %setup -q | |
788cdc6d | 93 | |
94 | %build | |
95 | %configure \ | |
788cdc6d | 96 | %if %with_ipv6 |
97 | --enable-ipv6 \ | |
98 | %endif | |
99 | %if %with_snmp | |
100 | --enable-snmp \ | |
101 | %endif | |
102 | %if %with_multipath | |
103 | --enable-multipath=%with_multipath \ | |
104 | %endif | |
105 | %if %with_tcp_zebra | |
106 | --enable-tcp-zebra \ | |
107 | %endif | |
108 | %if %with_nssa | |
109 | --enable-nssa \ | |
110 | %endif | |
111 | %if %with_opaque_lsa | |
112 | --enable-opaque-lsa \ | |
113 | %endif | |
114 | %if %with_ospf_te | |
115 | --enable-ospf-te \ | |
116 | %endif | |
117 | %if %with_vtysh | |
118 | --enable-vtysh \ | |
119 | %endif | |
68980084 | 120 | %if %with_ospfclient |
121 | --enable-ospfclient=yes \ | |
122 | %else | |
123 | --enable-ospfclient=no\ | |
124 | %endif | |
125 | %if %with_ospfapi | |
126 | --enable-ospfapi=yes \ | |
127 | %else | |
128 | --enable-ospfapi=no \ | |
129 | %endif | |
788cdc6d | 130 | %if %with_pam |
edd7c245 | 131 | --with-libpam \ |
788cdc6d | 132 | %endif |
6bd8fd3b | 133 | %if %quagga_user |
134 | --enable-user=%quagga_user \ | |
135 | --enable-group=%quagga_user \ | |
edd7c245 | 136 | %endif |
137 | %if %vty_group | |
138 | --enable-vty-group=%vty_group \ | |
139 | %endif | |
edd7c245 | 140 | --enable-netlink |
788cdc6d | 141 | |
142 | make %{?_smp_mflags} MAKEINFO="makeinfo --no-split" | |
143 | ||
144 | pushd doc | |
6bd8fd3b | 145 | texi2html quagga.texi |
788cdc6d | 146 | popd |
147 | ||
148 | %install | |
149 | rm -rf $RPM_BUILD_ROOT | |
150 | ||
151 | install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,logrotate.d,pam.d} \ | |
6bd8fd3b | 152 | $RPM_BUILD_ROOT/var/log/quagga $RPM_BUILD_ROOT%{_infodir} |
788cdc6d | 153 | |
154 | make install \ | |
155 | DESTDIR=$RPM_BUILD_ROOT | |
156 | ||
9a344b74 | 157 | # Remove this file, as it is uninstalled and causes errors when building on RH9 |
158 | rm -rf $RPM_BUILD_ROOT/usr/share/info/dir | |
159 | ||
15d74e93 | 160 | # install etc sources |
161 | for daemon in %daemon_list ; do | |
162 | install %{zeb_rh_src}/${daemon}.init \ | |
163 | $RPM_BUILD_ROOT/etc/rc.d/init.d/${daemon} | |
164 | done | |
165 | install -m644 %{zeb_rh_src}/quagga.pam \ | |
166 | $RPM_BUILD_ROOT/etc/pam.d/quagga | |
167 | install -m644 %{zeb_rh_src}/quagga.logrotate \ | |
168 | $RPM_BUILD_ROOT/etc/logrotate.d/quagga | |
169 | install -m644 %{zeb_rh_src}/quagga.sysconfig \ | |
170 | $RPM_BUILD_ROOT/etc/sysconfig/quagga | |
6bd8fd3b | 171 | install -d -m750 $RPM_BUILD_ROOT/var/run/quagga |
edd7c245 | 172 | |
173 | %pre | |
174 | # add vty_group | |
175 | %if %vty_group | |
176 | groupadd -r %vty_group 2> /dev/null || : | |
177 | %endif | |
6bd8fd3b | 178 | # add quagga user and group |
179 | %if %quagga_user | |
15d74e93 | 180 | /usr/sbin/groupadd -g %quagga_gid quagga 2> /dev/null || : |
181 | /usr/sbin/useradd -u %quagga_uid -g %quagga_gid \ | |
182 | -M -r -s /sbin/nologin -c "Quagga routing suite" \ | |
6bd8fd3b | 183 | -d %_localstatedir %quagga_user 2> /dev/null || : |
edd7c245 | 184 | %endif |
788cdc6d | 185 | |
788cdc6d | 186 | %post |
30b9d89b | 187 | # zebra_spec_add_service <service name> <port/proto> <comment> |
788cdc6d | 188 | # e.g. zebra_spec_add_service zebrasrv 2600/tcp "zebra service" |
189 | ||
190 | zebra_spec_add_service () | |
191 | { | |
192 | # Add port /etc/services entry if it isn't already there | |
193 | if [ -f /etc/services ] && ! grep -q "^$1[^a-zA-Z0-9]" /etc/services ; then | |
194 | echo "$1 $2 # $3" >> /etc/services | |
195 | fi | |
196 | } | |
197 | ||
198 | zebra_spec_add_service zebrasrv 2600/tcp "zebra service" | |
199 | zebra_spec_add_service zebra 2601/tcp "zebra vty" | |
200 | zebra_spec_add_service ripd 2602/tcp "RIPd vty" | |
d7ccae28 | 201 | %if %with_ipv6 |
788cdc6d | 202 | zebra_spec_add_service ripngd 2603/tcp "RIPngd vty" |
d7ccae28 | 203 | %endif |
788cdc6d | 204 | zebra_spec_add_service ospfd 2604/tcp "OSPFd vty" |
205 | zebra_spec_add_service bgpd 2605/tcp "BGPd vty" | |
d7ccae28 | 206 | %if %with_ipv6 |
788cdc6d | 207 | zebra_spec_add_service ospf6d 2606/tcp "OSPF6d vty" |
d7ccae28 | 208 | %endif |
7021c425 | 209 | %if %with_ospfapi |
210 | zebra_spec_add_service ospfapi 2607/tcp "OSPF-API" | |
211 | %endif | |
5a514b14 | 212 | zebra_spec_add_service isisd 2608/tcp "ISISd vty" |
788cdc6d | 213 | |
15d74e93 | 214 | for daemon in %daemon_list ; do |
215 | /sbin/chkconfig --add ${daemon} | |
216 | done | |
788cdc6d | 217 | |
6bd8fd3b | 218 | /sbin/install-info %{_infodir}/quagga.info.gz %{_infodir}/dir |
788cdc6d | 219 | |
220 | # Create dummy files if they don't exist so basic functions can be used. | |
221 | if [ ! -e %{_sysconfdir}/zebra.conf ]; then | |
222 | echo "hostname `hostname`" > %{_sysconfdir}/zebra.conf | |
223 | chmod 640 %{_sysconfdir}/zebra.conf | |
224 | fi | |
225 | if [ ! -e %{_sysconfdir}/vtysh.conf ]; then | |
226 | touch %{_sysconfdir}/vtysh.conf | |
227 | chmod 640 %{_sysconfdir}/vtysh.conf | |
228 | fi | |
229 | ||
230 | %postun | |
231 | if [ "$1" -ge "1" ]; then | |
15d74e93 | 232 | for daemon in %daemon_list ; do |
233 | /etc/rc.d/init.d/${daemon} condrestart >/dev/null 2>&1 | |
234 | done | |
788cdc6d | 235 | fi |
788cdc6d | 236 | |
237 | %preun | |
238 | if [ "$1" = "0" ]; then | |
15d74e93 | 239 | for daemon in %daemon_list ; do |
240 | /etc/rc.d/init.d/${daemon} stop >/dev/null 2>&1 | |
241 | /sbin/chkconfig --del ${daemon} | |
242 | done | |
243 | /sbin/install-info --delete %{_infodir}/quagga.info.gz %{_infodir}/dir | |
788cdc6d | 244 | fi |
245 | ||
246 | %clean | |
247 | #rm -rf $RPM_BUILD_ROOT | |
248 | ||
249 | %files | |
250 | %defattr(-,root,root) | |
448ed4a2 | 251 | %doc */*.sample* AUTHORS COPYING |
6bd8fd3b | 252 | %doc doc/quagga.html |
30b9d89b | 253 | %doc doc/mpls |
8f754983 | 254 | %doc ChangeLog INSTALL NEWS README REPORTING-BUGS SERVICES TODO |
6bd8fd3b | 255 | %if %quagga_user |
256 | %dir %attr(751,%quagga_user,%quagga_user) %{_sysconfdir} | |
257 | %dir %attr(750,%quagga_user,%quagga_user) /var/log/quagga | |
258 | %dir %attr(751,%quagga_user,%quagga_user) /var/run/quagga | |
edd7c245 | 259 | %else |
788cdc6d | 260 | %dir %attr(750,root,root) %{_sysconfdir} |
6bd8fd3b | 261 | %dir %attr(750,root,root) /var/log/quagga |
788cdc6d | 262 | %dir %attr(755,root,root) /usr/share/info |
6bd8fd3b | 263 | %dir %attr(750,root,root) /var/run/quagga |
edd7c245 | 264 | %endif |
265 | %if %vty_group | |
6bd8fd3b | 266 | %attr(750,%quagga_user,%vty_group) %{_sysconfdir}/vtysh.conf.sample |
edd7c245 | 267 | %endif |
788cdc6d | 268 | %{_infodir}/*info* |
269 | %{_mandir}/man*/* | |
270 | %{_sbindir}/* | |
d7ccae28 | 271 | %if %with_vtysh |
788cdc6d | 272 | %{_bindir}/* |
d7ccae28 | 273 | %endif |
6bd8fd3b | 274 | %config /etc/quagga/[!v]* |
788cdc6d | 275 | %config /etc/rc.d/init.d/* |
15d74e93 | 276 | %config(noreplace) /etc/sysconfig/quagga |
6bd8fd3b | 277 | %config(noreplace) /etc/pam.d/quagga |
788cdc6d | 278 | %config(noreplace) %attr(640,root,root) /etc/logrotate.d/* |
279 | ||
448ed4a2 | 280 | %files contrib |
281 | %defattr(-,root,root) | |
282 | %doc tools | |
283 | ||
e0626854 | 284 | %files devel |
285 | %defattr(-,root,root) | |
286 | %dir %{_libdir}/* | |
15d74e93 | 287 | %dir %{_includedir}/%name/*.h |
288 | %dir %{_includedir}/%name/ospfd/*.h | |
68980084 | 289 | %if %with_ospfapi |
15d74e93 | 290 | %dir %{_includedir}/%name/ospfapi/*.h |
68980084 | 291 | %endif |
e0626854 | 292 | |
788cdc6d | 293 | %changelog |
15d74e93 | 294 | %changelog |
00bc5603 | 295 | * Thu Jan 08 2004 Paul Jakma <paul@dishone.st> |
296 | - updated sysconfig files to specify local dir | |
297 | - added ospf_dump.c crash quick fix patch | |
298 | - added ospfd persistent interface configuration patch | |
299 | ||
15d74e93 | 300 | * Tue Dec 30 2003 Paul Jakma <paul@dishone.st> |
301 | - sync to CVS | |
302 | - integrate RH sysconfig patch to specify daemon options (RH) | |
303 | - default to have vty listen only to 127.1 (RH) | |
304 | - add user with fixed UID/GID (RH) | |
305 | - create user with shell /sbin/nologin rather than /bin/false (RH) | |
306 | - stop daemons on uninstall (RH) | |
307 | - delete info file on %preun, not %postun to avoid deletion on upgrade. (RH) | |
308 | - isisd added | |
309 | - cleanup tasks carried out for every daemon | |
310 | ||
406f7000 | 311 | * Sun Nov 2 2003 Paul Jakma <paul@dishone.st> |
312 | - Fix -devel package to include all files | |
313 | - Sync to 0.96.4 | |
314 | ||
6bd8fd3b | 315 | * Tue Aug 12 2003 Paul Jakma <paul@dishone.st> |
316 | - Renamed to Quagga | |
317 | - Sync to Quagga release 0.96 | |
318 | ||
edd7c245 | 319 | * Tue Mar 20 2003 Paul Jakma <paul@dishone.st> |
320 | - zebra privileges support | |
321 | ||
e0626854 | 322 | * Mon Mar 18 2003 Paul Jakma <paul@dishone.st> |
323 | - Fix mem leak in 'show thread cpu' | |
324 | - Ralph Keller's OSPF-API | |
325 | - Amir: Fix configure.ac for net-snmp | |
326 | ||
448ed4a2 | 327 | * Sat Mar 1 2003 Paul Jakma <paul@dishone.st> |
328 | - ospfd IOS prefix to interface matching for 'network' statement | |
329 | - temporary fix for PtP and IPv6 | |
330 | - sync to zebra.org CVS | |
331 | ||
8f754983 | 332 | * Mon Jan 20 2003 Paul Jakma <paul@dishone.st> |
333 | - update to latest cvs | |
334 | - Yon's "show thread cpu" patch - 17217 | |
335 | - walk up tree - 17218 | |
336 | - ospfd NSSA fixes - 16681 | |
337 | - ospfd nsm fixes - 16824 | |
338 | - ospfd OLSA fixes and new feature - 16823 | |
339 | - KAME and ifindex fixes - 16525 | |
340 | - spec file changes to allow redhat files to be in tree | |
341 | ||
d7ccae28 | 342 | * Sat Dec 28 2002 Alexander Hoogerhuis <alexh@ihatent.com> |
343 | - Added conditionals for building with(out) IPv6, vtysh, RIP, BGP | |
344 | - Fixed up some build requirements (patch) | |
345 | - Added conditional build requirements for vtysh / snmp | |
346 | - Added conditional to %files for %_bindir depending on vtysh | |
347 | ||
788cdc6d | 348 | * Mon Nov 11 2002 Paul Jakma <paulj@alphyra.ie> |
349 | - update to latest CVS | |
350 | - add Greg Troxel's md5 buffer copy/dup fix | |
351 | - add RIPv1 fix | |
352 | - add Frank's multicast flag fix | |
353 | ||
354 | * Wed Oct 09 2002 Paul Jakma <paulj@alphyra.ie> | |
355 | - update to latest CVS | |
356 | - timestamped crypt_seqnum patch | |
357 | - oi->on_write_q fix | |
358 | ||
359 | * Mon Sep 30 2002 Paul Jakma <paulj@alphyra.ie> | |
360 | - update to latest CVS | |
361 | - add vtysh 'write-config (integrated|daemon)' patch | |
362 | - always 'make rebuild' in vtysh/ to catch new commands | |
363 | ||
364 | * Fri Sep 13 2002 Paul Jakma <paulj@alphyra.ie> | |
365 | - update to 0.93b | |
366 | ||
367 | * Wed Sep 11 2002 Paul Jakma <paulj@alphyra.ie> | |
368 | - update to latest CVS | |
369 | - add "/sbin/ip route flush proto zebra" to zebra RH init on startup | |
370 | ||
371 | * Sat Aug 24 2002 Paul Jakma <paulj@alphyra.ie> | |
372 | - update to current CVS | |
373 | - add OSPF point to multipoint patch | |
374 | - add OSPF bugfixes | |
375 | - add BGP hash optimisation patch | |
376 | ||
377 | * Fri Jun 14 2002 Paul Jakma <paulj@alphyra.ie> | |
378 | - update to 0.93-pre1 / CVS | |
379 | - add link state detection support | |
380 | - add generic PtP and RFC3021 support | |
381 | - various bug fixes | |
382 | ||
383 | * Thu Aug 09 2001 Elliot Lee <sopwith@redhat.com> 0.91a-6 | |
384 | - Fix bug #51336 | |
385 | ||
386 |