Since I need to patch tor that does not yet support binding on a link-local ipv6 address, I compiled it from source.

The compile is successful (with minor warnings on the ar command) but the resulting executable has a strange behavior: it changes identity every 5 minutes.

Here is a detailed post on tor trac of this phenomenon: https://trac.torproject.org/projects/tor/ticket/24350

To be sure the observation is not due to my patch, the above post is when compiling the unmodified source that is within the Ubuntu source repository. Same behavior is observed with the latest tor ( as of this post).

I suspect what I have observed comes from a configuration paramater of one of the libraries (libevent, libssl) that has somewhere a default timeout of 5 minutes.

For tor, but more generally for any package I might want to compile, I would like to know where to find all the "parameters" to set so that the executable has the same behavior as those from the Ubuntu repositories.

For instance, I can see that the path where tor searches its configurations are different (first below is the tor binary from Ubuntu repo):

$ strings -d tor | grep -e '/.*torrc'
$ strings -d tor_0.3.1.8 | grep -e '/.*torrc'

Then I guess, when you build/compile something on Debian/Ubuntu you have a set of parameters for: path, timeouts, various options, etc...

I can live with the different default paths (the systemd service forces the path of the configuration file) but the "5 minutes bug" is very annoying. Moreover, as tor is about anonymity, there could be more serious "silent bug" like this one... and I'll be glad if I could avoid them!

In summary, I would like set up a build environment to be able to compile executable with the exact same defaults parameters as those from the Ubuntu official repository. First instance of that would be to compile tor with the same "parameters" as in the Ubuntu repo.


Found it on this question (so this is a duplicate!)

Configuration and compilation settings used for Ubuntu packages

This answer points to a very useful link: https://www.cyberciti.biz/faq/rebuilding-ubuntu-debian-linux-binary-package/

That solved my issue... and I even have a new .deb (although with a signature issue, but I'll look into that!)

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.