diff options
Diffstat (limited to 'deskutils/py-paperless')
-rw-r--r-- | deskutils/py-paperless/Makefile | 4 | ||||
-rw-r--r-- | deskutils/py-paperless/files/patch-paperless.conf.example | 9 | ||||
-rw-r--r-- | deskutils/py-paperless/files/patch-src-paperless-settings.py | 11 |
3 files changed, 23 insertions, 1 deletions
diff --git a/deskutils/py-paperless/Makefile b/deskutils/py-paperless/Makefile index ba80ea46b818..0af35814aba7 100644 --- a/deskutils/py-paperless/Makefile +++ b/deskutils/py-paperless/Makefile @@ -2,6 +2,7 @@ PORTNAME= paperless PORTVERSION= 2.7.0 +PORTREVISION= 1 CATEGORIES= deskutils python PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -24,7 +25,8 @@ BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}dateparser>=0.7.1:devel/py-dateparser@${PY ${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}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 \ diff --git a/deskutils/py-paperless/files/patch-paperless.conf.example b/deskutils/py-paperless/files/patch-paperless.conf.example index 1c733c3988a4..9bbf8228ae3b 100644 --- a/deskutils/py-paperless/files/patch-paperless.conf.example +++ b/deskutils/py-paperless/files/patch-paperless.conf.example @@ -27,3 +27,12 @@ # 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! diff --git a/deskutils/py-paperless/files/patch-src-paperless-settings.py b/deskutils/py-paperless/files/patch-src-paperless-settings.py new file mode 100644 index 000000000000..77e7965c0933 --- /dev/null +++ b/deskutils/py-paperless/files/patch-src-paperless-settings.py @@ -0,0 +1,11 @@ +--- src/paperless/settings.py.orig 2019-01-27 13:48:05 UTC ++++ src/paperless/settings.py +@@ -104,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")): |