Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 509500 - net-misc/tor-0.2.5.4_alpha - systemd service fails to create /run/tor
Summary: net-misc/tor-0.2.5.4_alpha - systemd service fails to create /run/tor
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: 2014-05-03 20:09 UTC by poncho
Modified: 2014-05-08 22:37 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 poncho 2014-05-03 20:09:36 UTC
Unable to open "/var/run/tor/tor.pid" for writing: No such file or directory

The openrc script uses
checkpath -d -m 0755 -o tor:tor /var/run/tor

For systemd, we should provide a config file in tmpfiles.d
% cat /etc/tmpfiles.d/tor.conf
#Type   Path                Mode    UID     GID     Age     Argument
d       /var/run/tor        0775    tor     tor     -       -

net-misc/tor-0.2.5.4_alpha was built with the following:
USE="ecc threads -bufferevents -nat-pmp (-selinux) -stats -test -tor-hardening -transparent-proxy -upnp -web"
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2014-05-04 13:32:21 UTC
/var/run should not longer be used in favour of /run.
Comment 2 Anthony Basile gentoo-dev 2014-05-04 14:41:59 UTC
(In reply to poncho from comment #0)
> Unable to open "/var/run/tor/tor.pid" for writing: No such file or directory
> 
> The openrc script uses
> checkpath -d -m 0755 -o tor:tor /var/run/tor
> 
> For systemd, we should provide a config file in tmpfiles.d
> % cat /etc/tmpfiles.d/tor.conf
> #Type   Path                Mode    UID     GID     Age     Argument
> d       /var/run/tor        0775    tor     tor     -       -
> 
> net-misc/tor-0.2.5.4_alpha was built with the following:
> USE="ecc threads -bufferevents -nat-pmp (-selinux) -stats -test
> -tor-hardening -transparent-proxy -upnp -web"

I'm not a systemd user, so maybe the systemd folks can suggest a patch here.
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2014-05-08 14:22:31 UTC
(In reply to Jeroen Roovers from comment #1)
> /var/run should not longer be used in favour of /run.

that's true only for Linux -only packages, such as mdadm for example, /var/run is still preferred (the portable path)
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2014-05-08 14:27:19 UTC
the file should go into /usr/lib/tmpfiles.d/tor.conf, not /etc, otherwise the file suggested in Comment #0 is ok

(the /etc one is for user-defined overriding of the one from /usr/lib, and thus, out of scope for the PM installed files)
Comment 5 Anthony Basile gentoo-dev 2014-05-08 22:35:02 UTC
Okay its in with tor-0.2.5.4_alpha-r1.  Please test and reopen if this is still an issue.
Comment 6 Anthony Basile gentoo-dev 2014-05-08 22:37:01 UTC
(In reply to Samuli Suominen from comment #4)
> the file should go into /usr/lib/tmpfiles.d/tor.conf, not /etc, otherwise
> the file suggested in Comment #0 is ok
> 
> (the /etc one is for user-defined overriding of the one from /usr/lib, and
> thus, out of scope for the PM installed files)

I used systemd_dotmpfilesd.