6 # Invoke "rpmbuild --without <feature>" or "rpmbuild --with <feature>"
7 # to disable or enable specific features
10 %bcond_with monitoring
17 %bcond_with runautogen
20 %global gitver
%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}
21 %global gittarver
%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}
24 Summary: The Corosync Cluster Engine and Application Programming Interfaces
26 Release: 1%{?gitver}%{?dist}
28 Group: System Environment
/Base
29 URL: http
://corosync.github.io
/corosync
/
30 Source0: http
://build.clusterlabs.org
/corosync
/releases
/%{name}-%{version}%{?gittarver}.tar.gz
33 Requires: corosynclib
= %{version}-%{release}
34 Requires(pre
): /usr
/sbin
/useradd
35 Requires(post
): /sbin
/chkconfig
36 Requires(preun
): /sbin
/chkconfig
37 Conflicts: openais
<= 0.89, openais
-devel
<= 0.89
42 BuildRequires
: libqb
-devel
43 BuildRequires
: nss
-devel
44 BuildRequires
: zlib
-devel
45 %if %{with runautogen}
46 BuildRequires
: autoconf automake libtool
48 %if %{with monitoring}
49 BuildRequires
: libstatgrab
-devel
52 BuildRequires
: libibverbs
-devel librdmacm
-devel
55 BuildRequires
: net
-snmp
-devel
58 BuildRequires
: dbus
-devel
61 BuildRequires
: systemd
-units
62 Requires(post
): systemd
63 Requires(preun
): systemd
64 Requires(postun
): systemd
73 BuildRoot: %
(mktemp
-ud
%{_tmppath}/%{name}-%{version}-%{release}-XXXXXX
)
76 %setup -q
-n
%{name}-%{version}%{?gittarver}
79 %if %{with runautogen}
84 export ibverbs_CFLAGS
=-I
/usr
/include
/infiniband \
85 export ibverbs_LIBS
=-libverbs \
86 export rdmacm_CFLAGS
=-I
/usr
/include
/rdma \
87 export rdmacm_LIBS
=-lrdmacm \
90 %if %{with testagents}
96 %if %{with monitoring}
120 --with
-initddir
=%{_initrddir} \
121 --with
-systemddir
=%{_unitdir} \
122 --with
-upstartdir
=%{_sysconfdir}/init
129 make install DESTDIR
=%{buildroot}
132 mkdir -p
-m
0700 %{buildroot}/%{_sysconfdir}/dbus
-1/system.d
133 install -m
644 %{_builddir}/%{name}-%{version}%{?gittarver}/conf/corosync-signals.conf %{buildroot}/%{_sysconfdir}/dbus
-1/system.d
/corosync
-signals.conf
138 rm -f
%{buildroot}%{_libdir}/*.a
139 rm -f
%{buildroot}%{_libdir}/*.la
140 # drop docs and html docs for now
141 rm -rf
%{buildroot}%{_docdir}/*
142 # /etc/sysconfig/corosync-notifyd
143 mkdir -p
%{buildroot}%{_sysconfdir}/sysconfig
144 install -m
644 tools
/corosync
-notifyd.sysconfig.example \
145 %{buildroot}%{_sysconfdir}/sysconfig
/corosync
-notifyd
146 # /etc/sysconfig/corosync
147 install -m
644 init
/corosync.sysconfig.example \
148 %{buildroot}%{_sysconfdir}/sysconfig
/corosync
154 This package contains the Corosync Cluster Engine Executive
, several default
155 APIs and libraries
, default configuration files
, and an init script.
158 %if %{with systemd} && 0%{?systemd_post:1}
159 %systemd_post corosync.service
161 if [ $
1 -eq
1 ]; then
162 /sbin
/chkconfig
--add corosync ||
:
167 %if %{with systemd} && 0%{?systemd_preun:1}
168 %systemd_preun corosync.service
170 if [ $
1 -eq
0 ]; then
171 /sbin
/service corosync stop
&>/dev
/null ||
:
172 /sbin
/chkconfig
--del corosync ||
:
177 %if %{with systemd} && 0%{?systemd_postun:1}
182 %defattr(-,root
,root
,-)
183 %doc LICENSE SECURITY
185 %{_sbindir}/corosync
-keygen
186 %{_sbindir}/corosync
-cmapctl
187 %{_sbindir}/corosync
-cfgtool
188 %{_sbindir}/corosync
-cpgtool
189 %{_sbindir}/corosync
-quorumtool
190 %{_sbindir}/corosync
-notifyd
191 %{_bindir}/corosync
-blackbox
193 %{_bindir}/corosync
-xmlproc
194 %config(noreplace
) %{_sysconfdir}/corosync
/corosync.xml.example
195 %dir %{_datadir}/corosync
196 %{_datadir}/corosync
/xml2conf.xsl
197 %{_mandir}/man8
/corosync
-xmlproc
.8*
198 %{_mandir}/man5
/corosync.xml
.5*
200 %dir %{_sysconfdir}/corosync
201 %dir %{_sysconfdir}/corosync
/uidgid.d
202 %config(noreplace
) %{_sysconfdir}/corosync
/corosync.conf.example
203 %config(noreplace
) %{_sysconfdir}/corosync
/corosync.conf.example.udpu
204 %config(noreplace
) %{_sysconfdir}/sysconfig
/corosync
-notifyd
205 %config(noreplace
) %{_sysconfdir}/sysconfig
/corosync
206 %config(noreplace
) %{_sysconfdir}/logrotate.d
/corosync
208 %{_sysconfdir}/dbus
-1/system.d
/corosync
-signals.conf
211 %{_datadir}/snmp
/mibs
/COROSYNC
-MIB.txt
214 %{_unitdir}/corosync.service
215 %{_unitdir}/corosync
-notifyd.service
216 %dir %{_datadir}/corosync
217 %{_datadir}/corosync
/corosync
218 %{_datadir}/corosync
/corosync
-notifyd
220 %{_initrddir}/corosync
221 %{_initrddir}/corosync
-notifyd
224 %{_sysconfdir}/init
/corosync.conf
225 %{_sysconfdir}/init
/corosync
-notifyd.conf
227 %dir %{_localstatedir}/lib
/corosync
228 %dir %{_localstatedir}/log
/cluster
229 %{_mandir}/man8
/corosync_overview
.8*
230 %{_mandir}/man8
/corosync
.8*
231 %{_mandir}/man8
/corosync
-blackbox
.8*
232 %{_mandir}/man8
/corosync
-cmapctl
.8*
233 %{_mandir}/man8
/corosync
-keygen
.8*
234 %{_mandir}/man8
/corosync
-cfgtool
.8*
235 %{_mandir}/man8
/corosync
-cpgtool
.8*
236 %{_mandir}/man8
/corosync
-notifyd
.8*
237 %{_mandir}/man8
/corosync
-quorumtool
.8*
238 %{_mandir}/man5
/corosync.conf
.5*
239 %{_mandir}/man5
/votequorum
.5*
240 %{_mandir}/man8
/cmap_keys
.8*
242 # optional testagent rpm
244 %if %{with testagents}
246 %package -n corosync
-testagents
247 Summary: The Corosync Cluster Engine Test Agents
248 Group: Development
/Libraries
249 Requires: %{name} = %{version}-%{release}
251 %description -n corosync
-testagents
252 This package contains corosync
test agents.
254 %files -n corosync
-testagents
255 %defattr(755,root
,root
,-)
256 %{_datadir}/corosync
/tests
/mem_leak_test.sh
257 %{_datadir}/corosync
/tests
/net_breaker.sh
258 %{_datadir}/corosync
/tests
/cmap
-dispatch
-deadlock.sh
259 %{_datadir}/corosync
/tests
/shm_leak_audit.sh
260 %{_bindir}/cpg_test_agent
261 %{_bindir}/sam_test_agent
262 %{_bindir}/votequorum_test_agent
268 %package -n corosynclib
269 Summary: The Corosync Cluster Engine Libraries
270 Group: System Environment
/Libraries
271 Requires: %{name} = %{version}-%{release}
273 %description -n corosynclib
274 This package contains corosync libraries.
276 %files -n corosynclib
277 %defattr(-,root
,root
,-)
279 %{_libdir}/libcfg.so.
*
280 %{_libdir}/libcpg.so.
*
281 %{_libdir}/libcmap.so.
*
282 %{_libdir}/libtotem_pg.so.
*
283 %{_libdir}/libquorum.so.
*
284 %{_libdir}/libvotequorum.so.
*
285 %{_libdir}/libsam.so.
*
286 %{_libdir}/libcorosync_common.so.
*
288 %post -n corosynclib
-p
/sbin
/ldconfig
290 %postun -n corosynclib
-p
/sbin
/ldconfig
292 %package -n corosynclib
-devel
293 Summary: The Corosync Cluster Engine Development Kit
294 Group: Development
/Libraries
295 Requires: corosynclib
= %{version}-%{release}
297 Provides: corosync
-devel
= %{version}
298 Obsoletes
: corosync
-devel
< 0.92-7
300 %description -n corosynclib
-devel
301 This package contains include files and man pages used to develop using
302 The Corosync Cluster Engine APIs.
304 %files -n corosynclib
-devel
305 %defattr(-,root
,root
,-)
307 %dir %{_includedir}/corosync
/
308 %{_includedir}/corosync
/corodefs.h
309 %{_includedir}/corosync
/cfg.h
310 %{_includedir}/corosync
/cmap.h
311 %{_includedir}/corosync
/corotypes.h
312 %{_includedir}/corosync
/cpg.h
313 %{_includedir}/corosync
/hdb.h
314 %{_includedir}/corosync
/sam.h
315 %{_includedir}/corosync
/quorum.h
316 %{_includedir}/corosync
/votequorum.h
317 %dir %{_includedir}/corosync
/totem
/
318 %{_includedir}/corosync
/totem
/totem.h
319 %{_includedir}/corosync
/totem
/totemip.h
320 %{_includedir}/corosync
/totem
/totempg.h
323 %{_libdir}/libcmap.so
324 %{_libdir}/libtotem_pg.so
325 %{_libdir}/libquorum.so
326 %{_libdir}/libvotequorum.so
328 %{_libdir}/libcorosync_common.so
329 %{_libdir}/pkgconfig
/*.pc
330 %{_mandir}/man3
/cpg_
*3*
331 %{_mandir}/man3
/quorum_
*3*
332 %{_mandir}/man3
/votequorum_
*3*
333 %{_mandir}/man3
/sam_
*3*
334 %{_mandir}/man8
/cpg_overview
.8*
335 %{_mandir}/man8
/votequorum_overview
.8*
336 %{_mandir}/man8
/sam_overview
.8*
337 %{_mandir}/man3
/cmap_
*3*
338 %{_mandir}/man8
/cmap_overview
.8*
339 %{_mandir}/man8
/quorum_overview
.8*
345 %package -n corosync
-qdevice
346 Summary: The Corosync Cluster Engine Qdevice
347 Group: System Environment
/Base
352 Requires(post
): systemd
353 Requires(preun
): systemd
354 Requires(postun
): systemd
357 %description -n corosync
-qdevice
358 This package contains the Corosync Cluster Engine Qdevice
, script
for creating
359 NSS certificates and an init script.
361 %post -n corosync
-qdevice
362 %if %{with systemd} && 0%{?systemd_post:1}
363 %systemd_post corosync
-qdevice.service
365 if [ $
1 -eq
1 ]; then
366 /sbin
/chkconfig
--add corosync
-qdevice ||
:
370 %preun -n corosync
-qdevice
371 %if %{with systemd} && 0%{?systemd_preun:1}
372 %systemd_preun corosync
-qdevice.service
374 if [ $
1 -eq
0 ]; then
375 /sbin
/service corosync
-qdevice stop
&>/dev
/null ||
:
376 /sbin
/chkconfig
--del corosync
-qdevice ||
:
380 %postun -n corosync
-qdevice
381 %if %{with systemd} && 0%{?systemd_postun:1}
385 %files -n corosync
-qdevice
386 %defattr(-,root
,root
,-)
387 %{_sbindir}/corosync
-qdevice
388 %{_sbindir}/corosync
-qdevice
-net
-certutil
390 %{_unitdir}/corosync
-qdevice.service
391 %dir %{_datadir}/corosync
392 %{_datadir}/corosync
/corosync
-qdevice
394 %{_initrddir}/corosync
-qdevice
397 %package -n corosync
-qnetd
398 Summary: The Corosync Cluster Engine Qdevice Network Daemon
399 Group: System Environment
/Base
403 Requires(post
): systemd
404 Requires(preun
): systemd
405 Requires(postun
): systemd
408 %description -n corosync
-qnetd
409 This package contains the Corosync Cluster Engine Qdevice Network Daemon
, script
for creating
410 NSS certificates and an init script.
412 %post -n corosync
-qnetd
413 %if %{with systemd} && 0%{?systemd_post:1}
414 %systemd_post corosync
-qnetd.service
416 if [ $
1 -eq
1 ]; then
417 /sbin
/chkconfig
--add corosync
-qnetd ||
:
421 %preun -n corosync
-qnetd
422 %if %{with systemd} && 0%{?systemd_preun:1}
423 %systemd_preun corosync
-qnetd.service
425 if [ $
1 -eq
0 ]; then
426 /sbin
/service corosync
-qnetd stop
&>/dev
/null ||
:
427 /sbin
/chkconfig
--del corosync
-qnetd ||
:
431 %postun -n corosync
-qnetd
432 %if %{with systemd} && 0%{?systemd_postun:1}
436 %files -n corosync
-qnetd
437 %defattr(-,root
,root
,-)
438 %{_sbindir}/corosync
-qnetd
439 %{_sbindir}/corosync
-qnetd
-certutil
441 %{_unitdir}/corosync
-qnetd.service
442 %dir %{_datadir}/corosync
443 %{_datadir}/corosync
/corosync
-qnetd
445 %{_initrddir}/corosync
-qnetd
451 * @date@ Autotools generated version
<nobody@nowhere.org
> - @version@
-1-@numcomm@.@alphatag@.@dirty@
452 - Autotools generated version