Re: net/tor: fix example hidden service config

2016-05-17 Thread Pascal Stumpf
On Tue, 17 May 2016 18:05:50 -0400, Michael McConville wrote:
> Michael McConville wrote:
> > We patch Tor to use /var/tor instead of /var/lib/tor, but the hidden
> > service example in the config hasn't been patched. This causes Tor to
> > fail on startup if the example is used:
> > 
> > > Error creating directory /var/lib/tor/hidden_service/: No such file or 
> > > directory
> > 
> > The below patch fixes this.
> 
> Ping. Is there anything that could be improved with this patch?

Sorry, forgot about it.  Totally ok (though adjust the REVISION line
ofc).

> > Index: Makefile
> > ===
> > RCS file: /cvs/ports/net/tor/Makefile,v
> > retrieving revision 1.88
> > diff -u -p -u -r1.88 Makefile
> > --- Makefile10 Dec 2015 23:35:11 -  1.88
> > +++ Makefile3 May 2016 16:18:58 -
> > @@ -3,6 +3,7 @@
> >  COMMENT=   anonymity service using onion routing
> >  
> >  DISTNAME=  tor-0.2.7.6
> > +REVISION=  0
> >  CATEGORIES=net
> >  HOMEPAGE=  https://www.torproject.org/
> >  
> > Index: patches/patch-src_config_torrc_sample_in
> > ===
> > RCS file: /cvs/ports/net/tor/patches/patch-src_config_torrc_sample_in,v
> > retrieving revision 1.15
> > diff -u -p -u -r1.15 patch-src_config_torrc_sample_in
> > --- patches/patch-src_config_torrc_sample_in25 Nov 2015 21:04:07 
> > -  1.15
> > +++ patches/patch-src_config_torrc_sample_in3 May 2016 16:18:58 
> > -
> > @@ -1,6 +1,6 @@
> >  $OpenBSD: patch-src_config_torrc_sample_in,v 1.15 2015/11/25 21:04:07 
> > pascal Exp $
> >  src/config/torrc.sample.in.origFri Nov 13 14:41:38 2015
> > -+++ src/config/torrc.sample.in Fri Nov 20 19:45:16 2015
> > +--- src/config/torrc.sample.in.origFri Nov 13 08:41:38 2015
> >  src/config/torrc.sample.in Tue May  3 11:27:08 2016
> >  @@ -39,18 +39,18 @@
> >   ## Send every possible message to @LOCALSTATEDIR@/log/tor/debug.log
> >   #Log debug file @LOCALSTATEDIR@/log/tor/debug.log
> > @@ -23,6 +23,19 @@ $OpenBSD: patch-src_config_torrc_sample_
> >   
> >   ## The port on which Tor will listen for local connections from Tor
> >   ## controller applications, as documented in control-spec.txt.
> > +@@ -69,10 +69,10 @@
> > + ## HiddenServicePort x y:z says to redirect requests on port x to the
> > + ## address y:z.
> > + 
> > +-#HiddenServiceDir @LOCALSTATEDIR@/lib/tor/hidden_service/
> > ++#HiddenServiceDir @LOCALSTATEDIR@/tor/hidden_service/
> > + #HiddenServicePort 80 127.0.0.1:80
> > + 
> > +-#HiddenServiceDir @LOCALSTATEDIR@/lib/tor/other_hidden_service/
> > ++#HiddenServiceDir @LOCALSTATEDIR@/tor/other_hidden_service/
> > + #HiddenServicePort 80 127.0.0.1:80
> > + #HiddenServicePort 22 127.0.0.1:22
> > + 
> >  @@ -182,6 +182,8 @@
> >   ## and any public IPv4 and IPv6 addresses on any interface on the relay.
> >   ## See the man page entry for ExitPolicyRejectPrivate if you want to allow
> > 



Re: net/tor: fix example hidden service config

2016-05-17 Thread Michael McConville
Michael McConville wrote:
> We patch Tor to use /var/tor instead of /var/lib/tor, but the hidden
> service example in the config hasn't been patched. This causes Tor to
> fail on startup if the example is used:
> 
> > Error creating directory /var/lib/tor/hidden_service/: No such file or 
> > directory
> 
> The below patch fixes this.

Ping. Is there anything that could be improved with this patch?

> Index: Makefile
> ===
> RCS file: /cvs/ports/net/tor/Makefile,v
> retrieving revision 1.88
> diff -u -p -u -r1.88 Makefile
> --- Makefile  10 Dec 2015 23:35:11 -  1.88
> +++ Makefile  3 May 2016 16:18:58 -
> @@ -3,6 +3,7 @@
>  COMMENT= anonymity service using onion routing
>  
>  DISTNAME=tor-0.2.7.6
> +REVISION=0
>  CATEGORIES=  net
>  HOMEPAGE=https://www.torproject.org/
>  
> Index: patches/patch-src_config_torrc_sample_in
> ===
> RCS file: /cvs/ports/net/tor/patches/patch-src_config_torrc_sample_in,v
> retrieving revision 1.15
> diff -u -p -u -r1.15 patch-src_config_torrc_sample_in
> --- patches/patch-src_config_torrc_sample_in  25 Nov 2015 21:04:07 -  
> 1.15
> +++ patches/patch-src_config_torrc_sample_in  3 May 2016 16:18:58 -
> @@ -1,6 +1,6 @@
>  $OpenBSD: patch-src_config_torrc_sample_in,v 1.15 2015/11/25 21:04:07 pascal 
> Exp $
>  src/config/torrc.sample.in.orig  Fri Nov 13 14:41:38 2015
> -+++ src/config/torrc.sample.in   Fri Nov 20 19:45:16 2015
> +--- src/config/torrc.sample.in.orig  Fri Nov 13 08:41:38 2015
>  src/config/torrc.sample.in   Tue May  3 11:27:08 2016
>  @@ -39,18 +39,18 @@
>   ## Send every possible message to @LOCALSTATEDIR@/log/tor/debug.log
>   #Log debug file @LOCALSTATEDIR@/log/tor/debug.log
> @@ -23,6 +23,19 @@ $OpenBSD: patch-src_config_torrc_sample_
>   
>   ## The port on which Tor will listen for local connections from Tor
>   ## controller applications, as documented in control-spec.txt.
> +@@ -69,10 +69,10 @@
> + ## HiddenServicePort x y:z says to redirect requests on port x to the
> + ## address y:z.
> + 
> +-#HiddenServiceDir @LOCALSTATEDIR@/lib/tor/hidden_service/
> ++#HiddenServiceDir @LOCALSTATEDIR@/tor/hidden_service/
> + #HiddenServicePort 80 127.0.0.1:80
> + 
> +-#HiddenServiceDir @LOCALSTATEDIR@/lib/tor/other_hidden_service/
> ++#HiddenServiceDir @LOCALSTATEDIR@/tor/other_hidden_service/
> + #HiddenServicePort 80 127.0.0.1:80
> + #HiddenServicePort 22 127.0.0.1:22
> + 
>  @@ -182,6 +182,8 @@
>   ## and any public IPv4 and IPv6 addresses on any interface on the relay.
>   ## See the man page entry for ExitPolicyRejectPrivate if you want to allow
> 



net/tor: fix example hidden service config

2016-05-03 Thread Michael McConville
We patch Tor to use /var/tor instead of /var/lib/tor, but the hidden
service example in the config hasn't been patched. This causes Tor to
fail on startup if the example is used:

> Error creating directory /var/lib/tor/hidden_service/: No such file or 
> directory

The below patch fixes this.


Index: Makefile
===
RCS file: /cvs/ports/net/tor/Makefile,v
retrieving revision 1.88
diff -u -p -u -r1.88 Makefile
--- Makefile10 Dec 2015 23:35:11 -  1.88
+++ Makefile3 May 2016 16:18:58 -
@@ -3,6 +3,7 @@
 COMMENT=   anonymity service using onion routing
 
 DISTNAME=  tor-0.2.7.6
+REVISION=  0
 CATEGORIES=net
 HOMEPAGE=  https://www.torproject.org/
 
Index: patches/patch-src_config_torrc_sample_in
===
RCS file: /cvs/ports/net/tor/patches/patch-src_config_torrc_sample_in,v
retrieving revision 1.15
diff -u -p -u -r1.15 patch-src_config_torrc_sample_in
--- patches/patch-src_config_torrc_sample_in25 Nov 2015 21:04:07 -  
1.15
+++ patches/patch-src_config_torrc_sample_in3 May 2016 16:18:58 -
@@ -1,6 +1,6 @@
 $OpenBSD: patch-src_config_torrc_sample_in,v 1.15 2015/11/25 21:04:07 pascal 
Exp $
 src/config/torrc.sample.in.origFri Nov 13 14:41:38 2015
-+++ src/config/torrc.sample.in Fri Nov 20 19:45:16 2015
+--- src/config/torrc.sample.in.origFri Nov 13 08:41:38 2015
 src/config/torrc.sample.in Tue May  3 11:27:08 2016
 @@ -39,18 +39,18 @@
  ## Send every possible message to @LOCALSTATEDIR@/log/tor/debug.log
  #Log debug file @LOCALSTATEDIR@/log/tor/debug.log
@@ -23,6 +23,19 @@ $OpenBSD: patch-src_config_torrc_sample_
  
  ## The port on which Tor will listen for local connections from Tor
  ## controller applications, as documented in control-spec.txt.
+@@ -69,10 +69,10 @@
+ ## HiddenServicePort x y:z says to redirect requests on port x to the
+ ## address y:z.
+ 
+-#HiddenServiceDir @LOCALSTATEDIR@/lib/tor/hidden_service/
++#HiddenServiceDir @LOCALSTATEDIR@/tor/hidden_service/
+ #HiddenServicePort 80 127.0.0.1:80
+ 
+-#HiddenServiceDir @LOCALSTATEDIR@/lib/tor/other_hidden_service/
++#HiddenServiceDir @LOCALSTATEDIR@/tor/other_hidden_service/
+ #HiddenServicePort 80 127.0.0.1:80
+ #HiddenServicePort 22 127.0.0.1:22
+ 
 @@ -182,6 +182,8 @@
  ## and any public IPv4 and IPv6 addresses on any interface on the relay.
  ## See the man page entry for ExitPolicyRejectPrivate if you want to allow