Refresh with upstream spec file

This commit is contained in:
Andrew Beekhof 2013-06-17 09:22:55 +10:00
parent b62c586905
commit c042ff7365
3 changed files with 76624 additions and 20 deletions

39349
pacemaker-781a388.patch Normal file

File diff suppressed because it is too large Load Diff

37184
pacemaker-d19719c.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -13,6 +13,10 @@
%{!?py_libdir: %{expand: %%global py_libdir %%{expand:%%%%{py_prefix}/%%%%{_lib}/python%%%%{py_ver}}}}
%{!?py_sitedir: %{expand: %%global py_sitedir %%{expand:%%%%{py_libdir}/site-packages}}}
# 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')
# Compatibility macro wrappers for legacy RPM versions that do not
# support conditional builds
%{!?bcond_without: %{expand: %%global bcond_without() %%{expand:%%%%{!?_without_%%{1}:%%%%global with_%%{1} 1}}}}
@ -49,7 +53,10 @@
%bcond_without doc
# Use a different versioning scheme
%bcond_without pre_release
%bcond_with pre_release
# Support Upstart job
%bcond_with upstart_job
%if %{with profiling}
# This disables -debuginfo package creation and also the stripping binaries/libraries
@ -65,7 +72,7 @@
Name: pacemaker
Summary: Scalable High-Availability cluster resource manager
Version: 1.1.9
Version: 1.1.10
Release: %{pcmk_release}%{?dist}
License: GPLv2+ and LGPLv2+
Url: http://www.clusterlabs.org
@ -82,12 +89,9 @@ Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-cluster-libs = %{version}-%{release}
Requires: %{name}-cli = %{version}-%{release}
Requires: python >= 2.4
Conflicts: heartbeat < 2.99
Obsoletes: rgmanager < 3.2.0
Provides: rgmanager >= 3.2.0
%if !%{with heartbeat}
Obsoletes: heartbeat < 3.0.4
Provides: heartbeat >= 3.0.4
%if 0%{?rhel} > 0
ExclusiveArch: i686 x86_64
%endif
%if %{defined _unitdir}
@ -119,6 +123,13 @@ BuildRequires: automake autoconf libtool pkgconfig python 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
%if 0%{?suse_version} >= 1100
# Renamed since opensuse-11.0
BuildRequires: libgnutls-devel
@ -128,7 +139,7 @@ BuildRequires: gnutls-devel
# Enables optional functionality
BuildRequires: ncurses-devel openssl-devel libselinux-devel docbook-style-xsl libqb-devel
BuildRequires: ncurses-devel openssl-devel libselinux-devel docbook-style-xsl
BuildRequires: bison byacc flex help2man
%if %{with cman}
@ -203,8 +214,7 @@ License: GPLv2+ and LGPLv2+
Summary: Command line tools for controlling Pacemaker clusters
Group: System Environment/Daemons
Requires: %{name}-libs = %{version}-%{release}
Obsoletes: modcluster < 1.0, cluster-snmp < 1.0, cluster-cim < 1.0
Provides: modcluster >= 1.0, cluster-snmp >= 1.0, cluster-cim >= 1.0
Requires: perl-TimeDate
%description cli
Pacemaker is an advanced, scalable High-Availability cluster resource
@ -239,13 +249,30 @@ manager for Linux-HA (Heartbeat) and/or Corosync.
The %{name}-cluster-libs package contains cluster-aware shared
libraries needed for nodes that will form part of the cluster nodes.
%package -n %{name}-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
%description -n %{name}-remote
Pacemaker is an advanced, scalable High-Availability cluster resource
manager for Linux-HA (Heartbeat) and/or Corosync.
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
Group: Development/Libraries
Requires: %{name}-cts = %{version}-%{release}
Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-cluster-libs = %{version}-%{release}
Requires: libtool-ltdl-devel
Requires: libtool-ltdl-devel libqb-devel libuuid-devel
Requires: libxml2-devel libxslt-devel bzip2-devel glib2-devel
%if %{with corosync}
Requires: corosynclib-devel
@ -267,6 +294,7 @@ License: GPLv2+ and LGPLv2+
Summary: Test framework for cluster-related technologies like Pacemaker
Group: System Environment/Daemons
Requires: python
Requires: %{name}-libs = %{version}-%{release}
%description cts
Test framework for cluster-related technologies like Pacemaker
@ -285,12 +313,11 @@ manager for Linux-HA (Heartbeat) and/or Corosync.
%prep
%setup -q -n %{upstream_prefix}-%{upstream_version}
%patch0 -p0
# Force the local time
#
# 'hg archive' sets the file date to the date of the last commit.
# 'git' sets the file date to the date of the last commit.
# This can result in files having been created in the future
# when building on machines in timezones 'behind' the one the
# commit occurred in - which seriously confuses 'make'
@ -326,6 +353,12 @@ 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 should be executable
chmod a+x %{buildroot}/%{_datadir}/pacemaker/tests/cts/CTSlab.py
@ -362,15 +395,16 @@ rm -rf %{buildroot}
/sbin/chkconfig --add pacemaker || :
%preun
/sbin/service pacemaker stop || :
if [ $1 -eq 0 ]; then
# Package removal, not upgrade
/sbin/service pacemaker stop &>/dev/null || :
/sbin/chkconfig --del pacemaker || :
# Package removal, not upgrade
/sbin/chkconfig --del pacemaker || :
fi
%pre -n %{name}-libs
getent group %{gname} >/dev/null || groupadd -r %{gname}
getent passwd %{uname} >/dev/null || useradd -r -g %{gname} -s /sbin/nologin -c "heartbeat user" %{uname}
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
@ -381,6 +415,19 @@ exit 0
%postun -n %{name}-cluster-libs -p /sbin/ldconfig
%post -n %{name}-remote
%if %{defined _unitdir}
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
%endif
/sbin/chkconfig --add pacemaker_remote || :
%preun -n %{name}-remote
if [ $1 -eq 0 ]; then
# Package removal, not upgrade
/sbin/service pacemaker_remote stop &>/dev/null || :
/sbin/chkconfig --del pacemaker_remote || :
fi
%files
###########################################################
%defattr(-,root,root)
@ -399,6 +446,8 @@ exit 0
%{_datadir}/pacemaker
%{_datadir}/snmp/mibs/PCMK-MIB.txt
%exclude %{_libexecdir}/pacemaker/lrmd_test
%exclude %{_sbindir}/pacemaker_remoted
%{_libexecdir}/pacemaker/*
%if %{with heartbeat}
@ -439,6 +488,7 @@ exit 0
%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
@ -452,6 +502,11 @@ exit 0
%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)
%{_sbindir}/cibadmin
@ -477,6 +532,7 @@ exit 0
%if %{with corosync}
%exclude %{_mandir}/man8/pacemakerd.*
%endif
%exclude %{_mandir}/man8/pacemaker_remoted.*
%exclude %{_mandir}/man8/stonith_admin.*
%doc COPYING
@ -493,6 +549,7 @@ exit 0
%{_libdir}/libpe_status.so.*
%{_libdir}/libpe_rules.so.*
%{_libdir}/libpengine.so.*
%{_libdir}/libstonithd.so.*
%{_libdir}/libtransitioner.so.*
%doc COPYING.LIB
%doc AUTHORS
@ -500,7 +557,20 @@ exit 0
%files -n %{name}-cluster-libs
%defattr(-,root,root)
%{_libdir}/libcrmcluster.so.*
%{_libdir}/libstonithd.so.*
%doc COPYING.LIB
%doc AUTHORS
%files -n %{name}-remote
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/sysconfig/pacemaker
%{_initrddir}/pacemaker_remote
%if %{defined _unitdir}
%{_unitdir}/pacemaker_remote.service
%endif
%{_sbindir}/pacemaker_remoted
%{_mandir}/man8/pacemaker_remoted.*
%doc COPYING.LIB
%doc AUTHORS
@ -512,6 +582,7 @@ exit 0
%defattr(-,root,root)
%{py_sitedir}/cts
%{_datadir}/pacemaker/tests/cts
%{_libexecdir}/pacemaker/lrmd_test
%doc COPYING.LIB
%doc AUTHORS