From 12aefb9dfc3180c7bf2eb159cf96acaeff85ae5d Mon Sep 17 00:00:00 2001 From: William Leuschner Date: Mon, 5 Dec 2016 14:16:39 -0500 Subject: [PATCH 1/3] Add README instructions for OpenBSD installation Signed-off-by: William Leuschner --- README.rst | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/README.rst b/README.rst index 6a22399e19..0809a2e8d9 100644 --- a/README.rst +++ b/README.rst @@ -131,6 +131,10 @@ Installing prerequisites on openSUSE:: sudo zypper in python-pip python-setuptools sqlite3 python-virtualenv \ python-devel libffi-devel libopenssl-devel libjpeg62-devel +Installing prerequisites on OpenBSD:: + doas pkg_add python libffi py-pip py-setuptools sqlite3 py-virtualenv \ + libxslt + To install the synapse homeserver run:: virtualenv -p python2.7 ~/.synapse @@ -364,6 +368,36 @@ Synapse can be installed via FreeBSD Ports or Packages contributed by Brendan Mo - Ports: ``cd /usr/ports/net/py-matrix-synapse && make install clean`` - Packages: ``pkg install py27-matrix-synapse`` + +OpenBSD +------- + +There is currently no port for OpenBSD. Additionally, OpenBSD's security +settings require a slightly more difficult installation process. + +1) Ensure that you have the Bourne Again Shell (``bash``) installed. The Korn + Shell (``ksh``), which is OpenBSD's default shell, does not support the + ``source`` command necessary to activate the python virtualenv to be set up + later. +2) Create a new directory in ``/usr/local`` called ``_synapse``. Also, create a + new user called ``_synapse`` and set that directory as the new user's home. + This is required because, by default, OpenBSD only allows binaries which need + write and execute permissions on the same memory space to be run from + ``/usr/local``. +3) ``su`` to the new ``_synapse`` user and change to their home directory. +4) Create a new virtualenv: ``virtualenv -p python2.7 ~/.synapse`` +5) Start a ``bash`` shell +6) Source the virtualenv configuration located at + ``/usr/local/_synapse/.synapse/bin/activate`` +7) Optionally, use ``pip`` to install ``lxml``, which Synapse needs to parse + webpages for their titles. +8) Use ``pip`` to install this repository: ``pip install + https://github.com/matrix-org/synapse/tarball/master`` +9) Optionally, change ``_synapse``'s shell to ``/bin/false`` to reduce the + chance of a compromised Synapse server being used to take over your box. + +After this, you may proceed with the rest of the install directions. + NixOS ----- From 39a76b9cba477a9d43a93554aa47817346267174 Mon Sep 17 00:00:00 2001 From: William Leuschner Date: Tue, 6 Dec 2016 11:09:31 -0500 Subject: [PATCH 2/3] Update incorrect information in README about ksh and source Signed-off-by: William Leuschner --- README.rst | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/README.rst b/README.rst index 0809a2e8d9..c81125848d 100644 --- a/README.rst +++ b/README.rst @@ -375,10 +375,6 @@ OpenBSD There is currently no port for OpenBSD. Additionally, OpenBSD's security settings require a slightly more difficult installation process. -1) Ensure that you have the Bourne Again Shell (``bash``) installed. The Korn - Shell (``ksh``), which is OpenBSD's default shell, does not support the - ``source`` command necessary to activate the python virtualenv to be set up - later. 2) Create a new directory in ``/usr/local`` called ``_synapse``. Also, create a new user called ``_synapse`` and set that directory as the new user's home. This is required because, by default, OpenBSD only allows binaries which need @@ -386,9 +382,9 @@ settings require a slightly more difficult installation process. ``/usr/local``. 3) ``su`` to the new ``_synapse`` user and change to their home directory. 4) Create a new virtualenv: ``virtualenv -p python2.7 ~/.synapse`` -5) Start a ``bash`` shell 6) Source the virtualenv configuration located at - ``/usr/local/_synapse/.synapse/bin/activate`` + ``/usr/local/_synapse/.synapse/bin/activate``. This is done in ``ksh`` by + using the ``.`` command, rather than ``bash``'s ``source``. 7) Optionally, use ``pip`` to install ``lxml``, which Synapse needs to parse webpages for their titles. 8) Use ``pip`` to install this repository: ``pip install From 59bc64328fabb68c1f4ec619b6ddb2be33999cd6 Mon Sep 17 00:00:00 2001 From: William Leuschner Date: Tue, 6 Dec 2016 11:31:17 -0500 Subject: [PATCH 3/3] Fix incorrect numbering on OpenBSD instructions caused by my own incompetence Signed-off-by: William Leuschner --- README.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.rst b/README.rst index c81125848d..1140f8e1bc 100644 --- a/README.rst +++ b/README.rst @@ -375,21 +375,21 @@ OpenBSD There is currently no port for OpenBSD. Additionally, OpenBSD's security settings require a slightly more difficult installation process. -2) Create a new directory in ``/usr/local`` called ``_synapse``. Also, create a +1) Create a new directory in ``/usr/local`` called ``_synapse``. Also, create a new user called ``_synapse`` and set that directory as the new user's home. This is required because, by default, OpenBSD only allows binaries which need write and execute permissions on the same memory space to be run from ``/usr/local``. -3) ``su`` to the new ``_synapse`` user and change to their home directory. -4) Create a new virtualenv: ``virtualenv -p python2.7 ~/.synapse`` -6) Source the virtualenv configuration located at +2) ``su`` to the new ``_synapse`` user and change to their home directory. +3) Create a new virtualenv: ``virtualenv -p python2.7 ~/.synapse`` +4) Source the virtualenv configuration located at ``/usr/local/_synapse/.synapse/bin/activate``. This is done in ``ksh`` by using the ``.`` command, rather than ``bash``'s ``source``. -7) Optionally, use ``pip`` to install ``lxml``, which Synapse needs to parse +5) Optionally, use ``pip`` to install ``lxml``, which Synapse needs to parse webpages for their titles. -8) Use ``pip`` to install this repository: ``pip install +6) Use ``pip`` to install this repository: ``pip install https://github.com/matrix-org/synapse/tarball/master`` -9) Optionally, change ``_synapse``'s shell to ``/bin/false`` to reduce the +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. After this, you may proceed with the rest of the install directions.