Giter Site home page Giter Site logo

matrix-org / synapse Goto Github PK

View Code? Open in Web Editor NEW
11.8K 244.0 2.1K 419.43 MB

Synapse: Matrix homeserver written in Python/Twisted.

Home Page: https://matrix-org.github.io/synapse

License: Apache License 2.0

Python 97.55% JavaScript 0.10% Perl 0.23% Shell 0.48% HTML 0.53% CSS 0.05% Dockerfile 0.10% Lua 0.01% Jinja 0.07% Rust 0.78% Makefile 0.01% Nix 0.10% Gherkin 0.01%
python matrix-org

synapse's Introduction

Synapse (get support on #synapse:matrix.org) (discuss development on #synapse-dev:matrix.org) (Rendered documentation on GitHub Pages) (check license in LICENSE file) (latest version released on PyPi) (supported python versions)

Synapse is now actively maintained at element-hq/synapse

Synapse is an open-source Matrix homeserver developed from 2019 through 2023 as part of the Matrix.org Foundation. The Matrix.org Foundation is not able to resource maintenance of Synapse and it continues to be developed by Element; additionally you have the choice of other Matrix homeservers.

See The future of Synapse and Dendrite blog post for more information.


Briefly, Matrix is an open standard for communications on the internet, supporting federation, encryption and VoIP. Matrix.org has more to say about the goals of the Matrix project, and the formal specification describes the technical details.

The Synapse documentation describes how to install Synapse. We recommend using Docker images or Debian packages from Matrix.org.

Synapse has a variety of config options which can be used to customise its behaviour after installation. There are additional details on how to configure Synapse for federation here.

It is recommended to put a reverse proxy such as nginx, Apache, Caddy, HAProxy or relayd in front of Synapse. One advantage of doing so is that it means that you can expose the default https port (443) to Matrix clients without needing to run Synapse with root privileges. For information on configuring one, see the reverse proxy docs.

The instructions for upgrading Synapse are in the upgrade notes. Please check these instructions as upgrading may require extra steps for some versions of Synapse.

Synapse uses a number of platform dependencies such as Python and PostgreSQL, and aims to follow supported upstream versions. See the deprecation policy for more details.

Matrix serves raw, user-supplied data in some APIs -- specifically the content repository endpoints.

Whilst we make a reasonable effort to mitigate against XSS attacks (for instance, by using CSP), a Matrix homeserver should not be hosted on a domain hosting other web applications. This especially applies to sharing the domain with Matrix web clients and other sensitive applications like webmail. See https://developer.github.com/changes/2014-04-25-user-content-security for more information.

Ideally, the homeserver should not simply be on a different subdomain, but on a completely different registered domain (also known as top-level site or eTLD+1). This is because some attacks are still possible as long as the two applications share the same registered domain.

To illustrate this with an example, if your Element Web or other sensitive web application is hosted on A.example1.com, you should ideally host Synapse on example2.com. Some amount of protection is offered by hosting on B.example1.com instead, so this is also acceptable in some scenarios. However, you should not host your Synapse on A.example1.com.

Note that all of the above refers exclusively to the domain used in Synapse's public_baseurl setting. In particular, it has no bearing on the domain mentioned in MXIDs hosted on that server.

Following this advice ensures that even if an XSS is found in Synapse, the impact to other applications will be minimal.

The easiest way to try out your new Synapse installation is by connecting to it from a web client.

Unless you are running a test instance of Synapse on your local machine, in general, you will need to enable TLS support before you can successfully connect from a client: see TLS certificates.

An easy way to get started is to login or register via Element at https://app.element.io/#/login or https://app.element.io/#/register respectively. You will need to change the server you are logging into from matrix.org and instead specify a Homeserver URL of https://<server_name>:8448 (or just https://<server_name> if you are using a reverse proxy). If you prefer to use another client, refer to our client breakdown.

If all goes well you should at least be able to log in, create a room, and start sending messages.

By default, registration of new users via Matrix clients is disabled. To enable it:

  1. In the registration config section set enable_registration: true in homeserver.yaml.
  2. Then either:
    1. set up a CAPTCHA, or
    2. set enable_registration_without_verification: true in homeserver.yaml.

We strongly recommend using a CAPTCHA, particularly if your homeserver is exposed to the public internet. Without it, anyone can freely register accounts on your homeserver. This can be exploited by attackers to create spambots targetting the rest of the Matrix federation.

Your new user name will be formed partly from the server_name, and partly from a localpart you specify when you create the account. Your name will take the form of:

@localpart:my.domain.name

(pronounced "at localpart on my dot domain dot name").

As when logging in, you will need to specify a "Custom server". Specify your desired localpart in the 'User name' box.

The Admin FAQ includes tips on dealing with some common problems. For more details, see Synapse's wider documentation.

For additional support installing or managing Synapse, please ask in the community support room #synapse:matrix.org (from a matrix.org account if necessary). We do not use GitHub issues for support requests, only for bug reports and feature requests.

Identity servers have the job of mapping email addresses and other 3rd Party IDs (3PIDs) to Matrix user IDs, as well as verifying the ownership of 3PIDs before creating that mapping.

They are not where accounts or credentials are stored - these live on home servers. Identity Servers are just for mapping 3rd party IDs to matrix IDs.

This process is very security-sensitive, as there is obvious risk of spam if it is too easy to sign up for Matrix accounts or harvest 3PID data. In the longer term, we hope to create a decentralised system to manage it (matrix-doc #712), but in the meantime, the role of managing trusted identity in the Matrix ecosystem is farmed out to a cluster of known trusted ecosystem partners, who run 'Matrix Identity Servers' such as Sydent, whose role is purely to authenticate and track 3PID logins and publish end-user public keys.

You can host your own copy of Sydent, but this will prevent you reaching other users in the Matrix ecosystem via their email address, and prevent them finding you. We therefore recommend that you use one of the centralised identity servers at https://matrix.org or https://vector.im for now.

To reiterate: the Identity server will only be used if you choose to associate an email address with your account, or send an invite to another user via their email address.

We welcome contributions to Synapse from the community! The best place to get started is our guide for contributors. This is part of our larger documentation, which includes

information for Synapse developers as well as Synapse administrators. Developers might be particularly interested in:

Alongside all that, join our developer community on Matrix: #synapse-dev:matrix.org, featuring real humans!

synapse's People

Contributors

aaronraimist avatar anoadragon453 avatar ara4n avatar babolivier avatar callahad avatar clokep avatar dbkr avatar dependabot[bot] avatar dklimpel avatar erikjohnston avatar fizzadar avatar h-shay avatar half-shot avatar hawkowl avatar illicitonion avatar jaywink avatar kaiyou avatar kegsay avatar lukebarnard1 avatar madlittlemods avatar michaelkaye avatar negativemjark avatar neilisfragile avatar notafile avatar reivilibre avatar richvdh avatar sandhose avatar squahtx avatar turt2live avatar uhoreg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

synapse's Issues

GET /events tests room membership at the wrong time (SYN-117)

Consider two users, A and B. User A creates a room and then B joins the room. In the meantime, user B is occasionally polling their event stream, updating tokens, etc.. However, the exact set of events that user B sees from their event stream will depend on the timing of their polling.

   A                  B
create room
set up room
                    poll /events
                    join room
                    poll /events

In this case, user B sees only their own m.room.member event on the event stream, as that was the only new event visible.

   A                  B
                    poll /events
create room
set up room
                    join room
                    poll /events

In this case in the current implementation, user B sees the room creation event and all the room setup events, even though at the time they were not a member of the room. This is because the delta between user B's event stream tokens selects all those events, and they are filtered based on current membership of the room and thus they all get returned.

(Imported from https://matrix.org/jira/browse/SYN-117)

(Reported by @leonerd)

Federation tests don't test the actual transaction JSON sent. (SYN-99)

The actual JSON sent by MatrixHttpClient.put_json is generated by the "json_data_callback" argument so that timestamps can be correctly set for retransmissions. However an additional blob of JSON is passed in as a "data" argument. This is ignored by the actual MatrixHttpClient. However the tests only consider the "data" argument and ignore the "json_data_callback".

(Imported from https://matrix.org/jira/browse/SYN-99)

(Reported by @NegativeMjark)

presence.py: 'NoneType' object has no attribute 'addCallbacks'

I'm periodically seeing exceptions.AttributeError: 'NoneType' object has no attribute 'addCallbacks' errors in the logs of the reference homeserver.

There does not appear to be a common type or timing of log entry immediately preceding the error.

Log extracts as follows.

Server started

2014-08-18 01:22:19,478 - twisted - 455 - INFO - Site starting on 8448

start_polling_presence

6 instances of the error relating to "/home/matrix/synapse/synapse/handlers/presence.py", line 426, in start_polling_presence:

  • 2014-08-18 01:22:23,201 - twisted - 455 - ERROR - Unhandled error in Deferred:
  • 2014-08-18 01:55:56,586 - twisted - 455 - ERROR - Unhandled error in Deferred:
  • 2014-08-18 02:55:57,690 - twisted - 455 - ERROR - Unhandled error in Deferred:
  • 2014-08-18 04:55:00,809 - twisted - 455 - ERROR - Unhandled error in Deferred:
  • 2014-08-18 06:55:25,996 - twisted - 455 - ERROR - Unhandled error in Deferred:
  • 2014-08-18 08:55:00,928 - twisted - 455 - ERROR - Unhandled error in Deferred:

2014-08-18 01:22:23,201 - twisted - 455 - ERROR - Unhandled error in Deferred:
2014-08-18 01:22:23,202 - twisted - 455 - ERROR - Unhandled Error
Traceback (most recent call last):
File "/home/matrix/.local/lib/python2.7/site-packages/Twisted-14.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 382, in callback
self._startRunCallbacks(result)
File "/home/matrix/.local/lib/python2.7/site-packages/Twisted-14.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 490, in _startRunCallbacks
self._runCallbacks()
File "/home/matrix/.local/lib/python2.7/site-packages/Twisted-14.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 577, in _runCallbacks
current.result = callback(current.result, _args, *_kw)
File "/home/matrix/.local/lib/python2.7/site-packages/Twisted-14.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 1155, in gotResult
_inlineCallbacks(r, g, deferred)
--- ---
File "/home/matrix/.local/lib/python2.7/site-packages/Twisted-14.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 1099, in _inlineCallbacks
result = g.send(result)
File "/home/matrix/synapse/synapse/handlers/presence.py", line 426, in start_polling_presence
yield defer.DeferredList(deferreds)
File "/home/matrix/.local/lib/python2.7/site-packages/Twisted-14.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 820, in init
deferred.addCallbacks(self._cbDeferred, self._cbDeferred,
exceptions.AttributeError: 'NoneType' object has no attribute 'addCallbacks'

stop_polling_presence

6 instances of the error relating to "/home/matrix/synapse/synapse/handlers/presence.py", line 481, in stop_polling_presence:

  • 2014-08-18 01:24:15,247 - twisted - 455 - ERROR - Unhandled error in Deferred:
  • 2014-08-18 01:56:47,801 - twisted - 455 - ERROR - Unhandled error in Deferred:
  • 2014-08-18 02:56:48,862 - twisted - 455 - ERROR - Unhandled error in Deferred:
  • 2014-08-18 04:55:52,694 - twisted - 455 - ERROR - Unhandled error in Deferred:
  • 2014-08-18 06:56:07,297 - twisted - 455 - ERROR - Unhandled error in Deferred:
  • 2014-08-18 08:55:53,604 - twisted - 455 - ERROR - Unhandled error in Deferred:

2014-08-18 01:24:15,247 - twisted - 455 - ERROR - Unhandled error in Deferred:
2014-08-18 01:24:15,247 - twisted - 455 - ERROR - Unhandled Error
Traceback (most recent call last):
File "/home/matrix/.local/lib/python2.7/site-packages/Twisted-14.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 382, in callback
self._startRunCallbacks(result)
File "/home/matrix/.local/lib/python2.7/site-packages/Twisted-14.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 490, in _startRunCallbacks
self._runCallbacks()
File "/home/matrix/.local/lib/python2.7/site-packages/Twisted-14.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 577, in _runCallbacks
current.result = callback(current.result, _args, *_kw)
File "/home/matrix/.local/lib/python2.7/site-packages/Twisted-14.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 1155, in gotResult
_inlineCallbacks(r, g, deferred)
--- ---
File "/home/matrix/.local/lib/python2.7/site-packages/Twisted-14.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 1099, in _inlineCallbacks
result = g.send(result)
File "/home/matrix/synapse/synapse/handlers/presence.py", line 230, in set_state
self.stop_polling_presence(target_user)
File "/home/matrix/synapse/synapse/handlers/presence.py", line 481, in stop_polling_presence
return defer.DeferredList(deferreds)
File "/home/matrix/.local/lib/python2.7/site-packages/Twisted-14.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 820, in init
deferred.addCallbacks(self._cbDeferred, self._cbDeferred,
exceptions.AttributeError: 'NoneType' object has no attribute 'addCallbacks'

Mail notifications (SYN-169)

A huge driver to remind people that Matrix exists would be to send them an opt-out weekly digest email or similar of notifications (and email notifications when people invite them). I'm thinking a weekly mail saying "You missed 245 messages on #matrix:matrix.org.. 126 on #matrix-dev:matrix.org; click here to unsubscribe"... and then realtime updates to tell you whenever someone's trying to PM you.

Hopefully the utility of the updates would outweigh their spamminess - and I think it helped Facebook's uptakes loads (especially before push notifs were a thing).

(Imported from https://matrix.org/jira/browse/SYN-169)

(Reported by @ara4n)

Generalized presence lists

Rather than only storing one list per user on a HS the concept of lists could be abstracted into just having lists that certain users (private/public) can subscribe too. Similar to lists on twitter or facebook.

These would then work similar to how rooms work but instead just passing along the listed users presence events.

Text view scrolls to bottom on input

Every time there's input, the text view scrolls to the bottom. This makes reading backscroll much harder than it should be, in particular in busy rooms.

500 when trying to set non-ascii event type (SYN-166)

2014-11-25 11:01:40,978 - synapse.storage._base - 74 - ERROR - PUT-2 - [SQL FAIL] {snapshot_room-0}
Traceback (most recent call last):
  File "synapse/storage/_base.py", line 71, in execute
    sql, *args, **kwargs
ProgrammingError: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings.
2014-11-25 11:01:40,979 - synapse.storage._base - 111 - ERROR - PUT-2 - [TXN FAIL] {snapshot_room-0}
Traceback (most recent call last):
  File "synapse/storage/_base.py", line 109, in inner_func
    return func(LoggingTransaction(txn, name), *args, **kwargs)
  File "synapse/storage/__init__.py", line 411, in _snapshot
    state_key=state_key,
  File "synapse/storage/event_federation.py", line 133, in _get_latest_state_in_room
    retcol="event_id",
  File "synapse/storage/_base.py", line 258, in _simple_select_onecol_txn
    txn.execute(sql, keyvalues.values())
  File "synapse/storage/_base.py", line 71, in execute
    sql, *args, **kwargs
ProgrammingError: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings.
2014-11-25 11:01:40,979 - synapse.http.server - 151 - ERROR - PUT-2 - You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings.
Traceback (most recent call last):
  File "synapse/http/server.py", line 127, in _async_render
    *m.groups()
  File "/home/kegan/.local/lib/python2.7/site-packages/Twisted-14.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 1097, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/home/kegan/.local/lib/python2.7/site-packages/Twisted-14.0.0-py2.7-linux-x86_64.egg/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "synapse/rest/room.py", line 169, in on_PUT
    event=event
  File "/home/kegan/.local/lib/python2.7/site-packages/Twisted-14.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 1097, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/home/kegan/.local/lib/python2.7/site-packages/Twisted-14.0.0-py2.7-linux-x86_64.egg/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "synapse/handlers/message.py", line 147, in store_room_data
    snapshot = yield self.store.snapshot_room(event)
  File "/home/kegan/.local/lib/python2.7/site-packages/Twisted-14.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 1097, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/home/kegan/.local/lib/python2.7/site-packages/Twisted-14.0.0-py2.7-linux-x86_64.egg/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "synapse/storage/_base.py", line 121, in runInteraction
    inner_func, *args, **kwargs
  File "/home/kegan/.local/lib/python2.7/site-packages/Twisted-14.0.0-py2.7-linux-x86_64.egg/twisted/python/threadpool.py", line 196, in _worker
    result = context.call(ctx, function, *args, **kwargs)
  File "/home/kegan/.local/lib/python2.7/site-packages/Twisted-14.0.0-py2.7-linux-x86_64.egg/twisted/python/context.py", line 118, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/home/kegan/.local/lib/python2.7/site-packages/Twisted-14.0.0-py2.7-linux-x86_64.egg/twisted/python/context.py", line 81, in callWithContext
    return func(**args,***kw)
  File "/home/kegan/.local/lib/python2.7/site-packages/Twisted-14.0.0-py2.7-linux-x86_64.egg/twisted/enterprise/adbapi.py", line 448, in _runInteraction
    result = interaction(trans, *args, **kw)
  File "synapse/storage/_base.py", line 109, in inner_func
    return func(LoggingTransaction(txn, name), *args, **kwargs)
  File "synapse/storage/__init__.py", line 411, in _snapshot
    state_key=state_key,
  File "synapse/storage/event_federation.py", line 133, in _get_latest_state_in_room
    retcol="event_id",
  File "synapse/storage/_base.py", line 258, in _simple_select_onecol_txn
    txn.execute(sql, keyvalues.values())
  File "synapse/storage/_base.py", line 71, in execute
    sql, *args, **kwargs
ProgrammingError: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings.

(Imported from https://matrix.org/jira/browse/SYN-166)

(Reported by @kegsay)

Refine coding style and conventions (particularly w.r.t. storage API) (SYN-50)

Simply saying "PEP-8" is in no way sufficient guidance to achieve a level of consistency in code style. It's good for explaining the literal letter-by-letter arrangement of the source code, but many higher-level concepts have gone unaddressed and are quite varied in style between authors currently.

In particular two thoughts come to mind:

  1. Whether the storage layer should be passed in ID strings, or internal User/RoomID objects; and whether it should return simple strings/hashes/lists, or higher-level application objects.
  2. Whether "internal helper" code, such as many of the pseudo-closures being passed into the ADBAPI .runInteraction method, should exist as toplevel methods on the relevant objects, or as inner definitions within the "public" API method that calls them.

(Imported from https://matrix.org/jira/browse/SYN-50)

(Reported by @leonerd)

Consider some "debug"-type access URLs (SYN-118)

It might be useful sometime to have some debug state-poking URLs in synapse, that things like the sytest integration testing can poke. Not so much for actual test state, but currently I'm thinking it would be useful to be able to temporarily increase the verbosity of the server's logging level, so that a single test case can have more logging without causing too much unrelated spam from other tests.

(Imported from https://matrix.org/jira/browse/SYN-118)

(Reported by @leonerd)

Homeserver installation issue

I face some issue here. I got this when I execute "python setup.py develop --user"
below my console output:

~/Git/synapse$ python setup.py develop --user
running develop
running egg_info
writing requirements to SynapseHomeServer.egg-info/requires.txt
writing SynapseHomeServer.egg-info/PKG-INFO
writing top-level names to SynapseHomeServer.egg-info/top_level.txt
writing dependency_links to SynapseHomeServer.egg-info/dependency_links.txt
writing entry points to SynapseHomeServer.egg-info/entry_points.txt
reading manifest file 'SynapseHomeServer.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.sql' under directory 'synapse/persistence/schema'
writing manifest file 'SynapseHomeServer.egg-info/SOURCES.txt'
running build_ext
Creating /Users/admin/Library/Python/2.7/lib/python/site-packages/SynapseHomeServer.egg-link (link to .)
SynapseHomeServer 0.0.1 is already the active version in easy-install.pth
Installing synapse-homeserver script to /Users/admin/Library/Python/2.7/bin

Installed /Users/admin/Git/synapse
Processing dependencies for SynapseHomeServer==0.0.1
Searching for cryptography>=0.2.1
Reading https://pypi.python.org/simple/cryptography/
Best match: cryptography 0.6.1
Downloading https://pypi.python.org/packages/source/c/cryptography/cryptography-0.6.1.tar.gz#md5=1c48fd78742d85c9cffdcceb6809e45b
Processing cryptography-0.6.1.tar.gz
Writing /var/folders/0t/xt8fspyd76995w8lq__67dlr0000gn/T/easy_install-Mg_TNT/cryptography-0.6.1/setup.cfg
Running cryptography-0.6.1/setup.py -q bdist_egg --dist-dir /var/folders/0t/xt8fspyd76995w8lq__67dlr0000gn/T/easy_install-Mg_TNT/cryptography-0.6.1/egg-dist-tmp-M8QmES
Traceback (most recent call last):
  File "setup.py", line 58, in <module>
    """
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/develop.py", line 27, in run
    self.install_for_development()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/develop.py", line 129, in install_for_development
    self.process_distribution(None, self.dist, not self.no_deps)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 671, in process_distribution
    [requirement], self.local_index, self.easy_install
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources.py", line 620, in resolve
    dist = best[req.key] = env.best_match(req, ws, installer)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources.py", line 858, in best_match
    return self.obtain(req, installer) # try and download/install
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources.py", line 870, in obtain
    return installer(requirement)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 593, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 623, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 811, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1017, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1002, in run_setup
    run_setup(setup_script, args)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/sandbox.py", line 50, in run_setup
    lambda: execfile(
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/sandbox.py", line 100, in run
    return func()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/sandbox.py", line 52, in <lambda>
    {'__file__':setup_script, '__name__':'__main__'}
  File "setup.py", line 338, in <module>

  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 971, in run_command
    cmd_obj.ensure_finalized()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized
    self.finalize_options()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/bdist_egg.py", line 108, in finalize_options
    bdist_base = self.get_finalized_command('bdist').bdist_base
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 312, in get_finalized_command
    cmd_obj.ensure_finalized()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized
    self.finalize_options()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/bdist.py", line 99, in finalize_options
    self.plat_name = self.get_finalized_command('build').plat_name
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 312, in get_finalized_command
    cmd_obj.ensure_finalized()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized
    self.finalize_options()
  File "setup.py", line 106, in finalize_options

  File "setup.py", line 86, in get_ext_modules

  File "/var/folders/0t/xt8fspyd76995w8lq__67dlr0000gn/T/easy_install-Mg_TNT/cryptography-0.6.1/cryptography/hazmat/bindings/openssl/binding.py", line 89, in __init__
  File "/var/folders/0t/xt8fspyd76995w8lq__67dlr0000gn/T/easy_install-Mg_TNT/cryptography-0.6.1/cryptography/hazmat/bindings/openssl/binding.py", line 113, in _ensure_ffi_initialized
  File "/var/folders/0t/xt8fspyd76995w8lq__67dlr0000gn/T/easy_install-Mg_TNT/cryptography-0.6.1/cryptography/hazmat/bindings/utils.py", line 80, in build_ffi
  File "/Users/admin/Library/Python/2.7/lib/python/site-packages/cffi-0.8.6-py2.7-macosx-10.9-x86_64.egg/cffi/api.py", line 340, in verify
    lib = self.verifier.load_library()
  File "/Users/admin/Library/Python/2.7/lib/python/site-packages/cffi-0.8.6-py2.7-macosx-10.9-x86_64.egg/cffi/verifier.py", line 75, in load_library
    return self._load_library()
  File "/Users/admin/Library/Python/2.7/lib/python/site-packages/cffi-0.8.6-py2.7-macosx-10.9-x86_64.egg/cffi/verifier.py", line 151, in _load_library
    return self._vengine.load_library()
  File "/Users/admin/Library/Python/2.7/lib/python/site-packages/cffi-0.8.6-py2.7-macosx-10.9-x86_64.egg/cffi/vengine_cpy.py", line 149, in load_library
    raise ffiplatform.VerificationError(error)
cffi.ffiplatform.VerificationError: importing '/var/folders/0t/xt8fspyd76995w8lq__67dlr0000gn/T/easy_install-Mg_TNT/cryptography-0.6.1/cryptography/hazmat/bindings/__pycache__/_Cryptography_cffi_36a40ff0x2bad1bae.so': dlopen(/var/folders/0t/xt8fspyd76995w8lq__67dlr0000gn/T/easy_install-Mg_TNT/cryptography-0.6.1/cryptography/hazmat/bindings/__pycache__/_Cryptography_cffi_36a40ff0x2bad1bae.so, 2): Symbol not found: _CRYPTO_malloc_debug_init
  Referenced from: /var/folders/0t/xt8fspyd76995w8lq__67dlr0000gn/T/easy_install-Mg_TNT/cryptography-0.6.1/cryptography/hazmat/bindings/__pycache__/_Cryptography_cffi_36a40ff0x2bad1bae.so
  Expected in: flat namespace
 in /var/folders/0t/xt8fspyd76995w8lq__67dlr0000gn/T/easy_install-Mg_TNT/cryptography-0.6.1/cryptography/hazmat/bindings/__pycache__/_Cryptography_cffi_36a40ff0x2bad1bae.so
~/Git/synapse$ 

I tried this http://chriskief.com/2014/03/25/installing-cryptography-via-pip-with-macports-or-homebrew/
but doesnt help...

Updating avatar URL and displayname at the same time results in weird m.room.member events (SYN-183)

Update both the avatar URL and displayname of a user who is in a few rooms at the same time. You will get two m.room.member events which have exactly the same content (with both keys changed). I would expect either:

  • 2 m.room.member events with a single changed key per event.
  • 1 m.room.member event with 2 changed keys.
    But not 2 m.room.member events with 2 changed keys (the same ones).

This is annoying because it results in things like SYWEB-145. It's also not easy to fix, because if you diff the prev_content and content you get the same diff (both avatar and name) twice, resulting in.. a duplicate message.

(Imported from https://matrix.org/jira/browse/SYN-183)

(Reported by @kegsay)

Attachments:

https://matrix.org/jira/secure/attachment/10107/mroomember.png

Report image transparency (SYN-170)

In the metadata for images served up it'd be lovely to say how many colour channels they have (especially if they have alpha) alongside the width & height etc. This would let us assume that if an image has an alpha channel already, we shouldn't be putting a dropshadow on it in the webclient.

(Imported from https://matrix.org/jira/browse/SYN-170)

(Reported by @ara4n)

Configurable caching for the media repo (SYN-200)

Rescued from #23:

Is there any way to configure the cache behaviour? We don't seem to track the age of remote content - it's surely important to let people specify how to reap content; whether it's by expiring old content or limiting the total size of the cache in bytes.

Is there a way to tell the HS to proactively suck in content for a room? Given HS messages are proactively pushed throughout the mesh of participating servers, it seems that it could be nice to (optionally) have my HS pre-cache the attachments too to avoid the origin having disappeared by the time i get round to viewing them - assuming disk space isn't a problem.

(Imported from https://matrix.org/jira/browse/SYN-200)

(Reported by @ara4n)

Running Homeserver issue

I come across this error when try to start the server
i am running on OSX yosemite 10.10.1
terminal log:

~/.synapse$ ~/Library/Python/2.7/bin/synctl start
No config file found
To generate a config file, run 'python -m synapse.app.homeserver -c homeserver.yaml --generate-config --server-name=<server name>'
~/.synapse$ python -m synapse.app.homeserver -c homeserver.yaml --generate-config --server-name=localhost
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/Users/admin/Git/synapse/synapse/app/homeserver.py", line 17, in <module>
    from synapse.storage import prepare_database
  File "/Users/admin/Git/synapse/synapse/storage/__init__.py", line 34, in <module>
    from .keys import KeyStore
  File "/Users/admin/Git/synapse/synapse/storage/keys.py", line 20, in <module>
    import OpenSSL
  File "build/bdist.macosx-10.9-x86_64/egg/OpenSSL/__init__.py", line 8, in <module>
  File "build/bdist.macosx-10.9-x86_64/egg/OpenSSL/rand.py", line 11, in <module>
  File "build/bdist.macosx-10.9-x86_64/egg/OpenSSL/_util.py", line 4, in <module>
  File "/Library/Python/2.7/site-packages/cryptography-0.6.1-py2.7-macosx-10.10-intel.egg/cryptography/hazmat/bindings/openssl/binding.py", line 89, in __init__
    self._ensure_ffi_initialized()
  File "/Library/Python/2.7/site-packages/cryptography-0.6.1-py2.7-macosx-10.10-intel.egg/cryptography/hazmat/bindings/openssl/binding.py", line 113, in _ensure_ffi_initialized
    libraries=libraries,
  File "/Library/Python/2.7/site-packages/cryptography-0.6.1-py2.7-macosx-10.10-intel.egg/cryptography/hazmat/bindings/utils.py", line 39, in build_ffi
    ffi = cffi.FFI()
  File "/Library/Python/2.7/site-packages/cffi-0.8.6-py2.7-macosx-10.10-intel.egg/cffi/api.py", line 56, in __init__
    import _cffi_backend as backend
ImportError: dlopen(/Library/Python/2.7/site-packages/cffi-0.8.6-py2.7-macosx-10.10-intel.egg/_cffi_backend.so, 2): Library not loaded: /opt/local/lib/libffi.6.dylib
  Referenced from: /Library/Python/2.7/site-packages/cffi-0.8.6-py2.7-macosx-10.10-intel.egg/_cffi_backend.so
  Reason: image not found
~/.synapse$ 

Below the out for $ pip install --user --process-dependency-links https://github.com/matrix-org/synapse/tarball/master

~/.synapse$ sudo pip install --user --process-dependency-links https://github.com/matrix-org/synapse/tarball/master
Password:
Downloading/unpacking https://github.com/matrix-org/synapse/tarball/master
  Downloading master (198kB): 198kB downloaded
  Running setup.py (path:/tmp/pip-9dqdy8-build/setup.py) egg_info for package from https://github.com/matrix-org/synapse/tarball/master

    warning: no files found matching '*' under directory 'syweb/webclient'
  Requirement already satisfied (use --upgrade to upgrade): synapse==0.5.0- from https://github.com/matrix-org/synapse/tarball/master in /Users/admin/Library/Python/2.7/lib/python/site-packages
  Dependency Links processing has been deprecated with an accelerated time schedule and will be removed in pip 1.6
Requirement already satisfied (use --upgrade to upgrade): syutil==0.0.2 in /Users/admin/Library/Python/2.7/lib/python/site-packages/syutil-0.0.2-py2.7.egg (from synapse==0.5.0-)
Requirement already satisfied (use --upgrade to upgrade): syweb==0.0.1 in /Users/admin/Library/Python/2.7/lib/python/site-packages (from synapse==0.5.0-)
Requirement already satisfied (use --upgrade to upgrade): Twisted>=14.0.0 in /Users/admin/Library/Python/2.7/lib/python/site-packages/Twisted-14.0.2-py2.7-macosx-10.10-intel.egg (from synapse==0.5.0-)
Requirement already satisfied (use --upgrade to upgrade): service-identity>=1.0.0 in /Users/admin/Library/Python/2.7/lib/python/site-packages/service_identity-14.0.0-py2.7.egg (from synapse==0.5.0-)
Requirement already satisfied (use --upgrade to upgrade): pyopenssl>=0.14 in /Users/admin/Library/Python/2.7/lib/python/site-packages/pyOpenSSL-0.14-py2.7.egg (from synapse==0.5.0-)
Requirement already satisfied (use --upgrade to upgrade): pyyaml in /Users/admin/Library/Python/2.7/lib/python/site-packages/PyYAML-3.11-py2.7-macosx-10.10-intel.egg (from synapse==0.5.0-)
Requirement already satisfied (use --upgrade to upgrade): pyasn1 in /Users/admin/Library/Python/2.7/lib/python/site-packages/pyasn1-0.1.7-py2.7.egg (from synapse==0.5.0-)
Requirement already satisfied (use --upgrade to upgrade): pynacl in /Users/admin/Library/Python/2.7/lib/python/site-packages/PyNaCl-0.2.3-py2.7.egg (from synapse==0.5.0-)
Requirement already satisfied (use --upgrade to upgrade): daemonize in /Users/admin/Library/Python/2.7/lib/python/site-packages/daemonize-2.3.1-py2.7.egg (from synapse==0.5.0-)
Requirement already satisfied (use --upgrade to upgrade): py-bcrypt in /Library/Python/2.7/site-packages/py_bcrypt-0.4-py2.7-macosx-10.10-intel.egg (from synapse==0.5.0-)
Requirement already satisfied (use --upgrade to upgrade): zope.interface>=3.6.0 in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from Twisted>=14.0.0->synapse==0.5.0-)
Requirement already satisfied (use --upgrade to upgrade): characteristic>=14.0.0 in /Users/admin/Library/Python/2.7/lib/python/site-packages/characteristic-14.2.0-py2.7.egg (from service-identity>=1.0.0->synapse==0.5.0-)
Requirement already satisfied (use --upgrade to upgrade): pyasn1-modules in /Users/admin/Library/Python/2.7/lib/python/site-packages/pyasn1_modules-0.0.5-py2.7.egg (from service-identity>=1.0.0->synapse==0.5.0-)
Requirement already satisfied (use --upgrade to upgrade): cryptography>=0.2.1 in /Library/Python/2.7/site-packages/cryptography-0.6.1-py2.7-macosx-10.10-intel.egg (from pyopenssl>=0.14->synapse==0.5.0-)
Requirement already satisfied (use --upgrade to upgrade): six>=1.5.2 in /Library/Python/2.7/site-packages/six-1.8.0-py2.7.egg (from pyopenssl>=0.14->synapse==0.5.0-)
Requirement already satisfied (use --upgrade to upgrade): cffi in /Library/Python/2.7/site-packages/cffi-0.8.6-py2.7-macosx-10.10-intel.egg (from pynacl->synapse==0.5.0-)
Requirement already satisfied (use --upgrade to upgrade): setuptools in /Library/Python/2.7/site-packages (from zope.interface>=3.6.0->Twisted>=14.0.0->synapse==0.5.0-)
Requirement already satisfied (use --upgrade to upgrade): pycparser in /Users/admin/Library/Python/2.7/lib/python/site-packages/pycparser-2.10-py2.7.egg (from cffi->pynacl->synapse==0.5.0-)
Cleaning up...
~/.synapse$ 

btw i have no idea how you guys get pip version 1.7 as stated in guides...since the latest i can get is 1.5.6

We need a way to rename homeservers (SYN-28)

The current common use case for Synapse is that people install it running as localhost - have a play with it; see that it's good.

They then want to expose the same server to run as --server-name foo.net - except there isn't (as far as I know) an easy way to change the server-name without vaping the whole HS DB. We need one.

(Imported from https://matrix.org/jira/browse/SYN-28)

(Reported by @ara4n)

Rooms should have the option of kicking out lurkers (SYN-8)

#matrix:matrix.org is full of lots of lurkers who have joined once and don't look to be coming back anytime soon. It would be lovely to have a setting on the room to boot them out to stop bloating the membershiplist.

One way of doing this is to run a bot as a privileged user on the channel to issue kick events to the right people.

This is a bit kludgy though - it would be nicer if the HS for the highest-power user on a channel could go and automatically issue the appropriate events to clear things up.

(Unclear how this works with e2e encryption)

(Imported from https://matrix.org/jira/browse/SYN-8)

(Reported by @ara4n)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.