Summary: | net-vpn/tor: Job for tor.service failed when /var/run is tmpfs | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | William Breathitt Gray <gentoo.defile> |
Component: | Current packages | Assignee: | Anthony Basile <blueness> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | noein93, tsmksubc |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://github.com/gentoo/gentoo/pull/7277 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | tmpfiles.d configuration for Tor systemd service |
Description
William Breathitt Gray
2017-12-06 14:35:15 UTC
We went back and forth on the tor service file so many times, I gave up and just stuck with upstream. I'm not a systemd user so I'm not able to test and this was a source of frustration for me. Can you pass this by upstream and see if they'll add it? It seems like other distros might have this problem. I've created a ticket for this issue on the main Tor project bug tracker site: https://trac.torproject.org/projects/tor/ticket/24715 The ticket on the main Tor project bug tracker has been closed with a Resolution set to "invalid" and the following explanation: "I'm wondering if this is in fact a Gentoo bug, since in the standard configuration, the --PIDFile option isn't given to tor through systemd. (My understanding is that this is because systemd has its own system for keeping track of PIDs, i.e. and so using $MAINPID is the most systemd-ish way to do this.) Since Gentoo appears to have enabled PIDFile, they should probably also make sure that the place they are attempting to write to is actually available. Perhaps the Gentoo packagers would be willing to either take your patch or otherwise remove --PIDFile?" Would we be able to create the directory in the ebuild via the tmpfiles eclass? Created attachment 520678 [details]
tmpfiles.d configuration for Tor systemd service
This tmpfiles.d configuration file specfies the creation of the /var/run/tor directory to house the tor.pid file.
This can be installed by the Tor ebuild via the tmpfiles.eclass dotmpfiles and tmpfiles_process functions.
One problem which must still be addressed is permissions: tor.service currently marks / as ReadOnlyDirectory by default, so /var/run/tor must be added as a ReadWriteDirectory to allow tor.pid to be written. However, at that point it may be easier to simply use RuntimeDirectory to create the /var/run/tor directory.
(In reply to William Breathitt Gray from comment #4) > Created attachment 520678 [details] > tmpfiles.d configuration for Tor systemd service > > This tmpfiles.d configuration file specfies the creation of the /var/run/tor > directory to house the tor.pid file. > > This can be installed by the Tor ebuild via the tmpfiles.eclass dotmpfiles > and tmpfiles_process functions. > > One problem which must still be addressed is permissions: tor.service > currently marks / as ReadOnlyDirectory by default, so /var/run/tor must be > added as a ReadWriteDirectory to allow tor.pid to be written. However, at > that point it may be easier to simply use RuntimeDirectory to create the > /var/run/tor directory. can you give me a full patch against the current tree, or even better a PR on github. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c0fe6a0d4e379ce403f88e54f23d77695fe2cf05 commit c0fe6a0d4e379ce403f88e54f23d77695fe2cf05 Author: William Breathitt Gray <vilhelm.gray@gmail.com> AuthorDate: 2018-02-25 00:26:52 +0000 Commit: Anthony G. Basile <blueness@gentoo.org> CommitDate: 2018-02-25 00:57:29 +0000 net-vpn/tor: Fix tor.service failure when /var/run is tmpfs Closes: https://bugs.gentoo.org/640040 .../files/tor-0.3.3.2-alpha-tor.service.in.patch | 12 +++ net-vpn/tor/tor-0.3.3.2_alpha-r1.ebuild | 85 ++++++++++++++++++++++ 2 files changed, 97 insertions(+) |