Skip to content

Commit

Permalink
Merge pull request #2089 from kgaillot/2.0
Browse files Browse the repository at this point in the history
Fixes for building 2.0.4 in various environments
  • Loading branch information
kgaillot committed Jun 5, 2020
2 parents 4ff9c41 + 8317a3c commit 0db37d6
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 22 deletions.
3 changes: 3 additions & 0 deletions cts/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ cts_SCRIPTS = CTSlab.py \
clidir = $(testdir)/cli
dist_cli_DATA = cli/crm_diff_new.xml \
cli/crm_diff_old.xml \
cli/crm_mon.xml \
cli/crm_mon-partial.xml \
cli/regression.acls.exp \
cli/regression.crm_mon.exp \
cli/regression.dates.exp \
cli/regression.rules.exp \
cli/regression.tools.exp \
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions cts/cts-cli.in
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function test_assert() {
}

function test_crm_mon() {
export CIB_file="$SRCDIR/cts/crm_mon.xml"
export CIB_file="$test_home/cli/crm_mon.xml"

desc="Basic text output"
cmd="crm_mon -1"
Expand Down Expand Up @@ -174,7 +174,7 @@ function test_crm_mon() {

unset CIB_file

export CIB_file="$SRCDIR/cts/crm_mon-partial.xml"
export CIB_file="$test_home/cli/crm_mon-partial.xml"

desc="Text output of partially active resources"
cmd="crm_mon -1"
Expand Down
2 changes: 1 addition & 1 deletion lib/common/cib_secrets.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ pcmk__substitute_secrets(const char *rsc_id, GHashTable *params)
continue;

} else {
strncat(hash_file, ".sign", 5);
strcat(hash_file, ".sign");
hash = read_local_file(hash_file);
if (hash == NULL) {
crm_err("md5 sum for rsc %s parameter %s "
Expand Down
11 changes: 9 additions & 2 deletions rpm/pacemaker.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
## Add option to enable support for stonith/external fencing agents
%bcond_with stonithd

## Add option to enable support for storing sensitive information outside CIB
%bcond_with cibsecrets

## Add option to create binaries suitable for use with profiling tools
%bcond_with profiling

Expand Down Expand Up @@ -309,8 +312,8 @@ when related resources fail and can be configured to periodically check
resource health.

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

%package cli
License: GPLv2+ and LGPLv2+
Expand Down Expand Up @@ -492,6 +495,7 @@ export LDFLAGS_HARDENED_LIB="%{?_hardening_ldflags}"
%{!?with_legacy_links: --disable-legacy-links} \
%{?with_profiling: --with-profiling} \
%{?with_coverage: --with-coverage} \
%{?with_cibsecrets: --with-cibsecrets} \
%{!?with_doc: --with-brand=} \
%{?gnutls_priorities: --with-gnutls-priorities="%{gnutls_priorities}"} \
--with-initdir=%{_initrddir} \
Expand Down Expand Up @@ -754,6 +758,9 @@ exit 0

%{_sbindir}/attrd_updater
%{_sbindir}/cibadmin
%if %{with cibsecrets}
%{_sbindir}/cibsecret
%endif
%{_sbindir}/crm_diff
%{_sbindir}/crm_error
%{_sbindir}/crm_failcount
Expand Down
23 changes: 6 additions & 17 deletions tools/cibsecret.in
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
#!/bin/sh

# Copyright 2011-2018 the Pacemaker project contributors
# Copyright 2011-2020 the Pacemaker project contributors
#
# The version control history for this file may have further details.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This software is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# This source code is licensed under the GNU General Public License version 2
# or later (GPLv2+) WITHOUT ANY WARRANTY.
#

# cibsecret
Expand All @@ -25,8 +14,6 @@
# Secrets are ASCII files, holding one value per file:
# <secrets-directory>/<rsc>/<param>

. @OCF_ROOT_DIR@/lib/heartbeat/ocf-shellfuncs

LRM_CIBSECRETS=@LRM_CIBSECRETS_DIR@

PROG=`basename $0`
Expand Down Expand Up @@ -358,6 +345,8 @@ case "$cmd" in
*) usage 1;
esac

. @OCF_ROOT_DIR@/lib/heartbeat/ocf-shellfuncs

check_env

# we'll need these two often
Expand Down

0 comments on commit 0db37d6

Please sign in to comment.