From 79d3f1e441024178b91fbdddb58504caa1908f16 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Tue, 11 May 2021 03:05:47 +0200 Subject: [PATCH 1/5] [autopatch] Update issue and PR templates --- issue_template.md | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 issue_template.md diff --git a/issue_template.md b/issue_template.md deleted file mode 100644 index e0d9363..0000000 --- a/issue_template.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -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. - ---- - -**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 Netdata itself. Refer to its documentation or repository for help.* - - *If you have a doubt, post here, we will figure it out together.* -3. *Delete the italic comments as you write over them below, and remove this guide.* ---- - -**Describe the bug** -*A clear and concise description of what the bug is.* - -**Versions** -- 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* - - 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.* -- *If you performed a command from the CLI, the command itself is enough. For example:* - ```sh - sudo yunohost app install netdata - ``` -- *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 '....'* - 4. *See error* - -**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.* -*If applicable and useful, add screenshots to help explain your problem.* From 9f99f1aa23b609fac4d10e6ea73d2b2fe8738f90 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Thu, 13 May 2021 17:50:15 +0200 Subject: [PATCH 2/5] [autopatch] Update issue and PR templates --- .github/ISSUE_TEMPLATE.md | 55 ++++++++++++++++++++++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 16 ++++++++++ 2 files changed, 71 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..2729a6b --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,55 @@ +--- +name: Bug report +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 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 + +*A clear and concise description of what the bug is.* + +### 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* + - 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`* + +### Steps to reproduce + +- *If you performed a command from the CLI, the command itself is enough. For example:* + ```sh + 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 '...'* + 4. *See error* + +### 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 + +*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 100644 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) From 5f3af3bfe83cbffb82ded9d4073450b4fba5d8b6 Mon Sep 17 00:00:00 2001 From: Jimmy Monin Date: Fri, 30 Jul 2021 16:27:59 +0200 Subject: [PATCH 3/5] Upgrade to upstream version 1.31.0 --- 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 6c91745..1c2c623 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ _netdata is **fast** and **efficient**, designed to permanently run on all syste (**physical** & **virtual** servers, **containers**, **IoT** devices), without disrupting their core function._ -**Shipped version:** 1.30.0 +**Shipped version:** 1.31.0 **Customization brought by the package:** diff --git a/conf/app.src b/conf/app.src index a43845e..d9f50fb 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,3 +1,3 @@ -SOURCE_URL=https://github.com/netdata/netdata/releases/download/v1.30.0/netdata-v1.30.0.tar.gz -SOURCE_SUM=711c9ce7a5b34c4e05dee8b2b034896f995cf5360eedca8b1d7375e0d33d9f59 +SOURCE_URL=https://github.com/netdata/netdata/releases/download/v1.31.0/netdata-v1.31.0.tar.gz +SOURCE_SUM=ca68f725224e8bbec041b493891376fbf41aedb47c4ac06161c2eda990089c9f SOURCE_FORMAT=tar.gz diff --git a/manifest.json b/manifest.json index 5f26f11..2c486a1 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "real-time performance and health monitoring", "fr": "Monitoring serveur en temps reel" }, - "version": "1.30.0~ynh1", + "version": "1.31.0~ynh1", "url": "http://my-netdata.io/", "license": "GPL-3.0", "maintainer": { From 5b2201014096076b20df49b345afa14bfd148b4e Mon Sep 17 00:00:00 2001 From: Johan Grande Date: Fri, 30 Jul 2021 16:31:42 +0200 Subject: [PATCH 4/5] fix Frenchism (#60) Co-authored-by: JimboJoe --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6c91745..135c285 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ disrupting their core function._ * Dovecot statistics via giving access to Dovecot stats stocket to `netdata` user (works only with Dovecot 2.2.16+) **Further recommendations:** -We don't allow YunoHost packages to make sensible changes to system files. So here are further customizations you can make to allow more monitoring: +We don't allow YunoHost packages to make changes to sensitive system files. So here are further customizations you can make to allow more monitoring: * Nginx: * requests/connections: follow [these recommandations](https://github.com/firehol/netdata/tree/master/python.d#nginx) to enable `/stab_status`; for example by putting this `location` section in `/etc/nginx/conf.d/yunohost_admin.conf`: From 738ffd6b7542e7007c98297f46fa7d2cb8aafe95 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 3 Aug 2021 09:21:17 +0200 Subject: [PATCH 5/5] 1.30.1 --- conf/app.src | 4 ++-- manifest.json | 22 +++------------------- scripts/change_url | 6 +++--- scripts/install | 11 +++-------- scripts/remove | 10 +--------- scripts/restore | 2 +- scripts/upgrade | 35 +++++++++-------------------------- 7 files changed, 22 insertions(+), 68 deletions(-) diff --git a/conf/app.src b/conf/app.src index a43845e..77d3f7c 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,3 +1,3 @@ -SOURCE_URL=https://github.com/netdata/netdata/releases/download/v1.30.0/netdata-v1.30.0.tar.gz -SOURCE_SUM=711c9ce7a5b34c4e05dee8b2b034896f995cf5360eedca8b1d7375e0d33d9f59 +SOURCE_URL=https://github.com/netdata/netdata/releases/download/v1.30.1/netdata-v1.30.1.tar.gz +SOURCE_SUM=3df188ac04f17094cb929e2990841ba77f68aa6af484e0509b99db298fa206c9 SOURCE_FORMAT=tar.gz diff --git a/manifest.json b/manifest.json index 5f26f11..8b3c13c 100644 --- a/manifest.json +++ b/manifest.json @@ -3,10 +3,10 @@ "id": "netdata", "packaging_format": 1, "description": { - "en": "real-time performance and health monitoring", + "en": "Real-time performance and health monitoring", "fr": "Monitoring serveur en temps reel" }, - "version": "1.30.0~ynh1", + "version": "1.30.1~ynh1", "url": "http://my-netdata.io/", "license": "GPL-3.0", "maintainer": { @@ -15,7 +15,7 @@ "url": "" }, "requirements": { - "yunohost": ">= 3.8.1" + "yunohost": ">= 4.2.0" }, "multi_instance": false, "services": [ @@ -26,38 +26,22 @@ { "name": "domain", "type": "domain", - "ask": { - "en": "Choose a domain for NetData", - "fr": "Choisissez un nom de domaine pour NetData" - }, "example": "domain.org" }, { "name": "path", "type": "path", - "ask": { - "en": "Choose a path for NetData", - "fr": "Choisissez un chemin pour NetData" - }, "example": "/netdata", "default": "/netdata" }, { "name": "is_public", "type": "boolean", - "ask": { - "en": "Is it a public application?", - "fr": "Est-ce une application publique ?" - }, "default": false }, { "name": "admin", "type": "user", - "ask": { - "en": "Choose the only user initially allowed (others can be added later)", - "fr": "Choisissez l'unique utilisateur autorisé initialement (d'autres peuvent être ajoutés ultérieurement)" - }, "example": "johndoe" } ] diff --git a/scripts/change_url b/scripts/change_url index 03eb0e7..0e972b4 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -24,14 +24,14 @@ app=$YNH_APP_INSTANCE_NAME #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --time --weight=1 +ynh_script_progression --message="Loading installation settings..." --weight=1 final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up the app before changing its url (may take a while)..." --time --weight=1 +ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=1 # Backup the current version of the app ynh_backup_before_upgrade @@ -118,7 +118,7 @@ ynh_systemd_action --service_name=$app --action="restart" --log_path="$final_pat #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." --weight=1 +ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/install b/scripts/install index f8ed301..9014d25 100644 --- a/scripts/install +++ b/scripts/install @@ -51,7 +51,6 @@ ynh_script_progression --message="Storing installation settings..." --weight=1 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=admin --value=$admin -ynh_app_setting_set --app=$app --key=is_public --value=$is_public #================================================= # STANDARD MODIFICATIONS @@ -81,9 +80,7 @@ ynh_setup_source --dest_dir="$NETDATA_TMPDIR" #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Configuring nginx web server..." --weight=2 - -### `ynh_add_nginx_config` will use the file conf/nginx.conf +ynh_script_progression --message="Configuring NGINX web server..." --weight=2 # Create a dedicated nginx config ynh_add_nginx_config @@ -112,8 +109,6 @@ configure_netdata #================================================= # GENERIC FINALIZATION -#================================================= - #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= @@ -131,7 +126,7 @@ ynh_systemd_action --service_name=$app --action="restart" --log_path="$final_pat #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring SSOwat..." --weight=1 +ynh_script_progression --message="Configuring permissions..." --weight=1 # Make app public if necessary if [ $is_public -eq 1 ]; then @@ -146,7 +141,7 @@ ynh_permission_update --permission "main" --add "$admin" #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." --weight=1 +ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/remove b/scripts/remove index 23af483..0eb6031 100644 --- a/scripts/remove +++ b/scripts/remove @@ -71,19 +71,11 @@ ynh_mysql_execute_as_root "drop user 'netdata'@'localhost'; flush privileges;" #================================================= # REMOVE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Removing nginx web server configuration..." --weight=1 +ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 # Remove the dedicated nginx config ynh_remove_nginx_config -#================================================= -# SPECIFIC REMOVE -#================================================= - -#================================================= -# GENERIC FINALIZATION -#================================================= - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/restore b/scripts/restore index 0264b38..d90fc1b 100644 --- a/scripts/restore +++ b/scripts/restore @@ -101,7 +101,7 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="$final_path/ #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." --weight=1 +ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/upgrade b/scripts/upgrade index 72aaccf..de46c33 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) admin=$(ynh_app_setting_get --app=$app --key=admin) -is_public=$(ynh_app_setting_get --app=$app --key=is_public) final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= @@ -33,15 +32,6 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 -# 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=/opt/$app @@ -55,6 +45,13 @@ if [[ $final_path == /var/www* ]]; then 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 #================================================= @@ -71,8 +68,6 @@ ynh_abort_if_errors #================================================= # STANDARD UPGRADE STEPS -#================================================= - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -118,7 +113,7 @@ configure_netdata #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading nginx web server configuration..." --weight=1 +ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 # Create a dedicated nginx config ynh_add_nginx_config @@ -140,18 +135,6 @@ ynh_install_app_dependencies $pkg_dependencies yunohost service add $app --description "Real-time performance and health monitoring for systems and applications" --log "$final_path/var/log/netdata/error.log" "$final_path/var/log/netdata/access.log" "$final_path/var/log/netdata/debug.log" -#================================================= -# SETUP SSOWAT -#================================================= -ynh_script_progression --message="Upgrading SSOwat configuration..." --weight=1 - -# Make app public if necessary -if [[ $is_public -eq 1 ]]; then - # Everyone can access the app. - # The "main" permission is automatically created before the install script. - ynh_permission_update --permission "main" --add "visitors" -fi - #================================================= # START SYSTEMD SERVICE #================================================= @@ -162,7 +145,7 @@ ynh_systemd_action --service_name=$app --action="restart" --log_path="$final_pat #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." --weight=1 +ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload