From 93900986cbae317281dd644550142dbbc4ee06dc Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 26 Feb 2021 08:57:55 +0100 Subject: [PATCH 1/4] Add new permissions --- check_process | 13 ++++--------- conf/nginx.conf | 2 -- manifest.json | 4 ++-- scripts/change_url | 1 + scripts/install | 11 +++++++---- scripts/upgrade | 27 ++++++++++++--------------- 6 files changed, 26 insertions(+), 32 deletions(-) diff --git a/check_process b/check_process index 9dc103e..0658fdd 100644 --- a/check_process +++ b/check_process @@ -13,14 +13,9 @@ upgrade=1 from_commit=7a99e018f12d91876c84efd04e0a4e7f178fdd80 backup_restore=1 multi_instance=1 - wrong_user=1 - wrong_path=1 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 - ;;; Upgrade options - ; commit=7a99e018f12d91876c84efd04e0a4e7f178fdd80 - name=Upgrade to upstream version 2018-04-06 - manifest_arg=domain=DOMAIN&path=PATH& +;;; Upgrade options + ; commit=7a99e018f12d91876c84efd04e0a4e7f178fdd80 + name=Upgrade to upstream version 2018-04-06 + manifest_arg=domain=DOMAIN&path=PATH& diff --git a/conf/nginx.conf b/conf/nginx.conf index 37de41d..556b622 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -9,7 +9,6 @@ location __PATH__/ { rewrite ^ https://$server_name$request_uri? permanent; } -### Example PHP configuration (remove it if not used) index index.php; # Common parameter to increase upload size limit in conjunction with dedicated php-fpm file @@ -26,7 +25,6 @@ location __PATH__/ { fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param SCRIPT_FILENAME $request_filename; } -### End of PHP configuration part # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; diff --git a/manifest.json b/manifest.json index b62f087..076999c 100644 --- a/manifest.json +++ b/manifest.json @@ -15,11 +15,11 @@ }, "multi_instance": true, "requirements": { - "yunohost": ">= 3.7" + "yunohost": ">= 4.0.0" }, "services": [ "nginx", - "php7.0-fpm", + "php7.3-fpm", "mysql" ], "arguments": { diff --git a/scripts/change_url b/scripts/change_url index 9eae8dd..d6c6747 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -99,6 +99,7 @@ fi # RELOAD NGINX #================================================= 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 190df5a..b5b54bb 100644 --- a/scripts/install +++ b/scripts/install @@ -88,8 +88,8 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # SPECIFIC SETUP #================================================= - ynh_script_progression --message="Configuring RSS-Bridge..." --weight=1 + # Enable every bridge for i in $final_path/bridges/*.php ; do echo $(basename $i) | sed "s|Bridge.php$||g" | tee -a $final_path/whitelist.txt @@ -108,10 +108,13 @@ chown -R $app: $final_path/cache #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring SSOwat..." --weight=1 +ynh_script_progression --message="Configuring permissions..." --weight=1 -# unprotected_uris allows SSO credentials to be passed anyway. -ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" +# Make app public if necessary +if [ $is_public -eq 1 ] +then + ynh_permission_update --permission="main" --add="visitors" +fi #================================================= # RELOAD NGINX diff --git a/scripts/upgrade b/scripts/upgrade index 5a998de..e5813e1 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -27,6 +27,18 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) upgrade_type=$(ynh_check_app_version_changed) +#================================================= +# ENSURE DOWNWARD COMPATIBILITY +#================================================= +ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 + +# 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 #================================================= @@ -41,13 +53,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 -path_url=$(ynh_normalize_url_path --path_url=$path_url) - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -102,14 +107,6 @@ done chown -R root: $final_path chown -R $app: $final_path/cache -#================================================= -# SETUP SSOWAT -#================================================= -ynh_script_progression --message="Upgrading SSOwat configuration..." --weight=1 - -# unprotected_uris allows SSO credentials to be passed anyway -ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" - #================================================= # RELOAD NGINX #================================================= From 02006f7bfe07398204745b3c6ce5b3f57bf92a73 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 5 Mar 2021 23:00:11 +0100 Subject: [PATCH 2/4] Update install --- scripts/install | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/scripts/install b/scripts/install index b5b54bb..0e55f87 100644 --- a/scripts/install +++ b/scripts/install @@ -110,11 +110,7 @@ chown -R $app: $final_path/cache #================================================= ynh_script_progression --message="Configuring permissions..." --weight=1 -# Make app public if necessary -if [ $is_public -eq 1 ] -then - ynh_permission_update --permission="main" --add="visitors" -fi +ynh_permission_update --permission="main" --add="visitors" #================================================= # RELOAD NGINX From aa00c881de1c3671f5fee2cd87101416031b8fa9 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 5 Apr 2021 19:25:42 +0200 Subject: [PATCH 3/4] Small fix --- README.md | 4 ++-- manifest.json | 10 +--------- scripts/install | 2 +- scripts/upgrade | 2 +- 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index fce7170..5e39288 100644 --- a/README.md +++ b/README.md @@ -80,8 +80,8 @@ This is application is public and there's no notion of user. #### Supported architectures -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/rss-bridge%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/rss-bridge/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/rss-bridge%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/rss-bridge/) +* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/rss-bridge.svg)](https://ci-apps.yunohost.org/ci/apps/rss-bridge/) +* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/rss-bridge.svg)](https://ci-apps-arm.yunohost.org/ci/apps/rss-bridge/) ## Limitations diff --git a/manifest.json b/manifest.json index 076999c..4e9d017 100644 --- a/manifest.json +++ b/manifest.json @@ -15,7 +15,7 @@ }, "multi_instance": true, "requirements": { - "yunohost": ">= 4.0.0" + "yunohost": ">= 4.1.0" }, "services": [ "nginx", @@ -27,19 +27,11 @@ { "name": "domain", "type": "domain", - "ask": { - "en": "Choose a domain for RSS-Bridge", - "fr": "Choisissez un domaine pour RSS-Bridge" - }, "example": "domain.org" }, { "name": "path", "type": "path", - "ask": { - "en": "Choose a path for RSS-Bridge", - "fr": "Choisissez un chemin pour RSS-Bridge" - }, "example": "/rss-bridge", "default": "/rss-bridge" } diff --git a/scripts/install b/scripts/install index 0e55f87..841d8eb 100644 --- a/scripts/install +++ b/scripts/install @@ -82,7 +82,7 @@ ynh_system_user_create --username=$app ynh_script_progression --message="Configuring PHP-FPM..." --weight=3 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION +ynh_add_fpm_config phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index e5813e1..43f4d3e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -87,7 +87,7 @@ ynh_system_user_create --username=$app ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=3 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION +ynh_add_fpm_config #================================================= # SPECIFIC UPGRADE From f2d6a77a50302b0ff3beeea8f46b48a717a345d9 Mon Sep 17 00:00:00 2001 From: Jimmy Monin Date: Fri, 30 Apr 2021 15:10:53 +0200 Subject: [PATCH 4/4] Upgrade to upstream version 2021-04-25 --- 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 5e39288..bae5338 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 [RSS-Bridge](https://github.com/RSS-Bridge/rss-bridge) is a PHP project capable of generating ATOM feeds for websites which don't have one. -**Shipped version:** 2020-11-10 +**Shipped version:** 2021-04-25 ### Supported sites/pages (main) diff --git a/conf/app.src b/conf/app.src index 5879839..d73033f 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/RSS-Bridge/rss-bridge/archive/2020-11-10.tar.gz -SOURCE_SUM=345e5d947a700dd8e1c685513fd6b47ce0e031c3530940bc5ccb8e6cbf82d2a5 +SOURCE_URL=https://github.com/RSS-Bridge/rss-bridge/archive/2021-04-25.tar.gz +SOURCE_SUM=19adf5a55d4db5383625a43aa62892593e493303a7bf772d8be0d199f6d1c3bb SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 4e9d017..a71c616 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "RSS and Atom feed generator for websites that don't have one.", "fr": "Générateur de flux RSS et Atom pour les sites Web qui n'en ont pas." }, - "version": "2020-11-10~ynh1", + "version": "2021-04-25~ynh1", "url": "https://github.com/RSS-Bridge/rss-bridge", "license": "Unlicense", "maintainer": {