pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/chat/matrix-synapse



Module Name:    pkgsrc
Committed By:   jperkin
Date:           Thu Apr 15 15:54:00 UTC 2021

Modified Files:
        pkgsrc/chat/matrix-synapse: MESSAGE Makefile
        pkgsrc/chat/matrix-synapse/files: matrix-synapse.sh
Added Files:
        pkgsrc/chat/matrix-synapse/files/smf: manifest.xml

Log Message:
matrix-synapse: Add SMF manifest.

While here use PKG_SYSCONFSUBDIR to simplify things.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 pkgsrc/chat/matrix-synapse/MESSAGE
cvs rdiff -u -r1.19 -r1.20 pkgsrc/chat/matrix-synapse/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/chat/matrix-synapse/files/matrix-synapse.sh
cvs rdiff -u -r0 -r1.1 pkgsrc/chat/matrix-synapse/files/smf/manifest.xml

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/chat/matrix-synapse/MESSAGE
diff -u pkgsrc/chat/matrix-synapse/MESSAGE:1.1 pkgsrc/chat/matrix-synapse/MESSAGE:1.2
--- pkgsrc/chat/matrix-synapse/MESSAGE:1.1      Fri Sep  4 20:34:11 2020
+++ pkgsrc/chat/matrix-synapse/MESSAGE  Thu Apr 15 15:54:00 2021
@@ -1,13 +1,13 @@
 ===========================================================================
-$NetBSD: MESSAGE,v 1.1 2020/09/04 20:34:11 js Exp $
+$NetBSD: MESSAGE,v 1.2 2021/04/15 15:54:00 jperkin Exp $
 
 To generate a Synapse configuration, run:
 
 cd ${SYNAPSE_DATA} &&
 ${PYTHONBIN} -m synapse.app.homeserver \
        --server-name my.domain.name \
-       --config-path ${PKG_SYSCONFDIR}/matrix-synapse/homeserver.yaml \
-       --config-directory ${PKG_SYSCONFDIR}/matrix-synapse \
+       --config-path ${PKG_SYSCONFDIR}/homeserver.yaml \
+       --config-directory ${PKG_SYSCONFDIR} \
        --generate-config \
        --report-stats=no
 

Index: pkgsrc/chat/matrix-synapse/Makefile
diff -u pkgsrc/chat/matrix-synapse/Makefile:1.19 pkgsrc/chat/matrix-synapse/Makefile:1.20
--- pkgsrc/chat/matrix-synapse/Makefile:1.19    Sun Mar 14 21:21:13 2021
+++ pkgsrc/chat/matrix-synapse/Makefile Thu Apr 15 15:54:00 2021
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2021/03/14 21:21:13 js Exp $
+# $NetBSD: Makefile,v 1.20 2021/04/15 15:54:00 jperkin Exp $
 
 DISTNAME=      matrix-synapse-1.29.0
 CATEGORIES=    chat
@@ -49,6 +49,8 @@ USE_LANGUAGES=        # none
 USE_TOOLS+=    perl:run
 REPLACE_PERL+= scripts/sync_room_to_group.pl
 
+PKG_SYSCONFSUBDIR=     matrix-synapse
+
 SYNAPSE_USER?= synapse
 SYNAPSE_GROUP?=        ${SYNAPSE_USER}
 SYNAPSE_DATA?= ${VARBASE}/db/matrix-synapse
@@ -68,6 +70,7 @@ RCD_SCRIPTS=  matrix-synapse
 
 FILES_SUBST+=  SYNAPSE_DATA=${SYNAPSE_DATA:Q}
 FILES_SUBST+=  SYNAPSE_USER=${SYNAPSE_USER:Q}
+FILES_SUBST+=  SYNAPSE_GROUP=${SYNAPSE_GROUP:Q}
 MESSAGE_SUBST+=        PYTHONBIN=${PYTHONBIN:Q}
 MESSAGE_SUBST+=        SYNAPSE_DATA=${SYNAPSE_DATA:Q}
 

Index: pkgsrc/chat/matrix-synapse/files/matrix-synapse.sh
diff -u pkgsrc/chat/matrix-synapse/files/matrix-synapse.sh:1.1 pkgsrc/chat/matrix-synapse/files/matrix-synapse.sh:1.2
--- pkgsrc/chat/matrix-synapse/files/matrix-synapse.sh:1.1      Fri Sep  4 20:34:11 2020
+++ pkgsrc/chat/matrix-synapse/files/matrix-synapse.sh  Thu Apr 15 15:54:00 2021
@@ -10,7 +10,7 @@ fi
 name="matrix-synapse"
 rcvar="matrix_synapse"
 ctl_command="@PREFIX@/bin/synctl"
-conf_file="@PKG_SYSCONFDIR@/matrix-synapse/homeserver.yaml"
+conf_file="@PKG_SYSCONFDIR@/homeserver.yaml"
 required_files="$conf_file"
 pidfile="@SYNAPSE_DATA@/homeserver.pid"
 #start_precmd="ulimit -n 2048"

Added files:

Index: pkgsrc/chat/matrix-synapse/files/smf/manifest.xml
diff -u /dev/null pkgsrc/chat/matrix-synapse/files/smf/manifest.xml:1.1
--- /dev/null   Thu Apr 15 15:54:00 2021
+++ pkgsrc/chat/matrix-synapse/files/smf/manifest.xml   Thu Apr 15 15:54:00 2021
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<service_bundle type='manifest' name='@SMF_NAME@'>
+  <service name='@SMF_PREFIX@/@SMF_NAME@' type='service' version='1'>
+    <create_default_instance enabled='false' />
+    <single_instance />
+    <dependency name='network' grouping='require_all' restart_on='none' type='service'>
+      <service_fmri value='svc:/milestone/network:default' />
+    </dependency>
+    <dependency name='fs-local' grouping='require_all' restart_on='none' type='service'>
+      <service_fmri value='svc:/system/filesystem/local:default' />
+    </dependency>
+    <method_context>
+      <method_credential user='@SYNAPSE_USER@' group='@SYNAPSE_GROUP@' />
+    </method_context>
+    <exec_method type='method' name='start' exec='@PREFIX@/bin/synctl start @PKG_SYSCONFDIR@/homeserver.yaml' timeout_seconds="60" />
+    <exec_method type='method' name='stop' exec='@PREFIX@/bin/synctl stop @PKG_SYSCONFDIR@/homeserver.yaml' timeout_seconds="60" />
+    <exec_method type='method' name='restart' exec='@PREFIX@/bin/synctl restart @PKG_SYSCONFDIR@/homeserver.yaml' timeout_seconds="60" />
+    <template>
+      <common_name>
+        <loctext xml:lang='C'>Matrix Homeserver</loctext>
+      </common_name>
+      <documentation>
+        <doc_link name='homepage' uri='https://github.com/matrix-org/synapse/' />
+      </documentation>
+    </template>
+  </service>
+</service_bundle>



Home | Main Index | Thread Index | Old Index