Accepting request 401947 from home:scarabeus_iv:branches:network:ha-clustering:Factory
- Clean-up with spec-cleaner - Drop heartbeat conditions, no heartbeat around - Sort CMAN conditionals to be actually logical - Run fdupes to not waste so much space - Add logrotate to reqs of pacemaker-cli - Cleanup rpmlintrc to contain only bare needed minimum - Run basic sanity check in %check phase - Drop sysvinit support we now run on sle12+ only - Cleanup the define conditionals that are never used - Drop profiling and coverage options it is not enabled by default and better to run separately OBS-URL: https://build.opensuse.org/request/show/401947 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/pacemaker?expand=0&rev=247
This commit is contained in:
parent
1d3135f1d3
commit
2b3ea92213
@ -1,3 +1,22 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 14 11:35:04 UTC 2016 - tchvatal@suse.com
|
||||
|
||||
- Clean-up with spec-cleaner
|
||||
- Drop heartbeat conditions, no heartbeat around
|
||||
- Sort CMAN conditionals to be actually logical
|
||||
- Run fdupes to not waste so much space
|
||||
- Add logrotate to reqs of pacemaker-cli
|
||||
- Cleanup rpmlintrc to contain only bare needed minimum
|
||||
- Run basic sanity check in %check phase
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 14 11:09:45 UTC 2016 - tchvatal@suse.com
|
||||
|
||||
- Drop sysvinit support we now run on sle12+ only
|
||||
- Cleanup the define conditionals that are never used
|
||||
- Drop profiling and coverage options it is not enabled by default
|
||||
and better to run separately
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 13 10:31:52 UTC 2016 - ygao@suse.com
|
||||
|
||||
|
@ -1,16 +1,4 @@
|
||||
#addFilter(".*")
|
||||
addFilter("script-without-shebang /usr/share/pacemaker/.*\.rng")
|
||||
addFilter("script-without-shebang /usr/share/pacemaker/.*\.dtd")
|
||||
addFilter("script-without-shebang /usr/share/pacemaker/.*\.xsl")
|
||||
#addFilter("script-without-shebang /usr/share/pacemaker/cts/")
|
||||
addFilter("non-executable-script /usr/share/pacemaker/cts/")
|
||||
#addFilter("non-utf8-spec-file heartbeat.spec")
|
||||
addFilter("no-version-in-last-changelog")
|
||||
addFilter("shlib-policy-missing-suffix")
|
||||
addFilter("source-or-patch-not-bzipped")
|
||||
#addFilter("missing-dependency-to-cron")
|
||||
#addFilter("no-prereq-on pwdutils")
|
||||
#addFilter("no-packager-tag")
|
||||
|
||||
# Debug packages take care of this
|
||||
addFilter("unstripped-binary-or-object")
|
||||
|
608
pacemaker.spec
608
pacemaker.spec
@ -19,131 +19,37 @@
|
||||
%global gname haclient
|
||||
%global uname hacluster
|
||||
%global pcmk_docdir %{_docdir}/%{name}
|
||||
|
||||
%global specversion 1
|
||||
%global pcmkversion 1.1.14+git20160612.dd46368
|
||||
# set following to the actual commit or, for final release, concatenate
|
||||
# "pcmkversion" macro to "Pacemaker-" (will yield a tag per the convention)
|
||||
%global commit HEAD
|
||||
%global lparen (
|
||||
%global rparen )
|
||||
%global shortcommit %(c=%{commit}; case ${c} in
|
||||
Pacemaker-*%{rparen} echo ${c:10};;
|
||||
*%{rparen} echo ${c:0:7};; esac)
|
||||
%global pre_release %(s=%{shortcommit}; [ ${s: -4:3} != -rc ]; echo $?)
|
||||
%global post_release %([ %{commit} = Pacemaker-%{shortcommit} ]; echo $?)
|
||||
%global github_owner ClusterLabs
|
||||
|
||||
# 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 rawhide 0
|
||||
#%%global cs_version %%(pkg-config corosync --modversion | awk -F . '{print $1}')
|
||||
%global cs_version 2
|
||||
# It has to be eventually decided whether to use Python2 or Python3
|
||||
%global py_site %{?python_sitearch}%{!?python_sitearch:%(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
|
||||
%global cman_native 0%{?el6} || (0%{?fedora} > 0 && 0%{?fedora} < 17)
|
||||
|
||||
# It's desired to apply "license" macro uniformly in "files" sections below,
|
||||
# but RPM versions not aware of this new classification normally (re)define it
|
||||
# to the value of "License:", so following is to ensure the macro definition
|
||||
# is per expectation only after that tag; solution courtesy of Jason Tibbitts:
|
||||
# https://pkgs.fedoraproject.org/cgit/rpms/epel-rpm-macros.git/tree/macros.zzz-epel?h=el6&id=e1adcb77b0c05a6c29bc0eb0c4e82113180a0a99#n12
|
||||
%if !%{defined _licensedir}
|
||||
%define description %{lua:
|
||||
rpm.define("license %doc")
|
||||
print("%description")
|
||||
}
|
||||
%endif
|
||||
|
||||
# Conditionals
|
||||
# Invoke "rpmbuild --without <feature>" or "rpmbuild --with <feature>"
|
||||
# to disable or enable specific features
|
||||
|
||||
# Legacy stonithd fencing agents
|
||||
%bcond_with stonithd
|
||||
%define with_stonithd 1
|
||||
|
||||
# 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} || 0%{pre_release}
|
||||
%if 0%{pre_release}
|
||||
%global pcmk_release 0.%{specversion}.%(s=%{shortcommit}; echo ${s: -3})
|
||||
%else
|
||||
%global pcmk_release 0.%{specversion}.%{shortcommit}.git
|
||||
%endif
|
||||
%else
|
||||
%if 0%{post_release}
|
||||
%global pcmk_release %{specversion}.%{shortcommit}.git
|
||||
%else
|
||||
%global pcmk_release %{specversion}
|
||||
%endif
|
||||
%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_lib_cluster_pkg 0
|
||||
%define enable_fatal_warnings 1
|
||||
|
||||
%define with_regression_tests 0
|
||||
|
||||
%if ! %{defined _rundir}
|
||||
%define _rundir %{_localstatedir}/run
|
||||
%endif
|
||||
|
||||
# Conditionals
|
||||
# Invoke "rpmbuild --without <feature>" or "rpmbuild --with <feature>"
|
||||
# to disable or enable specific features
|
||||
# Legacy stonithd fencing agents
|
||||
%bcond_without stonithd
|
||||
# We generate docs using Publican, Asciidoc and Inkscape, but they're not available everywhere
|
||||
%bcond_with doc
|
||||
# Use a different versioning scheme
|
||||
%bcond_with pre_release
|
||||
# Turn off cman support
|
||||
%bcond_with cman
|
||||
Name: pacemaker
|
||||
Summary: Scalable High-Availability cluster resource manager
|
||||
%if %{defined _unitdir}
|
||||
License: GPL-2.0 and GPL-2.0+ and LGPL-2.1+
|
||||
%else
|
||||
# initscript is Revised BSD
|
||||
License: GPL-2.0 and GPL-2.0+ and LGPL-2.1+ and BSD-3-Clause
|
||||
%endif
|
||||
# AGPL-3.0 licensed extra/clustermon.sh is not present in the binary
|
||||
Group: Productivity/Clustering/HA
|
||||
Version: %{pcmkversion}
|
||||
Version: 1.1.14+git20160612.dd46368
|
||||
Release: 0
|
||||
#Release: %{pcmk_release}%{?dist}
|
||||
Summary: Scalable High-Availability cluster resource manager
|
||||
License: GPL-2.0 and GPL-2.0+ and LGPL-2.1+
|
||||
Group: Productivity/Clustering/HA
|
||||
Url: http://www.clusterlabs.org
|
||||
|
||||
# eg. https://github.com/ClusterLabs/pacemaker/archive/8ae45302394b039fb098e150f156df29fc0cb576/pacemaker-8ae4530.tar.gz
|
||||
#Source0: https://github.com/%{github_owner}/%{name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
|
||||
Source0: %{name}-%{version}.tar.bz2
|
||||
Source1: crm_report.in
|
||||
Source100: pacemaker.rpmlintrc
|
||||
@ -156,135 +62,84 @@ Patch6: bug-812269_pacemaker-fencing-device-register-messages.patch
|
||||
Patch7: pacemaker-Wno-format-signedness.patch
|
||||
Patch8: bug-943295_pacemaker-lrmd-log-notice.patch
|
||||
Patch9: bug-977201_pacemaker-controld-self-fencing.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Provides: pacemaker-ticket-support = 2.0
|
||||
Conflicts: heartbeat < 3.0
|
||||
Conflicts: libheartbeat2 < 3.0.0
|
||||
Requires: %{name}-cli = %{version}-%{release}
|
||||
Requires: libpacemaker3 = %{version}-%{release}
|
||||
%if %{enable_lib_cluster_pkg}
|
||||
Requires: libpacemaker3-cluster = %{version}-%{release}
|
||||
%endif
|
||||
Requires: psmisc
|
||||
Requires: python
|
||||
Requires: resource-agents
|
||||
Recommends: crmsh
|
||||
Recommends: libdlm
|
||||
Recommends: fence-agents
|
||||
Recommends: sbd
|
||||
Suggests: graphviz
|
||||
|
||||
%if %{defined systemd_requires}
|
||||
%systemd_requires
|
||||
%endif
|
||||
|
||||
# Required for core functionality (python-devel depends on python)
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: pkgconfig(glib-2.0)
|
||||
|
||||
%if 0%{?suse_version}
|
||||
# Enables optional functionality
|
||||
BuildRequires: bison
|
||||
BuildRequires: docbook-xsl-stylesheets
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: flex
|
||||
BuildRequires: help2man
|
||||
BuildRequires: libbz2-devel
|
||||
%else
|
||||
BuildRequires: bzip2-devel
|
||||
%endif
|
||||
|
||||
BuildRequires: libgnutls-devel
|
||||
# We need reasonably recent versions of libqb
|
||||
BuildRequires: libqb-devel > 0.11.0
|
||||
BuildRequires: libselinux-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: libtool-ltdl-devel
|
||||
BuildRequires: libuuid-devel
|
||||
BuildRequires: libxml2-devel
|
||||
BuildRequires: libxslt-devel
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: net-snmp-devel
|
||||
BuildRequires: openssl-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
|
||||
BuildRequires: pkgconfig(dbus-1)
|
||||
|
||||
%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: libselinux-devel
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: openssl-devel
|
||||
|
||||
BuildRequires: pkgconfig(glib-2.0)
|
||||
BuildRequires: pkgconfig(systemd)
|
||||
|
||||
%if %{with cman} && %{cman_native}
|
||||
Requires: %{name}-cli = %{version}-%{release}
|
||||
Requires: libpacemaker3 = %{version}-%{release}
|
||||
Requires: libqb > 0.11.0
|
||||
Requires: psmisc
|
||||
Requires: python
|
||||
Requires: resource-agents
|
||||
Recommends: crmsh
|
||||
Recommends: fence-agents
|
||||
Recommends: libdlm
|
||||
Recommends: sbd
|
||||
Suggests: graphviz
|
||||
Conflicts: heartbeat < 3.0
|
||||
Conflicts: libheartbeat2 < 3.0.0
|
||||
Provides: pacemaker-ticket-support = 2.0
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%{?systemd_requires}
|
||||
%if %{enable_lib_cluster_pkg}
|
||||
Requires: libpacemaker3-cluster = %{version}-%{release}
|
||||
%endif
|
||||
%if %{with cman}
|
||||
BuildRequires: clusterlib-devel
|
||||
# pacemaker initscript: cman initscript, fence_tool (+ some soft-dependencies)
|
||||
# "post" scriptlet: ccs_update_schema
|
||||
Requires: cman
|
||||
%endif
|
||||
|
||||
%if %with_corosync_support
|
||||
Requires: corosync
|
||||
#BuildRequires: corosynclib-devel
|
||||
%if %{with_corosync_support}
|
||||
BuildRequires: libcorosync-devel
|
||||
Requires: corosync
|
||||
%endif
|
||||
|
||||
%if %with_heartbeat_support
|
||||
BuildRequires: heartbeat-devel
|
||||
Requires: heartbeat
|
||||
%endif
|
||||
|
||||
#%if %{with stonithd}
|
||||
%if %{with_stonithd}
|
||||
#BuildRequires: cluster-glue-libs-devel
|
||||
%if %{with stonithd}
|
||||
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
|
||||
%if %{with doc}
|
||||
BuildRequires: asciidoc
|
||||
BuildRequires: inkscape
|
||||
BuildRequires: publican
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if %with_snmp
|
||||
BuildRequires: net-snmp-devel
|
||||
%endif
|
||||
|
||||
%if %with_esmtp
|
||||
%if %{with_esmtp}
|
||||
BuildRequires: libesmtp-devel
|
||||
%endif
|
||||
|
||||
%if %with_regression_tests
|
||||
%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 Corosync, CMAN and/or Linux-HA.
|
||||
@ -296,13 +151,11 @@ 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: libpacemaker3 = %{version}
|
||||
Requires: logrotate
|
||||
Requires: perl-TimeDate
|
||||
|
||||
%description cli
|
||||
@ -328,7 +181,7 @@ nodes and those just running the CLI tools.
|
||||
%package -n libpacemaker3-cluster
|
||||
Summary: Cluster Libraries used by Pacemaker
|
||||
Group: Productivity/Clustering/HA
|
||||
Requires: libpacemaker3 = %{version}-%{release}
|
||||
Requires: libpacemaker3 = %{version}
|
||||
|
||||
%description -n libpacemaker3-cluster
|
||||
Pacemaker is an advanced, scalable High-Availability cluster resource
|
||||
@ -341,12 +194,10 @@ 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: %{name}-cli = %{version}
|
||||
Requires: libpacemaker3 = %{version}
|
||||
Requires: resource-agents
|
||||
%if %{defined systemd_requires}
|
||||
%systemd_requires
|
||||
%endif
|
||||
%{?systemd_requires}
|
||||
|
||||
%description remote
|
||||
Pacemaker is an advanced, scalable High-Availability cluster resource
|
||||
@ -361,24 +212,18 @@ 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}
|
||||
%if %{enable_lib_cluster_pkg}
|
||||
Requires: libpacemaker3-cluster = %{version}-%{release}
|
||||
%endif
|
||||
Requires: libpacemaker3 = %{version}
|
||||
Requires: libqb-devel
|
||||
Requires: libtool-ltdl-devel
|
||||
Requires: libuuid-devel
|
||||
Requires: libxml2-devel
|
||||
Requires: libxslt-devel
|
||||
%if %with_regression_tests
|
||||
%if %{enable_lib_cluster_pkg}
|
||||
Requires: libpacemaker3-cluster = %{version}
|
||||
%endif
|
||||
%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
|
||||
# builds; this is supposed to be disabled for shipping code.
|
||||
@ -395,26 +240,13 @@ for developing tools for Pacemaker.
|
||||
%package cts
|
||||
Summary: Test framework for cluster-related technologies like Pacemaker
|
||||
Group: Productivity/Clustering/HA
|
||||
Requires: libpacemaker3 = %{version}-%{release}
|
||||
Requires: libpacemaker3 = %{version}
|
||||
Requires: python
|
||||
|
||||
# systemd python bindings are separate package in some distros
|
||||
%if %{defined systemd_requires}
|
||||
|
||||
%if 0%{?fedora} > 20
|
||||
Requires: systemd-python
|
||||
%endif
|
||||
|
||||
%if 0%{?rhel} > 6
|
||||
Requires: systemd-python
|
||||
%endif
|
||||
|
||||
%endif
|
||||
|
||||
%description cts
|
||||
Test framework for cluster-related technologies like Pacemaker
|
||||
Testing framework for cluster-related technologies like Pacemaker
|
||||
|
||||
%if %{with_doc}
|
||||
%if %{with doc}
|
||||
%package doc
|
||||
Summary: Documentation for Pacemaker
|
||||
Group: Productivity/Clustering/HA
|
||||
@ -427,8 +259,7 @@ manager for Corosync, CMAN and/or Linux-HA.
|
||||
%endif
|
||||
|
||||
%prep
|
||||
#%setup -q -n %{name}-%{commit}
|
||||
%setup -q -n %{name}-%{version}
|
||||
%setup -q
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
@ -439,76 +270,45 @@ manager for Corosync, CMAN and/or Linux-HA.
|
||||
%patch8 -p1
|
||||
%patch9 -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
|
||||
autoreconf -fvi
|
||||
|
||||
# Early versions of autotools (e.g. RHEL <= 5) do not support --docdir
|
||||
export docdir=%{pcmk_docdir}
|
||||
|
||||
./autogen.sh
|
||||
|
||||
%{configure} \
|
||||
%{?with_profiling: --with-profiling} \
|
||||
%{?with_coverage: --with-coverage} \
|
||||
%configure \
|
||||
--disable-static \
|
||||
--disable-silent-rules\
|
||||
--without-profiling \
|
||||
--without-coverage \
|
||||
%{!?with_cman: --without-cman} \
|
||||
%if !%with_heartbeat_support
|
||||
--without-heartbeat \
|
||||
%endif
|
||||
%if %with_nagios
|
||||
%if %{with_nagios}
|
||||
--with-nagios=true \
|
||||
%endif
|
||||
%if %with_snmp
|
||||
--with-snmp=true \
|
||||
%endif
|
||||
%if %with_esmtp
|
||||
%if %{with_esmtp}
|
||||
--with-esmtp=true \
|
||||
%endif
|
||||
%if %with_acl
|
||||
%if %{with_acl}
|
||||
--with-acl=true \
|
||||
%endif
|
||||
%if %with_cibsecrets
|
||||
%if %{with_cibsecrets}
|
||||
--with-cibsecrets=true \
|
||||
%endif
|
||||
%if !%enable_fatal_warnings
|
||||
%if !%{enable_fatal_warnings}
|
||||
--enable-fatal-warnings=no \
|
||||
%endif
|
||||
%{!?with_doc: --with-brand=} \
|
||||
--with-initdir=%{_initrddir} \
|
||||
%{!?with doc: --with-brand=} \
|
||||
--with-initdir=%{_initddir} \
|
||||
--localstatedir=%{_var} \
|
||||
--with-version=%{version}-%{release}
|
||||
--with-version=%{version}
|
||||
|
||||
%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 all
|
||||
make %{?_smp_mflags} all
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
make DESTDIR=%{buildroot} docdir=%{pcmk_docdir} V=1 install
|
||||
make DESTDIR=%{buildroot} docdir=%{pcmk_docdir} install
|
||||
|
||||
#mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig
|
||||
install -d -m755 $RPM_BUILD_ROOT/var/adm/fillup-templates
|
||||
#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
|
||||
#install -m 644 tools/crm_mon.sysconfig ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/crm_mon
|
||||
install -m 644 tools/crm_mon.sysconfig $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.crm_mon
|
||||
|
||||
%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
|
||||
install -m 644 tools/crm_mon.upstart ${RPM_BUILD_ROOT}%{_sysconfdir}/init/crm_mon.conf
|
||||
%endif
|
||||
install -d -m755 %{buildroot}%{_localstatedir}/adm/fillup-templates
|
||||
install -m 644 mcp/pacemaker.sysconfig %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.pacemaker
|
||||
install -m 644 tools/crm_mon.sysconfig %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.crm_mon
|
||||
|
||||
# Scripts that should be executable
|
||||
chmod a+x %{buildroot}/%{_datadir}/pacemaker/tests/cts/CTSlab.py
|
||||
@ -516,161 +316,94 @@ chmod a+x %{buildroot}/%{_datadir}/pacemaker/tests/cts/CTSlab.py
|
||||
# These are not actually scripts
|
||||
find %{buildroot} -name '*.xml' -type f -print0 | xargs -0 chmod a-x
|
||||
|
||||
# Don't 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
|
||||
find %{buildroot} -type f -name "*.la" -delete -print
|
||||
|
||||
# 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
|
||||
rm -f %{buildroot}/%{_initddir}/pacemaker
|
||||
rm -f %{buildroot}/%{_initddir}/pacemaker_remote
|
||||
|
||||
# Don't ship fence_pcmk where it has no use
|
||||
%if %{without cman}
|
||||
rm -f %{buildroot}/%{_sbindir}/fence_pcmk
|
||||
%endif
|
||||
|
||||
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcpacemaker
|
||||
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcpacemaker_remote
|
||||
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rccrm_mon
|
||||
%endif
|
||||
ln -s service %{buildroot}%{_sbindir}/rcpacemaker
|
||||
ln -s service %{buildroot}%{_sbindir}/rcpacemaker_remote
|
||||
ln -s service %{buildroot}%{_sbindir}/rccrm_mon
|
||||
|
||||
mv %{buildroot}%{_sbindir}/crm_report %{buildroot}%{_sbindir}/crm_report.pacemaker
|
||||
install -m 755 %{S:1} %{buildroot}%{_sbindir}/crm_report
|
||||
install -m 755 %{SOURCE1} %{buildroot}%{_sbindir}/crm_report
|
||||
|
||||
%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
|
||||
done
|
||||
%endif
|
||||
%fdupes -s %{buildroot}
|
||||
|
||||
%if %{defined _unitdir}
|
||||
%check
|
||||
# Prevent false positives in rpmlint
|
||||
./BasicSanity.sh -V pengine cli 2>&1
|
||||
|
||||
%post
|
||||
#%systemd_post pacemaker.service
|
||||
%service_add_post pacemaker.service
|
||||
|
||||
%pre
|
||||
%service_add_pre pacemaker.service
|
||||
|
||||
%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
|
||||
|
||||
%pre remote
|
||||
%service_add_pre pacemaker_remote.service
|
||||
|
||||
%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
|
||||
|
||||
%post cli
|
||||
|
||||
if [ ! -e %{_sysconfdir}/sysconfig/pacemaker ]; then
|
||||
%fillup_only pacemaker
|
||||
fi
|
||||
|
||||
#%systemd_post crm_mon.service
|
||||
%fillup_only pacemaker
|
||||
%service_add_post crm_mon.service
|
||||
|
||||
if [ ! -e %{_sysconfdir}/sysconfig/crm_mon ]; then
|
||||
%fillup_only crm_mon
|
||||
fi
|
||||
%fillup_only crm_mon
|
||||
|
||||
%pre cli
|
||||
%service_add_pre crm_mon.service
|
||||
|
||||
%preun cli
|
||||
#%systemd_preun crm_mon.service
|
||||
%service_del_preun crm_mon.service
|
||||
|
||||
%postun cli
|
||||
#%systemd_postun_with_restart crm_mon.service
|
||||
%service_del_postun crm_mon.service
|
||||
|
||||
%else
|
||||
|
||||
%post
|
||||
/sbin/chkconfig --add pacemaker || :
|
||||
%if %{with cman} && %{cman_native}
|
||||
# make fence_pcmk in cluster.conf valid instantly otherwise tools like ccs may
|
||||
# choke (until schema gets auto-regenerated on the next start of cluster),
|
||||
# per the protocol shared with other packages contributing to cluster.rng
|
||||
/usr/sbin/ccs_update_schema >/dev/null 2>&1 || :
|
||||
%endif
|
||||
|
||||
%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
|
||||
|
||||
%post cli
|
||||
|
||||
if [ ! -e %{_sysconfdir}/sysconfig/pacemaker ]; then
|
||||
%fillup_only pacemaker
|
||||
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
|
||||
|
||||
%if %{enable_lib_cluster_pkg}
|
||||
%post -n libpacemaker3-cluster -p /sbin/ldconfig
|
||||
|
||||
%postun -n libpacemaker3-cluster -p /sbin/ldconfig
|
||||
%endif
|
||||
|
||||
%if %with_regression_tests
|
||||
|
||||
%if %{with_regression_tests}
|
||||
%post -n libpacemaker-devel
|
||||
if [ ! -e /tmp/.pcmk_regression_tests_ran ]; then
|
||||
touch /tmp/.pcmk_regression_tests_ran
|
||||
# Needed so that the shell doesn't get stuck on escape
|
||||
# sequences
|
||||
export TERM=dumb
|
||||
/usr/share/pacemaker/tests/cli/regression.sh || true
|
||||
/usr/share/pacemaker/tests/pengine/regression.sh -V || true
|
||||
%{_datadir}/pacemaker/tests/cli/regression.sh || true
|
||||
%{_datadir}/pacemaker/tests/pengine/regression.sh -V || true
|
||||
echo Now running shell regression tests ; date
|
||||
if ! /usr/share/pacemaker/tests/shell/regression.sh ; then
|
||||
if ! %{_datadir}/pacemaker/tests/shell/regression.sh ; then
|
||||
echo "Shell tests failed."
|
||||
cat crmtestout/regression.out
|
||||
fi
|
||||
@ -678,18 +411,13 @@ fi
|
||||
%endif
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
###########################################################
|
||||
%defattr(-,root,root)
|
||||
|
||||
#%config(noreplace) %{_sysconfdir}/sysconfig/pacemaker
|
||||
%{_sbindir}/pacemakerd
|
||||
|
||||
%if %{defined _unitdir}
|
||||
%{_unitdir}/pacemaker.service
|
||||
%{_sbindir}/rcpacemaker
|
||||
%else
|
||||
%{_initrddir}/pacemaker
|
||||
%endif
|
||||
|
||||
%exclude %{_libexecdir}/pacemaker/lrmd_test
|
||||
%exclude %{_sbindir}/pacemaker_remoted
|
||||
@ -703,64 +431,40 @@ fi
|
||||
%endif
|
||||
%{_sbindir}/stonith_admin
|
||||
|
||||
%doc %{_mandir}/man7/crmd.*
|
||||
%doc %{_mandir}/man7/pengine.*
|
||||
%doc %{_mandir}/man7/stonithd.*
|
||||
%if %{without cman} || !%{cman_native}
|
||||
%doc %{_mandir}/man7/ocf_pacemaker_controld.*
|
||||
%{_mandir}/man7/crmd.7%{ext_man}
|
||||
%{_mandir}/man7/pengine.7%{ext_man}
|
||||
%{_mandir}/man7/stonithd.7%{ext_man}
|
||||
%if %{without cman}
|
||||
%{_mandir}/man7/ocf_pacemaker_controld.7%{ext_man}
|
||||
%endif
|
||||
%doc %{_mandir}/man7/ocf_pacemaker_o2cb.*
|
||||
%doc %{_mandir}/man7/ocf_pacemaker_remote.*
|
||||
%doc %{_mandir}/man8/crm_node.*
|
||||
%{_mandir}/man7/ocf_pacemaker_o2cb.7%{ext_man}
|
||||
%{_mandir}/man7/ocf_pacemaker_remote.7%{ext_man}
|
||||
%{_mandir}/man8/crm_node.8%{ext_man}
|
||||
%if %{with cman}
|
||||
%doc %{_mandir}/man8/fence_pcmk.*
|
||||
%{_mandir}/man8/fence_pcmk.8%{ext_man}
|
||||
%endif
|
||||
%doc %{_mandir}/man8/fence_legacy.*
|
||||
%doc %{_mandir}/man8/pacemakerd.*
|
||||
%doc %{_mandir}/man8/stonith_admin.*
|
||||
%{_mandir}/man8/fence_legacy.8%{ext_man}
|
||||
%{_mandir}/man8/pacemakerd.8%{ext_man}
|
||||
%{_mandir}/man8/stonith_admin.8%{ext_man}
|
||||
|
||||
%doc %{_datadir}/pacemaker/alerts
|
||||
|
||||
#%license COPYING
|
||||
%doc COPYING
|
||||
%doc AUTHORS
|
||||
%doc ChangeLog
|
||||
%doc COPYING AUTHORS ChangeLog
|
||||
|
||||
%dir %attr (750, %{uname}, %{gname}) %{_var}/lib/pacemaker/cib
|
||||
%dir %attr (750, %{uname}, %{gname}) %{_var}/lib/pacemaker/pengine
|
||||
%if %{without cman} || !%{cman_native}
|
||||
/usr/lib/ocf/resource.d/pacemaker/controld
|
||||
%endif
|
||||
/usr/lib/ocf/resource.d/pacemaker/o2cb
|
||||
/usr/lib/ocf/resource.d/pacemaker/remote
|
||||
/usr/lib/ocf/resource.d/.isolation
|
||||
|
||||
%if "%{?cs_version}" != "UNKNOWN"
|
||||
%if 0%{?cs_version} < 2
|
||||
%{_libexecdir}/lcrso/pacemaker.lcrso
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if %{with upstart_job}
|
||||
%config(noreplace) %{_sysconfdir}/init/pacemaker.conf
|
||||
%config(noreplace) %{_sysconfdir}/init/pacemaker.combined.conf
|
||||
%if %{without cman}
|
||||
%{_libexecdir}/ocf/resource.d/pacemaker/controld
|
||||
%endif
|
||||
%{_libexecdir}/ocf/resource.d/pacemaker/o2cb
|
||||
%{_libexecdir}/ocf/resource.d/pacemaker/remote
|
||||
%{_libexecdir}/ocf/resource.d/.isolation
|
||||
|
||||
%files cli
|
||||
%defattr(-,root,root)
|
||||
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/pacemaker
|
||||
#%config(noreplace) %{_sysconfdir}/sysconfig/crm_mon
|
||||
|
||||
%if %{defined _unitdir}
|
||||
%{_unitdir}/crm_mon.service
|
||||
%{_sbindir}/rccrm_mon
|
||||
%endif
|
||||
|
||||
%if %{with upstart_job}
|
||||
%config(noreplace) %{_sysconfdir}/init/crm_mon.conf
|
||||
%endif
|
||||
|
||||
%{_sbindir}/attrd_updater
|
||||
%{_sbindir}/cibadmin
|
||||
%{_sbindir}/crm_attribute
|
||||
@ -784,24 +488,24 @@ fi
|
||||
%{_datadir}/pacemaker
|
||||
%{_datadir}/snmp/mibs/PCMK-MIB.txt
|
||||
|
||||
%exclude /usr/lib/ocf/resource.d/pacemaker/controld
|
||||
%exclude /usr/lib/ocf/resource.d/pacemaker/o2cb
|
||||
%exclude /usr/lib/ocf/resource.d/pacemaker/remote
|
||||
%exclude %{_libexecdir}/ocf/resource.d/pacemaker/controld
|
||||
%exclude %{_libexecdir}/ocf/resource.d/pacemaker/o2cb
|
||||
%exclude %{_libexecdir}/ocf/resource.d/pacemaker/remote
|
||||
|
||||
%dir /usr/lib/ocf
|
||||
%dir /usr/lib/ocf/resource.d
|
||||
/usr/lib/ocf/resource.d/pacemaker
|
||||
%dir %{_libexecdir}/ocf
|
||||
%dir %{_libexecdir}/ocf/resource.d
|
||||
%{_libexecdir}/ocf/resource.d/pacemaker
|
||||
|
||||
%config(noreplace) /var/adm/fillup-templates/sysconfig.pacemaker
|
||||
%config(noreplace) /var/adm/fillup-templates/sysconfig.crm_mon
|
||||
%doc %{_mandir}/man7/*
|
||||
%config(noreplace) %{_localstatedir}/adm/fillup-templates/sysconfig.pacemaker
|
||||
%config(noreplace) %{_localstatedir}/adm/fillup-templates/sysconfig.crm_mon
|
||||
%{_mandir}/man7/*
|
||||
%exclude %{_mandir}/man7/crmd.*
|
||||
%exclude %{_mandir}/man7/pengine.*
|
||||
%exclude %{_mandir}/man7/stonithd.*
|
||||
%exclude %{_mandir}/man7/ocf_pacemaker_controld.*
|
||||
%exclude %{_mandir}/man7/ocf_pacemaker_o2cb.*
|
||||
%exclude %{_mandir}/man7/ocf_pacemaker_remote.*
|
||||
%doc %{_mandir}/man8/*
|
||||
%{_mandir}/man8/*
|
||||
%exclude %{_mandir}/man8/crm_node.*
|
||||
%exclude %{_mandir}/man8/fence_pcmk.*
|
||||
%exclude %{_mandir}/man8/fence_legacy.*
|
||||
@ -809,10 +513,7 @@ fi
|
||||
%exclude %{_mandir}/man8/pacemaker_remoted.*
|
||||
%exclude %{_mandir}/man8/stonith_admin.*
|
||||
|
||||
#%license COPYING
|
||||
%doc COPYING
|
||||
%doc AUTHORS
|
||||
%doc ChangeLog
|
||||
%doc COPYING AUTHORS ChangeLog
|
||||
|
||||
%dir %attr (750, %{uname}, %{gname}) %{_var}/lib/pacemaker
|
||||
%dir %attr (750, %{uname}, %{gname}) %{_var}/lib/pacemaker/blackbox
|
||||
@ -830,38 +531,25 @@ fi
|
||||
%{_libdir}/libpengine.so.*
|
||||
%{_libdir}/libstonithd.so.*
|
||||
%{_libdir}/libtransitioner.so.*
|
||||
#%license COPYING.LIB
|
||||
%doc COPYING.LIB
|
||||
%doc AUTHORS
|
||||
%doc COPYING.LIB AUTHORS
|
||||
%{_libdir}/libcrmcluster.so.*
|
||||
|
||||
%if %{enable_lib_cluster_pkg}
|
||||
%files -n libpacemaker3-cluster
|
||||
%defattr(-,root,root)
|
||||
#%{_libdir}/libcrmcluster.so.*
|
||||
#%license COPYING.LIB
|
||||
%doc COPYING.LIB
|
||||
%doc AUTHORS
|
||||
%{_libdir}/libcrmcluster.so.*
|
||||
%doc COPYING.LIB AUTHORS
|
||||
%endif
|
||||
|
||||
%files remote
|
||||
%defattr(-,root,root)
|
||||
|
||||
#%config(noreplace) %{_sysconfdir}/sysconfig/pacemaker
|
||||
%if %{defined _unitdir}
|
||||
%{_unitdir}/pacemaker_remote.service
|
||||
%{_sbindir}/rcpacemaker_remote
|
||||
%else
|
||||
%{_initrddir}/pacemaker_remote
|
||||
%endif
|
||||
|
||||
%{_sbindir}/pacemaker_remoted
|
||||
%{_mandir}/man8/pacemaker_remoted.*
|
||||
#%license COPYING
|
||||
%doc COPYING
|
||||
%doc AUTHORS
|
||||
%{_mandir}/man8/pacemaker_remoted.8%{ext_man}
|
||||
%doc COPYING AUTHORS
|
||||
|
||||
%if %{with_doc}
|
||||
%if %{with doc}
|
||||
%files doc
|
||||
%defattr(-,root,root)
|
||||
%doc %{pcmk_docdir}
|
||||
@ -869,13 +557,10 @@ fi
|
||||
|
||||
%files cts
|
||||
%defattr(-,root,root)
|
||||
#%{py_site}/cts
|
||||
%{py_sitedir}/cts
|
||||
%{_datadir}/pacemaker/tests/cts
|
||||
%{_libexecdir}/pacemaker/lrmd_test
|
||||
#%license COPYING
|
||||
%doc COPYING
|
||||
%doc AUTHORS
|
||||
%doc COPYING AUTHORS
|
||||
|
||||
%files -n libpacemaker-devel
|
||||
%defattr(-,root,root)
|
||||
@ -883,12 +568,7 @@ fi
|
||||
%{_datadir}/pacemaker/tests
|
||||
%{_includedir}/pacemaker
|
||||
%{_libdir}/*.so
|
||||
%if %{with coverage}
|
||||
%{_var}/lib/pacemaker/gcov
|
||||
%endif
|
||||
%{_libdir}/pkgconfig/*.pc
|
||||
#%license COPYING.LIB
|
||||
%doc COPYING.LIB
|
||||
%doc AUTHORS
|
||||
%doc COPYING.LIB AUTHORS
|
||||
|
||||
%changelog
|
||||
|
Loading…
x
Reference in New Issue
Block a user