From 66b668df4c4b08194eb185356ba33eb3ed643f17 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 5 Feb 2021 09:11:40 +0100 Subject: [PATCH 1/2] Upgrade to version 4.3.0 --- README.md | 2 +- conf/app.src | 4 ++-- manifest.json | 4 ++-- pull_request_template.md | 4 +--- scripts/install | 11 ++++------- scripts/upgrade | 18 ++++++++++-------- 6 files changed, 20 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index ff16fd5..73fe616 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to ## Overview [Ampache](http://ampache.org) for the love of music. A web based audio/video streaming application and file manager allowing you to access your music & videos from anywhere, using almost any internet enabled device. -**Shipped version:** 4.2.6 +**Shipped version:** 4.3.0 ## Screenshots diff --git a/conf/app.src b/conf/app.src index 49c4f7d..50933f4 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/ampache/ampache/archive/4.2.6.tar.gz -SOURCE_SUM=7cba92f9e59b2c8c81ddfa3d82ca77761d3b0d3c55c6372db01410e5c22ddb46 +SOURCE_URL=https://github.com/ampache/ampache/archive/4.3.0.tar.gz +SOURCE_SUM=0fc07590e62e5223d305842b175eb83a099ba138e933428b1edec85a0f464370 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 4548386..060bf1a 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Web based audio/video streaming application", "fr": "Application de streaming audio et vidéo" }, - "version": "4.2.6~ynh1", + "version": "4.3.0~ynh1", "url": "http://ampache.org", "license": "AGPL-3.0", "maintainer": { @@ -14,7 +14,7 @@ "email": "aymhce@gmail.com" }, "requirements": { - "yunohost": ">= 3.8.1" + "yunohost": ">= 4.0.0" }, "multi_instance": true, "services" : [ diff --git a/pull_request_template.md b/pull_request_template.md index 0b0593e..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/ampache_ynh%20PR-NUM-%20(USERNAME)/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/ampache_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!"* diff --git a/scripts/install b/scripts/install index 7adfc75..52e2721 100644 --- a/scripts/install +++ b/scripts/install @@ -151,11 +151,9 @@ ynh_multimedia_build_main_dir ynh_script_progression --message="Configuring Ampache..." --weight=5 # Set the app as temporarily public for curl call -ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" -# Reload SSOwat config -yunohost app ssowatconf +ynh_permission_update --permission="main" --add="visitors" -# Reload Nginx +# Reload NGINX ynh_systemd_action --service_name=nginx --action=reload ynh_local_curl /update.php?action=update @@ -186,12 +184,11 @@ chown -R $app: $final_path #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring SSOwat..." +ynh_script_progression --message="Configuring permissions..." -# Keep app public if necessary if [ $is_public -eq 0 ] then - ynh_app_setting_delete --app=$app --key=unprotected_uris + ynh_permission_update --permission="main" --remov="visitors" fi #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index c7fb14c..99e51f8 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -71,7 +71,12 @@ if [ -z "$secret_key" ]; then ynh_app_setting_set --app=$app --key=secret_key --value=$secret_key fi -ynh_app_setting_delete --app=$app --key=skipped_uris +# 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 @@ -180,11 +185,9 @@ then ynh_script_progression --message="Upgrading Ampache with cURL..." --weight=6 # Set the app as temporarily public for curl call - ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" - # Reload SSOwat config - yunohost app ssowatconf + ynh_permission_update --permission "main" --add "visitors" - # Reload Nginx + # Reload NGINX ynh_systemd_action --service_name=nginx --action=reload ynh_local_curl /update.php?action=update @@ -204,12 +207,11 @@ chown -R $app: $final_path #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Upgrading SSOwat configuration..." +ynh_script_progression --message="Configuring permissions..." -# Make app public if necessary if [ $is_public -eq 0 ] then - ynh_app_setting_delete --app=$app --key=unprotected_uris + ynh_permission_update --permission="main" --remov="visitors" fi #================================================= From 3d2a50b9a49e746260826fbcae71b7e30ae33dc5 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 5 Feb 2021 10:56:45 +0100 Subject: [PATCH 2/2] Fix typo --- scripts/install | 2 +- scripts/upgrade | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 52e2721..720c64f 100644 --- a/scripts/install +++ b/scripts/install @@ -188,7 +188,7 @@ ynh_script_progression --message="Configuring permissions..." if [ $is_public -eq 0 ] then - ynh_permission_update --permission="main" --remov="visitors" + ynh_permission_update --permission="main" --remove="visitors" fi #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 99e51f8..4e145db 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -185,7 +185,7 @@ then ynh_script_progression --message="Upgrading Ampache with cURL..." --weight=6 # Set the app as temporarily public for curl call - ynh_permission_update --permission "main" --add "visitors" + ynh_permission_update --permission="main" --add="visitors" # Reload NGINX ynh_systemd_action --service_name=nginx --action=reload @@ -211,7 +211,7 @@ ynh_script_progression --message="Configuring permissions..." if [ $is_public -eq 0 ] then - ynh_permission_update --permission="main" --remov="visitors" + ynh_permission_update --permission="main" --remove="visitors" fi #=================================================