From 656d6d596059cfeab91ac62acfe742f8c0be6a0f Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 15 Mar 2021 22:17:26 +0100 Subject: [PATCH 01/17] Fix linter --- README.md | 10 ++++------ check_process | 3 --- manifest.json | 18 +++--------------- pull_request_template.md | 4 +--- 4 files changed, 8 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 836ec36..f9eb8e2 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,16 @@ # Cesium package for YunoHost [![Integration level](https://dash.yunohost.org/integration/cesium.svg)](https://dash.yunohost.org/appci/app/cesium) ![](https://ci-apps.yunohost.org/ci/badges/cesium.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/cesium.maintain.svg) -[![Install Cesium with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=cesium) - +[![Install Cesium with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=cesium) > *This package allows you to install Cesium quickly and simply on a YunoHost server. If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* ## Overview [Cesium](https://cesium.app) is an [Unhosted webapp](https://unhosted.org) client for any [Duniter](https://duniter.org) crypto-currency. -It allows you to manage your wallet, certify your friends, and more ! +It allows you to manage your wallet, certify your friends, and more! -**Shipped version:** v1.6.7 +**Shipped version:** 1.6.7 ## YunoHost specific features @@ -29,8 +28,7 @@ It allows you to manage your wallet, certify your friends, and more ! --- -Developer info ----------------- +## Developer info Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/cesium_ynh/tree/testing). diff --git a/check_process b/check_process index a07eca3..46cac3a 100644 --- a/check_process +++ b/check_process @@ -17,9 +17,6 @@ multi_instance=0 port_already_use=0 change_url=1 -;;; Levels - # If the level 5 (Package linter) is forced to 1. Please add justifications here. - Level 5=auto ;;; Options Email= Notification=none diff --git a/manifest.json b/manifest.json index a0ffb24..ef6adc8 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Duniter client to manage wallets, certifications in a libre money.", "fr": "Client Duniter pour gérer ses portes-monnaie, les certifications au sein d’une monnaie libre." }, - "version": "v1.6.7~ynh1", + "version": "1.6.7~ynh2", "url": "https://github.com/duniter/cesium", "license": "AGPL-3.0-or-later", "maintainer": { @@ -15,7 +15,7 @@ "url": "https://moul.re" }, "requirements": { - "yunohost": ">> 3.7.0" + "yunohost": ">> 4.1.7" }, "multi_instance": false, "services": [ @@ -25,30 +25,18 @@ "install" : [ { "name": "domain", - "type": "domain", - "ask": { - "en": "Choose a domain name for Cesium", - "fr": "Choisissez un nom de domaine pour Césium" - }, + "type": "domain", "example": "example.com" }, { "name": "path", "type": "path", - "ask": { - "en": "Choose a path for Cesium", - "fr": "Choisissez un chemin pour Césium" - }, "example": "/cesium", "default": "/cesium" }, { "name": "is_public", "type": "boolean", - "ask": { - "en": "Is it a public application?", - "fr": "Est-ce une application publique ?" - }, "help": { "en": "If it is a public application, there will not have authentification", "fr": "Si l'application est publique, il n'y aura pas d'authentification" diff --git a/pull_request_template.md b/pull_request_template.md index 57c93b6..6c28fc5 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -13,6 +13,4 @@ ## Package_check results --- -*If you have access to [App Continuous Integration for packagers](https://yunohost.org/#/packaging_apps_ci) you can provide a link to the package_check results like below, replacing '-NUM-' in this link by the PR number and USERNAME by your username on the ci-apps-dev. Or you provide a screenshot or a pastebin of the results* - -[![Build Status](https://ci-apps-dev.yunohost.org/jenkins/job/cesium_ynh%20PR-NUM-%20(USERNAME)/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/cesium_ynh%20PR-NUM-%20(USERNAME)/) +* An automatic package_check will be launch at https://ci-apps-dev.yunohost.org/, when you add a specific comment to your Pull Request: "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!"* From 1faffd17f34add66dca4701fc7b45898c7770e0d Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 15 Mar 2021 22:17:42 +0100 Subject: [PATCH 02/17] Update upgrade --- scripts/upgrade | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index eb14649..d5f3fca 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -63,18 +63,6 @@ ynh_clean_setup () { # Exit if an error occurs during the execution of the script ynh_abort_if_errors -#================================================= -# CHECK THE PATH -#================================================= - -# Normalize the URL path syntax -# N.B. : this is for app installations before YunoHost 2.7 -# where this value might be something like /foo/ or foo/ -# instead of /foo .... -# If nobody installed your app before 2.7, then you may -# safely remove this line -path_url=$(ynh_normalize_url_path --path_url=$path_url) - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= From 5b6f020376c1055fa0ddee9962f62535daef5199 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 16 Mar 2021 21:25:15 +0100 Subject: [PATCH 03/17] Fix --- scripts/install | 10 ++-------- scripts/upgrade | 21 +++++++++------------ 2 files changed, 11 insertions(+), 20 deletions(-) diff --git a/scripts/install b/scripts/install index 03e125b..4a575e0 100644 --- a/scripts/install +++ b/scripts/install @@ -47,7 +47,6 @@ ynh_script_progression --message="Storing installation settings..." ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url -ynh_app_setting_set --app=$app --key=is_public --value=$is_public #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -63,11 +62,9 @@ ynh_setup_source --dest_dir="$final_path" #================================================= ynh_script_progression --message="Configuring nginx web server..." -### `ynh_add_nginx_config` will use the file conf/nginx.conf # 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" @@ -86,16 +83,13 @@ chown -R www-data: $final_path #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring SSOwat..." - -# Remove the public access -ynh_app_setting_delete --app=$app --key=skipped_uris +ynh_script_progression --message="Configuring permissions..." # If app is public, add url to SSOWat conf as skipped_uris and read-only mode if [ $is_public -eq 1 ] then # unprotected_uris allows SSO credentials to be passed anyway. - ynh_permission_update --permission "main" --add "visitors" + ynh_permission_update --permission="main" --add="visitors" # activate read-only ynh_replace_string --match_string='"readonly": false,' --replace_string='"readonly": true,' --target_file="$final_path/config.js" fi diff --git a/scripts/upgrade b/scripts/upgrade index d5f3fca..95cf51d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -19,7 +19,6 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) -is_public=$(ynh_app_setting_get --app=$app --key=is_public) final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= @@ -34,21 +33,19 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Ensuring downward compatibility..." -# Fix is_public as a boolean value -if [ "$is_public" = "Yes" ]; then - ynh_app_setting_set --app=$app --key=is_public --value=1 - is_public=1 -elif [ "$is_public" = "No" ]; then - ynh_app_setting_set --app=$app --key=is_public --value=0 - is_public=0 -fi - # If final_path doesn't exist, create it if [ -z "$final_path" ]; then final_path=/var/www/$app ynh_app_setting_set --app=$app --key=final_path --value=$final_path fi +# Cleaning legacy permissions +if ynh_legacy_permissions_exists; then + ynh_legacy_permissions_delete_all + + ynh_app_setting_delete --app=$app --key=is_public +fi + #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= @@ -99,12 +96,12 @@ chown -R www-data: $final_path #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Upgrading SSOwat configuration..." +ynh_script_progression --message="Upgrading configuring permissions..." # If app is public, add url to SSOWat conf as skipped_uris and read-only mode if [[ $is_public -eq 1 ]]; then # unprotected_uris allows SSO credentials to be passed anyway. - ynh_permission_update --permission "main" --add "visitors" + ynh_permission_update --permission="main" --add="visitors" # activate read-only ynh_replace_string --match_string='"readonly": false,' --replace_string='"readonly": true,' --target_file="$final_path/config.js" fi From e3ce0e55f9d448a003e099d5709055e68b51b2cf Mon Sep 17 00:00:00 2001 From: Moul Date: Sun, 28 Mar 2021 16:58:00 +0200 Subject: [PATCH 04/17] [mod] Update Cesium to v1.6.12 --- README.md | 2 +- conf/app.src | 4 ++-- manifest.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 836ec36..fccaad5 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in [Cesium](https://cesium.app) is an [Unhosted webapp](https://unhosted.org) client for any [Duniter](https://duniter.org) crypto-currency. It allows you to manage your wallet, certify your friends, and more ! -**Shipped version:** v1.6.7 +**Shipped version:** v1.6.12 ## YunoHost specific features diff --git a/conf/app.src b/conf/app.src index 8831ae2..cb87e92 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/duniter/cesium/releases/download/v1.6.7/cesium-v1.6.7-web.zip -SOURCE_SUM=99157da53e42096c51ebf845c40c155cb1ed6d66678983c9947b528869b6284f +SOURCE_URL=https://github.com/duniter/cesium/releases/download/v1.6.12/cesium-v1.6.12-web.zip +SOURCE_SUM=8e87a21b5781efb2420645dd2a41ef124d7626a9777142aedc43dcb11fcfa702 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=false diff --git a/manifest.json b/manifest.json index a0ffb24..cf08d29 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Duniter client to manage wallets, certifications in a libre money.", "fr": "Client Duniter pour gérer ses portes-monnaie, les certifications au sein d’une monnaie libre." }, - "version": "v1.6.7~ynh1", + "version": "v1.6.12~ynh1", "url": "https://github.com/duniter/cesium", "license": "AGPL-3.0-or-later", "maintainer": { From 2a9cfa8c333255a751b7f029c63685722e551f2a Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 28 Mar 2021 18:22:10 +0200 Subject: [PATCH 05/17] Fix --- scripts/install | 1 + scripts/upgrade | 1 + 2 files changed, 2 insertions(+) diff --git a/scripts/install b/scripts/install index 4a575e0..f784a56 100644 --- a/scripts/install +++ b/scripts/install @@ -47,6 +47,7 @@ ynh_script_progression --message="Storing installation settings..." ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url +ynh_app_setting_set --app=$app --key=is_public --value=$is_public #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE diff --git a/scripts/upgrade b/scripts/upgrade index 95cf51d..0bdc2a0 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,6 +20,7 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) +is_public=$(ynh_app_setting_get --app=$app --key=is_public) #================================================= # CHECK VERSION From a9249a14dfcf1f6ed77e642e24f187bb0419eeba Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 28 Mar 2021 18:43:58 +0200 Subject: [PATCH 06/17] Add cap --- scripts/change_url | 4 ++-- scripts/install | 4 ++-- scripts/remove | 4 ++-- scripts/restore | 4 ++-- scripts/upgrade | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 48ee001..c0cb620 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -50,7 +50,7 @@ fi #================================================= # MODIFY URL IN NGINX CONF #================================================= -ynh_script_progression --message="Updating nginx web server configuration..." +ynh_script_progression --message="Updating NGINX web server configuration..." nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf @@ -79,7 +79,7 @@ fi #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." +ynh_script_progression --message="Reloading NGINX web server..." ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/install b/scripts/install index f784a56..6e22846 100644 --- a/scripts/install +++ b/scripts/install @@ -61,7 +61,7 @@ ynh_setup_source --dest_dir="$final_path" #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Configuring nginx web server..." +ynh_script_progression --message="Configuring NGINX web server..." # Create a dedicated nginx config ynh_add_nginx_config @@ -98,7 +98,7 @@ fi #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." +ynh_script_progression --message="Reloading NGINX web server..." ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/remove b/scripts/remove index c9e6648..6e5d453 100755 --- a/scripts/remove +++ b/scripts/remove @@ -31,9 +31,9 @@ ynh_secure_remove --file="$final_path" #================================================= # REMOVE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Removing nginx web server configuration..." +ynh_script_progression --message="Removing NGINX web server configuration..." -# Remove the dedicated nginx config +# Remove the dedicated NGINX config ynh_remove_nginx_config #================================================= diff --git a/scripts/restore b/scripts/restore index fbb2c74..28c14fe 100755 --- a/scripts/restore +++ b/scripts/restore @@ -46,7 +46,7 @@ test ! -d $final_path \ #================================================= # RESTORE THE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Restoring the nginx configuration..." +ynh_script_progression --message="Restoring the NGINX configuration..." ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" @@ -70,7 +70,7 @@ chown -R www-data: $final_path #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." +ynh_script_progression --message="Reloading NGINX web server..." ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/upgrade b/scripts/upgrade index 0bdc2a0..e675586 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -76,7 +76,7 @@ fi #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading nginx web server configuration..." +ynh_script_progression --message="Upgrading NGINX web server configuration..." # Create a dedicated nginx config ynh_add_nginx_config @@ -110,7 +110,7 @@ fi #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." +ynh_script_progression --message="Reloading NGINX web server..." ynh_systemd_action --service_name=nginx --action=reload From cf04c027b2ca44f325495749c12b643de460516c Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 12 Nov 2021 11:33:44 +0100 Subject: [PATCH 07/17] Add templates --- .../ISSUE_TEMPLATE.md | 39 ++++++++++++------- .github/PULL_REQUEST_TEMPLATE.md | 16 ++++++++ conf/app.src | 1 - doc/DESCRIPTION.md | 2 + doc/DISCLAIMER.md | 0 manifest.json | 9 ++--- pull_request_template.md | 16 -------- scripts/restore | 2 - 8 files changed, 46 insertions(+), 39 deletions(-) rename issue_template.md => .github/ISSUE_TEMPLATE.md (51%) mode change 100644 => 100755 create mode 100755 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 doc/DESCRIPTION.md create mode 100644 doc/DISCLAIMER.md delete mode 100644 pull_request_template.md diff --git a/issue_template.md b/.github/ISSUE_TEMPLATE.md old mode 100644 new mode 100755 similarity index 51% rename from issue_template.md rename to .github/ISSUE_TEMPLATE.md index 4cdd5f7..2729a6b --- a/issue_template.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,46 +1,55 @@ --- name: Bug report -about: Create a report to help us debug, it would be nice to fill the template as much as you can to help us, help you and help us all. +about: When creating a bug report, please use the following template to provide all the relevant information and help debugging efficiently. --- **How to post a meaningful bug report** 1. *Read this whole template first.* 2. *Determine if you are on the right place:* - - *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change url...), you are on the right place!* - - *Otherwise, the issue may be due to Cesium itself. Refer to its documentation or repository for help.* - - *If you have a doubt, post here, we will figure it out together.* + - *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!* + - *Otherwise, the issue may be due to the app itself. Refer to its documentation or repository for help.* + - *When in doubt, post here and we will figure it out together.* 3. *Delete the italic comments as you write over them below, and remove this guide.* --- -**Describe the bug** +### Describe the bug + *A clear and concise description of what the bug is.* -**Versions** +### Context + - Hardware: *VPS bought online / Old laptop or computer / Raspberry Pi at home / Internet Cube with VPN / Other ARM board / ...* - YunoHost version: x.x.x - I have access to my server: *Through SSH | through the webadmin | direct access via keyboard / screen | ...* -- Are you in a special context or did you perform some particular tweaking on your YunoHost instance ?: *no / yes* +- Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: *no / yes* - If yes, please explain: - Using, or trying to install package version/branch: - If upgrading, current package version: *can be found in the admin, or with `yunohost app info $app_id`* -**To Reproduce** -*Steps to reproduce the behavior.* +### Steps to reproduce + - *If you performed a command from the CLI, the command itself is enough. For example:* ```sh - sudo yunohost app install cesium + sudo yunohost app install the_app ``` - *If you used the webadmin, please perform the equivalent command from the CLI first.* - *If the error occurs in your browser, explain what you did:* 1. *Go to '...'* - 2. *Click on '....'* - 3. *Scroll down to '....'* + 2. *Click on '...'* + 3. *Scroll down to '...'* 4. *See error* -**Expected behavior** +### Expected behavior + *A clear and concise description of what you expected to happen. You can remove this section if the command above is enough to understand your intent.* -**Logs** -*After a failed command, YunoHost makes the log available to you, but also to others, thanks to `yunohost log display [log name] --share`. The actual command, with the correct log name, is displayed at the end of the failed attempt in the CLI. Execute it and copy here the share link it outputs.* +### Logs + +*When an operation fails, YunoHost provides a simple way to share the logs.* +- *In the webadmin, the error message contains a link to the relevant log page. On that page, you will be able to 'Share with Yunopaste'. If you missed it, the logs of previous operations are also available under Tools > Logs.* +- *In command line, the command to share the logs is displayed at the end of the operation and looks like `yunohost log display [log name] --share`. If you missed it, you can find the log ID of a previous operation using `yunohost log list`.* + +*After sharing the log, please copypaste directly the link provided by YunoHost (to help readability, no need to copypaste the entire content of the log here, just the link is enough...)* + *If applicable and useful, add screenshots to help explain your problem.* diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100755 index 0000000..ef70e18 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,16 @@ +## Problem + +- *Description of why you made this PR* + +## Solution + +- *And how do you fix that problem* + +## PR Status + +- [ ] Code finished and ready to be reviewed/tested +- [ ] The fix/enhancement were manually tested (if applicable) + +## Automatic tests + +Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ *after creating the PR*, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization) diff --git a/conf/app.src b/conf/app.src index cb87e92..13fb70f 100644 --- a/conf/app.src +++ b/conf/app.src @@ -3,4 +3,3 @@ SOURCE_SUM=8e87a21b5781efb2420645dd2a41ef124d7626a9777142aedc43dcb11fcfa702 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=false -SOURCE_FILENAME= diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md new file mode 100644 index 0000000..370a318 --- /dev/null +++ b/doc/DESCRIPTION.md @@ -0,0 +1,2 @@ +[Cesium](https://cesium.app) is an [Unhosted webapp](https://unhosted.org) client for any [Duniter](https://duniter.org) crypto-currency. +It allows you to manage your wallet, certify your friends, and more! diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md new file mode 100644 index 0000000..e69de29 diff --git a/manifest.json b/manifest.json index b8da868..3edf026 100644 --- a/manifest.json +++ b/manifest.json @@ -3,8 +3,8 @@ "id": "cesium", "packaging_format": 1, "description": { - "en": "Duniter client to manage wallets, certifications in a libre money.", - "fr": "Client Duniter pour gérer ses portes-monnaie, les certifications au sein d’une monnaie libre." + "en": "Duniter client to manage wallets, certifications in a libre money", + "fr": "Client Duniter pour gérer ses portes-monnaie, les certifications au sein d’une monnaie libre" }, "version": "v1.6.12~ynh1", "url": "https://github.com/duniter/cesium", @@ -15,7 +15,7 @@ "url": "https://moul.re" }, "requirements": { - "yunohost": ">> 4.1.7" + "yunohost": ">> 4.2.3" }, "multi_instance": false, "services": [ @@ -25,8 +25,7 @@ "install" : [ { "name": "domain", - "type": "domain", - "example": "example.com" + "type": "domain" }, { "name": "path", diff --git a/pull_request_template.md b/pull_request_template.md deleted file mode 100644 index 6c28fc5..0000000 --- a/pull_request_template.md +++ /dev/null @@ -1,16 +0,0 @@ -## Problem -- *Description of why you made this PR* - -## Solution -- *And how do you fix that problem* - -## PR Status -- [ ] Code finished. -- [ ] Tested with Package_check. -- [ ] Fix or enhancement tested. -- [ ] Upgrade from last version tested. -- [ ] Can be reviewed and tested. - -## Package_check results ---- -* An automatic package_check will be launch at https://ci-apps-dev.yunohost.org/, when you add a specific comment to your Pull Request: "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!"* diff --git a/scripts/restore b/scripts/restore index 28c14fe..d33c548 100755 --- a/scripts/restore +++ b/scripts/restore @@ -36,8 +36,6 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= ynh_script_progression --message="Validating restoration parameters..." -ynh_webpath_available --domain=$domain --path_url=$path_url \ - || ynh_die --message="Path not available: ${domain}${path_url}" test ! -d $final_path \ || ynh_die --message="There is already a directory: $final_path " From c99cf69ab7d7b9c00b6631bdae79195c12101ade Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Fri, 12 Nov 2021 10:33:49 +0000 Subject: [PATCH 08/17] Auto-update README --- README.md | 30 ++++++++++++++++-------------- README_fr.md | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 14 deletions(-) create mode 100644 README_fr.md diff --git a/README.md b/README.md index c007a2a..f952073 100644 --- a/README.md +++ b/README.md @@ -1,32 +1,32 @@ -# Cesium package for YunoHost + + +# Cesium for YunoHost [![Integration level](https://dash.yunohost.org/integration/cesium.svg)](https://dash.yunohost.org/appci/app/cesium) ![](https://ci-apps.yunohost.org/ci/badges/cesium.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/cesium.maintain.svg) [![Install Cesium with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=cesium) -> *This package allows you to install Cesium quickly and simply on a YunoHost server. +*[Lire ce readme en français.](./README_fr.md)* + +> *This package allows you to install Cesium quickly and simply on a YunoHost server. If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* ## Overview + [Cesium](https://cesium.app) is an [Unhosted webapp](https://unhosted.org) client for any [Duniter](https://duniter.org) crypto-currency. It allows you to manage your wallet, certify your friends, and more! -**Shipped version:** v1.6.12 -## YunoHost specific features +**Shipped version:** v1.6.12~ynh1 -#### Supported architectures -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/cesium%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/cesium/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/cesium%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/cesium/) -## Links +## Documentation and resources - * Report a bug: https://github.com/YunoHost-Apps/cesium_ynh/issues - * App website: https://duniter.org - * Upstream app repository: https://github.com/duniter/cesium - * YunoHost website: https://yunohost.org/ - ---- +* YunoHost documentation for this app: https://yunohost.org/app_cesium +* Report a bug: https://github.com/YunoHost-Apps/cesium_ynh/issues ## Developer info @@ -38,3 +38,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/cesium_ynh/tree/testi or sudo yunohost app upgrade cesium -u https://github.com/YunoHost-Apps/cesium_ynh/tree/testing --debug ``` + +**More info regarding app packaging:** https://yunohost.org/packaging_apps \ No newline at end of file diff --git a/README_fr.md b/README_fr.md new file mode 100644 index 0000000..8e41d06 --- /dev/null +++ b/README_fr.md @@ -0,0 +1,38 @@ +# Cesium pour YunoHost + +[![Niveau d'intégration](https://dash.yunohost.org/integration/cesium.svg)](https://dash.yunohost.org/appci/app/cesium) ![](https://ci-apps.yunohost.org/ci/badges/cesium.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/cesium.maintain.svg) +[![Installer Cesium avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=cesium) + +*[Read this readme in english.](./README.md)* +*[Lire ce readme en français.](./README_fr.md)* + +> *Ce package vous permet d'installer Cesium rapidement et simplement sur un serveur YunoHost. +Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* + +## Vue d'ensemble + +[Cesium](https://cesium.app) is an [Unhosted webapp](https://unhosted.org) client for any [Duniter](https://duniter.org) crypto-currency. +It allows you to manage your wallet, certify your friends, and more! + + +**Version incluse :** v1.6.12~ynh1 + + + +## Documentations et ressources + +* Documentation YunoHost pour cette app : https://yunohost.org/app_cesium +* Signaler un bug : https://github.com/YunoHost-Apps/cesium_ynh/issues + +## Informations pour les développeurs + +Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/cesium_ynh/tree/testing). + +Pour essayer la branche testing, procédez comme suit. +``` +sudo yunohost app install https://github.com/YunoHost-Apps/cesium_ynh/tree/testing --debug +ou +sudo yunohost app upgrade cesium -u https://github.com/YunoHost-Apps/cesium_ynh/tree/testing --debug +``` + +**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps \ No newline at end of file From 9185c1a92288e7aab417e06f9a00dd2099a6f8ff Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 12 Nov 2021 11:36:07 +0100 Subject: [PATCH 09/17] cleaning --- check_process | 6 +++--- manifest.json | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/check_process b/check_process index 46cac3a..083b752 100644 --- a/check_process +++ b/check_process @@ -1,8 +1,8 @@ ;; Test complet ; Manifest - domain="domain.tld" (DOMAIN) - path="/path" (PATH) - is_public=1 (PUBLIC|public=1|private=0) + domain="domain.tld" + path="/path" + is_public=1 ; Checks pkg_linter=1 setup_sub_dir=1 diff --git a/manifest.json b/manifest.json index 3edf026..d026a11 100644 --- a/manifest.json +++ b/manifest.json @@ -8,6 +8,14 @@ }, "version": "v1.6.12~ynh1", "url": "https://github.com/duniter/cesium", + "upstream": { + "license": "AGPL-3.0-or-later", + "website": "https://cesium.app", + "demo": "https://demo.example.com", + "admindoc": "https://yunohost.org/packaging_apps", + "userdoc": "https://yunohost.org/apps", + "code": "https://github.com/duniter/cesium" + }, "license": "AGPL-3.0-or-later", "maintainer": { "name": "Moul", From ce80a82ff7260557c4cc48d5e64119e31d93ad8c Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Fri, 12 Nov 2021 10:36:12 +0000 Subject: [PATCH 10/17] Auto-update README --- README.md | 6 +++++- README_fr.md | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f952073..b4af45f 100644 --- a/README.md +++ b/README.md @@ -21,10 +21,14 @@ It allows you to manage your wallet, certify your friends, and more! **Shipped version:** v1.6.12~ynh1 - +**Demo:** https://demo.example.com ## Documentation and resources +* Official app website: https://cesium.app +* Official user documentation: https://yunohost.org/apps +* Official admin documentation: https://yunohost.org/packaging_apps +* Upstream app code repository: https://github.com/duniter/cesium * YunoHost documentation for this app: https://yunohost.org/app_cesium * Report a bug: https://github.com/YunoHost-Apps/cesium_ynh/issues diff --git a/README_fr.md b/README_fr.md index 8e41d06..61790ad 100644 --- a/README_fr.md +++ b/README_fr.md @@ -17,10 +17,14 @@ It allows you to manage your wallet, certify your friends, and more! **Version incluse :** v1.6.12~ynh1 - +**Démo :** https://demo.example.com ## Documentations et ressources +* Site officiel de l'app : https://cesium.app +* Documentation officielle utilisateur : https://yunohost.org/apps +* Documentation officielle de l'admin : https://yunohost.org/packaging_apps +* Dépôt de code officiel de l'app : https://github.com/duniter/cesium * Documentation YunoHost pour cette app : https://yunohost.org/app_cesium * Signaler un bug : https://github.com/YunoHost-Apps/cesium_ynh/issues From 35a80dfd6e9babe2d566e6e67ddba258ebdd8679 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 12 Nov 2021 13:03:18 +0100 Subject: [PATCH 11/17] Add rights --- scripts/install | 22 ++++++++++++---------- scripts/remove | 10 ++++++++++ scripts/restore | 18 +++++++++++------- scripts/upgrade | 12 ++++++++++++ 4 files changed, 45 insertions(+), 17 deletions(-) diff --git a/scripts/install b/scripts/install index 6e22846..93096ee 100644 --- a/scripts/install +++ b/scripts/install @@ -49,6 +49,14 @@ ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=is_public --value=$is_public +#================================================= +# CREATE DEDICATED USER +#================================================= +ynh_script_progression --message="Configuring system user..." + +# Create a system user +ynh_system_user_create --username=$app --home_dir="$final_path" + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -58,6 +66,10 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$final_path" +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" + #================================================= # NGINX CONFIGURATION #================================================= @@ -71,16 +83,6 @@ then ynh_replace_string "^#sub_path_only" "" "/etc/nginx/conf.d/$domain.d/$app.conf" fi -#================================================= -# GENERIC FINALIZATION -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= -ynh_script_progression --message="Securing files and directories..." - -# Set permissions to app files -chown -R www-data: $final_path - #================================================= # SETUP SSOWAT #================================================= diff --git a/scripts/remove b/scripts/remove index 6e5d453..e009d4b 100755 --- a/scripts/remove +++ b/scripts/remove @@ -36,6 +36,16 @@ ynh_script_progression --message="Removing NGINX web server configuration..." # Remove the dedicated NGINX config ynh_remove_nginx_config +#================================================= +# GENERIC FINALIZATION +#================================================= +# REMOVE DEDICATED USER +#================================================= +ynh_script_progression --message="Removing the dedicated system user..." + +# Delete a system user +ynh_system_user_delete --username=$app + #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/restore b/scripts/restore index d33c548..2df94e3 100755 --- a/scripts/restore +++ b/scripts/restore @@ -48,6 +48,14 @@ ynh_script_progression --message="Restoring the NGINX configuration..." ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" +#================================================= +# RECREATE THE DEDICATED USER +#================================================= +ynh_script_progression --message="Recreating the dedicated system user..." + +# Create the dedicated user (if not existing) +ynh_system_user_create --username=$app --home_dir="$final_path" + #================================================= # RESTORE THE APP MAIN DIR #================================================= @@ -55,13 +63,9 @@ ynh_script_progression --message="Restoring the app main directory..." ynh_restore_file --origin_path="$final_path" -#================================================= -# RESTORE USER RIGHTS -#================================================= -ynh_script_progression --message="Restoring user rights..." - -# Restore permissions on app files -chown -R www-data: $final_path +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index e675586..1079291 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -61,6 +61,14 @@ ynh_clean_setup () { # Exit if an error occurs during the execution of the script ynh_abort_if_errors +#================================================= +# CREATE DEDICATED USER +#================================================= +ynh_script_progression --message="Making sure dedicated system user exists..." + +# Create a dedicated user (if not existing) +ynh_system_user_create --username=$app --home_dir="$final_path" + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -73,6 +81,10 @@ then ynh_setup_source --dest_dir="$final_path" fi +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" + #================================================= # NGINX CONFIGURATION #================================================= From bd6a252c19f607a068672c137e1609add048e394 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 12 Nov 2021 13:03:43 +0100 Subject: [PATCH 12/17] Update check_process --- check_process | 1 - 1 file changed, 1 deletion(-) diff --git a/check_process b/check_process index 083b752..00524c9 100644 --- a/check_process +++ b/check_process @@ -15,7 +15,6 @@ upgrade=1 from_commit=99330d46e45662b922de84e2e48ad1b15a63bb6e backup_restore=1 multi_instance=0 - port_already_use=0 change_url=1 ;;; Options Email= From 4e3f5053f33f1508fb5d77c2044c760abc265a90 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 12 Nov 2021 13:04:10 +0100 Subject: [PATCH 13/17] Update upgrade --- scripts/upgrade | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 1079291..8cdce50 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -25,10 +25,23 @@ is_public=$(ynh_app_setting_get --app=$app --key=is_public) #================================================= # CHECK VERSION #================================================= -ynh_script_progression --message="Checking version..." upgrade_type=$(ynh_check_app_version_changed) +#================================================= +# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP +#================================================= +ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." + +# Backup the current version of the app +ynh_backup_before_upgrade +ynh_clean_setup () { + # restore it if the upgrade fails + ynh_restore_upgradebackup +} +# Exit if an error occurs during the execution of the script +ynh_abort_if_errors + #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= @@ -47,20 +60,6 @@ if ynh_legacy_permissions_exists; then ynh_app_setting_delete --app=$app --key=is_public fi -#================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP -#================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." - -# Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { - # restore it if the upgrade fails - ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - #================================================= # CREATE DEDICATED USER #================================================= From f8f0a1cbdd52d08320d6558f0b7f6f25e2e9092d Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 12 Nov 2021 13:04:52 +0100 Subject: [PATCH 14/17] Cleaning --- scripts/install | 5 ----- 1 file changed, 5 deletions(-) diff --git a/scripts/install b/scripts/install index 93096ee..3aaa344 100644 --- a/scripts/install +++ b/scripts/install @@ -78,11 +78,6 @@ ynh_script_progression --message="Configuring NGINX web server..." # 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 - #================================================= # SETUP SSOWAT #================================================= From c006be6f06a7de793ed8120408b354133a955ecb Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 12 Nov 2021 13:05:05 +0100 Subject: [PATCH 15/17] Update _common.sh --- scripts/_common.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index ecd263f..944a65e 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,9 +4,6 @@ # COMMON VARIABLES #================================================= -# dependencies used by the app -pkg_dependencies="" - #================================================= # PERSONAL HELPERS #================================================= From 0c3954826be72a4d043665f02907eaea45a971ba Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 14 Nov 2021 18:14:03 +0100 Subject: [PATCH 16/17] Typo --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index d026a11..2838698 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Duniter client to manage wallets, certifications in a libre money", "fr": "Client Duniter pour gérer ses portes-monnaie, les certifications au sein d’une monnaie libre" }, - "version": "v1.6.12~ynh1", + "version": "1.6.12~ynh1", "url": "https://github.com/duniter/cesium", "upstream": { "license": "AGPL-3.0-or-later", From 74995d46d52a5a39d0f7708e8731253f62b82ce5 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Sun, 14 Nov 2021 17:14:06 +0000 Subject: [PATCH 17/17] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b4af45f..007aeea 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in It allows you to manage your wallet, certify your friends, and more! -**Shipped version:** v1.6.12~ynh1 +**Shipped version:** 1.6.12~ynh1 **Demo:** https://demo.example.com diff --git a/README_fr.md b/README_fr.md index 61790ad..de9cd65 100644 --- a/README_fr.md +++ b/README_fr.md @@ -15,7 +15,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour It allows you to manage your wallet, certify your friends, and more! -**Version incluse :** v1.6.12~ynh1 +**Version incluse :** 1.6.12~ynh1 **Démo :** https://demo.example.com