pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/net/py-foolscap



Module Name:    pkgsrc
Committed By:   wiz
Date:           Thu Sep  1 16:54:32 UTC 2016

Modified Files:
        pkgsrc/net/py-foolscap: Makefile PLIST distinfo

Log Message:
Updated py-foolscap to 0.12.2.

* Release 0.12.2 (28-Aug-2016)

** Improved Tor Connection Handler

The `tor.control_endpoint` connection handler now properly handles the
config.SocksPort response provided by the debian Tor daemon (and possibly
others), which included a confusing unix-domain socket in its response.

The `tor.socks_port` handler was changed to accept both hostname and port
number. Using anything but "localhost" or "127.0.0.1" is highly discouraged,
as it would reveal your IP address to (possibly hostile) external hosts. This
change was made to support applications (e.g. Tahoe-LAFS) which accept
endpoint strings to configure socks_port, but then parse them and reject
anything but TCP endpoints (to match Foolscap's current limitations). Such
applications ought to warn their users to use only localhost.

* Release 0.12.1 (20-Aug-2016)

** Connection Handlers for SOCKS, Tor, I2P

Foolscap now includes importable connection handlers for SOCKS(5a), Tor, and
I2P. #242, #246, #261

These handlers require additional supporting libraries, so they must be
imported separately, and a setuptools "extra feature" declaration must be
used to ask for the supporting libs. For example, applications which want to
use `tor:` hints (on a host with a Tor daemon running) should have a setup.py
with:

  install_requires=["foolscap[tor]"],

and the Tub setup code should do:

  from foolscap.connections import tor
  tub.addConnectionHintHandler("tor", tor.default_socks())

Full examples and docs are available in docs/connection-handlers.rst.

The default connection-negotiation timeout was increased from 60s to 120s, to
accomodate tor/i2p daemon startup times.

* Release 0.12.0 (20-Jul-2016)

** API changes: no more automatic configuration

Foolscap has moved from automatic listener configuration (randomly-allocated
TCP ports, automatically-determined IP address) to using more predictable
manual configuration. In our experience, the automatic configuration only
worked on hosts which had external IP addresses, which (sadly) is not the
case for most computers attached to the modern internet. #252

Applications must now explicitly provide Foolscap with port numbers (for
Tub.listenOn) and hostnames (for Tub.setLocation). Applications are
encouraged to give users configuration controls to teach Foolscap what
hostname and port number it should advertise to external hosts in the FURLs
it creates. See https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2773 for ideas.

The specific API changes were:

- Tub.setLocationAutomatically() has been deprecated
- Listener.getPortnum() has been deprecated
- calling Tub.listenOn("tcp:0") is also deprecated: callers should allocate a
  port themselves (the foolscap.util.allocate_tcp_port utility function,
  which does not block, has been added for this purpose).

Foolscap tools like "flappserver create" and "flogtool create-gatherer" will
no longer try to deduce their external IP address in an attempt to build
externally-reachable FURLs, and will no longer accept "tcp:0" as a listening
port (they now default to specific port numbers). Instead, they have
--location= and --port arguments. The user must provide '--location' with a
connection-hint string like 'tcp:hostname.example.org:3117' (which is put
into the server's FURLs). This must match the corresponding '--port'
argument, if provided.

- for all tools, if '--port' is provided, it must not be tcp:0
- 'flappserver create' now requires --location, and '--port' defaults to
  tcp:3116
- 'flogtool create-gatherer' requires --location, default port is tcp:3117
- 'flogtool create-incident-gatherer' does too, default is tcp:3118

For backwards-compatibility, old flappservers will have "tcp:0" written into
their "BASEDIR/port" file, and an empty string in "BASEDIR/location": these
must then be edited to allow the flappserver to start. For example, write
"tcp:12345" into "BASEDIR/port" to assign a portnumber, and
"tcp:HOSTNAME:12345" into "BASEDIR/location" to expose it in the generated
FURL.

** Other API changes

Tub.listenOn() now takes a string or an Endpoint (something that implements
twisted.internet.interfaces.IStreamServerEndpoint). This makes it possible to
listen on non-IPv4 sockets (e.g. IPv6-only sockets, or unix-domain sockets,
or more exotic endpoints), as long as Tub.setLocation() is set to something
which the other end's connection handlers can deal with. #203 #243

The "DefaultTCP" handler (which manages normal "tcp:HOST:PORT" connection
hints) has been moved to foolscap.connections.tcp . This makes room for new
Tor/I2P/SOCKS handlers to live in e.g. foolscap.connections.tor . #260

Connection handlers are now allowed to return a Deferred from
hint_to_endpoint(), which should make some handlers easier to write. #262

Note that RemoteReference.notifyOnDisconnect() will be deprecated in the next
release (once all internal uses have been removed from Foolscap).
Applications should stop using it as soon as possible. #42 #140 #207

** Compatibility Changes

This release removes support for the old (py2.4) "sets" module. This was
retained to support applications which were trying to maintain py2.4
compatibility, but it's been so long since this was necessary, it's time to
remove it.

** Other Changes

The internal `allocate_tcp_port()` function was fixed: unexpected kernel
behavior meant that sometimes it would return a port that was actually in
use. This caused unit tests to fail randomly about 5% of the time. #258

IPv6 support is nearly complete: listening on a plain TCP port will typically
accept connections via both IPv4 and IPv6, and the DefaultTCP handler will do
a hostname lookup that can use both A and AAAA records. So as long as your
server has a DNS entry that points at its IPv6 address, and you provide the
hostname to Tub.setLocation(), Foolscap will connect over IPv6. There is one
piece missing for complete support: the DefaultTCP connection handler must be
modified to accept square-bracketed numeric IPv6 addresses, for rare
situations where the host has a known (stable) IPv6 address, but no DNS name.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 pkgsrc/net/py-foolscap/Makefile
cvs rdiff -u -r1.8 -r1.9 pkgsrc/net/py-foolscap/PLIST
cvs rdiff -u -r1.12 -r1.13 pkgsrc/net/py-foolscap/distinfo

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/net/py-foolscap/Makefile
diff -u pkgsrc/net/py-foolscap/Makefile:1.20 pkgsrc/net/py-foolscap/Makefile:1.21
--- pkgsrc/net/py-foolscap/Makefile:1.20        Sat Jul  9 13:04:00 2016
+++ pkgsrc/net/py-foolscap/Makefile     Thu Sep  1 16:54:32 2016
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.20 2016/07/09 13:04:00 wiz Exp $
+# $NetBSD: Makefile,v 1.21 2016/09/01 16:54:32 wiz Exp $
 
-DISTNAME=      foolscap-0.11.0
+DISTNAME=      foolscap-0.12.2
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
 CATEGORIES=    net python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=f/foolscap/}

Index: pkgsrc/net/py-foolscap/PLIST
diff -u pkgsrc/net/py-foolscap/PLIST:1.8 pkgsrc/net/py-foolscap/PLIST:1.9
--- pkgsrc/net/py-foolscap/PLIST:1.8    Wed Apr 13 18:19:49 2016
+++ pkgsrc/net/py-foolscap/PLIST        Thu Sep  1 16:54:32 2016
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.8 2016/04/13 18:19:49 wiz Exp $
+@comment $NetBSD: PLIST,v 1.9 2016/09/01 16:54:32 wiz Exp $
 bin/flappclient
 bin/flappserver
 bin/flogtool
@@ -47,9 +47,21 @@ ${PYSITELIB}/foolscap/call.pyo
 ${PYSITELIB}/foolscap/connection.py
 ${PYSITELIB}/foolscap/connection.pyc
 ${PYSITELIB}/foolscap/connection.pyo
-${PYSITELIB}/foolscap/connection_plugins.py
-${PYSITELIB}/foolscap/connection_plugins.pyc
-${PYSITELIB}/foolscap/connection_plugins.pyo
+${PYSITELIB}/foolscap/connections/__init__.py
+${PYSITELIB}/foolscap/connections/__init__.pyc
+${PYSITELIB}/foolscap/connections/__init__.pyo
+${PYSITELIB}/foolscap/connections/i2p.py
+${PYSITELIB}/foolscap/connections/i2p.pyc
+${PYSITELIB}/foolscap/connections/i2p.pyo
+${PYSITELIB}/foolscap/connections/socks.py
+${PYSITELIB}/foolscap/connections/socks.pyc
+${PYSITELIB}/foolscap/connections/socks.pyo
+${PYSITELIB}/foolscap/connections/tcp.py
+${PYSITELIB}/foolscap/connections/tcp.pyc
+${PYSITELIB}/foolscap/connections/tcp.pyo
+${PYSITELIB}/foolscap/connections/tor.py
+${PYSITELIB}/foolscap/connections/tor.pyc
+${PYSITELIB}/foolscap/connections/tor.pyo
 ${PYSITELIB}/foolscap/constraint.py
 ${PYSITELIB}/foolscap/constraint.pyc
 ${PYSITELIB}/foolscap/constraint.pyo
@@ -188,9 +200,18 @@ ${PYSITELIB}/foolscap/test/apphelper.pyo
 ${PYSITELIB}/foolscap/test/bench_banana.py
 ${PYSITELIB}/foolscap/test/bench_banana.pyc
 ${PYSITELIB}/foolscap/test/bench_banana.pyo
+${PYSITELIB}/foolscap/test/check-connections-client.py
+${PYSITELIB}/foolscap/test/check-connections-client.pyc
+${PYSITELIB}/foolscap/test/check-connections-client.pyo
+${PYSITELIB}/foolscap/test/check-connections-server.py
+${PYSITELIB}/foolscap/test/check-connections-server.pyc
+${PYSITELIB}/foolscap/test/check-connections-server.pyo
 ${PYSITELIB}/foolscap/test/common.py
 ${PYSITELIB}/foolscap/test/common.pyc
 ${PYSITELIB}/foolscap/test/common.pyo
+${PYSITELIB}/foolscap/test/run_trial.py
+${PYSITELIB}/foolscap/test/run_trial.pyc
+${PYSITELIB}/foolscap/test/run_trial.pyo
 ${PYSITELIB}/foolscap/test/test__versions.py
 ${PYSITELIB}/foolscap/test/test__versions.pyc
 ${PYSITELIB}/foolscap/test/test__versions.pyo
@@ -224,6 +245,9 @@ ${PYSITELIB}/foolscap/test/test_interfac
 ${PYSITELIB}/foolscap/test/test_keepalive.py
 ${PYSITELIB}/foolscap/test/test_keepalive.pyc
 ${PYSITELIB}/foolscap/test/test_keepalive.pyo
+${PYSITELIB}/foolscap/test/test_listener.py
+${PYSITELIB}/foolscap/test/test_listener.pyc
+${PYSITELIB}/foolscap/test/test_listener.pyo
 ${PYSITELIB}/foolscap/test/test_logging.py
 ${PYSITELIB}/foolscap/test/test_logging.pyc
 ${PYSITELIB}/foolscap/test/test_logging.pyo

Index: pkgsrc/net/py-foolscap/distinfo
diff -u pkgsrc/net/py-foolscap/distinfo:1.12 pkgsrc/net/py-foolscap/distinfo:1.13
--- pkgsrc/net/py-foolscap/distinfo:1.12        Wed Apr 13 18:19:49 2016
+++ pkgsrc/net/py-foolscap/distinfo     Thu Sep  1 16:54:32 2016
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.12 2016/04/13 18:19:49 wiz Exp $
+$NetBSD: distinfo,v 1.13 2016/09/01 16:54:32 wiz Exp $
 
-SHA1 (foolscap-0.11.0.tar.gz) = 0cad5bc18cabffe2c2723c13ce4a268fd2757e41
-RMD160 (foolscap-0.11.0.tar.gz) = 1830713de8ea02b4c9bcec84275019a95dccd9d8
-SHA512 (foolscap-0.11.0.tar.gz) = 577cd15e7f9207a9675999590cb1189edbdd77a2daee5cab80d66d40b1343bcb338a064eedf372ca7f8a102ed1cef0770923d6dea27dd6c3b37c0717cdc912e8
-Size (foolscap-0.11.0.tar.gz) = 491916 bytes
+SHA1 (foolscap-0.12.2.tar.gz) = 9a2cd49df608ad7e4df58ab66370ce6a118ecfb7
+RMD160 (foolscap-0.12.2.tar.gz) = 38bedb4218510a2fc54cee311651808f18716f5f
+SHA512 (foolscap-0.12.2.tar.gz) = fbc66d62fb3828975011c6b6ee9e7caa2d9377859ca214436412b475b20323d5b072c50b7617a0fa603f3c854c06f1871ac830b4228b99feded04e8256c88596
+Size (foolscap-0.12.2.tar.gz) = 505663 bytes



Home | Main Index | Thread Index | Old Index