[tor-commits] [tor/master] Define a "dircache" module.
nickm at torproject.org
nickm at torproject.org
Fri Jan 17 12:51:00 UTC 2020
commit 888a0be0b913bea33d9b2ba635b7f27db5fc1b95
Author: Nick Mathewson <nickm at torproject.org>
Date: Wed Jan 8 21:03:20 2020 -0500
Define a "dircache" module.
For now, this module is enabled whenever the relay module is
enabled, and disabled whenever the relay module is disabled. Though
they are logically separate, the use cases for running one without
the other are rare enough that we don't really want to support
compiling them independently.
---
configure.ac | 10 +++++++++-
doc/HACKING/Module.md | 12 +++++++++---
2 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index 894ca2b0f..85ffc1c75 100644
--- a/configure.ac
+++ b/configure.ac
@@ -278,7 +278,7 @@ dnl Tor modules options. These options are namespaced with --disable-module-XXX
dnl ---
dnl All our modules.
-m4_define(MODULES, relay dirauth)
+m4_define(MODULES, relay dirauth dircache)
dnl Relay module.
AC_ARG_ENABLE([module-relay],
@@ -289,6 +289,14 @@ AM_COND_IF(BUILD_MODULE_RELAY,
AC_DEFINE([HAVE_MODULE_RELAY], [1],
[Compile with Relay feature support]))
+dnl Dircache module. (This cannot be enabled or disabled independently of
+dnl the relay module.)
+AM_CONDITIONAL(BUILD_MODULE_DIRCACHE,
+ [test "x$enable_module_relay" != "xno"])
+AM_COND_IF(BUILD_MODULE_DIRCACHE,
+ AC_DEFINE([HAVE_MODULE_DIRCACHE], [1],
+ [Compile with directory cache support]))
+
dnl Directory Authority module.
AC_ARG_ENABLE([module-dirauth],
AS_HELP_STRING([--disable-module-dirauth],
diff --git a/doc/HACKING/Module.md b/doc/HACKING/Module.md
index 3a07d0c63..781bb978f 100644
--- a/doc/HACKING/Module.md
+++ b/doc/HACKING/Module.md
@@ -11,12 +11,18 @@ selectively enable or disable, at `configure` time.
Currently, tor has these modules:
- Relay subsystem (relay)
+ - Directory cache system (dircache).
- Directory Authority subsystem (dirauth)
-dirauth is located in its own directory in `src/feature/dirauth/`.
+The dirauth code is located in its own directory in `src/feature/dirauth/`.
-Relay is located in directories named `src/*/*relay` and `src/*/*dircache`,
-which are being progressively refactored and disabled.
+The relay code is located in a directory named `src/*/*relay`, which is
+being progressively refactored and disabled.
+
+The dircache code is located in `src/*/*dircache`. Right now, it is
+disabled if and only if the relay module is disabled. (We are treating
+them as separate modules because they are logically independent, not
+because you would actually want to run one without the other.)
To disable a module, pass `--disable-module-{dirauth,relay}` at configure
time. All modules are currently enabled by default.
More information about the tor-commits
mailing list