%global gname haclient
%global uname hacluster
%global pcmk_docdir %{_docdir}/%{name}

#%global specversion 3
#%global upstream_version Pacemaker-1.1.2
#%global upstream_prefix Pacemaker-1-1-

%global py_site %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")

# Turn off the auto compilation of python files not in the site-packages directory
# Needed so that the -devel package is multilib compliant
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')

%global cs_major %(pkg-config corosync --modversion  | awk -F . '{print $1}')
%global cs_minor %(pkg-config corosync --modversion  | awk -F . '{print $2}')


# Conditionals
# Invoke "rpmbuild --without <feature>" or "rpmbuild --with <feature>"
# to disable or enable specific features

# Legacy stonithd fencing agents
%bcond_with stonithd

# Build with/without support for profiling tools
%bcond_with profiling

# We generate docs using Publican, Asciidoc and Inkscape, but they're not available everywhere
%bcond_without doc

# Use a different versioning scheme
%bcond_with pre_release

# Ship an Upstart job file
%bcond_with upstart_job

%if %{with profiling}
# This disables -debuginfo package creation and also the stripping binaries/libraries
# Useful if you want sane profiling data
%global debug_package %{nil}
%endif

# Keep around for when/if required
#global alphatag %{upstream_version}.hg

#%global pcmk_release %{?alphatag:0.}%{specversion}%{?alphatag:.%{alphatag}}%{?dist}

# When downloading directly from Mercurial, it will automatically add a prefix
# Invoking 'hg archive' wont but you can add one with:
# hg archive -t tgz -p "$upstream_prefix-$upstream_version" -r $upstream_version $upstream_version.tar.gz

Name:	       pacemaker
Summary:       Scalable High-Availability cluster resource manager
Summary(ja):   スケーラブルかつ高可用性なクラスタリソースマネージャ
Version:       1.1.12
Release:       1%{?_dist_release}
License:       GPLv2+ and LGPLv2+
Group:	       System Environment/Daemons
URL:	       http://www.clusterlabs.org

Source0:       https://github.com/ClusterLabs/%{name}/archive/Pacemaker-%{version}.tar.gz

BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root
AutoReqProv:   on
#Requires(pre):	cluster-glue
Requires:      resource-agents
Requires:      %{name}-libs = %{version}-%{release}
Requires:      %{name}-cluster-libs = %{version}-%{release}
Requires:      %{name}-cli = %{version}-%{release}
Requires:      python >= 2.4

# Required for core functionality
BuildRequires:	automake autoconf libtool pkgconfig libtool-ltdl-devel
BuildRequires:	glib2-devel libxml2-devel libxslt-devel libuuid-devel 
BuildRequires:	pkgconfig python-devel gcc-c++ bzip2-devel pam-devel

# Required for agent_config.h which specifies the correct scratch directory
BuildRequires: resource-agents

# We need reasonably recent versions of libqb
BuildRequires: libqb-devel > 0.11.0
Requires:      libqb > 0.11.0

# Enables optional functionality
BuildRequires: ncurses-devel openssl-devel docbook-style-xsl
BuildRequires: bison byacc flex help2man dbus-devel

%if %{defined _unitdir}
BuildRequires: systemd-devel
%endif

Requires:      corosync
BuildRequires: corosynclib-devel

%if %{with stonithd}
BuildRequires: cluster-glue-libs-devel
%endif

%if %{with doc}
%ifarch %{ix86} x86_64
BuildRequires: inkscape asciidoc
#BuildRequires: publican inkscape asciidoc
%endif
%endif

%description
Pacemaker is an advanced, scalable High-Availability cluster resource
manager for Corosync, CMAN and/or Linux-HA.

It supports more than 16 node clusters with significant capabilities
for managing resources and dependencies.

It will run scripts at initialization, when machines go up or down,
when related resources fail and can be configured to periodically check
resource health.

Available rpmbuild rebuild options:
  --with(out) : stonithd doc profiling pre_release upstart_job

%package cli
License:      GPLv2+ and LGPLv2+
Summary:      Command line tools for controlling Pacemaker clusters
Group:        System Environment/Base
Requires:     %{name}-libs = %{version}-%{release}
Requires:     perl-TimeDate

%description cli
Pacemaker is an advanced, scalable High-Availability cluster resource
manager for Corosync, CMAN and/or Linux-HA.

The %{name}-cli package contains command line tools that can be used
to query and control the cluster from machines that may, or may not,
be part of the cluster.


%package -n %{name}-libs
License:      GPLv2+ and LGPLv2+
Summary:      Core Pacemaker libraries
Summary(ja):  Pacemaker コアライブラリ
Group:	      System Environment/Libraries

%description -n pacemaker-libs
Pacemaker is an advanced, scalable High-Availability cluster resource
manager for Corosync, CMAN and/or Linux-HA.

The %{name}-libs package contains shared libraries needed for cluster
nodes and those just running the CLI tools.

%package -n %{name}-cluster-libs
License:      GPLv2+ and LGPLv2+
Summary:      Cluster Libraries used by Pacemaker
Summary(ja):  Pacemaker で用いられるクラスタライブラリ
Group:        System Environment/Libraries
Requires:     %{name}-libs = %{version}-%{release}

%description -n %{name}-cluster-libs
Pacemaker is an advanced, scalable High-Availability cluster resource
manager for Corosync, CMAN and/or Linux-HA.

The %{name}-cluster-libs package contains cluster-aware shared
libraries needed for nodes that will form part of the cluster nodes.

%package remote
License:      GPLv2+ and LGPLv2+
Summary:      Pacemaker remote daemon for non-cluster nodes
Group:        System Environment/Daemons
Requires:     %{name}-libs = %{version}-%{release}
Requires:     %{name}-cli = %{version}-%{release}
Requires:     resource-agents
#%if %{defined systemd_requires}
#%systemd_requires
#%endif

%description remote
Pacemaker is an advanced, scalable High-Availability cluster resource
manager for Corosync, CMAN and/or Linux-HA.

The %{name}-remote package contains the Pacemaker Remote daemon
which is capable of extending pacemaker functionality to remote
nodes not running the full corosync/cluster stack.

%package -n %{name}-libs-devel 
License:      GPLv2+ and LGPLv2+
Summary:      Pacemaker development package
Summary(ja):  Pacemaker 開発パッケージ
Group:	      Development/Libraries
Requires:     %{name}-cts = %{version}-%{release}
Requires:     %{name}-libs = %{version}-%{release}
Requires:     %{name}-cluster-libs = %{version}-%{release}
Requires:     libtool-ltdl-devel libqb-devel libuuid-devel
Requires:     libxml2-devel libxslt-devel bzip2-devel glib2-devel
Requires:     corosynclib-devel

%description -n %{name}-libs-devel
Pacemaker is an advanced, scalable High-Availability cluster resource
manager for Corosync, CMAN and/or Linux-HA.

The %{name}-libs-devel package contains headers and shared libraries
for developing tools for Pacemaker.

%package	cts
License:	GPLv2+ and LGPLv2+
Summary:	Test framework for cluster-related technologies like Pacemaker
Group:		Development/Libraries
Requires:	python

%description	cts
Test framework for cluster-related technologies like Pacemaker

%package	doc
License:	GPLv2+ and LGPLv2+
Summary:	Documentation for Pacemaker
Summary(ja):	Pacemaker のドキュメント
Group:		Documentation

%description	doc
Documentation for Pacemaker.

Pacemaker is an advanced, scalable High-Availability cluster resource
manager for Corosync, CMAN and/or Linux-HA.

%prep
%setup -q -n %{name}-Pacemaker-%{version}

%build
./autogen.sh
%configure \
    %{?with_profiling: --with-profiling} \
    --with-initdir=%{_initrddir} \
    --docdir=%{pcmk_docdir}	\
    --localstatedir=%{_var} \
    --with-version=%{version}-%{release} \
    --disable-ansi

make %{_smp_mflags} V=1 docdir=%{pcmk_docdir} all

%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install

mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
mkdir -p $RPM_BUILD_ROOT%{_var}/lib/pacemaker/cores
install -m 644 mcp/pacemaker.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/pacemaker

%if %{with upstart_job}
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/init
install -m 644 mcp/pacemaker.upstart $RPM_BUILD_ROOT%{_sysconfdir}/init/pacemaker.conf
install -m 644 mcp/pacemaker.combined.upstart $RPM_BUILD_ROOT%{_sysconfdir}/init/pacemaker.combined.conf
%endif

# Scripts that need should be executable
chmod a+x $RPM_BUILD_ROOT%{_datadir}/pacemaker/tests/cts/CTSlab.py

# These are not actually scripts
find $RPM_BUILD_ROOT -name '*.xml' -type f -print0 | xargs -0 chmod a-x
find $RPM_BUILD_ROOT -name '*.xsl' -type f -print0 | xargs -0 chmod a-x
find $RPM_BUILD_ROOT -name '*.rng' -type f -print0 | xargs -0 chmod a-x
find $RPM_BUILD_ROOT -name '*.dtd' -type f -print0 | xargs -0 chmod a-x
 
# Dont package static libs or compiled python
find $RPM_BUILD_ROOT -name '*.a' -type f -print0 | xargs -0 rm -f
find $RPM_BUILD_ROOT -name '*.la' -type f -print0 | xargs -0 rm -f

# Don't package these either
rm -f $RPM_BUILD_ROOT%{_libdir}/service_crm.so

# Don't ship init scripts for systemd based platforms
%if %{defined _unitdir}
rm -f $RPM_BUILD_ROOT%{_initrddir}/pacemaker
rm -f $RPM_BUILD_ROOT%{_initrddir}/pacemaker_remote
%endif

%if %{with profiling}
GCOV_BASE=$RPM_BUILD_ROOT/%{_var}/lib/pacemaker/gcov
mkdir -p $GCOV_BASE
find . -name '*.gcno' -type f | while read F ; do
        D=`dirname $F`
        mkdir -p ${GCOV_BASE}/$D
        cp $F ${GCOV_BASE}/$D
done
%endif

%clean
rm -rf $RPM_BUILD_ROOT

%post
%if %{defined _unitdir} && 0%{?systemd_post:1}
%systemd_post pacemaker.service
%else
if [ $1 -eq 1 ]; then
    /sbin/chkconfig --add pacemaker || :
fi
%endif

%preun
%if %{defined _unitdir} && 0%{?systemd_preun:1}
%systemd_preun pacemaker.service
%else
if [ $1 -eq 0 ]; then
    /sbin/service pacemaker stop &>/dev/null || :
    /sbin/chkconfig --del pacemaker || :
fi
%endif

%postun
%if %{defined _unitdir} && 0%{?systemd_postun_with_restart:1}
%systemd_postun_with_restart pacemaker.service 
%endif

%post remote
%if %{defined _unitdir} && 0%{?systemd_post:1}
%systemd_post pacemaker_remote.service
%else
if [ $1 -eq 1 ]; then
    /sbin/chkconfig --add pacemaker_remote || :
fi
%endif

%preun remote
%if %{defined _unitdir} && 0%{?systemd_preun:1}
%systemd_preun pacemaker_remote.service
%else
if [ $1 -eq 0 ]; then
    /sbin/service pacemaker_remote stop &>/dev/null || :
    /sbin/chkconfig --del pacemaker_remote || :
fi
%endif

%postun remote
%if %{defined _unitdir} && 0%{?systemd_postun_with_restart:1}
%systemd_postun_with_restart pacemaker_remote.service 
%endif

%pre -n %{name}-libs
getent group %{gname} >/dev/null || groupadd -r %{gname} -g 189
getent passwd %{uname} >/dev/null || useradd -r -g %{gname} -u 189 -s /sbin/nologin -c "cluster user" %{uname}
exit 0

%post -n %{name}-libs -p /sbin/ldconfig

%postun -n %{name}-libs -p /sbin/ldconfig

%post -n %{name}-cluster-libs -p /sbin/ldconfig

%postun -n %{name}-cluster-libs -p /sbin/ldconfig

%files
###########################################################
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog

%exclude %{_datadir}/pacemaker/tests

%config(noreplace) %{_sysconfdir}/sysconfig/pacemaker
%{_sbindir}/pacemakerd

%if %{defined _unitdir}
%{_unitdir}/pacemaker.service
%else
%{_initrddir}/pacemaker
%endif

%{_datadir}/pacemaker
%{_datadir}/snmp/mibs/PCMK-MIB.txt
%exclude %{_libexecdir}/pacemaker/lrmd_test
%exclude %{_sbindir}/pacemaker_remoted
%{_libexecdir}/pacemaker/*

%{_sbindir}/crm_attribute
%{_sbindir}/crm_master
%{_sbindir}/crm_node
%{_sbindir}/attrd_updater
%{_sbindir}/fence_legacy
%{_sbindir}/fence_pcmk
%{_sbindir}/stonith_admin

%doc %{_mandir}/man7/*
%doc %{_mandir}/man8/attrd_updater.*
%doc %{_mandir}/man8/crm_attribute.*
%doc %{_mandir}/man8/crm_node.*
%doc %{_mandir}/man8/crm_master.*
%doc %{_mandir}/man8/fence_pcmk.*
%doc %{_mandir}/man8/pacemakerd.*
%doc %{_mandir}/man8/stonith_admin.*

%dir %attr (750, %{uname}, %{gname}) %{_var}/lib/pacemaker
%dir %attr (750, %{uname}, %{gname}) %{_var}/lib/pacemaker/cib
%dir %attr (750, %{uname}, %{gname}) %{_var}/lib/pacemaker/cores
%dir %attr (750, %{uname}, %{gname}) %{_var}/lib/pacemaker/pengine
%dir %attr (750, %{uname}, %{gname}) %{_var}/lib/pacemaker/blackbox
%ghost %dir %attr (750, %{uname}, %{gname}) %{_var}/run/crm
%dir /usr/lib/ocf
%dir /usr/lib/ocf/resource.d
/usr/lib/ocf/resource.d/pacemaker

%if 0%{?cs_major} < 2
%if 0%{?cs_minor} < 8
%{_libexecdir}/lcrso/pacemaker.lcrso
%endif
%endif

%if %{with upstart_job}
%config(noreplace) %{_sysconfdir}/init/pacemaker.conf
%config(noreplace) %{_sysconfdir}/init/pacemaker.combined.conf
%endif

%files cli
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog
%{_sbindir}/cibadmin
%{_sbindir}/crm_diff
%{_sbindir}/crm_error
%{_sbindir}/crm_failcount
%{_sbindir}/crm_mon
%{_sbindir}/crm_resource
%{_sbindir}/crm_standby
%{_sbindir}/crm_verify
%{_sbindir}/crmadmin
%{_sbindir}/iso8601
%{_sbindir}/crm_shadow
%{_sbindir}/crm_simulate
%{_sbindir}/crm_report
%{_sbindir}/crm_ticket
%doc %{_mandir}/man8/*
%exclude %{_mandir}/man8/attrd_updater.*
%exclude %{_mandir}/man8/crm_attribute.*
%exclude %{_mandir}/man8/crm_node.*
%exclude %{_mandir}/man8/crm_master.*
%exclude %{_mandir}/man8/fence_pcmk.*
%exclude %{_mandir}/man8/pacemakerd.*
%exclude %{_mandir}/man8/pacemaker_remoted.*
%exclude %{_mandir}/man8/stonith_admin.*

%files -n %{name}-libs
%defattr(-,root,root)
%doc AUTHORS COPYING.LIB
%{_libdir}/libcib.so.*
%{_libdir}/liblrmd.so.*
%{_libdir}/libcrmservice.so.*
%{_libdir}/libcrmcommon.so.*
%{_libdir}/libpe_status.so.*
%{_libdir}/libpe_rules.so.*
%{_libdir}/libpengine.so.*
%{_libdir}/libstonithd.so.*
%{_libdir}/libtransitioner.so.*

%files -n %{name}-cluster-libs
%defattr(-,root,root)
%{_libdir}/libcrmcluster.so.*
%doc AUTHORS COPYING.LIB


%files remote
%defattr(-,root,root)
%doc AUTHORS COPYING.LIB
%config(noreplace) %{_sysconfdir}/logrotate.d/pacemaker
%config(noreplace) %{_sysconfdir}/sysconfig/pacemaker
%if %{defined _unitdir}
%{_unitdir}/pacemaker_remote.service
%else
%{_initrddir}/pacemaker_remote
%endif
%{_sbindir}/pacemaker_remoted
%{_mandir}/man8/pacemaker_remoted.*

%files doc
%defattr(-,root,root)
%doc %{pcmk_docdir}

%files cts
%defattr(-,root,root)
%doc AUTHORS COPYING.LIB
%{py_site}/cts
%{_datadir}/pacemaker/tests/cts
%{_libexecdir}/pacemaker/lrmd_test

%files -n %{name}-libs-devel
%defattr(-,root,root)
%doc AUTHORS COPYING.LIB
%exclude %{_datadir}/pacemaker/tests/cts
%{_datadir}/pacemaker/tests
%{_includedir}/pacemaker
%{_libdir}/*.so
%if %{with profiling}
%{_var}/lib/pacemaker
%endif
%{_libdir}/pkgconfig/*.pc


%changelog
* Sat Feb 28 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 1.1.12-1
- updated to 1.1.12
- rebuilt with gnutls 3.2.20 and corosync 2.3.4

* Wed Mar 07 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.1.2-4
- rebuild with net-snmp-5.7.1

* Wed Feb 29 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.1.2-3
- rebuild with python-2.7.2

* Sun Mar 20 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.1.2-2
- rebuild with openssl-1.0.0d

* Sat Jul 10 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 	1.1.2-1
- initial build for Vine Linux

* Mon Jun 21 2010 Andrew Beekhof <andrew@beekhof.net> - 1.1.2-3
- publican is only available as a dependancy on i386/x86_64 machines

* Fri Jun 11 2010 Andrew Beekhof <andrew@beekhof.net> - 1.1.2-2
- Resolves rhbz#602239 - Added patch to documentation so that it passes validation
- High: Core: Bug lf#2401 - Backed out changeset 6e6980376f01

* Tue Jun 01 2010 Marcela Maslanova <mmaslano@redhat.com> - 1.1.2-1.1
- Mass rebuild with perl-5.12.0

* Wed May 12 2010 Andrew Beekhof <andrew@beekhof.net> - 1.1.2-1
- Update the tarball from the upstream 1.1.2 release 
  + High: ais: Bug lf#2340 - Force rogue child processes to terminate after waiting 2.5 minutes
  + High: ais: Bug lf#2359 - Default expected votes to 2 inside Corosync/OpenAIS plugin
  + High: ais: Bug lf#2359 - expected-quorum-votes not correctly updated after membership change
  + High: ais: Bug rhbz#525552 - Move non-threadsafe calls to setenv() to after the fork()
  + High: ais: Do not count votes from offline nodes and calculate current votes before sending quorum data
  + High: ais: Ensure the list of active processes sent to clients is always up-to-date
  + High: ais: Fix previous commit, actually return a result in get_process_list()
  + High: ais: Fix two more uses of getpwnam() in non-thread-safe locations
  + High: ais: Look for the correct conf variable for turning on file logging
  + High: ais: Need to find a better and thread-safe way to set core_uses_pid. Disable for now.
  + High: ais: Use the threadsafe version of getpwnam
  + High: Core: Bug lf#2414 - Prevent use-after-free reported by valgrind when doing xpath based deletions
  + High: Core: Bump the feature set due to the new failcount expiry feature
  + High: Core: Fix memory leak in replace_xml_child() reported by valgrind
  + High: Core: fix memory leaks exposed by valgrind
  + High: crmd: Bug 2401 - Improved detection of partially active peers
  + High: crmd: Bug bnc#578644 - Improve handling of cancelled operations caused by resource cleanup
  + High: crmd: Bug lf#2379 - Ensure the cluster terminates when the PE is not available
  + High: crmd: Bug lf#2414 - Prevent use-after-free of the PE connection after it dies
  + High: crmd: Bug lf#2414 - Prevent use-after-free of the stonith-ng connection
  + High: crmd: Do not allow the target_rc to be misused by resource agents
  + High: crmd: Do not ignore action timeouts based on FSA state
  + High: crmd: Ensure we dont get stuck in S_PENDING if we loose an election to someone that never talks to us again
  + High: crmd: Fix memory leaks exposed by valgrind
  + High: crmd: Remove race condition that could lead to multiple instances of a clone being active on a machine
  + High: crmd: Send erase_status_tag() calls to the local CIB when the DC is fenced, since there is no DC to accept them
  + High: crmd: Use global fencing notifications to prevent secondary fencing operations of the DC
  + High: fencing: Account for stonith_get_info() always returning a pointer to the same static buffer
  + High: PE: Allow startup probes to be disabled - their calculation is a major bottleneck for very large clusters
  + High: PE: Bug lf#2317 - Avoid needless restart of primitive depending on a clone
  + High: PE: Bug lf#2358 - Fix master-master anti-colocation
  + High: PE: Bug lf#2361 - Ensure clones observe mandatory ordering constraints if the LHS is unrunnable
  + High: PE: Bug lf#2383 - Combine failcounts for all instances of an anonymous clone on a host
  + High: PE: Bug lf#2384 - Fix intra-set colocation and ordering
  + High: PE: Bug lf#2403 - Enforce mandatory promotion (colocation) constraints
  + High: PE: Bug lf#2412 - Correctly locate clone instances by their prefix
  + High: PE: Correctly implement optional colocation between primitives and clone resources
  + High: PE: Do not be so quick to pull the trigger on nodes that are coming up
  + High: PE: Fix memory leaks exposed by valgrind
  + High: PE: Fix memory leaks reported by valgrind
  + High: PE: Repair handling of unordered groups in RHS ordering constraints
  + High: PE: Rewrite native_merge_weights() to avoid Fix use-after-free
  + High: PE: Suppress duplicate ordering constraints to achieve orders of magnitude speed increases for large clusters
  + High: Shell: add support for xml in cli
  + High: Shell: always reload status if working with the cluster (bnc#590035)
  + High: Shell: check timeouts also against the default-action-timeout property
  + High: Shell: Default to using the status section from the live CIB (bnc#592762)
  + High: Shell: edit multiple meta_attributes sets in resource management (lf#2315)
  + High: Shell: enable comments (lf#2221)
  + High: Shell: implement new cibstatus interface and commands (bnc#580492)
  + High: Shell: improve configure commit (lf#2336)
  + High: Shell: new cibstatus import command (bnc#585471)
  + High: Shell: new configure filter command
  + High: Shell: restore error reporting in options
  + High: Shell: split shell into modules
  + High: Shell: support for the utilization element (old patch for the new structure)
  + High: Shell: update previous node lookup procedure to include the id where necessary
  + High: Tools: crm_mon - fix memory leaks exposed by valgrind

* Thu Feb 11 2010 Andrew Beekhof <andrew@beekhof.net> - 1.1.1-0.1-60b7753f7310.hg
- Update the tarball from upstream to version 60b7753f7310
  + First public release of the 1.1 series

* Wed Dec 9 2009 Andrew Beekhof <andrew@beekhof.net> - 1.0.5-5
- Include patch of changeset 66b7bfd467f3:
  Some clients such as gfs_controld want a cluster name, allow one to be specified in corosync.conf

* Thu Oct 29 2009 Andrew Beekhof <andrew@beekhof.net> - 1.0.5-4
- Include the fixes from CoroSync integration testing
- Move the resource templates - they are not documentation
- Ensure documentation is placed in a standard location
- Exclude documentation that is included elsewhere in the package

- Update the tarball from upstream to version ee19d8e83c2a
  + High: cib: Correctly clean up when both plaintext and tls remote ports are requested
  + High: PE: Bug bnc#515172 - Provide better defaults for lt(e) and gt(e) comparisions
  + High: PE: Bug lf#2197 - Allow master instances placemaker to be influenced by colocation constraints
  + High: PE: Make sure promote/demote pseudo actions are created correctly
  + High: PE: Prevent target-role from promoting more than master-max instances
  + High: ais: Bug lf#2199 - Prevent expected-quorum-votes from being populated with garbage
  + High: ais: Prevent deadlock - dont try to release IPC message if the connection failed
  + High: cib: For validation errors, send back the full CIB so the client can display the errors
  + High: cib: Prevent use-after-free for remote plaintext connections
  + High: crmd: Bug lf#2201 - Prevent use-of-NULL when running heartbeat
  + High: Core: Bug lf#2169 - Allow dtd/schema validation to be disabled
  + High: PE: Bug lf#2106 - Not all anonymous clone children are restarted after configuration change
  + High: PE: Bug lf#2170 - stop-all-resources option had no effect
  + High: PE: Bug lf#2171 - Prevent groups from starting if they depend on a complex resource which cannot
  + High: PE: Disable resource management if stonith-enabled=true and no stonith resources are defined
  + High: PE: Do not include master score if it would prevent allocation
  + High: ais: Avoid excessive load by checking for dead children every 1s (instead of 100ms)
  + High: ais: Bug rh#525589 - Prevent shutdown deadlocks when running on CoroSync
  + High: ais: Gracefully handle changes to the AIS nodeid
  + High: crmd: Bug bnc#527530 - Wait for the transition to complete before leaving S_TRANSITION_ENGINE
  + High: crmd: Prevent use-after-free with LOG_DEBUG_3
  + Medium: xml: Mask the "symmetrical" attribute on rsc_colocation constraints (bnc#540672)
  + Medium (bnc#520707): Tools: crm: new templates ocfs2 and clvm
  + Medium: Build: Invert the disable ais/heartbeat logic so that --without (ais|heartbeat) is available to rpmbuild
  + Medium: PE: Bug lf#2178 - Indicate unmanaged clones
  + Medium: PE: Bug lf#2180 - Include node information for all failed ops
  + Medium: PE: Bug lf#2189 - Incorrect error message when unpacking simple ordering constraint
  + Medium: PE: Correctly log resources that would like to start but cannot
  + Medium: PE: Stop ptest from logging to syslog
  + Medium: ais: Include version details in plugin name
  + Medium: crmd: Requery the resource metadata after every start operation

* Fri Oct  9 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 1.0.5-3
- rebuilt with new net-snmp

* Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 1.0.5-2.1
- rebuilt with new openssl

* Wed Aug 19 2009 Andrew Beekhof <andrew@beekhof.net> - 1.0.5-2
- Add versioned perl dependancy as specified by
    https://fedoraproject.org/wiki/Packaging/Perl#Packages_that_link_to_libperl
- No longer remove RPATH data, it prevents us finding libperl.so and no other
  libraries were being hardcoded
- Compile in support for heartbeat
- Conditionally add heartbeat-devel and corosynclib-devel to the -devel requirements 
  depending on which stacks are supported

* Mon Aug 17 2009 Andrew Beekhof <andrew@beekhof.net> - 1.0.5-1
- Add dependancy on resource-agents
- Use the version of the configure macro that supplies --prefix, --libdir, etc
- Update the tarball from upstream to version 462f1569a437 (Pacemaker 1.0.5 final)
  + High: Tools: crm_resource - Advertise --move instead of --migrate
  + Medium: Extra: New node connectivity RA that uses system ping and attrd_updater
  + Medium: crmd: Note that dc-deadtime can be used to mask the brokeness of some switches

* Tue Aug 11 2009 Ville Skyttä <ville.skytta@iki.fi> - 1.0.5-0.7.c9120a53a6ae.hg
- Use bzipped upstream tarball.

* Wed Jul  29 2009 Andrew Beekhof <andrew@beekhof.net> - 1.0.5-0.6.c9120a53a6ae.hg
- Add back missing build auto* dependancies
- Minor cleanups to the install directive

* Tue Jul  28 2009 Andrew Beekhof <andrew@beekhof.net> - 1.0.5-0.5.c9120a53a6ae.hg
- Add a leading zero to the revision when alphatag is used

* Tue Jul  28 2009 Andrew Beekhof <andrew@beekhof.net> - 1.0.5-0.4.c9120a53a6ae.hg
- Incorporate the feedback from the cluster-glue review
- Realistically, the version is a 1.0.5 pre-release
- Use the global directive instead of define for variables
- Use the haclient/hacluster group/user instead of daemon
- Use the _configure macro
- Fix install dependancies

* Fri Jul  24 2009 Andrew Beekhof <andrew@beekhof.net> - 1.0.4-3
- Include an AUTHORS and license file in each package
- Change the library package name to pacemaker-libs to be more 
  Fedora compliant
- Remove execute permissions from xml related files
- Reference the new cluster-glue devel package name
- Update the tarball from upstream to version c9120a53a6ae
  + High: PE: Only prevent migration if the clone dependancy is stopping/starting on the target node
  + High: PE: Bug 2160 - Dont shuffle clones due to colocation
  + High: PE: New implementation of the resource migration (not stop/start) logic
  + Medium: Tools: crm_resource - Prevent use-of-NULL by requiring a resource name for the -A and -a options
  + Medium: PE: Prevent use-of-NULL in find_first_action()
  + Low: Build: Include licensing files

* Tue Jul 14 2009 Andrew Beekhof <andrew@beekhof.net> - 1.0.4-2
- Reference authors from the project AUTHORS file instead of listing in description
- Change Source0 to reference the project's Mercurial repo
- Cleaned up the summaries and descriptions
- Incorporate the results of Fedora package self-review

* Tue Jul 14 2009 Andrew Beekhof <andrew@beekhof.net> - 1.0.4-1
- Initial checkin
