From 059497d36535a186343f4aad1cf0b0401ba2b75a43e474de480073d0699887ba Mon Sep 17 00:00:00 2001 From: Yan Gao Date: Mon, 29 Jul 2013 13:11:47 +0000 Subject: [PATCH] Accepting request 184818 from home:yan_gao:branches:network:ha-clustering:Factory - Update to version 1.1.10 - crm_resource: Allow options to be set recursively - cib: Correctly read back archived configurations if the primary is corrupted - mainloop: Hand the channel off to g_io_watch and forget it. - mainloop: Force removal of ipc fd in dispatch_del callback - crmd: Clean up handling of pending operations at shutdown and improve logging - Bug cl#5161 - crmd: Prevent memory leak in operation cache - cib: Ensure we set up hacluster's groups in stand-alone mode - Upstream version cs: 368c72641139785ec5981813f311fae8cd1410f3 (1.1.10) - ping: Ensure OCF_RESKEY_failure_score has a value (bnc#831327) OBS-URL: https://build.opensuse.org/request/show/184818 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/pacemaker?expand=0&rev=48 --- pacemaker-build-1.1.10-rc.patch | 13 - pacemaker-daemon-symlinks.patch | 19 - pacemaker-lrmd-remote-disabled.patch | 15 - pacemaker.changes | 15 +- pacemaker.spec | 823 +++++++++++++++++++-------- pacemaker.tar.bz2 | 4 +- 6 files changed, 586 insertions(+), 303 deletions(-) delete mode 100644 pacemaker-build-1.1.10-rc.patch delete mode 100644 pacemaker-daemon-symlinks.patch delete mode 100644 pacemaker-lrmd-remote-disabled.patch diff --git a/pacemaker-build-1.1.10-rc.patch b/pacemaker-build-1.1.10-rc.patch deleted file mode 100644 index f9aaf1b..0000000 --- a/pacemaker-build-1.1.10-rc.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/configure.ac b/configure.ac -index 483f94d..0a3b9b5 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -19,7 +19,7 @@ dnl checks for compiler characteristics - dnl checks for library functions - dnl checks for system services - --AC_INIT(pacemaker, 1.1.9, pacemaker@oss.clusterlabs.org,,http://www.clusterlabs.org) -+AC_INIT(pacemaker, 1.1.10, pacemaker@oss.clusterlabs.org,,http://www.clusterlabs.org) - CRM_DTD_VERSION="1.2" - - PCMK_FEATURES="" diff --git a/pacemaker-daemon-symlinks.patch b/pacemaker-daemon-symlinks.patch deleted file mode 100644 index 64bbdb0..0000000 --- a/pacemaker-daemon-symlinks.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/Makefile.am b/Makefile.am -index d35ba4e..f159d9f 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -49,14 +49,12 @@ if BUILD_CS_PLUGIN - rm -f $(DESTDIR)$(LCRSODIR)/pacemaker.lcrso $(DESTDIR)$(LCRSODIR)/service_crm.so - cp $(DESTDIR)$(libdir)/service_crm.so $(DESTDIR)$(LCRSODIR)/pacemaker.lcrso - endif --if BUILD_HEARTBEAT_SUPPORT - $(INSTALL) -d $(DESTDIR)/$(HB_DAEMON_DIR) - ln -sf $(CRM_DAEMON_DIR)/attrd $(DESTDIR)$(HB_DAEMON_DIR)/ - ln -sf $(CRM_DAEMON_DIR)/cib $(DESTDIR)$(HB_DAEMON_DIR)/ - ln -sf $(CRM_DAEMON_DIR)/crmd $(DESTDIR)$(HB_DAEMON_DIR)/ - ln -sf $(CRM_DAEMON_DIR)/pengine $(DESTDIR)$(HB_DAEMON_DIR)/ - ln -sf $(CRM_DAEMON_DIR)/stonithd $(DESTDIR)$(HB_DAEMON_DIR)/ --endif - # Use chown because the user/group may not exist - - clean-generic: diff --git a/pacemaker-lrmd-remote-disabled.patch b/pacemaker-lrmd-remote-disabled.patch deleted file mode 100644 index e4d7465..0000000 --- a/pacemaker-lrmd-remote-disabled.patch +++ /dev/null @@ -1,15 +0,0 @@ -Index: pacemaker/lrmd/Makefile.am -=================================================================== ---- pacemaker.orig/lrmd/Makefile.am -+++ pacemaker/lrmd/Makefile.am -@@ -24,8 +24,8 @@ lrmdlibdir = $(CRM_DAEMON_DIR) - lrmdlib_PROGRAMS = lrmd lrmd_test - - initdir = $(INITDIR) --init_SCRIPTS = pacemaker_remote --sbin_PROGRAMS = pacemaker_remoted -+#init_SCRIPTS = pacemaker_remote -+#sbin_PROGRAMS = pacemaker_remoted - - if BUILD_SYSTEMD - systemdunit_DATA = pacemaker_remote.service diff --git a/pacemaker.changes b/pacemaker.changes index 8dad9e7..fe2c54a 100644 --- a/pacemaker.changes +++ b/pacemaker.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Fri Jul 26 02:49:48 UTC 2013 - ygao@suse.com + +- Update to version 1.1.10 +- crm_resource: Allow options to be set recursively +- cib: Correctly read back archived configurations if the primary is corrupted +- mainloop: Hand the channel off to g_io_watch and forget it. +- mainloop: Force removal of ipc fd in dispatch_del callback +- crmd: Clean up handling of pending operations at shutdown and improve logging +- Bug cl#5161 - crmd: Prevent memory leak in operation cache +- cib: Ensure we set up hacluster's groups in stand-alone mode +- Upstream version cs: 368c72641139785ec5981813f311fae8cd1410f3 (1.1.10) + ------------------------------------------------------------------- Mon Jul 22 05:28:01 UTC 2013 - ygao@suse.com @@ -145,7 +158,7 @@ Tue May 28 08:50:43 UTC 2013 - ygao@suse.com - PE: Mark unrunnable stop actions as "blocked" (bnc#816511) - crm_resource: Do not crash when calling --force-start on an invalid resource -- ping: Ensure OCF_RESKEY_failure_score has a value +- ping: Ensure OCF_RESKEY_failure_score has a value (bnc#831327) - PE: Unlink pengine output files before writing. - Fencing: Restore the ability to manually confirm that fencing completed - Fix: Resolve several memory leaks and improper dereferencing of pointers diff --git a/pacemaker.spec b/pacemaker.spec index 7199ddc..88b9cd2 100644 --- a/pacemaker.spec +++ b/pacemaker.spec @@ -16,167 +16,328 @@ # +%global gname haclient +%global uname hacluster %global pcmk_docdir %{_docdir}/%{name} -%if 0%{?suse_version} -%define _libexecdir %{_libdir} -%endif -%define with_extra_warnings 0 -%define with_debugging 1 -%define with_ais_support 1 -%define with_heartbeat_support 0 -%define with_regression_tests 0 -%define with_gcov 0 -%define gname haclient -%define uname hacluster -%define doc_pkg heartbeat-doc-1.0 -%if 0%{?fedora_version} -%define pkg_group System Environment/Daemons -%else -%define pkg_group Productivity/Clustering/HA + +%global specversion 1 +%global upstream_version HEAD +%global upstream_prefix ClusterLabs-pacemaker + +# 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 rawhide %(test ! -e /etc/yum.repos.d/fedora-rawhide.repo; echo $?) +%global cs_version %(pkg-config corosync --modversion | awk -F . '{print $1}') +%global py_site %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") + +# Conditionals +# Invoke "rpmbuild --without " or "rpmbuild --with " +# to disable or enable specific features + +# Legacy stonithd fencing agents +%bcond_with stonithd + +# Build with/without support for profiling tools +%bcond_with profiling + +# Include Build with/without support for performing coverage analysis +%bcond_with coverage + +# We generate docs using Publican, Asciidoc and Inkscape, but they're not available everywhere +%bcond_without doc +%define with_doc 0 + +# Use a different versioning scheme +%bcond_with pre_release + +# Ship an Upstart job file +%bcond_with upstart_job + +# Turn off cman support on platforms that normally ship with it +%bcond_without cman + +%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 +%if %{with pre_release} +%global pcmk_release 0.%{specversion}.%{upstream_version}.git +%else +%global pcmk_release %{specversion} +%endif + +#%if 0%{?suse_version} +#%define _libexecdir %{_libdir} +#%endif + +%define with_corosync_support 1 +%define with_heartbeat_support 0 + +%define with_nagios 1 +%define with_snmp 1 +%define with_esmtp 1 +%define with_acl 1 +%define with_cibsecrets 1 + +%define enable_fatal_warnings 1 + +%define with_regression_tests 0 + Name: pacemaker -Summary: The Pacemaker scalable High-Availability cluster resource manager +Summary: Scalable High-Availability cluster resource manager License: GPL-2.0+ and LGPL-2.1+ Group: Productivity/Clustering/HA -Version: 1.1.9 +Version: 1.1.10 Release: 0 +#Release: %{pcmk_release}%{?dist} Url: http://www.clusterlabs.org -Source: pacemaker.tar.bz2 -Source2: %{doc_pkg}.tar.gz + +# export VER={upstream_version} +# wget --no-check-certificate -O ClusterLabs-pacemaker-${VER}.tar.gz https://github.com/ClusterLabs/pacemaker/tarball/${VER} +Source0: %{name}.tar.bz2 Source100: pacemaker.rpmlintrc -Patch1: pacemaker-cts-startcmd.patch -Patch2: pacemaker-disable-listing-fence-agents.patch -Patch3: pacemaker-daemon-symlinks.patch -Patch4: bug-806256_pacemaker-log-level-notice.patch -Patch5: pacemaker-ptest-build.patch -Patch6: bug-728579_pacemaker-stonith-dev-id.patch -Patch7: bug-792124_pacemaker-stonith-monitor-log.patch -Patch8: pacemaker-NodeUtilization-RA.patch -Patch9: pacemaker-colocated-utilization.patch -Patch10: pacemaker-lrmd-remote-disabled.patch -Patch11: pacemaker-cibsecret-tool-temp-disabled.patch -Patch12: pacemaker-nagios-plugin-dir.patch -Patch13: bug-812269_pacemaker-fencing-update-cib.patch -Patch14: bug-800323_pacemaker-crm_mon-save-cib.patch -Patch15: bug-812269_pacemaker-fencing-device-register-messages.patch -Patch16: bug-815447_pacemaker-cib-strip-text-nodes.patch -Patch17: bug-809635_pacemaker-xml-digest.patch -Patch18: pacemaker-configure-libqb-version.patch -Patch19: pacemaker-build-1.1.10-rc.patch +Patch1: bug-806256_pacemaker-log-level-notice.patch +Patch2: bug-728579_pacemaker-stonith-dev-id.patch +Patch3: bug-792124_pacemaker-stonith-monitor-log.patch +Patch4: pacemaker-NodeUtilization-RA.patch +Patch5: pacemaker-colocated-utilization.patch +Patch6: pacemaker-cibsecret-tool-temp-disabled.patch +Patch7: pacemaker-nagios-plugin-dir.patch +Patch8: bug-812269_pacemaker-fencing-update-cib.patch +Patch9: bug-800323_pacemaker-crm_mon-save-cib.patch +Patch10: bug-812269_pacemaker-fencing-device-register-messages.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build Provides: pacemaker-ticket-support = 2.0 Conflicts: heartbeat < 3.0 -# We need libglue2, not libheartbeat2 Conflicts: libheartbeat2 < 3.0.0 -PreReq: cluster-glue >= 1.0.6 +Requires: %{name}-cli = %{version}-%{release} Requires: libpacemaker3 = %{version}-%{release} -Requires: libqb -Requires: openais +Requires: libpacemaker3-cluster = %{version}-%{release} Requires: python -Requires: python-curses -Requires: python-xml Requires: resource-agents Recommends: crmsh -BuildRequires: asciidoc -BuildRequires: e2fsprogs-devel +Recommends: libdlm +Suggests: graphviz + +%if %{defined systemd_requires} +%systemd_requires +%endif + +%if 0%{?rhel} > 0 +ExclusiveArch: i686 x86_64 +%endif + +# Required for core functionality +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: gcc-c++ BuildRequires: glib2-devel + +%if 0%{?suse_version} +BuildRequires: libbz2-devel +%else +BuildRequires: bzip2-devel +%endif + +BuildRequires: libtool +BuildRequires: libtool-ltdl-devel +BuildRequires: libuuid-devel +BuildRequires: libxml2-devel +BuildRequires: libxslt-devel +BuildRequires: pam-devel +BuildRequires: pkgconfig +BuildRequires: python +BuildRequires: python-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: bison +BuildRequires: byacc + +%if 0%{?suse_version} > 1100 +BuildRequires: docbook-xsl-stylesheets +%else +BuildRequires: docbook-style-xsl +%endif + +BuildRequires: flex + %if 0%{?suse_version} > 1210 BuildRequires: libgnutls-devel %else BuildRequires: gnutls-devel %endif + BuildRequires: help2man -BuildRequires: libesmtp-devel -BuildRequires: libglue-devel -BuildRequires: libqb-devel -BuildRequires: libtool -BuildRequires: libxml2-devel -BuildRequires: libxslt-devel +BuildRequires: libselinux-devel BuildRequires: ncurses-devel -BuildRequires: net-snmp-devel -BuildRequires: pam-devel -BuildRequires: pkgconfig -BuildRequires: python-devel -BuildRequires: swig -%if %with_regression_tests -BuildRequires: openais -BuildRequires: procps -BuildRequires: python -BuildRequires: python-curses -BuildRequires: python-xml -BuildRequires: vim-base +BuildRequires: openssl-devel + +%if %{defined _unitdir} +BuildRequires: systemd-devel %endif -%if %with_ais_support -BuildRequires: libcorosync-devel +BuildRequires: systemd-devel + +%if %{with cman} + +%if 0%{?fedora} > 0 +%if 0%{?fedora} < 17 +BuildRequires: clusterlib-devel +%endif +%endif + +%if 0%{?rhel} > 0 +%if 0%{?rhel} < 7 +BuildRequires: clusterlib-devel +%endif +%endif + +%endif + +%if %with_corosync_support Requires: corosync +#BuildRequires: corosynclib-devel +BuildRequires: libcorosync-devel %endif + %if %with_heartbeat_support BuildRequires: heartbeat-devel Requires: heartbeat %endif -%if 0%{?suse_version} -BuildRequires: libbz2-devel -Suggests: graphviz -Recommends: libdlm resource-agents -%if 0%{?suse_version} > 1100 -BuildRequires: docbook-xsl-stylesheets + +%if %{with stonithd} +#BuildRequires: cluster-glue-libs-devel +BuildRequires: libglue-devel +%endif + +%if !0%{?rawhide} +# More often than not, inkscape is busted on rawhide, don't even bother + +#%if %{with doc} +%if %{with_doc} +%ifarch %{ix86} x86_64 +BuildRequires: asciidoc +BuildRequires: inkscape +BuildRequires: publican %endif %endif -%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} -BuildRequires: which + +%if %with_snmp +BuildRequires: net-snmp-devel %endif -%if 0%{?mandriva_version} -BuildRequires: libbzip2-devel + +%if %with_esmtp +BuildRequires: libesmtp-devel +%endif + +%if %with_regression_tests +BuildRequires: procps +BuildRequires: python-curses +BuildRequires: python-xml +BuildRequires: vim-base +%endif + %endif %description Pacemaker is an advanced, scalable High-Availability cluster resource -manager for Linux-HA (Heartbeat) and/or OpenAIS. +manager for Corosync, CMAN and/or Linux-HA. -It supports "n-node" clusters with significant capabilities for -managing resources and dependencies. +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) : cman stonithd doc coverage profiling pre_release upstart_job +%package cli +Summary: Command line tools for controlling Pacemaker clusters +Group: Productivity/Clustering/HA +Requires: libpacemaker3 = %{version}-%{release} +Requires: perl-TimeDate -Authors: --------- - Andrew Beekhof +%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 libpacemaker3 -Summary: The Pacemaker scalable High-Availability cluster resource manager -License: GPL-2.0+ and LGPL-2.1+ +Summary: Core Pacemaker libraries Group: Productivity/Clustering/HA %description -n libpacemaker3 Pacemaker is an advanced, scalable High-Availability cluster resource -manager for Linux-HA (Heartbeat) and/or OpenAIS. +manager for Corosync, CMAN and/or Linux-HA. -It supports "n-node" clusters with significant capabilities for -managing resources and dependencies. +The libpacemaker3 package contains shared libraries needed for cluster +nodes and those just running the CLI tools. -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. - - - -Authors: --------- - Andrew Beekhof - -%package -n libpacemaker-devel -Summary: The Pacemaker scalable High-Availability cluster resource manager -License: GPL-2.0 and GPL-2.0+ and LGPL-2.1+ -Group: Development/Libraries/C and C++ -Requires: %{name} = %{version}-%{release} -Requires: libglue-devel +%package -n libpacemaker3-cluster +Summary: Cluster Libraries used by Pacemaker +Group: Productivity/Clustering/HA Requires: libpacemaker3 = %{version}-%{release} + +%description -n libpacemaker3-cluster +Pacemaker is an advanced, scalable High-Availability cluster resource +manager for Corosync, CMAN and/or Linux-HA. + +The libpacemaker3-cluster package contains cluster-aware shared +libraries needed for nodes that will form part of the cluster nodes. + +%package remote +Summary: Pacemaker remote daemon for non-cluster nodes +Group: Productivity/Clustering/HA +Requires: %{name}-cli = %{version}-%{release} +Requires: libpacemaker3 = %{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 libpacemaker-devel +Summary: Pacemaker development package +Group: Development/Libraries/C and C++ +Requires: %{name}-cts = %{version}-%{release} +Requires: glib2-devel + +%if 0%{?suse_version} +Requires: libbz2-devel +%else +Requires: bzip2-devel +%endif + +Requires: libcorosync-devel +Requires: libpacemaker3 = %{version}-%{release} +Requires: libpacemaker3-cluster = %{version}-%{release} Requires: libqb-devel +Requires: libtool-ltdl-devel +Requires: libuuid-devel +Requires: libxml2-devel +Requires: libxslt-devel %if %with_regression_tests # For the regression tests, we can run them only if all pacemaker # packages are installed, so we pull that in here for the regression @@ -186,24 +347,35 @@ Requires: pacemaker %description -n libpacemaker-devel Pacemaker is an advanced, scalable High-Availability cluster resource -manager for Linux-HA (Heartbeat) and/or OpenAIS. +manager for Corosync, CMAN and/or Linux-HA. -It supports "n-node" clusters with significant capabilities for -managing resources and dependencies. +The libpacemaker-devel package contains headers and shared libraries +for developing tools for Pacemaker. -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. +%package cts +Summary: Test framework for cluster-related technologies like Pacemaker +Group: Productivity/Clustering/HA +Requires: libpacemaker3 = %{version}-%{release} +Requires: python +%description cts +Test framework for cluster-related technologies like Pacemaker +%if %{with_doc} +%package doc +Summary: Documentation for Pacemaker +Group: Productivity/Clustering/HA -Authors: --------- - Andrew Beekhof +%description doc +Documentation for Pacemaker. + +Pacemaker is an advanced, scalable High-Availability cluster resource +manager for Corosync, CMAN and/or Linux-HA. +%endif %prep -########################################################### -%setup -a 2 -n pacemaker -q +#%setup -q -n %{name}%{upstream_prefix}-%{upstream_version} +%setup -q -n %{name} %patch1 -p1 %patch2 -p1 %patch3 -p1 @@ -214,100 +386,184 @@ Authors: %patch8 -p1 %patch9 -p1 %patch10 -p1 -%patch11 -p1 -%patch12 -p1 -%patch13 -p1 -%patch14 -p1 -%patch15 -p1 -%patch16 -p1 -%patch17 -p1 -%patch18 -p1 -%patch19 -p1 -########################################################### + +# Force the local time +# +# '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' +find . -exec touch \{\} \; %build -export SUSE_ASNEEDED=0 - -CFLAGS="${CFLAGS} ${RPM_OPT_FLAGS}" -export CFLAGS ./autogen.sh -%configure --localstatedir=%{_var} \ - --docdir=%{pcmk_docdir} \ -%if %with_gcov - --with-gcov=1 \ + +# RHEL <= 5 does not support --docdir +docdir=%{pcmk_docdir} %{configure} \ + %{?with_profiling: --with-profiling} \ + %{?with_coverage: --with-coverage} \ + %{!?with_cman: --without-cman} \ +%if !%with_heartbeat_support + --without-heartbeat \ %endif - --with-acl=true \ - --with-cibsecrets=true \ - --enable-fatal-warnings=no -make %{_smp_mflags} +%if %with_nagios + --with-nagios=true \ +%endif +%if %with_snmp + --with-snmp=true \ +%endif +%if %with_esmtp + --with-esmtp=true \ +%endif +%if %with_acl + --with-acl=true \ +%endif +%if %with_cibsecrets + --with-cibsecrets=true \ +%endif +%if !%enable_fatal_warnings + --enable-fatal-warnings=no \ +%endif + --with-initdir=%{_initrddir} \ + --localstatedir=%{_var} \ + --with-version=%{version}-%{release} -if [ -e /usr/share/xml/docbook/stylesheet/nwalsh/current ]; then - make -C %{doc_pkg} man -fi +%if 0%{?suse_version} >= 1200 +# Fedora handles rpath removal automagically +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool +%endif -########################################################### +make %{_smp_mflags} V=1 docdir=%{pcmk_docdir} all %install -export SUSE_ASNEEDED=0 -########################################################### -if [ -e %{doc_pkg}/cibadmin.8 ]; then - install -d $RPM_BUILD_ROOT/%{_mandir}/man8 - for file in `ls -1 %{doc_pkg}/*.8`; do - install -p -m 644 $file $RPM_BUILD_ROOT/%{_mandir}/man8 - done -fi +rm -rf %{buildroot} +make DESTDIR=%{buildroot} docdir=%{pcmk_docdir} V=1 install -make DESTDIR=$RPM_BUILD_ROOT install +#mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig +install -d -m755 $RPM_BUILD_ROOT/var/adm/fillup-templates +mkdir -p ${RPM_BUILD_ROOT}%{_var}/lib/pacemaker/cores +#install -m 644 mcp/pacemaker.sysconfig ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/pacemaker +install -m 644 mcp/pacemaker.sysconfig $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.pacemaker -#chmod a+x $RPM_BUILD_ROOT/%{_libdir}/pacemaker/crm_primitive.py -#chmod a+x $RPM_BUILD_ROOT/%{_libdir}/pacemaker/hb2openais-helper.py -rm $RPM_BUILD_ROOT/%{_libdir}/service_crm.so +%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 -# Don't want to ship this just yet: -rm $RPM_BUILD_ROOT/etc/init.d/pacemaker || true -rm $RPM_BUILD_ROOT/usr/sbin/pacemaker{d,} || true -rm $RPM_BUILD_ROOT/usr/bin/ccs2cib || true -rm $RPM_BUILD_ROOT/usr/bin/ccs_flatten || true -rm $RPM_BUILD_ROOT/usr/bin/disable_rgmanager || true -rm $RPM_BUILD_ROOT/usr/sbin/fence_pcmk || true +# Scripts that should be executable +chmod a+x %{buildroot}/%{_datadir}/pacemaker/tests/cts/CTSlab.py -%if %with_gcov -GCOV_BASE=$RPM_BUILD_ROOT/%{_var}/lib/pacemaker/gcov +# These are not actually scripts +find %{buildroot} -name '*.xml' -type f -print0 | xargs -0 chmod a-x +find %{buildroot} -name '*.xsl' -type f -print0 | xargs -0 chmod a-x +find %{buildroot} -name '*.rng' -type f -print0 | xargs -0 chmod a-x +find %{buildroot} -name '*.dtd' -type f -print0 | xargs -0 chmod a-x + +# Dont package static libs +find %{buildroot} -name '*.a' -type f -print0 | xargs -0 rm -f +find %{buildroot} -name '*.la' -type f -print0 | xargs -0 rm -f + +# Do not package these either +rm -f %{buildroot}/%{_libdir}/service_crm.so + +# Don't ship init scripts for systemd based platforms +%if %{defined _unitdir} +rm -f %{buildroot}/%{_initrddir}/pacemaker +rm -f %{buildroot}/%{_initrddir}/pacemaker_remote +%endif + +# Only useful on rhel6 +rm -f %{buildroot}/%{_bindir}/ccs2cib +rm -f %{buildroot}/%{_bindir}/ccs_flatten +rm -f %{buildroot}/%{_bindir}/disable_rgmanager + +%if %{with coverage} +GCOV_BASE=%{buildroot}/%{_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 + D=`dirname $F` + mkdir -p ${GCOV_BASE}/$D + cp $F ${GCOV_BASE}/$D done %endif -#%if %with_ais_support -# mkdir -p $RPM_BUILD_ROOT/%{_libexecdir}/lcrso -# cp $RPM_BUILD_ROOT/%{_libdir}/service_crm.so $RPM_BUILD_ROOT/%{_libexecdir}/lcrso/pacemaker.lcrso -#%endif -# Cleanup -[ -d $RPM_BUILD_ROOT/usr/man ] && rm -rf $RPM_BUILD_ROOT/usr/man -[ -d $RPM_BUILD_ROOT/usr/share/libtool ] && rm -rf $RPM_BUILD_ROOT/usr/share/libtool -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 -find $RPM_BUILD_ROOT -name '*.pyc' -type f -print0 | xargs -0 rm -f -find $RPM_BUILD_ROOT -name '*.pyo' -type f -print0 | xargs -0 rm -f -########################################################### - %clean -########################################################### -if - [ -n "${RPM_BUILD_ROOT}" -a "${RPM_BUILD_ROOT}" != "/" ] -then - rm -rf $RPM_BUILD_ROOT +rm -rf %{buildroot} + +%if %{defined _unitdir} + +%post +#%systemd_post pacemaker.service +%service_add_post pacemaker.service + +if [ ! -e %{_sysconfdir}/sysconfig/pacemaker ]; then + %fillup_only pacemaker fi -rm -rf $RPM_BUILD_DIR/pacemaker -########################################################### + +%preun +#%systemd_preun pacemaker.service +%service_del_preun pacemaker.service + +%postun +#%systemd_postun_with_restart pacemaker.service +%service_del_postun pacemaker.service + +%post remote +#%systemd_post pacemaker_remote.service +%service_add_post pacemaker_remote.service + +if [ ! -e %{_sysconfdir}/sysconfig/pacemaker ]; then + %fillup_only pacemaker +fi + +%preun remote +#%systemd_preun pacemaker_remote.service +%service_del_preun pacemaker_remote.service + +%postun remote +#%systemd_postun_with_restart pacemaker_remote.service +%service_del_postun pacemaker_remote.service + +%else + +%post +/sbin/chkconfig --add pacemaker || : + +%preun +/sbin/service pacemaker stop || : +if [ $1 -eq 0 ]; then + # Package removal, not upgrade + /sbin/chkconfig --del pacemaker || : +fi + +%post remote +/sbin/chkconfig --add pacemaker_remote || : + +%preun remote +/sbin/service pacemaker_remote stop &>/dev/null || : +if [ $1 -eq 0 ]; then + # Package removal, not upgrade + /sbin/chkconfig --del pacemaker_remote || : +fi + +%endif + +%pre -n libpacemaker3 + +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 libpacemaker3 -p /sbin/ldconfig %postun -n libpacemaker3 -p /sbin/ldconfig +%post -n libpacemaker3-cluster -p /sbin/ldconfig + +%postun -n libpacemaker3-cluster -p /sbin/ldconfig + %if %with_regression_tests %post -n libpacemaker-devel @@ -329,99 +585,160 @@ fi %files ########################################################### %defattr(-,root,root) -%dir %{_libdir}/pacemaker -%dir %{_libdir}/heartbeat -#%dir %{_var}/lib/heartbeat -%dir %attr (750, %{uname}, %{gname}) %{_var}/lib/pacemaker -%dir %{pcmk_docdir} -%exclude %{_datadir}/pacemaker/tests -%{_datadir}/pacemaker -%{_libdir}/pacemaker/* -%{_libdir}/heartbeat/* -%{_sbindir}/cibadmin -%{_sbindir}/crm_attribute -%{_sbindir}/crm_diff -%{_sbindir}/crm_failcount -%{_sbindir}/crm_master -%{_sbindir}/crm_mon -%{_sbindir}/crm_resource -%{_sbindir}/crm_report -%{_sbindir}/crm_standby -%{_sbindir}/crm_ticket -%{_sbindir}/crm_verify -%{_sbindir}/crmadmin -%{_sbindir}/iso8601 -%{_sbindir}/attrd_updater -%{_sbindir}/ptest -%{_sbindir}/crm_shadow -#%{_sbindir}/cibpipe -%{_sbindir}/crm_node -%{_sbindir}/crm_simulate -%{_sbindir}/fence_legacy -%{_sbindir}/stonith_admin -%{_sbindir}/crm_error -#%{_sbindir}/cibsecret -#%{_sbindir}/pacemaker_remoted -#%dir %attr (750, %{uname}, %{gname}) %{_var}/lib/heartbeat/crm -#%dir %attr (750, %{uname}, %{gname}) %{_var}/lib/pengine +%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 +%dir %{_libexecdir}/pacemaker +%{_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/fence_legacy.* +%doc %{_mandir}/man8/pacemakerd.* +%doc %{_mandir}/man8/stonith_admin.* + +%doc COPYING +%doc AUTHORS +%doc ChangeLog + +%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 -#%dir %attr (750, %{uname}, %{gname}) %{_var}/lib/pacemaker/cores %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 -%{_datadir}/snmp/mibs/PCMK-MIB.txt -%if %with_ais_support -%dir %{_libexecdir}/lcrso -%{_libexecdir}/lcrso + +%if 0%{?cs_version} < 2 %{_libexecdir}/lcrso/pacemaker.lcrso %endif -#%if !0%{?_without_heartbeat} -#%{_sbindir}/crm_uuid -#%else -#%exclude %{_sbindir}/crm_uuid -#%endif -%exclude /usr/lib/ocf/resource.d/pacemaker/o2cb -# Packaged elsewhere -%exclude %{pcmk_docdir}/AUTHORS -%exclude %{pcmk_docdir}/COPYING -%exclude %{pcmk_docdir}/COPYING.LIB -%exclude %{_libdir}/pkgconfig -%doc %{pcmk_docdir}/*.html -%doc %{_mandir}/man8/*.8* -%doc %{_mandir}/man7/*.7* -%doc %{pcmk_docdir}/README.hb2openais -%doc %{pcmk_docdir}/acls.txt -%doc %{pcmk_docdir}/crm_fencing.txt + +%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 +%{_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/fence_legacy.* +%exclude %{_mandir}/man8/pacemakerd.* +%exclude %{_mandir}/man8/pacemaker_remoted.* +%exclude %{_mandir}/man8/stonith_admin.* + +%doc COPYING +%doc AUTHORS +%doc ChangeLog %files -n libpacemaker3 %defattr(-,root,root) + %{_libdir}/libcib.so.* +%{_libdir}/liblrmd.so.* +%{_libdir}/libcrmservice.so.* %{_libdir}/libcrmcommon.so.* -%{_libdir}/libcrmcluster.so.* %{_libdir}/libpe_status.so.* %{_libdir}/libpe_rules.so.* %{_libdir}/libpengine.so.* -%{_libdir}/libtransitioner.so.* %{_libdir}/libstonithd.so.* -%{_libdir}/libcrmservice.so.* -%{_libdir}/liblrmd.so.* +%{_libdir}/libtransitioner.so.* +%config(noreplace) /var/adm/fillup-templates/sysconfig.pacemaker +%doc COPYING.LIB +%doc AUTHORS +%{_libdir}/libcrmcluster.so.* + +%files -n libpacemaker3-cluster +%defattr(-,root,root) +#%{_libdir}/libcrmcluster.so.* +%doc COPYING.LIB +%doc AUTHORS + +%files remote +%defattr(-,root,root) + +#%config(noreplace) %{_sysconfdir}/sysconfig/pacemaker +%if %{defined _unitdir} +%{_unitdir}/pacemaker_remote.service +%else +%{_initrddir}/pacemaker_remote +%endif + +%{_sbindir}/pacemaker_remoted +%{_mandir}/man8/pacemaker_remoted.* +%doc COPYING.LIB +%doc AUTHORS + +%if %{with_doc} +%files doc +%defattr(-,root,root) +%doc %{pcmk_docdir} +%endif + +%files cts +%defattr(-,root,root) +%{py_site}/cts +%{_datadir}/pacemaker/tests/cts +%{_libexecdir}/pacemaker/lrmd_test +%doc COPYING.LIB +%doc AUTHORS %files -n libpacemaker-devel %defattr(-,root,root) -#%doc %{_datadir}/doc/%{name}-%{version} -%{py_sitedir}/cts +%exclude %{_datadir}/pacemaker/tests/cts %{_datadir}/pacemaker/tests %{_includedir}/pacemaker -# %{_includedir}/heartbeat/fencing %{_libdir}/*.so -%{_libdir}/pkgconfig/*.pc -%if %with_gcov -%dir %{_var}/lib/pacemaker -/%{_var}/lib/pacemaker +%if %{with coverage} +%{_var}/lib/pacemaker %endif +%{_libdir}/pkgconfig/*.pc +%doc COPYING.LIB +%doc AUTHORS %changelog diff --git a/pacemaker.tar.bz2 b/pacemaker.tar.bz2 index e5abd51..76f0c0a 100644 --- a/pacemaker.tar.bz2 +++ b/pacemaker.tar.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:79d3de89e46bdc3c6054929a947ebe948442358e0aeba20b2c65a02b808f973d -size 8733062 +oid sha256:c3843f864ba269eec29ac4e3cc78673764f1466625c6d73337f0c9fd3dd35272 +size 8739852