From feff42c46c17cf9ade9016e23385a35d64e3ea64 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Thu, 30 Dec 2021 14:08:38 +0100 Subject: [PATCH 1/5] 4.0.1 --- README.md | 2 +- README_fr.md | 2 +- conf/app.src | 4 ++-- manifest.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f04208f..0514a14 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ SPIP is a publishing system for the Internet in which great importance is attach Source: [spip.net](http://www.spip.net/en_rubrique25.html) -**Shipped version:** 4.0.0 +**Shipped version:** 4.0.1 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 851f191..7d79e76 100644 --- a/README_fr.md +++ b/README_fr.md @@ -14,7 +14,7 @@ SPIP est un système de publication pour l’Internet qui s’attache particuli Source: [spip.net](http://www.spip.net/fr_rubrique91.html) -**Version incluse:** 4.0.0 +**Version incluse:** 4.0.1 ## Captures d'écran diff --git a/conf/app.src b/conf/app.src index f6ecdec..9992658 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://files.spip.net/spip/archives/spip-v4.0.0.zip -SOURCE_SUM=d17513fcdac32c07b327ad18032facfcadd174719fba2d4598f10b1c931b7e5a +SOURCE_URL=https://files.spip.net/spip/archives/spip-v4.0.1.zip +SOURCE_SUM=509881b6d8ec23de23ce69f3026610713e756a6d03ceecc7793e864394a8e705 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=false diff --git a/manifest.json b/manifest.json index d846fba..7b5d60f 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "CMS with a focus on collaborative edition and multilingualism", "fr": "CMS conçu pour l'édition collaborative et le multilinguisme" }, - "version": "4.0.0~ynh2", + "version": "4.0.1~ynh1", "url": "http://www.spip.net/", "license": "GPL-3.0-or-later", "maintainer": { From 35cfb33e8a4410461b52c46b44b009c8b12fae53 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 31 Dec 2021 08:57:46 +0100 Subject: [PATCH 2/5] Fix linter warnings --- check_process | 8 ++++---- conf/app.src | 1 - conf/nginx.conf | 5 ----- manifest.json | 11 ++++------- scripts/_common.sh | 2 +- scripts/install | 9 ++++++++- scripts/remove | 8 ++++++++ scripts/restore | 14 +++++++++----- scripts/upgrade | 9 ++++++++- 9 files changed, 42 insertions(+), 25 deletions(-) diff --git a/check_process b/check_process index 8caabdb..b596b87 100644 --- a/check_process +++ b/check_process @@ -1,10 +1,10 @@ ;; Test complet ; Manifest - domain="domain.tld" (DOMAIN) - path="/path" (PATH) - admin="john" (USER) + domain="domain.tld" + path="/path" + admin="john" users_status="Editor" - is_public=1 (PUBLIC|public=1|private=0) + is_public=1 password="thisisapassword" ; Checks pkg_linter=1 diff --git a/conf/app.src b/conf/app.src index 9992658..2450f46 100644 --- a/conf/app.src +++ b/conf/app.src @@ -3,5 +3,4 @@ SOURCE_SUM=509881b6d8ec23de23ce69f3026610713e756a6d03ceecc7793e864394a8e705 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=false -SOURCE_FILENAME= SOURCE_EXTRACT=true diff --git a/conf/nginx.conf b/conf/nginx.conf index 40fdb30..59c6307 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -4,11 +4,6 @@ location __PATH__/ { # Path to source alias __FINALPATH__/ ; - # Force usage of https - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } - index index.php; client_max_body_size 30M; diff --git a/manifest.json b/manifest.json index 7b5d60f..7311e8c 100644 --- a/manifest.json +++ b/manifest.json @@ -14,7 +14,7 @@ "email": "cyp@rouquin.me" }, "requirements": { - "yunohost": ">= 4.2.7" + "yunohost": ">= 4.3.0" }, "multi_instance": true, "services": [ @@ -25,8 +25,7 @@ "install" : [ { "name": "domain", - "type": "domain", - "example": "example.com" + "type": "domain" }, { "name": "path", @@ -36,13 +35,11 @@ }, { "name": "admin", - "type": "user", - "example": "johndoe" + "type": "user" }, { "name": "password", - "type": "password", - "example": "Choose a password" + "type": "password" }, { "name": "is_public", diff --git a/scripts/_common.sh b/scripts/_common.sh index 66780cd..bf8022b 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,7 +6,7 @@ YNH_PHP_VERSION="7.3" -extra_php_dependencies="php${YNH_PHP_VERSION}-sqlite3 php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-gd" +pkg_dependencies="php${YNH_PHP_VERSION}-sqlite3 php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-gd" #================================================= # EXPERIMENTAL HELPERS diff --git a/scripts/install b/scripts/install index 37391c4..c499817 100644 --- a/scripts/install +++ b/scripts/install @@ -54,6 +54,13 @@ ynh_app_setting_set --app=$app --key=admin --value=$admin ynh_app_setting_set --app=$app --key=password --value=$password ynh_app_setting_set --app=$app --key=users_status --value=$users_status +#================================================= +# INSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Installing dependencies..." + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # CREATE DEDICATED USER #================================================= @@ -100,7 +107,7 @@ ynh_add_nginx_config ynh_script_progression --message="Configuring PHP-FPM..." # Create a dedicated PHP-FPM config -ynh_add_fpm_config --package="$extra_php_dependencies" +ynh_add_fpm_config #================================================= # SPECIFIC SETUP diff --git a/scripts/remove b/scripts/remove index ed976e5..14f781e 100644 --- a/scripts/remove +++ b/scripts/remove @@ -39,6 +39,14 @@ ynh_script_progression --message="Removing the MySQL database..." # Remove a database if it exists, along with the associated user ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name +#================================================= +# REMOVE DEPENDENCIES +#================================================= +ynh_script_progression --message="Removing dependencies..." + +# Remove metapackage and its dependencies +ynh_remove_app_dependencies + #================================================= # REMOVE APP MAIN DIR #================================================= diff --git a/scripts/restore b/scripts/restore index dce1c2c..05fc11a 100644 --- a/scripts/restore +++ b/scripts/restore @@ -39,10 +39,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= ynh_script_progression --message="Validating restoration parameters..." -ynh_webpath_available --domain=$domain --path_url=$path_url \ - || ynh_die --message="Path not available: ${domain}${path_url}" -test ! -d $final_path \ - || ynh_die --message="There is already a directory: $final_path " +test ! -d $final_path || ynh_die --message="There is already a directory: $final_path " #================================================= # STANDARD RESTORATION STEPS @@ -81,8 +78,15 @@ ynh_script_progression --message="Restoring the PHP-FPM configuration..." ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" # Recreate a dedicated php-fpm config -ynh_add_fpm_config --phpversion=$phpversion --package="$extra_php_dependencies" +ynh_add_fpm_config --phpversion=$phpversion +#================================================= +# REINSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Reinstalling dependencies..." + +# Define and install dependencies +ynh_install_app_dependencies $pkg_dependencies #================================================= # SPECIFIC RESTORATION diff --git a/scripts/upgrade b/scripts/upgrade index 2fb6f35..f08e38e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -145,13 +145,20 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." # Create a dedicated NGINX config ynh_add_nginx_config +#================================================= +# UPGRADE DEPENDENCIES +#================================================= +ynh_script_progression --message="Upgrading dependencies..." + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # PHP-FPM CONFIGURATION #================================================= ynh_script_progression --message="Upgrading PHP-FPM configuration..." # Create a dedicated PHP-FPM config -ynh_add_fpm_config --package="$extra_php_dependencies" +ynh_add_fpm_config #================================================= # SPECIFIC UPGRADE From 91ba9a0cfd06b36f952312c5393b5cc4b11fd1e2 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Mon, 3 Jan 2022 11:23:43 +0100 Subject: [PATCH 3/5] fix the is_public warning --- scripts/upgrade | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index f08e38e..a8aa7eb 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -59,9 +59,8 @@ ynh_abort_if_errors #================================================= ynh_script_progression --message="Ensuring downward compatibility..." -is_public=$(ynh_app_setting_get --app=$app --key=is_public) # Remove is_public -if [ -n "$is_public" ]; then +if [ -n "$(ynh_app_setting_get --app=$app --key=is_public)" ]; then ynh_app_setting_delete --app=$app --key=is_public fi From f3dcee62504686714886f5a4d6f8845dbca17bd0 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Tue, 4 Jan 2022 11:55:56 +0100 Subject: [PATCH 4/5] yet another fix for the warning is_public --- scripts/upgrade | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index a8aa7eb..a534fe3 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -173,15 +173,6 @@ chown -R $app:www-data "$final_path" # Set the app as temporarily public for curl call ynh_script_progression --message="Configuring SSOwat..." - -if ! ynh_permission_has_user --permission=main --user="visitors"; then - is_public=0 - # Making the app public for curl - ynh_permission_update --permission="main" --add="visitors" -else - is_public=1 -fi - ynh_backup_if_checksum_is_different --file="$final_path/config/connect.php" mv $final_path/config/connect.php $final_path/config/connect.php.ynh_bkp @@ -236,17 +227,6 @@ ynh_store_file_checksum --file="$final_path/config/connect.php" #================================================= # GENERIC FINALIZATION -#================================================= -# SETUP SSOWAT -#================================================= -ynh_script_progression --message="Configuring permissions..." - -# Make app private if necessary -if [ $is_public -eq 0 ] -then - ynh_permission_update --permission="main" --remove="visitors" -fi - #================================================= # RELOAD NGINX #================================================= From 0b84cebc9620bd11e53fd32c4d42b6c7c9377816 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Tue, 4 Jan 2022 11:59:04 +0100 Subject: [PATCH 5/5] Bump yunohost requirement --- manifest.json | 2 +- scripts/install | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/manifest.json b/manifest.json index 7311e8c..6fd563c 100644 --- a/manifest.json +++ b/manifest.json @@ -14,7 +14,7 @@ "email": "cyp@rouquin.me" }, "requirements": { - "yunohost": ">= 4.3.0" + "yunohost": ">= 4.3.2" }, "multi_instance": true, "services": [ diff --git a/scripts/install b/scripts/install index c499817..7a1bfe4 100644 --- a/scripts/install +++ b/scripts/install @@ -122,8 +122,6 @@ chown -R $app:www-data "$final_path" # Set the app as temporarily public for curl call ynh_script_progression --message="Configuring SSOwat..." -# Making the app public for curl -ynh_permission_update --permission="main" --add="visitors" # Installation with curl ynh_script_progression --message="Finalizing installation..." @@ -154,9 +152,6 @@ email=$(yunohost user info $admin | grep mail: | cut -d' ' -f2 | tr -d '\n') ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=3b" "adresse_db=localhost" "login_db=$db_name" "pass_db=$db_pwd" "server_db=mysql" "sel_db=$db_name" "nom=$admin" "email=$email" "login=$admin" "pass=$password" "pass_verif=$password" ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=fin" -# Remove the public access -ynh_permission_update --permission="main" --remove="visitors" - #================================================= # MODIFY A CONFIG FILE #=================================================