summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXiangyu Chen <xiangyu.chen@windriver.com>2024-03-01 12:53:38 +0800
committerKhem Raj <raj.khem@gmail.com>2024-03-02 19:48:04 -0800
commitaf83891477092b1d9fed875f1e57ed92a8283b5c (patch)
treedb1ee6944a485d36646eb069322d0bc42de067b2
parent40cfae8d4e9d280932274cf814195ae73309b860 (diff)
downloadmeta-openembedded-af83891477092b1d9fed875f1e57ed92a8283b5c.tar.gz
drbd-utils: upgrade 9.22.0 -> 9.27.0
rebased patches: 0001-drbd-utils-support-usrmerge.patch 0001-drbdmon-add-LDFLAGS-when-linking.patch removed patches that already in upstream code repository 0001-replace-off64_t-with-off_t.patch 0002-drbdadm-drop-use-of-GLOB_MAGCHAR-use-strchr-heuristi.patch add keyutils depends Change log ========== 9.27.0 * adjust,v9: retry for diskless primaries * tests: sanitize env (e.g., TZ) * drbdmeta: dump and restore the members field 9.26.0 * config,v9: new config option load-balance-paths * config,v9: new config options rdma-ctrls-(snd|rcv)buf-size * drbdadm,v9: fix segfault if proxy has no path * drbd: increase maximum CPU mask size * systemd: introduce drbd-graceful-shutdown.service * drbdmeta,v9: fix regression, allow attach after offline resize * drbdsetup,v9: add path established information to JSON status * events2: terminate on module unload even under --poll * events2: specif exit code if module unload * docs: add spdx license file * drbdmon: various smaller improvements * drbdsetup,v9: support for TLS/kTLS 9.25.0 * drbdsetup,v9,show: fix meta disk format for json * drbdmon: various updates * build: fix RHEL6 spec builds * drbdmeta: {hex,}dump superblock * drbdmon: major rewrite * build: gcc v12 cleanups * misc: put locks into separate dir * selinux: add fowner fsetsid, they dropped a global noaudit rule 9.24.0 * windrbd: various fixes * v9: Support user-defined block-size * doc,v9: improvements all over the place * drbdadm,v9: implement drbdadm role <res:peer> * drbdadm,v9: pass --verbose/--statistics to drbdsetup status * drbd{adm,meta}: add repair-md subcommand 9.23.1 * drbdadm,v9,resync-after: fix too strict check 9.23.0 * drbdadm,v9,floating: fixup fake uname for 9.2.x strict_names=1 * drbdadm,v9,parser: fixup globs, also rm GNU libc specific extensions * drbdadm,v9,parser: allow via outside-address for NATed peers Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-networking/recipes-support/drbd/drbd-utils/0001-drbd-utils-support-usrmerge.patch17
-rw-r--r--meta-networking/recipes-support/drbd/drbd-utils/0001-drbdmon-add-LDFLAGS-when-linking.patch14
-rw-r--r--meta-networking/recipes-support/drbd/drbd-utils/0001-replace-off64_t-with-off_t.patch48
-rw-r--r--meta-networking/recipes-support/drbd/drbd-utils/0002-drbdadm-drop-use-of-GLOB_MAGCHAR-use-strchr-heuristi.patch96
-rw-r--r--meta-networking/recipes-support/drbd/drbd-utils_9.27.0.bb (renamed from meta-networking/recipes-support/drbd/drbd-utils_9.22.0.bb)8
5 files changed, 18 insertions, 165 deletions
diff --git a/meta-networking/recipes-support/drbd/drbd-utils/0001-drbd-utils-support-usrmerge.patch b/meta-networking/recipes-support/drbd/drbd-utils/0001-drbd-utils-support-usrmerge.patch
index 4e1f68be0..27f0a9b54 100644
--- a/meta-networking/recipes-support/drbd/drbd-utils/0001-drbd-utils-support-usrmerge.patch
+++ b/meta-networking/recipes-support/drbd/drbd-utils/0001-drbd-utils-support-usrmerge.patch
@@ -1,4 +1,4 @@
1From 69011c7227ad1aaf08d5ab28e46f85dac951c597 Mon Sep 17 00:00:00 2001 1From 264ae7b062ac52a5545a8a562b51001f7ce7369d Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com> 2From: Changqing Li <changqing.li@windriver.com>
3Date: Thu, 21 Apr 2022 17:22:35 +0800 3Date: Thu, 21 Apr 2022 17:22:35 +0800
4Subject: [PATCH] drbd-utils: support usermerge 4Subject: [PATCH] drbd-utils: support usermerge
@@ -21,10 +21,10 @@ Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
21 10 files changed, 32 insertions(+), 32 deletions(-) 21 10 files changed, 32 insertions(+), 32 deletions(-)
22 22
23diff --git a/configure.ac b/configure.ac 23diff --git a/configure.ac b/configure.ac
24index ae575586..3d7deeae 100644 24index f1d69ea3..3289ac7d 100644
25--- a/configure.ac 25--- a/configure.ac
26+++ b/configure.ac 26+++ b/configure.ac
27@@ -180,7 +180,7 @@ AC_ARG_WITH(tmpfilesdir, 27@@ -183,7 +183,7 @@ AC_ARG_WITH(tmpfilesdir,
28 AC_SUBST(tmpfilesdir) 28 AC_SUBST(tmpfilesdir)
29 29
30 # set default early 30 # set default early
@@ -34,12 +34,12 @@ index ae575586..3d7deeae 100644
34 test x"$with_udev" = xyes ; then 34 test x"$with_udev" = xyes ; then
35 if test x"$PKG_CONFIG" != x; then 35 if test x"$PKG_CONFIG" != x; then
36diff --git a/scripts/Makefile.in b/scripts/Makefile.in 36diff --git a/scripts/Makefile.in b/scripts/Makefile.in
37index fcd298e9..bab441a5 100644 37index aca15a22..a1cd2ffe 100644
38--- a/scripts/Makefile.in 38--- a/scripts/Makefile.in
39+++ b/scripts/Makefile.in 39+++ b/scripts/Makefile.in
40@@ -88,11 +88,11 @@ ifeq ($(subst both,systemd,$(initscripttype)),systemd) 40@@ -91,11 +91,11 @@ ifeq ($(subst both,systemd,$(initscripttype)),systemd)
41 install -d $(DESTDIR)$(systemdunitdir) 41 install -d $(DESTDIR)$(systemdunitdir)
42 install -m 644 drbd.service $(DESTDIR)$(systemdunitdir)/ 42 install -m 644 $(SYSTEMD_UNITS) $(DESTDIR)$(systemdunitdir)/
43 install -m 644 $(SYSTEMD_TEMPLATES) $(DESTDIR)$(systemdunitdir)/ 43 install -m 644 $(SYSTEMD_TEMPLATES) $(DESTDIR)$(systemdunitdir)/
44- install -d $(DESTDIR)/lib/drbd/scripts 44- install -d $(DESTDIR)/lib/drbd/scripts
45- install -m 755 drbd $(DESTDIR)/lib/drbd/scripts 45- install -m 755 drbd $(DESTDIR)/lib/drbd/scripts
@@ -110,7 +110,7 @@ index 96c599e7..c81e95a6 100644
110 [Install] 110 [Install]
111 WantedBy=multi-user.target 111 WantedBy=multi-user.target
112diff --git a/scripts/drbd@.service b/scripts/drbd@.service 112diff --git a/scripts/drbd@.service b/scripts/drbd@.service
113index 76514c5b..e2e500ba 100644 113index 0fad10be..556f3857 100644
114--- a/scripts/drbd@.service 114--- a/scripts/drbd@.service
115+++ b/scripts/drbd@.service 115+++ b/scripts/drbd@.service
116@@ -35,8 +35,8 @@ RemainAfterExit=yes 116@@ -35,8 +35,8 @@ RemainAfterExit=yes
@@ -199,6 +199,3 @@ index 0fcefc5f..81f7d5ec 100644
199 199
200 spell: 200 spell:
201 for f in drbdadm_adjust.c drbdadm_main.c drbdadm_parser.c drbdadm_usage_cnt.c drbdsetup.c drbdtool_common.c; do \ 201 for f in drbdadm_adjust.c drbdadm_main.c drbdadm_parser.c drbdadm_usage_cnt.c drbdsetup.c drbdtool_common.c; do \
202--
2032.25.1
204
diff --git a/meta-networking/recipes-support/drbd/drbd-utils/0001-drbdmon-add-LDFLAGS-when-linking.patch b/meta-networking/recipes-support/drbd/drbd-utils/0001-drbdmon-add-LDFLAGS-when-linking.patch
index 0bf4b2fce..c7766067a 100644
--- a/meta-networking/recipes-support/drbd/drbd-utils/0001-drbdmon-add-LDFLAGS-when-linking.patch
+++ b/meta-networking/recipes-support/drbd/drbd-utils/0001-drbdmon-add-LDFLAGS-when-linking.patch
@@ -1,15 +1,17 @@
1From a61b9ff2d2cb7387a5cd347b2201535ee45a46ee Mon Sep 17 00:00:00 2001 1From bb044160faf4ae7615ddfdb17641dd88c33cde57 Mon Sep 17 00:00:00 2001
2From: Sakib Sajal <sakib.sajal@windriver.com> 2From: Sakib Sajal <sakib.sajal@windriver.com>
3Date: Thu, 31 Mar 2022 15:09:58 -0400 3Date: Thu, 31 Mar 2022 15:09:58 -0400
4Subject: [PATCH] drbdmon: add LDFLAGS when linking 4Subject: [PATCH] drbdmon: add LDFLAGS when linking
5 5
6Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
7---
8Upstream-Status: Pending 6Upstream-Status: Pending
9 7
10 user/drbdmon/Makefile.in | 2 +- 8Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
11 1 file changed, 1 insertion(+), 1 deletion(-) 9---
10 user/drbdmon/Makefile.in | 4 ++--
11 1 file changed, 2 insertions(+), 2 deletions(-)
12 12
13diff --git a/user/drbdmon/Makefile.in b/user/drbdmon/Makefile.in
14index 7bd8987e..115a81b8 100644
13--- a/user/drbdmon/Makefile.in 15--- a/user/drbdmon/Makefile.in
14+++ b/user/drbdmon/Makefile.in 16+++ b/user/drbdmon/Makefile.in
15@@ -1,6 +1,6 @@ 17@@ -1,6 +1,6 @@
@@ -20,7 +22,7 @@ Upstream-Status: Pending
20 CXX = @CXX@ 22 CXX = @CXX@
21 LIBS = @LIBS@ 23 LIBS = @LIBS@
22 24
23@@ -51,7 +51,7 @@ $(dsaext-obj): $(basename $(dsaext-obj)) 25@@ -72,7 +72,7 @@ $(dsaext-obj): $(basename $(dsaext-obj)).cpp $(basename $(dsaext-obj)).h
24 $(integerparse-obj): $(basename $(integerparse-obj)).cpp $(basename $(integerparse-obj)).h 26 $(integerparse-obj): $(basename $(integerparse-obj)).cpp $(basename $(integerparse-obj)).h
25 27
26 drbdmon: $(ls-obj) 28 drbdmon: $(ls-obj)
diff --git a/meta-networking/recipes-support/drbd/drbd-utils/0001-replace-off64_t-with-off_t.patch b/meta-networking/recipes-support/drbd/drbd-utils/0001-replace-off64_t-with-off_t.patch
deleted file mode 100644
index 2841d0fea..000000000
--- a/meta-networking/recipes-support/drbd/drbd-utils/0001-replace-off64_t-with-off_t.patch
+++ /dev/null
@@ -1,48 +0,0 @@
1From 5adae6737e919d957a08df437951ccb6996f9882 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 21 Dec 2022 19:16:03 -0800
4Subject: [PATCH 1/2] replace off64_t with off_t
5
6off_t is already 64-bits when _FILE_OFFSET_BITS=64
7using off_t also makes it portable on musl systems
8
9Upstream-Status: Pending
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 user/v9/drbdadm_main.c | 10 +++++-----
13 1 file changed, 5 insertions(+), 5 deletions(-)
14
15diff --git a/user/v9/drbdadm_main.c b/user/v9/drbdadm_main.c
16index 91e9507d..2030946c 100644
17--- a/user/v9/drbdadm_main.c
18+++ b/user/v9/drbdadm_main.c
19@@ -1264,11 +1264,11 @@ static int adm_resource(const struct cfg_ctx *ctx)
20 return ex;
21 }
22
23-static off64_t read_drbd_dev_size(int minor)
24+static off_t read_drbd_dev_size(int minor)
25 {
26 char *path;
27 FILE *file;
28- off64_t val;
29+ off_t val;
30 int r;
31
32 m_asprintf(&path, "/sys/block/drbd%d/size", minor);
33@@ -1289,9 +1289,9 @@ int adm_resize(const struct cfg_ctx *ctx)
34 char *argv[MAX_ARGS];
35 struct d_option *opt;
36 bool is_resize = !strcmp(ctx->cmd->name, "resize");
37- off64_t old_size = -1;
38- off64_t target_size = 0;
39- off64_t new_size;
40+ off_t old_size = -1;
41+ off_t target_size = 0;
42+ off_t new_size;
43 int argc = 0;
44 int silent;
45 int ex;
46--
472.39.0
48
diff --git a/meta-networking/recipes-support/drbd/drbd-utils/0002-drbdadm-drop-use-of-GLOB_MAGCHAR-use-strchr-heuristi.patch b/meta-networking/recipes-support/drbd/drbd-utils/0002-drbdadm-drop-use-of-GLOB_MAGCHAR-use-strchr-heuristi.patch
deleted file mode 100644
index 45f7d6d41..000000000
--- a/meta-networking/recipes-support/drbd/drbd-utils/0002-drbdadm-drop-use-of-GLOB_MAGCHAR-use-strchr-heuristi.patch
+++ /dev/null
@@ -1,96 +0,0 @@
1From b70e5bf5bfa5fa2c2fffe08bcf300da1d3583602 Mon Sep 17 00:00:00 2001
2From: Lars Ellenberg <lars.ellenberg@linbit.com>
3Date: Wed, 9 Nov 2022 11:01:54 +0100
4Subject: [PATCH 2/2] drbdadm: drop use of GLOB_MAGCHAR, use strchr heuristic only
5
6Fixup for
72022-09-05 4a1b5900 drbdadm: allow files from an expanded include glob to vanish
8
9When using the `include` statement, if the glob did not match any file,
10there is nothing to do, silently ignore. Unless it was no glob, but a literal,
11which we would expect to exist.
12
13Also, there is a race between expanding a glob and accessing the file.
14That also should not happen for literals, though.
15
16Since we still had the heuristic anyways, because apparently |GLOB_MAGCHAR
17does not happen for GLOB_NOMATCH returns, and there exist non-GNU libc that
18don't (and likely won't) implement that extension, just forget about
19(gl_flags & GLOB_MAGCHAR) but use the incomplete strchr heuristic only.
20
21Sourced From Alpine: https://git.alpinelinux.org/aports/tree/main/drbd-utils/drop_use_of_GLOB_MAGCHAR.patch
22
23Upstream-Status: Pending
24Signed-off-by: Khem Raj <raj.khem@gmail.com>
25---
26 user/v9/drbdadm_parser.c | 35 ++++++++++++++++++++---------------
27 1 file changed, 20 insertions(+), 15 deletions(-)
28
29diff --git a/user/v9/drbdadm_parser.c b/user/v9/drbdadm_parser.c
30index b2f6ed8a..9a0a775d 100644
31--- a/user/v9/drbdadm_parser.c
32+++ b/user/v9/drbdadm_parser.c
33@@ -1947,14 +1947,29 @@ void include_stmt(char *str)
34 size_t i;
35 int r;
36
37- cwd = pushd_to_current_config_file_unless_stdin();
38-
39- /* """
40+ /*
41+ * If the glob did not match any file,
42+ * there is nothing to do, silently ignore.
43+ * Unless it was no glob, but a literal,
44+ * which we would expect to exist.
45+ *
46+ * """
47 * As a GNU extension, pglob->gl_flags is set to the
48 * flags specified, ored with GLOB_MAGCHAR if any
49 * metacharacters were found.
50 * """
51+ *
52+ * But apparently |GLOB_MAGCHAR does not happen for GLOB_NOMATCH returns,
53+ * at least not consistently :-(
54+ * Also, there exist non-GNU libc
55+ * So we have this incomplete strchr heuristic anyways.
56 */
57+ bool contains_glob_magic_char =
58+ strchr(str, '*') ||
59+ strchr(str, '?') ||
60+ strchr(str, '[');
61+
62+ cwd = pushd_to_current_config_file_unless_stdin();
63 r = glob(str, 0, NULL, &glob_buf);
64 if (r == 0) {
65 for (i=0; i<glob_buf.gl_pathc; i++) {
66@@ -1965,7 +1980,7 @@ void include_stmt(char *str)
67 if (f) {
68 include_file(f, strdup(glob_buf.gl_pathv[i]));
69 fclose(f);
70- } else if (errno == ENOENT && glob_buf.gl_flags & GLOB_MAGCHAR) {
71+ } else if (errno == ENOENT && contains_glob_magic_char) {
72 /* Noisily ignore race between glob expansion
73 * and actual open. */
74 err("%s:%d: include file vanished after glob expansion '%s'.\n",
75@@ -1979,17 +1994,7 @@ void include_stmt(char *str)
76 }
77 globfree(&glob_buf);
78 } else if (r == GLOB_NOMATCH) {
79- /*
80- * If the glob did not match any file,
81- * there is nothing to do, silently ignore.
82- * Unless it was no glob, but a literal,
83- * which we would expect to exist.
84- * Apparently |GLOB_MAGCHAR does not happen for GLOB_NOMATCH returns,
85- * at least not consistently :-(
86- * So we have this strchr heuristic anyways.
87- */
88- /* if (!(glob_buf.gl_flags & GLOB_MAGCHAR)) { */
89- if (!strchr(str, '?') && !strchr(str, '*') && !strchr(str, '[')) {
90+ if (!contains_glob_magic_char) {
91 err("%s:%d: Failed to open include file '%s'.\n",
92 config_save, line, str);
93 config_valid = 0;
94--
952.39.0
96
diff --git a/meta-networking/recipes-support/drbd/drbd-utils_9.22.0.bb b/meta-networking/recipes-support/drbd/drbd-utils_9.27.0.bb
index 89bf52916..c50d32622 100644
--- a/meta-networking/recipes-support/drbd/drbd-utils_9.22.0.bb
+++ b/meta-networking/recipes-support/drbd/drbd-utils_9.27.0.bb
@@ -11,12 +11,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=5574c6965ae5f583e55880e397fbb018"
11SRC_URI = "git://github.com/LINBIT/drbd-utils;name=drbd-utils;branch=master;protocol=https \ 11SRC_URI = "git://github.com/LINBIT/drbd-utils;name=drbd-utils;branch=master;protocol=https \
12 git://github.com/LINBIT/drbd-headers;name=drbd-headers;destsuffix=git/drbd-headers;branch=master;protocol=https \ 12 git://github.com/LINBIT/drbd-headers;name=drbd-headers;destsuffix=git/drbd-headers;branch=master;protocol=https \
13 file://0001-drbdmon-add-LDFLAGS-when-linking.patch \ 13 file://0001-drbdmon-add-LDFLAGS-when-linking.patch \
14 file://0001-replace-off64_t-with-off_t.patch \
15 ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','file://0001-drbd-utils-support-usrmerge.patch','',d)} \ 14 ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','file://0001-drbd-utils-support-usrmerge.patch','',d)} \
16 " 15 "
17SRC_URI:append:libc-musl = " file://0002-drbdadm-drop-use-of-GLOB_MAGCHAR-use-strchr-heuristi.patch " 16SRCREV_drbd-utils = "fdd9a4d603a9dc99d110d8bd0e288d7c0b6f586e"
18SRCREV_drbd-utils = "409097fe02187f83790b88ac3e0d94f3c167adab" 17SRCREV_drbd-headers = "0349f00825b4198d4ec3248f43884114a187676a"
19SRCREV_drbd-headers = "9a0f151fa0085f57910a2dcbbd658d6069554f62"
20 18
21SRCREV_FORMAT = "drbd-utils_drbd-headers" 19SRCREV_FORMAT = "drbd-utils_drbd-headers"
22 20
@@ -27,7 +25,7 @@ UPSTREAM_CHECK_URI = "https://github.com/LINBIT/drbd-utils/releases"
27SYSTEMD_SERVICE:${PN} = "drbd.service" 25SYSTEMD_SERVICE:${PN} = "drbd.service"
28SYSTEMD_AUTO_ENABLE = "disable" 26SYSTEMD_AUTO_ENABLE = "disable"
29 27
30DEPENDS = "flex-native" 28DEPENDS = "flex-native keyutils"
31 29
32inherit autotools-brokensep systemd 30inherit autotools-brokensep systemd
33 31