From c96703a04e9b66e6df2be1acff10af31df5d41a4 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 28 Mar 2023 09:57:37 +0000 Subject: [PATCH] import dlm-4.2.0-2.el9 --- .dlm.metadata | 2 +- .gitignore | 2 +- ...de-add-fcf-protection-full-to-CFLAGS.patch | 70 ++++++++++++ ...rold-fix-printf-args-in-log-messages.patch | 48 -------- ...on-t-link-dlm_stonith-against-libxml.patch | 36 ------ ...eewide-do-always-Wl-z-now-in-LDFLAGS.patch | 106 ------------------ SPECS/dlm.spec | 15 +-- 7 files changed, 80 insertions(+), 199 deletions(-) create mode 100644 SOURCES/0001-Revert-treewide-add-fcf-protection-full-to-CFLAGS.patch delete mode 100644 SOURCES/0001-dlm_controld-fix-printf-args-in-log-messages.patch delete mode 100644 SOURCES/0002-stonith_helper-Don-t-link-dlm_stonith-against-libxml.patch delete mode 100644 SOURCES/0003-treewide-do-always-Wl-z-now-in-LDFLAGS.patch diff --git a/.dlm.metadata b/.dlm.metadata index 5098f65..21b3538 100644 --- a/.dlm.metadata +++ b/.dlm.metadata @@ -1 +1 @@ -a8fef90c11d7da2a9420eb19aab221952686881c SOURCES/dlm-4.1.1.tar.gz +9239bf86ecd26fd532528fbcd64712d79e389ff3 SOURCES/dlm-4.2.0.tar.gz diff --git a/.gitignore b/.gitignore index e73fad4..6626715 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/dlm-4.1.1.tar.gz +SOURCES/dlm-4.2.0.tar.gz diff --git a/SOURCES/0001-Revert-treewide-add-fcf-protection-full-to-CFLAGS.patch b/SOURCES/0001-Revert-treewide-add-fcf-protection-full-to-CFLAGS.patch new file mode 100644 index 0000000..6675f90 --- /dev/null +++ b/SOURCES/0001-Revert-treewide-add-fcf-protection-full-to-CFLAGS.patch @@ -0,0 +1,70 @@ +From 4cfb7b21a88f0ae32d97ea4cbb0c7419b88f397d Mon Sep 17 00:00:00 2001 +From: Alexander Aring +Date: Wed, 12 Oct 2022 12:44:03 -0400 +Subject: [PATCH] Revert "treewide: add -fcf-protection=full to CFLAGS" + +This reverts commit 215aedf1fdff58c62fe596284948590965acc85c. +--- + dlm_controld/Makefile | 2 +- + dlm_tool/Makefile | 2 +- + fence/Makefile | 2 +- + libdlm/Makefile | 4 ++-- + 4 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/dlm_controld/Makefile b/dlm_controld/Makefile +index ec8c360cc853..9cf7152f60ab 100644 +--- a/dlm_controld/Makefile ++++ b/dlm_controld/Makefile +@@ -43,7 +43,7 @@ CFLAGS += -D_GNU_SOURCE -O2 -ggdb \ + -Wno-sign-compare -Wno-unused-parameter -Wp,-D_FORTIFY_SOURCE=2 \ + -fexceptions -fasynchronous-unwind-tables -fdiagnostics-show-option \ + -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong \ +- -fstack-clash-protection -fcf-protection=full ++ -fstack-clash-protection + + BIN_CFLAGS += $(CFLAGS) -fPIE -DPIE + BIN_CFLAGS += -I../include -I../libdlm +diff --git a/dlm_tool/Makefile b/dlm_tool/Makefile +index 57629c731771..1c3d61d5c860 100644 +--- a/dlm_tool/Makefile ++++ b/dlm_tool/Makefile +@@ -15,7 +15,7 @@ CFLAGS += -D_GNU_SOURCE -O2 -ggdb \ + -Wno-sign-compare -Wno-unused-parameter -Wp,-D_FORTIFY_SOURCE=2 \ + -fexceptions -fasynchronous-unwind-tables -fdiagnostics-show-option \ + -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong \ +- -fstack-clash-protection -fcf-protection=full ++ -fstack-clash-protection + + CFLAGS += -fPIE -DPIE + CFLAGS += -I../include -I../libdlm -I../dlm_controld +diff --git a/fence/Makefile b/fence/Makefile +index 446f4eaac9f9..ee4dfb886d4c 100644 +--- a/fence/Makefile ++++ b/fence/Makefile +@@ -15,7 +15,7 @@ CFLAGS += -D_GNU_SOURCE -O2 -ggdb \ + -Wno-sign-compare -Wno-unused-parameter -Wp,-D_FORTIFY_SOURCE=2 \ + -fexceptions -fasynchronous-unwind-tables -fdiagnostics-show-option \ + -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong \ +- -fstack-clash-protection -fcf-protection=full ++ -fstack-clash-protection + + CFLAGS += -fPIE -DPIE + CFLAGS += -I../include +diff --git a/libdlm/Makefile b/libdlm/Makefile +index 823fdaa94073..5069ccf1f7f9 100644 +--- a/libdlm/Makefile ++++ b/libdlm/Makefile +@@ -80,8 +80,8 @@ CFLAGS += -D_GNU_SOURCE -O2 -ggdb \ + -fdiagnostics-show-option \ + -fPIC + +-LIB_CFLAGS += $(CFLAGS) -D_REENTRANT -fcf-protection=full +-LLT_CFLAGS += $(CFLAGS) -fcf-protection=full ++LIB_CFLAGS += $(CFLAGS) -D_REENTRANT ++LLT_CFLAGS += $(CFLAGS) + + LIB_LDFLAGS += $(LDFLAGS) -lpthread -Wl,-z,now + LLT_LDFLAGS += $(LDFLAGS) -Wl,-z,now +-- +2.7.5 + diff --git a/SOURCES/0001-dlm_controld-fix-printf-args-in-log-messages.patch b/SOURCES/0001-dlm_controld-fix-printf-args-in-log-messages.patch deleted file mode 100644 index 45aee1f..0000000 --- a/SOURCES/0001-dlm_controld-fix-printf-args-in-log-messages.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 4f6e9461edb571577eebb712e676eec4c7edd5ec Mon Sep 17 00:00:00 2001 -From: David Teigland -Date: Tue, 8 Feb 2022 09:54:06 -0600 -Subject: [PATCH 1/5] dlm_controld: fix printf args in log messages - -Fix log message arg types in two recent commits: - -dcc945a9d40b90a7b13d7f826f2726f35921f95b - "dlm_controld: use uint64_t for cluster ringid" - -b0222892f0b82ff680d4b3f9ac4250f47300d897 - "dlm_controld: add support for per nodeid configuration" ---- - dlm_controld/cpg.c | 2 +- - dlm_controld/node_config.c | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/dlm_controld/cpg.c b/dlm_controld/cpg.c -index f3365ee4cd77..b9f9a16b8ae0 100644 ---- a/dlm_controld/cpg.c -+++ b/dlm_controld/cpg.c -@@ -450,7 +450,7 @@ static int check_ringid_done(struct lockspace *ls) - but that's probably not guaranteed.) */ - - if (ls->cpg_ringid_wait) { -- log_group(ls, "check_ringid wait cluster %u cpg %llu:%llu", -+ log_group(ls, "check_ringid wait cluster %llu cpg %u:%llu", - (unsigned long long)cluster_ringid_seq, - ls->cpg_ringid.nodeid, - (unsigned long long)ls->cpg_ringid.seq); -diff --git a/dlm_controld/node_config.c b/dlm_controld/node_config.c -index fe794be72f22..9845e8988e8c 100644 ---- a/dlm_controld/node_config.c -+++ b/dlm_controld/node_config.c -@@ -58,8 +58,8 @@ int node_config_init(const char *path) - } - nc[nodeid].mark = mark; - -- log_debug("parsed node config id=%d mark=%" PRIu32, -- nodeid, mark); -+ log_debug("parsed node config id=%d mark=%llu", -+ nodeid, (unsigned long long)mark); - } - } - --- -2.7.5 - diff --git a/SOURCES/0002-stonith_helper-Don-t-link-dlm_stonith-against-libxml.patch b/SOURCES/0002-stonith_helper-Don-t-link-dlm_stonith-against-libxml.patch deleted file mode 100644 index 6dbb187..0000000 --- a/SOURCES/0002-stonith_helper-Don-t-link-dlm_stonith-against-libxml.patch +++ /dev/null @@ -1,36 +0,0 @@ -From c745ac4ce06df71b13c5901aa2e6c3772f3661dd Mon Sep 17 00:00:00 2001 -From: Alexander Aring -Date: Thu, 2 Dec 2021 13:27:26 -0500 -Subject: [PATCH 2/5] stonith_helper: Don't link dlm_stonith against libxml2 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Took it from the debian patches. There is no need to link against -libxml2 for the stonith_helper tool. - -Reported-by: Ferenc Wágner ---- - fence/Makefile | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/fence/Makefile b/fence/Makefile -index 2b080468eaa0..547f7ba946ff 100644 ---- a/fence/Makefile -+++ b/fence/Makefile -@@ -18,12 +18,10 @@ CFLAGS += -D_GNU_SOURCE -O2 -ggdb \ - -fstack-clash-protection -Wl,-z,now - - CFLAGS += -fPIE -DPIE --CFLAGS += `xml2-config --cflags` - CFLAGS += -I../include - CFLAGS += $(shell pkg-config --cflags pacemaker-fencing) - - LDFLAGS += -Wl,-z,relro -Wl,-z,defs -pie --LDFLAGS += `xml2-config --libs` - LDFLAGS += -ldl - - all: $(BIN_TARGET) --- -2.7.5 - diff --git a/SOURCES/0003-treewide-do-always-Wl-z-now-in-LDFLAGS.patch b/SOURCES/0003-treewide-do-always-Wl-z-now-in-LDFLAGS.patch deleted file mode 100644 index f6bf80f..0000000 --- a/SOURCES/0003-treewide-do-always-Wl-z-now-in-LDFLAGS.patch +++ /dev/null @@ -1,106 +0,0 @@ -From 681b54fd40b7a5e5c960bbd3e8aedca0fd4db575 Mon Sep 17 00:00:00 2001 -From: Alexander Aring -Date: Tue, 8 Feb 2022 14:42:53 -0500 -Subject: [PATCH 3/5] treewide: do always -Wl,-z,now in LDFLAGS - -This patch reverts commit 7bb5570a ("treewide: try to resolve symbols at -linking time") because the recommended way to avoid security related -issues is always to use -Wl,-z,now. - -This is solving the following annocheck failure: - -https://sourceware.org/annobin/annobin.html/Test-bind-now.html ---- - dlm_controld/Makefile | 6 +++--- - dlm_tool/Makefile | 4 ++-- - fence/Makefile | 4 ++-- - libdlm/Makefile | 7 +++---- - 4 files changed, 10 insertions(+), 11 deletions(-) - -diff --git a/dlm_controld/Makefile b/dlm_controld/Makefile -index 8cfc97e6909a..a92fdebe2cba 100644 ---- a/dlm_controld/Makefile -+++ b/dlm_controld/Makefile -@@ -43,15 +43,15 @@ CFLAGS += -D_GNU_SOURCE -O2 -ggdb \ - -Wno-sign-compare -Wno-unused-parameter -Wp,-D_FORTIFY_SOURCE=2 \ - -fexceptions -fasynchronous-unwind-tables -fdiagnostics-show-option \ - -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong \ -- -fstack-clash-protection -Wl,-z,now -+ -fstack-clash-protection - - BIN_CFLAGS += $(CFLAGS) -fPIE -DPIE - BIN_CFLAGS += -I../include -I../libdlm - LIB_CFLAGS += $(CFLAGS) -fPIC - --BIN_LDFLAGS += $(LDFLAGS) -Wl,-z,relro -Wl,-z,defs -pie -+BIN_LDFLAGS += $(LDFLAGS) -Wl,-z,relro -Wl,-z,now -pie - BIN_LDFLAGS += -lpthread -lrt -lcpg -lcmap -lcfg -lquorum -luuid --LIB_LDFLAGS += $(LDFLAGS) -Wl,-z,relro -Wl,-z,defs -pie -+LIB_LDFLAGS += $(LDFLAGS) -Wl,-z,relro -Wl,-z,now -pie - - PKG_CONFIG ?= pkg-config - ifeq ($(USE_SD_NOTIFY),yes) -diff --git a/dlm_tool/Makefile b/dlm_tool/Makefile -index 7b42638c0e4a..1c3d61d5c860 100644 ---- a/dlm_tool/Makefile -+++ b/dlm_tool/Makefile -@@ -15,12 +15,12 @@ CFLAGS += -D_GNU_SOURCE -O2 -ggdb \ - -Wno-sign-compare -Wno-unused-parameter -Wp,-D_FORTIFY_SOURCE=2 \ - -fexceptions -fasynchronous-unwind-tables -fdiagnostics-show-option \ - -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong \ -- -fstack-clash-protection -Wl,-z,now -+ -fstack-clash-protection - - CFLAGS += -fPIE -DPIE - CFLAGS += -I../include -I../libdlm -I../dlm_controld - --LDFLAGS += -Wl,-z,relro -Wl,-z,defs -pie -+LDFLAGS += -Wl,-z,relro -Wl,-z,now -pie - LDFLAGS += -L../libdlm -L../dlm_controld - LDFLAGS += -lpthread -ldlm -ldlmcontrol - -diff --git a/fence/Makefile b/fence/Makefile -index 547f7ba946ff..ee4dfb886d4c 100644 ---- a/fence/Makefile -+++ b/fence/Makefile -@@ -15,13 +15,13 @@ CFLAGS += -D_GNU_SOURCE -O2 -ggdb \ - -Wno-sign-compare -Wno-unused-parameter -Wp,-D_FORTIFY_SOURCE=2 \ - -fexceptions -fasynchronous-unwind-tables -fdiagnostics-show-option \ - -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong \ -- -fstack-clash-protection -Wl,-z,now -+ -fstack-clash-protection - - CFLAGS += -fPIE -DPIE - CFLAGS += -I../include - CFLAGS += $(shell pkg-config --cflags pacemaker-fencing) - --LDFLAGS += -Wl,-z,relro -Wl,-z,defs -pie -+LDFLAGS += -Wl,-z,relro -Wl,-z,now -pie - LDFLAGS += -ldl - - all: $(BIN_TARGET) -diff --git a/libdlm/Makefile b/libdlm/Makefile -index 313c2a08f17e..5069ccf1f7f9 100644 ---- a/libdlm/Makefile -+++ b/libdlm/Makefile -@@ -78,14 +78,13 @@ CFLAGS += -D_GNU_SOURCE -O2 -ggdb \ - -fexceptions \ - -fasynchronous-unwind-tables \ - -fdiagnostics-show-option \ -- -fPIC \ -- -Wl,-z,now -+ -fPIC - - LIB_CFLAGS += $(CFLAGS) -D_REENTRANT - LLT_CFLAGS += $(CFLAGS) - --LIB_LDFLAGS += $(LDFLAGS) -lpthread -Wl,-z,defs --LLT_LDFLAGS += $(LDFLAGS) -Wl,-z,defs -+LIB_LDFLAGS += $(LDFLAGS) -lpthread -Wl,-z,now -+LLT_LDFLAGS += $(LDFLAGS) -Wl,-z,now - - all: $(LIB_TARGET) $(LLT_TARGET) $(LIB_PC) $(LLT_PC) - --- -2.7.5 - diff --git a/SPECS/dlm.spec b/SPECS/dlm.spec index 250195c..1a53253 100644 --- a/SPECS/dlm.spec +++ b/SPECS/dlm.spec @@ -1,5 +1,5 @@ Name: dlm -Version: 4.1.1 +Version: 4.2.0 Release: 2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ # For a breakdown of the licensing, see README.license @@ -15,10 +15,7 @@ BuildRequires: systemd-devel BuildRequires: make Source0: https://releases.pagure.org/dlm/%{name}-%{version}.tar.gz -Patch0: 0001-dlm_controld-fix-printf-args-in-log-messages.patch -Patch1: 0002-stonith_helper-Don-t-link-dlm_stonith-against-libxml.patch -Patch2: 0003-treewide-do-always-Wl-z-now-in-LDFLAGS.patch - +Patch0: 0001-Revert-treewide-add-fcf-protection-full-to-CFLAGS.patch %if 0%{?rhel} && 0%{?rhel} <= 7 ExclusiveArch: i686 x86_64 @@ -38,8 +35,6 @@ The kernel dlm requires a user daemon to control membership. %prep %setup -q %patch0 -p1 -b .backup0 -%patch1 -p1 -b .backup1 -%patch2 -p1 -b .backup2 %build # upstream does not require configure @@ -104,6 +99,12 @@ developing applications that use %{name}. %{_libdir}/pkgconfig/*.pc %changelog +* Fri Oct 14 2022 David Teigland - 4.2.0-2 +- rebuild with tests + +* Wed Oct 12 2022 David Teigland - 4.2.0-1 +- new upstream version + * Tue Feb 15 2022 David Teigland - 4.1.1-2 - compiler warnings and makefile flags