[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Drop support for --digests



commit c66dd179800416d8bcc1aa4a9abdcf1861a7c6c6
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Wed Apr 1 09:54:20 2015 -0400

    Drop support for --digests
    
    This is a fair amount of maintainance burden, and doesn't help much
    more than the git microversion.
    
    Closes ticket 14742.
---
 .gitignore                   |    2 --
 changes/no_digests           |    5 +++++
 src/common/include.am        |   15 ---------------
 src/common/util.h            |    2 --
 src/common/util_codedigest.c |   13 -------------
 src/or/config.c              |    8 --------
 src/or/config.h              |    1 -
 src/or/config_codedigest.c   |   13 -------------
 src/or/include.am            |   19 ++-----------------
 9 files changed, 7 insertions(+), 71 deletions(-)

diff --git a/.gitignore b/.gitignore
index 02ef256..912b06e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -121,7 +121,6 @@ cscope.*
 # /src/common/
 /src/common/Makefile
 /src/common/Makefile.in
-/src/common/common_sha1.i
 /src/common/libor.a
 /src/common/libor-testing.a
 /src/common/libor.lib
@@ -149,7 +148,6 @@ cscope.*
 # /src/or/
 /src/or/Makefile
 /src/or/Makefile.in
-/src/or/or_sha1.i
 /src/or/tor
 /src/or/tor.exe
 /src/or/tor-cov
diff --git a/changes/no_digests b/changes/no_digests
new file mode 100644
index 0000000..1327ac3
--- /dev/null
+++ b/changes/no_digests
@@ -0,0 +1,5 @@
+  o Removed features:
+    - Remove the undocumented "--digests" command-line option. It
+      complicated our build process, caused subtle build issues
+      on multiple platforms, and is now redundant since we started
+      including git version identifiers. Closes ticket 14742.
diff --git a/src/common/include.am b/src/common/include.am
index 00e0055..b782310 100644
--- a/src/common/include.am
+++ b/src/common/include.am
@@ -61,7 +61,6 @@ LIBOR_A_SOURCES = \
   src/common/log.c					\
   src/common/memarea.c					\
   src/common/util.c					\
-  src/common/util_codedigest.c				\
   src/common/util_process.c				\
   src/common/sandbox.c					\
   src/common/workqueue.c				\
@@ -133,17 +132,3 @@ COMMONHEADERS = \
 
 noinst_HEADERS+= $(COMMONHEADERS)
 
-CLEANFILES+= src/common/common_sha1.i
-
-src/common/common_sha1.i: $(libor_SOURCES) $(libor_crypto_a_SOURCES) $(COMMONHEADERS)
-	$(AM_V_GEN)if test "@SHA1SUM@" != none; then \
-	  (cd "$(srcdir)" && "@SHA1SUM@" $(src_common_libor_SOURCES) $(src_common_libor_crypto_a_SOURCES) $(COMMONHEADERS)) | "@SED@" -n 's/^\(.*\)$$/"\1\\n"/p' > $@; \
-	elif test "@OPENSSL@" != none; then \
-	  (cd "$(srcdir)" && "@OPENSSL@" sha1 $(src_common_libor_SOURCES) $(src_Common_libor_crypto_a_SOURCES) $(COMMONHEADERS)) | "@SED@" -n 's/SHA1(\(.*\))= \(.*\)/"\2  \1\\n"/p' > $@; \
-	else \
-	  rm $@; \
-	  touch $@; \
-	fi
-
-src/common/util_codedigest.o: src/common/common_sha1.i
-
diff --git a/src/common/util.h b/src/common/util.h
index 3584a87..2749e46 100644
--- a/src/common/util.h
+++ b/src/common/util.h
@@ -570,8 +570,6 @@ STATIC int format_helper_exit_status(unsigned char child_state,
 
 #endif
 
-const char *libor_get_digests(void);
-
 #define ARRAY_LENGTH(x) ((sizeof(x)) / sizeof(x[0]))
 
 #endif
diff --git a/src/common/util_codedigest.c b/src/common/util_codedigest.c
deleted file mode 100644
index 7384f7d..0000000
--- a/src/common/util_codedigest.c
+++ /dev/null
@@ -1,13 +0,0 @@
-
-#include "util.h"
-
-/** Return a string describing the digest of the source files in src/common/
- */
-const char *
-libor_get_digests(void)
-{
-  return ""
-#include "common_sha1.i"
-    ;
-}
-
diff --git a/src/or/config.c b/src/or/config.c
index 68157a1..f6c32d6 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -1909,7 +1909,6 @@ static const struct {
   { "-h",                     0 },
   { "--help",                 0 },
   { "--list-torrc-options",   0 },
-  { "--digests",              0 },
   { "--nt-service",           0 },
   { "-nt-service",            0 },
   { NULL, 0 },
@@ -4386,13 +4385,6 @@ options_init_from_torrc(int argc, char **argv)
     exit(0);
   }
 
-  if (config_line_find(cmdline_only_options, "--digests")) {
-    printf("Tor version %s.\n",get_version());
-    printf("%s", libor_get_digests());
-    printf("%s", tor_get_digests());
-    exit(0);
-  }
-
   if (config_line_find(cmdline_only_options, "--library-versions")) {
     printf("Tor version %s. \n", get_version());
     printf("Library versions\tCompiled\t\tRuntime\n");
diff --git a/src/or/config.h b/src/or/config.h
index b064f05..b0b23bc 100644
--- a/src/or/config.h
+++ b/src/or/config.h
@@ -91,7 +91,6 @@ int getinfo_helper_config(control_connection_t *conn,
                           const char *question, char **answer,
                           const char **errmsg);
 
-const char *tor_get_digests(void);
 uint32_t get_effective_bwrate(const or_options_t *options);
 uint32_t get_effective_bwburst(const or_options_t *options);
 
diff --git a/src/or/config_codedigest.c b/src/or/config_codedigest.c
deleted file mode 100644
index 86d14ba..0000000
--- a/src/or/config_codedigest.c
+++ /dev/null
@@ -1,13 +0,0 @@
-
-const char *tor_get_digests(void);
-
-/** Return a string describing the digest of the source files in src/or/
- */
-const char *
-tor_get_digests(void)
-{
-  return ""
-#include "or_sha1.i"
-    ;
-}
-
diff --git a/src/or/include.am b/src/or/include.am
index c7f22ab..e315cae 100644
--- a/src/or/include.am
+++ b/src/or/include.am
@@ -79,8 +79,7 @@ LIBTOR_A_SOURCES = \
 	src/or/status.c					\
 	src/or/onion_ntor.c				\
 	$(evdns_source)					\
-	$(tor_platform_source)				\
-	src/or/config_codedigest.c
+	$(tor_platform_source)
 
 src_or_libtor_a_SOURCES = $(LIBTOR_A_SOURCES)
 src_or_libtor_testing_a_SOURCES = $(LIBTOR_A_SOURCES)
@@ -190,8 +189,6 @@ ORHEADERS = \
 
 noinst_HEADERS+= $(ORHEADERS) micro-revision.i
 
-src/or/config_codedigest.o: src/or/or_sha1.i
-
 micro-revision.i: FORCE
 	$(AM_V_GEN)rm -f micro-revision.tmp; \
 	if test -d "$(top_srcdir)/.git" && \
@@ -210,18 +207,6 @@ micro-revision.i: FORCE
 	rm -f micro-revision.tmp; \
 	true
 
-src/or/or_sha1.i: $(src_or_tor_SOURCES) $(src_or_libtor_a_SOURCES) $(ORHEADERS)
-	$(AM_V_GEN)if test "@SHA1SUM@" != none; then \
-	  (cd "$(srcdir)" && "@SHA1SUM@" $(src_or_tor_SOURCES) $(src_or_libtor_a_SOURCES) $(ORHEADERS) ) | \
-	  "@SED@" -n 's/^\(.*\)$$/"\1\\n"/p' > src/or/or_sha1.i; \
-	elif test "@OPENSSL@" != none; then \
-	  (cd "$(srcdir)" && "@OPENSSL@" sha1 $(src_or_tor_SOURCES) $(src_or_libtor_a_SOURCES) $(ORHEADERS)) | \
-	  "@SED@" -n 's/SHA1(\(.*\))= \(.*\)/"\2  \1\\n"/p' > src/or/or_sha1.i; \
-	else \
-	  rm src/or/or_sha1.i; \
-	  touch src/or/or_sha1.i; \
-	fi
-
-CLEANFILES+= src/or/or_sha1.i micro-revision.i src/or/micro-revision.i micro-revision.tmp
+CLEANFILES+= micro-revision.i src/or/micro-revision.i micro-revision.tmp
 
 FORCE:



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits