Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 488426 - net-misc/tor: systemd service file submission
Summary: net-misc/tor: systemd service file submission
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords: PATCH
: 517024 (view as bug list)
Depends on:
Blocks: install-systemd-unit
  Show dependency tree
 
Reported: 2013-10-17 22:08 UTC by Emery Hemingway
Modified: 2014-07-13 15:13 UTC (History)
3 users (show)

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


Attachments
tor-0.2.5.1_alpha.ebuild patch (tor-ebuild.diff,1.10 KB, patch)
2013-10-17 22:10 UTC, Emery Hemingway
Details | Diff
tor.service (tor.service,328 bytes, text/plain)
2013-10-17 22:11 UTC, Emery Hemingway
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Emery Hemingway 2013-10-17 22:08:51 UTC
Tor does not come with a systemd service file.

Reproducible: Always
Comment 1 Emery Hemingway 2013-10-17 22:10:58 UTC
Created attachment 361168 [details, diff]
tor-0.2.5.1_alpha.ebuild patch
Comment 2 Emery Hemingway 2013-10-17 22:11:40 UTC
Created attachment 361170 [details]
tor.service
Comment 3 Pacho Ramos gentoo-dev 2013-10-19 08:23:42 UTC
Why?
TimeoutStopSec=32
LimitNOFILE=30000

Looks like Arch doesn't set them, while Fedora uses different values :/
Comment 4 poncho 2013-10-19 09:28:33 UTC
systemd related upstream bugs:

Add tor.service (for systemd) to upstream package
https://trac.torproject.org/projects/tor/ticket/8368

Tor systemd socket activation support
https://trac.torproject.org/projects/tor/ticket/8908
Comment 5 Pacho Ramos gentoo-dev 2013-10-19 09:46:11 UTC
Thanks, it explains the Limit, not sure about the timeoutStopSec :/
Comment 6 Emery Hemingway 2013-10-19 15:43:30 UTC
To quote the manpage:

SIGINT
Tor clients behave as with SIGTERM; but Tor servers will do a
controlled slow shutdown, closing listeners and waiting 30 seconds
before exiting. (The delay can be configured with the
ShutdownWaitLength config option.)
Comment 7 Pacho Ramos gentoo-dev 2013-10-19 15:56:26 UTC
OK, is LimitNOFILE=30000 enough or does it need anything a bit longer (in real run)? Looks like fedora people are letting it a bit more
Comment 8 Emery Hemingway 2013-10-19 16:03:03 UTC
30000 is just the number in conf.d/tor, I wasn't consulting the other files when I made it.

Now that I look this comment is on https://trac.torproject.org/projects/tor/ticket/8368.
"If you want to pick just one ulimit -n, 32768 is a good choice.
4096 is way too low for fast relays."
Comment 9 Pacho Ramos gentoo-dev 2013-10-28 19:41:29 UTC
+*tor-0.2.5.1_alpha-r1 (28 Oct 2013)
+
+  28 Oct 2013; Pacho Ramos <pacho@gentoo.org> +files/tor.service,
+  +tor-0.2.5.1_alpha-r1.ebuild:
+  Add unit file (#488426 by Emery Hemingway)
+
Comment 10 Jeroen Roovers (RETIRED) gentoo-dev 2014-07-13 15:13:54 UTC
*** Bug 517024 has been marked as a duplicate of this bug. ***