From nobody Fri Feb 23 16:29:57 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ThFps6bYHz5B3py; Fri, 23 Feb 2024 16:29:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ThFps635Lz4V7j; Fri, 23 Feb 2024 16:29:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708705797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bhh2ek35ud6YERHGcyEHvyNEWYUZjSmY4JMkYuJAR10=; b=m6QBRwc8y2T52CMcphLykRgEMBB0EheS31zwKyVg90TCj+NkrQVGBt2e9Yv/rmeNTj70hO g89o6CuAGqWSPiKF6HvzNIBVj589Xr4Nmq7kgXNMxPmG6yOnVHE/zwC/C0ASyfNRaxUbtT FtnkjLdRx37TFq0Bfp2WxYxK3fKympOtHL6x/THL5hCkA9OpD4ZWyST9CzOHYJ5fW0MIRk TpJorGfA97IMSLKTyD5BjkPv6uYEG1tdBfF8NL5Hh466rZfRV5h4YTyghqRdfALMVkHNjc WKNqSME9V7JLDFNJP2FzWOC/Q9BPSciMONWfqKJoEeJ9EC9Xf955qRD1kGmP/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708705797; a=rsa-sha256; cv=none; b=CDgWv6/xq7RdU4DAPoxezdjytYeGtjpj+fjtfq+S5DJbt8znb8aSawg7IbGfBii4FoJHbY IsWouAhCkH0Yur1CLqJFsaHax5h2UibnTESONWWZxa12upBBY/WjMs0m4SPhJ7HWnAWLOj dBVXvnA7wyjC2nczA+fE/vOKI6/wHYBrw/rzNFQxiixlGe7DYm/TUPohRK98VQdKL827G3 JWzkF/7OQg1YKAUCfLUkfCDQq0YaYDb3ioesE1L4U2g0sxfaINsuGCCZ765qkkvnbHqnUk Z7VuFNY//e9+OBViShYWM2qX1q2XoNG1rjHLuLGb7MdrQ6O3w+1T8ht3TV0Jbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708705797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bhh2ek35ud6YERHGcyEHvyNEWYUZjSmY4JMkYuJAR10=; b=AiW4+SrBo+GRu26MNxWje5aVc3j/+7VF+auvavhrMG97HKhEpmwAdlhDvqKKfdl7i7P+PF 8ficpOD36v/xd1ahjLnPjXMfmdRDfL0f6Y7B4u4ud/VvZxuZog9pJqSNiYEsO/rfH0g3ik J9qJMBczlNymNo2aA2BtESHN+b0IelyIRjTeGFh5HZ1rvq5OmwJgi5xmWZS/7NFLSohHte /7gqkO0gM8/D/lcPj6qk0+Kc0C/WUxIe0CnrjkM2g3Ir02g6QJyoXaBFUwwyWy5DbCsyw1 lgKToTFMV6202KA8zwgWxJMjzjsnEAfAAH5Q+LVr1bIsxHedJI2xAHrNcOlupQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ThFps4vGlzNW5; Fri, 23 Feb 2024 16:29:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41NGTvom064218; Fri, 23 Feb 2024 16:29:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41NGTvqX064215; Fri, 23 Feb 2024 16:29:57 GMT (envelope-from git) Date: Fri, 23 Feb 2024 16:29:57 GMT Message-Id: <202402231629.41NGTvqX064215@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Michael Gmelin Subject: git: 7fb2e8d7538b - main - deskutils/py-paperless: Update to use Django 4.2 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: grembo X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7fb2e8d7538b5023b61683288a2872b0df0bd02c Auto-Submitted: auto-generated The branch main has been updated by grembo: URL: https://cgit.FreeBSD.org/ports/commit/?id=7fb2e8d7538b5023b61683288a2872b0df0bd02c commit 7fb2e8d7538b5023b61683288a2872b0df0bd02c Author: Michael Gmelin AuthorDate: 2024-02-22 19:31:23 +0000 Commit: Michael Gmelin CommitDate: 2024-02-23 16:28:00 +0000 deskutils/py-paperless: Update to use Django 4.2 --- deskutils/py-paperless/Makefile | 18 ++++---- .../files/patch-src_documents_admin.py | 20 +++++++++ .../patch-src_documents_signals_____init____.py | 11 +++++ .../py-paperless/files/patch-src_paperless_urls.py | 50 ++++++++++++++++++++++ deskutils/py-paperless/pkg-plist | 11 ++--- 5 files changed, 95 insertions(+), 15 deletions(-) diff --git a/deskutils/py-paperless/Makefile b/deskutils/py-paperless/Makefile index dbd12235d013..f74e3b6db66f 100644 --- a/deskutils/py-paperless/Makefile +++ b/deskutils/py-paperless/Makefile @@ -1,6 +1,6 @@ PORTNAME= paperless PORTVERSION= 2.7.0 -PORTREVISION= 16 +PORTREVISION= 17 CATEGORIES= deskutils python PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -16,12 +16,12 @@ LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/LICENSE 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}dj42-django-cors-headers>=2.4.0:www/py-dj42-django-cors-headers@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj42-django-crispy-forms>=1.7.2:www/py-dj42-django-crispy-forms@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj42-django-extensions>=2.1.6:www/py-dj42-django-extensions@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj42-django-filter>=2.0.0:www/py-dj42-django-filter@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj42-djangoql>=0.17.0:www/py-dj42-djangoql@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj42-djangorestframework>=3.9.0:www/py-dj42-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} \ @@ -43,6 +43,8 @@ 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} \ @@ -57,7 +59,7 @@ GROUPS= paperless OPTIONS_DEFINE= DOCS EXAMPLES OPTIONS_SINGLE= IMAGICK OPTIONS_SINGLE_IMAGICK= IMAGICK6_NOX11 IMAGICK6_X11 IMAGICK7_NOX11 IMAGICK7_X11 -OPTIONS_DEFAULT= IMAGICK6_X11 +OPTIONS_DEFAULT= IMAGICK7_X11 IMAGICK_DESC= ${IMAGEMAGICK_DESC} IMAGICK6_NOX11_DESC= ImageMagick6 without X11 support diff --git a/deskutils/py-paperless/files/patch-src_documents_admin.py b/deskutils/py-paperless/files/patch-src_documents_admin.py new file mode 100644 index 000000000000..c197c210219f --- /dev/null +++ b/deskutils/py-paperless/files/patch-src_documents_admin.py @@ -0,0 +1,20 @@ +--- 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( + '{}', +- 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 new file mode 100644 index 000000000000..83e176d8e93f --- /dev/null +++ b/deskutils/py-paperless/files/patch-src_documents_signals_____init____.py @@ -0,0 +1,11 @@ +--- 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_paperless_urls.py b/deskutils/py-paperless/files/patch-src_paperless_urls.py new file mode 100644 index 000000000000..d1d2d6e63c25 --- /dev/null +++ b/deskutils/py-paperless/files/patch-src_paperless_urls.py @@ -0,0 +1,50 @@ +--- 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/(?Pdoc|thumb)/(?P\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/pkg-plist b/deskutils/py-paperless/pkg-plist index 6737bbc35151..02a7669d0e3e 100644 --- a/deskutils/py-paperless/pkg-plist +++ b/deskutils/py-paperless/pkg-plist @@ -326,11 +326,11 @@ bin/paperless %%PYTHON_SITELIBDIR%%/paperless/reminders/views.py %%PYTHON_SITELIBDIR%%/paperless/setup.cfg %%PYTHON_SITELIBDIR%%/paperless/tox.ini -share/man/man7/paperless.7.gz %%PORTEXAMPLES%%%%EXAMPLESDIR%%/README %%PORTEXAMPLES%%%%EXAMPLESDIR%%/nginx.conf %%PORTEXAMPLES%%%%EXAMPLESDIR%%/sshd_config %%PORTEXAMPLES%%%%EXAMPLESDIR%%/uwsgi.ini +share/man/man7/paperless.7.gz %%DATADIR%%/logo/print/eps/Black logo - no background.eps %%DATADIR%%/logo/print/eps/Color logo - no background.eps %%DATADIR%%/logo/print/eps/Color logo with background.eps @@ -351,8 +351,8 @@ share/man/man7/paperless.7.gz %%WWWDIR%%/static/admin/css/autocomplete.css %%WWWDIR%%/static/admin/css/base.css %%WWWDIR%%/static/admin/css/changelists.css +%%WWWDIR%%/static/admin/css/dark_mode.css %%WWWDIR%%/static/admin/css/dashboard.css -%%WWWDIR%%/static/admin/css/fonts.css %%WWWDIR%%/static/admin/css/forms.css %%WWWDIR%%/static/admin/css/login.css %%WWWDIR%%/static/admin/css/nav_sidebar.css @@ -363,11 +363,6 @@ share/man/man7/paperless.7.gz %%WWWDIR%%/static/admin/css/vendor/select2/select2.css %%WWWDIR%%/static/admin/css/vendor/select2/select2.min.css %%WWWDIR%%/static/admin/css/widgets.css -%%WWWDIR%%/static/admin/fonts/LICENSE.txt -%%WWWDIR%%/static/admin/fonts/README.txt -%%WWWDIR%%/static/admin/fonts/Roboto-Bold-webfont.woff -%%WWWDIR%%/static/admin/fonts/Roboto-Light-webfont.woff -%%WWWDIR%%/static/admin/fonts/Roboto-Regular-webfont.woff %%WWWDIR%%/static/admin/img/LICENSE %%WWWDIR%%/static/admin/img/README.txt %%WWWDIR%%/static/admin/img/calendar-icons.svg @@ -401,12 +396,14 @@ share/man/man7/paperless.7.gz %%WWWDIR%%/static/admin/js/change_form.js %%WWWDIR%%/static/admin/js/collapse.js %%WWWDIR%%/static/admin/js/core.js +%%WWWDIR%%/static/admin/js/filters.js %%WWWDIR%%/static/admin/js/inlines.js %%WWWDIR%%/static/admin/js/jquery.init.js %%WWWDIR%%/static/admin/js/nav_sidebar.js %%WWWDIR%%/static/admin/js/popup_response.js %%WWWDIR%%/static/admin/js/prepopulate.js %%WWWDIR%%/static/admin/js/prepopulate_init.js +%%WWWDIR%%/static/admin/js/theme.js %%WWWDIR%%/static/admin/js/urlify.js %%WWWDIR%%/static/admin/js/vendor/jquery/LICENSE.txt %%WWWDIR%%/static/admin/js/vendor/jquery/jquery.js