2.0.3-4 - return back to building also for s390x architecture
...was identified and interim fix (way to build along with one actual bugfix as raised along) applied (RHBZ#1799842) Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
This commit is contained in:
parent
c1d1212573
commit
2957abde8a
94
Build-fix-compilation-Werror-compilation-issue.patch
Normal file
94
Build-fix-compilation-Werror-compilation-issue.patch
Normal file
@ -0,0 +1,94 @@
|
||||
From 9acf1f9b3d42ce48044568230cb4eba6a52b2e27 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= <jpokorny@redhat.com>
|
||||
Date: Wed, 4 Mar 2020 23:42:33 +0100
|
||||
Subject: [PATCH] Build: fix compilation -Werror compilation issue with GCC 10
|
||||
with s390x
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Curiously, this possible NULL propagation:
|
||||
|
||||
> In file included from ../../include/crm_internal.h:21,
|
||||
> from utils.c:10:
|
||||
> In function ‘pe_action_set_reason’,
|
||||
> inlined from ‘custom_action’ at utils.c:605:13:
|
||||
> ../../include/crm/common/logging.h:235:13: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
|
||||
> 235 | qb_log_from_external_source(__func__, __FILE__, fmt, level, \
|
||||
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
> 236 | __LINE__, converted_tag , ##args); \
|
||||
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
> ./../include/crm/pengine/internal.h:19:43: note: in expansion of macro ‘crm_log_tag’
|
||||
> 19 | # define pe_rsc_trace(rsc, fmt, args...) crm_log_tag(LOG_TRACE, rsc ? rsc->id : "<NULL>", fmt, ##args)
|
||||
> | ^~~~~~~~~~~
|
||||
> utils.c:2502:9: note: in expansion of macro ‘pe_rsc_trace’
|
||||
> 2502 | pe_rsc_trace(action->rsc, "Changing %s reason from '%s' to '%s'", action->uuid, action->reason, reason);
|
||||
> | ^~~~~~~~~~~~
|
||||
> tils.c: In function ‘custom_action’:
|
||||
> tils.c:2502:69: note: format string is defined here
|
||||
> 2502 | pe_rsc_trace(action->rsc, "Changing %s reason from '%s' to '%s'", action->uuid, action->reason, reason);
|
||||
> | ^~
|
||||
|
||||
was not observed with other architectures with a Rawhide rebuild.
|
||||
|
||||
There are various hypotheses behind that, currently concentrated
|
||||
around a suspicion that "-fPIC" vs. building lacking that, which
|
||||
is what libtool performs sequentially both unless the project is
|
||||
configured with --disable-static (current stopgap solution for
|
||||
said Rawhide/s390x problem) will mean that under some additional
|
||||
circumstances, more interprocedural (or even cross-file?) data
|
||||
flow analysis can be made and hence more problematic situations
|
||||
discovered. To add insult into injury, libtool would purposefully
|
||||
(and perhaps mistakenly) hide any outputs of possibly failing
|
||||
second compilation pass per above when the former succeeded.
|
||||
|
||||
[Due to resorting to said --disable-static, further occurrences
|
||||
of "new" problems are not being pursued at this time.]
|
||||
|
||||
Special thanks to Dan Horák for providing an instant feedback
|
||||
based on some Fedora automatic notification triggers:
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1799842#c11
|
||||
|
||||
Also of interest, reduce double message to single one only
|
||||
in one particular combination.
|
||||
---
|
||||
lib/pengine/utils.c | 24 ++++++++++++++----------
|
||||
1 file changed, 14 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/lib/pengine/utils.c b/lib/pengine/utils.c
|
||||
index 81f91215f3..6c82105f61 100644
|
||||
--- a/lib/pengine/utils.c
|
||||
+++ b/lib/pengine/utils.c
|
||||
@@ -2551,18 +2551,22 @@ void pe_action_set_flag_reason(const char *function, long line,
|
||||
|
||||
void pe_action_set_reason(pe_action_t *action, const char *reason, bool overwrite)
|
||||
{
|
||||
- if(action->reason && overwrite) {
|
||||
- pe_rsc_trace(action->rsc, "Changing %s reason from '%s' to '%s'", action->uuid, action->reason, reason);
|
||||
+ if (action->reason != NULL && overwrite) {
|
||||
+ pe_rsc_trace(action->rsc, "Changing %s reason from '%s' to '%s'",
|
||||
+ action->uuid, action->reason, crm_str(reason));
|
||||
free(action->reason);
|
||||
- action->reason = NULL;
|
||||
+ } else if (action->reason == NULL) {
|
||||
+ pe_rsc_trace(action->rsc, "Set %s reason to '%s'",
|
||||
+ action->uuid, crm_str(reason));
|
||||
+ } else {
|
||||
+ // crm_assert(action->reason != NULL && !overwrite);
|
||||
+ return;
|
||||
}
|
||||
- if(action->reason == NULL) {
|
||||
- if(reason) {
|
||||
- pe_rsc_trace(action->rsc, "Set %s reason to '%s'", action->uuid, reason);
|
||||
- action->reason = strdup(reason);
|
||||
- } else {
|
||||
- action->reason = NULL;
|
||||
- }
|
||||
+
|
||||
+ if (reason != NULL) {
|
||||
+ action->reason = strdup(reason);
|
||||
+ } else {
|
||||
+ action->reason = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
## can be incremented to build packages reliably considered "newer"
|
||||
## than previously built packages with the same pcmkversion)
|
||||
%global pcmkversion 2.0.3
|
||||
%global specversion 3
|
||||
%global specversion 4
|
||||
|
||||
## Upstream commit (or git tag, such as "Pacemaker-" plus the
|
||||
## {pcmkversion} macro for an official release) to use for this package
|
||||
@ -146,29 +146,7 @@ Source1: https://github.com/%{github_owner}/%{nagios_name}/archive/%{nagio
|
||||
Patch0: Build-fix-unability-to-build-with-Inkscape-1.0-beta-.patch
|
||||
Patch1: https://github.com/ClusterLabs/pacemaker/commit/898d369f3bc770c0db2ad3973c204e6d11ec0e0f.patch#/Build-get-ready-for-implicit-fno-common-with-GCC10.patch
|
||||
Patch2: https://github.com/ClusterLabs/pacemaker/commit/77a79358cc72174cbba0dd44e313f6d06d96dbf4.patch#/Refactor-attrd-properly-declare-global-variables.patch
|
||||
|
||||
# with s390x, linker fails without justification:
|
||||
# libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../include
|
||||
# -I../../include -I../../include -I../../libltdl -I../../libltdl
|
||||
# -DPCMK_TIME_EMERGENCY_CGT -UPCMK_TIME_EMERGENCY_CGT
|
||||
# -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
|
||||
# -I/usr/include/libxml2 -I/usr/include/heartbeat
|
||||
# -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include
|
||||
# -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -O2 -g -pipe -Wall
|
||||
# -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
|
||||
# -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong
|
||||
# -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
|
||||
# -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=zEC12
|
||||
# -mtune=z13 -fasynchronous-unwind-tables -fstack-clash-protection -ggdb
|
||||
# -fgnu89-inline -Wall -Waggregate-return -Wbad-function-cast
|
||||
# -Wcast-align -Wdeclaration-after-statement -Wendif-labels
|
||||
# -Wfloat-equal -Wformat-security -Wmissing-prototypes
|
||||
# -Wmissing-declarations -Wnested-externs -Wno-long-long
|
||||
# -Wno-strict-aliasing -Wpointer-arith -Wwrite-strings
|
||||
# -Wunused-but-set-variable -Wformat=2 -Wformat-nonliteral -Werror -c
|
||||
# utils.c -o libpe_status_la-utils.o >/dev/null 2>&1
|
||||
# make[3]: *** [Makefile:808: libpe_status_la-utils.lo] Error 1
|
||||
ExcludeArch: s390x
|
||||
Patch3: https://github.com/ClusterLabs/pacemaker/commit/9acf1f9b3d42ce48044568230cb4eba6a52b2e27.patch#/Build-fix-compilation-Werror-compilation-issue.patch
|
||||
|
||||
Requires: resource-agents
|
||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||
@ -409,6 +387,7 @@ export CPPFLAGS="-UPCMK_TIME_EMERGENCY_CGT $CPPFLAGS"
|
||||
%{?with_coverage: --with-coverage} \
|
||||
%{!?with_doc: --with-brand=} \
|
||||
%{?gnutls_priorities: --with-gnutls-priorities="%{gnutls_priorities}"} \
|
||||
--disable-static \
|
||||
--with-initdir=%{_initrddir} \
|
||||
--with-runstatedir=%{_rundir} \
|
||||
--localstatedir=%{_var} \
|
||||
@ -738,7 +717,12 @@ exit 0
|
||||
%license %{nagios_name}-%{nagios_hash}/COPYING
|
||||
|
||||
%changelog
|
||||
* Wed March 04 2020 Jan Pokorný <jpokorny+rpm-pacemaker@redhat.com> - 2.0.3-3
|
||||
* Fri Mar 06 2020 Jan Pokorný <jpokorny+rpm-pacemaker@redhat.com> - 2.0.3-4
|
||||
- return back to building also for s390x architecture, previous obstacle
|
||||
was identified and interim fix (way to build along with one actual bugfix
|
||||
as raised along) applied (RHBZ#1799842)
|
||||
|
||||
* Wed Mar 04 2020 Jan Pokorný <jpokorny+rpm-pacemaker@redhat.com> - 2.0.3-3
|
||||
- include upstream fix for buildability with GCC 10 (PR #1968)
|
||||
- omit s390x architecture for now, compilation would fail at this time
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user