| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509 |
- @ALPHATAG@
- @NUMCOMM@
- @DIRTY@
- # Conditionals
- # Invoke "rpmbuild --without <feature>" or "rpmbuild --with <feature>"
- # to disable or enable specific features
- %bcond_with testagents
- %bcond_with watchdog
- %bcond_with monitoring
- %bcond_with snmp
- %bcond_with dbus
- %bcond_with rdma
- %bcond_with systemd
- %bcond_with upstart
- %bcond_with xmlconf
- %bcond_with runautogen
- %bcond_with qdevices
- %bcond_with qnetd
- %bcond_with libcgroup
- %global gitver %{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}
- %global gittarver %{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}
- Name: corosync
- Summary: The Corosync Cluster Engine and Application Programming Interfaces
- Version: @version@
- Release: 1%{?gitver}%{?dist}
- License: BSD
- Group: System Environment/Base
- URL: http://corosync.github.io/corosync/
- Source0: http://build.clusterlabs.org/corosync/releases/%{name}-%{version}%{?gittarver}.tar.gz
- # Runtime bits
- # The automatic dependency overridden in favor of explicit version lock
- Requires: corosynclib%{?_isa} = %{version}-%{release}
- Requires(pre): /usr/sbin/useradd
- Requires(post): /sbin/chkconfig
- Requires(preun): /sbin/chkconfig
- Conflicts: openais <= 0.89, openais-devel <= 0.89
- # Build bits
- BuildRequires: groff
- BuildRequires: libqb-devel
- BuildRequires: nss-devel
- BuildRequires: libknet1-devel
- BuildRequires: zlib-devel
- %if %{with runautogen}
- BuildRequires: autoconf automake libtool
- %endif
- %if %{with monitoring}
- BuildRequires: libstatgrab-devel
- %endif
- %if %{with rdma}
- BuildRequires: libibverbs-devel librdmacm-devel
- %endif
- %if %{with snmp}
- BuildRequires: net-snmp-devel
- %endif
- %if %{with dbus}
- BuildRequires: dbus-devel
- %endif
- %if %{with systemd}
- BuildRequires: systemd-units
- BuildRequires: systemd-devel
- Requires(post): systemd
- Requires(preun): systemd
- Requires(postun): systemd
- %endif
- %if %{with xmlconf}
- Requires: libxslt
- %endif
- %if %{with qdevices} || %{with qnetd}
- Requires: nss-tools
- %endif
- %if %{with qnetd}
- BuildRequires: sed
- %endif
- %if %{with libcgroup}
- BuildRequires: libcgroup-devel
- %endif
- BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
- %prep
- %setup -q -n %{name}-%{version}%{?gittarver}
- %build
- %if %{with runautogen}
- ./autogen.sh
- %endif
- %if %{with rdma}
- export ibverbs_CFLAGS=-I/usr/include/infiniband \
- export ibverbs_LIBS=-libverbs \
- export rdmacm_CFLAGS=-I/usr/include/rdma \
- export rdmacm_LIBS=-lrdmacm \
- %endif
- %{configure} \
- %if %{with testagents}
- --enable-testagents \
- %endif
- %if %{with watchdog}
- --enable-watchdog \
- %endif
- %if %{with monitoring}
- --enable-monitoring \
- %endif
- %if %{with snmp}
- --enable-snmp \
- %endif
- %if %{with dbus}
- --enable-dbus \
- %endif
- %if %{with rdma}
- --enable-rdma \
- %endif
- %if %{with systemd}
- --enable-systemd \
- %endif
- %if %{with upstart}
- --enable-upstart \
- %endif
- %if %{with xmlconf}
- --enable-xmlconf \
- %endif
- %if %{with qdevices}
- --enable-qdevices \
- %endif
- %if %{with qnetd}
- --enable-qnetd \
- %endif
- %if %{with libcgroup}
- --enable-libcgroup \
- %endif
- --with-initddir=%{_initrddir} \
- --with-systemddir=%{_unitdir} \
- --with-upstartdir=%{_sysconfdir}/init
- make %{_smp_mflags}
- %install
- rm -rf %{buildroot}
- make install DESTDIR=%{buildroot}
- %if %{with dbus}
- mkdir -p -m 0700 %{buildroot}/%{_sysconfdir}/dbus-1/system.d
- install -m 644 %{_builddir}/%{name}-%{version}%{?gittarver}/conf/corosync-signals.conf %{buildroot}/%{_sysconfdir}/dbus-1/system.d/corosync-signals.conf
- %endif
- ## tree fixup
- # drop static libs
- rm -f %{buildroot}%{_libdir}/*.a
- rm -f %{buildroot}%{_libdir}/*.la
- # drop docs and html docs for now
- rm -rf %{buildroot}%{_docdir}/*
- # /etc/sysconfig/corosync-notifyd
- mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
- install -m 644 tools/corosync-notifyd.sysconfig.example \
- %{buildroot}%{_sysconfdir}/sysconfig/corosync-notifyd
- # /etc/sysconfig/corosync
- install -m 644 init/corosync.sysconfig.example \
- %{buildroot}%{_sysconfdir}/sysconfig/corosync
- %if %{with qdevices}
- # /etc/sysconfig/corosync-qdevice
- install -m 644 init/corosync-qdevice.sysconfig.example \
- %{buildroot}%{_sysconfdir}/sysconfig/corosync-qdevice
- %endif
- %if %{with qnetd}
- # /etc/sysconfig/corosync-qnetd
- install -m 644 init/corosync-qnetd.sysconfig.example \
- %{buildroot}%{_sysconfdir}/sysconfig/corosync-qnetd
- %if %{with systemd}
- sed -i -e 's/^#User=/User=/' \
- %{buildroot}%{_unitdir}/corosync-qnetd.service
- %else
- sed -i -e 's/^COROSYNC_QNETD_RUNAS=""$/COROSYNC_QNETD_RUNAS="coroqnetd"/' \
- %{buildroot}%{_sysconfdir}/sysconfig/corosync-qnetd
- %endif
- %endif
- %clean
- rm -rf %{buildroot}
- %description
- This package contains the Corosync Cluster Engine Executive, several default
- APIs and libraries, default configuration files, and an init script.
- %post
- %if %{with systemd} && 0%{?systemd_post:1}
- %systemd_post corosync.service
- %else
- if [ $1 -eq 1 ]; then
- /sbin/chkconfig --add corosync || :
- fi
- %endif
- %preun
- %if %{with systemd} && 0%{?systemd_preun:1}
- %systemd_preun corosync.service
- %else
- if [ $1 -eq 0 ]; then
- /sbin/service corosync stop &>/dev/null || :
- /sbin/chkconfig --del corosync || :
- fi
- %endif
- %postun
- %if %{with systemd} && 0%{?systemd_postun:1}
- %systemd_postun
- %endif
- %files
- %defattr(-,root,root,-)
- %doc LICENSE SECURITY
- %{_sbindir}/corosync
- %{_sbindir}/corosync-keygen
- %{_sbindir}/corosync-cmapctl
- %{_sbindir}/corosync-cfgtool
- %{_sbindir}/corosync-cpgtool
- %{_sbindir}/corosync-quorumtool
- %{_sbindir}/corosync-notifyd
- %{_bindir}/corosync-blackbox
- %if %{with xmlconf}
- %{_bindir}/corosync-xmlproc
- %config(noreplace) %{_sysconfdir}/corosync/corosync.xml.example
- %dir %{_datadir}/corosync
- %{_datadir}/corosync/xml2conf.xsl
- %{_mandir}/man8/corosync-xmlproc.8*
- %{_mandir}/man5/corosync.xml.5*
- %endif
- %dir %{_sysconfdir}/corosync
- %dir %{_sysconfdir}/corosync/uidgid.d
- %config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example
- %config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example.udpu
- %config(noreplace) %{_sysconfdir}/sysconfig/corosync-notifyd
- %config(noreplace) %{_sysconfdir}/sysconfig/corosync
- %config(noreplace) %{_sysconfdir}/logrotate.d/corosync
- %if %{with dbus}
- %{_sysconfdir}/dbus-1/system.d/corosync-signals.conf
- %endif
- %if %{with snmp}
- %{_datadir}/snmp/mibs/COROSYNC-MIB.txt
- %endif
- %if %{with systemd}
- %{_unitdir}/corosync.service
- %{_unitdir}/corosync-notifyd.service
- %else
- %{_initrddir}/corosync
- %{_initrddir}/corosync-notifyd
- %endif
- %if %{with upstart}
- %{_sysconfdir}/init/corosync.conf
- %{_sysconfdir}/init/corosync-notifyd.conf
- %endif
- %dir %{_localstatedir}/lib/corosync
- %dir %{_localstatedir}/log/cluster
- %{_mandir}/man8/corosync_overview.8*
- %{_mandir}/man8/corosync.8*
- %{_mandir}/man8/corosync-blackbox.8*
- %{_mandir}/man8/corosync-cmapctl.8*
- %{_mandir}/man8/corosync-keygen.8*
- %{_mandir}/man8/corosync-cfgtool.8*
- %{_mandir}/man8/corosync-cpgtool.8*
- %{_mandir}/man8/corosync-notifyd.8*
- %{_mandir}/man8/corosync-quorumtool.8*
- %{_mandir}/man5/corosync.conf.5*
- %{_mandir}/man5/votequorum.5*
- %{_mandir}/man8/cmap_keys.8*
- # optional testagent rpm
- #
- %if %{with testagents}
- %package -n corosync-testagents
- Summary: The Corosync Cluster Engine Test Agents
- Group: Development/Libraries
- Requires: %{name} = %{version}-%{release}
- %description -n corosync-testagents
- This package contains corosync test agents.
- %files -n corosync-testagents
- %defattr(755,root,root,-)
- %{_datadir}/corosync/tests/mem_leak_test.sh
- %{_datadir}/corosync/tests/net_breaker.sh
- %{_datadir}/corosync/tests/cmap-dispatch-deadlock.sh
- %{_datadir}/corosync/tests/shm_leak_audit.sh
- %{_bindir}/cpg_test_agent
- %{_bindir}/sam_test_agent
- %{_bindir}/votequorum_test_agent
- %endif
- # library
- #
- %package -n corosynclib
- Summary: The Corosync Cluster Engine Libraries
- Group: System Environment/Libraries
- %description -n corosynclib
- This package contains corosync libraries.
- %files -n corosynclib
- %defattr(-,root,root,-)
- %doc LICENSE
- %{_libdir}/libcfg.so.*
- %{_libdir}/libcpg.so.*
- %{_libdir}/libcmap.so.*
- %{_libdir}/libtotem_pg.so.*
- %{_libdir}/libquorum.so.*
- %{_libdir}/libvotequorum.so.*
- %{_libdir}/libsam.so.*
- %{_libdir}/libcorosync_common.so.*
- %post -n corosynclib -p /sbin/ldconfig
- %postun -n corosynclib -p /sbin/ldconfig
- %package -n corosynclib-devel
- Summary: The Corosync Cluster Engine Development Kit
- Group: Development/Libraries
- Requires: corosynclib%{?_isa} = %{version}-%{release}
- Requires: pkgconfig
- Provides: corosync-devel = %{version}
- Obsoletes: corosync-devel < 0.92-7
- %description -n corosynclib-devel
- This package contains include files and man pages used to develop using
- The Corosync Cluster Engine APIs.
- %files -n corosynclib-devel
- %defattr(-,root,root,-)
- %doc LICENSE
- %dir %{_includedir}/corosync/
- %{_includedir}/corosync/corodefs.h
- %{_includedir}/corosync/cfg.h
- %{_includedir}/corosync/cmap.h
- %{_includedir}/corosync/corotypes.h
- %{_includedir}/corosync/cpg.h
- %{_includedir}/corosync/hdb.h
- %{_includedir}/corosync/sam.h
- %{_includedir}/corosync/quorum.h
- %{_includedir}/corosync/votequorum.h
- %dir %{_includedir}/corosync/totem/
- %{_includedir}/corosync/totem/totem.h
- %{_includedir}/corosync/totem/totemip.h
- %{_includedir}/corosync/totem/totempg.h
- %{_includedir}/corosync/totem/totemstats.h
- %{_libdir}/libcfg.so
- %{_libdir}/libcpg.so
- %{_libdir}/libcmap.so
- %{_libdir}/libtotem_pg.so
- %{_libdir}/libquorum.so
- %{_libdir}/libvotequorum.so
- %{_libdir}/libsam.so
- %{_libdir}/libcorosync_common.so
- %{_libdir}/pkgconfig/*.pc
- %{_mandir}/man3/cpg_*3*
- %{_mandir}/man3/quorum_*3*
- %{_mandir}/man3/votequorum_*3*
- %{_mandir}/man3/sam_*3*
- %{_mandir}/man8/cpg_overview.8*
- %{_mandir}/man8/votequorum_overview.8*
- %{_mandir}/man8/sam_overview.8*
- %{_mandir}/man3/cmap_*3*
- %{_mandir}/man8/cmap_overview.8*
- %{_mandir}/man8/quorum_overview.8*
- # optional qdevices
- #
- %if %{with qdevices}
- %package -n corosync-qdevice
- Summary: The Corosync Cluster Engine Qdevice
- Group: System Environment/Base
- Requires: %{name} = %{version}-%{release}
- # The automatic dependency overridden in favor of explicit version lock
- Requires: corosynclib%{?_isa} = %{version}-%{release}
- Requires: nss-tools
- %if %{with systemd}
- Requires(post): systemd
- Requires(preun): systemd
- Requires(postun): systemd
- %endif
- %description -n corosync-qdevice
- This package contains the Corosync Cluster Engine Qdevice, script for creating
- NSS certificates and an init script.
- %post -n corosync-qdevice
- %if %{with systemd} && 0%{?systemd_post:1}
- %systemd_post corosync-qdevice.service
- %else
- if [ $1 -eq 1 ]; then
- /sbin/chkconfig --add corosync-qdevice || :
- fi
- %endif
- %preun -n corosync-qdevice
- %if %{with systemd} && 0%{?systemd_preun:1}
- %systemd_preun corosync-qdevice.service
- %else
- if [ $1 -eq 0 ]; then
- /sbin/service corosync-qdevice stop &>/dev/null || :
- /sbin/chkconfig --del corosync-qdevice || :
- fi
- %endif
- %postun -n corosync-qdevice
- %if %{with systemd} && 0%{?systemd_postun:1}
- %systemd_postun
- %endif
- %files -n corosync-qdevice
- %defattr(-,root,root,-)
- %dir %{_sysconfdir}/corosync/qdevice
- %dir %config(noreplace) %{_sysconfdir}/corosync/qdevice/net
- %dir %{_localstatedir}/run/corosync-qdevice
- %{_sbindir}/corosync-qdevice
- %{_sbindir}/corosync-qdevice-net-certutil
- %{_sbindir}/corosync-qdevice-tool
- %config(noreplace) %{_sysconfdir}/sysconfig/corosync-qdevice
- %if %{with systemd}
- %{_unitdir}/corosync-qdevice.service
- %else
- %{_initrddir}/corosync-qdevice
- %endif
- %{_mandir}/man8/corosync-qdevice-tool.8*
- %{_mandir}/man8/corosync-qdevice-net-certutil.8*
- %{_mandir}/man8/corosync-qdevice.8*
- %endif
- # optional qnetd
- #
- %if %{with qnetd}
- %package -n corosync-qnetd
- Summary: The Corosync Cluster Engine Qdevice Network Daemon
- Group: System Environment/Base
- Requires: nss-tools
- Requires(pre): shadow-utils
- %if %{with systemd}
- Requires(post): systemd
- Requires(preun): systemd
- Requires(postun): systemd
- %endif
- %description -n corosync-qnetd
- This package contains the Corosync Cluster Engine Qdevice Network Daemon, script for creating
- NSS certificates and an init script.
- %pre -n corosync-qnetd
- getent group coroqnetd >/dev/null || groupadd -r coroqnetd
- getent passwd coroqnetd >/dev/null || \
- useradd -r -g coroqnetd -d / -s /sbin/nologin -c "User for corosync-qnetd" coroqnetd
- exit 0
- %post -n corosync-qnetd
- %if %{with systemd} && 0%{?systemd_post:1}
- %systemd_post corosync-qnetd.service
- %else
- if [ $1 -eq 1 ]; then
- /sbin/chkconfig --add corosync-qnetd || :
- fi
- %endif
- %preun -n corosync-qnetd
- %if %{with systemd} && 0%{?systemd_preun:1}
- %systemd_preun corosync-qnetd.service
- %else
- if [ $1 -eq 0 ]; then
- /sbin/service corosync-qnetd stop &>/dev/null || :
- /sbin/chkconfig --del corosync-qnetd || :
- fi
- %endif
- %postun -n corosync-qnetd
- %if %{with systemd} && 0%{?systemd_postun:1}
- %systemd_postun
- %endif
- %files -n corosync-qnetd
- %defattr(-,root,root,-)
- %dir %config(noreplace) %attr(770, coroqnetd, coroqnetd) %{_sysconfdir}/corosync/qnetd
- %dir %attr(770, coroqnetd, coroqnetd) %{_localstatedir}/run/corosync-qnetd
- %{_bindir}/corosync-qnetd
- %{_bindir}/corosync-qnetd-certutil
- %{_bindir}/corosync-qnetd-tool
- %config(noreplace) %{_sysconfdir}/sysconfig/corosync-qnetd
- %if %{with systemd}
- %{_unitdir}/corosync-qnetd.service
- %else
- %{_initrddir}/corosync-qnetd
- %endif
- %{_mandir}/man8/corosync-qnetd-tool.8*
- %{_mandir}/man8/corosync-qnetd-certutil.8*
- %{_mandir}/man8/corosync-qnetd.8*
- %endif
- %changelog
- * @date@ Autotools generated version <nobody@nowhere.org> - @version@-1-@numcomm@.@alphatag@.@dirty@
- - Autotools generated version
|