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