On Thu, Dec 22, 2022 at 08:17:46AM +0000, Stuart Henderson wrote:
> Don't overthink things though, there's really no need to split this
> up, a single package is fine (and maybe preferable in this case, as it
> stops a passive observer from figuring out whether you downloaded
> the proxy or server or client parts).
Thanks for your diff.
I like it and it works fine here after one tweak (see below). Perhaps a
bit silly that the package is still called snowflake_*proxy* but I
don't think that's too big of a deal.
When building the package, I did run into this:
> ===> Building package for snowflake_proxy-2.3.1p0
> Create /usr/ports/packages/amd64/all/snowflake_proxy-2.3.1p0.tgz
> Creating package snowflake_proxy-2.3.1p0
> Fatal error: can't parse comment is too long
> proxy daemon and pluggable transports for Tor access with censored net
> ^^^^^^^^^^
>
> at /usr/libdata/perl5/OpenBSD/PkgCreate.pm line 1318.
So below is a diff with a slightly tweaked COMMENT. How about this?
This is OK caspar@
Caspar
Index: Makefile
===================================================================
RCS file: /cvs/ports/net/snowflake_proxy/Makefile,v
retrieving revision 1.7
diff -u -p -r1.7 Makefile
--- Makefile 6 Oct 2022 17:05:25 -0000 1.7
+++ Makefile 22 Dec 2022 18:01:19 -0000
@@ -1,7 +1,8 @@
-COMMENT= proxy providing Tor access to others with censored net
+COMMENT= proxy, pluggable transport for Tor access with censored net
MODGO_MODNAME= git.torproject.org/pluggable-transports/snowflake.git/v2
V= 2.3.1
+REVISION= 0
MODGO_VERSION= v$V
DISTNAME= snowflake.git-${MODGO_VERSION}
@@ -17,7 +18,7 @@ PERMIT_PACKAGE= Yes
WANTLIB += c pthread
MODULES= lang/go
-ALL_TARGET= ./proxy/
+ALL_TARGET= ./proxy/ ./client/ ./server/
# done as a sed instead of patch because the path includes the version number
post-extract:
@@ -25,7 +26,9 @@ post-extract:
${WRKSRC}/proxy/lib/pt_event_logger.go
post-install:
- cd ${PREFIX}/bin && mv proxy snowflake_proxy
+.for i in proxy client server
+ mv ${PREFIX}/bin/$i ${PREFIX}/bin/snowflake_$i
+.endfor
.include "modules.inc"
.include <bsd.port.mk>
Index: pkg/DESCR
===================================================================
RCS file: /cvs/ports/net/snowflake_proxy/pkg/DESCR,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 DESCR
--- pkg/DESCR 28 Feb 2022 16:54:13 -0000 1.1.1.1
+++ pkg/DESCR 22 Dec 2022 18:01:19 -0000
@@ -12,5 +12,6 @@ e.g. by configuring it in Tor Browser.
Technical information is in
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/wikis/Technical%20Overview
-This package provides a proxy, for those who would like to use their
-internet connection to provide access to others via this protocol.
+This package provides a standalone proxy, for those who would like to use
+their internet connection to provide access to others via this protocol,
+and pluggable transports for Tor to allow using snowflake proxies.
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/net/snowflake_proxy/pkg/PLIST,v
retrieving revision 1.3
diff -u -p -r1.3 PLIST
--- pkg/PLIST 4 Mar 2022 10:46:34 -0000 1.3
+++ pkg/PLIST 22 Dec 2022 18:01:19 -0000
@@ -1,6 +1,8 @@
@newgroup _snowflakeproxy:874
@newuser _snowflakeproxy:874:_snowflakeproxy::snowflake_proxy
user:/nonexistent:/sbin/nologin
@rcscript ${RCDIR}/snowflake_proxy
+@bin bin/snowflake_client
@bin bin/snowflake_proxy
+@bin bin/snowflake_server
share/examples/login.conf.d/snowflake_proxy
@sample ${SYSCONFDIR}/login.conf.d/snowflake_proxy