diff --git a/README.md b/README.md index 90f4d80..d44239c 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,27 @@ -WARNING: this package has not been tested. Use it at your own risks, for testing purposes and not on a daily used server. - - # Kresus for YunoHost 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 on what you are spending money with the use of tags! -It has started as a fork of cozy-pfm but is way different now. -It was continued following this https://framagit.org/bnjbvr/kresus/issues/515 +**Shipped version:** 0.13.2 -**More information on the documentation page:** -https://framagit.org/bnjbvr/kresus -https://kresus.org -https://yunohost.org/ +# State of this package + +* works fine: + + * [x] install/remove/backup/remove/upgrade with x86_64 + +* to be confirmed + * [x] ARM support + +* to be added: + * [ ] Email support + * [ ] Restrict more file access ($app is owner of everything, we should limit it more) + * [ ] Add user who will access the app (by default every one has access to the installed app) + * [ ] Email admin about installation with ynh_send_readme_to_admin helper + +## Links + + * Report a bug about this package: https://github.com/YunoHost-Apps/kresus_ynh + * Report a bug about Kresus itself: https://framagit.org/kresusapp/kresus + * Kresus website: https://kresus.org + * YunoHost website: https://yunohost.org/ diff --git a/check_process b/check_process index fea2e73..283091a 100644 --- a/check_process +++ b/check_process @@ -15,7 +15,6 @@ setup_private=1 setup_public=0 upgrade=1 - upgrade=1 from_commit=c1345759860b9886b51a406366d1fcc090f05012 backup_restore=1 multi_instance=1 incorrect_path=1 @@ -36,8 +35,4 @@ Level 10=0 ;;; Options Email=jean-baptiste@holcroft.fr -Notification=all -;;; Upgrade options - ; commit=c1345759860b9886b51a406366d1fcc090f05012 - name=Upgrade from old package version -manifest_arg=domain=DOMAIN&path=PATH +Notification=all \ No newline at end of file diff --git a/conf/config.ini b/conf/config.ini index 9700243..85595f3 100644 --- a/conf/config.ini +++ b/conf/config.ini @@ -39,7 +39,7 @@ url_prefix=__PATH__ ; Overridden by the KRESUS_PYTHON_EXEC environment variable, if it's set. ; Example: ; python_exec=python3 -python_exec= +python_exec=__FINALPATH__/venv/bin/python [weboob] ; The directory in which Weboob core is stored. @@ -48,7 +48,7 @@ python_exec= ; Overridden by the KRESUS_WEBOOB_DIR environment variable, if it's set. ; Example: ; srcdir=/home/ben/code/weboob -srcdir=__FINALPATH__/venv/bin/ +srcdir= ; Path to a file containing a valid Weboob's source list directory. ; Can be removed; defaults to "", indicating that Kresus will generate its own diff --git a/conf/nginx.conf b/conf/nginx.conf index 521a8f2..d3ae0b8 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,4 +1,5 @@ -location __PATH__ { +#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; +location __PATH__/ { proxy_pass http://127.0.0.1:__PORT__; proxy_set_header Host $host; proxy_redirect off; diff --git a/manifest.json b/manifest.json index 1771056..8944e6c 100644 --- a/manifest.json +++ b/manifest.json @@ -6,16 +6,16 @@ "en": "Kresus is a personal finance manager.", "fr": "Kresus est un outil personnel de gestion de finances." }, - "url": "https://framagit.org/bnjbvr/kresus", + "url": "https://framagit.org/kresusapp/kresus", "license": "AGPL-3.0-only", "maintainer": { - "name": "Scith", - "url": "https://github.com/scith" + "name": "Jean-Baptiste Holcroft", + "email": "jean-baptiste@holcroft.fr" }, "requirements": { - "yunohost": ">= 2.7.10" + "yunohost": ">= 2.7.14" }, - "version": "0.13.2-2", + "version": "0.13.2~ynh2", "multi_instance": true, "services": [ "nginx" diff --git a/scripts/install b/scripts/install index efd888f..204de79 100644 --- a/scripts/install +++ b/scripts/install @@ -76,6 +76,12 @@ mkdir "$final_path/data" # Create a dedicated nginx config ynh_add_nginx_config +if [ "$path_url" != "/" ] +then + ynh_replace_string "^#sub_path_only" "" "/etc/nginx/conf.d/$domain.d/$app.conf" +fi +ynh_store_file_checksum "/etc/nginx/conf.d/$domain.d/$app.conf" + #================================================= # CREATE DEDICATED USER #================================================= @@ -103,7 +109,7 @@ virtualenv "${final_path}/venv" set -o nounset pip install --upgrade pip - pip install weboob + pip install weboob html2text simplejson BeautifulSoup PyExecJS ) #================================================= @@ -114,8 +120,7 @@ ynh_use_nodejs ( cd "$final_path" chown -R $app: "$final_path" - npm install --unsafe-perm - npm run build:prod + npm install --production --unsafe-perm ) #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 397d7a2..bc1f861 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -35,7 +35,7 @@ if [ -z $final_path ]; then ynh_app_setting_set $app final_path $final_path fi -if [ -z "/home/ynh$app"]; then +if [ -z "/home/ynh$app" ]; then mv "/home/ynh$app/data" "$final_path/data" ynh_secure_remove "/home/ynh$app" fi @@ -84,6 +84,11 @@ mkdir -p "$final_path/data" # Create a dedicated nginx config ynh_add_nginx_config +if [ "$path_url" != "/" ] +then + ynh_replace_string "^#sub_path_only" "" "/etc/nginx/conf.d/$domain.d/$app.conf" +fi +ynh_store_file_checksum "/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # CREATE DEDICATED USER @@ -113,7 +118,7 @@ virtualenv "${final_path}/venv" set -o nounset pip install --upgrade pip - pip install weboob + pip install weboob html2text simplejson BeautifulSoup PyExecJS ) #================================================= @@ -124,8 +129,7 @@ ynh_use_nodejs ( cd "$final_path" chown -R $app: "$final_path" - npm install --unsafe-perm - npm run build:prod + npm install --production --unsafe-perm ) #=================================================