1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/kresus_ynh.git synced 2024-09-03 19:36:10 +02:00

Upgrade Kresus to 0.17.2

This commit is contained in:
nicofrand 2021-04-19 17:53:19 +02:00 committed by Nicolas Frandeboeuf
parent 5fa1972f44
commit 8527c5d0a9
6 changed files with 124 additions and 83 deletions

View file

@ -1,6 +1,6 @@
# Kresus for YunoHost # Kresus for YunoHost
[![Integration level](https://dash.yunohost.org/integration/kresus.svg)](https://dash.yunohost.org/appci/app/kresus) ![](https://ci-apps.yunohost.org/ci/badges/kresus.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/kresus.maintain.svg) [![Integration level](https://dash.yunohost.org/integration/kresus.svg)](https://dash.yunohost.org/appci/app/kresus) ![](https://ci-apps.yunohost.org/ci/badges/kresus.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/kresus.maintain.svg)
[![Install Kresus with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=kresus) [![Install Kresus with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=kresus)
> *This package allows you to install Kresus quickly and simply on a YunoHost server. > *This package allows you to install Kresus quickly and simply on a YunoHost server.
@ -10,7 +10,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to
Kresus is an open-source libre self-hosted personal finance manager. It allows you to safely track your banking history, check your overall balance and know exactly how you are spending money using categories! Kresus is an open-source libre self-hosted personal finance manager. It allows you to safely track your banking history, check your overall balance and know exactly how you are spending money using categories!
**Shipped version:** 0.16.0 **Shipped version:** 0.17.2
## Screenshots ## Screenshots
@ -61,7 +61,7 @@ Kresus is an open-source libre self-hosted personal finance manager. It allows y
* Report a bug about Kresus itself: https://framagit.org/kresusapp/kresus * Report a bug about Kresus itself: https://framagit.org/kresusapp/kresus
* Kresus website: https://kresus.org * Kresus website: https://kresus.org
* YunoHost website: https://yunohost.org * YunoHost website: https://yunohost.org
--- ---
## Developer info ## Developer info

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://framagit.org/kresusapp/kresus/-/archive/0.16.0/kresus-0.16.0.tar.bz2 SOURCE_URL=https://framagit.org/kresusapp/kresus/-/archive/0.17.2/kresus-0.17.2.tar.bz2
SOURCE_SUM=cf1757f317f1cc3cb659af0a76ed5ff2e0b00b9af19e7e30bec6518466ab6e97 SOURCE_SUM=57f6405358221e322b96df61259abb10cece91ba7e8ee3c27677fb37e08d946c
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.bz2 SOURCE_FORMAT=tar.bz2
SOURCE_IN_SUBDIR=true SOURCE_IN_SUBDIR=true

View file

@ -1,5 +1,7 @@
; Hi there! This is the configuration file for Kresus. Please make sure to ; Hi there! This is the configuration file for
; read all the options before setting up Kresus for the first time. ; Kresus. Please make sure to read all the options before setting up
; Kresus for the first time.
;
[kresus] [kresus]
; This is where Kresus stores additional data, as the latest bank scrapping ; This is where Kresus stores additional data, as the latest bank scrapping
@ -11,27 +13,31 @@
; dataDir=/home/ben/.kresus ; dataDir=/home/ben/.kresus
datadir=__FINALPATH__/data/ datadir=__FINALPATH__/data/
; The host on which the Kresus server will listen to. ; A user id obtained from using the "kresus create-user" command.
; Can be removed; defaults to "127.0.0.1". ; This allows sharing a single database with several users. If your
; Overridden by the HOST environment variable, if it's set. ; instance is only planned to host a single user, you can keep it
host=127.0.0.1 ; disabled, and Kresus will know how to automatically generate a new
; user.
; Overriden by the KRESUS_USER_ID environment variable, if it's set.
; Example:
; userid=1
userid=
; This is the port that Kresus will run on. It is recommended not to ; This is the port that Kresus will run on. It is recommended not
; expose it on port 80 directly but to use a reverse-proxy configuration ; to expose it on port 80 directly but to use a reverse-proxy
; like Nginx, Caddy or Apache. ; configuration like Nginx, Caddy or Apache.
; Can be removed; defaults to 9876. ; Can be removed; defaults to 9876.
; Overridden by the PORT environment variable, if it's set. ; Overriden by the PORT environment variable, if it's set.
; Example:
; port=9876
port=__PORT__ port=__PORT__
; The directory prefix in the URL, if Kresus is to be served from a ; The host on which the Kresus server will listen to.
; subdirectory. For instance, if your website is hosted at example.com and ; Can be removed; defaults to 127.0.0.1.
; the url prefix is "money", then Kresus will be reachable at ; Overriden by the HOST environment variable, if it's set.
; example.com/money.
; Can be removed; defaults to "", i.e. Kresus has its own (sub)domain.
; Overridden by the KRESUS_URL_PREFIX environment variable, if it's set.
; Example: ; Example:
; url_prefix=/money ; host=127.0.0.1
url_prefix=__PATH__ host=127.0.0.1
; The executable version of Python that is going to get used when interacting ; The executable version of Python that is going to get used when interacting
; with Python scripts. This can be python, python2 or python3. ; with Python scripts. This can be python, python2 or python3.
@ -41,6 +47,17 @@ url_prefix=__PATH__
; python_exec=python3 ; python_exec=python3
python_exec=__FINALPATH__/venv/bin/python python_exec=__FINALPATH__/venv/bin/python
; The directory prefix in the URL, if Kresus is to be served from a
; subdirectory. For instance, if your website is hosted at example.com
; and the url prefix is "money", then Kresus will be reachable at
; example.com/money. By default, it's '', meaning that Kresus has its own
; subdomain.
; Can be removed; defaults to "".
; Overriden by the KRESUS_URL_PREFIX environment variable, if it's set.
; Example:
; url_prefix=/money
url_prefix=__PATH__
; A salt value used in encryption algorithms (used for instance to ; A salt value used in encryption algorithms (used for instance to
; encrypt/decrypt exports). It should be a random string value with ; encrypt/decrypt exports). It should be a random string value with
; at least 16 characters if you decide to provide it. ; at least 16 characters if you decide to provide it.
@ -69,33 +86,38 @@ force_demo_mode=
; auth=foo:bar ; auth=foo:bar
auth= auth=
[weboob] [woob]
; The directory in which Weboob core is stored.
; Can be removed; defaults to "", indicating that weboob is already in the ; The directory in which Woob core is stored. If empty, indicates
; PYTHON_PATH (e.g. installed at the global level). ; that woob is already in the PYTHON_PATH (e.g. installed at the global
; Overridden by the KRESUS_WEBOOB_DIR environment variable, if it's set. ; level)
; Overriden by the KRESUS_WOOB_DIR environment variable, if it's set.
; Example: ; Example:
; srcdir=/home/ben/code/weboob ; srcdir=/home/ben/code/woob
srcdir= srcdir=
; Path to a file containing a valid Weboob's source list directory. ; Path to a file containing a valid Woob's source list directory.
; Can be removed; defaults to "", indicating that Kresus will generate its own ; If empty (the default), indicates that Kresus will generate its own
; source list file and will store it in ${datadir}/weboob-data/sources.list. ; source list file and will store it in
; Overridden by the KRESUS_WEBOOB_SOURCES_LIST environment variable, if it's ; KRESUS_DIR/woob-data/sources.list.
; set. ; Overriden by the KRESUS_WOOB_SOURCES_LIST environment variable, if it's set.
; Example: ; Example:
; sources_list/home/ben/code/weboob/sources.list ; sources_list=/home/ben/code/woob/sources.list
sources_list= sources_list=
[email] [email]
; The transport method you want to use. Can be either: ; The transport method you want to use. Can be either:
; * "sendmail": relies on sendmail executable to be available on your system ; * "sendmail": relies on sendmail executable to be available on your
; and only sendmail-specific parameters are used, ; system and only sendmail-specific parameters are used,
; * "smtp": you should provide proper SMTP credentials to use, in the dedicated
; configuration entries.
; ;
; Can be removed; defaults to "", which means no emails will be sent. ; * "smtp": you should provide proper SMTP credentials to use, in the
; Overridden by the KRESUS_EMAIL_TRANSPORT environment variable, if it's set. ; dedicated configuration entries.
;
; If empty, no emails will be sent by Kresus.
; Overriden by the KRESUS_EMAIL_TRANSPORT environment variable, if it's set.
; Example:
; transport=smtp
transport=sendmail transport=sendmail
; The path to the sendmail executable to use. ; The path to the sendmail executable to use.
@ -105,44 +127,55 @@ transport=sendmail
; set. ; set.
sendmail_bin= sendmail_bin=
; The email address from which email alerts will be sent. Make sure that ; The email address from which email alerts will be sent. Make sure
; your domain DNS is correctly configured and that you've done what's ; that your domain DNS is correctly configured and that you've done
; needed to prevent email alerts from landing in the spam folder. ; what's needed to prevent email alerts from landing in the spam folder.
; Can be removed; defaults to "", which means no email will be sent. ; Overriden by the KRESUS_EMAIL_FROM environment variable, if it's set.
; Overridden by the KRESUS_EMAIL_FROM environment variable, if it's set. ; Example:
; from=kresus@domain.tld
from=__APP__@__DOMAIN__ from=__APP__@__DOMAIN__
; The network address (ipv4, ipv6 or FQDN) of the SMTP server. ; The network address (ipv4, ipv6 or FQDN) of the SMTP server.
; Can be removed; defaults to "", which means no email will be sent. ; Overriden by the KRESUS_EMAIL_HOST environment variable, if it's set.
; Overridden by the KRESUS_EMAIL_HOST environment variable, if it's set. ; Example:
; host=mail.domain.tld
host=127.0.0.1 host=127.0.0.1
; The port to which the SMTP server listens. Default values tend to be ; The port to which the SMTP server listens. Default values tend to
; 25 (server to server), or 587 (clients to server), or 465 (nonstandard). ; be: 25 (server to server), or 587 (clients to server), or 465
; Can be removed; defaults to "", which means no email will be sent. ; (nonstandard).
; Overridden by the KRESUS_EMAIL_PORT environment variable, if it's set. ; Overriden by the KRESUS_EMAIL_PORT environment variable, if it's set.
; Example:
; port=465
port=465 port=465
; The username used during authentication to the SMTP server. ; The username used during authentication to the SMTP server. If
; Can be removed; defaults to "", which means an anonymous connection. ; empty, indicates an anonymous connection will be used.
; Overridden by the KRESUS_EMAIL_USER environment variable, if it's set. ; Overriden by the KRESUS_EMAIL_USER environment variable, if it's set.
; Example:
; user=login
user= user=
; The password used during authentication to the SMTP server. ; The password used during authentication to the SMTP server. If
; Can be removed; defaults to "", which means no password. ; empty, indicates no password will be used.
; Overridden by the KRESUS_EMAIL_PASSWORD environment variable, if it's set. ; Overriden by the KRESUS_EMAIL_PASSWORD environment variable, if it's set.
; Example:
; password=hunter2
password= password=
; If set to true, will force using a TLS connection. By default, emails ; If set to true, will force using a TLS connection. By default,
; are sent with STARTTLS, i.e. using TLS if available. ; emails are sent with STARTTLS, i.e. using TLS if available.
; Can be removed; defaults to false. ; Can be removed; defaults to false.
; Overridden by the KRESUS_EMAIL_FORCE_TLS environment variable, if it's set. ; Overriden by the KRESUS_EMAIL_FORCE_TLS environment variable, if it's set.
; Example:
; force_tls=false
force_tls=false force_tls=false
; If set to false, will allow self-signed TLS certificates. ; If set to false, will allow self-signed TLS certificates.
; Can be removed; defaults to true. ; Can be removed; defaults to true.
; Overridden by the KRESUS_EMAIL_REJECT_UNAUTHORIZED_TLS environment ; Overriden by the KRESUS_EMAIL_REJECT_UNAUTHORIZED_TLS environment variable, if it's set.
; variable, if it's set. ; Example:
; reject_unauthorized_tls=true
reject_unauthorized_tls=true reject_unauthorized_tls=true
[notifications] [notifications]
@ -156,12 +189,13 @@ reject_unauthorized_tls=true
; appriseApiBaseUrl=http://localhost:8000/ ; appriseApiBaseUrl=http://localhost:8000/
appriseApiBaseUrl= appriseApiBaseUrl=
[logs] [logs]
; The path to the log file to use.
; Can be removed; defaults to kresus.log in kresus' datadir. ; The path to the log file to use. If empty, defaults to kresus.log
; Overridden by the KRESUS_LOG_FILE environment variable, if it's set. ; in datadir.
; Logs will still be written to stdout. ; Overriden by the KRESUS_LOG_FILE environment variable, if it's set.
; Example:
; log_file=/var/log/kresus.log
log_file= log_file=
[db] [db]
@ -197,16 +231,23 @@ log=
; sqlite_path=/tmp/dev.sqlite ; sqlite_path=/tmp/dev.sqlite
sqlite_path= sqlite_path=
; Host address of the database server. Required for postgres. ; Path to a directory containing a Unix socket to connect to the
; database, or host address of the database server. Required for postgres.
;
; If using a Unix socket, the socket file's name will be inferred from the
; standard postgres name and the port number.
; Can be removed; defaults to localhost for postgres.
; Overriden by the KRESUS_DB_HOST environment variable, if it's set. ; Overriden by the KRESUS_DB_HOST environment variable, if it's set.
; Example: ; Example:
; host=localhost ; host=localhost
host=localhost host=localhost
; Port of the database server. Required for postgres. ; Port of the database server. Required for postgres, even when
; using a Unix socket (the port is used to compute the socket's file name).
; Can be removed; defaults to 5432 for postgres.
; Overriden by the KRESUS_DB_PORT environment variable, if it's set. ; Overriden by the KRESUS_DB_PORT environment variable, if it's set.
; Example: ; Example:
; port=5432 # postgres ; port=5432
port=5432 port=5432
; Username to connect to the database server. Required for postgres. ; Username to connect to the database server. Required for postgres.

View file

@ -21,7 +21,7 @@
"requirements": { "requirements": {
"yunohost": ">= 3.8.1" "yunohost": ">= 3.8.1"
}, },
"version": "0.16.0~ynh5", "version": "0.17.2~ynh1",
"multi_instance": true, "multi_instance": true,
"services": [ "services": [
"nginx" "nginx"

View file

@ -108,9 +108,9 @@ ynh_script_progression --message="Installing nodejs"
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
#================================================= #=================================================
# Install weboob with pip # Install woob with pip
#================================================= #=================================================
ynh_script_progression --message="Installing weboob" ynh_script_progression --message="Installing woob"
virtualenv --python=python3 --system-site-packages "${final_path}/venv" virtualenv --python=python3 --system-site-packages "${final_path}/venv"
( (
@ -119,7 +119,7 @@ virtualenv --python=python3 --system-site-packages "${final_path}/venv"
set -o nounset set -o nounset
pip install --upgrade pip pip install --upgrade pip
pip install weboob html2text simplejson BeautifulSoup4 PyExecJS pdfminer.six --ignore-installed pip install woob html2text simplejson BeautifulSoup4 PyExecJS pdfminer.six --ignore-installed
) )
#================================================= #=================================================

View file

@ -134,9 +134,9 @@ ynh_script_progression --message="Installing nodejs"
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
#================================================= #=================================================
# Install weboob with pip # Install woob with pip
#================================================= #=================================================
ynh_script_progression --message="Installing weboob" ynh_script_progression --message="Installing woob"
ynh_secure_remove --file="${final_path}/venv" ynh_secure_remove --file="${final_path}/venv"
virtualenv --python=python3 --system-site-packages "${final_path}/venv" virtualenv --python=python3 --system-site-packages "${final_path}/venv"
@ -146,7 +146,7 @@ virtualenv --python=python3 --system-site-packages "${final_path}/venv"
set -o nounset set -o nounset
pip install --upgrade pip pip install --upgrade pip
pip install weboob html2text simplejson BeautifulSoup4 PyExecJS pdfminer.six --ignore-installed pip install woob html2text simplejson BeautifulSoup4 PyExecJS pdfminer.six --ignore-installed
) )
#================================================= #=================================================
@ -215,18 +215,18 @@ chmod -R 750 "$final_path/data/"
chown $app "$final_path/config.ini" chown $app "$final_path/config.ini"
chmod 600 "$final_path/config.ini" chmod 600 "$final_path/config.ini"
if [ -f "$final_path/data/weboob-data/backends" ] if [ -f "$final_path/data/woob-data/backends" ]
then then
chmod 600 "$final_path/data/weboob-data/backends" chmod 600 "$final_path/data/woob-data/backends"
fi fi
#================================================= #=================================================
# START SYSTEMD SERVICE # RESTART SYSTEMD SERVICE
#================================================= #=================================================
ynh_script_progression --message="Starting a systemd service..." ynh_script_progression --message="Restarting a systemd service..."
# Start a systemd service # Start a systemd service
ynh_systemd_action --service_name=$app --action="start" ynh_systemd_action --service_name=$app --action="restart"
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX