git: 8232b9d80fbc - main - deskutils/py-paperless: Remove expired port
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 31 Mar 2026 16:08:34 UTC
The branch main has been updated by rene:
URL: https://cgit.FreeBSD.org/ports/commit/?id=8232b9d80fbc5d3f719232906c3c5eac9bdffa41
commit 8232b9d80fbc5d3f719232906c3c5eac9bdffa41
Author: Rene Ladan <rene@FreeBSD.org>
AuthorDate: 2026-03-31 16:08:23 +0000
Commit: Rene Ladan <rene@FreeBSD.org>
CommitDate: 2026-03-31 16:08:23 +0000
deskutils/py-paperless: Remove expired port
2026-03-31 deskutils/py-paperless: Upstream repository archived since 2021 and no compatibility for Django 5+. Please migrate to deskutils/py-paperless-ngx
---
MOVED | 1 +
deskutils/Makefile | 1 -
deskutils/py-paperless/Makefile | 141 ------
deskutils/py-paperless/distinfo | 7 -
deskutils/py-paperless/files/README.in | 1 -
deskutils/py-paperless/files/nginx.conf.in | 18 -
deskutils/py-paperless/files/paperless-consumer.in | 59 ---
deskutils/py-paperless/files/paperless.7.in | 271 ----------
.../py-paperless/files/patch-docs-guesswork.rst | 37 --
deskutils/py-paperless/files/patch-docs_conf.py | 13 -
.../files/patch-paperless.conf.example | 62 ---
.../files/patch-src-documents-models.py | 18 -
.../files/patch-src-paperless-settings.py | 44 --
.../files/patch-src_documents_admin.py | 20 -
.../patch-src_documents_signals_____init____.py | 11 -
...n_documents_document_change__list__results.html | 11 -
.../py-paperless/files/patch-src_paperless_urls.py | 50 --
deskutils/py-paperless/files/pkg-message.in | 7 -
deskutils/py-paperless/files/sshd_config.in | 14 -
deskutils/py-paperless/files/uwsgi.ini.in | 9 -
deskutils/py-paperless/pkg-descr | 7 -
deskutils/py-paperless/pkg-plist | 544 ---------------------
22 files changed, 1 insertion(+), 1345 deletions(-)
diff --git a/MOVED b/MOVED
index 73b5d12af49d..9d99cd16273a 100644
--- a/MOVED
+++ b/MOVED
@@ -5175,3 +5175,4 @@ graphics/luminance-qt5||2026-03-29|Broken for more than a year
sysutils/tmate-ssh-server||2026-03-31|Has expired: Upstream unmaintained
editors/wordgrinder||2026-03-31|Has expired: broken since 2023, maintainer AWOL
www/py-django-cron||2026-03-31|Has expired: Upstream inactive since 3+ years, not compatible with Django 5.2 or newer
+deskutils/py-paperless|deskutils/py-paperless-ngx|2026-03-31|Has expired: Upstream repository archived since 2021 and no compatibility for Django 5+. Please migrate to deskutils/py-paperless-ngx
diff --git a/deskutils/Makefile b/deskutils/Makefile
index 6c02df5ebe4e..1b318c6fe631 100644
--- a/deskutils/Makefile
+++ b/deskutils/Makefile
@@ -236,7 +236,6 @@
SUBDIR += py-i3-gnome-pomodoro
SUBDIR += py-khal
SUBDIR += py-khard
- SUBDIR += py-paperless
SUBDIR += py-paperless-ngx
SUBDIR += py-py3status
SUBDIR += py-pystash
diff --git a/deskutils/py-paperless/Makefile b/deskutils/py-paperless/Makefile
deleted file mode 100644
index 12196d9acd56..000000000000
--- a/deskutils/py-paperless/Makefile
+++ /dev/null
@@ -1,141 +0,0 @@
-PORTNAME= paperless
-PORTVERSION= 2.7.0
-PORTREVISION= 21
-CATEGORIES= deskutils python
-PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
-
-PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
-PATCHFILES+= b122931185fb.patch:-p1 # https://github.com/the-paperless-project/paperless/pull/712
-PATCHFILES+= b131c97d1d85.patch:-p1 # https://github.com/the-paperless-project/paperless/pull/716
-
-MAINTAINER= grembo@FreeBSD.org
-COMMENT= Index and archive scanned paper documents
-WWW= https://paperless.readthedocs.io
-
-LICENSE= GPLv3
-LICENSE_FILE= ${WRKSRC}/LICENSE
-
-DEPRECATED= Upstream repository archived since 2021 and no compatibility for Django 5+. Please migrate to deskutils/py-paperless-ngx
-EXPIRATION_DATE=2026-03-31
-
-BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}dateparser>=1.1.0:devel/py-dateparser@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}django-cors-headers>=2.4.0:www/py-django-cors-headers@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}django-crispy-forms>=1.7.2:www/py-django-crispy-forms@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}django-extensions>=2.1.6:www/py-django-extensions@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}django-filter>=2.0.0:www/py-django-filter@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}djangoql>=0.17.0:www/py-djangoql@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}djangorestframework>=3.9.0:www/py-djangorestframework@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}fuzzywuzzy>=0.15.1:devel/py-fuzzywuzzy@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}langdetect>=1.0.9:textproc/py-langdetect@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}pdftotext>=2.1.1:textproc/py-pdftotext@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}pyocr>=0.5.3:graphics/py-pyocr@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}python-dotenv>=0.10.1:www/py-python-dotenv@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}python-gnupg>=0.4.3:security/py-python-gnupg@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}python-magic>=0.4.10:devel/py-python-magic@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR}
-RUN_DEPENDS:= ${BUILD_DEPENDS}
-RUN_DEPENDS+= gpg2:security/gnupg \
- optipng:graphics/optipng \
- tesseract:graphics/tesseract \
- unpaper:graphics/unpaper
-
-USES= python shebangfix
-USE_GITHUB= yes
-GH_ACCOUNT= the-paperless-project
-USE_RC_SUBR= paperless-consumer
-
-SHEBANG_FILES= ${WRKSRC}/src/manage.py
-
-CONFLICTS_INSTALL= ${PYTHON_PKGNAMEPREFIX}*paperless-ngx
-
-SUB_FILES= README nginx.conf paperless.7 pkg-message sshd_config uwsgi.ini
-SUB_LIST= PKGBASE=${PKGBASE} PYTHON_CMD=${PYTHON_CMD} \
- PYTHONPREFIX_SITELIBDIR=${PYTHONPREFIX_SITELIBDIR} \
- ECHO=${ECHO} EGREP=${EGREP} TOUCH=${TOUCH} \
- CHOWN=${CHOWN} RM=${RM:Q}
-
-NO_ARCH= yes
-
-USERS= paperless
-GROUPS= paperless
-
-OPTIONS_DEFINE= DOCS EXAMPLES
-OPTIONS_SINGLE= IMAGICK
-OPTIONS_SINGLE_IMAGICK= IMAGICK6_NOX11 IMAGICK6_X11 IMAGICK7_NOX11 IMAGICK7_X11
-OPTIONS_DEFAULT= IMAGICK7_X11
-
-IMAGICK_DESC= ${IMAGEMAGICK_DESC}
-IMAGICK6_NOX11_DESC= ImageMagick6 without X11 support
-IMAGICK6_X11_DESC= ImageMagick6 with X11 support
-IMAGICK7_NOX11_DESC= ImageMagick7 without X11 support
-IMAGICK7_X11_DESC= ImageMagick7 with X11 support
-
-DOCS_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sphinx>=1.8.3,1:textproc/py-sphinx@${PY_FLAVOR}
-DOCS_USES= gmake
-
-IMAGICK6_X11_USES= magick:6,run
-IMAGICK6_NOX11_USES= magick:6,run,nox11
-IMAGICK7_X11_USES= magick:7,run
-IMAGICK7_NOX11_USES= magick:7,run,nox11
-
-PORTDOCS= *
-
-PAPERLESS_STATICDIR= ${WRKSRC}/static
-
-do-build:
- @${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py \
- -d ${PYTHONPREFIX_SITELIBDIR} \
- -f ${WRKSRC}/src
- @${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py \
- -d ${PYTHONPREFIX_SITELIBDIR} \
- -f ${WRKSRC}/src
- @${RM} -r ${PAPERLESS_STATICDIR}
- @${SETENV} \
- PAPERLESS_STATICDIR=${PAPERLESS_STATICDIR} \
- ${PYTHON_CMD} ${WRKSRC}/src/manage.py collectstatic
-
-do-build-DOCS-on:
- cd ${WRKSRC}/docs && ${SETENV} ${MAKE_ENV} \
- ${MAKE_CMD} ${MAKE_ARGS} html SPHINXBUILD=sphinx-build-${PYTHON_VER}
-
-post-build-DOCS-on:
- @${RM} ${WRKSRC}/docs/_build/html/.buildinfo
-
-do-install:
- @${MKDIR} ${STAGEDIR}${PYTHON_SITELIBDIR}/paperless
- @cd ${WRKSRC}/resources && \
- ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}
- @cd ${WRKSRC}/src && \
- ${COPYTREE_SHARE} . ${STAGEDIR}${PYTHON_SITELIBDIR}/paperless
- @${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.orig' -delete
- @${RLN} ${STAGEDIR}${PYTHON_SITELIBDIR}/paperless/manage.py \
- ${STAGEDIR}${PREFIX}/bin/paperless
- @${CHMOD} +x ${STAGEDIR}${PREFIX}/bin/paperless
- @${MKDIR} ${STAGEDIR}${WWWDIR}
- @cd ${WRKSRC} && \
- ${COPYTREE_SHARE} static ${STAGEDIR}${WWWDIR}
- @${SED} -e 's|%%WWWDIR%%|${WWWDIR}|g;' \
- ${WRKSRC}/paperless.conf.example \
- > ${STAGEDIR}${PREFIX}/etc/paperless.conf.sample
- @${MKDIR} ${STAGEDIR}/var/db/paperless/consume/input \
- ${STAGEDIR}/var/db/paperless/media \
- ${STAGEDIR}/var/db/paperless/sqlite
- ${INSTALL_MAN} ${WRKDIR}/paperless.7 ${STAGEDIR}${PREFIX}/share/man/man7
-
-post-install-DOCS-on:
- @${MKDIR} ${STAGEDIR}${DOCSDIR}/presentation
- @cd ${WRKSRC}/docs/_build/html && \
- ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}
- @cd ${WRKSRC}/presentation && \
- ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}/presentation
-
-post-install-EXAMPLES-on:
- @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
- ${INSTALL_DATA} \
- ${WRKDIR}/README \
- ${WRKDIR}/nginx.conf \
- ${WRKDIR}/sshd_config \
- ${WRKDIR}/uwsgi.ini \
- ${STAGEDIR}${EXAMPLESDIR}
-
-.include <bsd.port.mk>
diff --git a/deskutils/py-paperless/distinfo b/deskutils/py-paperless/distinfo
deleted file mode 100644
index 58b40dfeb81e..000000000000
--- a/deskutils/py-paperless/distinfo
+++ /dev/null
@@ -1,7 +0,0 @@
-TIMESTAMP = 1610652602
-SHA256 (the-paperless-project-paperless-2.7.0_GH0.tar.gz) = 478823e12ea874dc0acd7f6ce038d221849cfcb797f0d6de57624bacdaa02839
-SIZE (the-paperless-project-paperless-2.7.0_GH0.tar.gz) = 4038688
-SHA256 (b122931185fb.patch) = 32076da28ca955c8b4db522478936aa76ef55033b8cb9ed6937ed37a393a1327
-SIZE (b122931185fb.patch) = 1449
-SHA256 (b131c97d1d85.patch) = 42816d1c16f7f40c746c654be0ff6e80c75dcb17ea2220df0b43334696b4548d
-SIZE (b131c97d1d85.patch) = 1049
diff --git a/deskutils/py-paperless/files/README.in b/deskutils/py-paperless/files/README.in
deleted file mode 100644
index bb4fc88e205d..000000000000
--- a/deskutils/py-paperless/files/README.in
+++ /dev/null
@@ -1 +0,0 @@
-Please see `man paperless' for details on how to use the paperless examples.
diff --git a/deskutils/py-paperless/files/nginx.conf.in b/deskutils/py-paperless/files/nginx.conf.in
deleted file mode 100644
index 519f7fde0ca0..000000000000
--- a/deskutils/py-paperless/files/nginx.conf.in
+++ /dev/null
@@ -1,18 +0,0 @@
- server {
- listen 80;
- server_name localhost;
-
- location /static/ {
- alias %%WWWDIR%%/static/;
- }
-
- location / {
- uwsgi_pass unix:/tmp/uwsgi-paperless.sock;
- include uwsgi_params;
- }
-
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- root %%PREFIX%%/www/nginx-dist;
- }
- }
diff --git a/deskutils/py-paperless/files/paperless-consumer.in b/deskutils/py-paperless/files/paperless-consumer.in
deleted file mode 100644
index 0d99f2fea25c..000000000000
--- a/deskutils/py-paperless/files/paperless-consumer.in
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/bin/sh
-
-# PROVIDE: paperless-consumer
-# REQUIRE: LOGIN
-# KEYWORD: shutdown
-#
-# Add the following line(s) to /etc/rc.conf to enable the paperless
-# document consumer:
-# paperless_consumer_enable (bool):XSet to "NO" by default.
-# Set it to "YES" to enable
-# paperless_consumer
-# paperless_consumer_log_facility(str): Set to "daemon" by default.
-# Consumer logging syslog facility.
-# paperless_consumer_log_priority(str): Set to "notice" by default.
-# Consumer logging syslog priority.
-# paperless_consumer_log_tag(str): Set to "paperless-consumer" by default.
-# Consumer logging syslog tag.
-# paperless_consumer_restart_delay(int):Set to "60" by default.
-# Consumer automatic restart delay in
-# seconds.
-
-. /etc/rc.subr
-
-name="paperless_consumer"
-rcvar="${name}_enable"
-
-# Set defaults
-paperless_consumer_enable=${paperless_consumer_enable:-"NO"}
-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_restart_delay=${paperless_consumer_restart_delay:-"5"}
-
-paperless_consumer_env="LANG=en_US.UTF-8 PATH=$PATH:%%PREFIX%%/bin"
-
-start_precmd="${name}_prestart"
-
-pidfile="/var/run/paperless_consumer.pid"
-command="/usr/sbin/daemon"
-command_args="-cS -u ${paperless_consumer_daemon_user} \
- -P ${pidfile} \
- -t paperless-consumer \
- -l ${paperless_consumer_log_facility} \
- -s ${paperless_consumer_log_priority} \
- -T ${paperless_consumer_log_tag} \
- -R ${paperless_consumer_restart_delay} \
- %%PREFIX%%/bin/paperless document_consumer"
-
-paperless_consumer_prestart()
-{
- %%ECHO%% "Applying potential migrations to ${name}."
- env ${paperless_consumer_env} su \
- -m ${paperless_consumer_daemon_user} \
- -c 'sh -c "%%PREFIX%%/bin/paperless migrate --no-color -v 0"'
-}
-
-load_rc_config ${name}
-run_rc_command "$1"
diff --git a/deskutils/py-paperless/files/paperless.7.in b/deskutils/py-paperless/files/paperless.7.in
deleted file mode 100644
index 416c264cdb6e..000000000000
--- a/deskutils/py-paperless/files/paperless.7.in
+++ /dev/null
@@ -1,271 +0,0 @@
-.\"
-.\" Copyright (c) 2019 Michael Gmelin
-.\"
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.Dd September 17, 2020
-.Dt PAPERLESS 7
-.Os
-.Sh NAME
-.Nm paperless
-.Nd Index and archive scanned paper documents - installation
-.Sh SYNOPSIS
-.Nm pkg install %%PKGBASE%%
-.Sh DESCRIPTION
-.Em Paperless
-is a simple Django application running in two parts: The consumer,
-which does the indexing and a web interface, which allows searching
-and downloading already-indexed documents.
-.Pp
-This man page documents how the
-.Fx FreeBSD
-port is installed and configured.
-It assumes that the paperless package was already installed, e.g., from the
-.Fx FreeBSD
-package repo as described in
-.Sx SYNOPSIS .
-.Pp
-For more information about using paperless, see
-.Dq the official paperless documentation
-.Pa ( file:/%%DOCSDIR%%/index.html
-or
-.Pa https://paperless.readthedocs.io ) .
-.Pp
-The package creates a symlink from
-.Pa %%PYTHONPREFIX_SITELIBDIR%%/paperless/manage.py
-to
-.Pa %%PREFIX%%/bin/paperless
-for convenience reasons, so whenever the official
-documentation mentions
-.Em manage.py
-it can be substituted with
-.Pa %%PREFIX%%/bin/paperless
-or simply
-.Pa paperless .
-.Pp
-.Em Paperless always needs to be run using the correct system user
-and an UTF-8 codepage.
-.Pp
-The package %%PKGBASE%% created a user
-.Em paperless
-with the following home directory layout, setting appropriate
-restrictive access permissions:
-.Bl -tag -width "/var"
-.It Pa /var/db/paperless
-home directory (only writeable by root)
-.Bl -tag -width "consume/" -compact
-.It Pa consume/
-Consume directory writable by root, used as chroot directory
-for sftp access (see below).
-.Bl -tag -width "123" -compact
-.It Pa input/
-Input files are dropped in there to be processed by the
-paperless document consumer - either directly or via
-a mechanism like sftp.
-.El
-.It Pa media/
-Directory used by paperless to store original files and
-thumbnails.
-.It Pa sqlite/
-Contains paperless' SQLite database.
-.El
-.El
-.Sh CONSUMER SETUP
-In case documents should be PGP encrypted,
-.Va PAPERLESS_PASSPHRASE
-needs to be configured in
-.Pa %%PREFIX%%/etc/paperless.conf
-first.
-.Pp
-Also,
-.Va PAPERLESS_OCR_THREADS
-can be tuned in the same configuration file to limit
-the impact on system performance.
-.Pp
-To use paperless, the consumer is enabled
-.Bd -literal -offset indent
-sysrc paperless_consumer_enable=YES
-.Ed
-.Pp
-and subsequently started
-.Bd -literal -offset indent
-service paperless-consumer start
-.Ed
-.Pp
-(which also creates/updates the paperless SQLite database).
-.Pp
-Therefore, restarting the consumer after updates
-.Bd -literal -offset indent
-service paperless-consumer restart
-.Ed
-.Pp
-updates the database before starting the new program version.
-.Sh WEB UI SETUP
-Before using the web ui, make sure to create a super user and assign
-a password
-.Bd -literal -offset indent
-su -l paperless -c '%%PREFIX%%/bin/paperless createsuperuser'
-.Ed
-.Pp
-It is recommended to host the web component using a real
-web server, e.g., nginx + uwsgi.
-.Pp
-Install and configure uwsgi:
-.Bd -literal -offset indent
-pkg install uwsgi
-mkdir -p %%PREFIX%%/etc/uwsgi
-cp %%EXAMPLESDIR%%/uwsgi.ini \\
- %%PREFIX%%/etc/uwsgi/paperless.ini
-sysrc uwsgi_enable=YES
-sysrc uwsgi_profiles+=paperless
-sysrc uwsgi_paperless_socket_owner=paperless:www
-sysrc uwsgi_paperless_uid=paperless
-sysrc uwsgi_paperless_gid=paperless
-sysrc uwsgi_paperless_configfile=%%PREFIX%%/etc/uwsgi/paperless.ini
-.Ed
-.Pp
-Start the uwsgi process:
-.Bd -literal -offset indent
-service uwsgi start paperless
-.Ed
-.Pp
-Install nginx:
-.Bd -literal -offset indent
-pkg install nginx
-.Ed
-.Pp
-Create a basic server configuration (
-.Pa %%PREFIX%%/etc/nginx/nginx.conf
-), example snippet:
-.Bd -literal -offset indent
-server {
- listen 80;
- server_name localhost;
-
- location /static/ {
- alias %%WWWDIR%%/static/;
- }
-
- location / {
- uwsgi_pass unix:/tmp/uwsgi-paperless.sock;
- include uwsgi_params;
- }
-
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- root %%PREFIX%%/www/nginx-dist;
- }
-}
-.Ed
-.Pp
-Enable and start nginx:
-.Bd -literal -offset indent
-sysrc nginx_enable=YES
-service nginx start
-.Ed
-.Pp
-.Em \&In a real world setup, nginx should be configured to use TLS
-.Em and (potentially) client certificates .
-.Sh SFTP SETUP
-Setting up
-.Em sftp
-enabled direct upload of files to be processed by the paperless
-consumer.
-Some scanners allow configuring sftp with key based authentication,
-which is convenient as it scans directly to the paperless processing
-pipeline.
-.Pp
-In case paperless is using a dedicated instance of
-.Xr sshd 8 ,
-access can be limited to the paperless user by adding
-these lines to
-.Pa /etc/ssh/sshd_config :
-.Bd -literal -offset indent
-# Only include if sshd is dedicated to paperless
-# otherwise you'll lock yourself out
-AllowUsers paperless
-.Ed
-.Pp
-The following block limits the paperless user to using the
-.Xr sftp 1
-protocol and locks it into the consume directory:
-.Bd -literal -offset indent
-# paperless can only do sftp and is dropped into correct directory
-Match User paperless
- ChrootDirectory %h/consume
- ForceCommand internal-sftp -u 0077 -d /input
- AllowTcpForwarding no
- X11Forwarding no
- PasswordAuthentication no
-.Ed
-.Pp
-The public keys of authorized users/devices need to be added to
-.Pa /var/db/paperless/.ssh/authorized_keys :
-.Bd -literal -offset indent
-mkdir -p /var/db/paperless/.ssh
-cat path/to/pubkey >>/var/db/paperless/.ssh/authorized_keys
-.Ed
-.Pp
-Make sure
-.Xr sshd 8
-is enabled and restart (or reload) it:
-.Bd -literal -offset indent
-sysrc sshd_enable=YES
-service sshd restart
-.Ed
-.Pp
-The user will be dropped into the correct directory, so uploading
-a file is as simple as:
-.Bd -literal -offset indent
-echo put file.pdf | sftp -b - paperless@host
-.Ed
-.Sh FILES
-.Bl -tag -width ".Pa %%PREFIX%%/etc/paperless.conf" -compact
-.It Pa %%PREFIX%%/etc/paperless.conf
-See self-documented
-.Pa %%PREFIX%%/etc/paperless.conf.sample
-for example.
-.It Pa %%DOCSDIR%%/index.html
-Official documentation for the version installed.
-.It Pa %%DOCSDIR%%/presentation/index.html
-Presentation of the motivation for and technology behind paperless.
-.It Pa %%EXAMPLESDIR%%
-Configuration examples, complementary to this man page.
-.El
-.Sh SEE ALSO
-.Xr sftp 1 ,
-.Xr sshd_config 5 ,
-.Xr ports 7 ,
-.Xr daemon 8 ,
-.Xr service 8 ,
-.Xr sysrc 8
-.Pp
-.Rs
-.%B "Official paperless documentation"
-.Re
-.Pp
-.Pa https://paperless.readthedocs.io
-.Sh AUTHORS
-.An -nosplit
-This manual page was written by
-.An Michael Gmelin Aq Mt grembo@FreeBSD.org .
diff --git a/deskutils/py-paperless/files/patch-docs-guesswork.rst b/deskutils/py-paperless/files/patch-docs-guesswork.rst
deleted file mode 100644
index 7b43aa3fcdc7..000000000000
--- a/deskutils/py-paperless/files/patch-docs-guesswork.rst
+++ /dev/null
@@ -1,37 +0,0 @@
---- docs/guesswork.rst.orig 2019-01-27 13:48:05 UTC
-+++ docs/guesswork.rst
-@@ -54,6 +54,34 @@ filename as described above.
-
- .. _dateparser: https://github.com/scrapinghub/dateparser/blob/v0.7.0/docs/usage.rst#settings
-
-+Transforming filenames for parsing
-+----------------------------------
-+Some devices can't produce filenames that can be parsed by the default
-+parser. By configuring the option ``PAPERLESS_FILENAME_PARSE_TRANSFORMS`` in
-+``paperless.conf`` one can add transformations that are applied to the filename
-+before it's parsed.
-+
-+The option contains a list of dictionaries of regular expressions (key:
-+``pattern``) and replacements (key: ``repl``) in JSON format, which are
-+applied in order by passing them to ``re.subn``. Transformation stops
-+after the first match, so at most one transformation is applied. The general
-+syntax is
-+
-+.. code:: python
-+
-+ [{"pattern":"pattern1", "repl":"repl1"}, {"pattern":"pattern2", "repl":"repl2"}, ..., {"pattern":"patternN", "repl":"replN"}]
-+
-+The example below is for a Brother ADS-2400N, a scanner that allows
-+different names to different hardware buttons (useful for handling
-+multiple entities in one instance), but insists on adding ``_<count>``
-+to the filename.
-+
-+.. code:: python
-+
-+ # Brother profile configuration, support "Name_Date_Count" (the default
-+ # setting) and "Name_Count" (use "Name" as tag and "Count" as title).
-+ PAPERLESS_FILENAME_PARSE_TRANSFORMS=[{"pattern":"^([a-z]+)_(\\d{8})_(\\d{6})_([0-9]+)\\.", "repl":"\\2\\3Z - \\4 - \\1."}, {"pattern":"^([a-z]+)_([0-9]+)\\.", "repl":" - \\2 - \\1."}]
-+
- .. _guesswork-content:
-
- Reading the Document Contents
diff --git a/deskutils/py-paperless/files/patch-docs_conf.py b/deskutils/py-paperless/files/patch-docs_conf.py
deleted file mode 100644
index 4e490b5921a3..000000000000
--- a/deskutils/py-paperless/files/patch-docs_conf.py
+++ /dev/null
@@ -1,13 +0,0 @@
-# add_stylesheet() deprecated on Sphinx 4.0
-# https://www.sphinx-doc.org/en/master/extdev/deprecated.html
---- docs/conf.py.orig 2019-01-27 13:48:05 UTC
-+++ docs/conf.py
-@@ -21,7 +21,7 @@ exec(open("../src/paperless/version.py").read())
-
- # Believe it or not, this is the officially sanctioned way to add custom CSS.
- def setup(app):
-- app.add_stylesheet("custom.css")
-+ app.add_css_file("custom.css")
-
- # If extensions (or modules to document with autodoc) are in another directory,
- # add these directories to sys.path here. If the directory is relative to the
diff --git a/deskutils/py-paperless/files/patch-paperless.conf.example b/deskutils/py-paperless/files/patch-paperless.conf.example
deleted file mode 100644
index 1d718aa54b22..000000000000
--- a/deskutils/py-paperless/files/patch-paperless.conf.example
+++ /dev/null
@@ -1,62 +0,0 @@
---- paperless.conf.example.orig 2019-01-27 13:48:05 UTC
-+++ paperless.conf.example
-@@ -11,22 +11,22 @@
- # This where your documents should go to be consumed. Make sure that it exists
- # and that the user running the paperless service can read/write its contents
- # before you start Paperless.
--PAPERLESS_CONSUMPTION_DIR=""
-+PAPERLESS_CONSUMPTION_DIR="/var/db/paperless/consume/input"
-
-
- # You can specify where you want the SQLite database to be stored instead of
- # the default location of /data/ within the install directory.
--#PAPERLESS_DBDIR=/path/to/database/file
-+PAPERLESS_DBDIR=/var/db/paperless/sqlite
-
-
- # Override the default MEDIA_ROOT here. This is where all files are stored.
- # The default location is /media/documents/ within the install folder.
--#PAPERLESS_MEDIADIR=/path/to/media
-+PAPERLESS_MEDIADIR=/var/db/paperless/media
-
-
- # Override the default STATIC_ROOT here. This is where all static files
- # created using "collectstatic" manager command are stored.
--#PAPERLESS_STATICDIR=""
-+PAPERLESS_STATICDIR=%%WWWDIR%%/static
-
-
- # Override the MEDIA_URL here. Unless you're hosting Paperless off a subdomain
-@@ -98,7 +98,7 @@ PAPERLESS_EMAIL_SECRET=""
- # servers to the list of allowed hosts that can do CORS calls. By default
- # Paperless allows calls from localhost:8080, but you'd like to change that,
- # you can set this value to a comma-separated list.
--#PAPERLESS_CORS_ALLOWED_HOSTS="localhost:8080,example.com,localhost:8000"
-+#PAPERLESS_CORS_ALLOWED_HOSTS="http://localhost:8080,http://example.com,http://localhost:8000"
-
- # To host paperless under a subpath url like example.com/paperless you set
- # this value to /paperless. No trailing slash!
-@@ -135,6 +135,23 @@ PAPERLESS_EMAIL_SECRET=""
- # as normal.
- #PAPERLESS_FILENAME_DATE_ORDER="YMD"
-
-+# Sometimes devices won't create filenames which can be parsed properly
-+# by the filename parser (see
-+# https://paperless.readthedocs.io/en/latest/guesswork.html).
-+#
-+# This setting allows to specify a list of transformations
-+# in regular expression syntax, which are passed in order to re.sub.
-+# Transformation stops after the first match, so at most one transformation
-+# is applied.
-+#
-+# Syntax is a JSON array of dictionaries containing "pattern" and "repl"
-+# as keys.
-+#
-+# The example below transforms filenames created by a Brother ADS-2400N
-+# document scanner in its standard configuration `Name_Date_Count', so that
-+# count is used as title, name as tag and date can be parsed by paperless.
-+#PAPERLESS_FILENAME_PARSE_TRANSFORMS=[{"pattern":"^([a-z]+)_(\\d{8})_(\\d{6})_([0-9]+)\\.", "repl":"\\2\\3Z - \\4 - \\1."}]
-+
- #
- # The following values use sensible defaults for modern systems, but if you're
- # running Paperless on a low-resource device (like a Raspberry Pi), modifying
diff --git a/deskutils/py-paperless/files/patch-src-documents-models.py b/deskutils/py-paperless/files/patch-src-documents-models.py
deleted file mode 100644
index c8ad8e8d453d..000000000000
--- a/deskutils/py-paperless/files/patch-src-documents-models.py
+++ /dev/null
@@ -1,18 +0,0 @@
---- src/documents/models.py.orig 2019-01-27 13:48:05 UTC
-+++ src/documents/models.py
-@@ -483,8 +483,14 @@ class FileInfo:
- "<title>.<suffix>"
- """
-
-+ filename = os.path.basename(path)
-+ for (pattern, repl) in settings.FILENAME_PARSE_TRANSFORMS:
-+ (filename, count) = pattern.subn(repl, filename)
-+ if count:
-+ break
-+
- for regex in cls.REGEXES.values():
-- m = regex.match(os.path.basename(path))
-+ m = regex.match(filename)
- if m:
- properties = m.groupdict()
- cls._mangle_property(properties, "created")
diff --git a/deskutils/py-paperless/files/patch-src-paperless-settings.py b/deskutils/py-paperless/files/patch-src-paperless-settings.py
deleted file mode 100644
index 28c9ac99cba2..000000000000
--- a/deskutils/py-paperless/files/patch-src-paperless-settings.py
+++ /dev/null
@@ -1,44 +0,0 @@
---- src/paperless/settings.py.orig 2019-01-27 13:48:05 UTC
-+++ src/paperless/settings.py
-@@ -10,7 +10,9 @@ For the full list of settings and their
- https://docs.djangoproject.com/en/1.10/ref/settings/
- """
-
-+import json
- import os
-+import re
-
- from dotenv import load_dotenv
-
-@@ -102,7 +104,7 @@ MIDDLEWARE = [
- ]
-
- # We allow CORS from localhost:8080
--CORS_ORIGIN_WHITELIST = tuple(os.getenv("PAPERLESS_CORS_ALLOWED_HOSTS", "localhost:8080").split(","))
-+CORS_ORIGIN_WHITELIST = tuple(os.getenv("PAPERLESS_CORS_ALLOWED_HOSTS", "http://localhost:8080").split(","))
-
- # If auth is disabled, we just use our "bypass" authentication middleware
- if bool(os.getenv("PAPERLESS_DISABLE_LOGIN", "false").lower() in ("yes", "y", "1", "t", "true")):
-@@ -314,6 +316,15 @@ FY_END = os.getenv("PAPERLESS_FINANCIAL_
- DATE_ORDER = os.getenv("PAPERLESS_DATE_ORDER", "DMY")
- FILENAME_DATE_ORDER = os.getenv("PAPERLESS_FILENAME_DATE_ORDER")
-
-+# Transformations applied before filename parsing
-+FILENAME_PARSE_TRANSFORMS = []
-+_filename_parse_transforms = os.getenv("PAPERLESS_FILENAME_PARSE_TRANSFORMS")
-+if _filename_parse_transforms:
-+ FILENAME_PARSE_TRANSFORMS = [(
-+ re.compile(t["pattern"]), t["repl"])
-+ for t in json.loads(_filename_parse_transforms)
-+ ]
-+
- # Specify for how many years a correspondent is considered recent. Recent
- # correspondents will be shown in a separate "Recent correspondents" filter as
- # well. Set to 0 to disable this filter.
-@@ -330,3 +330,6 @@ if _filename_parse_transforms:
- # well. Set to 0 to disable this filter.
- PAPERLESS_RECENT_CORRESPONDENT_YEARS = int(os.getenv(
- "PAPERLESS_RECENT_CORRESPONDENT_YEARS", 0))
-+
-+# As hinted by django 3.2
-+DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
diff --git a/deskutils/py-paperless/files/patch-src_documents_admin.py b/deskutils/py-paperless/files/patch-src_documents_admin.py
deleted file mode 100644
index c197c210219f..000000000000
--- a/deskutils/py-paperless/files/patch-src_documents_admin.py
+++ /dev/null
@@ -1,20 +0,0 @@
---- src/documents/admin.py.orig 2019-01-27 13:48:05 UTC
-+++ src/documents/admin.py
-@@ -9,7 +9,7 @@ from django.http import HttpResponseRedirect
- from django.templatetags.static import static
- from django.urls import reverse
- from django.utils.html import format_html, format_html_join
--from django.utils.http import urlquote
-+from urllib.parse import quote
- from django.utils.safestring import mark_safe
- from djangoql.admin import DjangoQLSearchMixin
-
-@@ -252,7 +254,7 @@ class DocumentAdmin(DjangoQLSearchMixin, CommonAdmin):
- "name": opts.verbose_name,
- "obj": format_html(
- '<a href="{}">{}</a>',
-- urlquote(request.path),
-+ quote(request.path),
- obj
- ),
- }
diff --git a/deskutils/py-paperless/files/patch-src_documents_signals_____init____.py b/deskutils/py-paperless/files/patch-src_documents_signals_____init____.py
deleted file mode 100644
index 83e176d8e93f..000000000000
--- a/deskutils/py-paperless/files/patch-src_documents_signals_____init____.py
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/documents/signals/__init__.py.orig 2024-02-22 18:57:58 UTC
-+++ src/documents/signals/__init__.py
-@@ -1,5 +1,5 @@
- from django.dispatch import Signal
-
--document_consumption_started = Signal(providing_args=["filename"])
--document_consumption_finished = Signal(providing_args=["document"])
--document_consumer_declaration = Signal(providing_args=[])
-+document_consumption_started = Signal()
-+document_consumption_finished = Signal()
-+document_consumer_declaration = Signal()
diff --git a/deskutils/py-paperless/files/patch-src_documents_templates_admin_documents_document_change__list__results.html b/deskutils/py-paperless/files/patch-src_documents_templates_admin_documents_document_change__list__results.html
deleted file mode 100644
index e5534c4054f2..000000000000
--- a/deskutils/py-paperless/files/patch-src_documents_templates_admin_documents_document_change__list__results.html
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/documents/templates/admin/documents/document/change_list_results.html.orig 2022-04-25 11:00:26 UTC
-+++ src/documents/templates/admin/documents/document/change_list_results.html
-@@ -81,7 +81,7 @@
- }
-
- .grid {
-- margin-right: 260px;
-+ /*margin-right: 260px;*/
- }
- .grid:after {
- content: "";
diff --git a/deskutils/py-paperless/files/patch-src_paperless_urls.py b/deskutils/py-paperless/files/patch-src_paperless_urls.py
deleted file mode 100644
index d1d2d6e63c25..000000000000
--- a/deskutils/py-paperless/files/patch-src_paperless_urls.py
+++ /dev/null
@@ -1,50 +0,0 @@
---- src/paperless/urls.py.orig 2024-02-22 19:09:18 UTC
-+++ src/paperless/urls.py
-@@ -1,5 +2,6 @@
- from django.conf import settings
--from django.conf.urls import include, static, url
-+from django.conf.urls import include, static
-+from django.urls import re_path
- from django.contrib import admin
- from django.urls import reverse_lazy
- from django.views.decorators.csrf import csrf_exempt
-@@ -27,32 +27,32 @@ router.register(r"tags", TagViewSet)
- urlpatterns = [
-
- # API
-- url(
-+ re_path(
- r"^api/auth/",
- include(
- ('rest_framework.urls', 'rest_framework'),
- namespace="rest_framework")
- ),
-- url(r"^api/", include((router.urls, 'drf'), namespace="drf")),
-+ re_path(r"^api/", include((router.urls, 'drf'), namespace="drf")),
-
- # File downloads
-- url(
-+ re_path(
- r"^fetch/(?P<kind>doc|thumb)/(?P<pk>\d+)$",
- FetchView.as_view(),
- name="fetch"
- ),
-
- # File uploads
-- url(r"^push$", csrf_exempt(PushView.as_view()), name="push"),
-+ re_path(r"^push$", csrf_exempt(PushView.as_view()), name="push"),
-
- # Favicon
-- url(r"^favicon.ico$", FaviconView.as_view(), name="favicon"),
-+ re_path(r"^favicon.ico$", FaviconView.as_view(), name="favicon"),
-
- # The Django admin
-- url(r"admin/", admin.site.urls),
-+ re_path(r"admin/", admin.site.urls),
-
- # Redirect / to /admin
-- url(r"^$", RedirectView.as_view(
-+ re_path(r"^$", RedirectView.as_view(
- permanent=True, url=reverse_lazy("admin:index"))),
-
- ] + static.static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
diff --git a/deskutils/py-paperless/files/pkg-message.in b/deskutils/py-paperless/files/pkg-message.in
deleted file mode 100644
index 216c54db405c..000000000000
--- a/deskutils/py-paperless/files/pkg-message.in
+++ /dev/null
@@ -1,7 +0,0 @@
-[
-{ type: install
- message: <<EOM
- Please see `man paperless' for details on how to configure paperless.
-EOM
-}
-]
diff --git a/deskutils/py-paperless/files/sshd_config.in b/deskutils/py-paperless/files/sshd_config.in
deleted file mode 100644
index aab9e1692f39..000000000000
--- a/deskutils/py-paperless/files/sshd_config.in
+++ /dev/null
@@ -1,14 +0,0 @@
-### Configuration for uploading documents via SFTP
-### e.g. using a scanner that supports such a feature
-
-# Only include if sshd is dedicated to paperless
-# otherwise you'll lock yourself out
-AllowUsers paperless
-
-# paperless can only do sftp and is dropped into correct directory
-Match User paperless
- ChrootDirectory %h/consume
- ForceCommand internal-sftp -u 0077 -d /input
- AllowTcpForwarding no
- X11Forwarding no
- PasswordAuthentication no
diff --git a/deskutils/py-paperless/files/uwsgi.ini.in b/deskutils/py-paperless/files/uwsgi.ini.in
deleted file mode 100644
index c991c5b1bb68..000000000000
--- a/deskutils/py-paperless/files/uwsgi.ini.in
+++ /dev/null
@@ -1,9 +0,0 @@
-[uwsgi]
-chdir = %%PYTHONPREFIX_SITELIBDIR%%/paperless
-module = paperless.wsgi:application
-env = DJANGO_SETTINGS_MODULE=paperless.settings
-env = LANG=en_US.UTF-8
-env = PATH=$PATH:%%PREFIX%%/bin
-harakiri = 20
-max-requests = 500
-vacuum = true
diff --git a/deskutils/py-paperless/pkg-descr b/deskutils/py-paperless/pkg-descr
deleted file mode 100644
index c226b3ec1a96..000000000000
--- a/deskutils/py-paperless/pkg-descr
+++ /dev/null
@@ -1,7 +0,0 @@
-Index and archive all of your scanned paper documents.
-
-Paperless is a simple Django application running in two parts: The consumer,
-which does the indexing and a web interface, which let's you you search and
-download already-indexed documents.
-
-See also: https://github.com/the-paperless-project/paperless
diff --git a/deskutils/py-paperless/pkg-plist b/deskutils/py-paperless/pkg-plist
deleted file mode 100644
index 98a320157d6f..000000000000
--- a/deskutils/py-paperless/pkg-plist
+++ /dev/null
@@ -1,544 +0,0 @@
-bin/paperless
-@sample(paperless,paperless,0600) etc/paperless.conf.sample
-%%PYTHON_SITELIBDIR%%/paperless/__pycache__/manage%%PYTHON_TAG%%.opt-1.pyc
-%%PYTHON_SITELIBDIR%%/paperless/__pycache__/manage%%PYTHON_TAG%%.pyc
-%%PYTHON_SITELIBDIR%%/paperless/documents/__init__.py
-%%PYTHON_SITELIBDIR%%/paperless/documents/__pycache__/__init__%%PYTHON_TAG%%.opt-1.pyc
-%%PYTHON_SITELIBDIR%%/paperless/documents/__pycache__/__init__%%PYTHON_TAG%%.pyc
-%%PYTHON_SITELIBDIR%%/paperless/documents/__pycache__/actions%%PYTHON_TAG%%.opt-1.pyc
*** 536 LINES SKIPPED ***