Bug 206235 - security/tor, security/tor-devel: create /var/run/tor and /var/log/tor, fix /var/lib/tor mentions
Summary: security/tor, security/tor-devel: create /var/run/tor and /var/log/tor, fix /...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Brendan Fabeny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-14 13:08 UTC by Dmitry Marakasov
Modified: 2016-01-29 16:20 UTC (History)
1 user (show)

See Also:
bf: maintainer-feedback+


Attachments
Patch (5.39 KB, patch)
2016-01-14 13:08 UTC, Dmitry Marakasov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Marakasov freebsd_committer 2016-01-14 13:08:31 UTC
Created attachment 165564 [details]
Patch

- Make the port create /var/run/tor and /var/log/tor directories, so it can work without any manual actions
- Remove note of these manual actions from pkg-message
- Change mentions of /var/lib/tor to /var/db/tor in example configs and documentation
- Mention in UPDATING that if /var/log/tor _file_ was created before it should be now moved away.
Comment 1 Dmitry Marakasov freebsd_committer 2016-01-14 13:38:05 UTC
Will commit next week on terms of maintainer timeout for 205651
Comment 2 Brendan Fabeny freebsd_committer 2016-01-17 12:19:33 UTC
I used to defer to the users when modifying /var, because some of them found it more convenient to make occasional manual changes than to have the port override their changes.  But the defaults are reasonable, and if a majority of users seem to prefer this, and the changes have been tested successfully, then I've no objection. Nits: the awkward 'away' in the addition to UPDATING isn't needed, and the first line should use articles: "The tor ports now create the /var/log/tor ...".
Comment 3 commit-hook freebsd_committer 2016-01-19 13:55:27 UTC
A commit references this bug:

Author: amdmi3
Date: Tue Jan 19 13:54:55 UTC 2016
New revision: 406686
URL: https://svnweb.freebsd.org/changeset/ports/406686

Log:
  - Make the tor ports create /var/run/tor and /var/log/tor directories, so it can work without any manual actions
  - Remove note of these manual actions from pkg-message
  - Change mentions of /var/lib/tor to /var/db/tor in example configs and documentation
  - Mention in UPDATING that if /var/log/tor _file_ was created before it should be now moved away

  PR:		206235
  Submitted by:	amdmi3
  Approved by:	bf (maintainer)

Changes:
  head/UPDATING
  head/security/tor/Makefile
  head/security/tor/files/pkg-message.in
  head/security/tor/pkg-plist
  head/security/tor-devel/Makefile
  head/security/tor-devel/files/pkg-message.in
  head/security/tor-devel/pkg-plist
Comment 4 Dmitry Marakasov freebsd_committer 2016-01-19 14:00:12 UTC
> I used to defer to the users when modifying /var, because some of them found it more convenient to make occasional manual changes than to have the port override their changes.  But the defaults are reasonable, and if a majority of users seem to prefer this, and the changes have been tested successfully, then I've no objection.

You shouldn't make users do extra tasks by hand when it can be made by the port. And I should mention that these changes do not interfere with custom setups, and do not introduce new defaults. It just makes the pidfile (crucial for rc.d script) and logs (if user enables them in config) work out of box.

> Nits: the awkward 'away' in the addition to UPDATING isn't needed, and the first line should use articles: "The tor ports now create the /var/log/tor ...".

Corrected, thank you.
Comment 5 cstdenis 2016-01-27 22:35:06 UTC
This change results in no logging at all for all new installs and any upgrades that did not have a custom logging setup. The previous setup had logging on by default.


Should at least uncomment the log line for notice level logging in the default config so it works like before for new installs, tho that still breaks logging on all upgrades. 


The UPDATING message "If you've used" implies that action is only needed in case of custom config whereas this breaks default config functionality. 


Since this update requires a config change by all users, it should probably be mentioned in the pkg-message.
Comment 6 Dmitry Marakasov freebsd_committer 2016-01-29 16:20:56 UTC
(In reply to cstdenis from comment #5)
> This change results in no logging at all for all new installs and any
> upgrades that did not have a custom logging setup. The previous setup had
> logging on by default.

This change was introduced by r403904 / PR 204739, not this PR.

> Should at least uncomment the log line for notice level logging in the
> default config so it works like before for new installs, tho that still
> breaks logging on all upgrades.

Why? The upstream has logging disabled by default, I'd prefer to stick to that.

> The UPDATING message "If you've used" implies that action is only needed in
> case of custom config whereas this breaks default config functionality. 

It wasn't a default config, it was intrusively forced by rc.d script in a way which could not be disabled.

But I can add extra UPDATING entry for this.