From af83891477092b1d9fed875f1e57ed92a8283b5c Mon Sep 17 00:00:00 2001 From: Xiangyu Chen Date: Fri, 1 Mar 2024 12:53:38 +0800 Subject: 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 * 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 Signed-off-by: Khem Raj --- .../0001-drbd-utils-support-usrmerge.patch | 17 ++-- .../0001-drbdmon-add-LDFLAGS-when-linking.patch | 14 ++-- .../0001-replace-off64_t-with-off_t.patch | 48 ----------- ...p-use-of-GLOB_MAGCHAR-use-strchr-heuristi.patch | 96 ---------------------- .../recipes-support/drbd/drbd-utils_9.22.0.bb | 74 ----------------- .../recipes-support/drbd/drbd-utils_9.27.0.bb | 72 ++++++++++++++++ 6 files changed, 87 insertions(+), 234 deletions(-) delete mode 100644 meta-networking/recipes-support/drbd/drbd-utils/0001-replace-off64_t-with-off_t.patch delete mode 100644 meta-networking/recipes-support/drbd/drbd-utils/0002-drbdadm-drop-use-of-GLOB_MAGCHAR-use-strchr-heuristi.patch delete mode 100644 meta-networking/recipes-support/drbd/drbd-utils_9.22.0.bb create mode 100644 meta-networking/recipes-support/drbd/drbd-utils_9.27.0.bb (limited to 'meta-networking') 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 4e1f68be09..27f0a9b54a 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 @@ -From 69011c7227ad1aaf08d5ab28e46f85dac951c597 Mon Sep 17 00:00:00 2001 +From 264ae7b062ac52a5545a8a562b51001f7ce7369d Mon Sep 17 00:00:00 2001 From: Changqing Li Date: Thu, 21 Apr 2022 17:22:35 +0800 Subject: [PATCH] drbd-utils: support usermerge @@ -21,10 +21,10 @@ Signed-off-by: Sakib Sajal 10 files changed, 32 insertions(+), 32 deletions(-) diff --git a/configure.ac b/configure.ac -index ae575586..3d7deeae 100644 +index f1d69ea3..3289ac7d 100644 --- a/configure.ac +++ b/configure.ac -@@ -180,7 +180,7 @@ AC_ARG_WITH(tmpfilesdir, +@@ -183,7 +183,7 @@ AC_ARG_WITH(tmpfilesdir, AC_SUBST(tmpfilesdir) # set default early @@ -34,12 +34,12 @@ index ae575586..3d7deeae 100644 test x"$with_udev" = xyes ; then if test x"$PKG_CONFIG" != x; then diff --git a/scripts/Makefile.in b/scripts/Makefile.in -index fcd298e9..bab441a5 100644 +index aca15a22..a1cd2ffe 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in -@@ -88,11 +88,11 @@ ifeq ($(subst both,systemd,$(initscripttype)),systemd) +@@ -91,11 +91,11 @@ ifeq ($(subst both,systemd,$(initscripttype)),systemd) install -d $(DESTDIR)$(systemdunitdir) - install -m 644 drbd.service $(DESTDIR)$(systemdunitdir)/ + install -m 644 $(SYSTEMD_UNITS) $(DESTDIR)$(systemdunitdir)/ install -m 644 $(SYSTEMD_TEMPLATES) $(DESTDIR)$(systemdunitdir)/ - install -d $(DESTDIR)/lib/drbd/scripts - install -m 755 drbd $(DESTDIR)/lib/drbd/scripts @@ -110,7 +110,7 @@ index 96c599e7..c81e95a6 100644 [Install] WantedBy=multi-user.target diff --git a/scripts/drbd@.service b/scripts/drbd@.service -index 76514c5b..e2e500ba 100644 +index 0fad10be..556f3857 100644 --- a/scripts/drbd@.service +++ b/scripts/drbd@.service @@ -35,8 +35,8 @@ RemainAfterExit=yes @@ -199,6 +199,3 @@ index 0fcefc5f..81f7d5ec 100644 spell: for f in drbdadm_adjust.c drbdadm_main.c drbdadm_parser.c drbdadm_usage_cnt.c drbdsetup.c drbdtool_common.c; do \ --- -2.25.1 - 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 0bf4b2fce1..c7766067a1 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 @@ -From a61b9ff2d2cb7387a5cd347b2201535ee45a46ee Mon Sep 17 00:00:00 2001 +From bb044160faf4ae7615ddfdb17641dd88c33cde57 Mon Sep 17 00:00:00 2001 From: Sakib Sajal Date: Thu, 31 Mar 2022 15:09:58 -0400 Subject: [PATCH] drbdmon: add LDFLAGS when linking -Signed-off-by: Sakib Sajal ---- Upstream-Status: Pending - user/drbdmon/Makefile.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) +Signed-off-by: Sakib Sajal +--- + user/drbdmon/Makefile.in | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) +diff --git a/user/drbdmon/Makefile.in b/user/drbdmon/Makefile.in +index 7bd8987e..115a81b8 100644 --- a/user/drbdmon/Makefile.in +++ b/user/drbdmon/Makefile.in @@ -1,6 +1,6 @@ @@ -20,7 +22,7 @@ Upstream-Status: Pending CXX = @CXX@ LIBS = @LIBS@ -@@ -51,7 +51,7 @@ $(dsaext-obj): $(basename $(dsaext-obj)) +@@ -72,7 +72,7 @@ $(dsaext-obj): $(basename $(dsaext-obj)).cpp $(basename $(dsaext-obj)).h $(integerparse-obj): $(basename $(integerparse-obj)).cpp $(basename $(integerparse-obj)).h 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 2841d0feaf..0000000000 --- a/meta-networking/recipes-support/drbd/drbd-utils/0001-replace-off64_t-with-off_t.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 5adae6737e919d957a08df437951ccb6996f9882 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 21 Dec 2022 19:16:03 -0800 -Subject: [PATCH 1/2] replace off64_t with off_t - -off_t is already 64-bits when _FILE_OFFSET_BITS=64 -using off_t also makes it portable on musl systems - -Upstream-Status: Pending -Signed-off-by: Khem Raj ---- - user/v9/drbdadm_main.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/user/v9/drbdadm_main.c b/user/v9/drbdadm_main.c -index 91e9507d..2030946c 100644 ---- a/user/v9/drbdadm_main.c -+++ b/user/v9/drbdadm_main.c -@@ -1264,11 +1264,11 @@ static int adm_resource(const struct cfg_ctx *ctx) - return ex; - } - --static off64_t read_drbd_dev_size(int minor) -+static off_t read_drbd_dev_size(int minor) - { - char *path; - FILE *file; -- off64_t val; -+ off_t val; - int r; - - m_asprintf(&path, "/sys/block/drbd%d/size", minor); -@@ -1289,9 +1289,9 @@ int adm_resize(const struct cfg_ctx *ctx) - char *argv[MAX_ARGS]; - struct d_option *opt; - bool is_resize = !strcmp(ctx->cmd->name, "resize"); -- off64_t old_size = -1; -- off64_t target_size = 0; -- off64_t new_size; -+ off_t old_size = -1; -+ off_t target_size = 0; -+ off_t new_size; - int argc = 0; - int silent; - int ex; --- -2.39.0 - 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 45f7d6d415..0000000000 --- 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 @@ -From b70e5bf5bfa5fa2c2fffe08bcf300da1d3583602 Mon Sep 17 00:00:00 2001 -From: Lars Ellenberg -Date: Wed, 9 Nov 2022 11:01:54 +0100 -Subject: [PATCH 2/2] drbdadm: drop use of GLOB_MAGCHAR, use strchr heuristic only - -Fixup for -2022-09-05 4a1b5900 drbdadm: allow files from an expanded include glob to vanish - -When using the `include` statement, if the glob did not match any file, -there is nothing to do, silently ignore. Unless it was no glob, but a literal, -which we would expect to exist. - -Also, there is a race between expanding a glob and accessing the file. -That also should not happen for literals, though. - -Since we still had the heuristic anyways, because apparently |GLOB_MAGCHAR -does not happen for GLOB_NOMATCH returns, and there exist non-GNU libc that -don't (and likely won't) implement that extension, just forget about -(gl_flags & GLOB_MAGCHAR) but use the incomplete strchr heuristic only. - -Sourced From Alpine: https://git.alpinelinux.org/aports/tree/main/drbd-utils/drop_use_of_GLOB_MAGCHAR.patch - -Upstream-Status: Pending -Signed-off-by: Khem Raj ---- - user/v9/drbdadm_parser.c | 35 ++++++++++++++++++++--------------- - 1 file changed, 20 insertions(+), 15 deletions(-) - -diff --git a/user/v9/drbdadm_parser.c b/user/v9/drbdadm_parser.c -index b2f6ed8a..9a0a775d 100644 ---- a/user/v9/drbdadm_parser.c -+++ b/user/v9/drbdadm_parser.c -@@ -1947,14 +1947,29 @@ void include_stmt(char *str) - size_t i; - int r; - -- cwd = pushd_to_current_config_file_unless_stdin(); -- -- /* """ -+ /* -+ * If the glob did not match any file, -+ * there is nothing to do, silently ignore. -+ * Unless it was no glob, but a literal, -+ * which we would expect to exist. -+ * -+ * """ - * As a GNU extension, pglob->gl_flags is set to the - * flags specified, ored with GLOB_MAGCHAR if any - * metacharacters were found. - * """ -+ * -+ * But apparently |GLOB_MAGCHAR does not happen for GLOB_NOMATCH returns, -+ * at least not consistently :-( -+ * Also, there exist non-GNU libc -+ * So we have this incomplete strchr heuristic anyways. - */ -+ bool contains_glob_magic_char = -+ strchr(str, '*') || -+ strchr(str, '?') || -+ strchr(str, '['); -+ -+ cwd = pushd_to_current_config_file_unless_stdin(); - r = glob(str, 0, NULL, &glob_buf); - if (r == 0) { - for (i=0; i