[new] matrix.org synapse server

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

[new] matrix.org synapse server

Renaud Allard-2
Hello,

Here is a port for synapse server from matrix.org including missing
dependencies.
It will only run on python3 (unlike FreeBSD port for example) because
that's the version listed as supported from the website.

Please check, report and enjoy :)


synapse.tgz (20K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [new] matrix.org synapse server

Renaud Allard-2


On 11/19/19 4:46 PM, Renaud Allard wrote:
> Hello,
>
> Here is a port for synapse server from matrix.org including missing
> dependencies.
> It will only run on python3 (unlike FreeBSD port for example) because
> that's the version listed as supported from the website.
>
> Please check, report and enjoy :)
>

Here is a version with some slight modifications:
The readme examples now show the ssl certs
MAINTAINER value has been added to the Makefile
rc.d script has been corrected for stop/check


synapse.tgz (20K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [new] matrix.org synapse server

Gilles Chehade-7
I don't know if there are comments to be made about how the port is crafted,
but this works fine for me. I'm currently using it and it works as expected.


November 22, 2019 12:12 PM, "Renaud Allard" <[hidden email]> wrote:

> On 11/19/19 4:46 PM, Renaud Allard wrote:
>
>> Hello,
>> Here is a port for synapse server from matrix.org including missing > dependencies.
>> It will only run on python3 (unlike FreeBSD port for example) because > that's the version listed
>> as supported from the website.
>> Please check, report and enjoy :)
>
> Here is a version with some slight modifications:
> The readme examples now show the ssl certs
> MAINTAINER value has been added to the Makefile
> rc.d script has been corrected for stop/check

Reply | Threaded
Open this post in threaded view
|

Re: [new] matrix.org synapse server

Stuart Henderson
In reply to this post by Renaud Allard-2
On 2019/11/22 12:12, Renaud Allard wrote:

>
>
> On 11/19/19 4:46 PM, Renaud Allard wrote:
> > Hello,
> >
> > Here is a port for synapse server from matrix.org including missing
> > dependencies.
> > It will only run on python3 (unlike FreeBSD port for example) because
> > that's the version listed as supported from the website.
> >
> > Please check, report and enjoy :)
> >
>
> Here is a version with some slight modifications:
> The readme examples now show the ssl certs
> MAINTAINER value has been added to the Makefile
> rc.d script has been corrected for stop/check
>

- use portcheck!

- typing-extensions and zipp are backports of features that are already
in the version of Python that we have in ports, so shouldn't be imported

- "# python3 tests require py-flake8-* ports" -> flake8 is in devel/flake8.

- various pkg/DESCR are poor (yes I know upstream's are also poor but that's
no reason for ours to be) or completely wrong (e.g. zipp's is copied
from typing-extensions)

- mixed whitespace in Makefiles, missing rcsids, bad COMMENT formatting

- please include a user.list diff if sending a port with @newuser

- is there anything that can be done about the generic filenames in /usr/local/bin?

bin/generate_config
bin/generate_signing_key.py
bin/hash_password
bin/move_remote_media_to_new_store.py
bin/register_new_matrix_user
bin/synapse_port_db
bin/sync_room_to_group.pl
bin/synctl

- diff below has some improvements but it needs more work

diff --git net/synapse/Makefile net/synapse/Makefile
index 6776206..e76618c 100644
--- net/synapse/Makefile
+++ net/synapse/Makefile
@@ -3,9 +3,10 @@
 COMMENT = open network for secure, decentralized communication
 
 MODPY_EGG_VERSION = 1.5.1
+
 GH_ACCOUNT = matrix-org
 GH_PROJECT = synapse
-GH_TAGNAME = v1.5.1
+GH_TAGNAME = v${MODPY_EGG_VERSION}
 CATEGORIES = net
 
 HOMEPAGE = https://matrix.org/
@@ -57,7 +58,9 @@ RUN_DEPENDS = archivers/py-zipp${MODPY_FLAVOR} \
  security/py-service_identity${MODPY_FLAVOR} \
  security/py-PyNaCl${MODPY_FLAVOR} \
  security/py-openssl${MODPY_FLAVOR}
+
 TEST_DEPENDS = ${RUN_DEPENDS}
+
 do-test:
  cd ${WRKSRC} && ${SETENV} PYTHONPATH=. ${LOCALBASE}/bin/trial tests
 
diff --git net/synapse/pkg/DESCR net/synapse/pkg/DESCR
index 5b35cf4..c3663c1 100644
--- net/synapse/pkg/DESCR
+++ net/synapse/pkg/DESCR
@@ -1,9 +1,10 @@
-Matrix specifies a set of pragmatic RESTful HTTP JSON APIs as an open standard, which handle:
+Matrix specifies a set of RESTful HTTP JSON APIs as an open standard for
+federated Instant Messaging and VoIP (creating and managing distributed chat
+rooms without points of control or failure, cryptographically secure state
+synchronisation across an open network, etc).
 
-* Creating and managing fully distributed chat rooms with no single points of control or failure
-* Eventually-consistent cryptographically secure synchronisation of room state across a global open network of federated servers and services
-* Sending and receiving extensible messages in a room with (optional) end-to-end encryption[1]
-* Inviting, joining, leaving, kicking, banning room members
-* Managing user accounts (registration, login, logout)
-* Using 3rd Party IDs (3PIDs) such as email addresses, phone numbers, Facebook accounts to authenticate, identify and discover users on Matrix.
-* Placing 1:1 VoIP and Video calls
+In Matrix, every user runs one or more Matrix clients, which connect
+through to a Matrix homeserver. The homeserver stores all their personal
+chat history and user account information.
+
+Synapse is a reference "homeserver" implementation of Matrix.
diff --git net/synapse/pkg/README net/synapse/pkg/README
index 0081aab..9761c3d 100644
--- net/synapse/pkg/README
+++ net/synapse/pkg/README
@@ -1,3 +1,11 @@
+XXX format according to README.template
+
+XXX don't hardcode: python3 -> ${MODPY_BIN}, /var -> ${LOCALSTATEDIR}
+
+XXX expand text a bit and join things together e.g. rather than just
+XXX saying "will run without TLS" and a separate "vhost reverse proxy
+XXX examples", say that you can use a reverse proxy to add HTTPS
+
 Generate a config:
 Go into /var/synapse, then
 doas -u _synapse python3 -m synapse.app.homeserver \
diff --git textproc/py-canonicaljson/pkg/DESCR textproc/py-canonicaljson/pkg/DESCR
index 37eba5f..d327e33 100644
--- textproc/py-canonicaljson/pkg/DESCR
+++ textproc/py-canonicaljson/pkg/DESCR
@@ -1,8 +1,10 @@
-* Encodes objects and arrays as `RFC 7159`_ JSON.
+Python module to encode JSON in a standard format.
+
+* Encodes objects and arrays as RFC 7159 JSON.
 * Sorts object keys so that you get the same result each time.
 * Has no insignificant whitespace to make the output as small as possible.
-* Escapes only the characters that must be escaped, U+0000 to U+0019 / U+0022 /
-  U+0056, to keep the output as small as possible.
+* Escapes only the characters that must be escaped (U+0000 to U+0019,
+  U+0022, U+0056), to keep the output as small as possible.
 * Uses the shortest escape sequence for each escaped character.
 * Encodes the JSON as UTF-8.
-* Can encode ``frozendict`` immutable dictionaries.
+* Can encode "frozendict" immutable dictionaries.
diff --git textproc/py-canonicaljson/pkg/PLIST textproc/py-canonicaljson/pkg/PLIST
index 08dc57c..58d9b9d 100644
--- textproc/py-canonicaljson/pkg/PLIST
+++ textproc/py-canonicaljson/pkg/PLIST
@@ -1,3 +1,4 @@
+@comment $OpenBSD: PLIST,v$
 lib/python${MODPY_VERSION}/
 lib/python${MODPY_VERSION}/site-packages/
 ${MODPY_COMMENT}lib/python${MODPY_VERSION}/site-packages/${MODPY_PYCACHE}/
diff --git textproc/py-signedjson/Makefile textproc/py-signedjson/Makefile
index 412f4c9..49c157d 100644
--- textproc/py-signedjson/Makefile
+++ textproc/py-signedjson/Makefile
@@ -3,7 +3,6 @@
 COMMENT = sign JSON with Ed25519 signatures
 
 MODPY_EGG_VERSION = 1.0.0
-#DISTNAME = signedjson-${MODPY_EGG_VERSION}
 PKGNAME = py-signedjson-${MODPY_EGG_VERSION}
 
 GH_ACCOUNT = matrix-org
@@ -23,7 +22,7 @@ RUN_DEPENDS = textproc/py-canonicaljson${MODPY_FLAVOR} \
  textproc/py-unpaddedbase64${MODPY_FLAVOR} \
  security/py-libnacl${MODPY_FLAVOR}
 
-FLAVORS= python3
-FLAVOR?=
+FLAVORS = python3
+FLAVOR ?=
 
 .include <bsd.port.mk>
diff --git textproc/py-signedjson/pkg/DESCR textproc/py-signedjson/pkg/DESCR
index f33ece7..d5b8aad 100644
--- textproc/py-signedjson/pkg/DESCR
+++ textproc/py-signedjson/pkg/DESCR
@@ -1,11 +1,10 @@
 Signs JSON objects with ED25519 signatures.
 
+- More than one entity can sign the same object.
 
-Features
---------
+- Each entity can sign the object with more than one key making it
+easier to rotate keys
 
-* More than one entity can sign the same object.
-* Each entity can sign the object with more than one key making it easier to
-  rotate keys
-* ED25519 can be replaced with a different algorithm.
-* Unprotected data can be added to the object under the ``"unsigned"`` key.
+- ED25519 can be replaced with a different algorithm.
+
+- Unprotected data can be added to the object under the "unsigned" key.
diff --git textproc/py-signedjson/pkg/PLIST textproc/py-signedjson/pkg/PLIST
index bdbaab3..6d31e0d 100644
--- textproc/py-signedjson/pkg/PLIST
+++ textproc/py-signedjson/pkg/PLIST
@@ -1,3 +1,4 @@
+@comment $OpenBSD: PLIST,v$
 lib/python${MODPY_VERSION}/
 lib/python${MODPY_VERSION}/site-packages/
 lib/python${MODPY_VERSION}/site-packages/signedjson/
diff --git textproc/py-unpaddedbase64/Makefile textproc/py-unpaddedbase64/Makefile
index c6b0c70..c14db50 100644
--- textproc/py-unpaddedbase64/Makefile
+++ textproc/py-unpaddedbase64/Makefile
@@ -1,12 +1,13 @@
 # $OpenBSD$
 
-COMMENT = unpadded Base64
+COMMENT = Python module implementing Base64 without "=" padding
 
 MODPY_EGG_VERSION = 1.1.0
-PKGNAME = py-unpaddedbase64-${MODPY_EGG_VERSION}
+
 GH_ACCOUNT = matrix-org
 GH_PROJECT = python-unpaddedbase64
 GH_TAGNAME = v${MODPY_EGG_VERSION}
+PKGNAME = py-unpaddedbase64-${MODPY_EGG_VERSION}
 
 CATEGORIES = textproc
 
@@ -19,7 +20,8 @@ PERMIT_PACKAGE = Yes
 
 MODULES = lang/python
 MODPY_SETUPTOOLS = Yes
+
 FLAVORS = python3
-FLAVOR?=
+FLAVOR ?=
 
 .include <bsd.port.mk>
diff --git textproc/py-unpaddedbase64/pkg/DESCR textproc/py-unpaddedbase64/pkg/DESCR
index 9892433..122c42b 100644
--- textproc/py-unpaddedbase64/pkg/DESCR
+++ textproc/py-unpaddedbase64/pkg/DESCR
@@ -1,33 +1,5 @@
-Unpadded Base64
-===============
+Python module to encode and decode Base64 without "=" padding.
 
-.. image:: https://img.shields.io/pypi/v/unpaddedbase64.svg
-    :target: https://pypi.python.org/pypi/unpaddedbase64/
-    :alt: Latest Version
-
-.. image:: https://img.shields.io/travis/matrix-org/python-unpaddedbase64.svg
-   :target: https://travis-ci.org/matrix-org/python-unpaddedbase64
-
-Encode and decode Base64 without "=" padding.
-
-`RFC 4648`_ specifies that Base64 should be padded to a multiple of 4 bytes
-using "=" characters. However this conveys no benefit so many protocols choose
-to use Base64 without the "=" padding.
-
-.. _`RFC 4648`: https://tools.ietf.org/html/rfc4648
-
-Installing
-----------
-
-.. code:: bash
-
-   pip install unpaddedbase64
-
-Using
------
-
-.. code:: python
-
-    import unpaddedbase64
-    assert (unpaddedbase64.encode_base64(b'\x00')) == u'AA'
-    assert (unpaddedbase64.decode_base64(u'AA')) == b'\x00'
\ No newline at end of file
+RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
+using "=" characters. However this conveys no benefit so many protocols
+choose to use Base64 without the "=" padding.
diff --git textproc/py-unpaddedbase64/pkg/PLIST textproc/py-unpaddedbase64/pkg/PLIST
index afdb0cd..102401d 100644
--- textproc/py-unpaddedbase64/pkg/PLIST
+++ textproc/py-unpaddedbase64/pkg/PLIST
@@ -1,3 +1,4 @@
+@comment $OpenBSD: PLIST,v$
 lib/python${MODPY_VERSION}/
 lib/python${MODPY_VERSION}/site-packages/
 ${MODPY_COMMENT}lib/python${MODPY_VERSION}/site-packages/${MODPY_PYCACHE}/
diff --git www/py-macaroons/Makefile www/py-macaroons/Makefile
index 481bdcf..c7414ea 100644
--- www/py-macaroons/Makefile
+++ www/py-macaroons/Makefile
@@ -22,7 +22,7 @@ MODPY_PI = Yes
 RUN_DEPENDS = security/py-libnacl${MODPY_FLAVOR} \
  devel/py-six${MODPY_FLAVOR}
 
-FLAVORS=python3
-FLAVOR?=
+FLAVORS = python3
+FLAVOR ?=
 
 .include <bsd.port.mk>
diff --git www/py-macaroons/pkg/PLIST www/py-macaroons/pkg/PLIST
index 274c7cc..578de6e 100644
--- www/py-macaroons/pkg/PLIST
+++ www/py-macaroons/pkg/PLIST
@@ -1,3 +1,4 @@
+@comment $OpenBSD: PLIST,v$
 lib/python${MODPY_VERSION}/
 lib/python${MODPY_VERSION}/site-packages/
 lib/python${MODPY_VERSION}/site-packages/pymacaroons/
diff --git www/py-treq/Makefile www/py-treq/Makefile
index aa87432..88cb12c 100644
--- www/py-treq/Makefile
+++ www/py-treq/Makefile
@@ -1,11 +1,10 @@
 # $OpenBSD: Makefile,v 1.38 2019/07/12 20:51:02 sthen Exp $
 
-COMMENT= treq is an HTTP library inspired by requests
+COMMENT= HTTP library inspired by requests on top of Twisted Agents
 
 MODPY_EGG_VERSION= 18.6.0
 DISTNAME= treq-${MODPY_EGG_VERSION}
 PKGNAME= py-${DISTNAME}
-REVISION= 0
 
 CATEGORIES= www
 
@@ -19,7 +18,7 @@ PERMIT_PACKAGE= Yes
 MODULES= lang/python
 
 MODPY_PI= Yes
-MODPY_PYTEST = Yes
+MODPY_PYTEST= Yes
 MODPY_SETUPTOOLS= Yes
 
 FLAVORS= python3
diff --git www/py-treq/pkg/DESCR www/py-treq/pkg/DESCR
index da54936..3273ad4 100644
--- www/py-treq/pkg/DESCR
+++ www/py-treq/pkg/DESCR
@@ -1,8 +1,5 @@
-Requests is an ISC Licensed HTTP library, written in Python, for human
-beings.
+treq is an HTTP library inspired by requests but written on top of
+Twisted's Agents.
 
-Requests allow you to send HEAD, GET, POST, PUT, PATCH, and DELETE HTTP
-requests. You can add headers, form data, multipart files, and
-parameters with simple Python dictionaries, and access the response data
-in the same way. It's powered by urllib2, but it does all the hard work
-and crazy hacks for you.
+It provides a simple, higher level API for making HTTP requests when
+using Twisted.

Reply | Threaded
Open this post in threaded view
|

Re: [new] matrix.org synapse server

Renaud Allard-2


On 22/11/2019 12:53, Stuart Henderson wrote:

>
> - use portcheck!
>
> - typing-extensions and zipp are backports of features that are already
> in the version of Python that we have in ports, so shouldn't be imported
>
> - "# python3 tests require py-flake8-* ports" -> flake8 is in devel/flake8.
>
> - various pkg/DESCR are poor (yes I know upstream's are also poor but that's
> no reason for ours to be) or completely wrong (e.g. zipp's is copied
> from typing-extensions)
>
> - mixed whitespace in Makefiles, missing rcsids, bad COMMENT formatting
>
> - please include a user.list diff if sending a port with @newuser
>
> - is there anything that can be done about the generic filenames in /usr/local/bin?
>
> bin/generate_config
> bin/generate_signing_key.py
> bin/hash_password
> bin/move_remote_media_to_new_store.py
> bin/register_new_matrix_user
> bin/synapse_port_db
> bin/sync_room_to_group.pl
> bin/synctl
>
Here is an updated version, taking into account your remarks. Except the
typing-extensions, which seems to be required for this version.





synapse.tgz (20K) Download Attachment
synapse_user.diff (702 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [new] matrix.org synapse server

Renaud Allard-2

Given the move of scripts to /usr/local/share/synapse, README has been
updated.

synapse.tgz (20K) Download Attachment
synapse_user.diff (664 bytes) Download Attachment
smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [new] matrix.org synapse server

Renaud Allard-2


On 11/26/19 8:09 AM, Renaud Allard wrote:
>
> Given the move of scripts to /usr/local/share/synapse, README has been
> updated.

An update to synapse 1.6.0

synapse.tgz (20K) Download Attachment
synapse_user.diff (664 bytes) Download Attachment
smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [new] matrix.org synapse server

Renaud Allard-2


On 11/26/19 3:22 PM, Renaud Allard wrote:
>
>
> On 11/26/19 8:09 AM, Renaud Allard wrote:
>>
>> Given the move of scripts to /usr/local/share/synapse, README has been
>> updated.
>
> An update to synapse 1.6.0

ping


smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

[new] matrix.org net/synapse server 1.7.0

Renaud Allard-2
Hello,

Here is an new port for net/synapse 1.7.0

Regards

synapse_user.diff (702 bytes) Download Attachment
synapse.tgz (20K) Download Attachment
smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [new] matrix.org net/synapse server 1.7.0

Renaud Allard-2


On 18/12/2019 08:39, Renaud Allard wrote:
> Hello,
>
> Here is an new port for net/synapse 1.7.0
>
> Regards

Update to 1.7.1 to solve a security issue


synapse_user.diff (702 bytes) Download Attachment
synapse.tgz (31K) Download Attachment
smime.p7s (5K) Download Attachment