summaryrefslogtreecommitdiff
path: root/deskutils/py-paperless-ngx/files
diff options
context:
space:
mode:
Diffstat (limited to 'deskutils/py-paperless-ngx/files')
-rwxr-xr-xdeskutils/py-paperless-ngx/files/paperless-webui.in9
-rw-r--r--deskutils/py-paperless-ngx/files/patch-gunicorn.conf.py11
-rw-r--r--deskutils/py-paperless-ngx/files/patch-src_documents_management_commands_document__consumer.py4
-rw-r--r--deskutils/py-paperless-ngx/files/patch-src_paperless__mail_parsers.py8
-rw-r--r--deskutils/py-paperless-ngx/files/patch-src_paperless_settings.py12
-rw-r--r--deskutils/py-paperless-ngx/files/pkg-message.in6
6 files changed, 22 insertions, 28 deletions
diff --git a/deskutils/py-paperless-ngx/files/paperless-webui.in b/deskutils/py-paperless-ngx/files/paperless-webui.in
index 5dc08ee981c6..0fd79ec65c4a 100755
--- a/deskutils/py-paperless-ngx/files/paperless-webui.in
+++ b/deskutils/py-paperless-ngx/files/paperless-webui.in
@@ -59,8 +59,8 @@ 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}"
+ GRANIAN_HOST=${paperless_webui_listen_address} \
+ GRANIAN_PORT=${paperless_webui_listen_port}"
if [ -n "$paperless_webui_tmpdir" ]; then
paperless_webui_env="$paperless_webui_env TMPDIR=\
@@ -77,9 +77,8 @@ command_args="-cS -u ${paperless_webui_daemon_user} \
-s ${paperless_webui_log_priority} \
-T ${paperless_webui_log_tag} \
-R ${paperless_webui_restart_delay} \
- %%PREFIX%%/bin/gunicorn \
- -c %%PYTHONPREFIX_SITELIBDIR%%/paperless/gunicorn.conf.py \
- paperless.asgi:application"
+ %%PREFIX%%/bin/granian --interface asginl \
+ --ws --loop uvloop paperless.asgi:application"
paperless_webui_prestart()
{
diff --git a/deskutils/py-paperless-ngx/files/patch-gunicorn.conf.py b/deskutils/py-paperless-ngx/files/patch-gunicorn.conf.py
deleted file mode 100644
index e9cf70f82259..000000000000
--- a/deskutils/py-paperless-ngx/files/patch-gunicorn.conf.py
+++ /dev/null
@@ -1,11 +0,0 @@
---- gunicorn.conf.py.orig 2024-02-18 20:13:15 UTC
-+++ gunicorn.conf.py
-@@ -11,7 +11,7 @@ timeout = 120
- preload_app = True
-
- # https://docs.gunicorn.org/en/stable/faq.html#blocking-os-fchmod
--worker_tmp_dir = "/dev/shm"
-+worker_tmp_dir = "/tmp"
-
-
- def pre_fork(server, worker):
diff --git a/deskutils/py-paperless-ngx/files/patch-src_documents_management_commands_document__consumer.py b/deskutils/py-paperless-ngx/files/patch-src_documents_management_commands_document__consumer.py
index 6d42eced1f3c..7ce264a9831f 100644
--- a/deskutils/py-paperless-ngx/files/patch-src_documents_management_commands_document__consumer.py
+++ b/deskutils/py-paperless-ngx/files/patch-src_documents_management_commands_document__consumer.py
@@ -1,4 +1,4 @@
---- src/documents/management/commands/document_consumer.py.orig 2024-03-18 03:45:09 UTC
+--- src/documents/management/commands/document_consumer.py.orig 2025-04-19 22:34:42 UTC
+++ src/documents/management/commands/document_consumer.py
@@ -292,7 +292,7 @@ class Command(BaseCommand):
logger.debug(f"Configuring timeout to {timeout_ms}ms")
@@ -7,5 +7,5 @@
- inotify_flags = flags.CLOSE_WRITE | flags.MOVED_TO | flags.MODIFY
+ inotify_flags = flags.CLOSE_WRITE | flags.MOVED_TO | flags.MODIFY | flags.CREATE
if recursive:
- descriptor = inotify.add_watch_recursive(directory, inotify_flags)
+ inotify.add_watch_recursive(directory, inotify_flags)
else:
diff --git a/deskutils/py-paperless-ngx/files/patch-src_paperless__mail_parsers.py b/deskutils/py-paperless-ngx/files/patch-src_paperless__mail_parsers.py
index 5a985505286a..d10bc4241194 100644
--- a/deskutils/py-paperless-ngx/files/patch-src_paperless__mail_parsers.py
+++ b/deskutils/py-paperless-ngx/files/patch-src_paperless__mail_parsers.py
@@ -1,6 +1,6 @@
---- src/paperless_mail/parsers.py.orig 2024-08-23 03:40:13 UTC
+--- src/paperless_mail/parsers.py.orig 2025-04-19 22:34:42 UTC
+++ src/paperless_mail/parsers.py
-@@ -9,8 +9,8 @@ from django.conf import settings
+@@ -8,8 +8,8 @@ from django.conf import settings
from django.utils.timezone import is_naive
from django.utils.timezone import make_aware
from gotenberg_client import GotenbergClient
@@ -11,7 +11,7 @@
from gotenberg_client.options import PageMarginsType
from gotenberg_client.options import PageSize
from gotenberg_client.options import PdfAFormat
-@@ -344,10 +344,10 @@ class MailDocumentParser(DocumentParser):
+@@ -370,10 +370,10 @@ class MailDocumentParser(DocumentParser):
.resource(css_file)
.margins(
PageMarginsType(
@@ -26,7 +26,7 @@
),
)
.size(PageSize(height=11.7, width=8.27))
-@@ -426,10 +426,10 @@ class MailDocumentParser(DocumentParser):
+@@ -452,10 +452,10 @@ class MailDocumentParser(DocumentParser):
# Set page size, margins
route.margins(
PageMarginsType(
diff --git a/deskutils/py-paperless-ngx/files/patch-src_paperless_settings.py b/deskutils/py-paperless-ngx/files/patch-src_paperless_settings.py
index cb5180ea81a2..0631a458caf6 100644
--- a/deskutils/py-paperless-ngx/files/patch-src_paperless_settings.py
+++ b/deskutils/py-paperless-ngx/files/patch-src_paperless_settings.py
@@ -1,6 +1,6 @@
---- src/paperless/settings.py.orig 2024-03-18 03:45:09 UTC
+--- src/paperless/settings.py.orig 2025-04-19 22:34:42 UTC
+++ src/paperless/settings.py
-@@ -24,8 +24,6 @@ if configuration_path and os.path.exists(configuration
+@@ -21,8 +21,6 @@ if configuration_path and os.path.exists(configuration
load_dotenv(configuration_path)
elif os.path.exists("../paperless.conf"):
load_dotenv("../paperless.conf")
@@ -9,16 +9,16 @@
elif os.path.exists("/usr/local/etc/paperless.conf"):
load_dotenv("/usr/local/etc/paperless.conf")
-@@ -254,7 +252,7 @@ THUMBNAIL_DIR = MEDIA_ROOT / "documents" / "thumbnails
+@@ -267,7 +265,7 @@ THUMBNAIL_DIR = MEDIA_ROOT / "documents" / "thumbnails
DATA_DIR = __get_path("PAPERLESS_DATA_DIR", BASE_DIR.parent / "data")
-NLTK_DIR = __get_path("PAPERLESS_NLTK_DIR", "/usr/share/nltk_data")
+NLTK_DIR = __get_path("PAPERLESS_NLTK_DIR", "/usr/local/share/nltk_data")
- TRASH_DIR = os.getenv("PAPERLESS_TRASH_DIR")
-
-@@ -1031,7 +1029,7 @@ FILENAME_FORMAT_REMOVE_NONE = __get_boolean(
+ # Check deprecated setting first
+ EMPTY_TRASH_DIR = os.getenv(
+@@ -1106,7 +1104,7 @@ FILENAME_FORMAT_REMOVE_NONE = __get_boolean(
THUMBNAIL_FONT_NAME = os.getenv(
"PAPERLESS_THUMBNAIL_FONT_NAME",
diff --git a/deskutils/py-paperless-ngx/files/pkg-message.in b/deskutils/py-paperless-ngx/files/pkg-message.in
index d76964202b9a..2abb73ca7ab0 100644
--- a/deskutils/py-paperless-ngx/files/pkg-message.in
+++ b/deskutils/py-paperless-ngx/files/pkg-message.in
@@ -14,6 +14,12 @@ the sample configuration installed by the package:
Then merge in changes as required by editing
%%PREFIX%%/etc/paperless.conf.
+
+Database migrations are run automatically on service start, but
+it's recommended to run them explicitly, especially on major upgrades:
+
+ service paperless-migrate onestart
+
EOM
}
{ type: upgrade