Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 619910 - net-vpn/tor needs 'net' depend at init script when is used as pransparent proxy
Summary: net-vpn/tor needs 'net' depend at init script when is used as pransparent proxy
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-28 07:29 UTC by Andrey Aleksandrovich
Modified: 2019-12-08 17:57 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Aleksandrovich 2017-05-28 07:29:20 UTC
Tor acts as transparent proxy for LAN 192.168.*.*, so it has this option (/etc/tor/torrc):
TransPort 192.168.0.1:9040

Recently I have updated NetworkManager to 1.8.0 version. And now tor doesn't start at system boot:

 * Starting NetworkManager ...
 * Marking NetworkManager as inactive. It will automatically be marked
 * as started after a network connection has been established.
 * WARNING: NetworkManager has started, but is inactive
 * WARNING: dnsmasq will start when NetworkManager has started
 * /var/run/tor: correcting owner
 * Starting tor ...
May 28 09:49:17.709 [warn] Could not bind to 192.168.0.1:9040: Cannot assign requested address
May 28 09:49:17.712 [warn] Failed to parse/validate config: Failed to bind one of the listener ports.
May 28 09:49:17.714 [err] Reading config failed--see warnings above.
 * start-stop-daemon: failed to start `/usr/bin/tor'
 * Failed to start tor

The dnsmasq (see log above) is scheduled to start after NetworkManager. I think must be the same. So it need

depend() {
        need net
}

at /etc/init.d/tor
Comment 1 Anthony Basile gentoo-dev 2017-12-17 12:16:20 UTC
Did adding need net fix the issue for you?  We used to have it, but the openrc people thought that it was being abused in some packages and so removed it.  I can add it back if you confirm that it fixes the issue for you.
Comment 2 Andrey Aleksandrovich 2017-12-17 18:39:19 UTC
(In reply to Anthony Basile from comment #1)
> Did adding need net fix the issue for you?  We used to have it, but the
> openrc people thought that it was being abused in some packages and so
> removed it.  I can add it back if you confirm that it fixes the issue for
> you.

Well, the opinion of community is the goal. As for my case, I found a simple workaround:
/etc/conf.d/tor
rc_need="net"

So, init script can be untuched.
Comment 3 Andrey Aleksandrovich 2018-01-02 16:00:35 UTC
Anthony, you can add to ebuild, as 'elog' section, something like this:

If you use OpenRC, please, note that tor doesn't have rc 'net' dependence for now. If you need one (using tor as transparent proxy, for example) you can set it in /etc/conf.d/tor as (change the appropriate net interface name):
rc_need="net.eth0"


And, with that, this bug can be closed, I think.