user/paperless-ngx: upgrade to 1.15.1
This commit is contained in:
parent
8389167575
commit
12523ac1eb
6 changed files with 109 additions and 7 deletions
|
@ -2,7 +2,7 @@
|
|||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
pkgname=paperless-ngx
|
||||
pkgver=1.13.0
|
||||
pkgver=1.15.1
|
||||
pkgrel=0
|
||||
pkgdesc="A community-supported supercharged version of paperless: scan, index and archive all your physical documents"
|
||||
url="https://github.com/paperless-ngx/paperless-ngx"
|
||||
|
@ -10,10 +10,10 @@ license="GPL-3.0-only"
|
|||
# s390x: ocrmypdf py3-joblib py3-scikit-learn py3-watchfiles
|
||||
# armhf / ppc64le: py3-uvloop
|
||||
arch="!armv7 noarch !s390x !armhf !ppc64le"
|
||||
install="$pkgname.post-install $pkgname.post-upgrade $pkgname.pre-install"
|
||||
depends="
|
||||
file
|
||||
gnupg
|
||||
py3-gunicorn
|
||||
imagemagick
|
||||
mailcap
|
||||
ocrmypdf
|
||||
|
@ -34,8 +34,13 @@ depends="
|
|||
py3-automat
|
||||
py3-blessed
|
||||
py3-certifi
|
||||
py3-celery
|
||||
py3-django-channels
|
||||
py3-django-channels-redis
|
||||
py3-django-compression-middleware
|
||||
py3-django-celery-results
|
||||
py3-django-guardian
|
||||
py3-django-rest-framework-guardian
|
||||
py3-chardet
|
||||
py3-charset-normalizer
|
||||
py3-click
|
||||
|
@ -43,7 +48,7 @@ depends="
|
|||
py3-constantly
|
||||
py3-cryptography
|
||||
py3-daphne
|
||||
py3-dateparser py3-django
|
||||
py3-dateparser
|
||||
py3-deprecation
|
||||
py3-django-cors-headers
|
||||
py3-django-extensions
|
||||
|
@ -53,6 +58,7 @@ depends="
|
|||
py3-django-rest-framework
|
||||
py3-filelock
|
||||
py3-fuzzywuzzy
|
||||
py3-gunicorn
|
||||
py3-h11
|
||||
py3-hiredis
|
||||
py3-httptools
|
||||
|
@ -63,6 +69,7 @@ depends="
|
|||
py3-incremental
|
||||
py3-inotify-simple
|
||||
py3-inotifyrecursive
|
||||
py3-ipware
|
||||
py3-joblib
|
||||
py3-langdetect
|
||||
py3-lxml
|
||||
|
@ -108,6 +115,7 @@ depends="
|
|||
py3-whoosh
|
||||
py3-yaml
|
||||
py3-zope-interface
|
||||
py3-zstandard
|
||||
postgresql
|
||||
jbig2enc
|
||||
"
|
||||
|
@ -118,6 +126,7 @@ source="
|
|||
paperless-scheduler.openrc
|
||||
paperless-consumer.openrc
|
||||
paperless-webserver.openrc
|
||||
paperless-task-queue.openrc
|
||||
paperless.conf
|
||||
"
|
||||
options="!strip !check" # No testsuite
|
||||
|
@ -163,11 +172,14 @@ package() {
|
|||
install -Dm 755 "$srcdir"/paperless-scheduler.openrc "$pkgdir"/etc/init.d/paperless-scheduler
|
||||
install -Dm 755 "$srcdir"/paperless-consumer.openrc "$pkgdir"/etc/init.d/paperless-consumer
|
||||
install -Dm 755 "$srcdir"/paperless-webserver.openrc "$pkgdir"/etc/init.d/paperless-webserver
|
||||
install -Dm 755 "$srcdir"/paperless-task-queue.openrc "$pkgdir"/etc/init.d/paperless-task-queue
|
||||
|
||||
}
|
||||
sha512sums="
|
||||
e26b9006a8e4c3b192dbeb138582d2f16810905e1ef37e4e9f6526ad311d136aebe6577dbe675298ce3d5493e025087697f686556d5936d0ed5ba700402d3632 paperless-ngx-v1.13.0.tar.xz
|
||||
a62a499c1d8fede5685e98f639c1155fdc7387eaf7908b04317a9af6594427d11416730f4dd127cf2e249ac97242634acf900fe32541edfe95ac9298eeea0cd6 paperless-scheduler.openrc
|
||||
aefa72e0ea5d96209c5089bec452bd7158b478954ebdb219db0379259f4b12540c02a7ae20cb998b49910c579de34be3c9b7351378b87a6f42d07f2884892200 paperless-ngx-v1.15.1.tar.xz
|
||||
b782dd9479d31d2f6a82e86639bb5e2bb3675c1ffc1d6b08e027e10159dd58ed9f68b5986b9d7c8a326e95384e701bcf9834101d6a6720db7e97465e4d295d36 paperless-scheduler.openrc
|
||||
b4413f48b481d53b3e10542f5ffe830928c40ae016e2dc1da533ae8b546c5b6e4ddfa1129280807f866002f61b283c4eba327be6eb04171e259fe27fec47696a paperless-consumer.openrc
|
||||
e9c517f7fbae269072506316711a12a6ba5568456348305972caf023020de5ebeab45401371fe114fe8dbddfacbcc6cfd01d0fad2b2ade6ee3883f46120b904e paperless-webserver.openrc
|
||||
fb51af7c4765121f7e97add4da31352e02c3888ffe5575b26c11d6dd043e0d9e7504e9ed35ccc81e3751a41ffb6fcf6dcddd22da9df25021d903494c7340105b paperless-task-queue.openrc
|
||||
8dd13bf9d63ca838285978e9dc1635dc45d21ae0cbb3f1ce402097f566cc1f74bce6635f1324714aacf85c6a20bc61bab76deb04081813ac207fffd421f8ee8f paperless.conf
|
||||
"
|
||||
|
|
36
user/paperless-ngx/paperless-ngx.post-install
Executable file
36
user/paperless-ngx/paperless-ngx.post-install
Executable file
|
@ -0,0 +1,36 @@
|
|||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
group=paperless
|
||||
config_file='/etc/paperless.conf'
|
||||
|
||||
#setcap 'cap_net_bind_service=+ep' /usr/share/webapps/authentik/server
|
||||
|
||||
if [ "${0##*.}" = 'post-upgrade' ]; then
|
||||
cat >&2 <<-EOF
|
||||
*
|
||||
* To finish Paperless upgrade run:
|
||||
*
|
||||
* sudo -Hu paperless python3 manage.py migrate in /usr/share/webapps/paperless/src
|
||||
*
|
||||
EOF
|
||||
else
|
||||
cat >&2 <<-EOF
|
||||
*
|
||||
* 1. Adjust settings in $config_file
|
||||
*
|
||||
* 2. Create database for Paperless:
|
||||
*
|
||||
* psql -c "CREATE ROLE paperless PASSWORD 'top-secret' INHERIT LOGIN;"
|
||||
* psql -c "CREATE DATABASE paperless OWNER paperless ENCODING 'UTF-8';"
|
||||
*
|
||||
* 3. Run:
|
||||
*
|
||||
* sudo -Hu paperless python3 manage.py migrate in /usr/share/webapps/paperless/src
|
||||
*
|
||||
* 4. Setup admin user via:
|
||||
*
|
||||
* sudo -Hu paperless python3 manage.py createsuperuser in /usr/share/webapps/paperless/src
|
||||
*
|
||||
EOF
|
||||
fi
|
1
user/paperless-ngx/paperless-ngx.post-upgrade
Symbolic link
1
user/paperless-ngx/paperless-ngx.post-upgrade
Symbolic link
|
@ -0,0 +1 @@
|
|||
paperless-ngx.post-install
|
26
user/paperless-ngx/paperless-ngx.pre-install
Executable file
26
user/paperless-ngx/paperless-ngx.pre-install
Executable file
|
@ -0,0 +1,26 @@
|
|||
#!/bin/sh
|
||||
# It's very important to set user/group correctly.
|
||||
|
||||
paperless_dir='/var/lib/paperless'
|
||||
|
||||
if ! getent group paperless 1>/dev/null; then
|
||||
echo '* Creating group paperless' 1>&2
|
||||
|
||||
addgroup -S paperless
|
||||
fi
|
||||
|
||||
if ! id paperless 2>/dev/null 1>&2; then
|
||||
echo '* Creating user paperless' 1>&2
|
||||
|
||||
adduser -DHS -G paperless -h "$paperless_dir" -s /bin/sh \
|
||||
-g "added by apk for paperless" paperless
|
||||
passwd -u paperless 1>/dev/null # unlock
|
||||
fi
|
||||
|
||||
if ! id -Gn paperless | grep -Fq paperless; then
|
||||
echo '* Adding user paperless to group redis' 1>&2
|
||||
|
||||
addgroup paperless redis
|
||||
fi
|
||||
|
||||
exit 0
|
|
@ -3,10 +3,11 @@
|
|||
name="$RC_SVCNAME"
|
||||
cfgfile="/etc/conf.d/$RC_SVCNAME.conf"
|
||||
pidfile="/var/run/$RC_SVCNAME.pid"
|
||||
command="/usr/share/webapps/paperless/src/manage.py"
|
||||
command_args="qcluster"
|
||||
command="celery"
|
||||
command_args="--app paperless beat --loglevel INFO"
|
||||
command_user="paperless"
|
||||
command_group="paperless"
|
||||
working_directory="/usr/share/webapps/paperless/src"
|
||||
start_stop_daemon_args=""
|
||||
command_background="yes"
|
||||
output_log="/var/log/paperless/$RC_SVCNAME.log"
|
||||
|
@ -17,6 +18,7 @@ depend() {
|
|||
}
|
||||
|
||||
start_pre() {
|
||||
cd "$working_directory"
|
||||
checkpath --directory --owner $command_user:$command_group --mode 0775 \
|
||||
/var/log/paperless \
|
||||
/var/lib/paperless
|
||||
|
|
25
user/paperless-ngx/paperless-task-queue.openrc
Normal file
25
user/paperless-ngx/paperless-task-queue.openrc
Normal file
|
@ -0,0 +1,25 @@
|
|||
#!/sbin/openrc-run
|
||||
|
||||
name="$RC_SVCNAME"
|
||||
cfgfile="/etc/conf.d/$RC_SVCNAME.conf"
|
||||
pidfile="/var/run/$RC_SVCNAME.pid"
|
||||
command="celery"
|
||||
command_args="--app paperless worker --loglevel INFO"
|
||||
command_user="paperless"
|
||||
command_group="paperless"
|
||||
working_directory="/usr/share/webapps/paperless/src"
|
||||
start_stop_daemon_args=""
|
||||
command_background="yes"
|
||||
output_log="/var/log/paperless/$RC_SVCNAME.log"
|
||||
error_log="/var/log/paperless/$RC_SVCNAME.err"
|
||||
|
||||
depend() {
|
||||
need redis
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
cd "$working_directory"
|
||||
checkpath --directory --owner $command_user:$command_group --mode 0775 \
|
||||
/var/log/paperless \
|
||||
/var/lib/paperless
|
||||
}
|
Loading…
Reference in a new issue