paul | edd7c24 | 2003-06-04 13:59:38 +0000 | [diff] [blame] | 1 | # configure options |
paul | b64d92a | 2005-04-25 15:13:42 +0000 | [diff] [blame] | 2 | # |
| 3 | # Some can be overriden on rpmbuild commandline with: |
| 4 | # rpmbuild --define 'variable value' |
| 5 | # |
| 6 | |
| 7 | %{!?with_snmp: %define with_snmp 1 } |
| 8 | %{!?with_vtysh: %define with_vtysh 1 } |
| 9 | %{!?with_ospf_te: %define with_ospf_te 1 } |
| 10 | %{!?with_nssa: %define with_nssa 1 } |
| 11 | %{!?with_opaque_lsa: %define with_opaque_lsa 1 } |
| 12 | %{!?with_tcp_zebra: %define with_tcp_zebra 0 } |
| 13 | %{!?with_vtysh: %define with_vtysh 1 } |
| 14 | %{!?with_pam: %define with_pam 1 } |
| 15 | %{!?with_ipv6: %define with_ipv6 1 } |
| 16 | %{!?with_ospfclient: %define with_ospfclient 1 } |
| 17 | %{!?with_ospfapi: %define with_ospfapi 1 } |
| 18 | %{!?with_irdp: %define with_irdp 1 } |
paul | 9edbc8f | 2005-04-26 02:23:44 +0000 | [diff] [blame] | 19 | %{!?with_isisd: %define with_isisd 1 } |
paul | b64d92a | 2005-04-25 15:13:42 +0000 | [diff] [blame] | 20 | %{!?with_shared: %define with_shared 1 } |
| 21 | %{!?with_multipath: %define with_multipath 64 } |
| 22 | %{!?quagga_user: %define quagga_user quagga } |
| 23 | %{!?vty_group: %define vty_group quaggavty } |
paul | 30b9d89 | 2003-01-18 22:57:15 +0000 | [diff] [blame] | 24 | |
| 25 | # path defines |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 26 | %define _sysconfdir /etc/quagga |
paul | 8f75498 | 2003-01-20 04:55:51 +0000 | [diff] [blame] | 27 | %define zeb_src %{_builddir}/%{name}-%{version} |
| 28 | %define zeb_rh_src %{zeb_src}/redhat |
| 29 | %define zeb_docs %{zeb_src}/doc |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 30 | |
paul | e062685 | 2003-03-18 14:11:36 +0000 | [diff] [blame] | 31 | # defines for configure |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 32 | %define _libexecdir %{_exec_prefix}/libexec/quagga |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 33 | %define _libdir %{_exec_prefix}/%{_lib}/quagga |
paul | 15d74e9 | 2003-12-30 11:16:21 +0000 | [diff] [blame] | 34 | %define _includedir %{_prefix}/include |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 35 | %define _localstatedir /var/run/quagga |
paul | e062685 | 2003-03-18 14:11:36 +0000 | [diff] [blame] | 36 | |
paul | 15d74e9 | 2003-12-30 11:16:21 +0000 | [diff] [blame] | 37 | # misc internal defines |
paul | b64d92a | 2005-04-25 15:13:42 +0000 | [diff] [blame] | 38 | %{!?quagga_uid: %define quagga_uid 92 } |
| 39 | %{!?quagga_gid: %define quagga_gid 92 } |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 40 | %define daemon_list zebra ripd ospfd bgpd |
paul | 0df63b5 | 2004-11-07 22:12:23 +0000 | [diff] [blame] | 41 | |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 42 | %if %{with_ipv6} |
ajs | f393175 | 2004-12-23 00:00:58 +0000 | [diff] [blame] | 43 | %define daemonv6_list ripngd ospf6d |
paul | 0df63b5 | 2004-11-07 22:12:23 +0000 | [diff] [blame] | 44 | %else |
| 45 | %define daemonv6_list "" |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 46 | %endif |
paul | 0df63b5 | 2004-11-07 22:12:23 +0000 | [diff] [blame] | 47 | |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 48 | %if %{with_isisd} |
paul | 69f5d26 | 2004-10-07 16:23:36 +0000 | [diff] [blame] | 49 | %define daemon_other isisd |
| 50 | %else |
| 51 | %define daemon_other "" |
paul | 15d74e9 | 2003-12-30 11:16:21 +0000 | [diff] [blame] | 52 | %endif |
| 53 | |
ajs | b3324e2 | 2004-12-22 17:52:29 +0000 | [diff] [blame] | 54 | %define all_daemons %{daemon_list} %{daemonv6_list} %{daemon_other} watchquagga |
| 55 | |
paul | b5f310c | 2004-09-13 13:15:25 +0000 | [diff] [blame] | 56 | # allow build dir to be kept |
paul | b64d92a | 2005-04-25 15:13:42 +0000 | [diff] [blame] | 57 | %{!?keep_build: %define keep_build 0 } |
paul | b5f310c | 2004-09-13 13:15:25 +0000 | [diff] [blame] | 58 | |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 59 | Summary: Routing daemon |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 60 | Name: quagga |
paul | 6382b6f | 2003-05-20 00:17:45 +0000 | [diff] [blame] | 61 | Version: @VERSION@ |
paul | edd7c24 | 2003-06-04 13:59:38 +0000 | [diff] [blame] | 62 | Release: @CONFDATE@01 |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 63 | License: GPL |
| 64 | Group: System Environment/Daemons |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 65 | Source0: http://www.quagga.net/snapshots/cvs/%{name}-%{version}.tar.gz |
| 66 | URL: http://www.quagga.net |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 67 | %if %{with_snmp} |
paul | b63cef7 | 2004-08-19 03:36:13 +0000 | [diff] [blame] | 68 | BuildRequires: net-snmp-devel |
| 69 | Prereq: net-snmp |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 70 | %endif |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 71 | %if %{with_vtysh} |
paul | 30b9d89 | 2003-01-18 22:57:15 +0000 | [diff] [blame] | 72 | BuildRequires: readline readline-devel ncurses ncurses-devel |
paul | d7ccae2 | 2003-01-18 00:24:00 +0000 | [diff] [blame] | 73 | Prereq: readline ncurses |
| 74 | %endif |
paul | 15d74e9 | 2003-12-30 11:16:21 +0000 | [diff] [blame] | 75 | BuildRequires: texinfo tetex autoconf pam-devel patch libcap-devel |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 76 | # Initscripts > 5.60 is required for IPv6 support |
paul | 30b9d89 | 2003-01-18 22:57:15 +0000 | [diff] [blame] | 77 | Prereq: initscripts >= 5.60 |
paul | 45315b5 | 2003-08-14 05:23:50 +0000 | [diff] [blame] | 78 | Prereq: ncurses readline pam |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 79 | Prereq: /sbin/install-info |
| 80 | Provides: routingdaemon |
| 81 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 82 | Obsoletes: bird gated mrt zebra |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 83 | |
| 84 | %description |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 85 | Quagga is a free software that manages TCP/IP based routing |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 86 | protocol. It takes multi-server and multi-thread approach to resolve |
| 87 | the current complexity of the Internet. |
| 88 | |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 89 | Quagga supports BGP4, BGP4+, OSPFv2, OSPFv3, RIPv1, RIPv2, and RIPng. |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 90 | |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 91 | Quagga is intended to be used as a Route Server and a Route Reflector. It is |
| 92 | not a toolkit, it provides full routing power under a new architecture. |
| 93 | Quagga by design has a process for each protocol. |
| 94 | |
| 95 | Quagga is a fork of GNU Zebra. |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 96 | |
paul | 448ed4a | 2003-03-01 15:43:28 +0000 | [diff] [blame] | 97 | %package contrib |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 98 | Summary: contrib tools for quagga |
paul | 448ed4a | 2003-03-01 15:43:28 +0000 | [diff] [blame] | 99 | Group: System Environment/Daemons |
| 100 | |
| 101 | %description contrib |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 102 | Contributed/3rd party tools which may be of use with quagga. |
paul | 448ed4a | 2003-03-01 15:43:28 +0000 | [diff] [blame] | 103 | |
paul | e062685 | 2003-03-18 14:11:36 +0000 | [diff] [blame] | 104 | %package devel |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 105 | Summary: Header and object files for quagga development |
paul | e062685 | 2003-03-18 14:11:36 +0000 | [diff] [blame] | 106 | Group: System Environment/Daemons |
| 107 | |
| 108 | %description devel |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 109 | The quagga-devel package contains the header and object files neccessary for |
| 110 | developing OSPF-API and quagga applications. |
paul | e062685 | 2003-03-18 14:11:36 +0000 | [diff] [blame] | 111 | |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 112 | %prep |
| 113 | %setup -q |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 114 | |
| 115 | %build |
ajs | 7966b97 | 2004-11-10 22:02:05 +0000 | [diff] [blame] | 116 | |
| 117 | # For standard gcc verbosity, uncomment these lines: |
| 118 | #CFLAGS="%{optflags} -Wall -Wsign-compare -Wpointer-arith" |
| 119 | #CFLAGS="${CFLAGS} -Wbad-function-cast -Wwrite-strings" |
| 120 | |
| 121 | # For ultra gcc verbosity, uncomment these lines also: |
| 122 | #CFLAGS="${CFLAGS} -W -Wcast-qual -Wstrict-prototypes" |
| 123 | #CFLAGS="${CFLAGS} -Wmissing-declarations -Wmissing-noreturn" |
| 124 | #CFLAGS="${CFLAGS} -Wmissing-format-attribute -Wunreachable-code" |
| 125 | #CFLAGS="${CFLAGS} -Wpacked -Wpadded" |
| 126 | |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 127 | %configure \ |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 128 | %if !%{with_shared} |
| 129 | --disable-shared \ |
| 130 | %endif |
| 131 | %if %{with_ipv6} |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 132 | --enable-ipv6 \ |
| 133 | %endif |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 134 | %if %{with_snmp} |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 135 | --enable-snmp \ |
| 136 | %endif |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 137 | %if %{with_multipath} |
| 138 | --enable-multipath=%{with_multipath} \ |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 139 | %endif |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 140 | %if %{with_tcp_zebra} |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 141 | --enable-tcp-zebra \ |
| 142 | %endif |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 143 | %if %{with_nssa} |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 144 | --enable-nssa \ |
| 145 | %endif |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 146 | %if %{with_opaque_lsa} |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 147 | --enable-opaque-lsa \ |
| 148 | %endif |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 149 | %if %{with_ospf_te} |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 150 | --enable-ospf-te \ |
| 151 | %endif |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 152 | %if %{with_vtysh} |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 153 | --enable-vtysh \ |
| 154 | %endif |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 155 | %if %{with_ospfclient} |
paul | 6898008 | 2003-03-25 05:07:42 +0000 | [diff] [blame] | 156 | --enable-ospfclient=yes \ |
| 157 | %else |
| 158 | --enable-ospfclient=no\ |
| 159 | %endif |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 160 | %if %{with_ospfapi} |
paul | 6898008 | 2003-03-25 05:07:42 +0000 | [diff] [blame] | 161 | --enable-ospfapi=yes \ |
| 162 | %else |
| 163 | --enable-ospfapi=no \ |
| 164 | %endif |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 165 | %if %{with_irdp} |
paul | 5b81926 | 2004-07-28 14:11:55 +0000 | [diff] [blame] | 166 | --enable-irdp=yes \ |
| 167 | %else |
| 168 | --enable-irdp=no \ |
| 169 | %endif |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 170 | %if %{with_isisd} |
| 171 | --enable-isisd \ |
| 172 | %else |
paul | 69f5d26 | 2004-10-07 16:23:36 +0000 | [diff] [blame] | 173 | --disable-isisd \ |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 174 | %endif |
| 175 | %if %{with_pam} |
paul | edd7c24 | 2003-06-04 13:59:38 +0000 | [diff] [blame] | 176 | --with-libpam \ |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 177 | %endif |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 178 | %if %quagga_user |
| 179 | --enable-user=%quagga_user \ |
| 180 | --enable-group=%quagga_user \ |
paul | edd7c24 | 2003-06-04 13:59:38 +0000 | [diff] [blame] | 181 | %endif |
| 182 | %if %vty_group |
| 183 | --enable-vty-group=%vty_group \ |
| 184 | %endif |
ajs | fc43ecc | 2005-01-12 16:41:33 +0000 | [diff] [blame] | 185 | --enable-netlink --enable-gcc-rdynamic |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 186 | |
| 187 | make %{?_smp_mflags} MAKEINFO="makeinfo --no-split" |
| 188 | |
| 189 | pushd doc |
paul | 36002ae | 2004-11-08 17:36:29 +0000 | [diff] [blame] | 190 | makeinfo --no-split --html -o quagga.html quagga.texi |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 191 | popd |
| 192 | |
| 193 | %install |
| 194 | rm -rf $RPM_BUILD_ROOT |
| 195 | |
| 196 | install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,logrotate.d,pam.d} \ |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 197 | $RPM_BUILD_ROOT/var/log/quagga $RPM_BUILD_ROOT%{_infodir} |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 198 | |
| 199 | make install \ |
| 200 | DESTDIR=$RPM_BUILD_ROOT |
| 201 | |
paul | 9a344b7 | 2003-08-05 23:24:58 +0000 | [diff] [blame] | 202 | # Remove this file, as it is uninstalled and causes errors when building on RH9 |
| 203 | rm -rf $RPM_BUILD_ROOT/usr/share/info/dir |
| 204 | |
paul | 15d74e9 | 2003-12-30 11:16:21 +0000 | [diff] [blame] | 205 | # install etc sources |
ajs | b3324e2 | 2004-12-22 17:52:29 +0000 | [diff] [blame] | 206 | for daemon in %{all_daemons} ; do |
paul | da29c6b | 2004-10-08 00:49:09 +0000 | [diff] [blame] | 207 | if [ x"${daemon}" != x"" ] ; then |
| 208 | install %{zeb_rh_src}/${daemon}.init \ |
| 209 | $RPM_BUILD_ROOT/etc/rc.d/init.d/${daemon} |
| 210 | fi |
paul | 15d74e9 | 2003-12-30 11:16:21 +0000 | [diff] [blame] | 211 | done |
| 212 | install -m644 %{zeb_rh_src}/quagga.pam \ |
| 213 | $RPM_BUILD_ROOT/etc/pam.d/quagga |
| 214 | install -m644 %{zeb_rh_src}/quagga.logrotate \ |
| 215 | $RPM_BUILD_ROOT/etc/logrotate.d/quagga |
| 216 | install -m644 %{zeb_rh_src}/quagga.sysconfig \ |
| 217 | $RPM_BUILD_ROOT/etc/sysconfig/quagga |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 218 | install -d -m750 $RPM_BUILD_ROOT/var/run/quagga |
paul | edd7c24 | 2003-06-04 13:59:38 +0000 | [diff] [blame] | 219 | |
| 220 | %pre |
| 221 | # add vty_group |
| 222 | %if %vty_group |
| 223 | groupadd -r %vty_group 2> /dev/null || : |
| 224 | %endif |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 225 | # add quagga user and group |
| 226 | %if %quagga_user |
paul | 15d74e9 | 2003-12-30 11:16:21 +0000 | [diff] [blame] | 227 | /usr/sbin/groupadd -g %quagga_gid quagga 2> /dev/null || : |
| 228 | /usr/sbin/useradd -u %quagga_uid -g %quagga_gid \ |
| 229 | -M -r -s /sbin/nologin -c "Quagga routing suite" \ |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 230 | -d %_localstatedir %quagga_user 2> /dev/null || : |
paul | edd7c24 | 2003-06-04 13:59:38 +0000 | [diff] [blame] | 231 | %endif |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 232 | |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 233 | %post |
paul | 30b9d89 | 2003-01-18 22:57:15 +0000 | [diff] [blame] | 234 | # zebra_spec_add_service <service name> <port/proto> <comment> |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 235 | # e.g. zebra_spec_add_service zebrasrv 2600/tcp "zebra service" |
| 236 | |
| 237 | zebra_spec_add_service () |
| 238 | { |
| 239 | # Add port /etc/services entry if it isn't already there |
paul | 6b637e9 | 2004-10-23 00:48:51 +0000 | [diff] [blame] | 240 | if [ -f /etc/services ] && \ |
| 241 | ! %__sed -e 's/#.*$//' /etc/services | %__grep -wq $1 ; then |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 242 | echo "$1 $2 # $3" >> /etc/services |
| 243 | fi |
| 244 | } |
| 245 | |
| 246 | zebra_spec_add_service zebrasrv 2600/tcp "zebra service" |
| 247 | zebra_spec_add_service zebra 2601/tcp "zebra vty" |
| 248 | zebra_spec_add_service ripd 2602/tcp "RIPd vty" |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 249 | %if %{with_ipv6} |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 250 | zebra_spec_add_service ripngd 2603/tcp "RIPngd vty" |
paul | d7ccae2 | 2003-01-18 00:24:00 +0000 | [diff] [blame] | 251 | %endif |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 252 | zebra_spec_add_service ospfd 2604/tcp "OSPFd vty" |
| 253 | zebra_spec_add_service bgpd 2605/tcp "BGPd vty" |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 254 | %if %{with_ipv6} |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 255 | zebra_spec_add_service ospf6d 2606/tcp "OSPF6d vty" |
paul | d7ccae2 | 2003-01-18 00:24:00 +0000 | [diff] [blame] | 256 | %endif |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 257 | %if %{with_ospfapi} |
paul | 7021c42 | 2003-07-15 12:52:22 +0000 | [diff] [blame] | 258 | zebra_spec_add_service ospfapi 2607/tcp "OSPF-API" |
| 259 | %endif |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 260 | %if %{with_isisd} |
jardin | 5a514b1 | 2003-12-23 10:50:21 +0000 | [diff] [blame] | 261 | zebra_spec_add_service isisd 2608/tcp "ISISd vty" |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 262 | %endif |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 263 | |
paul | 15d74e9 | 2003-12-30 11:16:21 +0000 | [diff] [blame] | 264 | for daemon in %daemon_list ; do |
| 265 | /sbin/chkconfig --add ${daemon} |
| 266 | done |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 267 | |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 268 | /sbin/install-info %{_infodir}/quagga.info.gz %{_infodir}/dir |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 269 | |
| 270 | # Create dummy files if they don't exist so basic functions can be used. |
| 271 | if [ ! -e %{_sysconfdir}/zebra.conf ]; then |
| 272 | echo "hostname `hostname`" > %{_sysconfdir}/zebra.conf |
| 273 | chmod 640 %{_sysconfdir}/zebra.conf |
| 274 | fi |
| 275 | if [ ! -e %{_sysconfdir}/vtysh.conf ]; then |
| 276 | touch %{_sysconfdir}/vtysh.conf |
| 277 | chmod 640 %{_sysconfdir}/vtysh.conf |
| 278 | fi |
| 279 | |
| 280 | %postun |
ajs | fc43ecc | 2005-01-12 16:41:33 +0000 | [diff] [blame] | 281 | if [ "$1" -ge 1 ]; then |
| 282 | # Find out which daemons need to be restarted. |
ajs | b3324e2 | 2004-12-22 17:52:29 +0000 | [diff] [blame] | 283 | for daemon in %all_daemons ; do |
ajs | fc43ecc | 2005-01-12 16:41:33 +0000 | [diff] [blame] | 284 | if [ -f /var/lock/subsys/$daemon ]; then |
| 285 | eval restart_$daemon=yes |
| 286 | else |
| 287 | eval restart_$daemon=no |
| 288 | fi |
paul | 15d74e9 | 2003-12-30 11:16:21 +0000 | [diff] [blame] | 289 | done |
ajs | fc43ecc | 2005-01-12 16:41:33 +0000 | [diff] [blame] | 290 | # Rename restart flags for daemons handled specially. |
| 291 | running_zebra="$restart_zebra" |
| 292 | restart_zebra=no |
| 293 | running_watchquagga="$restart_watchquagga" |
| 294 | restart_watchquagga=no |
| 295 | # Stop watchquagga first. |
| 296 | [ "$running_watchquagga" = yes ] && \ |
| 297 | /etc/rc.d/init.d/watchquagga stop >/dev/null 2>&1 |
| 298 | # Stop all daemons other than zebra and watchquagga. |
| 299 | for daemon in %all_daemons ; do |
| 300 | eval restart=\$restart_${daemon} |
| 301 | [ "$restart" = yes ] && \ |
| 302 | /etc/rc.d/init.d/$daemon stop >/dev/null 2>&1 |
| 303 | done |
| 304 | # Restart zebra. |
| 305 | [ "$running_zebra" = yes ] && \ |
| 306 | /etc/rc.d/init.d/zebra restart >/dev/null 2>&1 |
| 307 | # Start all daemons other than zebra and watchquagga. |
| 308 | for daemon in %all_daemons ; do |
| 309 | eval restart=\$restart_${daemon} |
| 310 | [ "$restart" = yes ] && \ |
| 311 | /etc/rc.d/init.d/$daemon start >/dev/null 2>&1 |
| 312 | done |
| 313 | # Start watchquagga last. |
ajs | b854038 | 2005-01-15 17:26:48 +0000 | [diff] [blame] | 314 | # Avoid postun scriptlet error if watchquagga is not running. |
ajs | fc43ecc | 2005-01-12 16:41:33 +0000 | [diff] [blame] | 315 | [ "$running_watchquagga" = yes ] && \ |
ajs | b854038 | 2005-01-15 17:26:48 +0000 | [diff] [blame] | 316 | /etc/rc.d/init.d/watchquagga start >/dev/null 2>&1 || : |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 317 | fi |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 318 | |
| 319 | %preun |
| 320 | if [ "$1" = "0" ]; then |
ajs | b3324e2 | 2004-12-22 17:52:29 +0000 | [diff] [blame] | 321 | for daemon in %all_daemons ; do |
paul | 15d74e9 | 2003-12-30 11:16:21 +0000 | [diff] [blame] | 322 | /etc/rc.d/init.d/${daemon} stop >/dev/null 2>&1 |
| 323 | /sbin/chkconfig --del ${daemon} |
| 324 | done |
| 325 | /sbin/install-info --delete %{_infodir}/quagga.info.gz %{_infodir}/dir |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 326 | fi |
| 327 | |
| 328 | %clean |
paul | b5f310c | 2004-09-13 13:15:25 +0000 | [diff] [blame] | 329 | %if !%{keep_build} |
| 330 | rm -rf $RPM_BUILD_ROOT |
| 331 | %endif |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 332 | |
| 333 | %files |
| 334 | %defattr(-,root,root) |
paul | 448ed4a | 2003-03-01 15:43:28 +0000 | [diff] [blame] | 335 | %doc */*.sample* AUTHORS COPYING |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 336 | %doc doc/quagga.html |
paul | 30b9d89 | 2003-01-18 22:57:15 +0000 | [diff] [blame] | 337 | %doc doc/mpls |
paul | 8f75498 | 2003-01-20 04:55:51 +0000 | [diff] [blame] | 338 | %doc ChangeLog INSTALL NEWS README REPORTING-BUGS SERVICES TODO |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 339 | %if %{quagga_user} |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 340 | %dir %attr(751,%quagga_user,%quagga_user) %{_sysconfdir} |
| 341 | %dir %attr(750,%quagga_user,%quagga_user) /var/log/quagga |
| 342 | %dir %attr(751,%quagga_user,%quagga_user) /var/run/quagga |
paul | edd7c24 | 2003-06-04 13:59:38 +0000 | [diff] [blame] | 343 | %else |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 344 | %dir %attr(750,root,root) %{_sysconfdir} |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 345 | %dir %attr(750,root,root) /var/log/quagga |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 346 | %dir %attr(755,root,root) /usr/share/info |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 347 | %dir %attr(750,root,root) /var/run/quagga |
paul | edd7c24 | 2003-06-04 13:59:38 +0000 | [diff] [blame] | 348 | %endif |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 349 | %if %{vty_group} |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 350 | %attr(750,%quagga_user,%vty_group) %{_sysconfdir}/vtysh.conf.sample |
paul | edd7c24 | 2003-06-04 13:59:38 +0000 | [diff] [blame] | 351 | %endif |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 352 | %{_infodir}/*info* |
| 353 | %{_mandir}/man*/* |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 354 | %{_sbindir}/zebra |
| 355 | %{_sbindir}/ospfd |
| 356 | %{_sbindir}/ripd |
| 357 | %{_sbindir}/bgpd |
ajs | b3324e2 | 2004-12-22 17:52:29 +0000 | [diff] [blame] | 358 | %{_sbindir}/watchquagga |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 359 | %if %{with_ipv6} |
| 360 | %{_sbindir}/ripngd |
| 361 | %{_sbindir}/ospf6d |
| 362 | %endif |
| 363 | %if %{with_isisd} |
| 364 | %{_sbindir}/isisd |
| 365 | %endif |
paul | cfc1842 | 2004-10-23 00:05:41 +0000 | [diff] [blame] | 366 | %dir %attr(755,root,root) %{_libdir} |
paul | 28f7972 | 2004-10-29 05:35:43 +0000 | [diff] [blame] | 367 | %if %{with_shared} |
paul | 2ff9e82 | 2004-07-20 11:19:47 +0000 | [diff] [blame] | 368 | %{_libdir}/lib*.so |
| 369 | %{_libdir}/lib*.so.* |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 370 | %endif |
| 371 | %if %{with_vtysh} |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 372 | %{_bindir}/* |
paul | d7ccae2 | 2003-01-18 00:24:00 +0000 | [diff] [blame] | 373 | %endif |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 374 | %config /etc/quagga/[!v]* |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 375 | %config /etc/rc.d/init.d/* |
paul | 15d74e9 | 2003-12-30 11:16:21 +0000 | [diff] [blame] | 376 | %config(noreplace) /etc/sysconfig/quagga |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 377 | %config(noreplace) /etc/pam.d/quagga |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 378 | %config(noreplace) %attr(640,root,root) /etc/logrotate.d/* |
| 379 | |
paul | 448ed4a | 2003-03-01 15:43:28 +0000 | [diff] [blame] | 380 | %files contrib |
| 381 | %defattr(-,root,root) |
| 382 | %doc tools |
| 383 | |
paul | e062685 | 2003-03-18 14:11:36 +0000 | [diff] [blame] | 384 | %files devel |
| 385 | %defattr(-,root,root) |
paul | da29c6b | 2004-10-08 00:49:09 +0000 | [diff] [blame] | 386 | %if %{with_ospfclient} |
| 387 | %{_sbindir}/ospfclient |
| 388 | %endif |
paul | 28f7972 | 2004-10-29 05:35:43 +0000 | [diff] [blame] | 389 | %{_libdir}/*.a |
| 390 | %{_libdir}/*.la |
paul | cfc1842 | 2004-10-23 00:05:41 +0000 | [diff] [blame] | 391 | %dir %attr(755,root,root) %{_includedir}/%{name} |
paul | 28f7972 | 2004-10-29 05:35:43 +0000 | [diff] [blame] | 392 | %{_includedir}/%name/*.h |
paul | cfc1842 | 2004-10-23 00:05:41 +0000 | [diff] [blame] | 393 | %dir %attr(755,root,root) %{_includedir}/%{name}/ospfd |
paul | 28f7972 | 2004-10-29 05:35:43 +0000 | [diff] [blame] | 394 | %{_includedir}/%name/ospfd/*.h |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 395 | %if %{with_ospfapi} |
paul | cfc1842 | 2004-10-23 00:05:41 +0000 | [diff] [blame] | 396 | %dir %attr(755,root,root) %{_includedir}/%{name}/ospfapi |
paul | 28f7972 | 2004-10-29 05:35:43 +0000 | [diff] [blame] | 397 | %{_includedir}/%name/ospfapi/*.h |
paul | 6898008 | 2003-03-25 05:07:42 +0000 | [diff] [blame] | 398 | %endif |
paul | e062685 | 2003-03-18 14:11:36 +0000 | [diff] [blame] | 399 | |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 400 | %changelog |
paul | 15d74e9 | 2003-12-30 11:16:21 +0000 | [diff] [blame] | 401 | %changelog |
ajs | fc43ecc | 2005-01-12 16:41:33 +0000 | [diff] [blame] | 402 | * Wed Jan 12 2005 Andrew J. Schorr <ajschorr@alumni.princeton.edu> |
| 403 | - on package upgrade, implement careful, phased restart logic |
| 404 | - use gcc -rdynamic flag when linking for better backtraces |
| 405 | |
ajs | b3324e2 | 2004-12-22 17:52:29 +0000 | [diff] [blame] | 406 | * Wed Dec 22 2004 Andrew J. Schorr <ajschorr@alumni.princeton.edu> |
ajs | f393175 | 2004-12-23 00:00:58 +0000 | [diff] [blame] | 407 | - daemonv6_list should contain only IPv6 daemons |
| 408 | |
| 409 | * Wed Dec 22 2004 Andrew J. Schorr <ajschorr@alumni.princeton.edu> |
ajs | b3324e2 | 2004-12-22 17:52:29 +0000 | [diff] [blame] | 410 | - watchquagga added |
| 411 | - on upgrade, all daemons should be condrestart'ed |
| 412 | - on removal, all daemons should be stopped |
| 413 | |
paul | 36002ae | 2004-11-08 17:36:29 +0000 | [diff] [blame] | 414 | * Mon Nov 08 2004 Paul Jakma <paul@dishone.st> |
| 415 | - Use makeinfo --html to generate quagga.html |
| 416 | |
paul | 0df63b5 | 2004-11-07 22:12:23 +0000 | [diff] [blame] | 417 | * Sun Nov 07 2004 Paul Jakma <paul@dishone.st> |
| 418 | - Fix with_ipv6 set to 0 build |
| 419 | |
paul | cfc1842 | 2004-10-23 00:05:41 +0000 | [diff] [blame] | 420 | * Sat Oct 23 2004 Paul Jakma <paul@dishone.st> |
| 421 | - Update to 0.97.2 |
| 422 | |
| 423 | * Sat Oct 23 2004 Andrew J. Schorr <aschorr@telemetry-investments.com> |
| 424 | - Make directories be owned by the packages concerned |
| 425 | - Update logrotate scripts to use correct path to killall and use pid files |
| 426 | |
paul | da29c6b | 2004-10-08 00:49:09 +0000 | [diff] [blame] | 427 | * Fri Oct 08 2004 Paul Jakma <paul@dishone.st> |
| 428 | - Update to 0.97.0 |
| 429 | |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 430 | * Wed Sep 15 2004 Paul Jakma <paul@dishone.st> |
| 431 | - build snmp support by default |
| 432 | - build irdp support |
| 433 | - build with shared libs |
| 434 | - devel subpackage for archives and headers |
| 435 | |
paul | 00bc560 | 2004-01-09 16:30:52 +0000 | [diff] [blame] | 436 | * Thu Jan 08 2004 Paul Jakma <paul@dishone.st> |
| 437 | - updated sysconfig files to specify local dir |
| 438 | - added ospf_dump.c crash quick fix patch |
| 439 | - added ospfd persistent interface configuration patch |
| 440 | |
paul | 15d74e9 | 2003-12-30 11:16:21 +0000 | [diff] [blame] | 441 | * Tue Dec 30 2003 Paul Jakma <paul@dishone.st> |
| 442 | - sync to CVS |
| 443 | - integrate RH sysconfig patch to specify daemon options (RH) |
| 444 | - default to have vty listen only to 127.1 (RH) |
| 445 | - add user with fixed UID/GID (RH) |
| 446 | - create user with shell /sbin/nologin rather than /bin/false (RH) |
| 447 | - stop daemons on uninstall (RH) |
| 448 | - delete info file on %preun, not %postun to avoid deletion on upgrade. (RH) |
| 449 | - isisd added |
| 450 | - cleanup tasks carried out for every daemon |
| 451 | |
paul | 406f700 | 2003-11-02 07:30:52 +0000 | [diff] [blame] | 452 | * Sun Nov 2 2003 Paul Jakma <paul@dishone.st> |
| 453 | - Fix -devel package to include all files |
| 454 | - Sync to 0.96.4 |
| 455 | |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 456 | * Tue Aug 12 2003 Paul Jakma <paul@dishone.st> |
| 457 | - Renamed to Quagga |
| 458 | - Sync to Quagga release 0.96 |
| 459 | |
paul | edd7c24 | 2003-06-04 13:59:38 +0000 | [diff] [blame] | 460 | * Tue Mar 20 2003 Paul Jakma <paul@dishone.st> |
| 461 | - zebra privileges support |
| 462 | |
paul | e062685 | 2003-03-18 14:11:36 +0000 | [diff] [blame] | 463 | * Mon Mar 18 2003 Paul Jakma <paul@dishone.st> |
| 464 | - Fix mem leak in 'show thread cpu' |
| 465 | - Ralph Keller's OSPF-API |
| 466 | - Amir: Fix configure.ac for net-snmp |
| 467 | |
paul | 448ed4a | 2003-03-01 15:43:28 +0000 | [diff] [blame] | 468 | * Sat Mar 1 2003 Paul Jakma <paul@dishone.st> |
| 469 | - ospfd IOS prefix to interface matching for 'network' statement |
| 470 | - temporary fix for PtP and IPv6 |
| 471 | - sync to zebra.org CVS |
| 472 | |
paul | 8f75498 | 2003-01-20 04:55:51 +0000 | [diff] [blame] | 473 | * Mon Jan 20 2003 Paul Jakma <paul@dishone.st> |
| 474 | - update to latest cvs |
| 475 | - Yon's "show thread cpu" patch - 17217 |
| 476 | - walk up tree - 17218 |
| 477 | - ospfd NSSA fixes - 16681 |
| 478 | - ospfd nsm fixes - 16824 |
| 479 | - ospfd OLSA fixes and new feature - 16823 |
| 480 | - KAME and ifindex fixes - 16525 |
| 481 | - spec file changes to allow redhat files to be in tree |
| 482 | |
paul | d7ccae2 | 2003-01-18 00:24:00 +0000 | [diff] [blame] | 483 | * Sat Dec 28 2002 Alexander Hoogerhuis <alexh@ihatent.com> |
| 484 | - Added conditionals for building with(out) IPv6, vtysh, RIP, BGP |
| 485 | - Fixed up some build requirements (patch) |
| 486 | - Added conditional build requirements for vtysh / snmp |
| 487 | - Added conditional to %files for %_bindir depending on vtysh |
| 488 | |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 489 | * Mon Nov 11 2002 Paul Jakma <paulj@alphyra.ie> |
| 490 | - update to latest CVS |
| 491 | - add Greg Troxel's md5 buffer copy/dup fix |
| 492 | - add RIPv1 fix |
| 493 | - add Frank's multicast flag fix |
| 494 | |
| 495 | * Wed Oct 09 2002 Paul Jakma <paulj@alphyra.ie> |
| 496 | - update to latest CVS |
| 497 | - timestamped crypt_seqnum patch |
| 498 | - oi->on_write_q fix |
| 499 | |
| 500 | * Mon Sep 30 2002 Paul Jakma <paulj@alphyra.ie> |
| 501 | - update to latest CVS |
| 502 | - add vtysh 'write-config (integrated|daemon)' patch |
| 503 | - always 'make rebuild' in vtysh/ to catch new commands |
| 504 | |
| 505 | * Fri Sep 13 2002 Paul Jakma <paulj@alphyra.ie> |
| 506 | - update to 0.93b |
| 507 | |
| 508 | * Wed Sep 11 2002 Paul Jakma <paulj@alphyra.ie> |
| 509 | - update to latest CVS |
| 510 | - add "/sbin/ip route flush proto zebra" to zebra RH init on startup |
| 511 | |
| 512 | * Sat Aug 24 2002 Paul Jakma <paulj@alphyra.ie> |
| 513 | - update to current CVS |
| 514 | - add OSPF point to multipoint patch |
| 515 | - add OSPF bugfixes |
| 516 | - add BGP hash optimisation patch |
| 517 | |
| 518 | * Fri Jun 14 2002 Paul Jakma <paulj@alphyra.ie> |
| 519 | - update to 0.93-pre1 / CVS |
| 520 | - add link state detection support |
| 521 | - add generic PtP and RFC3021 support |
| 522 | - various bug fixes |
| 523 | |
| 524 | * Thu Aug 09 2001 Elliot Lee <sopwith@redhat.com> 0.91a-6 |
| 525 | - Fix bug #51336 |
| 526 | |
| 527 | * Wed Aug 1 2001 Trond Eivind Glomsrød <teg@redhat.com> 0.91a-5 |
| 528 | - Use generic initscript strings instead of initscript specific |
| 529 | ( "Starting foo: " -> "Starting $prog:" ) |
| 530 | |
| 531 | * Fri Jul 27 2001 Elliot Lee <sopwith@redhat.com> 0.91a-4 |
| 532 | - Bump the release when rebuilding into the dist. |
| 533 | |
| 534 | * Tue Feb 6 2001 Tim Powers <timp@redhat.com> |
| 535 | - built for Powertools |
| 536 | |
| 537 | * Sun Feb 4 2001 Pekka Savola <pekkas@netcore.fi> |
| 538 | - Hacked up from PLD Linux 0.90-1, Mandrake 0.90-1mdk and one from zebra.org. |
| 539 | - Update to 0.91a |
| 540 | - Very heavy modifications to init.d/*, .spec, pam, i18n, logrotate, etc. |
| 541 | - Should be quite Red Hat'isque now. |