On Tue, Aug 11 '20 at 19.06 NZST, Renaud Allard <[email protected]>
wrote:
> Indeed, config files could be stored in the more standard /etc, but that
> will be a breaking change if I do that now.
Fair enough. Could it be symlinked during a transition period? I'm sure
it's my own hangups but editing config files in /var feels weird :)
> I agree, byt synctl is the documented way to start synapse, that's why I
> choose it.
Also fair enough, I found synctl had issues tracking synapse' state in
earlier versions so I didn't trust it. Could have been user error, it
seems to work fine in your port.
BTW: on the most recent version, all of the scripts get dumped into
/usr/local/share/synapse -- apart from export_signing_key and
generate_log_config. These are just left in /usr/local/bin, which is
probably not intended.
The below diff makes sure all scripts (no matter what new ones they add)
get placed in /usr/local/share/synapse, and gets rid of the for loop:
--
Index: Makefile
===================================================================
RCS file: /cvs/ports/net/synapse/Makefile,v
retrieving revision 1.11
diff -u -p -u -r1.11 Makefile
--- Makefile 31 Jul 2020 00:21:16 -0000 1.11
+++ Makefile 14 Aug 2020 11:03:55 -0000
@@ -21,6 +21,8 @@ MODULES = lang/python
MODPY_VERSION = ${MODPY_DEFAULT_VERSION_3}
MODPY_SETUPTOOLS = Yes
+MODPY_DISTUTILS_INSTALLARGS = --install-scripts ${LOCALBASE}/share/synapse
+
RUN_DEPENDS = textproc/py-lxml${MODPY_FLAVOR} \
textproc/py-yaml${MODPY_FLAVOR} \
textproc/py-unpaddedbase64${MODPY_FLAVOR} \
@@ -62,14 +64,5 @@ TEST_DEPENDS = ${RUN_DEPENDS}
do-test:
cd ${WRKSRC} && ${SETENV} PYTHONPATH=. ${LOCALBASE}/bin/trial-3 tests
-
-post-install:
- @mkdir ${PREFIX}/share/synapse
-.for script in generate_config generate_signing_key.py \
- move_remote_media_to_new_store.py \
- sync_room_to_group.pl hash_password \
- register_new_matrix_user synapse_port_db synctl
- @mv ${PREFIX}/bin/${script} ${PREFIX}/share/synapse
-.endfor
.include <bsd.port.mk>