]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Properly protect paths to sed, sha1sum, openssl
authorSebastian Hahn <sebastian@torproject.org>
Thu, 9 Feb 2012 23:51:58 +0000 (00:51 +0100)
committerSebastian Hahn <sebastian@torproject.org>
Fri, 10 Feb 2012 19:12:03 +0000 (20:12 +0100)
in Makefile.am, we used it without quoting it, causing build failure if
your openssl/sed/sha1sum happened to live in a directory with a space in
it (very common on windows)

changes/bug5065 [new file with mode: 0644]
src/common/Makefile.am
src/or/Makefile.am

diff --git a/changes/bug5065 b/changes/bug5065
new file mode 100644 (file)
index 0000000..d195313
--- /dev/null
@@ -0,0 +1,5 @@
+  o Major bugfixes:
+    - Fix build if path to sed, openssl or sha1sum contains spaces.
+      This is pretty common on Windows. Fixes bug 5065; bugfix on
+      0.2.2.1-alpha.
+
index 6952591d67037759701841a1d490c80c266e3e8f..6da1782c8e4943dd14a0ec40e0f844c65ac736db 100644 (file)
@@ -20,9 +20,9 @@ noinst_HEADERS = address.h torlog.h crypto.h util.h compat.h aes.h torint.h tort
 
 common_sha1.i: $(libor_SOURCES) $(libor_crypto_a_SOURCES) $(noinst_HEADERS)
        if test "@SHA1SUM@" != none; then \
-         @SHA1SUM@ $(libor_SOURCES) $(libor_crypto_a_SOURCES) $(noinst_HEADERS) | @SED@ -n 's/^\(.*\)$$/"\1\\n"/p' > common_sha1.i; \
+         "@SHA1SUM@" $(libor_SOURCES) $(libor_crypto_a_SOURCES) $(noinst_HEADERS) | "@SED@" -n 's/^\(.*\)$$/"\1\\n"/p' > common_sha1.i; \
        elif test "@OPENSSL@" != none; then \
-         @OPENSSL@ sha1 $(libor_SOURCES) $(libor_crypto_a_SOURCES) $(noinst_HEADERS) | @SED@ -n 's/SHA1(\(.*\))= \(.*\)/"\2  \1\\n"/p' > common_sha1.i; \
+         "@OPENSSL@" sha1 $(libor_SOURCES) $(libor_crypto_a_SOURCES) $(noinst_HEADERS) | "@SED@" -n 's/SHA1(\(.*\))= \(.*\)/"\2  \1\\n"/p' > common_sha1.i; \
        else \
          rm common_sha1.i; \
          touch common_sha1.i; \
index a9ac3cdee1191432bbbf56c049d7fb8da5e4002c..4f4e9c97313cfe2761106834c128f602f9d78fce 100644 (file)
@@ -74,9 +74,9 @@ micro-revision.i: FORCE
 
 or_sha1.i: $(tor_SOURCES)
        if test "@SHA1SUM@" != none; then \
-         @SHA1SUM@ $(tor_SOURCES) | @SED@ -n 's/^\(.*\)$$/"\1\\n"/p' > or_sha1.i; \
+         "@SHA1SUM@" $(tor_SOURCES) | "@SED@" -n 's/^\(.*\)$$/"\1\\n"/p' > or_sha1.i; \
        elif test "@OPENSSL@" != none; then \
-         @OPENSSL@ sha1 $(tor_SOURCES) | @SED@ -n 's/SHA1(\(.*\))= \(.*\)/"\2  \1\\n"/p' > or_sha1.i; \
+         "@OPENSSL@" sha1 $(tor_SOURCES) | "@SED@" -n 's/SHA1(\(.*\))= \(.*\)/"\2  \1\\n"/p' > or_sha1.i; \
        else \
          rm or_sha1.i; \
          touch or_sha1.i; \