Switch package tarball to git

This commit is contained in:
Andrew Beekhof 2011-10-06 17:11:41 +11:00
parent a2b48868bd
commit 09f165899e
3 changed files with 136 additions and 94 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
/Pacemaker-1.1.4.tar.bz2 /Pacemaker-1.1.4.tar.bz2
/Pacemaker-1.1.5.tar.bz2 /Pacemaker-1.1.5.tar.bz2
/Pacemaker-1.1.6.tar.bz2 /Pacemaker-1.1.6.tar.bz2
/ClusterLabs-pacemaker-89678d4.tar.gz

View File

@ -2,16 +2,27 @@
%global uname hacluster %global uname hacluster
%global pcmk_docdir %{_docdir}/%{name} %global pcmk_docdir %{_docdir}/%{name}
%global specversion 2 %global specversion 1
%global upstream_version Pacemaker-1.1.6 %global upstream_version 89678d4
%global upstream_prefix Pacemaker-1-1 %global upstream_prefix ClusterLabs-pacemaker
# Compatibility macros for distros (fedora) that don't provide Python macros by default # Compatibility macros for distros (fedora) that don't provide Python macros by default
# Do this instead of trying to conditionally include {_rpmconfigdir}/macros.python # Do this instead of trying to conditionally include {_rpmconfigdir}/macros.python
%{!?py_ver: %{expand: %%global py_ver %%(echo `python -c "import sys; print sys.version[:3]"`)}} %{!?py_ver: %{expand: %%global py_ver %%(echo `python -c "import sys; print sys.version[:3]"`)}}
%{!?py_prefix: %{expand: %%global py_prefix %%(echo `python -c "import sys; print sys.prefix"`)}} %{!?py_prefix: %{expand: %%global py_prefix %%(echo `python -c "import sys; print sys.prefix"`)}}
%{!?py_libdir: %{expand: %%global py_libdir %%{expand:%%%%{py_prefix}/%%%%{_lib}/python%%%%{py_ver}}}} %{!?py_libdir: %{expand: %%global py_libdir %%{expand:%%%%{py_prefix}/%%%%{_lib}/python%%%%{py_ver}}}}
%{!?py_sitedir: %{expand: %%global py_sitedir %%{expand:%%%%{py_libdir}/site-packages}}} %{!?py_sitedir: %{expand: %%global py_sitedir %%{expand:%%%%{py_libdir}/site-packages}}}
# 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}}}}
%{!?bcond_with: %{expand: %%global bcond_with() %%{expand:%%%%{?_with_%%{1}:%%%%global with_%%{1} 1}}}}
%{!?with: %{expand: %%global with() %%{expand:%%%%{?with_%%{1}:1}%%%%{!?with_%%{1}:0}}}}
%{!?without: %{expand: %%global without() %%{expand:%%%%{?with_%%{1}:0}%%%%{!?with_%%{1}:1}}}}
# Conditionals
# Invoke "rpmbuild --without <feature>" or "rpmbuild --with <feature>"
# to disable or enable specific features
# Supported cluster stacks, must support at least one # Supported cluster stacks, must support at least one
%bcond_without cman %bcond_without cman
@ -44,74 +55,77 @@
%endif %endif
%if %{with pre_release} %if %{with pre_release}
%global pcmk_release 0.%{specversion}.%{upstream_version}.hg %global pcmk_release 0.%{specversion}.%{upstream_version}.git
%else %else
%global pcmk_release %{specversion} %global pcmk_release %{specversion}
%endif %endif
Name: pacemaker Name: pacemaker
Summary: Scalable High-Availability cluster resource manager Summary: Scalable High-Availability cluster resource manager
Version: 1.1.6 Version: 1.1.6
Release: %{pcmk_release}%{?dist} Release: %{pcmk_release}%{?dist}
License: GPLv2+ and LGPLv2+ License: GPLv2+ and LGPLv2+
Url: http://www.clusterlabs.org Url: http://www.clusterlabs.org
Group: System Environment/Daemons Group: System Environment/Daemons
Source0: http://hg.clusterlabs.org/pacemaker/1.1/archive/%{upstream_version}.tar.bz2
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) # export VER={upstream_version}
AutoReqProv: on # wget --no-check-certificate -O ClusterLabs-pacemaker-${VER}.tar.gz https://github.com/ClusterLabs/pacemaker/tarball/${VER}
Requires(pre): cluster-glue Source0: %{upstream_prefix}-%{upstream_version}.tar.gz
Requires: resource-agents BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
Requires: %{name}-libs = %{version}-%{release} AutoReqProv: on
Requires: %{name}-cluster-libs = %{version}-%{release} Requires(pre): cluster-glue
Requires: %{name}-cli = %{version}-%{release} Requires: resource-agents
Requires: python >= 2.4 Requires: %{name}-libs = %{version}-%{release}
Conflicts: heartbeat < 2.99 Requires: %{name}-cluster-libs = %{version}-%{release}
Requires: %{name}-cli = %{version}-%{release}
Requires: python >= 2.4
Conflicts: heartbeat < 2.99
%if %{with snmp} %if %{with snmp}
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%endif %endif
# Required for core functionality # Required for core functionality
BuildRequires: automake autoconf libtool pkgconfig python libtool-ltdl-devel BuildRequires: automake autoconf libtool pkgconfig python libtool-ltdl-devel
BuildRequires: glib2-devel cluster-glue-libs-devel libxml2-devel libxslt-devel BuildRequires: glib2-devel cluster-glue-libs-devel libxml2-devel libxslt-devel
BuildRequires: pkgconfig python-devel gcc-c++ bzip2-devel gnutls-devel pam-devel BuildRequires: pkgconfig python-devel gcc-c++ bzip2-devel gnutls-devel pam-devel
# Enables optional functionality # Enables optional functionality
BuildRequires: ncurses-devel openssl-devel libselinux-devel docbook-style-xsl resource-agents BuildRequires: ncurses-devel openssl-devel libselinux-devel docbook-style-xsl resource-agents
%ifarch alpha %{ix86} x86_64
BuildRequires: lm_sensors-devel
%endif
%if %{with cman} %if %{with cman}
BuildRequires: clusterlib-devel BuildRequires: clusterlib-devel
%endif %endif
%if %{with esmtp} %if %{with esmtp}
BuildRequires: libesmtp-devel BuildRequires: libesmtp-devel
%endif %endif
%if %{with snmp} %if %{with snmp}
BuildRequires: net-snmp-devel %ifarch alpha %{ix86} x86_64
BuildRequires: lm_sensors-devel
%endif
BuildRequires: net-snmp-devel
%endif %endif
%if %{with corosync} %if %{with corosync}
# Do not require corosync, the admin should select which stack to use and install it # Do not require corosync, the admin should select which stack to use and install it
BuildRequires: corosynclib-devel BuildRequires: corosynclib-devel
%endif %endif
%if %{with heartbeat} %if %{with heartbeat}
# Do not require heartbeat, the admin should select which stack to use and install it # Do not require heartbeat, the admin should select which stack to use and install it
BuildRequires: heartbeat-devel heartbeat-libs >= 3.0.0 BuildRequires: heartbeat-devel heartbeat-libs >= 3.0.0
%endif %endif
%if %{with doc} %if %{with doc}
BuildRequires: asciidoc help2man BuildRequires: asciidoc help2man
%if %{with publican} %if %{with publican}
%ifarch %{ix86} x86_64 %ifarch %{ix86} x86_64
BuildRequires: publican inkscape BuildRequires: publican inkscape
%endif %endif
%endif %endif
%endif %endif
@ -131,10 +145,10 @@ Available rpmbuild rebuild options:
--with(out) : heartbeat cman corosync doc publican snmp esmtp pre_release --with(out) : heartbeat cman corosync doc publican snmp esmtp pre_release
%package cli %package cli
License: GPLv2+ and LGPLv2+ License: GPLv2+ and LGPLv2+
Summary: Command line tools for controlling Pacemaker clusters Summary: Command line tools for controlling Pacemaker clusters
Group: System Environment/Daemons Group: System Environment/Daemons
Requires: %{name}-libs = %{version}-%{release} Requires: %{name}-libs = %{version}-%{release}
%description cli %description cli
Pacemaker is an advanced, scalable High-Availability cluster resource Pacemaker is an advanced, scalable High-Availability cluster resource
@ -145,9 +159,9 @@ to query and control the cluster from machines that may, or may not,
be part of the cluster. be part of the cluster.
%package -n %{name}-libs %package -n %{name}-libs
License: GPLv2+ and LGPLv2+ License: GPLv2+ and LGPLv2+
Summary: Core Pacemaker libraries Summary: Core Pacemaker libraries
Group: System Environment/Daemons Group: System Environment/Daemons
%description -n %{name}-libs %description -n %{name}-libs
Pacemaker is an advanced, scalable High-Availability cluster resource Pacemaker is an advanced, scalable High-Availability cluster resource
@ -157,10 +171,10 @@ The %{name}-libs package contains shared libraries needed for cluster
nodes and those just running the CLI tools. nodes and those just running the CLI tools.
%package -n %{name}-cluster-libs %package -n %{name}-cluster-libs
License: GPLv2+ and LGPLv2+ License: GPLv2+ and LGPLv2+
Summary: Cluster Libraries used by Pacemaker Summary: Cluster Libraries used by Pacemaker
Group: System Environment/Daemons Group: System Environment/Daemons
Requires: %{name}-libs = %{version}-%{release} Requires: %{name}-libs = %{version}-%{release}
%description -n %{name}-cluster-libs %description -n %{name}-cluster-libs
Pacemaker is an advanced, scalable High-Availability cluster resource Pacemaker is an advanced, scalable High-Availability cluster resource
@ -170,17 +184,18 @@ The %{name}-cluster-libs package contains cluster-aware shared
libraries needed for nodes that will form part of the cluster nodes. libraries needed for nodes that will form part of the cluster nodes.
%package -n %{name}-libs-devel %package -n %{name}-libs-devel
License: GPLv2+ and LGPLv2+ License: GPLv2+ and LGPLv2+
Summary: Pacemaker development package Summary: Pacemaker development package
Group: Development/Libraries Group: Development/Libraries
Requires: %{name}-libs = %{version}-%{release} Requires: %{name}-libs = %{version}-%{release}
Requires: cluster-glue-libs-devel libtool-ltdl-devel Requires: %{name}-cluster-libs = %{version}-%{release}
Requires: libxml2-devel libxslt-devel bzip2-devel glib2-devel Requires: cluster-glue-libs-devel libtool-ltdl-devel
Requires: libxml2-devel libxslt-devel bzip2-devel glib2-devel
%if %{with corosync} %if %{with corosync}
Requires: corosynclib-devel Requires: corosynclib-devel
%endif %endif
%if %{with heartbeat} %if %{with heartbeat}
Requires: heartbeat-devel Requires: heartbeat-devel
%endif %endif
%description -n %{name}-libs-devel %description -n %{name}-libs-devel
@ -191,21 +206,21 @@ The %{name}-libs-devel package contains headers and shared libraries
for developing tools for Pacemaker. for developing tools for Pacemaker.
%package cts %package cts
License: GPLv2+ and LGPLv2+ License: GPLv2+ and LGPLv2+
Summary: Test framework for cluster-related technologies like Pacemaker Summary: Test framework for cluster-related technologies like Pacemaker
Group: System Environment/Daemons Group: System Environment/Daemons
Requires: python Requires: python
%description cts %description cts
Test framework for cluster-related technologies like Pacemaker Test framework for cluster-related technologies like Pacemaker
%package doc %package doc
License: GPLv2+ and LGPLv2+ License: GPLv2+ and LGPLv2+
Summary: Documentation for Pacemaker Summary: Documentation for Pacemaker
Group: Documentation Group: Documentation
%description doc %description doc
Documentation for Pacemaker. Documentation for Pacemaker.
Pacemaker is an advanced, scalable High-Availability cluster resource Pacemaker is an advanced, scalable High-Availability cluster resource
@ -219,7 +234,7 @@ manager for Linux-HA (Heartbeat) and/or Corosync.
# #
# 'hg archive' sets the file date to the date of the last commit. # 'hg archive' sets the file date to the date of the last commit.
# This can result in files having been created in the future # This can result in files having been created in the future
# when building on machines in timezones 'behind' the one the # when building on machines in timezones 'behind' the one the
# commit occurred in - which seriously confuses 'make' # commit occurred in - which seriously confuses 'make'
find . -exec touch \{\} \; find . -exec touch \{\} \;
@ -230,25 +245,26 @@ find . -exec touch \{\} \;
eval `objdump --headers --private-headers /usr/bin/perl | grep RPATH | awk '{print "export LD_LIBRARY_PATH="$2}'` eval `objdump --headers --private-headers /usr/bin/perl | grep RPATH | awk '{print "export LD_LIBRARY_PATH="$2}'`
%endif %endif
%{configure} \ # RHEL <= 5 does not support --docdir
%{!?with_heartbeat: --without-heartbeat} \ docdir=%{pcmk_docdir} %{configure} \
%{!?with_corosync: --without-ais} \ %{!?with_heartbeat: --without-heartbeat} \
%{!?with_esmtp: --without-esmtp} \ %{!?with_corosync: --without-ais} \
%{!?with_snmp: --without-snmp} \ %{!?with_esmtp: --without-esmtp} \
%{?with_cman: --with-cman} \ %{!?with_snmp: --without-snmp} \
%{?with_profiling: --with-profiling} \ %{?with_cman: --with-cman} \
%{?with_gcov: --with-gcov} \ %{?with_profiling: --with-profiling} \
%{?with_tracedata: --with-tracedata} \ %{?with_gcov: --with-gcov} \
--with-initdir=%{_initrddir} \ %{?with_tracedata: --with-tracedata} \
--localstatedir=%{_var} \ --with-initdir=%{_initrddir} \
--with-version=%{version}-%{release} \ --localstatedir=%{_var} \
--enable-fatal-warnings=no --with-version=%{version}-%{release} \
--enable-fatal-warnings=no
make %{_smp_mflags} make %{_smp_mflags} docdir=%{pcmk_docdir}
%install %install
rm -rf %{buildroot} rm -rf %{buildroot}
make DESTDIR=%{buildroot} install make DESTDIR=%{buildroot} docdir=%{pcmk_docdir} install
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig
install -m 644 mcp/pacemaker.sysconfig ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/pacemaker install -m 644 mcp/pacemaker.sysconfig ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/pacemaker
@ -278,9 +294,9 @@ rm -f %{buildroot}/%{_libdir}/service_crm.so
GCOV_BASE=%{buildroot}/%{_var}/lib/pacemaker/gcov GCOV_BASE=%{buildroot}/%{_var}/lib/pacemaker/gcov
mkdir -p $GCOV_BASE mkdir -p $GCOV_BASE
find . -name '*.gcno' -type f | while read F ; do find . -name '*.gcno' -type f | while read F ; do
D=`dirname $F` D=`dirname $F`
mkdir -p ${GCOV_BASE}/$D mkdir -p ${GCOV_BASE}/$D
cp $F ${GCOV_BASE}/$D cp $F ${GCOV_BASE}/$D
done done
%endif %endif
@ -292,8 +308,8 @@ rm -rf %{buildroot}
%preun %preun
if [ $1 -eq 0 ]; then if [ $1 -eq 0 ]; then
/sbin/service pacemaker stop &>/dev/null || : /sbin/service pacemaker stop &>/dev/null || :
/sbin/chkconfig --del pacemaker || : /sbin/chkconfig --del pacemaker || :
fi fi
%post -n %{name}-libs -p /sbin/ldconfig %post -n %{name}-libs -p /sbin/ldconfig
@ -327,6 +343,10 @@ fi
%{_sbindir}/crm_node %{_sbindir}/crm_node
%{_sbindir}/attrd_updater %{_sbindir}/attrd_updater
%{_sbindir}/fence_legacy %{_sbindir}/fence_legacy
%{_sbindir}/fence_pcmk
%{_bindir}/ccs2cib
%{_bindir}/ccs_flatten
%{_bindir}/disable_rgmanager
%{_sbindir}/stonith_admin %{_sbindir}/stonith_admin
%if %{with heartbeat} %if %{with heartbeat}
@ -335,6 +355,17 @@ fi
%exclude %{_sbindir}/crm_uuid %exclude %{_sbindir}/crm_uuid
%endif %endif
%if %{with doc}
%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.*
%endif
%doc COPYING %doc COPYING
%doc AUTHORS %doc AUTHORS
%doc ChangeLog %doc ChangeLog
@ -369,8 +400,14 @@ fi
%{_sbindir}/crm_ticket %{_sbindir}/crm_ticket
%{py_sitedir}/crm %{py_sitedir}/crm
%if %{with doc} %if %{with doc}
%doc %{_mandir}/man7/*
%doc %{_mandir}/man8/* %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/stonith_admin.*
%endif %endif
%doc COPYING %doc COPYING
@ -420,6 +457,10 @@ fi
%doc AUTHORS %doc AUTHORS
%changelog %changelog
* Mon Sep 26 2011 Andrew Beekhof <andrew@beekhof.net> 1.1.6-3
- New upstream tarball: 89678d4
- Move man pages to the correct subpackages
* Mon Sep 26 2011 Andrew Beekhof <andrew@beekhof.net> 1.1.6-2 * Mon Sep 26 2011 Andrew Beekhof <andrew@beekhof.net> 1.1.6-2
- Do not build in support for heartbeat, snmp, esmtp by default - Do not build in support for heartbeat, snmp, esmtp by default
- Create a package for cluster unaware libraries to minimze our - Create a package for cluster unaware libraries to minimze our

View File

@ -1 +1 @@
70a3605231977c3df0f25439d0d5551e Pacemaker-1.1.6.tar.bz2 f3f5a66cc7c8f4a3104f66942c14b618 ClusterLabs-pacemaker-89678d4.tar.gz