Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Dec 2024 21:54:53 GMT
From:      Michael Gmelin <grembo@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: b93bfef9fd24 - main - deskutils/py-paperless-ngx: Add tmpdir config to rc scripts
Message-ID:  <202412112154.4BBLsr5i014518@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by grembo:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b93bfef9fd2463057a310cb5818098bba0cd66d5

commit b93bfef9fd2463057a310cb5818098bba0cd66d5
Author:     Michael Gmelin <grembo@FreeBSD.org>
AuthorDate: 2024-12-11 21:50:40 +0000
Commit:     Michael Gmelin <grembo@FreeBSD.org>
CommitDate: 2024-12-11 21:53:49 +0000

    deskutils/py-paperless-ngx: Add tmpdir config to rc scripts
---
 deskutils/py-paperless-ngx/Makefile                    | 1 +
 deskutils/py-paperless-ngx/files/paperless-beat.in     | 6 ++++++
 deskutils/py-paperless-ngx/files/paperless-consumer.in | 7 +++++++
 deskutils/py-paperless-ngx/files/paperless-flower.in   | 7 +++++++
 deskutils/py-paperless-ngx/files/paperless-migrate.in  | 7 +++++++
 deskutils/py-paperless-ngx/files/paperless-webui.in    | 7 +++++++
 deskutils/py-paperless-ngx/files/paperless-worker.in   | 7 +++++++
 7 files changed, 42 insertions(+)

diff --git a/deskutils/py-paperless-ngx/Makefile b/deskutils/py-paperless-ngx/Makefile
index cd5e9c9be06c..cff7024af2c1 100644
--- a/deskutils/py-paperless-ngx/Makefile
+++ b/deskutils/py-paperless-ngx/Makefile
@@ -1,6 +1,7 @@
 PORTNAME=	paperless-ngx
 PORTVERSION=	2.11.6
 DISTVERSIONPREFIX=	v
+PORTREVISION=	1
 CATEGORIES=	deskutils python
 MASTER_SITES=	https://github.com/${PORTNAME}/${PORTNAME}/releases/download/${DISTVERSIONPREFIX}${DISTVERSION}/:webui \
 		GH:gh
diff --git a/deskutils/py-paperless-ngx/files/paperless-beat.in b/deskutils/py-paperless-ngx/files/paperless-beat.in
index 3fa2f2b4d4a6..9eb60efa0842 100755
--- a/deskutils/py-paperless-ngx/files/paperless-beat.in
+++ b/deskutils/py-paperless-ngx/files/paperless-beat.in
@@ -19,6 +19,7 @@
 #					Beat logging syslog priority.
 # paperless_beat_log_tag (str):		Set to "paperless-beat" by default.
 #					Beat logging syslog tag.
+# paperless_beat_tmpdir (str):		If set, overrides TMPDIR
 
 . /etc/rc.subr
 
@@ -32,10 +33,15 @@ paperless_beat_daemon_user=${paperless_beat_user:-"paperless"}
 paperless_beat_log_facility=${paperless_beat_log_facility:-"daemon"}
 paperless_beat_log_priority=${paperless_beat_log_priority:-"notice"}
 paperless_beat_log_tag=${paperless_beat_log_tag:-"paperless-beat"}
+paperless_beat_tmpdir=${paperless_beat_tmpdir:-"$TMPDIR"}
 
 paperless_beat_env="LANG=en_US.UTF-8 PATH=$PATH:%%PREFIX%%/bin \
   PYTHONPATH=%%PYTHONPREFIX_SITELIBDIR%%/paperless"
 
+if [ -n "$paperless_beat_tmpdir" ]; then
+	paperless_beat_env="$paperless_beat_env TMPDIR=$paperless_beat_tmpdir"
+fi
+
 pidfile="/var/run/paperless/beat.pid"
 procname="%%PYTHON_CMD%%"
 command="/usr/sbin/daemon"
diff --git a/deskutils/py-paperless-ngx/files/paperless-consumer.in b/deskutils/py-paperless-ngx/files/paperless-consumer.in
index 987234567de8..a3fdb84d63b4 100755
--- a/deskutils/py-paperless-ngx/files/paperless-consumer.in
+++ b/deskutils/py-paperless-ngx/files/paperless-consumer.in
@@ -19,6 +19,7 @@
 #					Consumer logging syslog priority.
 # paperless_consumer_log_tag (str):	Set to "paperless-consumer" by default.
 #					Consumer logging syslog tag.
+# paperless_consumer_tmpdir (str):	If set, overrides TMPDIR
 
 . /etc/rc.subr
 
@@ -32,10 +33,16 @@ paperless_consumer_daemon_user=${paperless_consumer_user:-"paperless"}
 paperless_consumer_log_facility=${paperless_consumer_log_facility:-"daemon"}
 paperless_consumer_log_priority=${paperless_consumer_log_priority:-"notice"}
 paperless_consumer_log_tag=${paperless_consumer_log_tag:-"paperless-consumer"}
+paperless_consumer_tmpdir=${paperless_consumer_tmpdir:-"$TMPDIR"}
 
 paperless_consumer_env="LANG=en_US.UTF-8 PATH=$PATH:%%PREFIX%%/bin\
   PYTHONPATH=%%PYTHONPREFIX_SITELIBDIR%%/paperless"
 
+if [ -n "$paperless_consumer_tmpdir" ]; then
+	paperless_consumer_env="$paperless_consumer_env TMPDIR=\
+$paperless_consumer_tmpdir"
+fi
+
 sig_stop="INT"
 pidfile="/var/run/paperless/consumer.pid"
 procname="%%PYTHON_CMD%%"
diff --git a/deskutils/py-paperless-ngx/files/paperless-flower.in b/deskutils/py-paperless-ngx/files/paperless-flower.in
index 3690d41da3a8..fdc0937c4773 100755
--- a/deskutils/py-paperless-ngx/files/paperless-flower.in
+++ b/deskutils/py-paperless-ngx/files/paperless-flower.in
@@ -18,6 +18,7 @@
 #					Flower logging syslog priority.
 # paperless_flower_log_tag (str):	Set to "paperless-flower" by default.
 #					Flower logging syslog tag.
+# paperless_flower_tmpdir (str):	If set, overrides TMPDIR
 
 . /etc/rc.subr
 
@@ -31,10 +32,16 @@ paperless_flower_daemon_user=${paperless_flower_user:-"paperless"}
 paperless_flower_log_facility=${paperless_flower_log_facility:-"daemon"}
 paperless_flower_log_priority=${paperless_flower_log_priority:-"notice"}
 paperless_flower_log_tag=${paperless_flower_log_tag:-"paperless-flower"}
+paperless_flower_tmpdir=${paperless_flower_tmpdir:-"$TMPDIR"}
 
 paperless_flower_env="LANG=en_US.UTF-8 PATH=$PATH:%%PREFIX%%/bin \
   PYTHONPATH=%%PYTHONPREFIX_SITELIBDIR%%/paperless"
 
+if [ -n "$paperless_flower_tmpdir" ]; then
+	paperless_flower_env="$paperless_flower_env TMPDIR=\
+$paperless_flower_tmpdir"
+fi
+
 pidfile="/var/run/paperless/flower.pid"
 procname="%%PYTHON_CMD%%"
 command="/usr/sbin/daemon"
diff --git a/deskutils/py-paperless-ngx/files/paperless-migrate.in b/deskutils/py-paperless-ngx/files/paperless-migrate.in
index 91bd702d2b10..bc7a70c62361 100755
--- a/deskutils/py-paperless-ngx/files/paperless-migrate.in
+++ b/deskutils/py-paperless-ngx/files/paperless-migrate.in
@@ -19,6 +19,7 @@
 #					Migrate logging syslog priority.
 # paperless_migrate_log_tag (str):	Set to "paperless-migrate" by default.
 #					Migrate logging syslog tag.
+# paperless_migrate_tmpdir (str):	If set, overrides TMPDIR
 
 . /etc/rc.subr
 
@@ -32,10 +33,16 @@ paperless_migrate_user=${paperless_migrate_user:-"paperless"}
 paperless_migrate_log_facility=${paperless_migrate_log_facility:-"daemon"}
 paperless_migrate_log_priority=${paperless_migrate_log_priority:-"notice"}
 paperless_migrate_log_tag=${paperless_migrate_log_tag:-"paperless-migrate"}
+paperless_migrate_tmpdir=${paperless_migrate_tmpdir:-"$TMPDIR"}
 
 paperless_migrate_env="LANG=en_US.UTF-8 PATH=$PATH:%%PREFIX%%/bin \
   PYTHONPATH=%%PYTHONPREFIX_SITELIBDIR%%/paperless"
 
+if [ -n "$paperless_migrate_tmpdir" ]; then
+	paperless_migrate_env="$paperless_migrate_env TMPDIR=\
+$paperless_migrate_tmpdir"
+fi
+
 start_cmd="${name}_run | logger -s -t '$paperless_migrate_log_tag'"
 stop_cmd=":"
 
diff --git a/deskutils/py-paperless-ngx/files/paperless-webui.in b/deskutils/py-paperless-ngx/files/paperless-webui.in
index 1e191883f00b..5dc08ee981c6 100755
--- a/deskutils/py-paperless-ngx/files/paperless-webui.in
+++ b/deskutils/py-paperless-ngx/files/paperless-webui.in
@@ -36,6 +36,7 @@
 #					Content of PAPERLESS_SECRET_KEY can be
 #					overridden in
 #					%%PREFIX%%/etc/paperless.conf.
+# paperless_webui_tmpdir (str):		If set, overrides TMPDIR
 
 . /etc/rc.subr
 
@@ -54,12 +55,18 @@ paperless_webui_listen_port=${paperless_webui_listen_port:-"8000"}
 paperless_webui_restart_delay=${paperless_webui_restart_delay:-"5"}
 paperless_webui_secret_key=${\
 paperless_webui_secret_key:-"%%PREFIX%%/etc/paperless_secret_key"}
+paperless_webui_tmpdir=${paperless_webui_tmpdir:-"$TMPDIR"}
 
 paperless_webui_env="LANG=en_US.UTF-8 PATH=$PATH:%%PREFIX%%/bin\
   PYTHONPATH=%%PYTHONPREFIX_SITELIBDIR%%/paperless \
   PAPERLESS_BIND_ADDR=${paperless_webui_listen_address} \
   PAPERLESS_PORT=${paperless_webui_listen_port}"
 
+if [ -n "$paperless_webui_tmpdir" ]; then
+	paperless_webui_env="$paperless_webui_env TMPDIR=\
+$paperless_webui_tmpdir"
+fi
+
 start_precmd="paperless_webui_prestart"
 pidfile="/var/run/paperless/webui.pid"
 command="/usr/sbin/daemon"
diff --git a/deskutils/py-paperless-ngx/files/paperless-worker.in b/deskutils/py-paperless-ngx/files/paperless-worker.in
index 1a4104ebdd16..8595c659462a 100755
--- a/deskutils/py-paperless-ngx/files/paperless-worker.in
+++ b/deskutils/py-paperless-ngx/files/paperless-worker.in
@@ -19,6 +19,7 @@
 #					Worker logging syslog priority.
 # paperless_worker_log_tag (str):	Set to "paperless-worker" by default.
 #					Worker logging syslog tag.
+# paperless_worker_tmpdir (str):	If set, overrides TMPDIR
 
 . /etc/rc.subr
 
@@ -32,11 +33,17 @@ paperless_worker_daemon_user=${paperless_worker_user:-"paperless"}
 paperless_worker_log_facility=${paperless_worker_log_facility:-"daemon"}
 paperless_worker_log_priority=${paperless_worker_log_priority:-"notice"}
 paperless_worker_log_tag=${paperless_worker_log_tag:-"paperless-worker"}
+paperless_worker_tmpdir=${paperless_worker_tmpdir:-"$TMPDIR"}
 
 paperless_worker_env="LANG=en_US.UTF-8 PATH=$PATH:%%PREFIX%%/bin \
   PYTHONPATH=%%PYTHONPREFIX_SITELIBDIR%%/paperless \
   OMP_NUM_THREADS=1"
 
+if [ -n "$paperless_worker_tmpdir" ]; then
+	paperless_worker_env="$paperless_worker_env TMPDIR=\
+$paperless_worker_tmpdir"
+fi
+
 pidfile="/var/run/paperless/worker.pid"
 procname="%%PYTHON_CMD%%"
 command="/usr/sbin/daemon"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202412112154.4BBLsr5i014518>