]>
Commit | Line | Data |
---|---|---|
a1f7a440 | 1 | # |
d4f69e5a JK |
2 | # TODO: |
3 | # - wait for openais compatible with corosync 2.0 before setting full Release | |
4 | # | |
ab0d79a4 | 5 | # Conditional build: |
4169d0ae JB |
6 | %bcond_with apidocs # build apidocs (man3 pages are provided anyway) |
7 | %bcond_without dbus # DBus events | |
8 | %bcond_without rdma # RDMA support | |
9 | %bcond_without snmp # SNMP protocol support | |
5a02a01c JK |
10 | %bcond_with testagents |
11 | %bcond_with watchdog | |
12 | %bcond_with monitoring | |
13 | %bcond_with xmlconf | |
2805ff24 | 14 | # |
ab0d79a4 | 15 | Summary: Corosync - OSI Certified implementation of a complete cluster engine |
a1f7a440 | 16 | Summary(pl.UTF-8): Corosync - implementacja silnika klastrowego certyfikowana przez OSI |
ab0d79a4 | 17 | Name: corosync |
5a02a01c JK |
18 | Version: 2.0.1 |
19 | Release: 0.1 | |
ab0d79a4 | 20 | License: BSD |
21 | Group: Base | |
5a02a01c JK |
22 | Source0: ftp://ftp:downloads@corosync.org/downloads/%{name}-%{version}/corosync-%{version}.tar.gz |
23 | # Source0-md5: 9e23f3f5594676455ff39ff363658155 | |
baa29f3f JK |
24 | Source1: %{name}.init |
25 | Source2: %{name}-notifyd.init | |
26 | Source3: %{name}-notifyd.sysconfig | |
bc47be90 | 27 | Patch0: %{name}-makefile.patch |
5a02a01c JK |
28 | Patch1: %{name}-lib_deps.patch |
29 | Patch2: %{name}-install.patch | |
ab0d79a4 | 30 | URL: http://www.corosync.org/ |
a1f7a440 | 31 | BuildRequires: autoconf >= 2.61 |
ab0d79a4 | 32 | BuildRequires: automake |
4169d0ae | 33 | %{?with_dbus:BuildRequires: dbus-devel} |
2805ff24 | 34 | %{?with_apidocs:BuildRequires: doxygen} |
5a02a01c | 35 | BuildRequires: libqb-devel |
2805ff24 JB |
36 | %if %{with rdma} |
37 | BuildRequires: libibverbs-devel | |
38 | BuildRequires: librdmacm-devel | |
39 | %endif | |
5a02a01c | 40 | %{?with_xmlconf:BuildRequires: libxslt} |
4169d0ae | 41 | %{?with_snmp:BuildRequires: net-snmp-devel} |
40252af1 | 42 | BuildRequires: nss-devel |
9d8c645a | 43 | BuildRequires: pkgconfig |
a1f7a440 | 44 | Requires: %{name}-libs = %{version}-%{release} |
ab0d79a4 | 45 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
46 | ||
4169d0ae JB |
47 | # short_service_name_get() is defined in executable |
48 | %define skip_post_check_so libcoroipcs\.so.* | |
49 | ||
ab0d79a4 | 50 | %description |
51 | The Corosync Cluster Engine is an OSI Certified implementation of a | |
52 | complete cluster engine. | |
53 | ||
a1f7a440 JB |
54 | %description -l pl.UTF-8 |
55 | Corosync Cluster Engine to implementacja pełnego silnika klastrowego | |
56 | certyfikowana przez OSI. | |
57 | ||
ab0d79a4 | 58 | %package libs |
a1f7a440 JB |
59 | Summary: Corosync Cluster Engine libraries |
60 | Summary(pl.UTF-8): Biblioteki silnika klastrowego Corosync | |
ab0d79a4 | 61 | Group: Libraries |
62 | ||
63 | %description libs | |
a1f7a440 JB |
64 | This package contains the libraries of Corosync Cluster Engine, an OSI |
65 | Certified implementation of a complete cluster engine. | |
66 | ||
67 | %description libs -l pl.UTF-8 | |
a1e347d6 | 68 | Ten pakiet zawiera biblioteki Corosync Cluster Engine - pełnego |
69 | silnika klastrowego certyfikowanego przez OSI. | |
ab0d79a4 | 70 | |
71 | %package devel | |
a1f7a440 JB |
72 | Summary: Header files for Corosync libraries |
73 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek Corosync | |
ab0d79a4 | 74 | Group: Development/Libraries |
75 | Requires: %{name}-libs = %{version}-%{release} | |
3398ab62 | 76 | Conflicts: openais-devel < 1.0 |
ab0d79a4 | 77 | |
78 | %description devel | |
a1f7a440 | 79 | This package contains the include files used to develop using Corosync |
ab0d79a4 | 80 | APIs. |
81 | ||
a1f7a440 JB |
82 | %description devel -l pl.UTF-8 |
83 | Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia programów z | |
84 | użyciem API Corosync. | |
85 | ||
ab0d79a4 | 86 | %package static |
a1f7a440 JB |
87 | Summary: Corosync static libraries |
88 | Summary(pl.UTF-8): Statyczne biblioteki Corosync | |
ab0d79a4 | 89 | Group: Development/Libraries |
90 | Requires: %{name}-devel = %{version}-%{release} | |
91 | ||
92 | %description static | |
a1f7a440 JB |
93 | This package contains the Corosync static libraries. |
94 | ||
95 | %description static -l pl.UTF-8 | |
96 | Ten pakiet zawiera statyczne biblioteki Corosync. | |
ab0d79a4 | 97 | |
4169d0ae JB |
98 | %package -n mibs-corosync |
99 | Summary: Corosync SNMP MIB data | |
100 | Summary(pl.UTF-8): Dane SNMP MIB dla Corosync | |
101 | Group: Applications/System | |
102 | Requires: mibs-dirs | |
103 | ||
104 | %description -n mibs-corosync | |
105 | Corosync SNMP MIB data. | |
106 | ||
107 | %description -n mibs-corosync -l pl.UTF-8 | |
108 | Dane SNMP MIB dla Corosync. | |
109 | ||
5a02a01c JK |
110 | %package -n corosync-testagents |
111 | Summary: The Corosync Cluster Engine Test Agents | |
112 | Group: Development/Libraries | |
113 | Requires: %{name} = %{version}-%{release} | |
114 | ||
115 | %description -n corosync-testagents | |
116 | This package contains corosync test agents. | |
117 | ||
ab0d79a4 | 118 | %prep |
119 | %setup -q | |
bc47be90 | 120 | %patch0 -p1 |
5a02a01c JK |
121 | %patch1 -p1 |
122 | %patch2 -p1 | |
ab0d79a4 | 123 | |
124 | %build | |
125 | %{__aclocal} | |
126 | %{__autoconf} | |
a1f7a440 | 127 | %{__autoheader} |
ab0d79a4 | 128 | %{__automake} |
ab0d79a4 | 129 | %configure \ |
5a02a01c JK |
130 | %{?with_testagents:--enable-testagents} \ |
131 | %{?with_watchdog:--enable-watchdog} \ | |
132 | %{?with_monitoring:--enable-monitoring} \ | |
133 | %{?with_xmlconf:--enable-xmlconf} \ | |
4169d0ae | 134 | %{?with_dbus:--enable-dbus} \ |
2805ff24 | 135 | %{?with_rdma:--enable-rdma} \ |
4169d0ae | 136 | %{?with_snmp:--enable-snmp} \ |
5a02a01c JK |
137 | --enable-systemd \ |
138 | --with-systemddir=%{systemdunitdir} \ | |
139 | --with-initddir=/etc/rc.d/init.d | |
ab0d79a4 | 140 | |
141 | %{__make} | |
142 | ||
143 | %{?with_apidocs:%{__make} doxygen} | |
a1e347d6 | 144 | |
baa29f3f JK |
145 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} |
146 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-notifyd | |
147 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-notifyd | |
148 | ||
ab0d79a4 | 149 | %install |
150 | rm -rf $RPM_BUILD_ROOT | |
baa29f3f | 151 | install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig} |
a1f7a440 | 152 | |
ab0d79a4 | 153 | %{__make} install \ |
154 | DESTDIR=$RPM_BUILD_ROOT | |
ab0d79a4 | 155 | |
a1e347d6 | 156 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/corosync |
a1f7a440 JB |
157 | |
158 | sed -e 's/^/#/' $RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf.example \ | |
159 | >$RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf | |
4169d0ae | 160 | %{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf.example* |
ab0d79a4 | 161 | |
162 | %{?with_apidocs:install doc/api/man/man3/* $RPM_BUILD_ROOT%{_mandir}/man3} | |
163 | ||
164 | %clean | |
165 | rm -rf $RPM_BUILD_ROOT | |
166 | ||
5a02a01c | 167 | %post |
baa29f3f JK |
168 | /sbin/chkconfig --add %{name} |
169 | /sbin/chkconfig --add %{name}-notifyd | |
170 | %service %{name} restart | |
171 | %service %{name}-notifyd restart | |
172 | %systemd_post %{name}.service | |
173 | %systemd_post %{name}-notifyd.service | |
5a02a01c JK |
174 | |
175 | %preun | |
176 | if [ "$1" = "0" ]; then | |
baa29f3f JK |
177 | %service -q %{name} stop |
178 | /sbin/chkconfig --del %{name} | |
179 | %service -q %{name}-notifyd stop | |
180 | /sbin/chkconfig --del %{name}-notifyd | |
5a02a01c | 181 | fi |
baa29f3f JK |
182 | %systemd_preun %{name}.service |
183 | %systemd_preun %{name}-notifyd.service | |
5a02a01c JK |
184 | |
185 | %postun | |
186 | %systemd_reload | |
187 | ||
364ac3e0 | 188 | %post libs -p /sbin/ldconfig |
189 | %postun libs -p /sbin/ldconfig | |
190 | ||
ab0d79a4 | 191 | %files |
192 | %defattr(644,root,root,755) | |
5a02a01c JK |
193 | %doc AUTHORS ChangeLog LICENSE README.recovery SECURITY TODO conf/corosync.conf.example* |
194 | %if %{with xmlconf} | |
195 | %doc conf/corosync.xml.example* | |
196 | %endif | |
a1f7a440 | 197 | %attr(754,root,root) /etc/rc.d/init.d/corosync |
4169d0ae | 198 | %attr(754,root,root) /etc/rc.d/init.d/corosync-notifyd |
baa29f3f | 199 | %verify(not md5 mtime size) %config(noreplace) /etc/sysconfig/%{name}-notifyd |
ab0d79a4 | 200 | %dir %{_sysconfdir}/corosync |
5a02a01c JK |
201 | %{systemdunitdir}/corosync.service |
202 | %{systemdunitdir}/corosync-notifyd.service | |
ab0d79a4 | 203 | %verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/corosync/corosync.conf |
e7c18d27 | 204 | %attr(755,root,root) %{_bindir}/corosync-blackbox |
ab0d79a4 | 205 | %attr(755,root,root) %{_sbindir}/corosync |
206 | %attr(755,root,root) %{_sbindir}/corosync-cfgtool | |
5a02a01c | 207 | %attr(755,root,root) %{_sbindir}/corosync-cmapctl |
a1f7a440 | 208 | %attr(755,root,root) %{_sbindir}/corosync-cpgtool |
ab0d79a4 | 209 | %attr(755,root,root) %{_sbindir}/corosync-fplay |
210 | %attr(755,root,root) %{_sbindir}/corosync-keygen | |
4169d0ae | 211 | %attr(755,root,root) %{_sbindir}/corosync-notifyd |
40252af1 | 212 | %attr(755,root,root) %{_sbindir}/corosync-quorumtool |
a1f7a440 JB |
213 | %{_mandir}/man5/corosync.conf.5* |
214 | %{_mandir}/man8/corosync.8* | |
215 | %{_mandir}/man8/corosync-blackbox.8* | |
5a02a01c | 216 | %{_mandir}/man8/corosync-cmapctl.8* |
a1f7a440 JB |
217 | %{_mandir}/man8/corosync-cfgtool.8* |
218 | %{_mandir}/man8/corosync-cpgtool.8* | |
219 | %{_mandir}/man8/corosync-fplay.8* | |
220 | %{_mandir}/man8/corosync-keygen.8* | |
4169d0ae | 221 | %{_mandir}/man8/corosync-notifyd.8* |
a1f7a440 | 222 | %{_mandir}/man8/corosync-quorumtool.8* |
5a02a01c JK |
223 | %if %{with xmlconf} |
224 | %attr(755,root,root) %{_bindir}/corosync-xmlproc | |
225 | %config(noreplace) %{_sysconfdir}/corosync/corosync.xml.example | |
226 | %dir %{_datadir}/corosync | |
227 | %dir %{_datadir}/corosync/xml2conf.xsl | |
5a02a01c JK |
228 | %{_mandir}/man8/corosync-xmlproc.8* |
229 | %{_mandir}/man5/corosync.xml.5* | |
230 | %endif | |
231 | %if %{with dbus} | |
232 | /etc/dbus-1/system.d/corosync-signals.conf | |
233 | %endif | |
ab0d79a4 | 234 | |
235 | %files libs | |
236 | %defattr(644,root,root,755) | |
5a02a01c JK |
237 | %attr(755,root,root) %{_libdir}/libcfg.so.6.*.* |
238 | %attr(755,root,root) %ghost %{_libdir}/libcfg.so.6 | |
239 | %attr(755,root,root) %{_libdir}/libcmap.so.4.*.* | |
240 | %attr(755,root,root) %ghost %{_libdir}/libcmap.so.4 | |
241 | %attr(755,root,root) %{_libdir}/libcorosync_common.so.4.*.* | |
242 | %attr(755,root,root) %ghost %{_libdir}/libcorosync_common.so.4 | |
ab0d79a4 | 243 | %attr(755,root,root) %{_libdir}/libcpg.so.4.*.* |
244 | %attr(755,root,root) %ghost %{_libdir}/libcpg.so.4 | |
1c7457c7 | 245 | %attr(755,root,root) %{_libdir}/libsam.so.4.*.* |
246 | %attr(755,root,root) %ghost %{_libdir}/libsam.so.4 | |
5a02a01c JK |
247 | %attr(755,root,root) %{_libdir}/libquorum.so.5.*.* |
248 | %attr(755,root,root) %ghost %{_libdir}/libquorum.so.5 | |
249 | %attr(755,root,root) %{_libdir}/libtotem_pg.so.5.*.* | |
250 | %attr(755,root,root) %ghost %{_libdir}/libtotem_pg.so.5 | |
251 | %attr(755,root,root) %{_libdir}/libvotequorum.so.5.*.* | |
252 | %attr(755,root,root) %ghost %{_libdir}/libvotequorum.so.5 | |
ab0d79a4 | 253 | |
254 | %files devel | |
255 | %defattr(644,root,root,755) | |
a1f7a440 | 256 | %attr(755,root,root) %{_libdir}/libcfg.so |
5a02a01c JK |
257 | %attr(755,root,root) %{_libdir}/libcmap.so |
258 | %attr(755,root,root) %{_libdir}/libcorosync_common.so | |
a1f7a440 | 259 | %attr(755,root,root) %{_libdir}/libcpg.so |
a1f7a440 JB |
260 | %attr(755,root,root) %{_libdir}/libsam.so |
261 | %attr(755,root,root) %{_libdir}/libquorum.so | |
262 | %attr(755,root,root) %{_libdir}/libtotem_pg.so | |
263 | %attr(755,root,root) %{_libdir}/libvotequorum.so | |
ab0d79a4 | 264 | %{_includedir}/corosync |
a1f7a440 JB |
265 | %{_pkgconfigdir}/corosync.pc |
266 | %{_pkgconfigdir}/libcfg.pc | |
5a02a01c JK |
267 | %{_pkgconfigdir}/libcmap.pc |
268 | %{_pkgconfigdir}/libcorosync_common.pc | |
a1f7a440 | 269 | %{_pkgconfigdir}/libcpg.pc |
a1f7a440 JB |
270 | %{_pkgconfigdir}/libquorum.pc |
271 | %{_pkgconfigdir}/libsam.pc | |
272 | %{_pkgconfigdir}/libtotem_pg.pc | |
273 | %{_pkgconfigdir}/libvotequorum.pc | |
5a02a01c | 274 | %{_mandir}/man3/cmap_*.3* |
a1f7a440 | 275 | %{_mandir}/man3/cpg_*.3* |
5a02a01c | 276 | %{_mandir}/man3/quorum_*.3* |
a1f7a440 JB |
277 | %{_mandir}/man3/sam_*.3* |
278 | %{_mandir}/man3/votequorum_*.3* | |
5a02a01c | 279 | %{_mandir}/man5/votequorum.5* |
a1f7a440 | 280 | # should be man7... |
5a02a01c JK |
281 | %{_mandir}/man8/cmap_keys.8* |
282 | %{_mandir}/man8/cmap_overview.8* | |
a1f7a440 JB |
283 | %{_mandir}/man8/corosync_overview.8* |
284 | %{_mandir}/man8/cpg_overview.8* | |
a1f7a440 JB |
285 | %{_mandir}/man8/sam_overview.8* |
286 | %{_mandir}/man8/votequorum_overview.8* | |
5a02a01c | 287 | %{_mandir}/man8/quorum_overview.8* |
ab0d79a4 | 288 | %files static |
289 | %defattr(644,root,root,755) | |
290 | %{_libdir}/libcfg.a | |
5a02a01c JK |
291 | %{_libdir}/libcmap.a |
292 | %{_libdir}/libcorosync_common.a | |
ab0d79a4 | 293 | %{_libdir}/libcpg.a |
1c7457c7 | 294 | %{_libdir}/libsam.a |
ab0d79a4 | 295 | %{_libdir}/libquorum.a |
296 | %{_libdir}/libtotem_pg.a | |
297 | %{_libdir}/libvotequorum.a | |
4169d0ae JB |
298 | |
299 | %if %{with snmp} | |
300 | %files -n mibs-corosync | |
301 | %defattr(644,root,root,755) | |
302 | %{_datadir}/snmp/mibs/COROSYNC-MIB.txt | |
303 | %endif | |
5a02a01c JK |
304 | |
305 | %if %{with testagents} | |
306 | %files -n corosync-testagents | |
307 | %defattr(644,root,root,755) | |
308 | %{_datadir}/corosync/tests/mem_leak_test.sh | |
309 | %{_datadir}/corosync/tests/net_breaker.sh | |
310 | %{_datadir}/corosync/tests/cmap-dispatch-deadlock.sh | |
311 | %{_datadir}/corosync/tests/shm_leak_audit.sh | |
312 | %attr(755,root,root) %{_bindir}/cpg_test_agent | |
313 | %attr(755,root,root) %{_bindir}/sam_test_agent | |
314 | %attr(755,root,root) %{_bindir}/votequorum_test_agent | |
315 | %endif |