Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Update instructions to point to pip install (#3985)
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkowl authored Oct 1, 2018
1 parent b5b93f4 commit abdc141
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 61 deletions.
13 changes: 8 additions & 5 deletions .circleci/merge_base_branch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ source $BASH_ENV

if [[ -z "${CIRCLE_PR_NUMBER}" ]]
then
echo "Can't figure out what the PR number is!"
exit 1
echo "Can't figure out what the PR number is! Assuming merge target is develop."

# It probably hasn't had a PR opened yet. Since all PRs land on develop, we
# can probably assume it's based on it and will be merged into it.
GITBASE="develop"
else
# Get the reference, using the GitHub API
GITBASE=`curl -q https://api.github.com/repos/matrix-org/synapse/pulls/${CIRCLE_PR_NUMBER} | jq -r '.base.ref'`
fi

# Get the reference, using the GitHub API
GITBASE=`curl -q https://api.github.com/repos/matrix-org/synapse/pulls/${CIRCLE_PR_NUMBER} | jq -r '.base.ref'`

# Show what we are before
git show -s

Expand Down
70 changes: 17 additions & 53 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Thanks for using Matrix!
Synapse Installation
====================

Synapse is the reference python/twisted Matrix homeserver implementation.
Synapse is the reference Python/Twisted Matrix homeserver implementation.

System requirements:

Expand All @@ -91,12 +91,13 @@ System requirements:

Installing from source
----------------------

(Prebuilt packages are available for some platforms - see `Platform-Specific
Instructions`_.)

Synapse is written in python but some of the libraries it uses are written in
C. So before we can install synapse itself we need a working C compiler and the
header files for python C extensions.
Synapse is written in Python but some of the libraries it uses are written in
C. So before we can install Synapse itself we need a working C compiler and the
header files for Python C extensions.

Installing prerequisites on Ubuntu or Debian::

Expand Down Expand Up @@ -143,18 +144,24 @@ Installing prerequisites on OpenBSD::
doas pkg_add python libffi py-pip py-setuptools sqlite3 py-virtualenv \
libxslt

To install the synapse homeserver run::
To install the Synapse homeserver run::

virtualenv -p python2.7 ~/.synapse
source ~/.synapse/bin/activate
pip install --upgrade pip
pip install --upgrade setuptools
pip install https://github.com/matrix-org/synapse/tarball/master
pip install matrix-synapse

This installs synapse, along with the libraries it uses, into a virtual
This installs Synapse, along with the libraries it uses, into a virtual
environment under ``~/.synapse``. Feel free to pick a different directory
if you prefer.

This Synapse installation can then be later upgraded by using pip again with the
update flag::

source ~/.synapse/bin/activate
pip install -U matrix-synapse

In case of problems, please see the _`Troubleshooting` section below.

There is an offical synapse image available at
Expand All @@ -167,7 +174,7 @@ Alternatively, Andreas Peters (previously Silvio Fricke) has contributed a
Dockerfile to automate a synapse server in a single Docker image, at
https://hub.docker.com/r/avhost/docker-matrix/tags/

Configuring synapse
Configuring Synapse
-------------------

Before you can start Synapse, you will need to generate a configuration
Expand Down Expand Up @@ -249,26 +256,6 @@ Setting up a TURN server
For reliable VoIP calls to be routed via this homeserver, you MUST configure
a TURN server. See `<docs/turn-howto.rst>`_ for details.

IPv6
----

As of Synapse 0.19 we finally support IPv6, many thanks to @kyrias and @glyph
for providing PR #1696.

However, for federation to work on hosts with IPv6 DNS servers you **must**
be running Twisted 17.1.0 or later - see https://github.com/matrix-org/synapse/issues/1002
for details. We can't make Synapse depend on Twisted 17.1 by default
yet as it will break most older distributions (see https://github.com/matrix-org/synapse/pull/1909)
so if you are using operating system dependencies you'll have to install your
own Twisted 17.1 package via pip or backports etc.

If you're running in a virtualenv then pip should have installed the newest
Twisted automatically, but if your virtualenv is old you will need to manually
upgrade to a newer Twisted dependency via:

pip install Twisted>=17.1.0


Running Synapse
===============

Expand Down Expand Up @@ -444,8 +431,7 @@ settings require a slightly more difficult installation process.
using the ``.`` command, rather than ``bash``'s ``source``.
5) Optionally, use ``pip`` to install ``lxml``, which Synapse needs to parse
webpages for their titles.
6) Use ``pip`` to install this repository: ``pip install
https://github.com/matrix-org/synapse/tarball/master``
6) Use ``pip`` to install this repository: ``pip install matrix-synapse``
7) Optionally, change ``_synapse``'s shell to ``/bin/false`` to reduce the
chance of a compromised Synapse server being used to take over your box.

Expand Down Expand Up @@ -473,7 +459,7 @@ Troubleshooting
Troubleshooting Installation
----------------------------

Synapse requires pip 1.7 or later, so if your OS provides too old a version you
Synapse requires pip 8 or later, so if your OS provides too old a version you
may need to manually upgrade it::

sudo pip install --upgrade pip
Expand Down Expand Up @@ -508,28 +494,6 @@ failing, e.g.::

pip install twisted

On OS X, if you encounter clang: error: unknown argument: '-mno-fused-madd' you
will need to export CFLAGS=-Qunused-arguments.

Troubleshooting Running
-----------------------

If synapse fails with ``missing "sodium.h"`` crypto errors, you may need
to manually upgrade PyNaCL, as synapse uses NaCl (https://nacl.cr.yp.to/) for
encryption and digital signatures.
Unfortunately PyNACL currently has a few issues
(https://github.com/pyca/pynacl/issues/53) and
(https://github.com/pyca/pynacl/issues/79) that mean it may not install
correctly, causing all tests to fail with errors about missing "sodium.h". To
fix try re-installing from PyPI or directly from
(https://github.com/pyca/pynacl)::

# Install from PyPI
pip install --user --upgrade --force pynacl

# Install from github
pip install --user https://github.com/pyca/pynacl/tarball/master

Running out of File Handles
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
6 changes: 3 additions & 3 deletions UPGRADE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ instructions that may be required are listed later in this document.

.. code:: bash
pip install --upgrade --process-dependency-links https://github.com/matrix-org/synapse/tarball/master
pip install --upgrade --process-dependency-links matrix-synapse
# restart synapse
synctl restart
Expand Down Expand Up @@ -48,11 +48,11 @@ returned by the Client-Server API:
# configured on port 443.
curl -kv https://<host.name>/_matrix/client/versions 2>&1 | grep "Server:"
Upgrading to $NEXT_VERSION
Upgrading to v0.27.3
====================

This release expands the anonymous usage stats sent if the opt-in
``report_stats`` configuration is set to ``true``. We now capture RSS memory
``report_stats`` configuration is set to ``true``. We now capture RSS memory
and cpu use at a very coarse level. This requires administrators to install
the optional ``psutil`` python module.

Expand Down
1 change: 1 addition & 0 deletions changelog.d/3985.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updated the installation instructions to point to the matrix-synapse package on PyPI.

0 comments on commit abdc141

Please sign in to comment.