diff --git a/README.md b/README.md index 452cbe7..6549ac8 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Tiny Tiny RSS is a free and open source web-based news feed (RSS/Atom) reader an ## Documentation * Official documentation: https://git.tt-rss.org/git/tt-rss/wiki - * YunoHost documentation: https://yunohost.org/#/app_ttrss + * YunoHost documentation: https://yunohost.org/en/app_ttrss ## YunoHost specific features @@ -35,8 +35,8 @@ Tiny Tiny RSS is a free and open source web-based news feed (RSS/Atom) reader an #### Supported architectures -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/ttrss%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/ttrss/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/ttrss%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/ttrss/) +* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/ttrss.svg)](https://ci-apps.yunohost.org/ci/apps/ttrss/) +* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/ttrss.svg)](https://ci-apps-arm.yunohost.org/ci/apps/ttrss/) ## Limitations diff --git a/README_fr.md b/README_fr.md index f0285a8..5d77adc 100644 --- a/README_fr.md +++ b/README_fr.md @@ -27,7 +27,7 @@ Tiny Tiny RSS est un lecteur et agrégateur de flux d'actualités (RSS/Atom) en ## Documentation * Documentation officielle : https://git.tt-rss.org/git/tt-rss/wiki -* Documentation YunoHost : https://yunohost.org/#/app_ttrss +* Documentation YunoHost : https://yunohost.org/fr/app_ttrss ## Caractéristiques spécifiques YunoHost @@ -38,8 +38,8 @@ Tiny Tiny RSS est un lecteur et agrégateur de flux d'actualités (RSS/Atom) en #### Architectures supportées -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/ttrss%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/ttrss/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/ttrss%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/ttrss/) +* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/ttrss.svg)](https://ci-apps.yunohost.org/ci/apps/ttrss/) +* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/ttrss.svg)](https://ci-apps-arm.yunohost.org/ci/apps/ttrss/) ## Limitations diff --git a/check_process b/check_process index 55c91c9..a127c9b 100644 --- a/check_process +++ b/check_process @@ -13,7 +13,6 @@ upgrade=1 from_commit=e27175c2dde0ebbd483b212dc76c5b27877e4ed2 backup_restore=1 multi_instance=1 - port_already_use=0 change_url=1 ;;; Options Email= diff --git a/conf/config.php b/conf/config.php index 129c876..e8527bc 100644 --- a/conf/config.php +++ b/conf/config.php @@ -5,9 +5,9 @@ define('DB_TYPE', "mysql"); // or mysql define('DB_HOST', "localhost"); - define('DB_USER', "__DBNAME__"); - define('DB_NAME', "__DBNAME__"); - define('DB_PASS', "__DBPWD__"); + define('DB_USER', "__DB_NAME__"); + define('DB_NAME', "__DB_NAME__"); + define('DB_PASS', "__DB_PWD__"); define('DB_PORT', '3306'); // usually 5432 for PostgreSQL, 3306 for MySQL define('MYSQL_CHARSET', 'UTF8'); @@ -18,7 +18,7 @@ // *** Basic settings (important!) *** // *********************************** - define('SELF_URL_PATH', '__DOMAINPATH__'); + define('SELF_URL_PATH', '__DOMAIN_PATH__'); // Full URL of your tt-rss installation. This should be set to the // location of tt-rss directory, e.g. http://example.org/tt-rss/ // You need to set this option correctly otherwise several features diff --git a/manifest.json b/manifest.json index 83a2fa2..940b075 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "News feed (RSS/Atom) reader and aggregator.", "fr": "Lecteur de flux d’actualité utilisant les protocoles RSS et Atom." }, - "version": "20200916~ynh2", + "version": "20200916~ynh3", "url": "http://tt-rss.org", "license": "GPL-3.0-only", "maintainer": { @@ -14,12 +14,12 @@ "email": "" }, "requirements": { - "yunohost": ">= 3.8.1" + "yunohost": ">= 4.1.7" }, "multi_instance": true, "services": [ "nginx", - "php7.0-fpm", + "php7.3-fpm", "mysql" ], "arguments": { @@ -27,19 +27,11 @@ { "name": "domain", "type": "domain", - "ask": { - "en": "Choose a domain for Tiny Tiny RSS", - "fr": "Choisissez un domaine pour Tiny Tiny RSS" - }, "example": "domain.org" }, { "name": "path", "type": "path", - "ask": { - "en": "Choose a path for Tiny Tiny RSS", - "fr": "Choisissez un chemin pour Tiny Tiny RSS" - }, "example": "/ttrss", "default": "/ttrss" } diff --git a/pull_request_template.md b/pull_request_template.md index b5c5563..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/ttrss_ynh%20PR-NUM-%20(USERNAME)/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/ttrss_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/change_url b/scripts/change_url index 0607abb..73fe664 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -30,6 +30,23 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) +#================================================= +# 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 + +# Backup the current version of the app +ynh_backup_before_upgrade +ynh_clean_setup () { + # Remove the new domain config file, the remove script won't do it as it doesn't know yet its location. + ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" + + # Restore it if the upgrade fails + ynh_restore_upgradebackup +} +# Exit if an error occurs during the execution of the script +ynh_abort_if_errors + #================================================= # CHECK WHICH PARTS SHOULD BE CHANGED #================================================= @@ -90,9 +107,9 @@ ynh_backup_if_checksum_is_different --file="$final_path/config.php" cp ../conf/config.php "$final_path/config.php" # Change domain name in config.php -ynh_replace_string --match_string="__DBNAME__" --replace_string="$db_name" --target_file="$final_path/config.php" -ynh_replace_string --match_string="__DBPWD__" --replace_string="$db_pwd" --target_file="$final_path/config.php" -ynh_replace_string --match_string="__DOMAINPATH__" --replace_string="https://$domain$path_url" --target_file="$final_path/config.php" +ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/config.php" +ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/config.php" +ynh_replace_string --match_string="__DOMAIN_PATH__" --replace_string="https://$domain$path_url" --target_file="$final_path/config.php" # Recalculate and store the config file checksum into the app settings ynh_store_file_checksum --file="$final_path/config.php" diff --git a/scripts/install b/scripts/install index 351f730..0ec1c34 100644 --- a/scripts/install +++ b/scripts/install @@ -100,9 +100,9 @@ ynh_script_progression --message="Configuring ttrss..." --weight=1 cp ../conf/config.php "$final_path/config.php" # Change variables in ttrss configuration -ynh_replace_string --match_string="__DBNAME__" --replace_string="$db_name" --target_file="$final_path/config.php" -ynh_replace_string --match_string="__DBPWD__" --replace_string="$db_pwd" --target_file="$final_path/config.php" -ynh_replace_string --match_string="__DOMAINPATH__" --replace_string="https://$domain$path_url" --target_file="$final_path/config.php" +ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/config.php" +ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/config.php" +ynh_replace_string --match_string="__DOMAIN_PATH__" --replace_string="https://$domain$path_url" --target_file="$final_path/config.php" # Recalculate and store the config file checksum into the app settings ynh_store_file_checksum --file="$final_path/config.php" diff --git a/scripts/restore b/scripts/restore index a8477e0..ff0239b 100644 --- a/scripts/restore +++ b/scripts/restore @@ -19,7 +19,7 @@ ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading settings..." --weight=1 +ynh_script_progression --message="Loading settings..." --weight=1 app=$YNH_APP_INSTANCE_NAME diff --git a/scripts/upgrade b/scripts/upgrade index 9a01a43..9919054 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -133,9 +133,9 @@ then cp ../conf/config.php "$final_path/config.php" # Change variables in ttrss configuration - ynh_replace_string --match_string="__DBNAME__" --replace_string="$db_name" --target_file="$final_path/config.php" - ynh_replace_string --match_string="__DBPWD__" --replace_string="$db_pwd" --target_file="$final_path/config.php" - ynh_replace_string --match_string="__DOMAINPATH__" --replace_string="https://$domain$path_url" --target_file="$final_path/config.php" + ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/config.php" + ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/config.php" + ynh_replace_string --match_string="__DOMAIN_PATH__" --replace_string="https://$domain$path_url" --target_file="$final_path/config.php" # Recalculate and store the config file checksum into the app settings ynh_store_file_checksum --file="$final_path/config.php"