diff --git a/0001-crm-fence-peer-fix-timeout-with-Pacemaker-2.1-milli-.patch b/0001-crm-fence-peer-fix-timeout-with-Pacemaker-2.1-milli-.patch deleted file mode 100644 index 2bf7d89..0000000 --- a/0001-crm-fence-peer-fix-timeout-with-Pacemaker-2.1-milli-.patch +++ /dev/null @@ -1,138 +0,0 @@ -From 8a28be74bc6efa93931c957e54c01abb18b984fe Mon Sep 17 00:00:00 2001 -From: Lars Ellenberg -Date: Wed, 12 Jan 2022 13:50:35 +0100 -Subject: [PATCH] crm-fence-peer: fix timeout with Pacemaker 2.1: milli seconds - vs seconds -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -crmadmin timeout was in milli seconds for <= 2.0.x, -but became a TIMESPEC with default seconds in >= 2.1. - -Up to 2.0.4, atoi() was used, which effectively ignores "trailing garbage", -so we could get away with always appending "ms". -But with 2.0.5, it became g_option_context_parse G_OPTION_ARG_INT, which -"Cannot parse integer value “200ms” for --timeout" :-| - -So grep the help message for "timeout.*milliseconds", -and if not present, append an explicit "ms" unit. - -Also tolerate both ": ok" (2.1) and " (ok)" (older) -when matching the output string of crmadmin -S. ---- - scripts/crm-fence-peer.9.sh | 24 +++++++++++++++++++++--- - scripts/crm-fence-peer.sh | 24 +++++++++++++++++++++--- - 2 files changed, 42 insertions(+), 6 deletions(-) - -diff --git a/scripts/crm-fence-peer.9.sh b/scripts/crm-fence-peer.9.sh -index 36590bd8..c943bf9f 100755 ---- a/scripts/crm-fence-peer.9.sh -+++ b/scripts/crm-fence-peer.9.sh -@@ -392,6 +392,20 @@ check_cluster_properties() - crm_is_not_false ${stonith_enabled:-} && stonith_enabled=true || stonith_enabled=false - } - -+setup_crm_timeout_unit_ms() -+{ -+ # crmadmin timeout was in ms for <= 2.0.x, -+ # but became a TIMESPEC in >= 2.1. -+ # Up to 2.0.4, atoi() was used, which effectively ignores "trailing -+ # garbage", so we could get away with always appending "ms", but with -+ # 2.0.5, it became g_option_context_parse G_OPTION_ARG_INT, which -+ # "Cannot parse integer value “200ms” for --timeout" :-| -+ if crmadmin --help 2>&1 | grep -q -e "--timeout=.*in milliseconds"; then -+ crm_timeout_unit_ms="" -+ else -+ crm_timeout_unit_ms="ms" -+ fi -+} - - # - # In case this is a two-node cluster (still common with -@@ -737,6 +751,7 @@ drbd_peer_fencing() - - local startup_fencing stonith_enabled - check_cluster_properties -+ setup_crm_timeout_unit_ms - - if ! $had_constraint_on_entry ; then - -@@ -1075,14 +1090,17 @@ _check_peer_node_reachable() - # it is obviously reachable. - # - # Do this only after we have been able to reach a DC above. -- # Note: crmadmin timeout is in milli-seconds, and defaults to 30000 (30 seconds). -+ # Note: crmadmin timeout defaults to 30 seconds. -+ # - # Our variable $cibtimeout should be in deci-seconds (see above) - # (unless you use a very old version of pacemaker, so don't do that). - # Convert deci-seconds to milli-seconds, and double it. -+ # See also setup_crm_timeout_unit_ms() above. -+ # - if [[ $crmd = "online" ]] ; then - local out -- if out=$( crmadmin -t $(( cibtimeout * 200 )) -S $DRBD_PEER ) \ -- && [[ $out = *"(ok)" ]]; then -+ if out=$( crmadmin -t $(( cibtimeout * 200 ))$crm_timeout_unit_ms -S $DRBD_PEER ) \ -+ && [[ $out = *@(": ok"|" (ok)") ]]; then - peer_state="reachable" - return - fi -diff --git a/scripts/crm-fence-peer.sh b/scripts/crm-fence-peer.sh -index cb5deded..96786734 100755 ---- a/scripts/crm-fence-peer.sh -+++ b/scripts/crm-fence-peer.sh -@@ -244,6 +244,20 @@ check_cluster_properties() - crm_is_not_false $stonith_enabled && stonith_enabled=true || stonith_enabled=false - } - -+setup_crm_timeout_unit_ms() -+{ -+ # crmadmin timeout was in ms for <= 2.0.x, -+ # but became a TIMESPEC in >= 2.1. -+ # Up to 2.0.4, atoi() was used, which effectively ignores "trailing -+ # garbage", so we could get away with always appending "ms", but with -+ # 2.0.5, it became g_option_context_parse G_OPTION_ARG_INT, which -+ # "Cannot parse integer value “200ms” for --timeout" :-| -+ if crmadmin --help 2>&1 | grep -q -e "--timeout=.*in milliseconds"; then -+ crm_timeout_unit_ms="" -+ else -+ crm_timeout_unit_ms="ms" -+ fi -+} - - # - # In case this is a two-node cluster (still common with -@@ -426,6 +440,7 @@ drbd_peer_fencing() - - local startup_fencing stonith_enabled - check_cluster_properties -+ setup_crm_timeout_unit_ms - - if [[ -z $have_constraint ]] ; then - # try to place it. -@@ -718,14 +733,17 @@ check_peer_node_reachable() - # it is obviously reachable. - # - # Do this only after we have been able to reach a DC above. -- # Note: crmadmin timeout is in milli-seconds, and defaults to 30000 (30 seconds). -+ # Note: crmadmin timeout defaults to 30 seconds. -+ # - # Our variable $cibtimeout should be in deci-seconds (see above) - # (unless you use a very old version of pacemaker, so don't do that). - # Convert deci-seconds to milli-seconds, and double it. -+ # See also setup_crm_timeout_unit_ms() above. -+ # - if [[ $crmd = "online" ]] ; then - local out -- if out=$( crmadmin -t $(( cibtimeout * 200 )) -S $DRBD_PEER ) \ -- && [[ $out = *"(ok)" ]]; then -+ if out=$( crmadmin -t $(( cibtimeout * 200 ))$crm_timeout_unit_ms -S $DRBD_PEER ) \ -+ && [[ $out = *@(": ok"|" (ok)") ]]; then - peer_state="reachable" - return - fi --- -2.40.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 new file mode 100644 index 0000000..b45b9db --- /dev/null +++ b/0001-drbdadm-v9-do-not-segfault-when-re-configuring-proxy.patch @@ -0,0 +1,35 @@ +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-crm-fence-peer-fix-timeout-with-Pacemaker-2.0.5-mill.patch b/0002-crm-fence-peer-fix-timeout-with-Pacemaker-2.0.5-mill.patch deleted file mode 100644 index 88b4ec3..0000000 --- a/0002-crm-fence-peer-fix-timeout-with-Pacemaker-2.0.5-mill.patch +++ /dev/null @@ -1,90 +0,0 @@ -From 68d1e4242f165917bc2c787d9df0fe41251e05e6 Mon Sep 17 00:00:00 2001 -From: Lars Ellenberg -Date: Wed, 12 Jan 2022 13:50:35 +0100 -Subject: [PATCH] crm-fence-peer: fix timeout with Pacemaker 2.0.5: milli - seconds vs seconds -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Addendum to 8a28be74bc6efa93931c957e54c01abb18b984fe -Commit message of the above cited here: - -> crmadmin timeout was in milli seconds for <= 2.0.x, -> but became a TIMESPEC with default seconds in >= 2.1. -> -> Up to 2.0.4, atoi() was used, which effectively ignores "trailing garbage", -> so we could get away with always appending "ms". -> But with 2.0.5, it became g_option_context_parse G_OPTION_ARG_INT, which -> "Cannot parse integer value “200ms” for --timeout" :-| -> -> So grep the help message for "timeout.*milliseconds", -> and if not present, append an explicit "ms" unit. - -And this is where I got it wrong :-( -somewhere later they re-organised the help text -so now I would need to parse --help-all. - -Instead try to actually call "crmadmin -t 100ms --version". -If that works, it apparently understands (or ignores) -the "ms" unit. ---- - scripts/crm-fence-peer.9.sh | 14 +++++++++++--- - scripts/crm-fence-peer.sh | 14 +++++++++++--- - 2 files changed, 22 insertions(+), 6 deletions(-) - -diff --git a/scripts/crm-fence-peer.9.sh b/scripts/crm-fence-peer.9.sh -index c943bf9f..fc8d2bc3 100755 ---- a/scripts/crm-fence-peer.9.sh -+++ b/scripts/crm-fence-peer.9.sh -@@ -400,10 +400,18 @@ setup_crm_timeout_unit_ms() - # garbage", so we could get away with always appending "ms", but with - # 2.0.5, it became g_option_context_parse G_OPTION_ARG_INT, which - # "Cannot parse integer value “200ms” for --timeout" :-| -- if crmadmin --help 2>&1 | grep -q -e "--timeout=.*in milliseconds"; then -- crm_timeout_unit_ms="" -- else -+ # Can not parse the help text reliably, because they changed content -+ # and organisation of the help text between 2.0.4 and 2.0.5. -+ # Just try using ms unit, and see if it fails. -+ if crmadmin -t 100ms --version &> /dev/null; then -+ # this is either a recent version that actually understands ms -+ # as part of the TIMESPEC, or a version that still uses atoi(). - crm_timeout_unit_ms="ms" -+ else -+ # this one likely failed with -+ # crmadmin: Cannot parse integer value “100ms” for -t -+ # (>= 2.0.5, < 2.1) -+ crm_timeout_unit_ms="" - fi - } - -diff --git a/scripts/crm-fence-peer.sh b/scripts/crm-fence-peer.sh -index 96786734..b0e4e0f1 100755 ---- a/scripts/crm-fence-peer.sh -+++ b/scripts/crm-fence-peer.sh -@@ -252,10 +252,18 @@ setup_crm_timeout_unit_ms() - # garbage", so we could get away with always appending "ms", but with - # 2.0.5, it became g_option_context_parse G_OPTION_ARG_INT, which - # "Cannot parse integer value “200ms” for --timeout" :-| -- if crmadmin --help 2>&1 | grep -q -e "--timeout=.*in milliseconds"; then -- crm_timeout_unit_ms="" -- else -+ # Can not parse the help text reliably, because they changed content -+ # and organisation of the help text between 2.0.4 and 2.0.5. -+ # Just try using ms unit, and see if it fails. -+ if crmadmin -t 100ms --version &> /dev/null; then -+ # this is either a recent version that actually understands ms -+ # as part of the TIMESPEC, or a version that still uses atoi(). - crm_timeout_unit_ms="ms" -+ else -+ # this one likely failed with -+ # crmadmin: Cannot parse integer value “100ms” for -t -+ # (>= 2.0.5, < 2.1) -+ crm_timeout_unit_ms="" - fi - } - --- -2.40.0 - diff --git a/0002-user-drbrdmon-add-missing-stdint.h-includes.patch b/0002-user-drbrdmon-add-missing-stdint.h-includes.patch new file mode 100644 index 0000000..5c23de8 --- /dev/null +++ b/0002-user-drbrdmon-add-missing-stdint.h-includes.patch @@ -0,0 +1,45 @@ +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-Introduce-default_types.h-header.patch b/0003-Introduce-default_types.h-header.patch new file mode 100644 index 0000000..e2daca4 --- /dev/null +++ b/0003-Introduce-default_types.h-header.patch @@ -0,0 +1,1693 @@ +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/0001-Disable-quorum-in-default-configuration-bsc-1032142.patch b/bsc-1032142_Disable-quorum-in-default-configuration.patch similarity index 100% rename from 0001-Disable-quorum-in-default-configuration-bsc-1032142.patch rename to bsc-1032142_Disable-quorum-in-default-configuration.patch diff --git a/drbd-utils-9.19.0.tar.gz b/drbd-utils-9.19.0.tar.gz deleted file mode 100644 index a5c55f2..0000000 --- a/drbd-utils-9.19.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3827bfed6630f8784ec558a8ac3de68175d544876d897c0810ad141a61487cad -size 1261589 diff --git a/drbd-utils-9.25.0.tar.gz b/drbd-utils-9.25.0.tar.gz new file mode 100644 index 0000000..69e87f5 --- /dev/null +++ b/drbd-utils-9.25.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6e5baf2b725d742fa285bf7469264acab771365ea9b438fb9683fa4d347c6b07 +size 1406804 diff --git a/drbd-utils.changes b/drbd-utils.changes index 9d027d9..6650d14 100644 --- a/drbd-utils.changes +++ b/drbd-utils.changes @@ -1,3 +1,74 @@ +------------------------------------------------------------------- +Mon Aug 28 12:40:00 UTC 2023 - Heming Zhao + +- Update to 9.25.0 (PED-5842) + * drbdsetup,v9,show: fix meta disk format for json + * drbdmeta: {hex,}dump superblock + * drbdmon: major rewrite + * build: gcc v12 cleanups + * misc: put locks into separate dir + * selinux: add fowner fsetsid, they dropped a global noaudit rule + * v9: Support user-defined block-size + * doc,v9: improvements all over the place + * drbdadm,v9: implement drbdadm role + * drbdadm,v9: pass --verbose/--statistics to drbdsetup status + * drbd{adm,meta}: add repair-md subcommand + * drbdadm,v9,resync-after: fix too strict check + * drbdadm,v9,floating: fixup fake uname for 9.2.x strict_names=1 + * drbdadm,v9,parser: fixup globs, also rm GNU libc specific extensions + * drbdadm,v9,parser: allow via outside-address for NATed peers + * parser,v9: deprecate named connections + * drbd-selinux: add sub package, minor packaging/spec changes + * drbdadm: allow files from expanded glob to vanish + * drbdadm,v9: fix potential segfault in postparse + * drbdadm,v9: fix sh-ip when set on connection/path + * drbdmeta: fix apply-al for bitmap sizes > 4GiB + * drbd-service-shim.sh: add secondary --force + * ocf: fix for dropped --peer option + * drbdsetup,v9: show susupend reason in json output + * drbdsetup,v9: add secondary --force + * drbdsetup,v9: fix *susp_str() for events2 diff mode + * drdbdadm,v9: fix sh-resource + * drdbdadm,v9: rm --peer=connect_to_host + * ocf: deal with situation where PM node name and actual node name do not + match + * notify.sh: deal with unset DRBD_PEER env variable + * crm-fence-peer: fix timeout with Pacemaker 2.0.5 + * drbdmeta: don't wait for confirmation if not a TTY + * drbdadm,v9: Pass '--force' to certain drbdmeta commands + * drbdmeta: do init in chunks; allow different methods + * build: various minor fixes (udev detection, POSIX, + compiler flags, allow doc building with asciidoctor,...) + * drbd.ocf: fix type (relevant for certain pcs versions) + * crm-fence-peer: fix timeout with Pacemaker 2.1 + * v9,proxy: allow multiple sharing a proxy node + * v9,drbdsetup: quote resource name in "show" + * build: allow building for RHEL9.0, minor cleanups + * reactor/systemd: allow proper actions (e.g., reboot) if + demotion fails. + +- introduce new systemd service: + drbd-demote-or-escalate@.service + +- remove v83 v84 binaries (incompatible with kmp) + +- drop patches which are already included in latest code: + - 0001-crm-fence-peer-fix-timeout-with-Pacemaker-2.1-milli-.patch + - 0002-crm-fence-peer-fix-timeout-with-Pacemaker-2.0.5-mill.patch + +- add upstream patch: + + 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 + +- change patch name: + - 0001-Disable-quorum-in-default-configuration-bsc-1032142.patch + + bsc-1032142_Disable-quorum-in-default-configuration.patch + +- rebase patch: + + pie-fix.patch + + rpmlint-build-error.patch + ------------------------------------------------------------------- Wed May 31 12:34:42 UTC 2023 - Frederic Crozat diff --git a/drbd-utils.spec b/drbd-utils.spec index 65a6c6f..139301a 100644 --- a/drbd-utils.spec +++ b/drbd-utils.spec @@ -16,7 +16,7 @@ # -%define services drbd.service drbd-lvchange@.service drbd-promote@.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-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,26 +32,30 @@ # Only need po4a to build man from git source code %bcond_without prebuiltman Name: drbd-utils -Version: 9.19.0 +Version: 9.25.0 Release: 0 Summary: Distributed Replicated Block Device License: GPL-2.0-or-later Group: Productivity/Clustering/HA URL: https://linbit.com/linbit-software-download-page-for-linstor-and-drbd-linux-driver/ -# tarball might be available at https://pkg.linbit.com/downloads/drbd/utils/drbd-utils-%{name}.tar.gz -Source: %{name}-%{version}.tar.gz +Source: https://pkg.linbit.com//downloads/drbd/utils/%{name}-%{version}.tar.gz Source100: %{name}.rpmlintrc -# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines -Patch1: init-script-fixes.diff -Patch2: usrmerge_move_lib_to_prefix_lib.patch -Patch3: fence-after-pacemaker-down.patch -# PATCH-SUSE-FIX: Disable quorum in default configuration (bsc#1032142) -Patch4: 0001-Disable-quorum-in-default-configuration-bsc-1032142.patch -Patch5: move_fencing_from_disk_to_net_in_example.patch -Patch6: pie-fix.patch -Patch7: 0001-crm-fence-peer-fix-timeout-with-Pacemaker-2.1-milli-.patch -Patch8: 0002-crm-fence-peer-fix-timeout-with-Pacemaker-2.0.5-mill.patch -Patch99: rpmlint-build-error.patch + +############################################# +# 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 + +# 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 +Patch1099: rpmlint-build-error.patch +############################################# Provides: drbd-bash-completion = %{version} Provides: drbd-pacemaker = %{version} @@ -59,7 +63,7 @@ Provides: drbd-udev = %{version} Obsoletes: drbd-bash-completion < %{version} Obsoletes: drbd-pacemaker < %{version} Obsoletes: drbd-udev < %{version} -# drbd-utils first splict from drbd-8.4.5(only driver) +# drbd-utils first split from drbd-8.4.5(only driver) # and suse let drbd driver goes in-kernel # Provides: drbd = 8.4.5 # Obsoletes: drbd < 8.4.5 @@ -96,15 +100,16 @@ raid 1. It is a building block for setting up clusters. %prep %setup -q -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch99 -p1 +%patch0001 -p1 +%patch0002 -p1 +%patch0003 -p1 +%patch1001 -p1 +%patch1002 -p1 +%patch1003 -p1 +%patch1004 -p1 +%patch1005 -p1 +%patch1006 -p1 +%patch1099 -p1 %build export WANT_DRBD_REPRODUCIBLE_BUILD=1 @@ -133,7 +138,9 @@ PATH=/sbin:$PATH ./configure \ --exec_prefix=%{_prefix}/lib \ %{?with_drbdmon: --with-drbdmon} \ %{?with_prebuiltman: --with-prebuiltman} \ - --with-tmpfilesdir=%{_tmpfilesdir} + --with-tmpfilesdir=%{_tmpfilesdir} \ + --without-83support \ + --without-84support %make_build OPTFLAGS="%{optflags}" @@ -225,6 +232,7 @@ fi %{_unitdir}/drbd.service %{_unitdir}/drbd-lvchange@.service %{_unitdir}/drbd-promote@.service +%{_unitdir}/drbd-demote-or-escalate@.service %{_unitdir}/drbd-reconfigure-suspend-or-error@.service %{_unitdir}/drbd-services@.target %{_unitdir}/drbd-wait-promotable@.service diff --git a/pie-fix.patch b/pie-fix.patch index e074ed7..c860448 100644 --- a/pie-fix.patch +++ b/pie-fix.patch @@ -3,7 +3,7 @@ Index: drbd-utils-9.14.0/user/drbdmon/Makefile.in --- drbd-utils-9.14.0.orig/user/drbdmon/Makefile.in +++ drbd-utils-9.14.0/user/drbdmon/Makefile.in @@ -1,6 +1,7 @@ - CXXFLAGS=-std=c++11 -I. -I../shared -Icppdsaext/src -Wall -Werror --pedantic-errors -fPIC -O2 \ + CXXFLAGS=-std=c++11 -I. -I../shared -Icppdsaext/src -Wall -Werror -pedantic-errors -fPIC -O2 \ -Wsign-compare -Wpointer-arith -Wswitch-default -Wswitch-enum -Wtype-limits \ --Wmissing-declarations -Wshadow +-Wmissing-declarations -Wshadow \ diff --git a/rpmlint-build-error.patch b/rpmlint-build-error.patch index c23b8db..fc2ca7b 100644 --- a/rpmlint-build-error.patch +++ b/rpmlint-build-error.patch @@ -45,25 +45,3 @@ diff -Naur drbd-utils-9.19.0.orig/scripts/Makefile.in drbd-utils-9.19.0/scripts/ ! test -L $(DESTDIR)/sbin/rcdrbd || rm $(DESTDIR)/sbin/rcdrbd .PHONY: install uninstall clean distclean -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 18:44:02.918467657 +0800 -+++ drbd-utils-9.19.0/user/v84/Makefile.in 2021-10-13 11:39:05.662316197 +0800 -@@ -108,7 +108,6 @@ - install: - ifeq ($(WITH_84_SUPPORT),yes) - install -d $(DESTDIR)$(localstatedir)/lib/drbd -- install -d $(DESTDIR)$(localstatedir)/run/drbd - install -d $(DESTDIR)$(localstatedir)/lock - install -d $(DESTDIR)/lib/drbd/ - if getent group haclient > /dev/null 2> /dev/null ; then \ -diff -Naur drbd-utils-9.19.0.orig/user/v9/Makefile.in drbd-utils-9.19.0/user/v9/Makefile.in ---- drbd-utils-9.19.0.orig/user/v9/Makefile.in 2021-10-11 18:44:02.918467657 +0800 -+++ drbd-utils-9.19.0/user/v9/Makefile.in 2021-10-13 11:38:48.462390954 +0800 -@@ -143,7 +143,6 @@ - install: - install -d $(DESTDIR)$(sbindir) - install -d $(DESTDIR)$(localstatedir)/lib/drbd -- install -d $(DESTDIR)$(localstatedir)/run/drbd - install -d $(DESTDIR)$(localstatedir)/lock - if getent group haclient > /dev/null 2> /dev/null ; then \ - install -g haclient -m 4750 drbdsetup $(DESTDIR)$(sbindir) ; \