* Mon Nov 27 2023 Klaus Wenninger <kwenning@redhat.com> - 2.1.7-0.3.rc2

- Update for new upstream tarball for release candidate: Pacemaker-2.1.7-rc2,
  for full details, see included ChangeLog file or
  https://github.com/ClusterLabs/pacemaker/releases/tag/Pacemaker-2.1.7-rc2
This commit is contained in:
Klaus Wenninger 2023-11-28 15:37:14 +01:00
parent 55a0d7bf51
commit 2da11132b3
4 changed files with 8 additions and 123 deletions

View File

@ -1,76 +0,0 @@
From 0bf0a0e44e9b7a980a4e45aa082e304415b4c4d1 Mon Sep 17 00:00:00 2001
From: Reid Wahl <nrwahl@protonmail.com>
Date: Tue, 21 Nov 2023 00:01:32 -0800
Subject: [PATCH] Fix: libcrmcommon: Drop deprecated libxml2 symbols
xmlLoadExtDtdDefaultValue should be replaced by the XML_PARSE_DTDLOAD
parser option. However, we don't call any function that accepts parser
options where we currently use xmlLoadExtDtdDefaultValue. We also don't
use an xmlParserCtxt, so we can't call xmlCtxtUseOptions(). (There's no
analog for xmlRelaxNGParserCtxt.)
xmlSubstituteEntitiesDefault() should be replaced by XML_PARSE_NOENT.
Similarly, we don't call any function that accepts parser options where
we currently use xmlSubstituteEntitiesDefault().
xmlLineNumbersDefault() is always enabled by the modern parser API.
xmlParseFile() should be replaced by xmlReadFile(). Here we use a NULL
encoding and no options.
Note that the "new" or "modern" libxml2 parser API was released over 20
years ago, and we already use it in other places. So backwards
compatibility should not be a concern.
No regression tests change.
Ref T719
Ref CLBZ#5530
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
---
lib/common/schemas.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/lib/common/schemas.c b/lib/common/schemas.c
index 53c21f168..7b91f71bb 100644
--- a/lib/common/schemas.c
+++ b/lib/common/schemas.c
@@ -445,7 +445,6 @@ validate_with_relaxng(xmlDocPtr doc, xmlRelaxNGValidityErrorFunc error_handler,
crm_debug("Creating RNG parser context");
ctx = calloc(1, sizeof(relaxng_ctx_cache_t));
- xmlLoadExtDtdDefaultValue = 1;
ctx->parser = xmlRelaxNGNewParserCtxt(relaxng_file);
CRM_CHECK(ctx->parser != NULL, goto cleanup);
@@ -482,7 +481,6 @@ validate_with_relaxng(xmlDocPtr doc, xmlRelaxNGValidityErrorFunc error_handler,
}
}
- xmlLineNumbersDefault(1);
rc = xmlRelaxNGValidateDoc(ctx->valid, doc);
if (rc > 0) {
valid = FALSE;
@@ -660,7 +658,7 @@ validate_xml_verbose(const xmlNode *xml_blob)
dump_file(filename);
- doc = xmlParseFile(filename);
+ doc = xmlReadFile(filename, NULL, 0);
xml = xmlDocGetRootElement(doc);
rc = validate_xml(xml, NULL, FALSE);
free_xml(xml);
@@ -866,9 +864,6 @@ apply_transformation(xmlNode *xml, const char *transform, gboolean to_logs)
xform = pcmk__xml_artefact_path(pcmk__xml_artefact_ns_legacy_xslt,
transform);
- xmlLoadExtDtdDefaultValue = 1;
- xmlSubstituteEntitiesDefault(1);
-
/* for capturing, e.g., what's emitted via <xsl:message> */
if (to_logs) {
xsltSetGenericErrorFunc(NULL, cib_upgrade_err);
--
2.39.3

View File

@ -1,41 +0,0 @@
From 8fcef5d3d041f53503444cdffc04344dbba7710c Mon Sep 17 00:00:00 2001
From: Reid Wahl <nrwahl@protonmail.com>
Date: Tue, 21 Nov 2023 00:26:42 -0800
Subject: [PATCH] Fix: libcrmcommon: Use const for xmlCtxtGetLastError()
Libxml v2.12 makes xmlCtxtGetLastError() return a const value. We get a
compiler warning if we assign it to a non-const object.
Fixes T719
Fixes CLBZ#5530
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
---
lib/common/xml.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/common/xml.c b/lib/common/xml.c
index 272d09241..53ebff770 100644
--- a/lib/common/xml.c
+++ b/lib/common/xml.c
@@ -802,7 +802,7 @@ string2xml(const char *input)
xmlNode *xml = NULL;
xmlDocPtr output = NULL;
xmlParserCtxtPtr ctxt = NULL;
- xmlErrorPtr last_error = NULL;
+ const xmlError *last_error = NULL;
if (input == NULL) {
crm_err("Can't parse NULL input");
@@ -993,7 +993,7 @@ filename2xml(const char *filename)
xmlDocPtr output = NULL;
bool uncompressed = true;
xmlParserCtxtPtr ctxt = NULL;
- xmlErrorPtr last_error = NULL;
+ const xmlError *last_error = NULL;
/* create a parser context */
ctxt = xmlNewParserCtxt();
--
2.39.3

View File

@ -41,10 +41,10 @@
## can be incremented to build packages reliably considered "newer"
## than previously built packages with the same pcmkversion)
%global pcmkversion 2.1.7
%global specversion 2.rc1
%global specversion 3.rc2
## Upstream commit (full commit ID, abbreviated commit ID, or tag) to build
%global commit d0ef74d6431339f2f5782ab9061fa31734f4869c
%global commit 7534cc50aefbf3c161c7ed258daa1019a94d5079
## Since git v2.11, the extent of abbreviation is autoscaled by default
## (used to be constant of 7), so we need to convey it for non-tags, too.
@ -217,9 +217,6 @@ Source1: https://codeload.github.com/%{github_owner}/%{nagios_name}/tar.gz
Source2: pacemaker.sysusers
# upstream commits
Patch0: 0001-Fix-libcrmcommon-Drop-deprecated-libxml2-symbols.patch
Patch1: 0002-Fix-libcrmcommon-Use-const-for-xmlCtxtGetLastError.patch
Requires: resource-agents
Requires: %{pkgname_pcmk_libs}%{?_isa} = %{version}-%{release}
Requires: %{name}-cluster-libs%{?_isa} = %{version}-%{release}
@ -851,6 +848,11 @@ exit 0
%license %{nagios_name}-%{nagios_hash}/COPYING
%changelog
* Mon Nov 27 2023 Klaus Wenninger <kwenning@redhat.com> - 2.1.7-0.3.rc2
- Update for new upstream tarball for release candidate: Pacemaker-2.1.7-rc2,
for full details, see included ChangeLog file or
https://github.com/ClusterLabs/pacemaker/releases/tag/Pacemaker-2.1.7-rc2
* Tue Nov 21 2023 Klaus Wenninger <kwenning@redhat.com> - 2.1.7-0.2.rc1
- Fix build with libxml-2.12.0

View File

@ -1,2 +1,2 @@
SHA512 (nagios-agents-metadata-105ab8a7b2c16b9a29cf1c1596b80136eeef332b.tar.gz) = 11ddeb48a4929e7642b6dfa9c7962aa1d7a1af1c569830f55ed6cd6773abac13377317327bc1db8411c8077884f83f81cc54d746c834b63a99fa6dc219b5caad
SHA512 (pacemaker-d0ef74d64.tar.gz) = 78413387671a37f36faac429bd418a3f1509d5742fd10a2310ce54495511130ed442232ad068047be62c613779ac563ea00eed98e3f53952d1cd5d7779274599
SHA512 (pacemaker-7534cc50a.tar.gz) = 70703c68e3249a2fcc4d88d53b78a2a990163ec59b32fb4c5c6993cb53943900279017f529f9bf29a06e59fd67bb2d631719ed5a41848b01a54497caf90e0b20