From 52e5e9269345a16edf27df14392034738886c940 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Mon, 19 Aug 2019 12:06:40 +1000 Subject: [PATCH] ctdb-conf: Move all conf files to new conf/ subdirectory Leave common/conf.[ch] where they are to make this commit comprehensible. Signed-off-by: Martin Schwenke Reviewed-by: Guenther Deschner Reviewed-by: Anoop C S --- ctdb/{cluster => conf}/cluster_conf.c | 2 +- ctdb/{cluster => conf}/cluster_conf.h | 0 ctdb/{common => conf}/conf_tool.c | 16 +++++----- ctdb/{common => conf}/conf_tool.h | 0 ctdb/{server => conf}/ctdb_config.c | 16 +++++----- ctdb/{server => conf}/ctdb_config.h | 0 ctdb/{database => conf}/database_conf.c | 2 +- ctdb/{database => conf}/database_conf.h | 0 ctdb/{event => conf}/event_conf.c | 2 +- ctdb/{event => conf}/event_conf.h | 0 ctdb/{failover => conf}/failover_conf.c | 2 +- ctdb/{failover => conf}/failover_conf.h | 0 ctdb/{server => conf}/legacy_conf.c | 2 +- ctdb/{server => conf}/legacy_conf.h | 0 ctdb/{common => conf}/logging_conf.c | 3 +- ctdb/{common => conf}/logging_conf.h | 0 ctdb/event/event_config.c | 5 ++-- ctdb/server/ctdb_ltdb_server.c | 2 +- ctdb/server/ctdb_recoverd.c | 2 +- ctdb/server/ctdb_takeover.c | 2 +- ctdb/server/ctdbd.c | 4 +-- ctdb/wscript | 52 +++++++++------------------------ 22 files changed, 45 insertions(+), 67 deletions(-) rename ctdb/{cluster => conf}/cluster_conf.c (99%) rename ctdb/{cluster => conf}/cluster_conf.h (100%) rename ctdb/{common => conf}/conf_tool.c (96%) rename ctdb/{common => conf}/conf_tool.h (100%) rename ctdb/{server => conf}/ctdb_config.c (95%) rename ctdb/{server => conf}/ctdb_config.h (100%) rename ctdb/{database => conf}/database_conf.c (99%) rename ctdb/{database => conf}/database_conf.h (100%) rename ctdb/{event => conf}/event_conf.c (98%) rename ctdb/{event => conf}/event_conf.h (100%) rename ctdb/{failover => conf}/failover_conf.c (97%) rename ctdb/{failover => conf}/failover_conf.h (100%) rename ctdb/{server => conf}/legacy_conf.c (98%) rename ctdb/{server => conf}/legacy_conf.h (100%) rename ctdb/{common => conf}/logging_conf.c (98%) rename ctdb/{common => conf}/logging_conf.h (100%) diff --git a/ctdb/cluster/cluster_conf.c b/ctdb/conf/cluster_conf.c similarity index 99% rename from ctdb/cluster/cluster_conf.c rename to ctdb/conf/cluster_conf.c index bdd64ba112f..a5cebf46ea0 100644 --- a/ctdb/cluster/cluster_conf.c +++ b/ctdb/conf/cluster_conf.c @@ -24,7 +24,7 @@ #include "common/conf.h" -#include "cluster_conf.h" +#include "conf/cluster_conf.h" #define CLUSTER_TRANSPORT_DEFAULT "tcp" diff --git a/ctdb/cluster/cluster_conf.h b/ctdb/conf/cluster_conf.h similarity index 100% rename from ctdb/cluster/cluster_conf.h rename to ctdb/conf/cluster_conf.h diff --git a/ctdb/common/conf_tool.c b/ctdb/conf/conf_tool.c similarity index 96% rename from ctdb/common/conf_tool.c rename to ctdb/conf/conf_tool.c index 2d0543d643e..797d9c77630 100644 --- a/ctdb/common/conf_tool.c +++ b/ctdb/conf/conf_tool.c @@ -28,14 +28,14 @@ #include "common/conf.h" #include "common/path.h" -#include "common/logging_conf.h" -#include "cluster/cluster_conf.h" -#include "database/database_conf.h" -#include "event/event_conf.h" -#include "failover/failover_conf.h" -#include "server/legacy_conf.h" - -#include "common/conf_tool.h" +#include "conf/logging_conf.h" +#include "conf/cluster_conf.h" +#include "conf/database_conf.h" +#include "conf/event_conf.h" +#include "conf/failover_conf.h" +#include "conf/legacy_conf.h" + +#include "conf/conf_tool.h" struct conf_tool_context { struct cmdline_context *cmdline; diff --git a/ctdb/common/conf_tool.h b/ctdb/conf/conf_tool.h similarity index 100% rename from ctdb/common/conf_tool.h rename to ctdb/conf/conf_tool.h diff --git a/ctdb/server/ctdb_config.c b/ctdb/conf/ctdb_config.c similarity index 95% rename from ctdb/server/ctdb_config.c rename to ctdb/conf/ctdb_config.c index 3f61fdae169..a97dfd59284 100644 --- a/ctdb/server/ctdb_config.c +++ b/ctdb/conf/ctdb_config.c @@ -21,17 +21,17 @@ #include "lib/util/debug.h" -#include "common/conf.h" -#include "common/logging_conf.h" #include "common/path.h" +#include "common/conf.h" -#include "cluster/cluster_conf.h" -#include "database/database_conf.h" -#include "event/event_conf.h" -#include "failover/failover_conf.h" -#include "legacy_conf.h" +#include "conf/logging_conf.h" +#include "conf/cluster_conf.h" +#include "conf/database_conf.h" +#include "conf/event_conf.h" +#include "conf/failover_conf.h" +#include "conf/legacy_conf.h" -#include "ctdb_config.h" +#include "conf/ctdb_config.h" struct ctdb_config ctdb_config; diff --git a/ctdb/server/ctdb_config.h b/ctdb/conf/ctdb_config.h similarity index 100% rename from ctdb/server/ctdb_config.h rename to ctdb/conf/ctdb_config.h diff --git a/ctdb/database/database_conf.c b/ctdb/conf/database_conf.c similarity index 99% rename from ctdb/database/database_conf.c rename to ctdb/conf/database_conf.c index 4c7cb2d9ffe..78510e0f2cd 100644 --- a/ctdb/database/database_conf.c +++ b/ctdb/conf/database_conf.c @@ -32,7 +32,7 @@ #include "common/conf.h" #include "common/path.h" -#include "database_conf.h" +#include "conf/database_conf.h" #define DATABASE_CONF_VOLATILE_DB_DIR_DEFAULT CTDB_VARDIR "/volatile" #define DATABASE_CONF_PERSISTENT_DB_DIR_DEFAULT CTDB_VARDIR "/persistent" diff --git a/ctdb/database/database_conf.h b/ctdb/conf/database_conf.h similarity index 100% rename from ctdb/database/database_conf.h rename to ctdb/conf/database_conf.h diff --git a/ctdb/event/event_conf.c b/ctdb/conf/event_conf.c similarity index 98% rename from ctdb/event/event_conf.c rename to ctdb/conf/event_conf.c index 61ecf8e33eb..8bb2c1dab49 100644 --- a/ctdb/event/event_conf.c +++ b/ctdb/conf/event_conf.c @@ -26,7 +26,7 @@ #include "common/conf.h" #include "common/path.h" -#include "event/event_conf.h" +#include "conf/event_conf.h" static bool event_conf_validate_debug_script(const char *key, const char *old_script, diff --git a/ctdb/event/event_conf.h b/ctdb/conf/event_conf.h similarity index 100% rename from ctdb/event/event_conf.h rename to ctdb/conf/event_conf.h diff --git a/ctdb/failover/failover_conf.c b/ctdb/conf/failover_conf.c similarity index 97% rename from ctdb/failover/failover_conf.c rename to ctdb/conf/failover_conf.c index 0f199cbcd6c..90d0a0ab6d9 100644 --- a/ctdb/failover/failover_conf.c +++ b/ctdb/conf/failover_conf.c @@ -23,7 +23,7 @@ #include "common/conf.h" -#include "failover/failover_conf.h" +#include "conf/failover_conf.h" static bool check_static_boolean_change(const char *key, bool old_value, diff --git a/ctdb/failover/failover_conf.h b/ctdb/conf/failover_conf.h similarity index 100% rename from ctdb/failover/failover_conf.h rename to ctdb/conf/failover_conf.h diff --git a/ctdb/server/legacy_conf.c b/ctdb/conf/legacy_conf.c similarity index 98% rename from ctdb/server/legacy_conf.c rename to ctdb/conf/legacy_conf.c index 3391a3bdb54..56cc5bce2da 100644 --- a/ctdb/server/legacy_conf.c +++ b/ctdb/conf/legacy_conf.c @@ -24,7 +24,7 @@ #include "common/conf.h" #include "common/logging.h" -#include "legacy_conf.h" +#include "conf/legacy_conf.h" #define LEGACY_SCRIPT_LOG_LEVEL_DEFAULT "ERROR" diff --git a/ctdb/server/legacy_conf.h b/ctdb/conf/legacy_conf.h similarity index 100% rename from ctdb/server/legacy_conf.h rename to ctdb/conf/legacy_conf.h diff --git a/ctdb/common/logging_conf.c b/ctdb/conf/logging_conf.c similarity index 98% rename from ctdb/common/logging_conf.c rename to ctdb/conf/logging_conf.c index 38b3003a3f7..f5071485ca3 100644 --- a/ctdb/common/logging_conf.c +++ b/ctdb/conf/logging_conf.c @@ -23,7 +23,8 @@ #include "common/conf.h" #include "common/logging.h" -#include "common/logging_conf.h" + +#include "conf/logging_conf.h" #define LOGGING_LOCATION_DEFAULT "file:" LOGDIR "/log.ctdb" #define LOGGING_LOG_LEVEL_DEFAULT "NOTICE" diff --git a/ctdb/common/logging_conf.h b/ctdb/conf/logging_conf.h similarity index 100% rename from ctdb/common/logging_conf.h rename to ctdb/conf/logging_conf.h diff --git a/ctdb/event/event_config.c b/ctdb/event/event_config.c index d2826225c80..81c475c68ca 100644 --- a/ctdb/event/event_config.c +++ b/ctdb/event/event_config.c @@ -22,11 +22,12 @@ #include #include "common/conf.h" -#include "common/logging_conf.h" #include "common/path.h" +#include "conf/logging_conf.h" +#include "conf/event_conf.h" + #include "event/event_private.h" -#include "event/event_conf.h" struct event_config { char *config_file; diff --git a/ctdb/server/ctdb_ltdb_server.c b/ctdb/server/ctdb_ltdb_server.c index e2cb9165c71..8d03062b97a 100644 --- a/ctdb/server/ctdb_ltdb_server.c +++ b/ctdb/server/ctdb_ltdb_server.c @@ -41,7 +41,7 @@ #include "common/common.h" #include "common/logging.h" -#include "server/ctdb_config.h" +#include "conf/ctdb_config.h" #define PERSISTENT_HEALTH_TDB "persistent_health.tdb" diff --git a/ctdb/server/ctdb_recoverd.c b/ctdb/server/ctdb_recoverd.c index 0bcc4d33f8d..3f71c07d05d 100644 --- a/ctdb/server/ctdb_recoverd.c +++ b/ctdb/server/ctdb_recoverd.c @@ -44,7 +44,7 @@ #include "common/common.h" #include "common/logging.h" -#include "server/ctdb_config.h" +#include "conf/ctdb_config.h" #include "ctdb_cluster_mutex.h" diff --git a/ctdb/server/ctdb_takeover.c b/ctdb/server/ctdb_takeover.c index 0f7ac756497..2176c6ab806 100644 --- a/ctdb/server/ctdb_takeover.c +++ b/ctdb/server/ctdb_takeover.c @@ -45,7 +45,7 @@ #include "common/common.h" #include "common/logging.h" -#include "server/ctdb_config.h" +#include "conf/ctdb_config.h" #include "server/ipalloc.h" diff --git a/ctdb/server/ctdbd.c b/ctdb/server/ctdbd.c index a388bff1598..2aab243a463 100644 --- a/ctdb/server/ctdbd.c +++ b/ctdb/server/ctdbd.c @@ -40,9 +40,9 @@ #include "common/common.h" #include "common/path.h" #include "common/logging.h" -#include "common/logging_conf.h" -#include "ctdb_config.h" +#include "conf/logging_conf.h" +#include "conf/ctdb_config.h" int script_log_level; bool fast_start; diff --git a/ctdb/wscript b/ctdb/wscript index 3fbdf7d0425..0122ecb294e 100644 --- a/ctdb/wscript +++ b/ctdb/wscript @@ -466,10 +466,6 @@ def build(bld): popt ''') - bld.SAMBA_SUBSYSTEM('ctdb-logging-conf', - source='common/logging_conf.c', - deps='ctdb-util talloc') - bld.SAMBA_SUBSYSTEM('ctdb-protocol-basic', source=bld.SUBDIR('protocol', 'protocol_basic.c'), deps='talloc tdb') @@ -534,35 +530,21 @@ def build(bld): deps='''ctdb-util samba-util talloc replace popt''', install_path='${CTDB_HELPER_BINDIR}') - bld.SAMBA_SUBSYSTEM('ctdb-cluster-conf', - source='cluster/cluster_conf.c', - deps='ctdb-util') - - bld.SAMBA_SUBSYSTEM('ctdb-database-conf', - source='database/database_conf.c', - deps='ctdb-util') - - bld.SAMBA_SUBSYSTEM('ctdb-event-conf', - source='event/event_conf.c', - deps='ctdb-util') - - bld.SAMBA_SUBSYSTEM('ctdb-failover-conf', - source='failover/failover_conf.c', - deps='ctdb-util') - - bld.SAMBA_SUBSYSTEM('ctdb-legacy-conf', - source='server/legacy_conf.c', - deps='ctdb-util') + bld.SAMBA_SUBSYSTEM('ctdb-conf', + source='''conf/logging_conf.c + conf/cluster_conf.c + conf/database_conf.c + conf/event_conf.c + conf/failover_conf.c + conf/legacy_conf.c + conf/ctdb_config.c + ''', + deps='''ctdb-util talloc replace''') bld.SAMBA_BINARY('ctdb-config', - source='common/conf_tool.c', + source='conf/conf_tool.c', cflags='-DCTDB_CONF_TOOL', - deps='''ctdb-logging-conf - ctdb-event-conf - ctdb-cluster-conf - ctdb-database-conf - ctdb-failover-conf - ctdb-legacy-conf + deps='''ctdb-conf ctdb-util samba-util talloc replace popt''', install_path='${CTDB_HELPER_BINDIR}') @@ -587,7 +569,7 @@ def build(bld): event_request.c '''), deps='''ctdb-event-protocol - ctdb-event-conf ctdb-logging-conf + ctdb-conf ctdb-server-util samba-util ctdb-util talloc tevent replace popt''', install_path='${CTDB_HELPER_BINDIR}') @@ -618,17 +600,11 @@ def build(bld): ctdb_update_record.c ctdb_lock.c ctdb_fork.c ctdb_tunnel.c ctdb_client.c - ctdb_config.c '''), includes='include', deps='''ctdb-common ctdb-system ctdb-protocol ctdb-tcp ctdb-util replace sys_rw popt - ctdb-logging-conf - ctdb-cluster-conf - ctdb-database-conf - ctdb-event-conf - ctdb-failover-conf - ctdb-legacy-conf + ctdb-conf ctdb-event-protocol talloc tevent tdb-wrap tdb talloc_report''' + ib_deps, -- 2.11.4.GIT