From 7f9fd6e91d9b91152c0d44f422c42f746c77b53a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 6 Nov 2022 15:28:57 +0100 Subject: [PATCH 1/3] Upgrade to version 13.1.0 (#94) (#95) * Upgrade to version 13.0.0 (#94) * Upgrade to v13.0.0 * Auto-update README Co-authored-by: yunohost-bot Co-authored-by: yunohost-bot * 13.1.0 (#93) * Auto-update README * PHP8 * Auto-update README * 13.1.0 * Auto-update README Co-authored-by: yalh76 Co-authored-by: yunohost-bot * Fix linter (#96) * Auto-update README * PHP8 * Auto-update README * 13.1.0 * Auto-update README * fix linter Co-authored-by: yalh76 Co-authored-by: yunohost-bot Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: yunohost-bot Co-authored-by: yunohost-bot Co-authored-by: yalh76 --- README.md | 2 +- README_fr.md | 2 +- conf/app.src | 4 ++-- manifest.json | 6 +++--- scripts/_common.sh | 2 +- scripts/install | 1 - scripts/restore | 8 ++++---- scripts/upgrade | 28 ++-------------------------- 8 files changed, 14 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index e387c9a..229d0ac 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in [Piwigo](http://piwigo.org) is a photo gallery software for the web, built by an active community of users and developers. Extensions make Piwigo easily customizable. -**Shipped version:** 12.3.0~ynh1 +**Shipped version:** 13.1.0~ynh1 **Demo:** https://piwigo.org/demo diff --git a/README_fr.md b/README_fr.md index 9e22b0c..4da23ca 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour [Piwigo](http://piwigo.org) is a photo gallery software for the web, built by an active community of users and developers. Extensions make Piwigo easily customizable. -**Version incluse :** 12.3.0~ynh1 +**Version incluse :** 13.1.0~ynh1 **Démo :** https://piwigo.org/demo diff --git a/conf/app.src b/conf/app.src index 1adbbf0..b3407d3 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://piwigo.org/download/dlcounter.php?code=12.3.0 -SOURCE_SUM=fd09f2fb43273a65c324dd301c2e5821d7ab7256bde41723b8e698a42bcd8f90 +SOURCE_URL=https://piwigo.org/download/dlcounter.php?code=13.1.0 +SOURCE_SUM=8964252a084669bd9e38eb0dcb356d6112e10b40a2717097adc664741f8cbc61 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index f677bfc..dcd3fe2 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Open source photo gallery for the web", "fr": "Galerie de photos open source pour le web" }, - "version": "12.3.0~ynh1", + "version": "13.1.0~ynh1", "url": "http://piwigo.org", "upstream": { "license": "GPL-2.0", @@ -22,12 +22,12 @@ "url": "" }, "requirements": { - "yunohost": ">= 4.3.0" + "yunohost": ">= 11.0.9" }, "multi_instance": true, "services": [ "nginx", - "php7.3-fpm", + "php8.0-fpm", "mysql" ], "arguments": { diff --git a/scripts/_common.sh b/scripts/_common.sh index 056bb7f..ba751e0 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -YNH_PHP_VERSION="7.3" +YNH_PHP_VERSION="8.0" # dependencies used by the app pkg_dependencies="imagemagick php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-imagick php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-mysqli" diff --git a/scripts/install b/scripts/install index b03f18c..15504c4 100644 --- a/scripts/install +++ b/scripts/install @@ -46,7 +46,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 ynh_app_setting_set --app=$app --key=language --value=$language ynh_app_setting_set --app=$app --key=admin --value=$admin diff --git a/scripts/restore b/scripts/restore index 2a21445..da6174a 100644 --- a/scripts/restore +++ b/scripts/restore @@ -35,7 +35,7 @@ datadir=$(ynh_app_setting_get --app=$app --key=datadir) #================================================= # CHECK IF THE APP CAN BE RESTORED #================================================= -ynh_script_progression --message="Validating restoration parameters..." +ynh_script_progression --message="Validating restoration parameters..." --weight=1 test ! -d $final_path \ || ynh_die --message="There is already a directory: $final_path " @@ -53,7 +53,7 @@ ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= # RESTORE THE APP MAIN DIR #================================================= -ynh_script_progression --message="Restoring the app main directory..." +ynh_script_progression --message="Restoring the app main directory..." --weight=4 ynh_restore_file --origin_path="$final_path" @@ -64,7 +64,7 @@ chown -R $app:www-data "$final_path" #================================================= # RESTORE THE DATA DIRECTORY #================================================= -ynh_script_progression --message="Restoring the data directory..." +ynh_script_progression --message="Restoring the data directory..." --weight=2 ynh_restore_file --origin_path="$datadir" --not_mandatory @@ -107,7 +107,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # RESTORE THE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Restoring the NGINX web server configuration..." +ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=2 ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" diff --git a/scripts/upgrade b/scripts/upgrade index e4caa79..8732def 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,7 +20,6 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) language=$(ynh_app_setting_get --app=$app --key=language) 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) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name @@ -31,7 +30,6 @@ datadir=$(ynh_app_setting_get --app=$app --key=datadir) #================================================= # CHECK VERSION #================================================= -ynh_script_progression --message="Checking version..." upgrade_type=$(ynh_check_app_version_changed) @@ -108,7 +106,7 @@ fi #================================================= # CREATE DEDICATED USER #================================================= -ynh_script_progression --message="Making sure dedicated system user exists..." +ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 # Create a dedicated user (if not existing) ynh_system_user_create --username=$app --home_dir="$final_path" @@ -194,12 +192,6 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Upgrading Piwigo with cURL..." --weight=6 -# Set the app as temporarily public for cURL call -if ! ynh_permission_has_user --permission="main" --user="visitors" -then - ynh_permission_update --permission="main" --add="visitors" -fi - # Reload NGINX ynh_systemd_action --service_name=nginx --action=reload @@ -258,9 +250,6 @@ if [ -f $final_path/plugins/Ldap_Login/data.dat ] ; then ynh_secure_remove --file=$final_path/plugins/Ldap_Login/data.dat fi -# Remove the public access -ynh_permission_update --permission="main" --remove="visitors" - #================================================= # GENERIC FINALIZATION #================================================= @@ -277,23 +266,10 @@ chown $app: "/var/log/${app}FailedLogins.log" ynh_add_fail2ban_config --logpath="/var/log/${app}FailedLogins.log" --failregex="ip=" --max_retry=6 -#================================================= -# SETUP SSOWAT -#================================================= -ynh_script_progression --message="Configuring permissions..." - -# 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 - #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading NGINX web server..." +ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload From 0a3ec654181893da17320280e8c986d562dc0c99 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 3 Dec 2022 19:07:03 +0100 Subject: [PATCH 2/3] Remove space in 'DESCRIPTION _fr.md' filename :| --- doc/{DESCRIPTION _fr.md => DESCRIPTION_fr.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename doc/{DESCRIPTION _fr.md => DESCRIPTION_fr.md} (100%) diff --git a/doc/DESCRIPTION _fr.md b/doc/DESCRIPTION_fr.md similarity index 100% rename from doc/DESCRIPTION _fr.md rename to doc/DESCRIPTION_fr.md From b0e55dd71dc2f39abcd55f4b8c1bb262d320c6d3 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 3 Dec 2022 18:07:07 +0000 Subject: [PATCH 3/3] Auto-update README --- README_fr.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_fr.md b/README_fr.md index 4da23ca..94155e6 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 ## Vue d'ensemble -[Piwigo](http://piwigo.org) is a photo gallery software for the web, built by an active community of users and developers. Extensions make Piwigo easily customizable. +[Piwigo](http://piwigo.org) est un logiciel de galerie photo pour le web, construit par une communauté active d'utilisateurs et de développeurs. Des extensions rendent Piwigo facilement personnalisable. **Version incluse :** 13.1.0~ynh1