diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-04-05 08:20:15 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-04-05 08:20:15 -0400 |
commit | 8f798b686d0d699c55a20ef19fe57dd487b3aa69 (patch) | |
tree | 5a9a704db6634e7cf5c485dc1d8874fd4cc22602 | |
parent | ec8ee541296f3ca494421cd8c8f9903e848823ec (diff) | |
parent | e3ad4957a8d06716d3e5dad9cda09ce236b941d1 (diff) | |
download | tor-8f798b686d0d699c55a20ef19fe57dd487b3aa69.tar.gz tor-8f798b686d0d699c55a20ef19fe57dd487b3aa69.zip |
Merge branch 'bug25679_033_squashed' into maint-0.3.3
-rw-r--r-- | changes/bug25679 | 4 | ||||
-rw-r--r-- | configure.ac | 12 |
2 files changed, 10 insertions, 6 deletions
diff --git a/changes/bug25679 b/changes/bug25679 new file mode 100644 index 0000000000..9247a29153 --- /dev/null +++ b/changes/bug25679 @@ -0,0 +1,4 @@ + o Minor bugfixes (compilation, rust): + - Build correctly when the rust dependencies submodule is loaded, + but the TOR_RUST_DEPENDENCIES environment variable is not set. + Fixes bug 25679; bugfix on 0.3.3.1-alpha. diff --git a/configure.ac b/configure.ac index 2045e0d5f1..143044956f 100644 --- a/configure.ac +++ b/configure.ac @@ -440,23 +440,23 @@ if test "x$enable_rust" = "xyes"; then AC_MSG_CHECKING([rust crate dependencies]) AC_ARG_VAR([TOR_RUST_DEPENDENCIES], [path to directory with local crate mirror]) if test "x$TOR_RUST_DEPENDENCIES" = "x"; then - TOR_RUST_DEPENDENCIES="$srcdir/src/ext/rust/" - NEED_MOD=1 + TOR_RUST_DEPENDENCIES="${srcdir}/src/ext/rust/crates" fi + dnl Check whether the path exists before we try to cd into it. if test ! -d "$TOR_RUST_DEPENDENCIES"; then AC_MSG_ERROR([Rust dependency directory $TOR_RUST_DEPENDENCIES does not exist. Specify a dependency directory using the TOR_RUST_DEPENDENCIES variable or allow cargo to fetch crates using --enable-cargo-online-mode.]) ERRORED=1 fi + dnl Make the path absolute, since we'll be using it from within a + dnl subdirectory. + TOR_RUST_DEPENDENCIES=$(cd "$TOR_RUST_DEPENDENCIES" ; pwd) + for dep in $rust_crates; do if test ! -d "$TOR_RUST_DEPENDENCIES"/"$dep"; then AC_MSG_ERROR([Failure to find rust dependency $TOR_RUST_DEPENDENCIES/$dep. Specify a dependency directory using the TOR_RUST_DEPENDENCIES variable or allow cargo to fetch crates using --enable-cargo-online-mode.]) ERRORED=1 fi done - if test "x$NEED_MOD" = "x1"; then - dnl When looking for dependencies from cargo, pick right directory - TOR_RUST_DEPENDENCIES="../../src/ext/rust" - fi if test "x$ERRORED" = "x"; then AC_MSG_RESULT([yes]) fi |