From ffeef1824d6fa20a661848c94eda4083c4de37c81d799705e59a792ad520f1fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Tue, 14 Jan 2025 14:16:12 +0100 Subject: [PATCH] Sync from SUSE:SLFO:Main drbd-utils revision 72c54b1d6687aeb1dc95fc3490ba5a8e --- ...bd-verify.py-relax-host-key-checking.patch | 42 + ...t-segfault-when-re-configuring-proxy.patch | 35 - ...-DRBD-commands-warning-only-for-actu.patch | 59 + ...brdmon-add-missing-stdint.h-includes.patch | 45 - ...rate-global-local-command-delegation.patch | 169 ++ 0003-Introduce-default_types.h-header.patch | 1693 ----------------- ...ust-events-log-supplier-program-name.patch | 25 + ...DRBDmon-Add-drbd-events-log-supplier.patch | 166 ++ 0006-DRBDmon-Adjust-Makefile.patch | 76 + 0007-DRBDmon-Version-V1R4M1.patch | 24 + ...xy-options-to-add-connection-command.patch | 95 + ...rdcode-paths-in-services-and-scripts.patch | 309 +++ ...ing-there-is-no-po4a-translage-comma.patch | 25 + ...licitly-timeout-crm_master-IPC-early.patch | 115 ++ ...t-output-of-crm_resource-locate-has-.patch | 32 + ....sh-fix-parsing-in_ccm-crmd-fields-o.patch | 64 - ....sh-use-join-of-node_state-to-judge-.patch | 30 - ...-crm_master-with-ocf_promotion_score.patch | 8 +- ...regex-of-sed-for-new-output-from-crm.patch | 35 - drbd-utils-9.25.0.tar.gz | 3 - drbd-utils-9.29.0.tar.gz | 3 + drbd-utils.changes | 91 + drbd-utils.spec | 41 +- fence-after-pacemaker-down.patch | 2 +- usrmerge_move_lib_to_prefix_lib.patch | 68 - 25 files changed, 1260 insertions(+), 1995 deletions(-) create mode 100644 0001-drbd-verify.py-relax-host-key-checking.patch delete mode 100644 0001-drbdadm-v9-do-not-segfault-when-re-configuring-proxy.patch create mode 100644 0002-DRBDmon-Disabled-DRBD-commands-warning-only-for-actu.patch delete mode 100644 0002-user-drbrdmon-add-missing-stdint.h-includes.patch create mode 100644 0003-DRBDmon-Integrate-global-local-command-delegation.patch delete mode 100644 0003-Introduce-default_types.h-header.patch create mode 100644 0004-DRBDmon-Adjust-events-log-supplier-program-name.patch create mode 100644 0005-DRBDmon-Add-drbd-events-log-supplier.patch create mode 100644 0006-DRBDmon-Adjust-Makefile.patch create mode 100644 0007-DRBDmon-Version-V1R4M1.patch create mode 100644 0008-drbdadm-add-proxy-options-to-add-connection-command.patch create mode 100644 0009-Do-not-hardcode-paths-in-services-and-scripts.patch create mode 100644 0010-Fix-typo-in-warning-there-is-no-po4a-translage-comma.patch create mode 100644 0011-drbd.ocf-explicitly-timeout-crm_master-IPC-early.patch create mode 100644 0012-drbd.ocf-the-text-output-of-crm_resource-locate-has-.patch delete mode 100644 bsc-1219263_crm-fence-peer.9.sh-fix-parsing-in_ccm-crmd-fields-o.patch delete mode 100644 bsc-1219263_crm-fence-peer.9.sh-use-join-of-node_state-to-judge-.patch delete mode 100644 bsc-1233273_drbd.ocf-update-regex-of-sed-for-new-output-from-crm.patch delete mode 100644 drbd-utils-9.25.0.tar.gz create mode 100644 drbd-utils-9.29.0.tar.gz delete mode 100644 usrmerge_move_lib_to_prefix_lib.patch diff --git a/0001-drbd-verify.py-relax-host-key-checking.patch b/0001-drbd-verify.py-relax-host-key-checking.patch new file mode 100644 index 0000000..bac70ff --- /dev/null +++ b/0001-drbd-verify.py-relax-host-key-checking.patch @@ -0,0 +1,42 @@ +From c72edcfbb0ec0ea587dd75be7c8fa5a407380ab4 Mon Sep 17 00:00:00 2001 +From: Philipp Reisner +Date: Mon, 4 Nov 2024 18:03:22 +0100 +Subject: [PATCH 01/12] drbd-verify.py: relax host key checking + +--- + scripts/drbd-verify.py | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/scripts/drbd-verify.py b/scripts/drbd-verify.py +index 3699a1687fa4..4232cd911ecc 100755 +--- a/scripts/drbd-verify.py ++++ b/scripts/drbd-verify.py +@@ -8,6 +8,7 @@ import sys + import re + import os + ++ssh_opts = ['-oStrictHostKeyChecking=no'] + events_re = re.compile(r'change peer-device name:(\S+) peer-node-id:(\d+) conn-name:(\S+) volume:0 replication:(\w+)->(\w+)') + progress_re = re.compile(r'change peer-device name:(\S+) peer-node-id:(\d+) conn-name:(\S+) volume:0 done:(\d+\.\d+)') + +@@ -103,7 +104,7 @@ def verify_res(res_json, peers, mbr_only: bool, level2:bool): + if len(diskful_peers) >= 1: + for i, peer_json in enumerate(diskful_peers): + peer_name = peer_json['name'] +- args = ['ssh', peer_name, '/tmp/' + this_prog_name, '--json'] ++ args = ['ssh'] + ssh_opts + [peer_name, '/tmp/' + this_prog_name, '--json'] + args += ['--resource', res_name, '--level2'] + peers = [p['name'] for j, p in enumerate(diskful_peers) if j > i] + if peers: +@@ -114,7 +115,7 @@ def verify_res(res_json, peers, mbr_only: bool, level2:bool): + if level2: + continue + args.append('--mbr-only') +- subprocess.run(['scp', '-q', this_prog_path, '{}:/tmp/'.format(peer_name)]) ++ subprocess.run(['scp'] + ssh_opts + ['-q', this_prog_path, '{}:/tmp/'.format(peer_name)]) + with subprocess.Popen(args, stdout=subprocess.PIPE) as p: + peer_result = json.load(p.stdout) + result_json['oos'].update(peer_result[res_name]['oos']) +-- +2.43.0 + diff --git a/0001-drbdadm-v9-do-not-segfault-when-re-configuring-proxy.patch b/0001-drbdadm-v9-do-not-segfault-when-re-configuring-proxy.patch deleted file mode 100644 index b45b9db..0000000 --- a/0001-drbdadm-v9-do-not-segfault-when-re-configuring-proxy.patch +++ /dev/null @@ -1,35 +0,0 @@ -From e64b8b13435f99ba21a74caeebeb996f76dfd43c Mon Sep 17 00:00:00 2001 -From: Joel Colledge -Date: Wed, 26 Jul 2023 10:14:54 +0200 -Subject: [PATCH] drbdadm,v9: do not segfault when re-configuring proxy with no - path - -This prevents a segfault when a resource has a connection with no path, -and "adjust" attempts to re-configure proxy. - -This could occur as follows, when drbd-proxy-ctl is not on $PATH: -* Bring resource and connection up without proxy. -* Add proxy configuration to res file. -* "drbdadm adjust " - this causes the existing path to be deleted, - but no new path is created because drbd-proxy-ctl cannot be executed. -* "drbdadm adjust " - segfault. ---- - user/v9/drbdadm_adjust.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/user/v9/drbdadm_adjust.c b/user/v9/drbdadm_adjust.c -index 83df624c4e46..f3d321b9ec65 100644 ---- a/user/v9/drbdadm_adjust.c -+++ b/user/v9/drbdadm_adjust.c -@@ -390,7 +390,7 @@ static int proxy_reconf(const struct cfg_ctx *ctx, struct connection *running_co - goto redo_whole_conn; - - running_path = STAILQ_FIRST(&running_conn->paths); /* multiple paths via proxy, later! */ -- if (!running_path->my_proxy) -+ if (!running_path || !running_path->my_proxy) - goto redo_whole_conn; - - if (running_path->proxy_conn_is_down) --- -2.35.3 - diff --git a/0002-DRBDmon-Disabled-DRBD-commands-warning-only-for-actu.patch b/0002-DRBDmon-Disabled-DRBD-commands-warning-only-for-actu.patch new file mode 100644 index 0000000..8db472f --- /dev/null +++ b/0002-DRBDmon-Disabled-DRBD-commands-warning-only-for-actu.patch @@ -0,0 +1,59 @@ +From b37e33525eeff89d03cd6b98862d15f90aee7e15 Mon Sep 17 00:00:00 2001 +From: Robert Altnoeder +Date: Fri, 26 Jul 2024 08:35:09 +0200 +Subject: [PATCH 02/12] DRBDmon: Disabled DRBD commands warning only for actual + DRBD commands + +--- + user/drbdmon/terminal/DrbdCommandsImpl.cpp | 26 ++++++++++++---------- + 1 file changed, 14 insertions(+), 12 deletions(-) + +diff --git a/user/drbdmon/terminal/DrbdCommandsImpl.cpp b/user/drbdmon/terminal/DrbdCommandsImpl.cpp +index 8b75a2aae8a7..006234f70df6 100644 +--- a/user/drbdmon/terminal/DrbdCommandsImpl.cpp ++++ b/user/drbdmon/terminal/DrbdCommandsImpl.cpp +@@ -83,10 +83,10 @@ DrbdCommandsImpl::~DrbdCommandsImpl() noexcept + bool DrbdCommandsImpl::execute_command(const std::string& command, StringTokenizer& tokenizer) + { + bool processed = false; +- if (dsp_comp_hub.enable_drbd_actions) ++ Entry* const cmd_entry = cmd_map->get(&command); ++ if (cmd_entry != nullptr) + { +- Entry* const cmd_entry = cmd_map->get(&command); +- if (cmd_entry != nullptr) ++ if (dsp_comp_hub.enable_drbd_actions) + { + cmd_func_type cmd_func = cmd_entry->cmd_func; + try +@@ -109,16 +109,18 @@ bool DrbdCommandsImpl::execute_command(const std::string& command, StringTokeniz + ); + } + } ++ else ++ { ++ const uint64_t msg_id = dsp_comp_hub.log->add_entry( ++ MessageLog::log_level::WARN, ++ "DRBD commands are currently disabled" ++ ); ++ dsp_comp_hub.dsp_shared->message_id = msg_id; ++ dsp_comp_hub.dsp_selector->switch_to_display(DisplayId::display_page::MSG_VIEWER); ++ } ++ + } +- else +- { +- const uint64_t msg_id = dsp_comp_hub.log->add_entry( +- MessageLog::log_level::WARN, +- "DRBD commands are currently disabled" +- ); +- dsp_comp_hub.dsp_shared->message_id = msg_id; +- dsp_comp_hub.dsp_selector->switch_to_display(DisplayId::display_page::MSG_VIEWER); +- } ++ + return processed; + } + +-- +2.43.0 + diff --git a/0002-user-drbrdmon-add-missing-stdint.h-includes.patch b/0002-user-drbrdmon-add-missing-stdint.h-includes.patch deleted file mode 100644 index 5c23de8..0000000 --- a/0002-user-drbrdmon-add-missing-stdint.h-includes.patch +++ /dev/null @@ -1,45 +0,0 @@ -From feebd378195cf18b06f9fa209586af0c6d32ddb8 Mon Sep 17 00:00:00 2001 -From: Sam James -Date: Thu, 27 Jul 2023 06:30:25 +0100 -Subject: [PATCH] user: drbrdmon: add missing includes - -GCC 13 drops some transitive includes within libstdc++. - -Explicitly include for uint32_t etc. - -Note that using deliberately because we're not using std::-prefixed -types. - -Signed-off-by: Sam James ---- - user/drbdmon/DrbdMonConsts.h | 1 + - user/drbdmon/terminal/DisplayId.h | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/user/drbdmon/DrbdMonConsts.h b/user/drbdmon/DrbdMonConsts.h -index 73d25f28fbeb..f962d0d38a6d 100644 ---- a/user/drbdmon/DrbdMonConsts.h -+++ b/user/drbdmon/DrbdMonConsts.h -@@ -1,6 +1,7 @@ - #ifndef DRBDMONCONSTS_H - #define DRBDMONCONSTS_H - -+#include - #include - - class DrbdMonConsts -diff --git a/user/drbdmon/terminal/DisplayId.h b/user/drbdmon/terminal/DisplayId.h -index 40d3de488fd9..fa4b744438d4 100644 ---- a/user/drbdmon/terminal/DisplayId.h -+++ b/user/drbdmon/terminal/DisplayId.h -@@ -1,6 +1,7 @@ - #ifndef DISPLAYID_H - #define DISPLAYID_H - -+#include - #include - - class DisplayId --- -2.35.3 - diff --git a/0003-DRBDmon-Integrate-global-local-command-delegation.patch b/0003-DRBDmon-Integrate-global-local-command-delegation.patch new file mode 100644 index 0000000..c63b8b3 --- /dev/null +++ b/0003-DRBDmon-Integrate-global-local-command-delegation.patch @@ -0,0 +1,169 @@ +From 1053b3344c85646bbfbc59233a3d502183c3ea65 Mon Sep 17 00:00:00 2001 +From: Robert Altnoeder +Date: Fri, 26 Jul 2024 08:37:09 +0200 +Subject: [PATCH 03/12] DRBDmon: Integrate global/local command delegation + +--- + user/drbdmon/terminal/DisplayCommon.h | 12 +++++----- + user/drbdmon/terminal/DisplayCommonImpl.cpp | 20 ++++++++++------- + user/drbdmon/terminal/DisplayCommonImpl.h | 8 +++++-- + user/drbdmon/terminal/MDspBase.cpp | 25 +++------------------ + 4 files changed, 28 insertions(+), 37 deletions(-) + +diff --git a/user/drbdmon/terminal/DisplayCommon.h b/user/drbdmon/terminal/DisplayCommon.h +index 9160c3ddb215..b1b94e43e51f 100644 +--- a/user/drbdmon/terminal/DisplayCommon.h ++++ b/user/drbdmon/terminal/DisplayCommon.h +@@ -2,6 +2,7 @@ + #define DISPLAYCOMMON_H + + #include ++#include + + class DisplayCommon + { +@@ -16,9 +17,7 @@ class DisplayCommon + enum command_state_type : uint8_t + { + INPUT = 0, +- CANCEL = 1, +- CMD_LOCAL = 2, +- CMD_GLOBAL = 3 ++ CANCEL = 1 + }; + + virtual ~DisplayCommon() noexcept +@@ -47,9 +46,12 @@ class DisplayCommon + virtual void display_problem_mode_label(const bool using_problem_mode) const = 0; + virtual problem_mode_type get_problem_mode() const noexcept = 0; + virtual void toggle_problem_mode() noexcept = 0; +- virtual command_state_type command_line_key_pressed(const uint32_t key) const = 0; ++ virtual command_state_type command_line_key_pressed( ++ const uint32_t key, ++ ModularDisplay& display ++ ) const = 0; + virtual void activate_command_line() const = 0; +- virtual bool global_command() const = 0; ++ virtual bool execute_command(ModularDisplay& display) const = 0; + virtual void application_idle() const = 0; + virtual void application_working() const = 0; + }; +diff --git a/user/drbdmon/terminal/DisplayCommonImpl.cpp b/user/drbdmon/terminal/DisplayCommonImpl.cpp +index 8427b2fc46a0..f3ceed782e02 100644 +--- a/user/drbdmon/terminal/DisplayCommonImpl.cpp ++++ b/user/drbdmon/terminal/DisplayCommonImpl.cpp +@@ -706,7 +706,10 @@ void DisplayCommonImpl::toggle_problem_mode() noexcept + } + } + +-DisplayCommon::command_state_type DisplayCommonImpl::command_line_key_pressed(const uint32_t key) const ++DisplayCommon::command_state_type DisplayCommonImpl::command_line_key_pressed( ++ const uint32_t key, ++ ModularDisplay& display ++) const + { + DisplayCommon::command_state_type state = DisplayCommon::command_state_type::INPUT; + if (key == KeyCodes::FUNC_12) +@@ -717,11 +720,8 @@ DisplayCommon::command_state_type DisplayCommonImpl::command_line_key_pressed(co + else + if (key == KeyCodes::ENTER) + { +- state = DisplayCommon::command_state_type::CMD_LOCAL; +- if (global_command()) +- { +- state = DisplayCommon::command_state_type::CMD_GLOBAL; +- } ++ const bool processed = execute_command(display); ++ state = processed ? DisplayCommon::command_state_type::CANCEL : DisplayCommon::command_state_type::INPUT; + } + else + { +@@ -834,7 +834,7 @@ void DisplayCommonImpl::activate_command_line() const + } + } + +-bool DisplayCommonImpl::global_command() const ++bool DisplayCommonImpl::execute_command(ModularDisplay& display) const + { + bool processed = false; + const std::string& command = dsp_comp_hub.command_line->get_text(); +@@ -859,7 +859,11 @@ bool DisplayCommonImpl::global_command() const + processed = dsp_comp_hub.global_cmd_exec->execute_command(upper_keyword, tokenizer); + if (!processed) + { +- processed = dsp_comp_hub.drbd_cmd_exec->execute_command(upper_keyword, tokenizer); ++ processed = display.execute_command(upper_keyword, tokenizer); ++ if (!processed) ++ { ++ processed = dsp_comp_hub.drbd_cmd_exec->execute_command(upper_keyword, tokenizer); ++ } + } + } + } +diff --git a/user/drbdmon/terminal/DisplayCommonImpl.h b/user/drbdmon/terminal/DisplayCommonImpl.h +index 1ac7fafa6f96..8e09bfbe1eb7 100644 +--- a/user/drbdmon/terminal/DisplayCommonImpl.h ++++ b/user/drbdmon/terminal/DisplayCommonImpl.h +@@ -3,6 +3,7 @@ + + #include + #include ++#include + #include + #include + #include +@@ -35,9 +36,12 @@ class DisplayCommonImpl : public DisplayCommon + virtual void display_problem_mode_label(const bool using_problem_mode) const override; + virtual problem_mode_type get_problem_mode() const noexcept; + virtual void toggle_problem_mode() noexcept; +- virtual DisplayCommon::command_state_type command_line_key_pressed(const uint32_t key) const; ++ virtual command_state_type command_line_key_pressed( ++ const uint32_t key, ++ ModularDisplay& display ++ ) const override; + virtual void activate_command_line() const; +- virtual bool global_command() const override; ++ virtual bool execute_command(ModularDisplay& display) const override; + virtual void application_idle() const override; + virtual void application_working() const override; + +diff --git a/user/drbdmon/terminal/MDspBase.cpp b/user/drbdmon/terminal/MDspBase.cpp +index 77bc86af6160..f95d3a21ac7f 100644 +--- a/user/drbdmon/terminal/MDspBase.cpp ++++ b/user/drbdmon/terminal/MDspBase.cpp +@@ -176,29 +176,10 @@ bool MDspBase::key_pressed(const uint32_t key) + else + if (base_input_mode == base_input_mode_type::COMMAND) + { +- const DisplayCommon::command_state_type state = dsp_comp_hub.dsp_common->command_line_key_pressed(key); +- bool exit_cmd_mode = false; +- if (state == DisplayCommon::command_state_type::CMD_LOCAL) +- { +- StringTokenizer tokenizer(dsp_comp_hub.command_line->get_text(), DisplayConsts::CMD_TOKEN_DELIMITER); +- if (tokenizer.has_next()) +- { +- std::string keyword(tokenizer.next()); +- if (keyword.length() >= 2) +- { +- keyword.erase(0, 1); +- std::string upper_keyword = string_transformations::uppercase_copy_of(keyword); +- exit_cmd_mode = execute_command(upper_keyword, tokenizer); +- } +- } +- } +- else ++ const DisplayCommon::command_state_type state = dsp_comp_hub.dsp_common->command_line_key_pressed( ++ key, *this ++ ); + if (state != DisplayCommon::command_state_type::INPUT) +- { +- exit_cmd_mode = true; +- } +- +- if (exit_cmd_mode) + { + base_input_mode = base_input_mode_type::GLOBAL_KEYS; + dsp_comp_hub.dsp_io->write_text(dsp_comp_hub.ansi_ctl->ANSI_CURSOR_OFF.c_str()); +-- +2.43.0 + diff --git a/0003-Introduce-default_types.h-header.patch b/0003-Introduce-default_types.h-header.patch deleted file mode 100644 index e2daca4..0000000 --- a/0003-Introduce-default_types.h-header.patch +++ /dev/null @@ -1,1693 +0,0 @@ -From 03b7e0e12bf1b5b4b133f5ffb284e82f3ddf6c78 Mon Sep 17 00:00:00 2001 -From: Robert Altnoeder -Date: Tue, 22 Aug 2023 14:12:45 +0200 -Subject: [PATCH] Introduce default_types.h header - -This serves as a centralized component for including basic definitions, -such as for some commonly used data types. It currently includes the -cstddef and cstdint headers and puts the size_t type and the fixed width -signed and unsigned integer types into the root namespace. -Many standard libraries and/or compilers did that implicitly, but that -changed at least partly in recent versions of GCC, causing compile -errors. ---- - user/drbdmon/Args.h | 2 ++ - user/drbdmon/ConfigOption.h | 1 + - user/drbdmon/Configurable.h | 1 + - user/drbdmon/Configurator.h | 2 ++ - user/drbdmon/CoreIo.h | 1 + - user/drbdmon/Display.h | 2 +- - user/drbdmon/DrbdMon.h | 2 +- - user/drbdmon/DrbdMonConsts.h | 2 +- - user/drbdmon/DrbdMonCore.h | 2 +- - user/drbdmon/EventsIoWakeup.h | 2 ++ - user/drbdmon/IntervalTimer.h | 1 + - user/drbdmon/MessageLog.h | 2 +- - user/drbdmon/MessageLogNotification.h | 1 + - user/drbdmon/MessageLogObserver.h | 2 ++ - user/drbdmon/MonitorEnvironment.h | 1 + - user/drbdmon/StringTokenizer.h | 1 + - user/drbdmon/SubProcessNotification.h | 3 +-- - user/drbdmon/bounds.h | 2 ++ - user/drbdmon/comparators.h | 1 + - user/drbdmon/configuration/CfgEntry.h | 2 +- - user/drbdmon/configuration/CfgEntryBoolean.h | 1 + - .../configuration/CfgEntryIntegerTypes.h | 2 +- - user/drbdmon/configuration/CfgEntryNumeric.h | 2 +- - user/drbdmon/configuration/CfgEntryStore.h | 1 + - user/drbdmon/configuration/Configuration.h | 2 +- - user/drbdmon/configuration/IoException.h | 1 + - user/drbdmon/default_types.h | 18 ++++++++++++++++++ - user/drbdmon/drbdmon_main.cpp | 1 + - user/drbdmon/exceptions.h | 1 + - user/drbdmon/integerfmt.h | 2 +- - user/drbdmon/map_types.h | 2 +- - user/drbdmon/objects/DrbdConnection.h | 2 +- - user/drbdmon/objects/DrbdResource.h | 1 + - user/drbdmon/objects/DrbdRole.h | 2 +- - user/drbdmon/objects/DrbdVolume.h | 2 +- - user/drbdmon/objects/ResourceDirectory.h | 2 +- - user/drbdmon/objects/StateFlags.h | 2 +- - user/drbdmon/objects/VolumesContainer.h | 2 +- - user/drbdmon/persistent_configuration.cpp | 2 +- - user/drbdmon/persistent_configuration.h | 1 + - user/drbdmon/platform/Linux/EventsIo.h | 1 + - user/drbdmon/platform/Linux/SystemApiImpl.h | 1 + - user/drbdmon/platform/NT/SystemApiImpl.cpp | 1 - - user/drbdmon/platform/NT/SystemApiImpl.h | 1 + - user/drbdmon/platform/SystemApi.h | 1 + - user/drbdmon/string_transformations.h | 1 + - user/drbdmon/subprocess/CmdLine.h | 1 + - user/drbdmon/subprocess/DrbdCmdConsts.h | 1 + - user/drbdmon/subprocess/EventsSourceSpawner.h | 1 + - user/drbdmon/subprocess/Linux/SubProcessLx.h | 2 +- - user/drbdmon/subprocess/NT/SubProcessNt.h | 2 +- - user/drbdmon/subprocess/SubProcess.h | 3 +-- - user/drbdmon/subprocess/SubProcessObserver.h | 2 ++ - user/drbdmon/subprocess/SubProcessQueue.h | 1 + - user/drbdmon/terminal/AnsiControl.h | 1 + - user/drbdmon/terminal/CharacterTable.h | 1 + - user/drbdmon/terminal/ClickableCommand.h | 3 +-- - user/drbdmon/terminal/ColorTable.h | 1 + - user/drbdmon/terminal/CommandsBase.h | 1 + - user/drbdmon/terminal/ComponentsHub.h | 2 +- - user/drbdmon/terminal/DisplayCommon.h | 2 +- - user/drbdmon/terminal/DisplayCommonImpl.h | 1 + - user/drbdmon/terminal/DisplayConsts.h | 2 +- - user/drbdmon/terminal/DisplayController.h | 3 +-- - user/drbdmon/terminal/DisplayId.h | 2 +- - user/drbdmon/terminal/DisplayIdMap.h | 1 + - user/drbdmon/terminal/DisplayIo.h | 3 +-- - user/drbdmon/terminal/DisplaySelector.h | 1 + - user/drbdmon/terminal/DisplayStyleCollection.h | 1 + - user/drbdmon/terminal/DisplayUpdateEvent.h | 2 +- - user/drbdmon/terminal/DrbdCommands.h | 1 + - user/drbdmon/terminal/DrbdCommandsImpl.h | 1 + - user/drbdmon/terminal/EscSeqCodes.h | 2 ++ - user/drbdmon/terminal/GenericDisplay.h | 2 +- - user/drbdmon/terminal/GlobalCommandConsts.h | 1 + - user/drbdmon/terminal/GlobalCommands.h | 1 + - user/drbdmon/terminal/GlobalCommandsImpl.h | 1 + - user/drbdmon/terminal/HelpText.h | 1 + - user/drbdmon/terminal/InputCharCodes.h | 2 ++ - user/drbdmon/terminal/InputField.h | 3 +-- - user/drbdmon/terminal/KeyCodes.h | 2 +- - .../terminal/Linux/InputSequenceDecoder.h | 3 +-- - .../terminal/Linux/TerminalControlImpl.h | 1 + - user/drbdmon/terminal/MDspBase.h | 1 + - user/drbdmon/terminal/MDspConfiguration.h | 1 + - user/drbdmon/terminal/MDspConnectionActions.h | 1 + - user/drbdmon/terminal/MDspConnectionDetail.h | 2 +- - user/drbdmon/terminal/MDspConnections.h | 2 +- - user/drbdmon/terminal/MDspHelp.h | 1 + - user/drbdmon/terminal/MDspHelpIndex.h | 1 + - user/drbdmon/terminal/MDspLogViewer.h | 1 + - user/drbdmon/terminal/MDspMainMenu.h | 1 + - user/drbdmon/terminal/MDspMenuBase.h | 1 + - user/drbdmon/terminal/MDspMessage.h | 1 + - user/drbdmon/terminal/MDspPeerVolumes.h | 2 +- - user/drbdmon/terminal/MDspPgmInfo.h | 2 +- - user/drbdmon/terminal/MDspResourceActions.h | 2 +- - user/drbdmon/terminal/MDspResourceDetail.h | 2 +- - user/drbdmon/terminal/MDspResources.h | 2 +- - user/drbdmon/terminal/MDspStdListBase.h | 1 + - user/drbdmon/terminal/MDspTaskDetail.h | 1 + - user/drbdmon/terminal/MDspTaskQueue.h | 2 +- - user/drbdmon/terminal/MDspVolumeActions.h | 1 + - user/drbdmon/terminal/MDspVolumeDetail.h | 2 +- - user/drbdmon/terminal/MDspVolumes.h | 2 +- - user/drbdmon/terminal/MDspWaitMsg.h | 1 + - user/drbdmon/terminal/ModularDisplay.h | 1 + - user/drbdmon/terminal/MouseEvent.h | 2 +- - user/drbdmon/terminal/NT/TerminalControlImpl.h | 1 + - user/drbdmon/terminal/PosixTermSize.h | 2 +- - user/drbdmon/terminal/SharedData.h | 2 +- - user/drbdmon/terminal/TermSize.h | 2 +- - user/drbdmon/terminal/TerminalControl.h | 1 + - user/drbdmon/terminal/TextColumn.h | 5 ++--- - user/drbdmon/terminal/colormodes.h | 2 ++ - user/drbdmon/terminal/navigation.h | 1 + - user/drbdmon/utils.h | 1 + - 117 files changed, 143 insertions(+), 59 deletions(-) - create mode 100644 user/drbdmon/default_types.h - -diff --git a/user/drbdmon/Args.h b/user/drbdmon/Args.h -index 2e08ceba541b..1e53e1a0d959 100644 ---- a/user/drbdmon/Args.h -+++ b/user/drbdmon/Args.h -@@ -1,6 +1,8 @@ - #ifndef ARGS_H - #define ARGS_H - -+#include -+ - class Args - { - public: -diff --git a/user/drbdmon/ConfigOption.h b/user/drbdmon/ConfigOption.h -index 3ada596f9f5a..add6950f12fb 100644 ---- a/user/drbdmon/ConfigOption.h -+++ b/user/drbdmon/ConfigOption.h -@@ -1,6 +1,7 @@ - #ifndef CONFIGOPTION_H - #define CONFIGOPTION_H - -+#include - #include - #include - -diff --git a/user/drbdmon/Configurable.h b/user/drbdmon/Configurable.h -index 668d07b8166d..53387f1ecf30 100644 ---- a/user/drbdmon/Configurable.h -+++ b/user/drbdmon/Configurable.h -@@ -1,6 +1,7 @@ - #ifndef CONFIGURABLE_H - #define CONFIGURABLE_H - -+#include - #include - - class Configurator; -diff --git a/user/drbdmon/Configurator.h b/user/drbdmon/Configurator.h -index af1c9d37c442..c51f36bfd0e4 100644 ---- a/user/drbdmon/Configurator.h -+++ b/user/drbdmon/Configurator.h -@@ -1,6 +1,8 @@ - #ifndef CONFIGURATOR_H - #define CONFIGURATOR_H - -+#include -+ - class Configurable; - class ConfigOption; - -diff --git a/user/drbdmon/CoreIo.h b/user/drbdmon/CoreIo.h -index f8a03cc729a3..b1e8c938c7fe 100644 ---- a/user/drbdmon/CoreIo.h -+++ b/user/drbdmon/CoreIo.h -@@ -1,6 +1,7 @@ - #ifndef COREIO_H - #define COREIO_H - -+#include - #include - - class CoreIo -diff --git a/user/drbdmon/Display.h b/user/drbdmon/Display.h -index f961f18076a1..0b07096aead8 100644 ---- a/user/drbdmon/Display.h -+++ b/user/drbdmon/Display.h -@@ -1,12 +1,12 @@ - #ifndef DISPLAY_H - #define DISPLAY_H - -+#include - #include - #include - #include - #include - #include --#include - - #include - #include -diff --git a/user/drbdmon/DrbdMon.h b/user/drbdmon/DrbdMon.h -index b58e41b93599..586417f7d2fe 100644 ---- a/user/drbdmon/DrbdMon.h -+++ b/user/drbdmon/DrbdMon.h -@@ -1,9 +1,9 @@ - #ifndef LIVESTATUS_H - #define LIVESTATUS_H - -+#include - #include - #include --#include - - #include - #include -diff --git a/user/drbdmon/DrbdMonConsts.h b/user/drbdmon/DrbdMonConsts.h -index f962d0d38a6d..1e34de55911d 100644 ---- a/user/drbdmon/DrbdMonConsts.h -+++ b/user/drbdmon/DrbdMonConsts.h -@@ -1,7 +1,7 @@ - #ifndef DRBDMONCONSTS_H - #define DRBDMONCONSTS_H - --#include -+#include - #include - - class DrbdMonConsts -diff --git a/user/drbdmon/DrbdMonCore.h b/user/drbdmon/DrbdMonCore.h -index ccd80b032f8d..f2b3f73fdbd6 100644 ---- a/user/drbdmon/DrbdMonCore.h -+++ b/user/drbdmon/DrbdMonCore.h -@@ -1,7 +1,7 @@ - #ifndef DRBDMONCORE_H - #define DRBDMONCORE_H - --#include -+#include - #include - - class DrbdMonCore -diff --git a/user/drbdmon/EventsIoWakeup.h b/user/drbdmon/EventsIoWakeup.h -index 47e0ec96d147..510a9d1790a7 100644 ---- a/user/drbdmon/EventsIoWakeup.h -+++ b/user/drbdmon/EventsIoWakeup.h -@@ -1,6 +1,8 @@ - #ifndef EVENTSIOWAKEUP_H - #define EVENTSIOWAKEUP_H - -+#include -+ - class EventsIoWakeup - { - public: -diff --git a/user/drbdmon/IntervalTimer.h b/user/drbdmon/IntervalTimer.h -index 1480efe20814..a669a57c7b68 100644 ---- a/user/drbdmon/IntervalTimer.h -+++ b/user/drbdmon/IntervalTimer.h -@@ -1,6 +1,7 @@ - #ifndef INTERVALTIMER_H - #define INTERVALTIMER_H - -+#include - #include - #include - #include -diff --git a/user/drbdmon/MessageLog.h b/user/drbdmon/MessageLog.h -index 33d50d7c5dbc..f892a4456be2 100644 ---- a/user/drbdmon/MessageLog.h -+++ b/user/drbdmon/MessageLog.h -@@ -1,7 +1,7 @@ - #ifndef MESSAGELOG_H - #define MESSAGELOG_H - --#include -+#include - #include - #include - #include -diff --git a/user/drbdmon/MessageLogNotification.h b/user/drbdmon/MessageLogNotification.h -index 22e9065c9c97..98739060f7a3 100644 ---- a/user/drbdmon/MessageLogNotification.h -+++ b/user/drbdmon/MessageLogNotification.h -@@ -1,6 +1,7 @@ - #ifndef MESSAGELOGNOTIFICATION_H - #define MESSAGELOGNOTIFICATION_H - -+#include - #include - #include - #include -diff --git a/user/drbdmon/MessageLogObserver.h b/user/drbdmon/MessageLogObserver.h -index bab5043c4bbd..4f1e9a6cac8d 100644 ---- a/user/drbdmon/MessageLogObserver.h -+++ b/user/drbdmon/MessageLogObserver.h -@@ -1,6 +1,8 @@ - #ifndef MESSAGELOGOBSERVER_H - #define MESSAGELOGOBSERVER_H - -+#include -+ - class MessageLogObserver - { - public: -diff --git a/user/drbdmon/MonitorEnvironment.h b/user/drbdmon/MonitorEnvironment.h -index e902f83f8779..758b2d3ef171 100644 ---- a/user/drbdmon/MonitorEnvironment.h -+++ b/user/drbdmon/MonitorEnvironment.h -@@ -1,6 +1,7 @@ - #ifndef MONITORENVIRONMENT_H - #define MONITORENVIRONMENT_H - -+#include - #include - #include - #include -diff --git a/user/drbdmon/StringTokenizer.h b/user/drbdmon/StringTokenizer.h -index f19e0f486cbc..0de76b120ff6 100644 ---- a/user/drbdmon/StringTokenizer.h -+++ b/user/drbdmon/StringTokenizer.h -@@ -1,6 +1,7 @@ - #ifndef STRINGTOKENIZER_H - #define STRINGTOKENIZER_H - -+#include - #include - #include - -diff --git a/user/drbdmon/SubProcessNotification.h b/user/drbdmon/SubProcessNotification.h -index b12a4d837711..b0809b2f7bff 100644 ---- a/user/drbdmon/SubProcessNotification.h -+++ b/user/drbdmon/SubProcessNotification.h -@@ -1,9 +1,8 @@ - #ifndef SUBPROCESSNOTIFICATION_H - #define SUBPROCESSNOTIFICATION_H - -+#include - #include --#include -- - #include - #include - -diff --git a/user/drbdmon/bounds.h b/user/drbdmon/bounds.h -index 331c7cdd0539..706edec9ee03 100644 ---- a/user/drbdmon/bounds.h -+++ b/user/drbdmon/bounds.h -@@ -1,6 +1,8 @@ - #ifndef BOUNDS_H - #define BOUNDS_H - -+#include -+ - template - T bounds(T min_value, T value, T max_value) - { -diff --git a/user/drbdmon/comparators.h b/user/drbdmon/comparators.h -index 8f6c0b460757..c30078526de6 100644 ---- a/user/drbdmon/comparators.h -+++ b/user/drbdmon/comparators.h -@@ -1,6 +1,7 @@ - #ifndef COMPARATORS_H - #define COMPARATORS_H - -+#include - #include - - namespace comparators -diff --git a/user/drbdmon/configuration/CfgEntry.h b/user/drbdmon/configuration/CfgEntry.h -index a01fbdd2deee..128a8f88795d 100644 ---- a/user/drbdmon/configuration/CfgEntry.h -+++ b/user/drbdmon/configuration/CfgEntry.h -@@ -1,7 +1,7 @@ - #ifndef CFGENTRY_H - #define CFGENTRY_H - --#include -+#include - #include - #include - #include -diff --git a/user/drbdmon/configuration/CfgEntryBoolean.h b/user/drbdmon/configuration/CfgEntryBoolean.h -index 4c3c3f02e8fb..20d71dc6f5be 100644 ---- a/user/drbdmon/configuration/CfgEntryBoolean.h -+++ b/user/drbdmon/configuration/CfgEntryBoolean.h -@@ -1,6 +1,7 @@ - #ifndef CFGENTRYBOOLEAN_H - #define CFGENTRYBOOLEAN_H - -+#include - #include - #include - #include -diff --git a/user/drbdmon/configuration/CfgEntryIntegerTypes.h b/user/drbdmon/configuration/CfgEntryIntegerTypes.h -index fd6cdbc9562c..2ffb0ad7cba4 100644 ---- a/user/drbdmon/configuration/CfgEntryIntegerTypes.h -+++ b/user/drbdmon/configuration/CfgEntryIntegerTypes.h -@@ -1,10 +1,10 @@ - #ifndef CFGENTRYINTEGERTYPES_H - #define CFGENTRYINTEGERTYPES_H - -+#include - #include - #include - #include --#include - - class CfgEntryUnsgInt8 : public CfgEntry - { -diff --git a/user/drbdmon/configuration/CfgEntryNumeric.h b/user/drbdmon/configuration/CfgEntryNumeric.h -index 3c67f270fc3e..6f270e77ad65 100644 ---- a/user/drbdmon/configuration/CfgEntryNumeric.h -+++ b/user/drbdmon/configuration/CfgEntryNumeric.h -@@ -1,9 +1,9 @@ - #ifndef CFGENTRYNUMERIC_H - #define CFGENTRYNUMERIC_H - -+#include - #include - #include --#include - #include - #include - -diff --git a/user/drbdmon/configuration/CfgEntryStore.h b/user/drbdmon/configuration/CfgEntryStore.h -index d51cef9ba2fb..68a9df042447 100644 ---- a/user/drbdmon/configuration/CfgEntryStore.h -+++ b/user/drbdmon/configuration/CfgEntryStore.h -@@ -1,6 +1,7 @@ - #ifndef CFGENTRYSTORE_H - #define CFGENTRYSTORE_H - -+#include - #include - #include - #include -diff --git a/user/drbdmon/configuration/Configuration.h b/user/drbdmon/configuration/Configuration.h -index a93e5eb32990..ab8af0e248dd 100644 ---- a/user/drbdmon/configuration/Configuration.h -+++ b/user/drbdmon/configuration/Configuration.h -@@ -1,7 +1,7 @@ - #ifndef CONFIGURATION_H - #define CONFIGURATION_H - --#include -+#include - #include - #include - #include -diff --git a/user/drbdmon/configuration/IoException.h b/user/drbdmon/configuration/IoException.h -index 7b944fc9be15..f451a2c23a06 100644 ---- a/user/drbdmon/configuration/IoException.h -+++ b/user/drbdmon/configuration/IoException.h -@@ -1,6 +1,7 @@ - #ifndef IOEXCEPTION_H - #define IOEXCEPTION_H - -+#include - #include - #include - -diff --git a/user/drbdmon/default_types.h b/user/drbdmon/default_types.h -new file mode 100644 -index 000000000000..cef1f96240f0 ---- /dev/null -+++ b/user/drbdmon/default_types.h -@@ -0,0 +1,18 @@ -+#ifndef DEFAULT_TYPES_H -+#define DEFAULT_TYPES_H -+ -+#include -+#include -+ -+using std::nullptr_t; -+using std::size_t; -+using std::uint8_t; -+using std::uint16_t; -+using std::uint32_t; -+using std::uint64_t; -+using std::int8_t; -+using std::int16_t; -+using std::int32_t; -+using std::int64_t; -+ -+#endif // DEFAULT_TYPES_H -diff --git a/user/drbdmon/drbdmon_main.cpp b/user/drbdmon/drbdmon_main.cpp -index 1b217c6884e4..f92f70ac9643 100644 ---- a/user/drbdmon/drbdmon_main.cpp -+++ b/user/drbdmon/drbdmon_main.cpp -@@ -1,3 +1,4 @@ -+#include - #include - #include - #include -diff --git a/user/drbdmon/exceptions.h b/user/drbdmon/exceptions.h -index 14f2befcec5e..f75f96d1951e 100644 ---- a/user/drbdmon/exceptions.h -+++ b/user/drbdmon/exceptions.h -@@ -1,6 +1,7 @@ - #ifndef EXCEPTIONS_H - #define EXCEPTIONS_H - -+#include - #include - #include - #include -diff --git a/user/drbdmon/integerfmt.h b/user/drbdmon/integerfmt.h -index 57d92114628c..fbcedbf1bd2d 100644 ---- a/user/drbdmon/integerfmt.h -+++ b/user/drbdmon/integerfmt.h -@@ -1,8 +1,8 @@ - #ifndef INTEGERFMT_H - #define INTEGERFMT_H - -+#include - #include --#include - - namespace integerfmt - { -diff --git a/user/drbdmon/map_types.h b/user/drbdmon/map_types.h -index adfab1acc100..69456f14079d 100644 ---- a/user/drbdmon/map_types.h -+++ b/user/drbdmon/map_types.h -@@ -1,8 +1,8 @@ - #ifndef MAP_TYPES_H - #define MAP_TYPES_H - -+#include - #include --#include - - // https://github.com/raltnoeder/cppdsaext - #include -diff --git a/user/drbdmon/objects/DrbdConnection.h b/user/drbdmon/objects/DrbdConnection.h -index 7de3a82861f1..d5d7f555f2e6 100644 ---- a/user/drbdmon/objects/DrbdConnection.h -+++ b/user/drbdmon/objects/DrbdConnection.h -@@ -1,9 +1,9 @@ - #ifndef DRBDCONNECTION_H - #define DRBDCONNECTION_H - -+#include - #include - #include --#include - - #include - #include -diff --git a/user/drbdmon/objects/DrbdResource.h b/user/drbdmon/objects/DrbdResource.h -index dadb94ae7f91..5ff057153516 100644 ---- a/user/drbdmon/objects/DrbdResource.h -+++ b/user/drbdmon/objects/DrbdResource.h -@@ -1,6 +1,7 @@ - #ifndef DRBDRESOURCE_H - #define DRBDRESOURCE_H - -+#include - #include - #include - #include -diff --git a/user/drbdmon/objects/DrbdRole.h b/user/drbdmon/objects/DrbdRole.h -index da35a35d5985..2bba896b1522 100644 ---- a/user/drbdmon/objects/DrbdRole.h -+++ b/user/drbdmon/objects/DrbdRole.h -@@ -1,9 +1,9 @@ - #ifndef DRBDROLE_H - #define DRBDROLE_H - -+#include - #include - #include --#include - - class DrbdRole - { -diff --git a/user/drbdmon/objects/DrbdVolume.h b/user/drbdmon/objects/DrbdVolume.h -index 9107d275d120..35ef69f4383f 100644 ---- a/user/drbdmon/objects/DrbdVolume.h -+++ b/user/drbdmon/objects/DrbdVolume.h -@@ -1,8 +1,8 @@ - #ifndef DRBDVOLUME_H - #define DRBDVOLUME_H - -+#include - #include --#include - #include - - #include -diff --git a/user/drbdmon/objects/ResourceDirectory.h b/user/drbdmon/objects/ResourceDirectory.h -index 72ac32ae9c07..8fb851cd3ffb 100644 ---- a/user/drbdmon/objects/ResourceDirectory.h -+++ b/user/drbdmon/objects/ResourceDirectory.h -@@ -1,9 +1,9 @@ - #ifndef RESOURCEDIRECTORY_H - #define RESOURCEDIRECTORY_H - -+#include - #include - #include --#include - #include - // https://github.com/raltnoeder/cppdsaext - #include -diff --git a/user/drbdmon/objects/StateFlags.h b/user/drbdmon/objects/StateFlags.h -index 4186104456d8..103aee05c7f7 100644 ---- a/user/drbdmon/objects/StateFlags.h -+++ b/user/drbdmon/objects/StateFlags.h -@@ -1,7 +1,7 @@ - #ifndef STATEFLAGS_H - #define STATEFLAGS_H - --#include -+#include - - class StateFlags - { -diff --git a/user/drbdmon/objects/VolumesContainer.h b/user/drbdmon/objects/VolumesContainer.h -index 597c717a0d1f..50aef790ce8b 100644 ---- a/user/drbdmon/objects/VolumesContainer.h -+++ b/user/drbdmon/objects/VolumesContainer.h -@@ -1,9 +1,9 @@ - #ifndef VOLUMESCONTAINER_H - #define VOLUMESCONTAINER_H - -+#include - #include - #include --#include - #include - - #include -diff --git a/user/drbdmon/persistent_configuration.cpp b/user/drbdmon/persistent_configuration.cpp -index 119900ff4725..17540e0a49b6 100644 ---- a/user/drbdmon/persistent_configuration.cpp -+++ b/user/drbdmon/persistent_configuration.cpp -@@ -1,3 +1,4 @@ -+#include - #include - #include - #include -@@ -5,7 +6,6 @@ - #include - #include - #include --#include - #include - #include - #include -diff --git a/user/drbdmon/persistent_configuration.h b/user/drbdmon/persistent_configuration.h -index 28a9fb812de6..ea739b17917a 100644 ---- a/user/drbdmon/persistent_configuration.h -+++ b/user/drbdmon/persistent_configuration.h -@@ -1,6 +1,7 @@ - #ifndef PERSISTENT_CONFIGURATION_H - #define PERSISTENT_CONFIGURATION_H - -+#include - #include - #include - #include -diff --git a/user/drbdmon/platform/Linux/EventsIo.h b/user/drbdmon/platform/Linux/EventsIo.h -index 6ae9edc610c5..e86c1ca82b8c 100644 ---- a/user/drbdmon/platform/Linux/EventsIo.h -+++ b/user/drbdmon/platform/Linux/EventsIo.h -@@ -1,6 +1,7 @@ - #ifndef EVENTSIO_H - #define EVENTSIO_H - -+#include - #include - #include - #include -diff --git a/user/drbdmon/platform/Linux/SystemApiImpl.h b/user/drbdmon/platform/Linux/SystemApiImpl.h -index 277632ad6e0a..9bc6a8b0f2f5 100644 ---- a/user/drbdmon/platform/Linux/SystemApiImpl.h -+++ b/user/drbdmon/platform/Linux/SystemApiImpl.h -@@ -1,6 +1,7 @@ - #ifndef LINUX_SYSTEMAPIIMPL_H - #define LINUX_SYSTEMAPIIMPL_H - -+#include - #include - - extern "C" -diff --git a/user/drbdmon/platform/NT/SystemApiImpl.cpp b/user/drbdmon/platform/NT/SystemApiImpl.cpp -index da67a43388c9..2e9ad12e3d99 100644 ---- a/user/drbdmon/platform/NT/SystemApiImpl.cpp -+++ b/user/drbdmon/platform/NT/SystemApiImpl.cpp -@@ -1,7 +1,6 @@ - #include - #include - #include --#include - #include - #include - -diff --git a/user/drbdmon/platform/NT/SystemApiImpl.h b/user/drbdmon/platform/NT/SystemApiImpl.h -index 1bfb1ce99411..e28d6a1b0f2a 100644 ---- a/user/drbdmon/platform/NT/SystemApiImpl.h -+++ b/user/drbdmon/platform/NT/SystemApiImpl.h -@@ -1,6 +1,7 @@ - #ifndef NT_SYSTEMAPIIMPL_H - #define NT_SYSTEMAPIIMPL_H - -+#include - #include - - class NtApi : public SystemApi -diff --git a/user/drbdmon/platform/SystemApi.h b/user/drbdmon/platform/SystemApi.h -index 7cba4e5777ac..21414f4d8aac 100644 ---- a/user/drbdmon/platform/SystemApi.h -+++ b/user/drbdmon/platform/SystemApi.h -@@ -1,6 +1,7 @@ - #ifndef SYSTEMAPI_H - #define SYSTEMAPI_H - -+#include - #include - #include - #include -diff --git a/user/drbdmon/string_transformations.h b/user/drbdmon/string_transformations.h -index 6d20b3e78981..e01246193754 100644 ---- a/user/drbdmon/string_transformations.h -+++ b/user/drbdmon/string_transformations.h -@@ -1,6 +1,7 @@ - #ifndef STRING_TRANSFORMATIONS_H - #define STRING_TRANSFORMATIONS_H - -+#include - #include - - namespace string_transformations -diff --git a/user/drbdmon/subprocess/CmdLine.h b/user/drbdmon/subprocess/CmdLine.h -index c3cb11e6a6a5..303ef0957fed 100644 ---- a/user/drbdmon/subprocess/CmdLine.h -+++ b/user/drbdmon/subprocess/CmdLine.h -@@ -1,6 +1,7 @@ - #ifndef CMDLINE_H - #define CMDLINE_H - -+#include - #include - #include - #include -diff --git a/user/drbdmon/subprocess/DrbdCmdConsts.h b/user/drbdmon/subprocess/DrbdCmdConsts.h -index 34b495e63b17..ddd8f6746563 100644 ---- a/user/drbdmon/subprocess/DrbdCmdConsts.h -+++ b/user/drbdmon/subprocess/DrbdCmdConsts.h -@@ -1,6 +1,7 @@ - #ifndef DRBDCMDCONSTS_H - #define DRBDCMDCONSTS_H - -+#include - #include - - namespace drbdcmd -diff --git a/user/drbdmon/subprocess/EventsSourceSpawner.h b/user/drbdmon/subprocess/EventsSourceSpawner.h -index a77b8abea888..0c4a1fa39f8f 100644 ---- a/user/drbdmon/subprocess/EventsSourceSpawner.h -+++ b/user/drbdmon/subprocess/EventsSourceSpawner.h -@@ -1,6 +1,7 @@ - #ifndef EVENTSSOURCESPAWNER_H - #define EVENTSSOURCESPAWNER_H - -+#include - #include - #include - -diff --git a/user/drbdmon/subprocess/Linux/SubProcessLx.h b/user/drbdmon/subprocess/Linux/SubProcessLx.h -index 391d726985ca..8bf62494d5f6 100644 ---- a/user/drbdmon/subprocess/Linux/SubProcessLx.h -+++ b/user/drbdmon/subprocess/Linux/SubProcessLx.h -@@ -1,7 +1,7 @@ - #ifndef SUBPROCESSLX_H - #define SUBPROCESSLX_H - --#include -+#include - #include - #include - #include -diff --git a/user/drbdmon/subprocess/NT/SubProcessNt.h b/user/drbdmon/subprocess/NT/SubProcessNt.h -index d27bf0705480..38cdb1e4bc61 100644 ---- a/user/drbdmon/subprocess/NT/SubProcessNt.h -+++ b/user/drbdmon/subprocess/NT/SubProcessNt.h -@@ -1,7 +1,7 @@ - #ifndef SUBPROCESSNT_H - #define SUBPROCESSNT_H - --#include -+#include - #include - #include - #include -diff --git a/user/drbdmon/subprocess/SubProcess.h b/user/drbdmon/subprocess/SubProcess.h -index 2e38136f9673..ecb9d12d9e61 100644 ---- a/user/drbdmon/subprocess/SubProcess.h -+++ b/user/drbdmon/subprocess/SubProcess.h -@@ -1,8 +1,7 @@ - #ifndef SUBPROCESS_H - #define SUBPROCESS_H - --#include --#include -+#include - #include - #include - #include -diff --git a/user/drbdmon/subprocess/SubProcessObserver.h b/user/drbdmon/subprocess/SubProcessObserver.h -index de12478ccf94..a723cc96d8c7 100644 ---- a/user/drbdmon/subprocess/SubProcessObserver.h -+++ b/user/drbdmon/subprocess/SubProcessObserver.h -@@ -1,6 +1,8 @@ - #ifndef SUBPROCESSOBSERVER_H - #define SUBPROCESSOBSERVER_H - -+#include -+ - class SubProcessObserver - { - public: -diff --git a/user/drbdmon/subprocess/SubProcessQueue.h b/user/drbdmon/subprocess/SubProcessQueue.h -index 3c02762b869d..323b91cd0cca 100644 ---- a/user/drbdmon/subprocess/SubProcessQueue.h -+++ b/user/drbdmon/subprocess/SubProcessQueue.h -@@ -1,6 +1,7 @@ - #ifndef SUBPROCESSQUEUE_H - #define SUBPROCESSQUEUE_H - -+#include - #include - #include - #include -diff --git a/user/drbdmon/terminal/AnsiControl.h b/user/drbdmon/terminal/AnsiControl.h -index ef1ff7ea1001..df8a8e425ec7 100644 ---- a/user/drbdmon/terminal/AnsiControl.h -+++ b/user/drbdmon/terminal/AnsiControl.h -@@ -1,6 +1,7 @@ - #ifndef ANSICONTROL_H - #define ANSICONTROL_H - -+#include - #include - - class AnsiControl -diff --git a/user/drbdmon/terminal/CharacterTable.h b/user/drbdmon/terminal/CharacterTable.h -index 0231e6bab9b3..9dc2a691a14d 100644 ---- a/user/drbdmon/terminal/CharacterTable.h -+++ b/user/drbdmon/terminal/CharacterTable.h -@@ -1,6 +1,7 @@ - #ifndef CHARACTERTABLE_H - #define CHARACTERTABLE_H - -+#include - #include - - class CharacterTable -diff --git a/user/drbdmon/terminal/ClickableCommand.h b/user/drbdmon/terminal/ClickableCommand.h -index 1841f987d07e..d8ab0daead80 100644 ---- a/user/drbdmon/terminal/ClickableCommand.h -+++ b/user/drbdmon/terminal/ClickableCommand.h -@@ -1,8 +1,7 @@ - #ifndef CLICKABLECOMMAND_H - #define CLICKABLECOMMAND_H - --#include --#include -+#include - #include - #include - #include -diff --git a/user/drbdmon/terminal/ColorTable.h b/user/drbdmon/terminal/ColorTable.h -index 45de95bb0719..82b15ef3c2a1 100644 ---- a/user/drbdmon/terminal/ColorTable.h -+++ b/user/drbdmon/terminal/ColorTable.h -@@ -1,6 +1,7 @@ - #ifndef COLORTABLE_H - #define COLORTABLE_H - -+#include - #include - - class ColorTable -diff --git a/user/drbdmon/terminal/CommandsBase.h b/user/drbdmon/terminal/CommandsBase.h -index 8ce16472a036..2f6f8e9edf90 100644 ---- a/user/drbdmon/terminal/CommandsBase.h -+++ b/user/drbdmon/terminal/CommandsBase.h -@@ -1,6 +1,7 @@ - #ifndef COMMANDSBASE_H_ - #define COMMANDSBASE_H_ - -+#include - #include - #include - #include -diff --git a/user/drbdmon/terminal/ComponentsHub.h b/user/drbdmon/terminal/ComponentsHub.h -index 0b295ce3fb7e..38b091c324c4 100644 ---- a/user/drbdmon/terminal/ComponentsHub.h -+++ b/user/drbdmon/terminal/ComponentsHub.h -@@ -1,6 +1,7 @@ - #ifndef COMPONENTSHUB_H - #define COMPONENTSHUB_H - -+#include - #include - #include - #include -@@ -18,7 +19,6 @@ - #include - #include - #include --#include - #include - - class InputField; -diff --git a/user/drbdmon/terminal/DisplayCommon.h b/user/drbdmon/terminal/DisplayCommon.h -index 6b49e51ac269..9160c3ddb215 100644 ---- a/user/drbdmon/terminal/DisplayCommon.h -+++ b/user/drbdmon/terminal/DisplayCommon.h -@@ -1,7 +1,7 @@ - #ifndef DISPLAYCOMMON_H - #define DISPLAYCOMMON_H - --#include -+#include - - class DisplayCommon - { -diff --git a/user/drbdmon/terminal/DisplayCommonImpl.h b/user/drbdmon/terminal/DisplayCommonImpl.h -index 941035e7bab4..1ac7fafa6f96 100644 ---- a/user/drbdmon/terminal/DisplayCommonImpl.h -+++ b/user/drbdmon/terminal/DisplayCommonImpl.h -@@ -1,6 +1,7 @@ - #ifndef DISPLAYCOMMONIMPL_H - #define DISPLAYCOMMONIMPL_H - -+#include - #include - #include - #include -diff --git a/user/drbdmon/terminal/DisplayConsts.h b/user/drbdmon/terminal/DisplayConsts.h -index acbe8f686c9c..1715b07ca4a1 100644 ---- a/user/drbdmon/terminal/DisplayConsts.h -+++ b/user/drbdmon/terminal/DisplayConsts.h -@@ -1,7 +1,7 @@ - #ifndef DISPLAYCONSTS_H - #define DISPLAYCONSTS_H - --#include -+#include - #include - - namespace DisplayConsts -diff --git a/user/drbdmon/terminal/DisplayController.h b/user/drbdmon/terminal/DisplayController.h -index 68465d8d4a37..294b22b5ade7 100644 ---- a/user/drbdmon/terminal/DisplayController.h -+++ b/user/drbdmon/terminal/DisplayController.h -@@ -1,6 +1,7 @@ - #ifndef DISPLAYCONTROLLER_H - #define DISPLAYCONTROLLER_H - -+#include - #include - #include - #include -@@ -29,8 +30,6 @@ - #include - #include - #include --#include --#include - - class DisplayController : public GenericDisplay, public DisplaySelector - { -diff --git a/user/drbdmon/terminal/DisplayId.h b/user/drbdmon/terminal/DisplayId.h -index fa4b744438d4..f22251eb47d8 100644 ---- a/user/drbdmon/terminal/DisplayId.h -+++ b/user/drbdmon/terminal/DisplayId.h -@@ -1,7 +1,7 @@ - #ifndef DISPLAYID_H - #define DISPLAYID_H - --#include -+#include - #include - - class DisplayId -diff --git a/user/drbdmon/terminal/DisplayIdMap.h b/user/drbdmon/terminal/DisplayIdMap.h -index f5a0ea95663e..d9763a3de875 100644 ---- a/user/drbdmon/terminal/DisplayIdMap.h -+++ b/user/drbdmon/terminal/DisplayIdMap.h -@@ -1,6 +1,7 @@ - #ifndef DISPLAYIDMAP_H - #define DISPLAYIDMAP_H - -+#include - #include - #include - -diff --git a/user/drbdmon/terminal/DisplayIo.h b/user/drbdmon/terminal/DisplayIo.h -index e8355e014e56..fa8e1a94786e 100644 ---- a/user/drbdmon/terminal/DisplayIo.h -+++ b/user/drbdmon/terminal/DisplayIo.h -@@ -1,8 +1,7 @@ - #ifndef DISPLAYIO_H - #define DISPLAYIO_H - --#include --#include -+#include - #include - #include - #include -diff --git a/user/drbdmon/terminal/DisplaySelector.h b/user/drbdmon/terminal/DisplaySelector.h -index 9050088c33ad..9a00af522c96 100644 ---- a/user/drbdmon/terminal/DisplaySelector.h -+++ b/user/drbdmon/terminal/DisplaySelector.h -@@ -1,6 +1,7 @@ - #ifndef DISPLAYSELECTOR_H - #define DISPLAYSELECTOR_H - -+#include - #include - #include - #include -diff --git a/user/drbdmon/terminal/DisplayStyleCollection.h b/user/drbdmon/terminal/DisplayStyleCollection.h -index dca3330f220a..6905bc54866b 100644 ---- a/user/drbdmon/terminal/DisplayStyleCollection.h -+++ b/user/drbdmon/terminal/DisplayStyleCollection.h -@@ -1,6 +1,7 @@ - #ifndef DISPLAYSTYLECOLLECTION_H - #define DISPLAYSTYLECOLLECTION_H - -+#include - #include - #include - #include -diff --git a/user/drbdmon/terminal/DisplayUpdateEvent.h b/user/drbdmon/terminal/DisplayUpdateEvent.h -index d8a453ce29d0..9825dc06f1ad 100644 ---- a/user/drbdmon/terminal/DisplayUpdateEvent.h -+++ b/user/drbdmon/terminal/DisplayUpdateEvent.h -@@ -1,7 +1,7 @@ - #ifndef DISPLAYUPDATEEVENT_H - #define DISPLAYUPDATEEVENT_H - --#include -+#include - - namespace update_event - { -diff --git a/user/drbdmon/terminal/DrbdCommands.h b/user/drbdmon/terminal/DrbdCommands.h -index 2a1f5470802b..2370bc493872 100644 ---- a/user/drbdmon/terminal/DrbdCommands.h -+++ b/user/drbdmon/terminal/DrbdCommands.h -@@ -1,6 +1,7 @@ - #ifndef DRBDCOMMANDS_H - #define DRBDCOMMANDS_H - -+#include - #include - #include - -diff --git a/user/drbdmon/terminal/DrbdCommandsImpl.h b/user/drbdmon/terminal/DrbdCommandsImpl.h -index 3d099cc383ad..90b920678ecb 100644 ---- a/user/drbdmon/terminal/DrbdCommandsImpl.h -+++ b/user/drbdmon/terminal/DrbdCommandsImpl.h -@@ -1,6 +1,7 @@ - #ifndef DRBDCOMMANDSIMPL_H - #define DRBDCOMMANDSIMPL_H - -+#include - #include - #include - #include -diff --git a/user/drbdmon/terminal/EscSeqCodes.h b/user/drbdmon/terminal/EscSeqCodes.h -index 1c4b4c9bb48b..910d610544be 100644 ---- a/user/drbdmon/terminal/EscSeqCodes.h -+++ b/user/drbdmon/terminal/EscSeqCodes.h -@@ -1,6 +1,8 @@ - #ifndef ESCSEQCODES_H - #define ESCSEQCODES_H - -+#include -+ - class EscSeqCodes - { - public: -diff --git a/user/drbdmon/terminal/GenericDisplay.h b/user/drbdmon/terminal/GenericDisplay.h -index 84ba3835bc8e..8b07c82d5546 100644 ---- a/user/drbdmon/terminal/GenericDisplay.h -+++ b/user/drbdmon/terminal/GenericDisplay.h -@@ -1,7 +1,7 @@ - #ifndef GENERICDISPLAY_H - #define GENERICDISPLAY_H - --#include -+#include - #include - - class GenericDisplay -diff --git a/user/drbdmon/terminal/GlobalCommandConsts.h b/user/drbdmon/terminal/GlobalCommandConsts.h -index c77be7b88c40..405cb0fa8bb5 100644 ---- a/user/drbdmon/terminal/GlobalCommandConsts.h -+++ b/user/drbdmon/terminal/GlobalCommandConsts.h -@@ -1,6 +1,7 @@ - #ifndef GLOBALCOMMANDCONSTS_H - #define GLOBALCOMMANDCONSTS_H - -+#include - #include - - namespace cmd_names -diff --git a/user/drbdmon/terminal/GlobalCommands.h b/user/drbdmon/terminal/GlobalCommands.h -index 107e318285a7..9a1966f66bb0 100644 ---- a/user/drbdmon/terminal/GlobalCommands.h -+++ b/user/drbdmon/terminal/GlobalCommands.h -@@ -1,6 +1,7 @@ - #ifndef GLOBALCOMMANDS_H - #define GLOBALCOMMANDS_H - -+#include - #include - #include - -diff --git a/user/drbdmon/terminal/GlobalCommandsImpl.h b/user/drbdmon/terminal/GlobalCommandsImpl.h -index c2f7b36b8223..f6cc8ec10650 100644 ---- a/user/drbdmon/terminal/GlobalCommandsImpl.h -+++ b/user/drbdmon/terminal/GlobalCommandsImpl.h -@@ -1,6 +1,7 @@ - #ifndef GLOBALCOMMANDSIMPL_H - #define GLOBALCOMMANDSIMPL_H - -+#include - #include - #include - #include -diff --git a/user/drbdmon/terminal/HelpText.h b/user/drbdmon/terminal/HelpText.h -index 7bd5fd503dae..e93efe92fa6f 100644 ---- a/user/drbdmon/terminal/HelpText.h -+++ b/user/drbdmon/terminal/HelpText.h -@@ -1,6 +1,7 @@ - #ifndef HELPTEXT_H - #define HELPTEXT_H - -+#include - #include - - namespace helptext -diff --git a/user/drbdmon/terminal/InputCharCodes.h b/user/drbdmon/terminal/InputCharCodes.h -index ea5bc5914e64..290151e16034 100644 ---- a/user/drbdmon/terminal/InputCharCodes.h -+++ b/user/drbdmon/terminal/InputCharCodes.h -@@ -1,6 +1,8 @@ - #ifndef INPUTCHARCODES_H - #define INPUTCHARCODES_H - -+#include -+ - class InputCharCodes - { - public: -diff --git a/user/drbdmon/terminal/InputField.h b/user/drbdmon/terminal/InputField.h -index 92fa357ad06b..6933a5383fd1 100644 ---- a/user/drbdmon/terminal/InputField.h -+++ b/user/drbdmon/terminal/InputField.h -@@ -1,10 +1,9 @@ - #ifndef INPUTFIELD_H - #define INPUTFIELD_H - -+#include - #include - #include --#include --#include - #include - - class InputField -diff --git a/user/drbdmon/terminal/KeyCodes.h b/user/drbdmon/terminal/KeyCodes.h -index 84eb6b8513ad..1f73090c659b 100644 ---- a/user/drbdmon/terminal/KeyCodes.h -+++ b/user/drbdmon/terminal/KeyCodes.h -@@ -1,7 +1,7 @@ - #ifndef KEY_CODES_H - #define KEY_CODES_H - --#include -+#include - - class KeyCodes - { -diff --git a/user/drbdmon/terminal/Linux/InputSequenceDecoder.h b/user/drbdmon/terminal/Linux/InputSequenceDecoder.h -index 804dc7fee1c8..a9e880b2e540 100644 ---- a/user/drbdmon/terminal/Linux/InputSequenceDecoder.h -+++ b/user/drbdmon/terminal/Linux/InputSequenceDecoder.h -@@ -1,8 +1,7 @@ - #ifndef INPUTSEQUENCEDECODER_H - #define INPUTSEQUENCEDECODER_H - --#include --#include -+#include - #include - - #include -diff --git a/user/drbdmon/terminal/Linux/TerminalControlImpl.h b/user/drbdmon/terminal/Linux/TerminalControlImpl.h -index 7d85737ab138..953c37bf2779 100644 ---- a/user/drbdmon/terminal/Linux/TerminalControlImpl.h -+++ b/user/drbdmon/terminal/Linux/TerminalControlImpl.h -@@ -1,6 +1,7 @@ - #ifndef LINUX_TERMINALCONTROL_H - #define LINUX_TERMINALCONTROL_H - -+#include - #include - - extern "C" -diff --git a/user/drbdmon/terminal/MDspBase.h b/user/drbdmon/terminal/MDspBase.h -index 18461c5888b9..bf317c16bc5e 100644 ---- a/user/drbdmon/terminal/MDspBase.h -+++ b/user/drbdmon/terminal/MDspBase.h -@@ -1,6 +1,7 @@ - #ifndef MDSPBASE_H - #define MDSPBASE_H - -+#include - #include - #include - #include -diff --git a/user/drbdmon/terminal/MDspConfiguration.h b/user/drbdmon/terminal/MDspConfiguration.h -index 33911089715e..bcedadb0181f 100644 ---- a/user/drbdmon/terminal/MDspConfiguration.h -+++ b/user/drbdmon/terminal/MDspConfiguration.h -@@ -1,6 +1,7 @@ - #ifndef MDSPCONFIGURATION_H - #define MDSPCONFIGURATION_H - -+#include - #include - #include - -diff --git a/user/drbdmon/terminal/MDspConnectionActions.h b/user/drbdmon/terminal/MDspConnectionActions.h -index 1cbc0d4ae274..4aff96a40936 100644 ---- a/user/drbdmon/terminal/MDspConnectionActions.h -+++ b/user/drbdmon/terminal/MDspConnectionActions.h -@@ -1,6 +1,7 @@ - #ifndef MDSPCONNECTIONACTIONS_H - #define MDSPCONNECTIONACTIONS_H - -+#include - #include - - class MDspConnectionActions : public MDspMenuBase -diff --git a/user/drbdmon/terminal/MDspConnectionDetail.h b/user/drbdmon/terminal/MDspConnectionDetail.h -index c0ec668e32f6..b066501e8b32 100644 ---- a/user/drbdmon/terminal/MDspConnectionDetail.h -+++ b/user/drbdmon/terminal/MDspConnectionDetail.h -@@ -1,7 +1,7 @@ - #ifndef MDSPCONNECTIONDETAIL_H - #define MDSPCONNECTIONDETAIL_H - --#include -+#include - #include - - class MDspConnectionDetail : public MDspMenuBase -diff --git a/user/drbdmon/terminal/MDspConnections.h b/user/drbdmon/terminal/MDspConnections.h -index d2dddd3e6235..e7efa10ad857 100644 ---- a/user/drbdmon/terminal/MDspConnections.h -+++ b/user/drbdmon/terminal/MDspConnections.h -@@ -1,13 +1,13 @@ - #ifndef MDSPCONNECTIONS_H - #define MDSPCONNECTIONS_H - -+#include - #include - #include - #include - #include - #include - #include --#include - #include - #include - #include -diff --git a/user/drbdmon/terminal/MDspHelp.h b/user/drbdmon/terminal/MDspHelp.h -index d693b0f889f6..95d8a3e15493 100644 ---- a/user/drbdmon/terminal/MDspHelp.h -+++ b/user/drbdmon/terminal/MDspHelp.h -@@ -1,6 +1,7 @@ - #ifndef MDSPHELP_H - #define MDSPHELP_H - -+#include - #include - #include - -diff --git a/user/drbdmon/terminal/MDspHelpIndex.h b/user/drbdmon/terminal/MDspHelpIndex.h -index 8bce7b52ee16..7e2f6454c760 100644 ---- a/user/drbdmon/terminal/MDspHelpIndex.h -+++ b/user/drbdmon/terminal/MDspHelpIndex.h -@@ -1,6 +1,7 @@ - #ifndef MDSPHELPINDEX_H - #define MDSPHELPINDEX_H - -+#include - #include - #include - #include -diff --git a/user/drbdmon/terminal/MDspLogViewer.h b/user/drbdmon/terminal/MDspLogViewer.h -index a76cf58c9326..58eeef46db12 100644 ---- a/user/drbdmon/terminal/MDspLogViewer.h -+++ b/user/drbdmon/terminal/MDspLogViewer.h -@@ -1,6 +1,7 @@ - #ifndef MDSPLOGVIEWER_H - #define MDSPLOGVIEWER_H - -+#include - #include - #include - -diff --git a/user/drbdmon/terminal/MDspMainMenu.h b/user/drbdmon/terminal/MDspMainMenu.h -index 53eda8ddb2d6..284786ea4c83 100644 ---- a/user/drbdmon/terminal/MDspMainMenu.h -+++ b/user/drbdmon/terminal/MDspMainMenu.h -@@ -1,6 +1,7 @@ - #ifndef MDSPMAINMENU_H - #define MDSPMAINMENU_H - -+#include - #include - #include - #include -diff --git a/user/drbdmon/terminal/MDspMenuBase.h b/user/drbdmon/terminal/MDspMenuBase.h -index 80ee294e36a4..ef932faf5592 100644 ---- a/user/drbdmon/terminal/MDspMenuBase.h -+++ b/user/drbdmon/terminal/MDspMenuBase.h -@@ -1,6 +1,7 @@ - #ifndef MDSPMENUBASE_H - #define MDSPMENUBASE_H - -+#include - #include - #include - #include -diff --git a/user/drbdmon/terminal/MDspMessage.h b/user/drbdmon/terminal/MDspMessage.h -index e6fd969a6218..56d3a35e8ca2 100644 ---- a/user/drbdmon/terminal/MDspMessage.h -+++ b/user/drbdmon/terminal/MDspMessage.h -@@ -1,6 +1,7 @@ - #ifndef MDSPMESSAGE_H - #define MDSPMESSAGE_H - -+#include - #include - #include - #include -diff --git a/user/drbdmon/terminal/MDspPeerVolumes.h b/user/drbdmon/terminal/MDspPeerVolumes.h -index 10966737a51b..1f545f628bc6 100644 ---- a/user/drbdmon/terminal/MDspPeerVolumes.h -+++ b/user/drbdmon/terminal/MDspPeerVolumes.h -@@ -1,6 +1,7 @@ - #ifndef MDSPPEERVOLUMES_H - #define MDSPPEERVOLUMES_H - -+#include - #include - #include - #include -@@ -9,7 +10,6 @@ - #include - #include - #include --#include - #include - #include - #include -diff --git a/user/drbdmon/terminal/MDspPgmInfo.h b/user/drbdmon/terminal/MDspPgmInfo.h -index 110d0c6aa14c..83fd6dd7dc6c 100644 ---- a/user/drbdmon/terminal/MDspPgmInfo.h -+++ b/user/drbdmon/terminal/MDspPgmInfo.h -@@ -1,7 +1,7 @@ - #ifndef MDSPPGMINFO_H - #define MDSPPGMINFO_H - --#include -+#include - #include - #include - -diff --git a/user/drbdmon/terminal/MDspResourceActions.h b/user/drbdmon/terminal/MDspResourceActions.h -index 2be07d3f6aef..85c16a84fa97 100644 ---- a/user/drbdmon/terminal/MDspResourceActions.h -+++ b/user/drbdmon/terminal/MDspResourceActions.h -@@ -1,7 +1,7 @@ - #ifndef MDSPRESOURCEACTIONS_H - #define MDSPRESOURCEACTIONS_H - --#include -+#include - #include - - class MDspResourceActions: public MDspMenuBase -diff --git a/user/drbdmon/terminal/MDspResourceDetail.h b/user/drbdmon/terminal/MDspResourceDetail.h -index c29da64baeeb..21275a1687f3 100644 ---- a/user/drbdmon/terminal/MDspResourceDetail.h -+++ b/user/drbdmon/terminal/MDspResourceDetail.h -@@ -1,7 +1,7 @@ - #ifndef MDSPRESOURCEDETAIL_H - #define MDSPRESOURCEDETAIL_H - --#include -+#include - #include - - class MDspResourceDetail : public MDspMenuBase -diff --git a/user/drbdmon/terminal/MDspResources.h b/user/drbdmon/terminal/MDspResources.h -index 00e9686f8b83..476045daa3a7 100644 ---- a/user/drbdmon/terminal/MDspResources.h -+++ b/user/drbdmon/terminal/MDspResources.h -@@ -1,12 +1,12 @@ - #ifndef MDSPRESOURCES_H - #define MDSPRESOURCES_H - -+#include - #include - #include - #include - #include - #include --#include - #include - #include - #include -diff --git a/user/drbdmon/terminal/MDspStdListBase.h b/user/drbdmon/terminal/MDspStdListBase.h -index 227d95982c1e..27af050079fe 100644 ---- a/user/drbdmon/terminal/MDspStdListBase.h -+++ b/user/drbdmon/terminal/MDspStdListBase.h -@@ -1,6 +1,7 @@ - #ifndef MDSPSTDLISTBASE_H - #define MDSPSTDLISTBASE_H - -+#include - #include - #include - -diff --git a/user/drbdmon/terminal/MDspTaskDetail.h b/user/drbdmon/terminal/MDspTaskDetail.h -index 5423c65dfe7b..b9a9a7e9b640 100644 ---- a/user/drbdmon/terminal/MDspTaskDetail.h -+++ b/user/drbdmon/terminal/MDspTaskDetail.h -@@ -1,6 +1,7 @@ - #ifndef MDSPTASKDETAIL_H - #define MDSPTASKDETAIL_H - -+#include - #include - #include - #include -diff --git a/user/drbdmon/terminal/MDspTaskQueue.h b/user/drbdmon/terminal/MDspTaskQueue.h -index eb2d1e299d9a..9e5cbacadc90 100644 ---- a/user/drbdmon/terminal/MDspTaskQueue.h -+++ b/user/drbdmon/terminal/MDspTaskQueue.h -@@ -1,12 +1,12 @@ - #ifndef TERMINAL_MDSPTASKQUEUE_H_ - #define TERMINAL_MDSPTASKQUEUE_H_ - -+#include - #include - #include - #include - #include - #include --#include - - extern "C" - { -diff --git a/user/drbdmon/terminal/MDspVolumeActions.h b/user/drbdmon/terminal/MDspVolumeActions.h -index cb2c461158cb..8d6410e12add 100644 ---- a/user/drbdmon/terminal/MDspVolumeActions.h -+++ b/user/drbdmon/terminal/MDspVolumeActions.h -@@ -1,6 +1,7 @@ - #ifndef MDSPVOLUMEACTIONS_H - #define MDSPVOLUMEACTIONS_H - -+#include - #include - - class MDspVolumeActions : public MDspMenuBase -diff --git a/user/drbdmon/terminal/MDspVolumeDetail.h b/user/drbdmon/terminal/MDspVolumeDetail.h -index dfd8f24552d6..71893d91ce1f 100644 ---- a/user/drbdmon/terminal/MDspVolumeDetail.h -+++ b/user/drbdmon/terminal/MDspVolumeDetail.h -@@ -1,7 +1,7 @@ - #ifndef MDSPVOLUMEDETAIL_H - #define MDSPVOLUMEDETAIL_H - --#include -+#include - #include - - class MDspVolumeDetail : public MDspMenuBase -diff --git a/user/drbdmon/terminal/MDspVolumes.h b/user/drbdmon/terminal/MDspVolumes.h -index 9431dc758aed..be3e62385d76 100644 ---- a/user/drbdmon/terminal/MDspVolumes.h -+++ b/user/drbdmon/terminal/MDspVolumes.h -@@ -1,6 +1,7 @@ - #ifndef MDSPVOLUMES_H - #define MDSPVOLUMES_H - -+#include - #include - #include - #include -@@ -8,7 +9,6 @@ - #include - #include - #include --#include - #include - #include - #include -diff --git a/user/drbdmon/terminal/MDspWaitMsg.h b/user/drbdmon/terminal/MDspWaitMsg.h -index 51e5efcf36c1..9370c9a0b6fc 100644 ---- a/user/drbdmon/terminal/MDspWaitMsg.h -+++ b/user/drbdmon/terminal/MDspWaitMsg.h -@@ -1,6 +1,7 @@ - #ifndef MDSPWAITMSG_H - #define MDSPWAITMSG_H - -+#include - #include - #include - -diff --git a/user/drbdmon/terminal/ModularDisplay.h b/user/drbdmon/terminal/ModularDisplay.h -index b1a0eeb8fd79..babf68af3efb 100644 ---- a/user/drbdmon/terminal/ModularDisplay.h -+++ b/user/drbdmon/terminal/ModularDisplay.h -@@ -1,6 +1,7 @@ - #ifndef MODULARDISPLAY_H - #define MODULARDISPLAY_H - -+#include - #include - #include - #include -diff --git a/user/drbdmon/terminal/MouseEvent.h b/user/drbdmon/terminal/MouseEvent.h -index 76eb99a007da..20152fc0e30a 100644 ---- a/user/drbdmon/terminal/MouseEvent.h -+++ b/user/drbdmon/terminal/MouseEvent.h -@@ -1,7 +1,7 @@ - #ifndef MOUSEEVENT_H - #define MOUSEEVENT_H - --#include -+#include - - class MouseEvent - { -diff --git a/user/drbdmon/terminal/NT/TerminalControlImpl.h b/user/drbdmon/terminal/NT/TerminalControlImpl.h -index 7163e6dba32e..4ee7db31ffc2 100644 ---- a/user/drbdmon/terminal/NT/TerminalControlImpl.h -+++ b/user/drbdmon/terminal/NT/TerminalControlImpl.h -@@ -1,6 +1,7 @@ - #ifndef NT_TERMINALCONTROLIMPL_H - #define NT_TERMINALCONTROLIMPL_H - -+#include - #include - - extern "C" -diff --git a/user/drbdmon/terminal/PosixTermSize.h b/user/drbdmon/terminal/PosixTermSize.h -index d11982bc7764..78f364dd0b33 100644 ---- a/user/drbdmon/terminal/PosixTermSize.h -+++ b/user/drbdmon/terminal/PosixTermSize.h -@@ -1,8 +1,8 @@ - #ifndef POSIXTERMSIZE_H - #define POSIXTERMSIZE_H - -+#include - #include --#include - - extern "C" - { -diff --git a/user/drbdmon/terminal/SharedData.h b/user/drbdmon/terminal/SharedData.h -index 548885822375..8cf85cb2a58e 100644 ---- a/user/drbdmon/terminal/SharedData.h -+++ b/user/drbdmon/terminal/SharedData.h -@@ -1,7 +1,7 @@ - #ifndef SHAREDDATA_H - #define SHAREDDATA_H - --#include -+#include - #include - #include - #include -diff --git a/user/drbdmon/terminal/TermSize.h b/user/drbdmon/terminal/TermSize.h -index 499fd359e058..f38972b3e7a1 100644 ---- a/user/drbdmon/terminal/TermSize.h -+++ b/user/drbdmon/terminal/TermSize.h -@@ -1,7 +1,7 @@ - #ifndef TERMSIZE_H - #define TERMSIZE_H - --#include -+#include - - class TermSize - { -diff --git a/user/drbdmon/terminal/TerminalControl.h b/user/drbdmon/terminal/TerminalControl.h -index 1f0e7cf863a7..84acaf8ff661 100644 ---- a/user/drbdmon/terminal/TerminalControl.h -+++ b/user/drbdmon/terminal/TerminalControl.h -@@ -1,6 +1,7 @@ - #ifndef TERMINALCONTROL_H - #define TERMINALCONTROL_H - -+#include - #include - - class TerminalControl -diff --git a/user/drbdmon/terminal/TextColumn.h b/user/drbdmon/terminal/TextColumn.h -index deb162f9416d..df56350d8853 100644 ---- a/user/drbdmon/terminal/TextColumn.h -+++ b/user/drbdmon/terminal/TextColumn.h -@@ -1,10 +1,9 @@ - #ifndef TEXTCOLUMN_H - #define TEXTCOLUMN_H - --#include --#include --#include -+#include - #include -+#include - - class TextColumn - { -diff --git a/user/drbdmon/terminal/colormodes.h b/user/drbdmon/terminal/colormodes.h -index ea8ac920ec57..b8d635e14886 100644 ---- a/user/drbdmon/terminal/colormodes.h -+++ b/user/drbdmon/terminal/colormodes.h -@@ -1,6 +1,8 @@ - #ifndef COLORMODES_H - #define COLORMODES_H - -+#include -+ - enum class color_mode : uint8_t - { - DARK_BG_256 = 0, -diff --git a/user/drbdmon/terminal/navigation.h b/user/drbdmon/terminal/navigation.h -index 84f112a858a5..76d94c512cad 100644 ---- a/user/drbdmon/terminal/navigation.h -+++ b/user/drbdmon/terminal/navigation.h -@@ -1,6 +1,7 @@ - #ifndef NAVIGATION_H - #define NAVIGATION_H - -+#include - #include - - namespace navigation -diff --git a/user/drbdmon/utils.h b/user/drbdmon/utils.h -index 4c1c13873d59..2fbb2b8a454a 100644 ---- a/user/drbdmon/utils.h -+++ b/user/drbdmon/utils.h -@@ -1,6 +1,7 @@ - #ifndef UTILS_H - #define UTILS_H - -+#include - #include - #include - #include --- -2.35.3 - diff --git a/0004-DRBDmon-Adjust-events-log-supplier-program-name.patch b/0004-DRBDmon-Adjust-events-log-supplier-program-name.patch new file mode 100644 index 0000000..7e43d7a --- /dev/null +++ b/0004-DRBDmon-Adjust-events-log-supplier-program-name.patch @@ -0,0 +1,25 @@ +From 4ecb776ed6b75d326624281b50f0a11adeca2e58 Mon Sep 17 00:00:00 2001 +From: Robert Altnoeder +Date: Wed, 20 Nov 2024 18:44:19 +0100 +Subject: [PATCH 04/12] DRBDmon: Adjust events log supplier program name + +--- + user/drbdmon/subprocess/EventsSourceSpawner.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/user/drbdmon/subprocess/EventsSourceSpawner.cpp b/user/drbdmon/subprocess/EventsSourceSpawner.cpp +index 20fa13bec0d8..1b50aa23b6d6 100644 +--- a/user/drbdmon/subprocess/EventsSourceSpawner.cpp ++++ b/user/drbdmon/subprocess/EventsSourceSpawner.cpp +@@ -21,7 +21,7 @@ const char* const EventsSourceSpawner::EVENTS_PROGRAM_ARGS[] = + "all", + nullptr + }; +-const char* const EventsSourceSpawner::SAVED_EVENTS_PROGRAM = "eventsfeeder"; ++const char* const EventsSourceSpawner::SAVED_EVENTS_PROGRAM = "drbd-events-log-supplier"; + + EventsSourceSpawner::EventsSourceSpawner(MessageLog& logRef): + log(logRef) +-- +2.43.0 + diff --git a/0005-DRBDmon-Add-drbd-events-log-supplier.patch b/0005-DRBDmon-Add-drbd-events-log-supplier.patch new file mode 100644 index 0000000..1c4d4de --- /dev/null +++ b/0005-DRBDmon-Add-drbd-events-log-supplier.patch @@ -0,0 +1,166 @@ +From 60c3ed545e1c36de25545656f5c6c586e548b852 Mon Sep 17 00:00:00 2001 +From: Robert Altnoeder +Date: Wed, 20 Nov 2024 18:44:41 +0100 +Subject: [PATCH 05/12] DRBDmon: Add drbd-events-log-supplier + +--- + user/drbdmon/drbd-events-log-supplier.cpp | 147 ++++++++++++++++++++++ + 1 file changed, 147 insertions(+) + create mode 100644 user/drbdmon/drbd-events-log-supplier.cpp + +diff --git a/user/drbdmon/drbd-events-log-supplier.cpp b/user/drbdmon/drbd-events-log-supplier.cpp +new file mode 100644 +index 000000000000..9fe48f0ccd71 +--- /dev/null ++++ b/user/drbdmon/drbd-events-log-supplier.cpp +@@ -0,0 +1,147 @@ ++#include ++#include ++#include ++#include ++ ++extern "C" ++{ ++ #include ++} ++ ++constexpr int ERR_OUT_OF_MEMORY = 2; ++constexpr int ERR_IO = 3; ++ ++const std::string INIT_STATE_SEPA("exists -"); ++const size_t INIT_STATE_SEPA_LENGTH = INIT_STATE_SEPA.length(); ++ ++int process_events(const std::string& path); ++bool is_init_state_sepa(const std::string& event_line); ++ ++/** ++ * DRBD events log file supplier for DRBDmon ++ */ ++int main(int argc, char* argv[]) ++{ ++ int exit_code = EXIT_FAILURE; ++ ++ try ++ { ++ if (argc == 2) ++ { ++ std::string path(argv[1]); ++ exit_code = process_events(path); ++ } ++ else ++ { ++ std::cerr << "DRBD Events Log File Supplier | Arguments:\n" << ++ " path .......... Path to a file containing DBRD event lines\n"; ++ } ++ } ++ catch (std::bad_alloc&) ++ { ++ std::cerr << "Out of memory" << std::endl; ++ exit_code = ERR_OUT_OF_MEMORY; ++ } ++ ++ std::cout << std::flush; ++ std::cerr << std::flush; ++ ++ return exit_code; ++} ++ ++/** ++ * Emits event lines from an events log file and appends the initial state separator ++ * if it is absent from the file. The output is stdout, which DRBDmon pipes to itself. ++ * ++ * DRBDmon recovers its events source process by respawning it if it exits for any reason. ++ * Therefore, this method does not return if successful, instead, it will ++ * suspend indefinitely. DRBDmon will terminate this process when the user exits DRBDmon. ++ */ ++int process_events(const std::string& path) ++{ ++ int rc = ERR_IO; ++ ++ // Internal pipe used for suspending execution ++ int pipe_fd[2]; ++ int pipe_rc = pipe(pipe_fd); ++ if (pipe_rc == 0) ++ { ++ std::ifstream in_file(path); ++ if (in_file.good()) ++ { ++ bool have_init_state_sepa = false; ++ ++ // Emit events from the file to DRBDmon ++ std::string event_line; ++ while (in_file.good()) ++ { ++ std::getline(in_file, event_line); ++ if (event_line.length() > 0) ++ { ++ std::cout << event_line << '\n'; ++ } ++ if (is_init_state_sepa(event_line)) ++ { ++ have_init_state_sepa = true; ++ } ++ ++ event_line.clear(); ++ } ++ ++ if (in_file.eof()) ++ { ++ // If there was no initial state separator in the events log file, ++ // emit one to DRBDmon ++ if (!have_init_state_sepa) ++ { ++ std::cout << INIT_STATE_SEPA << '\n'; ++ } ++ std::cout << std::flush; ++ ++ rc = EXIT_SUCCESS; ++ ++ // Suspend execution indefinitely. DRBDmon will terminate this process when it exits. ++ char in_char = 0; ++ const ssize_t read_count = read(pipe_fd[0], &in_char, 1); ++ // Nothing to do with that result... ++ static_cast (read_count); ++ } ++ else ++ { ++ // I/O failed before the entire file was processed, I/O error. ++ std::cerr << "I/O error while reading DRBD events file \"" << path << "\"\n"; ++ } ++ } ++ else ++ { ++ // Cannot open/read the file. Typically a non-existent path/file or permissions problem. ++ std::cerr << "I/O error, cannot read DRBD events file \"" << path << "\"\n"; ++ } ++ } ++ else ++ { ++ // Cannot create the pipe used for suspending. ++ // Typically a resource exhaustion problem, e.g. the OS being out of memory. ++ std::cerr << "I/O error, pipe creation failed\n"; ++ } ++ ++ return rc; ++} ++ ++/** ++ * Checks whether an events line is the initial state separator ++ */ ++bool is_init_state_sepa(const std::string& event_line) ++{ ++ bool result = false; ++ if (event_line.length() >= INIT_STATE_SEPA_LENGTH) ++ { ++ size_t idx = 0; ++ while (idx < INIT_STATE_SEPA_LENGTH && event_line[idx] == INIT_STATE_SEPA[idx]) ++ { ++ ++idx; ++ } ++ result = idx == INIT_STATE_SEPA_LENGTH; ++ } ++ return result; ++} +-- +2.43.0 + diff --git a/0006-DRBDmon-Adjust-Makefile.patch b/0006-DRBDmon-Adjust-Makefile.patch new file mode 100644 index 0000000..e43183b --- /dev/null +++ b/0006-DRBDmon-Adjust-Makefile.patch @@ -0,0 +1,76 @@ +From 5611462e6e157e23e9571bfd364cb22ec17b91b6 Mon Sep 17 00:00:00 2001 +From: Robert Altnoeder +Date: Wed, 20 Nov 2024 18:45:11 +0100 +Subject: [PATCH 06/12] DRBDmon: Adjust Makefile + +--- + drbd.spec.in | 1 + + user/drbdmon/Makefile.in | 10 ++++++++-- + 2 files changed, 9 insertions(+), 2 deletions(-) + +diff --git a/drbd.spec.in b/drbd.spec.in +index 0205776f2618..9559e2950e13 100644 +--- a/drbd.spec.in ++++ b/drbd.spec.in +@@ -155,6 +155,7 @@ This packages includes the DRBD administration tools. + %endif + %if %{with drbdmon} + %{_sbindir}/drbdmon ++%{_sbindir}/drbd-events-log-supplier + %endif + %if "%{initscripttype}" == "sysv" + %{_initddir}/drbd +diff --git a/user/drbdmon/Makefile.in b/user/drbdmon/Makefile.in +index 36673b19c857..9c5427e9b22a 100644 +--- a/user/drbdmon/Makefile.in ++++ b/user/drbdmon/Makefile.in +@@ -16,7 +16,7 @@ else + DESTDIR ?= / + endif + +-binaries := drbdmon ++binaries := drbdmon drbd-events-log-supplier + + ifeq ($(WITH_DRBDMON),yes) + all: $(binaries) +@@ -28,6 +28,7 @@ PHONY := all + + dsaext-obj := cppdsaext/src/dsaext.o + integerparse-obj := cppdsaext/src/integerparse.o ++supplier-obj := drbd-events-log-supplier.o + + l-obj := DrbdMon.o DrbdMonConsts.o MessageLog.o IntervalTimer.o SubProcessNotification.o + l-obj += MessageLogNotification.o +@@ -77,6 +78,9 @@ $(integerparse-obj): $(basename $(integerparse-obj)).cpp $(basename $(integerpar + drbdmon: $(ls-obj) + $(CXX) -o $@ $(CPPFLAGS) $(CXXFLAGS) $^ $(LIBS) + ++drbd-events-log-supplier: $(supplier-obj) ++ $(CXX) -o $@ $(CPPFLAGS) $(CXXFLAGS) $^ ++ + # do not try to rebuild Makefile itself + Makefile: ; + +@@ -89,16 +93,18 @@ Makefile: ; + install: + ifeq ($(WITH_DRBDMON),yes) + install -m 755 drbdmon $(DESTDIR)$(sbindir) ++ install -m 755 drbd-events-log-supplier $(DESTDIR)$(sbindir) + endif + + uninstall: + ifeq ($(WITH_DRBDMON),yes) + rm -f $(DESTDIR)$(sbindir)/drbdmon ++ rm -r $(DESTDIR)$(sbindir)/drbd-events-log-supplier + endif + + PHONY += clean distclean + clean: +- rm -f $(local-obj) $(dsaext-obj) $(integerparse-obj) $(binaries) ++ rm -f $(local-obj) $(dsaext-obj) $(integerparse-obj) $(supplier-obj) $(binaries) + distclean: clean + rm -f $(local-dep) + +-- +2.43.0 + diff --git a/0007-DRBDmon-Version-V1R4M1.patch b/0007-DRBDmon-Version-V1R4M1.patch new file mode 100644 index 0000000..a6cddb8 --- /dev/null +++ b/0007-DRBDmon-Version-V1R4M1.patch @@ -0,0 +1,24 @@ +From 17c3bc04145900b0039a686b4e2cc28f9d5f3859 Mon Sep 17 00:00:00 2001 +From: Robert Altnoeder +Date: Mon, 4 Nov 2024 19:13:46 +0100 +Subject: [PATCH 07/12] DRBDmon: Version V1R4M1 + +--- + user/drbdmon/DrbdMonConsts.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/user/drbdmon/DrbdMonConsts.cpp b/user/drbdmon/DrbdMonConsts.cpp +index 6b130db93156..5135d636bd2a 100644 +--- a/user/drbdmon/DrbdMonConsts.cpp ++++ b/user/drbdmon/DrbdMonConsts.cpp +@@ -7,6 +7,6 @@ extern "C" + } + + const std::string DrbdMonConsts::PROGRAM_NAME = "DRBDmon"; +-const std::string DrbdMonConsts::PROJECT_VERSION = "V1R4M0"; ++const std::string DrbdMonConsts::PROJECT_VERSION = "V1R4M1"; + const std::string DrbdMonConsts::UTILS_VERSION = PACKAGE_VERSION; + const std::string DrbdMonConsts::BUILD_HASH = GITHASH; +-- +2.43.0 + diff --git a/0008-drbdadm-add-proxy-options-to-add-connection-command.patch b/0008-drbdadm-add-proxy-options-to-add-connection-command.patch new file mode 100644 index 0000000..c03a4b6 --- /dev/null +++ b/0008-drbdadm-add-proxy-options-to-add-connection-command.patch @@ -0,0 +1,95 @@ +From 9dab78b5822d59a13e767ef20fdffab46f79cb25 Mon Sep 17 00:00:00 2001 +From: Joel Colledge +Date: Thu, 21 Nov 2024 09:55:26 +0100 +Subject: [PATCH 08/12] drbdadm: add proxy options to 'add connection' command + +Some options such as rcvbuf-size must be set before attempting to +connect. Proxy v3 used ugly hacks to allow time for the options to +arrive before connecting. Proxy v4 does not use this approach. Instead +it requires the options to be set on the command line for 'add +connection'. + +The additional options are ignored by Proxy v3 with a "trailing garbage" +warning. + +We continue to set the properties using 'set' commands as well to retain +compatibility with Proxy v3. Proxy v4 ignores 'set' commands which do +not change the value of the option. + +So this is compatible with Proxy v3 and v4. +--- + user/v9/drbdadm_main.c | 38 ++++++++++++++++++++++++++++++++++++-- + 1 file changed, 36 insertions(+), 2 deletions(-) + +diff --git a/user/v9/drbdadm_main.c b/user/v9/drbdadm_main.c +index 74cf60365a6d..a983a9463fb8 100644 +--- a/user/v9/drbdadm_main.c ++++ b/user/v9/drbdadm_main.c +@@ -2043,19 +2043,33 @@ char *_proxy_connection_name(char *conn_name, const struct d_resource *res, cons + return conn_name; + } + ++#define ADD_CONNECTION_MAX_LEN 4096 ++ + static int do_proxy_conn_up(const struct cfg_ctx *ctx) + { + const char *argv[4] = { drbd_proxy_ctl, "-c", NULL, NULL }; + struct connection *conn = ctx->conn; + struct path *path = STAILQ_FIRST(&conn->paths); /* multiple paths via proxy, later! */ + char *conn_name; ++ char *buffer; ++ char *buffer_pos; ++ int buffer_remaining; ++ int n; ++ struct d_option *opt; ++ int rv = -1; + + if (!path->my_proxy || !path->peer_proxy) + return 0; + + conn_name = proxy_connection_name(ctx->res, conn); + +- argv[2] = ssprintf( ++ buffer_remaining = ADD_CONNECTION_MAX_LEN; ++ buffer = checked_malloc(buffer_remaining); ++ buffer_pos = buffer; ++ ++ n = snprintf( ++ buffer_pos, ++ buffer_remaining, + "add connection %s %s:%s %s:%s %s:%s %s:%s", + conn_name, + path->my_proxy->inside.addr, +@@ -2066,8 +2080,28 @@ static int do_proxy_conn_up(const struct cfg_ctx *ctx) + path->my_proxy->outside.port, + path->my_address->addr, + path->my_address->port); ++ if (n < 0 || n >= buffer_remaining) ++ goto out; ++ buffer_pos += n; ++ buffer_remaining -= n; + +- return m_system_ex(argv, SLEEPS_SHORT, ctx->res->name); ++ STAILQ_FOREACH(opt, &path->my_proxy->options, link) { ++ n = snprintf( ++ buffer_pos, ++ buffer_remaining, ++ " --%s=%s", ++ opt->name, opt->value); ++ if (n < 0 || n >= buffer_remaining) ++ goto out; ++ buffer_pos += n; ++ buffer_remaining -= n; ++ } ++ ++ argv[2] = buffer; ++ rv = m_system_ex(argv, SLEEPS_SHORT, ctx->res->name); ++out: ++ free(buffer); ++ return rv; + } + + static int do_proxy_conn_plugins(const struct cfg_ctx *ctx) +-- +2.43.0 + diff --git a/0009-Do-not-hardcode-paths-in-services-and-scripts.patch b/0009-Do-not-hardcode-paths-in-services-and-scripts.patch new file mode 100644 index 0000000..be92e92 --- /dev/null +++ b/0009-Do-not-hardcode-paths-in-services-and-scripts.patch @@ -0,0 +1,309 @@ +by heming.zhao@suse.com +remove the patch of scripts/.gitignore for following complain msg: +``` ++ /usr/lib/rpm/rpmuncompress /usr/src/packages/SOURCES/0009-Do-not-hardcode-paths-in-services-and-scripts.patch ++ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f +The text leading up to this was: +-------------------------- +|diff --git a/scripts/.gitignore b/scripts/.gitignore +|index a307904047f8..ba121127c341 100644 +|--- a/scripts/.gitignore +|+++ b/scripts/.gitignore +-------------------------- +No file to patch. Skipping patch. +1 out of 1 hunk ignored +``` + +From 080e93bd9bcf546cd3a9870ae1add2469a2a4e24 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Moritz=20Wanzenb=C3=B6ck?= +Date: Fri, 20 Sep 2024 10:30:24 +0200 +Subject: [PATCH 09/12] Do not hardcode paths in services and scripts + +This fixes issues when drbd-utils get installed to non-standard locations. + +Since the autoconf generated Makefile should still allow override on install, +we have to use a new target to do our own expansion. The implementation is +lifted from the autconf manual: + + info autoconf "Installation Directory Variables" + +# Conflicts: +# scripts/.gitignore +# scripts/Makefile.in +--- + configure.ac | 2 +- + scripts/.gitignore | 8 +++++++ + scripts/Makefile.in | 23 +++++++++++++++---- + ...ce => drbd-demote-or-escalate@.service.in} | 2 +- + ...vice => drbd-graceful-shutdown.service.in} | 2 +- + scripts/drbd-promote@.service.in | 4 ++-- + ...-reconfigure-suspend-or-error@.service.in} | 4 ++-- + ...ervice-shim.sh => drbd-service-shim.sh.in} | 18 +++++++-------- + ...rvice => drbd-wait-promotable@.service.in} | 2 +- + scripts/{drbd.service => drbd.service.in} | 6 ++--- + scripts/{drbd@.service => drbd@.service.in} | 6 ++--- + .../{ocf.ra@.service => ocf.ra@.service.in} | 4 ++-- + 12 files changed, 51 insertions(+), 30 deletions(-) + rename scripts/{drbd-demote-or-escalate@.service => drbd-demote-or-escalate@.service.in} (92%) + rename scripts/{drbd-graceful-shutdown.service => drbd-graceful-shutdown.service.in} (88%) + rename scripts/{drbd-reconfigure-suspend-or-error@.service => drbd-reconfigure-suspend-or-error@.service.in} (71%) + rename scripts/{drbd-service-shim.sh => drbd-service-shim.sh.in} (81%) + rename scripts/{drbd-wait-promotable@.service => drbd-wait-promotable@.service.in} (84%) + rename scripts/{drbd.service => drbd.service.in} (80%) + rename scripts/{drbd@.service => drbd@.service.in} (87%) + rename scripts/{ocf.ra@.service => ocf.ra@.service.in} (85%) + +diff --git a/configure.ac b/configure.ac +index cd166bbafbc0..630163cee103 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -525,7 +525,7 @@ fi + + dnl The configuration files we create (from their .in template) + if test -z $SPECMODE; then +- AC_CONFIG_FILES(Makefile user/shared/Makefile user/v9/Makefile user/v84/Makefile scripts/Makefile scripts/drbd.rules user/windrbd/Makefile user/drbdmon/Makefile documentation/common/Makefile_v84_com documentation/common/Makefile_v9_com) ++ AC_CONFIG_FILES(Makefile user/shared/Makefile user/v9/Makefile user/v84/Makefile scripts/Makefile user/windrbd/Makefile user/drbdmon/Makefile documentation/common/Makefile_v84_com documentation/common/Makefile_v9_com) + AC_CONFIG_HEADERS(user/shared/config.h) + else + AC_CONFIG_FILES(drbd.spec) +diff --git a/scripts/Makefile.in b/scripts/Makefile.in +index 7652ee872500..001d08da54e4 100644 +--- a/scripts/Makefile.in ++++ b/scripts/Makefile.in +@@ -67,9 +67,20 @@ SYSTEMD_TEMPLATES += drbd-wait-promotable@.service + SYSTEMD_UNITS = drbd.service + SYSTEMD_UNITS += drbd-graceful-shutdown.service + +-SERVICE_TEMPLATES = drbd-promote@.service ++UDEV_TEMPLATES = drbd.rules + +-TEMPLATES := $(SERVICE_TEMPLATES) ++SERVICE_TEMPLATES = drbd.service ++SERVICE_TEMPLATES += drbd@.service ++SERVICE_TEMPLATES += drbd-demote-or-escalate@.service ++SERVICE_TEMPLATES += drbd-graceful-shutdown.service ++SERVICE_TEMPLATES += drbd-promote@.service ++SERVICE_TEMPLATES += drbd-reconfigure-suspend-or-error@.service ++SERVICE_TEMPLATES += drbd-wait-promotable@.service ++SERVICE_TEMPLATES += ocf.ra@.service ++ ++SCRIPT_TEMPLATES = drbd-service-shim.sh ++ ++TEMPLATES := $(SCRIPT_TEMPLATES) $(SERVICE_TEMPLATES) $(UDEV_TEMPLATES) + + # variables meant to be overridden from the make command line + ifeq ($(WITH_WINDRBD),yes) +@@ -82,7 +93,7 @@ all: $(TEMPLATES) + + install: install-utils install-udev install-xen install-heartbeat install-pacemaker install-rgmanager install-bashcompletion + +-install-utils: $(SERVICE_TEMPLATES) ++install-utils: $(SERVICE_TEMPLATES) $(SCRIPT_TEMPLATES) + install -d $(DESTDIR)$(LIBDIR) + # "sysv" or "both" + ifeq ($(subst both,sysv,$(initscripttype)),sysv) +@@ -172,7 +183,7 @@ ifeq ($(WITH_XEN),yes) + install -m 755 block-drbd $(DESTDIR)$(sysconfdir)/xen/scripts + endif + +-install-udev: ++install-udev: $(UDEV_TEMPLATES) + ifeq ($(WITH_UDEV),yes) + mkdir -p $(DESTDIR)$(udevrulesdir) + install -m 644 drbd.rules $(DESTDIR)$(udevrulesdir)/65-drbd.rules$(UDEV_RULE_SUFFIX) +@@ -214,7 +225,9 @@ Makefile.in: ; + Makefile: Makefile.in ../config.status + cd .. && ./config.status scripts/Makefile + +-edit = sed -e '' ++edit = sed -e '' \ ++ -e 's|@sbindir[@]|$(sbindir)|g' \ ++ -e 's|@libdir[@]|$(LIBDIR)|g' \ + + ifeq ($(SYSTEMD_EXEC_CONDITION),no) + edit += -e 's|^ExecCondition=|ExecStart=|' +diff --git a/scripts/drbd-demote-or-escalate@.service b/scripts/drbd-demote-or-escalate@.service.in +similarity index 92% +rename from scripts/drbd-demote-or-escalate@.service +rename to scripts/drbd-demote-or-escalate@.service.in +index 2093223847b4..f5e123199323 100644 +--- a/scripts/drbd-demote-or-escalate@.service ++++ b/scripts/drbd-demote-or-escalate@.service.in +@@ -28,5 +28,5 @@ TimeoutSec=60 + # "Type=forking" would be an option to have it retry a number of times, + # and then only escalate to FailureAction if that did not help. + Type=oneshot +-ExecStart=/lib/drbd/scripts/drbd-service-shim.sh secondary-or-escalate %I ++ExecStart=@libdir@/scripts/drbd-service-shim.sh secondary-or-escalate %I + ExecStopPost=-/bin/journalctl --sync +diff --git a/scripts/drbd-graceful-shutdown.service b/scripts/drbd-graceful-shutdown.service.in +similarity index 88% +rename from scripts/drbd-graceful-shutdown.service +rename to scripts/drbd-graceful-shutdown.service.in +index b6e8a149d051..6118d880d8fb 100644 +--- a/scripts/drbd-graceful-shutdown.service ++++ b/scripts/drbd-graceful-shutdown.service.in +@@ -13,4 +13,4 @@ Before=drbd.service drbd@.service + Type=oneshot + RemainAfterExit=yes + +-ExecStop=/lib/drbd/scripts/drbd-service-shim.sh down all ++ExecStop=@libdir@/scripts/drbd-service-shim.sh down all +diff --git a/scripts/drbd-promote@.service.in b/scripts/drbd-promote@.service.in +index 71345d9b723d..23e74c282250 100644 +--- a/scripts/drbd-promote@.service.in ++++ b/scripts/drbd-promote@.service.in +@@ -24,5 +24,5 @@ RemainAfterExit=yes + # (ab)using systemd features + # if we cannot configure and promote, that's a condition, not a failure + # See the comment above wrt. FailureAction vs OnFailure +-ExecCondition=/lib/drbd/scripts/drbd-service-shim.sh primary %I +-ExecStop=/lib/drbd/scripts/drbd-service-shim.sh secondary %I ++ExecCondition=@libdir@/scripts/drbd-service-shim.sh primary %I ++ExecStop=@libdir@/scripts/drbd-service-shim.sh secondary %I +diff --git a/scripts/drbd-reconfigure-suspend-or-error@.service b/scripts/drbd-reconfigure-suspend-or-error@.service.in +similarity index 71% +rename from scripts/drbd-reconfigure-suspend-or-error@.service +rename to scripts/drbd-reconfigure-suspend-or-error@.service.in +index c0e59e5e72d3..6a0a2584e3a6 100644 +--- a/scripts/drbd-reconfigure-suspend-or-error@.service ++++ b/scripts/drbd-reconfigure-suspend-or-error@.service.in +@@ -10,5 +10,5 @@ RefuseManualStop=yes + SyslogIdentifier=drbd-%I + Type=oneshot + RemainAfterExit=yes +-ExecStop=-/usr/sbin/drbdsetup resource-options --on-no-quorum io-error --on-no-data io-error %I +-ExecStart=-/usr/sbin/drbdsetup resource-options --on-no-quorum suspend-io --on-no-data suspend-io %I ++ExecStop=-@sbindir@/drbdsetup resource-options --on-no-quorum io-error --on-no-data io-error %I ++ExecStart=-@sbindir@/drbdsetup resource-options --on-no-quorum suspend-io --on-no-data suspend-io %I +diff --git a/scripts/drbd-service-shim.sh b/scripts/drbd-service-shim.sh.in +similarity index 81% +rename from scripts/drbd-service-shim.sh +rename to scripts/drbd-service-shim.sh.in +index 786387463891..56029bdcebe2 100755 +--- a/scripts/drbd-service-shim.sh ++++ b/scripts/drbd-service-shim.sh.in +@@ -14,7 +14,7 @@ secondary_check() { + local ex_secondary current_state opts + opts="$1" + +- /usr/sbin/drbdsetup secondary $opts "$res" ++ @sbindir@/drbdsetup secondary $opts "$res" + ex_secondary=$? + case $ex_secondary in + 0) +@@ -26,7 +26,7 @@ secondary_check() { + # any other special treatment for special exit codes? + *) + # double check for "resource does not exist" +- current_state=$(/usr/sbin/drbdsetup events2 --now "$res") ++ current_state=$(@sbindir@/drbdsetup events2 --now "$res") + if [[ $current_state = "exists -" ]]; then + echo >&2 "<7>not even configured" + return 0 +@@ -40,23 +40,23 @@ secondary_check() { + + case "$cmd" in + adjust) +- exec /usr/sbin/drbdadm adjust "$res" ++ exec @sbindir@/drbdadm adjust "$res" + ;; + down) +- exec /usr/sbin/drbdsetup down "$res" ++ exec @sbindir@/drbdsetup down "$res" + ;; + primary) +- exec /usr/sbin/drbdsetup primary "$res" ++ exec @sbindir@/drbdsetup primary "$res" + ;; + secondary) +- exec /usr/sbin/drbdsetup secondary "$res" ++ exec @sbindir@/drbdsetup secondary "$res" + ;; + secondary-force) +- exec /usr/sbin/drbdsetup secondary --force=yes "$res" ++ exec @sbindir@/drbdsetup secondary --force=yes "$res" + ;; + secondary-secondary-force) +- /usr/sbin/drbdsetup secondary "$res" && exit 0 +- exec /usr/sbin/drbdsetup secondary --force=yes "$res" ++ @sbindir@/drbdsetup secondary "$res" && exit 0 ++ exec @sbindir@/drbdsetup secondary --force=yes "$res" + ;; + secondary*-or-escalate) + # Log something and try to get journald to flush its logs +diff --git a/scripts/drbd-wait-promotable@.service b/scripts/drbd-wait-promotable@.service.in +similarity index 84% +rename from scripts/drbd-wait-promotable@.service +rename to scripts/drbd-wait-promotable@.service.in +index 81c3789f5a4c..f416274839e9 100644 +--- a/scripts/drbd-wait-promotable@.service ++++ b/scripts/drbd-wait-promotable@.service.in +@@ -10,7 +10,7 @@ Type=oneshot + + # on first start, wait for access to "good data" + # let systemd handle timeouts +-ExecStart=/lib/drbd/scripts/drbd-wait-promotable.sh %I ++ExecStart=@libdir@/scripts/drbd-wait-promotable.sh %I + RemainAfterExit=yes + + [Install] +diff --git a/scripts/drbd.service b/scripts/drbd.service.in +similarity index 80% +rename from scripts/drbd.service +rename to scripts/drbd.service.in +index 96c599e75042..8bfeb17cb91d 100644 +--- a/scripts/drbd.service ++++ b/scripts/drbd.service.in +@@ -12,11 +12,11 @@ RemainAfterExit=yes + # A check for INIT_VERSION already exists, just set it to something. + Environment=INIT_VERSION=systemd + +-ExecStart=/lib/drbd/scripts/drbd start +-ExecStop=/lib/drbd/scripts/drbd stop ++ExecStart=@libdir@/scripts/drbd start ++ExecStop=@libdir@/scripts/drbd stop + + # Re-adjust everything on reload +-ExecReload=/lib/drbd/scripts/drbd reload ++ExecReload=@libdir@/scripts/drbd reload + + [Install] + WantedBy=multi-user.target +diff --git a/scripts/drbd@.service b/scripts/drbd@.service.in +similarity index 87% +rename from scripts/drbd@.service +rename to scripts/drbd@.service.in +index 0fad10be237e..ab1c044cdeb1 100644 +--- a/scripts/drbd@.service ++++ b/scripts/drbd@.service.in +@@ -35,8 +35,8 @@ RemainAfterExit=yes + + # depends... do we want this as ExecCondition or as ExecStart + # failed start is "failed", failed condition is just "not startable yet" +-ExecStart=/lib/drbd/scripts/drbd-service-shim.sh adjust %I +-ExecReload=/lib/drbd/scripts/drbd-service-shim.sh adjust %I ++ExecStart=@libdir@/scripts/drbd-service-shim.sh adjust %I ++ExecReload=@libdir@/scripts/drbd-service-shim.sh adjust %I + + # can only succeed, if you first stop all depending services +-ExecStopPost=/lib/drbd/scripts/drbd-service-shim.sh down %I ++ExecStopPost=@libdir@/scripts/drbd-service-shim.sh down %I +diff --git a/scripts/ocf.ra@.service b/scripts/ocf.ra@.service.in +similarity index 85% +rename from scripts/ocf.ra@.service +rename to scripts/ocf.ra@.service.in +index 9c2268a615a7..4779706a8853 100644 +--- a/scripts/ocf.ra@.service ++++ b/scripts/ocf.ra@.service.in +@@ -22,5 +22,5 @@ Environment=monitor_inverval=30 + # Only the first argument is used by the wrapper, + # the %n is just to identify which is which in the process list. + # All parameterization is done via Environment= in per instance override.conf +-ExecStart=/lib/drbd/scripts/ocf.ra.wrapper.sh start-and-monitor %n +-ExecStopPost=/lib/drbd/scripts/ocf.ra.wrapper.sh stop %n ++ExecStart=@libdir@/scripts/ocf.ra.wrapper.sh start-and-monitor %n ++ExecStopPost=@libdir@/scripts/ocf.ra.wrapper.sh stop %n +-- +2.43.0 + diff --git a/0010-Fix-typo-in-warning-there-is-no-po4a-translage-comma.patch b/0010-Fix-typo-in-warning-there-is-no-po4a-translage-comma.patch new file mode 100644 index 0000000..280697c --- /dev/null +++ b/0010-Fix-typo-in-warning-there-is-no-po4a-translage-comma.patch @@ -0,0 +1,25 @@ +From ee3ab4a67f15fadff72995e45defcbf1e944c9bd Mon Sep 17 00:00:00 2001 +From: Ulf 'Tiggi' Tigerstedt +Date: Mon, 16 Dec 2024 15:54:37 +0200 +Subject: [PATCH 10/12] Fix typo in warning, there is no po4a-translage command + +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 630163cee103..4377f3c24a08 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -332,7 +332,7 @@ else + fi + + if test -z $PO4A_TRANSLATE; then +- AC_MSG_WARN([Cannot build man pages without po4a-translage. You may safely ignore this warning when building from a tarball.]) ++ AC_MSG_WARN([Cannot build man pages without po4a-translate. You may safely ignore this warning when building from a tarball.]) + dnl default to some sane value at least, + dnl so the error message about command not found makes sense + PO4A_TRANSLATE=po4a-translate +-- +2.43.0 + diff --git a/0011-drbd.ocf-explicitly-timeout-crm_master-IPC-early.patch b/0011-drbd.ocf-explicitly-timeout-crm_master-IPC-early.patch new file mode 100644 index 0000000..a3df496 --- /dev/null +++ b/0011-drbd.ocf-explicitly-timeout-crm_master-IPC-early.patch @@ -0,0 +1,115 @@ +From 077a313e9fcacf0b12a35e8094bfdba6ac8aa0d4 Mon Sep 17 00:00:00 2001 +From: Lars Ellenberg +Date: Fri, 6 Dec 2024 15:31:01 +0100 +Subject: [PATCH 11/12] drbd.ocf: explicitly timeout crm_master IPC early + +Some environments are notorious for timing out in crm_master +one out of ten thousand times. You don't want to know the details. + +That would then cause a timeout on the monitor action, +and pacemaker would feel the need to "recover" from "resource failure", +spuriously restarting everything that depends on the DRBD resources. + +If we fail to update the "master score" in time, +we can still report the operation result. + +The next monitor action will happen, +and we get an other attempt at updating the master score. + +If that update was relevant, worst case it is now delayed. +Better than the previous worst case, operation timeout +interpreted as resource failure. +--- + scripts/drbd.ocf | 44 +++++++++++++++++++++++++++++++++++++++----- + 1 file changed, 39 insertions(+), 5 deletions(-) + +diff --git a/scripts/drbd.ocf b/scripts/drbd.ocf +index 1d051baa550d..c31858343ba4 100755 +--- a/scripts/drbd.ocf ++++ b/scripts/drbd.ocf +@@ -53,6 +53,7 @@ + # OCF_RESKEY_CRM_meta_master_max + # OCF_RESKEY_CRM_meta_master_node_max + # ++# OCF_RESKEY_CRM_meta_timeout + # OCF_RESKEY_CRM_meta_interval + # + # OCF_RESKEY_CRM_meta_notify +@@ -515,22 +516,55 @@ if $USE_DEBUG_LOG ; then + fi + + do_cmd_success_log_level="" +-do_cmd() { ++do_cmd() { __do_cmd_with_timeout "" "$@"; } ++do_cmd_CRM_meta_timeout() ++{ ++ local timeout=$(( ($OCF_RESKEY_CRM_meta_timeout - 500 - $SECONDS*1000) / 1000 )) ++ # if we are short on time already, ++ # try to get away with whatever time is left ++ (( timeout > 0 )) || timeout=0 ++ __do_cmd_with_timeout "$timeout" "$@"; ++} ++__do_cmd_with_timeout() { + # Run a command, return its exit code, capture any output, and log + # everything if appropriate. ++ # use coreutils "timeout", if timeout is != 0. ++ local timeout=$1; shift + local cmd="$*" cmd_out cmd_err ret=125 + local success_log_level=${do_cmd_success_log_level:-debug} + local failure_log_level=${do_cmd_failure_log_level:-err} + ocf_log debug "$DRBD_RESOURCE: Calling $cmd" + ++ if [[ $timeout =~ ^[1-9][0-9]*$ ]]; then ++ timeout="-t $timeout" ++ else ++ timeout="" ++ fi ++ ++ local pipe ++ local pipe_pid ++ local result ++ + # capture stdout, stderr, and exit code +- eval "$(exec 3>&1; ++ if exec {pipe}< <(exec 3>&1; + printf "cmd_err=%q\n" \ + "$( exec 2>&1 1>&3 3>&-; \ + out=$( "$@" ); \ + ex=$?; \ + printf "cmd_out=%q\nret=%q\n" "$out" "$ex" )" +- )" ++ ) ++ then ++ pipe_pid=$! ++ ++ read -r -d "" -u $pipe $timeout result ++ if (( $? > 128 )) ; then ++ kill -KILL $pipe_pid ++ # wait $pipe_pid ++ fi ++ exec {pipe}<&- ++ ++ eval "$result" ++ fi + + if [ $ret != 0 ]; then + ocf_log $failure_log_level "$DRBD_RESOURCE: Called $cmd" +@@ -585,13 +619,13 @@ set_master_score() { + if [[ $1 -le 0 ]]; then + remove_master_score + else +- do_cmd ${HA_SBIN_DIR}/crm_master -Q -l reboot -v $1 && ++ do_cmd_CRM_meta_timeout ${HA_SBIN_DIR}/crm_master -Q -l reboot -v $1 && + current_master_score=$1 + fi + } + + remove_master_score() { +- do_cmd ${HA_SBIN_DIR}/crm_master -l reboot -D ++ do_cmd_CRM_meta_timeout ${HA_SBIN_DIR}/crm_master -l reboot -D + current_master_score="" + } + +-- +2.43.0 + diff --git a/0012-drbd.ocf-the-text-output-of-crm_resource-locate-has-.patch b/0012-drbd.ocf-the-text-output-of-crm_resource-locate-has-.patch new file mode 100644 index 0000000..822af4d --- /dev/null +++ b/0012-drbd.ocf-the-text-output-of-crm_resource-locate-has-.patch @@ -0,0 +1,32 @@ +From 0a014f290802e0221d06bb52a74c2e29f11ef02e Mon Sep 17 00:00:00 2001 +From: Lars Ellenberg +Date: Fri, 6 Dec 2024 15:35:58 +0100 +Subject: [PATCH 12/12] drbd.ocf: the text output of "crm_resource --locate" + has changed + +"Recent" Pacemaker reports "Promoted" instead of "Master" for promoted resources. +Recognize that. + +This change was made quite a while ago, but the resource agent parameter + remove_master_score_if_peer_primary=unexpected +is little known and rarely in use, so no-one noticed. +--- + scripts/drbd.ocf | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/scripts/drbd.ocf b/scripts/drbd.ocf +index c31858343ba4..34d208f22dd5 100755 +--- a/scripts/drbd.ocf ++++ b/scripts/drbd.ocf +@@ -1021,7 +1021,7 @@ crm_resource_locate_master() + called_crm_resource_locate=true + DRBD_PRIMARY_PEER_according_to_pcmk=$( + crm_resource --resource "$OCF_RESOURCE_INSTANCE" --locate 2>/dev/null | +- sed -ne 's/^.*is running on: \([^ ]*\) Master.*$/\1/p' | ++ sed -ne 's/^.*is running on: \([^ ]*\) \(Master\|Promoted\).*$/\1/p' | + grep -vix -m1 -e "$HOSTNAME") + } + +-- +2.43.0 + diff --git a/bsc-1219263_crm-fence-peer.9.sh-fix-parsing-in_ccm-crmd-fields-o.patch b/bsc-1219263_crm-fence-peer.9.sh-fix-parsing-in_ccm-crmd-fields-o.patch deleted file mode 100644 index 9e9b102..0000000 --- a/bsc-1219263_crm-fence-peer.9.sh-fix-parsing-in_ccm-crmd-fields-o.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 6d5cb4c97031f28ae70406145aa437b3107246e6 Mon Sep 17 00:00:00 2001 -From: Su Yue -Date: Sun, 3 Mar 2024 16:36:54 +0800 -Subject: [PATCH 1/2] crm-fence-peer.9.sh: fix parsing in_ccm crmd fields of - node_state with Pacemaker 2.1.7 - -If pacemaker version < 2.1.7, in_ccm of node_state is "true" or "false" -and crmd is "online" or "offline". - -pacemaker 2.1.7 changed the two fields into timestamps. -For in_ccm, the value is timestamp since when node has been a cluster -member("true"). A value 0 of means the node is not a cluster member("false"). -For crmd, the value is timestamp since when peer has been online in -CPG("online"). A value 0 means the peer is offline in CPG("offline"). - -The original code doesn't handle these fields in timestamp format. -Since there are many comprare of strings in context, converting in_ccm and crmd -from timestamps/0 to old strings is simpler and clearer. - -Link: https://github.com/ClusterLabs/pacemaker/blob/Pacemaker-2.1.7/lib/pengine/unpack.c#L1581 -Signed-off-by: Su Yue ---- - scripts/crm-fence-peer.9.sh | 25 +++++++++++++++++++++++++ - 1 file changed, 25 insertions(+) - -diff --git a/scripts/crm-fence-peer.9.sh b/scripts/crm-fence-peer.9.sh -index 44da6516bf3f..a3353a7354a6 100755 ---- a/scripts/crm-fence-peer.9.sh -+++ b/scripts/crm-fence-peer.9.sh -@@ -888,6 +888,31 @@ guess_if_pacemaker_will_fence() - esac - done - -+ # Copied from pacemaker-2.1.7:lib/pengine/unpack.c: -+ # Since crm_feature_set 3.18.0 (pacemaker-2.1.7): -+ # -+ # - in_ccm ::= |0 -+ # Since when node has been a cluster member. A value 0 of means the -+ # node is not a cluster member. -+ # - crmd ::= |0 -+ # Since when peer has been online in CPG. A value 0 means the peer -+ # is offline in CPG. -+ if [[ $in_ccm =~ ^[0-9]+$ ]]; then -+ if [[ $in_ccm = "0" ]]; then -+ in_ccm="false" -+ else -+ in_ccm="true" -+ fi -+ fi -+ -+ if [[ $crmd =~ ^[0-9]+$ ]]; then -+ if [[ $crmd = "0" ]]; then -+ crmd="offline" -+ else -+ crmd="online" -+ fi -+ fi -+ - # if it is not enabled, no point in waiting for it. - if ! $stonith_enabled ; then - # "normalize" the rest of the logic --- -2.44.0 - diff --git a/bsc-1219263_crm-fence-peer.9.sh-use-join-of-node_state-to-judge-.patch b/bsc-1219263_crm-fence-peer.9.sh-use-join-of-node_state-to-judge-.patch deleted file mode 100644 index df32764..0000000 --- a/bsc-1219263_crm-fence-peer.9.sh-use-join-of-node_state-to-judge-.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 922e6702cb7a089102f4843b2994ef0749c41573 Mon Sep 17 00:00:00 2001 -From: Su Yue -Date: Sun, 3 Mar 2024 16:56:38 +0800 -Subject: [PATCH 2/2] crm-fence-peer.9.sh: use join of node_state to judge - whether node is banned - -crmd in node_state can't be "banned". join should be used instead -of crmd. - -Signed-off-by: Su Yue ---- - scripts/crm-fence-peer.9.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/scripts/crm-fence-peer.9.sh b/scripts/crm-fence-peer.9.sh -index a3353a7354a6..b326a1656c15 100755 ---- a/scripts/crm-fence-peer.9.sh -+++ b/scripts/crm-fence-peer.9.sh -@@ -934,7 +934,7 @@ guess_if_pacemaker_will_fence() - - # for further inspiration, see pacemaker:lib/pengine/unpack.c, determine_online_status_fencing() - [[ -z $in_ccm ]] && will_fence=true -- [[ $crmd = "banned" ]] && will_fence=true -+ [[ $join = "banned" ]] && will_fence=true - if [[ ${expected-down} = "down" && $in_ccm = "false" && $crmd != "online" ]]; then - : "pacemaker considers this as clean down" - elif [[ $in_ccm = false ]] || [[ $crmd != "online" ]]; then --- -2.44.0 - diff --git a/bsc-1233273_drbd.ocf-replace-crm_master-with-ocf_promotion_score.patch b/bsc-1233273_drbd.ocf-replace-crm_master-with-ocf_promotion_score.patch index 4869141..cd7ca35 100644 --- a/bsc-1233273_drbd.ocf-replace-crm_master-with-ocf_promotion_score.patch +++ b/bsc-1233273_drbd.ocf-replace-crm_master-with-ocf_promotion_score.patch @@ -57,15 +57,15 @@ index 1d051baa550d..133aff737455 100755 if [[ $1 -le 0 ]]; then remove_master_score else -- do_cmd ${HA_SBIN_DIR}/crm_master -Q -l reboot -v $1 && -+ do_cmd ocf_promotion_score -Q -v $1 && +- do_cmd_CRM_meta_timeout ${HA_SBIN_DIR}/crm_master -Q -l reboot -v $1 && ++ do_cmd_CRM_meta_timeout ocf_promotion_score -Q -v $1 && current_master_score=$1 fi } remove_master_score() { -- do_cmd ${HA_SBIN_DIR}/crm_master -l reboot -D -+ do_cmd ocf_promotion_score -D +- do_cmd_CRM_meta_timeout ${HA_SBIN_DIR}/crm_master -l reboot -D ++ do_cmd_CRM_meta_timeout ocf_promotion_score -D current_master_score="" } diff --git a/bsc-1233273_drbd.ocf-update-regex-of-sed-for-new-output-from-crm.patch b/bsc-1233273_drbd.ocf-update-regex-of-sed-for-new-output-from-crm.patch deleted file mode 100644 index 84f9625..0000000 --- a/bsc-1233273_drbd.ocf-update-regex-of-sed-for-new-output-from-crm.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 4efed473e70c91487f7834f8bf536970e9389f3f Mon Sep 17 00:00:00 2001 -From: Su Yue -Date: Sun, 7 Jul 2024 16:05:42 +0800 -Subject: [PATCH 2/3] drbd.ocf: update regex of sed for new output from - crm_resource - -Since Pacemaker-2.1.0 -crm_resource --resource "$OCF_RESOURCE_INSTANCE" --locate outputs -'resource promotable-clone is running on: cluster02 Promoted' -was -'resource promotable-clone is running on: cluster02 Master'. - -So update the regular expression. - -Signed-off-by: Su Yue ---- - scripts/drbd.ocf | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/scripts/drbd.ocf b/scripts/drbd.ocf -index 133aff737455..bbe25f38edda 100755 ---- a/scripts/drbd.ocf -+++ b/scripts/drbd.ocf -@@ -999,7 +999,7 @@ crm_resource_locate_master() - called_crm_resource_locate=true - DRBD_PRIMARY_PEER_according_to_pcmk=$( - crm_resource --resource "$OCF_RESOURCE_INSTANCE" --locate 2>/dev/null | -- sed -ne 's/^.*is running on: \([^ ]*\) Master.*$/\1/p' | -+ sed -ne 's/^.*is running on: \([^ ]*\) \(Master\|Promoted\).*$/\1/p' | - grep -vix -m1 -e "$HOSTNAME") - } - --- -2.45.2 - diff --git a/drbd-utils-9.25.0.tar.gz b/drbd-utils-9.25.0.tar.gz deleted file mode 100644 index 69e87f5..0000000 --- a/drbd-utils-9.25.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6e5baf2b725d742fa285bf7469264acab771365ea9b438fb9683fa4d347c6b07 -size 1406804 diff --git a/drbd-utils-9.29.0.tar.gz b/drbd-utils-9.29.0.tar.gz new file mode 100644 index 0000000..8e98e20 --- /dev/null +++ b/drbd-utils-9.29.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2b651b9d3cfbbf87d39e0930b3e3b8d39007c864e222d7bcf0dca3b91f7ef1e7 +size 1287756 diff --git a/drbd-utils.changes b/drbd-utils.changes index 42e4a2e..514a7b9 100644 --- a/drbd-utils.changes +++ b/drbd-utils.changes @@ -1,3 +1,94 @@ +------------------------------------------------------------------- +Wed Jan 8 07:42:00 UTC 2025 - Heming Zhao + +- Update drbd-utils from 9.25.0 to 9.29.0 + + * Changelog from Linbit: + + 9.29.0 + ----------- + * drbdmeta: fix initialization for external md + * build: allow disbling keyutils + * tests: export sanitized environment + * drbdmon: various improvements + * build: add cyclonedx + * drbsetup,v9: fix multiple paths drbdsetup show --json + strictly spreaking breaking change, but maily used internally + * events2: expose if device is open + * drbdadm: fix undefined behavior that triggered on amd64 + * shared: fix out-of-bounds access in parsing + * drbsetup,v9: event consistency with peer devices + * drbdadm: fix parsing of v8.4 configs for compatibility + * drbdmeta: fix segfault for check-resize on intentionally diskless + * drbd-promote@.service: check if ExecCondition is available + + 9.28.0 + ----------- + * events2: set may_promote:no promotion_score:0 while + force-io-failure:yes + * drbdsetup,v9: show TLS in connection status + * drbdsetup,v9: add udev command + * 8.3: remove + * crm-fence-peer.9.sh: fixes for pacemaker 2.1.7 + * events2: improved out of order message handling + + 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 + + * remove patches which are already included in upstream code: + 0001-drbdadm-v9-do-not-segfault-when-re-configuring-proxy.patch + 0002-user-drbrdmon-add-missing-stdint.h-includes.patch + 0003-Introduce-default_types.h-header.patch + bsc-1219263_crm-fence-peer.9.sh-fix-parsing-in_ccm-crmd-fields-o.patch + bsc-1219263_crm-fence-peer.9.sh-use-join-of-node_state-to-judge-.patch + bsc-1233273_drbd.ocf-update-regex-of-sed-for-new-output-from-crm.patch + usrmerge_move_lib_to_prefix_lib.patch + + * add upstream patches to align commit 0a014f290802: + 0001-drbd-verify.py-relax-host-key-checking.patch + 0002-DRBDmon-Disabled-DRBD-commands-warning-only-for-actu.patch + 0003-DRBDmon-Integrate-global-local-command-delegation.patch + 0004-DRBDmon-Adjust-events-log-supplier-program-name.patch + 0005-DRBDmon-Add-drbd-events-log-supplier.patch + 0006-DRBDmon-Adjust-Makefile.patch + 0007-DRBDmon-Version-V1R4M1.patch + 0008-drbdadm-add-proxy-options-to-add-connection-command.patch + 0009-Do-not-hardcode-paths-in-services-and-scripts.patch + 0010-Fix-typo-in-warning-there-is-no-po4a-translage-comma.patch + 0011-drbd.ocf-explicitly-timeout-crm_master-IPC-early.patch + 0012-drbd.ocf-the-text-output-of-crm_resource-locate-has-.patch + + * update patches according to source code changes: + bsc-1233273_drbd.ocf-replace-crm_master-with-ocf_promotion_score.patch + fence-after-pacemaker-down.patch + + * modify upstream patch for passing build: + 0009-Do-not-hardcode-paths-in-services-and-scripts.patch + + * add new service: + drbd-graceful-shutdown.service + + * add new binrary: + drbd-events-log-supplier + ------------------------------------------------------------------- Tue Nov 12 10:00:52 UTC 2024 - Glass Su diff --git a/drbd-utils.spec b/drbd-utils.spec index 7d06118..32143ad 100644 --- a/drbd-utils.spec +++ b/drbd-utils.spec @@ -1,7 +1,7 @@ # # spec file for package drbd-utils # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,7 +16,7 @@ # -%define services drbd.service drbd-lvchange@.service drbd-promote@.service drbd-demote-or-escalate@.service drbd-reconfigure-suspend-or-error@.service drbd-services@.target drbd-wait-promotable@.service drbd@.service drbd@.target ocf.ra@.service +%define services drbd.service drbd-graceful-shutdown.service drbd-lvchange@.service drbd-promote@.service drbd-demote-or-escalate@.service drbd-reconfigure-suspend-or-error@.service drbd-services@.target drbd-wait-promotable@.service drbd@.service drbd@.target ocf.ra@.service %if 0%{?suse_version} < 1550 # for SLEs %define sbindir /sbin @@ -32,7 +32,7 @@ # Only need po4a to build man from git source code %bcond_without prebuiltman Name: drbd-utils -Version: 9.25.0 +Version: 9.29.0 Release: 0 Summary: Distributed Replicated Block Device License: GPL-2.0-or-later @@ -43,23 +43,28 @@ Source100: %{name}.rpmlintrc ############################################# # Upstream patches -Patch0001: 0001-drbdadm-v9-do-not-segfault-when-re-configuring-proxy.patch -Patch0002: 0002-user-drbrdmon-add-missing-stdint.h-includes.patch -Patch0003: 0003-Introduce-default_types.h-header.patch +Patch0001: 0001-drbd-verify.py-relax-host-key-checking.patch +Patch0002: 0002-DRBDmon-Disabled-DRBD-commands-warning-only-for-actu.patch +Patch0003: 0003-DRBDmon-Integrate-global-local-command-delegation.patch +Patch0004: 0004-DRBDmon-Adjust-events-log-supplier-program-name.patch +Patch0005: 0005-DRBDmon-Add-drbd-events-log-supplier.patch +Patch0006: 0006-DRBDmon-Adjust-Makefile.patch +Patch0007: 0007-DRBDmon-Version-V1R4M1.patch +Patch0008: 0008-drbdadm-add-proxy-options-to-add-connection-command.patch +Patch0009: 0009-Do-not-hardcode-paths-in-services-and-scripts.patch +Patch0010: 0010-Fix-typo-in-warning-there-is-no-po4a-translage-comma.patch +Patch0011: 0011-drbd.ocf-explicitly-timeout-crm_master-IPC-early.patch +Patch0012: 0012-drbd.ocf-the-text-output-of-crm_resource-locate-has-.patch # SUSE specific patches Patch1001: init-script-fixes.diff -Patch1002: usrmerge_move_lib_to_prefix_lib.patch -Patch1003: fence-after-pacemaker-down.patch -Patch1004: bsc-1032142_Disable-quorum-in-default-configuration.patch -Patch1005: move_fencing_from_disk_to_net_in_example.patch -Patch1006: pie-fix.patch -Patch1007: bsc-1219263_crm-fence-peer.9.sh-fix-parsing-in_ccm-crmd-fields-o.patch -Patch1008: bsc-1219263_crm-fence-peer.9.sh-use-join-of-node_state-to-judge-.patch -Patch1009: bsc-1233273_drbd.ocf-replace-crm_master-with-ocf_promotion_score.patch -Patch1010: bsc-1233273_drbd.ocf-update-regex-of-sed-for-new-output-from-crm.patch -Patch1011: bsc-1233273_drbd.ocf-update-for-OCF-1.1.patch -Patch1099: rpmlint-build-error.patch +Patch1002: fence-after-pacemaker-down.patch +Patch1003: bsc-1032142_Disable-quorum-in-default-configuration.patch +Patch1004: move_fencing_from_disk_to_net_in_example.patch +Patch1005: pie-fix.patch +Patch1006: bsc-1233273_drbd.ocf-replace-crm_master-with-ocf_promotion_score.patch +Patch1007: bsc-1233273_drbd.ocf-update-for-OCF-1.1.patch +Patch1008: rpmlint-build-error.patch ############################################# Provides: drbd-bash-completion = %{version} @@ -214,6 +219,7 @@ fi %{sbindir}/drbdmeta %if %{with drbdmon} %{sbindir}/drbdmon +%{sbindir}/drbd-events-log-supplier %endif %ifarch %{ix86} x86_64 %dir %attr(700,root,root) %{_sysconfdir}/xen @@ -225,6 +231,7 @@ fi %{_prefix}/lib/ocf/resource.d/linbit/drbd.shellfuncs.sh %{_udevrulesdir}/65-drbd.rules %{_unitdir}/drbd.service +%{_unitdir}/drbd-graceful-shutdown.service %{_unitdir}/drbd-lvchange@.service %{_unitdir}/drbd-promote@.service %{_unitdir}/drbd-demote-or-escalate@.service diff --git a/fence-after-pacemaker-down.patch b/fence-after-pacemaker-down.patch index 97fa568..5172a5a 100644 --- a/fence-after-pacemaker-down.patch +++ b/fence-after-pacemaker-down.patch @@ -2,7 +2,7 @@ diff -Naur drbd-utils-8.9.6.orig/scripts/crm-fence-peer.sh drbd-utils-8.9.6/scri --- drbd-utils-8.9.6.orig/scripts/crm-fence-peer.sh 2016-03-14 15:54:38.701360775 +0800 +++ drbd-utils-8.9.6/scripts/crm-fence-peer.sh 2016-03-14 16:00:06.333338664 +0800 @@ -531,6 +531,25 @@ - [[ $crmd = "banned" ]] && will_fence=true + [[ $join = "banned" ]] && will_fence=true if [[ ${expected-down} = "down" && $in_ccm = "false" && $crmd != "online" ]]; then : "pacemaker considers this as clean down" + elif [[ $crmd/$join/$expected = "offline/down/down" ]] ; then diff --git a/usrmerge_move_lib_to_prefix_lib.patch b/usrmerge_move_lib_to_prefix_lib.patch deleted file mode 100644 index 0ba69cf..0000000 --- a/usrmerge_move_lib_to_prefix_lib.patch +++ /dev/null @@ -1,68 +0,0 @@ -https://en.opensuse.org/openSUSE:Usr_merge - -diff -Naur drbd-utils-9.19.0.orig/scripts/Makefile.in drbd-utils-9.19.0/scripts/Makefile.in ---- drbd-utils-9.19.0.orig/scripts/Makefile.in 2021-10-11 17:59:20.189282860 +0800 -+++ drbd-utils-9.19.0/scripts/Makefile.in 2021-10-11 18:01:25.988786913 +0800 -@@ -39,6 +39,7 @@ - UDEV_RULE_SUFFIX = @UDEV_RULE_SUFFIX@ - INITDIR = @INITDIR@ - LIBDIR = @prefix@/lib/@PACKAGE_TARNAME@ -+LIBSCRIPTDIR = @prefix@/lib/@PACKAGE_TARNAME@/scripts - LN_S = @LN_S@ - - # features enabled or disabled by configure -@@ -87,11 +88,11 @@ - install -d $(DESTDIR)$(systemdunitdir) - install -m 644 drbd.service $(DESTDIR)$(systemdunitdir)/ - install -m 644 $(SYSTEMD_TEMPLATES) $(DESTDIR)$(systemdunitdir)/ -- install -d $(DESTDIR)/lib/drbd/scripts -- install -m 755 drbd $(DESTDIR)/lib/drbd/scripts -- install -m 755 drbd-service-shim.sh $(DESTDIR)/lib/drbd/scripts -- install -m 755 drbd-wait-promotable.sh $(DESTDIR)/lib/drbd/scripts -- install -m 755 ocf.ra.wrapper.sh $(DESTDIR)/lib/drbd/scripts -+ install -d $(DESTDIR)$(LIBSCRIPTDIR) -+ install -m 755 drbd $(DESTDIR)$(LIBSCRIPTDIR) -+ install -m 755 drbd-service-shim.sh $(DESTDIR)$(LIBSCRIPTDIR) -+ install -m 755 drbd-wait-promotable.sh $(DESTDIR)$(LIBSCRIPTDIR) -+ install -m 755 ocf.ra.wrapper.sh $(DESTDIR)$(LIBSCRIPTDIR) - install -d $(DESTDIR)$(tmpfilesdir)/ - install -m 444 drbd.tmpfiles.conf $(DESTDIR)$(tmpfilesdir)/drbd.conf - endif -diff -Naur drbd-utils-9.19.0.orig/user/v83/Makefile.in drbd-utils-9.19.0/user/v83/Makefile.in ---- drbd-utils-9.19.0.orig/user/v83/Makefile.in 2021-10-11 17:59:20.217282750 +0800 -+++ drbd-utils-9.19.0/user/v83/Makefile.in 2021-10-11 18:07:39.967312613 +0800 -@@ -98,11 +98,11 @@ - install -d $(DESTDIR)$(localstatedir)/lock - install -d $(DESTDIR)/lib/drbd/ - if getent group haclient > /dev/null 2> /dev/null ; then \ -- install -g haclient -m 4750 drbdsetup-83 $(DESTDIR)/lib/drbd/ ; \ -- install -m 755 drbdadm-83 $(DESTDIR)/lib/drbd/ ; \ -+ install -g haclient -m 4750 drbdsetup-83 $(DESTDIR)$(LIBDIR) ; \ -+ install -m 755 drbdadm-83 $(DESTDIR)$(LIBDIR) ; \ - else \ -- install -m 755 drbdsetup-83 $(DESTDIR)/lib/drbd/ ; \ -- install -m 755 drbdadm-83 $(DESTDIR)/lib/drbd/ ; \ -+ install -m 755 drbdsetup-83 $(DESTDIR)$(LIBDIR) ; \ -+ install -m 755 drbdadm-83 $(DESTDIR)$(LIBDIR) ; \ - fi - endif - -diff -Naur drbd-utils-9.19.0.orig/user/v84/Makefile.in drbd-utils-9.19.0/user/v84/Makefile.in ---- drbd-utils-9.19.0.orig/user/v84/Makefile.in 2021-10-11 17:59:20.221282734 +0800 -+++ drbd-utils-9.19.0/user/v84/Makefile.in 2021-10-11 18:07:39.967312613 +0800 -@@ -112,11 +112,11 @@ - install -d $(DESTDIR)$(localstatedir)/lock - install -d $(DESTDIR)/lib/drbd/ - if getent group haclient > /dev/null 2> /dev/null ; then \ -- install -g haclient -m 4750 drbdsetup-84 $(DESTDIR)/lib/drbd/ ; \ -- install -m 755 drbdadm-84 $(DESTDIR)/lib/drbd/ ; \ -+ install -g haclient -m 4750 drbdsetup-84 $(DESTDIR)$(LIBDIR) ; \ -+ install -m 755 drbdadm-84 $(DESTDIR)$(LIBDIR) ; \ - else \ -- install -m 755 drbdsetup-84 $(DESTDIR)/lib/drbd/ ; \ -- install -m 755 drbdadm-84 $(DESTDIR)/lib/drbd/ ; \ -+ install -m 755 drbdsetup-84 $(DESTDIR)$(LIBDIR) ; \ -+ install -m 755 drbdadm-84 $(DESTDIR)$(LIBDIR) ; \ - fi - endif -