pkgsrc-WIP-changes archive

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

Try to add rc.d example to taskchampion-sync-server



Module Name:	pkgsrc-wip
Committed By:	atomicules <base%atomicules.co.uk@localhost>
Pushed By:	atomicules
Date:		Thu Jul 16 16:25:12 2026 +0100
Changeset:	481fe184601506c41534a3ad2d013215dcfb085e

Modified Files:
	taskchampion-sync-server/Makefile
	taskchampion-sync-server/TODO
Added Files:
	taskchampion-sync-server/files/taskchampion_sync_server.sh

Log Message:
Try to add rc.d example to taskchampion-sync-server

Fwiw, I am now running this sync server and syncing both locally and
remotely to it. The local (to the server) taskwarrior is 3.3.0 and is
on NetBSD 10.1, but I am also syncing a macOS 26.5.2 taskwarriror 3.4.2
instance against it. Works a treat.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=481fe184601506c41534a3ad2d013215dcfb085e

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

diffstat:
 taskchampion-sync-server/Makefile                  |  2 ++
 taskchampion-sync-server/TODO                      | 14 +++++-------
 .../files/taskchampion_sync_server.sh              | 26 ++++++++++++++++++++++
 3 files changed, 34 insertions(+), 8 deletions(-)

diffs:
diff --git a/taskchampion-sync-server/Makefile b/taskchampion-sync-server/Makefile
index 2e4c28c878..e371460afa 100644
--- a/taskchampion-sync-server/Makefile
+++ b/taskchampion-sync-server/Makefile
@@ -17,6 +17,8 @@ USE_TOOLS+=	perl gmake
 
 .include "cargo-depends.mk"
 
+RCD_SCRIPTS=	taskchampion_sync_server
+
 INSTALLATION_DIRS=	bin
 
 do-install:
diff --git a/taskchampion-sync-server/TODO b/taskchampion-sync-server/TODO
index d7c74eca8b..20eac50343 100644
--- a/taskchampion-sync-server/TODO
+++ b/taskchampion-sync-server/TODO
@@ -1,9 +1,7 @@
-1. This builds and installs on NetBSD 9.4 AMD
-2. I was planning on using this to sync my taskwarrior 3 installs, but I might give up with that idea completely as it seems tricky so I might not actually need this package. Just mentioning that.
-3. From pkglint:
+1. From pkglint:
 
-    WARN: Makefile:5: Invalid identifier "refs/tags/v${DISTNAME}".
-    ERROR: Makefile:7: Invalid category "wip".
-    WARN: Makefile:10: PKGNAME should not be used in WRKSRC as it includes the PKGREVISION. Please use PKGNAME_NOREV instead.
-    ERROR: Makefile:25: This comment indicates unfinished work (url2pkg).
-    
+        WARN: Makefile:5: Invalid identifier "refs/tags/v${DISTNAME}".
+        ERROR: Makefile:7: Invalid category "wip".
+        WARN: Makefile:10: PKGNAME should not be used in WRKSRC as it includes the PKGREVISION. Please use PKGNAME_NOREV instead.
+        ERROR: Makefile:25: This comment indicates unfinished work (url2pkg).
+2. Make sure I've done the RCD_SCRIPTS bit right. I've just tried to copy other packages. But `make print-PLIST > PLIST` didn't show any updates. Maybe it's not meant to?
diff --git a/taskchampion-sync-server/files/taskchampion_sync_server.sh b/taskchampion-sync-server/files/taskchampion_sync_server.sh
new file mode 100755
index 0000000000..1a4de15dfb
--- /dev/null
+++ b/taskchampion-sync-server/files/taskchampion_sync_server.sh
@@ -0,0 +1,26 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: taskchampion-sync-server
+#
+# PROVIDE: taskchampion-sync-server
+# REQUIRES: network
+# KEYWORD: shutdown
+# 
+# Per docs generate a client id using `uuidgen` and change the port if required
+#
+# - https://gothenburgbitfactory.org/taskchampion-sync-server/usage/binaries.html
+# - https://taskwarrior.org/docs/man/task-sync.5/
+
+$_rc_subr_loaded . /etc/rc.subr
+
+name="taskchampion_sync_server"
+rcvar=$name
+command="/usr/pkg/bin/taskchampion-sync-server"
+taskchampion_sync_server_port=19080
+taskchampion_sync_server_client_id=111a11aa-1111-1111-111a-aaa1a1a1a1a1
+taskchampion_sync_server_log="/var/log/taskchampion_sync_server.log"
+taskchampion_sync_server_env="RUST_LOG=info"
+taskchampion_sync_server_flags="--listen localhost:$taskchampion_sync_server_port --allow-client-id $taskchampion_sync_server_client_id >> $taskchampion_sync_server_log 2>&1 &"
+
+load_rc_config $name
+run_rc_command "$1"


Home | Main Index | Thread Index | Old Index