Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Jan 2016 13:54:54 +0000 (UTC)
From:      Dmitry Marakasov <amdmi3@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r406686 - in head: . security/tor security/tor-devel security/tor-devel/files security/tor/files
Message-ID:  <201601191354.u0JDssV9005912@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: amdmi3
Date: Tue Jan 19 13:54:54 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)

Modified:
  head/UPDATING
  head/security/tor-devel/Makefile
  head/security/tor-devel/files/pkg-message.in
  head/security/tor-devel/pkg-plist
  head/security/tor/Makefile
  head/security/tor/files/pkg-message.in
  head/security/tor/pkg-plist

Modified: head/UPDATING
==============================================================================
--- head/UPDATING	Tue Jan 19 13:53:24 2016	(r406685)
+++ head/UPDATING	Tue Jan 19 13:54:54 2016	(r406686)
@@ -5,6 +5,14 @@ they are unavoidable.
 You should get into the habit of checking this file for changes each time
 you update your ports collection, before attempting any port upgrades.
 
+20160119:
+  AFFECTS: users of security/tor, security/tor-devel
+  AUTHOR: amdmi3@FreeBSD.org
+
+  The tor ports now create /var/log/tor subdirectory for tor logs. If
+  you've used /var/log/tor as a log _file_, you'll need to update your
+  torrc and move the file before updating the port.
+
 20160118:
   AFFECTS: users of mail/rspamd and mail/rmilter
   AUTHOR: vsevolod@FreeBSD.org

Modified: head/security/tor-devel/Makefile
==============================================================================
--- head/security/tor-devel/Makefile	Tue Jan 19 13:53:24 2016	(r406685)
+++ head/security/tor-devel/Makefile	Tue Jan 19 13:54:54 2016	(r406686)
@@ -3,6 +3,7 @@
 
 PORTNAME=	tor
 PORTVERSION=	0.2.7.6
+PORTREVISION=	1
 CATEGORIES=	security net ipv6
 MASTER_SITES=	TOR
 PKGNAMESUFFIX=	-devel
@@ -109,6 +110,10 @@ CONFIGURE_ARGS+=	--disable-transparent
 post-patch:
 	@${REINPLACE_CMD} -E -e "s@(-z) (relro|now)@-Wl,\1,\2@g" \
 		${WRKSRC}/configure
+	@${REINPLACE_CMD} -e 's|lib/tor|db/tor|' \
+		${WRKSRC}/src/config/torrc.*.in \
+		${WRKSRC}/doc/tor.1.* \
+		${WRKSRC}/doc/tor.html.in
 
 post-patch-STATIC_TOR-off:
 	@${REINPLACE_CMD} -e "s@-ltcmalloc@${LOCALBASE}/lib/libtcmalloc.so@" \
@@ -122,6 +127,9 @@ post-configure:
 	@${REINPLACE_CMD} -e '\|^nodist_man1_MANS =|s|$$|$$(install_mans:=.1)|' \
 		${WRKSRC}/Makefile
 
+post-install:
+	@${MKDIR} ${STAGEDIR}/var/log/tor ${STAGEDIR}/var/run/tor
+
 .if ! ${PORT_OPTIONS:MTOR2WEB}
 check regression-test test: build
 	@cd ${BUILD_WRKSRC} ; ${SETENV} ${MAKE_ENV} ${MAKE_CMD} \

Modified: head/security/tor-devel/files/pkg-message.in
==============================================================================
--- head/security/tor-devel/files/pkg-message.in	Tue Jan 19 13:53:24 2016	(r406685)
+++ head/security/tor-devel/files/pkg-message.in	Tue Jan 19 13:54:54 2016	(r406686)
@@ -3,17 +3,10 @@ To enable the tor server, set tor_enable
 and edit %%PREFIX%%/etc/tor/torrc as desired. (However, note that the
 %%PREFIX%%/etc/rc.d/tor rc.subr script can override some torrc
 options: see that script for details.) To use the torify script, install
-the net/torsocks port. After installing tor for the first time, or after
-a major update of tor, you should:
+the net/torsocks port.
 
-rm -r /var/db/tor /var/run/tor
-mkdir -p /var/db/tor/data /var/run/tor
-touch /var/log/tor
-chown -R _tor:_tor /var/db/tor /var/log/tor /var/run/tor
-chmod -R 700 /var/db/tor
-
-before starting the tor server. Tor users are strongly advised to prevent traffic
-analysis that exploits sequential IP IDs by setting:
+Tor users are strongly advised to prevent traffic analysis that
+exploits sequential IP IDs by setting:
 
 sysctl net.inet.ip.random_id=1
 

Modified: head/security/tor-devel/pkg-plist
==============================================================================
--- head/security/tor-devel/pkg-plist	Tue Jan 19 13:53:24 2016	(r406685)
+++ head/security/tor-devel/pkg-plist	Tue Jan 19 13:54:54 2016	(r406686)
@@ -9,3 +9,5 @@ man/man1/tor.1.gz
 man/man1/torify.1.gz
 %%DATADIR%%/geoip
 %%DATADIR%%/geoip6
+@dir(_tor,_tor,750) /var/run/tor
+@dir(_tor,_tor,750) /var/log/tor

Modified: head/security/tor/Makefile
==============================================================================
--- head/security/tor/Makefile	Tue Jan 19 13:53:24 2016	(r406685)
+++ head/security/tor/Makefile	Tue Jan 19 13:54:54 2016	(r406686)
@@ -3,6 +3,7 @@
 
 PORTNAME=	tor
 PORTVERSION=	0.2.7.6
+PORTREVISION=	1
 CATEGORIES=	security net ipv6
 MASTER_SITES=	TOR
 
@@ -106,6 +107,10 @@ CONFIGURE_ARGS+=	--disable-transparent
 post-patch:
 	@${REINPLACE_CMD} -E -e "s@(-z) (relro|now)@-Wl,\1,\2@g" \
 		${WRKSRC}/configure
+	@${REINPLACE_CMD} -e 's|lib/tor|db/tor|' \
+		${WRKSRC}/src/config/torrc.*.in \
+		${WRKSRC}/doc/tor.1.* \
+		${WRKSRC}/doc/tor.html.in
 
 post-patch-STATIC_TOR-off:
 	@${REINPLACE_CMD} -e "s@-ltcmalloc@${LOCALBASE}/lib/libtcmalloc.so@" \
@@ -119,6 +124,9 @@ post-configure:
 	@${REINPLACE_CMD} -e '\|^nodist_man1_MANS =|s|$$|$$(install_mans:=.1)|' \
 		${WRKSRC}/Makefile
 
+post-install:
+	@${MKDIR} ${STAGEDIR}/var/log/tor ${STAGEDIR}/var/run/tor
+
 .if ! ${PORT_OPTIONS:MTOR2WEB}
 check regression-test test: build
 	@cd ${BUILD_WRKSRC} ; ${SETENV} ${MAKE_ENV} ${MAKE_CMD} \

Modified: head/security/tor/files/pkg-message.in
==============================================================================
--- head/security/tor/files/pkg-message.in	Tue Jan 19 13:53:24 2016	(r406685)
+++ head/security/tor/files/pkg-message.in	Tue Jan 19 13:54:54 2016	(r406686)
@@ -3,17 +3,10 @@ To enable the tor server, set tor_enable
 and edit %%PREFIX%%/etc/tor/torrc as desired. (However, note that the
 %%PREFIX%%/etc/rc.d/tor rc.subr script can override some torrc
 options: see that script for details.) To use the torify script, install
-the net/torsocks port. After installing tor for the first time, or after
-a major update of tor, you should:
+the net/torsocks port.
 
-rm -r /var/db/tor /var/run/tor
-mkdir -p /var/db/tor/data /var/run/tor
-touch /var/log/tor
-chown -R _tor:_tor /var/db/tor /var/log/tor /var/run/tor
-chmod -R 700 /var/db/tor
-
-before starting the tor server. Tor users are strongly advised to prevent traffic
-analysis that exploits sequential IP IDs by setting:
+Tor users are strongly advised to prevent traffic analysis that
+exploits sequential IP IDs by setting:
 
 sysctl net.inet.ip.random_id=1
 

Modified: head/security/tor/pkg-plist
==============================================================================
--- head/security/tor/pkg-plist	Tue Jan 19 13:53:24 2016	(r406685)
+++ head/security/tor/pkg-plist	Tue Jan 19 13:54:54 2016	(r406686)
@@ -9,3 +9,5 @@ man/man1/tor.1.gz
 man/man1/torify.1.gz
 %%DATADIR%%/geoip
 %%DATADIR%%/geoip6
+@dir(_tor,_tor,750) /var/run/tor
+@dir(_tor,_tor,750) /var/log/tor



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601191354.u0JDssV9005912>