Compare commits
11 Commits
ea7b6ddbd2
...
a3c3209d5b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a3c3209d5b | ||
|
|
d8774863e5 | ||
|
|
a1f650725d | ||
|
|
ea766e1139 | ||
|
|
3b94631788 | ||
|
|
6827b881e9 | ||
|
|
58f48f6a60 | ||
|
|
9d645a9048 | ||
|
|
cb366d910d | ||
|
|
5019e7cb75 | ||
|
|
259bd39764 |
37
build-dlm_controld-disable-annobin-plugin.patch
Normal file
37
build-dlm_controld-disable-annobin-plugin.patch
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
From 346f9e3dd25cbdc2a45b9d97720405daf2696e04 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Fabio M. Di Nitto <fdinitto@redhat.com>
|
||||||
|
Date: Apr 18 2023 05:31:00 +0000
|
||||||
|
Subject: build: dlm_controld disable annobin plugin
|
||||||
|
|
||||||
|
|
||||||
|
annobin plugin is not universally available and has several
|
||||||
|
prerequisite before it can be enabled.
|
||||||
|
|
||||||
|
For reference:
|
||||||
|
https://github.com/kronosnet/kronosnet/commit/9a8fd89bf52c8381f7c46f427a024eb3d70d0ccf
|
||||||
|
https://github.com/kronosnet/kronosnet/commit/e95bd0d2d1b996894f76e12716c66a3bbc637cc6
|
||||||
|
|
||||||
|
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
|
||||||
|
|
||||||
|
---
|
||||||
|
dlm_controld/Makefile | 4 +++-
|
||||||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/dlm_controld/Makefile b/dlm_controld/Makefile
|
||||||
|
index 2d37975..76f4b39 100644
|
||||||
|
--- a/dlm_controld/Makefile
|
||||||
|
+++ b/dlm_controld/Makefile
|
||||||
|
@@ -47,7 +47,9 @@ CFLAGS += -D_GNU_SOURCE -O2 -ggdb \
|
||||||
|
|
||||||
|
BIN_CFLAGS += $(CFLAGS) -fPIE -DPIE
|
||||||
|
BIN_CFLAGS += -I../include -I../libdlm
|
||||||
|
-LIB_CFLAGS += $(CFLAGS) -fPIC -fplugin=annobin
|
||||||
|
+LIB_CFLAGS += $(CFLAGS) -fPIC
|
||||||
|
+# Temporary disable annobin plugin
|
||||||
|
+# LIB_CFLAGS += -fplugin=annobin
|
||||||
|
|
||||||
|
BIN_LDFLAGS += $(LDFLAGS) -Wl,-z,relro -Wl,-z,now -pie
|
||||||
|
BIN_LDFLAGS += -lpthread -lrt -lcpg -lcmap -lcfg -lquorum -luuid
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
31
dlm.spec
31
dlm.spec
@ -1,6 +1,6 @@
|
|||||||
Name: dlm
|
Name: dlm
|
||||||
Version: 4.2.0
|
Version: 4.2.0
|
||||||
Release: 4
|
Release: 9
|
||||||
License: GPLv2 and GPLv2+ and LGPLv2+
|
License: GPLv2 and GPLv2+ and LGPLv2+
|
||||||
Group: System Environment/Kernel
|
Group: System Environment/Kernel
|
||||||
Summary: dlm control daemon and tool
|
Summary: dlm control daemon and tool
|
||||||
@ -12,10 +12,16 @@ BuildRequires: libxml2-devel
|
|||||||
BuildRequires: systemd-units
|
BuildRequires: systemd-units
|
||||||
BuildRequires: systemd-devel
|
BuildRequires: systemd-devel
|
||||||
BuildRequires: annobin
|
BuildRequires: annobin
|
||||||
Source0: https://releases.pagure.org/dlm/%{name}-%{version}.tar.gz
|
Source0: https://releases.pagure.org/dlm/%{name}-%{version}.tar.gz
|
||||||
Patch0001: 0030-dlm_controld-remove-unnecessary-header-include.patch
|
Patch0001: 0030-dlm_controld-remove-unnecessary-header-include.patch
|
||||||
Patch0002: fix-various-deadcode-issues.patch
|
Patch0002: fix-various-deadcode-issues.patch
|
||||||
Patch0003: Revert-treewide-add-fcf-protection-full-to-CFLAGS.patch
|
Patch0003: update-Linux-kernel-implementations.patch
|
||||||
|
Patch0004: Revert-treewide-add-fcf-protection-full-to-CFLAGS.patch
|
||||||
|
Patch0005: build-dlm_controld-disable-annobin-plugin.patch
|
||||||
|
Patch0006: dlm_tool-fix-missing-fclose-calls.patch
|
||||||
|
Patch0007: dlm_controld-be-sure-we-stop-lockspaces-before-shutdown.patch
|
||||||
|
Patch0008: libdlm_lt-fix-pc-file.patch
|
||||||
|
|
||||||
Requires: %{name}-lib = %{version}-%{release}
|
Requires: %{name}-lib = %{version}-%{release}
|
||||||
Requires: corosync >= 3.1.0
|
Requires: corosync >= 3.1.0
|
||||||
Requires(post): systemd-units
|
Requires(post): systemd-units
|
||||||
@ -98,9 +104,24 @@ install -Dm 0644 init/dlm.sysconfig %{buildroot}/etc/sysconfig/dlm
|
|||||||
%{_libdir}/pkgconfig/*.pc
|
%{_libdir}/pkgconfig/*.pc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Mar 06 2024 zouzhimin <zouzhimin@kylinos.cn> - 4.2.0-4
|
* Mon May 13 2024 zouzhimin <zouzhimin@kylinos.cn> - 4.2.0-9
|
||||||
|
- libdlm_lt: fix pc file
|
||||||
|
|
||||||
|
* Mon May 06 2024 zouzhimin <zouzhimin@kylinos.cn> - 4.2.0-8
|
||||||
|
- dlm_controld: be sure we stop lockspaces before shutdown and add yaml file
|
||||||
|
|
||||||
|
* Mon Apr 29 2024 zouzhimin <zouzhimin@kylinos.cn> - 4.2.0-7
|
||||||
|
- dlm_tool: fix missing fclose calls
|
||||||
|
|
||||||
|
* Fri Mar 08 2024 zouzhimin <zouzhimin@kylinos.cn> - 4.2.0-6
|
||||||
|
- build: dlm_controld disable annobin plugin
|
||||||
|
|
||||||
|
* Wed Mar 06 2024 zouzhimin <zouzhimin@kylinos.cn> - 4.2.0-5
|
||||||
- Revert "treewide: add -fcf-protection=full to CFLAGS"
|
- Revert "treewide: add -fcf-protection=full to CFLAGS"
|
||||||
|
|
||||||
|
* Tue Mar 05 2024 zouzhimin <zouzhimin@kylinos.cn> - 4.2.0-4
|
||||||
|
- dlm_controld: update Linux kernel implementations
|
||||||
|
|
||||||
* Mon Mar 04 2024 laokz <zhangkai@iscas.ac.cn> - 4.2.0-3
|
* Mon Mar 04 2024 laokz <zhangkai@iscas.ac.cn> - 4.2.0-3
|
||||||
- riscv64: remove -fcf-protection
|
- riscv64: remove -fcf-protection
|
||||||
|
|
||||||
|
|||||||
4
dlm.yaml
Normal file
4
dlm.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
version_control: git
|
||||||
|
src_repo: https://pagure.io/dlm.git
|
||||||
|
tag_prefix: ^
|
||||||
|
seperator: .
|
||||||
@ -0,0 +1,54 @@
|
|||||||
|
From e74cc7ee33481dd31d4149b8d8af1b5e364f6294 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alexander Aring <aahringo@redhat.com>
|
||||||
|
Date: Thu, 23 Feb 2023 10:36:12 -0500
|
||||||
|
Subject: [PATCH] dlm_controld: be sure we stop lockspaces before shutdown
|
||||||
|
|
||||||
|
The dlm_controld shutdown process will drop all dlm configfs entries of
|
||||||
|
dlm communication settings regarding corosync address configuration.
|
||||||
|
This will end in an socket close in the dlm subsystem of the connection
|
||||||
|
which belongs to it. Newly introduced kernel warnings will check if the
|
||||||
|
lockspace is stopped before we close the socket connection. This is
|
||||||
|
necessary because no new dlm messages should be triggered afterwards. To
|
||||||
|
be sure dlm_controld does stop the lockspaces we will make sure that it
|
||||||
|
does it always in close_cpg_daemon. Currently there is a missing handle
|
||||||
|
to stop all lockspaces when there is no cpg_handle_daemon anymore.
|
||||||
|
---
|
||||||
|
dlm_controld/daemon_cpg.c | 14 +++++++++++++-
|
||||||
|
1 file changed, 13 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/dlm_controld/daemon_cpg.c b/dlm_controld/daemon_cpg.c
|
||||||
|
index 2e0634d4..10c80ddc 100644
|
||||||
|
--- a/dlm_controld/daemon_cpg.c
|
||||||
|
+++ b/dlm_controld/daemon_cpg.c
|
||||||
|
@@ -2527,6 +2527,15 @@ int setup_cpg_daemon(void)
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
+static void stop_lockspaces(void)
|
||||||
|
+{
|
||||||
|
+ struct lockspace *ls;
|
||||||
|
+
|
||||||
|
+ list_for_each_entry(ls, &lockspaces, list) {
|
||||||
|
+ cpg_stop_kernel(ls);
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
void close_cpg_daemon(void)
|
||||||
|
{
|
||||||
|
struct lockspace *ls;
|
||||||
|
@@ -2534,8 +2543,11 @@ void close_cpg_daemon(void)
|
||||||
|
struct cpg_name name;
|
||||||
|
int i = 0;
|
||||||
|
|
||||||
|
- if (!cpg_handle_daemon)
|
||||||
|
+ if (!cpg_handle_daemon) {
|
||||||
|
+ stop_lockspaces();
|
||||||
|
return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if (cluster_down)
|
||||||
|
goto fin;
|
||||||
|
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
||||||
47
dlm_tool-fix-missing-fclose-calls.patch
Normal file
47
dlm_tool-fix-missing-fclose-calls.patch
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
From e5ca08c20e6f530bfb95db67cbd62e6958f9af26 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alexander Aring <aahringo@redhat.com>
|
||||||
|
Date: Thu, 30 Mar 2023 15:21:58 -0400
|
||||||
|
Subject: [PATCH] dlm_tool: fix missing fclose calls
|
||||||
|
|
||||||
|
This patch will fix missing fclose() calls when fgets() of do_lockdump()
|
||||||
|
fails.
|
||||||
|
---
|
||||||
|
dlm_tool/main.c | 8 +++++---
|
||||||
|
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/dlm_tool/main.c b/dlm_tool/main.c
|
||||||
|
index 52fd5b89..2e6810d6 100644
|
||||||
|
--- a/dlm_tool/main.c
|
||||||
|
+++ b/dlm_tool/main.c
|
||||||
|
@@ -1177,8 +1177,9 @@ static void do_lockdump(char *name)
|
||||||
|
}
|
||||||
|
|
||||||
|
/* skip the header on the first line */
|
||||||
|
- if (!fgets(line, LOCK_LINE_MAX, file))
|
||||||
|
- return;
|
||||||
|
+ if (!fgets(line, LOCK_LINE_MAX, file)) {
|
||||||
|
+ goto out;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
while (fgets(line, LOCK_LINE_MAX, file)) {
|
||||||
|
rv = sscanf(line, "%x %d %x %u %llu %x %x %hhd %hhd %hhd %u %d %d",
|
||||||
|
@@ -1199,7 +1200,7 @@ static void do_lockdump(char *name)
|
||||||
|
if (rv != 13) {
|
||||||
|
fprintf(stderr, "invalid debugfs line %d: %s\n",
|
||||||
|
rv, line);
|
||||||
|
- return;
|
||||||
|
+ goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
memset(r_name, 0, sizeof(r_name));
|
||||||
|
@@ -1229,6 +1230,7 @@ static void do_lockdump(char *name)
|
||||||
|
ownpid, nodeid, r_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ out:
|
||||||
|
fclose(file);
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
||||||
25
libdlm_lt-fix-pc-file.patch
Normal file
25
libdlm_lt-fix-pc-file.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From f1b2adb5b76c2ba80ddfb84a9929ef7bbb9768ef Mon Sep 17 00:00:00 2001
|
||||||
|
From: David Teigland <teigland@redhat.com>
|
||||||
|
Date: Fri, 17 Feb 2023 10:07:12 -0600
|
||||||
|
Subject: [PATCH] libdlm_lt: fix pc file
|
||||||
|
|
||||||
|
---
|
||||||
|
libdlm/Makefile | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/libdlm/Makefile b/libdlm/Makefile
|
||||||
|
index 5069ccf1..918fb46e 100644
|
||||||
|
--- a/libdlm/Makefile
|
||||||
|
+++ b/libdlm/Makefile
|
||||||
|
@@ -108,7 +108,7 @@ $(LIB_PC): $(LIB_PCIN)
|
||||||
|
cat $(LIB_PCIN) | sed -e 's#@PREFIX@#$(PREFIX)#g;s#@LIBDIR@#$(LIBDIR)#g' > $@
|
||||||
|
|
||||||
|
$(LLT_PC): $(LLT_PCIN)
|
||||||
|
- cat $(LIB_PCIN) | sed -e 's#@PREFIX@#$(PREFIX)#g;s#@LIBDIR@#$(LIBDIR)#g' > $@
|
||||||
|
+ cat $(LLT_PCIN) | sed -e 's#@PREFIX@#$(PREFIX)#g;s#@LIBDIR@#$(LIBDIR)#g' > $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *.o *.so *.so.* *.a *.pc
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
||||||
2687
update-Linux-kernel-implementations.patch
Normal file
2687
update-Linux-kernel-implementations.patch
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user