#27067 closed defect (implemented)

test-network can't find tor binaries on tor master

Reported by: catalyst Owned by:
Priority: Medium Milestone: Tor: 0.3.5.x-final
Component: Core Tor/Chutney Version:
Severity: Normal Keywords:
Cc: teor Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

make test-network doesn't work on master even when given explicit paths for CHUTNEY_TOR and CHUTNEY_TOR_GENCERT. This seems to be due to the 0.3.5 source tree reorganization.

chutney should learn about the new source tree layout (and also probably keep looking for the old layout for backward compatibility).

There is a child ticket for dealing with TOR_DIR overriding CHUTNEY_TOR and CHUTNEY_TOR_GENCERT.

Example failure when setting only CHUTNEY_PATH:

$ CHUTNEY_PATH=../../chutney make test-network
../src/test/test-network.sh --hs-multi-client 1
test-network.sh: using CHUTNEY_DNS_CONF '/dev/null'
test-network.sh: no $TOR_DIR, chutney will use $PATH for tor binaries
Using Python 2.7.12
Sending SIGINT to nodes
Waiting for nodes to finish.
bootstrap-network.sh: bootstrapping network: bridges+hs
Using Python 2.7.12
NOTE: creating '/home/tlyu/src/tor/build-norust/../../chutney/net/nodes.1533677645', linking to '/home/tlyu/src/tor/build-norust/../../chutney/net/nodes'
Creating identity key /home/tlyu/src/chutney/net/nodes/000a/keys/authority_identity_key for test000a with tor-gencert --create-identity-key --passphrase-fd 0 -i /home/tlyu/src/chutney/net/nodes/000a/keys/authority_identity_key -s /home/tlyu/src/chutney/net/nodes/000a/keys/authority_signing_key -c /home/tlyu/src/chutney/net/nodes/000a/keys/authority_certificate -m 12 -a 127.0.0.1:7000
Cannot find the tor-gencert binary tor-gencert for the command line 'tor-gencert --create-identity-key --passphrase-fd 0 -i /home/tlyu/src/chutney/net/nodes/000a/keys/authority_identity_key -s /home/tlyu/src/chutney/net/nodes/000a/keys/authority_signing_key -c /home/tlyu/src/chutney/net/nodes/000a/keys/authority_certificate -m 12 -a 127.0.0.1:7000'. Use the CHUTNEY_TOR_GENCERT environment variable to set the path, or put the binary into $PATH: '/home/tlyu/.cargo/bin:/home/tlyu/bin:/home/tlyu/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin'. If your $PATH contains ~, use $HOME instead.
sed: can't read /home/tlyu/src/tor/build-norust/../../chutney/net/nodes/*a/torrc: No such file or directory
Using Python 2.7.12
Starting nodes
Cannot find tor binary 'tor'. Use CHUTNEY_TOR environment variable to set the path, or put the binary into $PATH.
Using Python 2.7.12
0/12 nodes are running
Makefile:15762: recipe for target 'test-network' failed
make: *** [test-network] Error 3

Example failure when setting CHUTNEY_TOR, CHUTNEY_TOR_GENCERT, and CHUTNEY_PATH:

$ CHUTNEY_TOR=`pwd`/src/app/tor CHUTNEY_TOR_GENCERT=`pwd`/src/tools/tor-gencert CHUTNEY_PATH=../../chutney make test-network
../src/test/test-network.sh --hs-multi-client 1
test-network.sh: using CHUTNEY_DNS_CONF '/dev/null'
test-network.sh: no $TOR_DIR, chutney will use $PATH for tor binaries
Using Python 2.7.12
Sending SIGINT to nodes
Waiting for nodes to finish.
bootstrap-network.sh: bootstrapping network: bridges+hs
Using Python 2.7.12
NOTE: creating '/home/tlyu/src/tor/build-norust/../../chutney/net/nodes.1533677759', linking to '/home/tlyu/src/tor/build-norust/../../chutney/net/nodes'
Creating identity key /home/tlyu/src/chutney/net/nodes/000a/keys/authority_identity_key for test000a with tor-gencert --create-identity-key --passphrase-fd 0 -i /home/tlyu/src/chutney/net/nodes/000a/keys/authority_identity_key -s /home/tlyu/src/chutney/net/nodes/000a/keys/authority_signing_key -c /home/tlyu/src/chutney/net/nodes/000a/keys/authority_certificate -m 12 -a 127.0.0.1:7000
Cannot find the tor-gencert binary tor-gencert for the command line 'tor-gencert --create-identity-key --passphrase-fd 0 -i /home/tlyu/src/chutney/net/nodes/000a/keys/authority_identity_key -s /home/tlyu/src/chutney/net/nodes/000a/keys/authority_signing_key -c /home/tlyu/src/chutney/net/nodes/000a/keys/authority_certificate -m 12 -a 127.0.0.1:7000'. Use the CHUTNEY_TOR_GENCERT environment variable to set the path, or put the binary into $PATH: '/home/tlyu/.cargo/bin:/home/tlyu/bin:/home/tlyu/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin'. If your $PATH contains ~, use $HOME instead.
sed: can't read /home/tlyu/src/tor/build-norust/../../chutney/net/nodes/*a/torrc: No such file or directory
Using Python 2.7.12
Starting nodes
Cannot find tor binary 'tor'. Use CHUTNEY_TOR environment variable to set the path, or put the binary into $PATH.
Using Python 2.7.12
0/12 nodes are running
Makefile:15762: recipe for target 'test-network' failed
make: *** [test-network] Error 3

Child Tickets

TicketStatusOwnerSummaryComponent
#27068closedTOR_DIR shouldn't override CHUTNEY_TOR and CHUTNEY_TOR_GENCERTCore Tor/Chutney

Change History (3)

comment:1 Changed 16 months ago by catalyst

Workaround: create a src/or directory in the build tree and symlink the tor binary to it, so chutney can find tor where it's accustomed to.

comment:2 Changed 16 months ago by teor

Status: newneeds_review

I fixed this issue by making test-network.sh look for src/app or src/or.

Please see my branch bug27067 on https://github.com/teor2345/chutney.git

comment:3 Changed 16 months ago by nickm

Resolution: implemented
Status: needs_reviewclosed

lgtm; squashed and merged to master

Note: See TracTickets for help on using tickets.