From 01e29b51268f6f75e9b4580389cfff8a7f309fe1 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Fri, 18 Jun 2021 10:58:09 +0200 Subject: [PATCH 1/7] fix #22 --- scripts/upgrade | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 60c3572..a02bfeb 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -175,7 +175,7 @@ ynh_permission_update --permission="main" --add="visitors" ynh_backup_if_checksum_is_different --file="$final_path/config/connect.php" -ynh_secure_remove --file="$final_path/config/connect.php" +mv $final_path/config/connect.php $final_path/config/connect.php.ynh_bkp # Installation with curl ynh_script_progression --message="Finalizing installation..." @@ -220,6 +220,12 @@ cp ../conf/mes_options.php $final_path/config/mes_options.php # STORE THE CONFIG FILE CHECKSUM #================================================= +if [ ! -f $final_path/config/connect.php ]; then + mv $final_path/config/connect.php.ynh_bkp $final_path/config/connect.php +else + ynh_secure_remove --file="$final_path/config/connect.php.ynh_bkp" +fi + ynh_store_file_checksum --file="$final_path/config/connect.php" #================================================= From 50391f51e42456bca2d3d79a702e2fd6a94ec37c Mon Sep 17 00:00:00 2001 From: pp-r <64266134+pp-r@users.noreply.github.com> Date: Sat, 10 Jul 2021 18:39:29 +0200 Subject: [PATCH 2/7] Update to SPIP 4.0.0 --- conf/app.src | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/app.src b/conf/app.src index d1e302b..f6ecdec 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://files.spip.net/spip/archives/spip-v3.2.11.zip -SOURCE_SUM=6b713ec10d9ceff367ec7f76f32d9438b76919f493cae3ef3a3db0cfce570df3 +SOURCE_URL=https://files.spip.net/spip/archives/spip-v4.0.0.zip +SOURCE_SUM=d17513fcdac32c07b327ad18032facfcadd174719fba2d4598f10b1c931b7e5a SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=false From fed6b28665c6239dce9e55e1f433d5661a39024a Mon Sep 17 00:00:00 2001 From: pp-r <64266134+pp-r@users.noreply.github.com> Date: Sat, 10 Jul 2021 18:40:48 +0200 Subject: [PATCH 3/7] Update to SPIP 4.0.0 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3e3f997..f04208f 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:** 3.2.11 +**Shipped version:** 4.0.0 ## Screenshots From 31181b831f5d8757488f2d01ec730c69a442f00f Mon Sep 17 00:00:00 2001 From: pp-r <64266134+pp-r@users.noreply.github.com> Date: Sat, 10 Jul 2021 18:41:15 +0200 Subject: [PATCH 4/7] Update to SPIP 4.0.0 --- README_fr.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_fr.md b/README_fr.md index 4bd6e0a..851f191 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:** 3.2.11 +**Version incluse:** 4.0.0 ## Captures d'écran From cef4374c732f626f61d2c0a6b2934debee97d359 Mon Sep 17 00:00:00 2001 From: pp-r <64266134+pp-r@users.noreply.github.com> Date: Sat, 10 Jul 2021 18:41:56 +0200 Subject: [PATCH 5/7] Update to SPIP 4.0.0 --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 6a9a493..7bb9686 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": "3.2.11~ynh2", + "version": "4.0.0~ynh1", "url": "http://www.spip.net/", "license": "GPL-3.0-or-later", "maintainer": { From f109da5eb18755964c2d65e0d2b120f63dd109d4 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Wed, 4 Aug 2021 11:27:46 +0200 Subject: [PATCH 6/7] bump php version --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 2828d4e..66780cd 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # SET ALL CONSTANTS #================================================= -YNH_PHP_VERSION="7.2" +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" From 93e29aa41a88e73e7769a6e9b830bb122550f53c Mon Sep 17 00:00:00 2001 From: Kay0u Date: Mon, 9 Aug 2021 11:25:34 +0200 Subject: [PATCH 7/7] remove is_public --- scripts/install | 3 +-- scripts/upgrade | 36 +++++++++++++++++------------------- 2 files changed, 18 insertions(+), 21 deletions(-) diff --git a/scripts/install b/scripts/install index 40e2b4a..37391c4 100644 --- a/scripts/install +++ b/scripts/install @@ -52,7 +52,6 @@ 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=admin --value=$admin ynh_app_setting_set --app=$app --key=password --value=$password -ynh_app_setting_set --app=$app --key=is_public --value=$is_public ynh_app_setting_set --app=$app --key=users_status --value=$users_status #================================================= @@ -122,7 +121,7 @@ ynh_permission_update --permission="main" --add="visitors" # Installation with curl ynh_script_progression --message="Finalizing installation..." ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=chmod" -ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=2" "chmod=755" "adresse_db=localhost" "login_db=$db_name" "pass_db=$db_pwd" "server_db=mysql" +ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=2" "chmod=750" "adresse_db=localhost" "login_db=$db_name" "pass_db=$db_pwd" "server_db=mysql" ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=3" "adresse_db=localhost" "login_db=$db_name" "pass_db=$db_pwd" "server_db=mysql" "choix_db=$db_name" "tprefix=$db_name" # For now spip have a problem with LDAP #ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=ldap1" diff --git a/scripts/upgrade b/scripts/upgrade index a02bfeb..2fb6f35 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) admin=$(ynh_app_setting_get --app=$app --key=admin) password=$(ynh_app_setting_get --app=$app --key=password) -is_public=$(ynh_app_setting_get --app=$app --key=is_public) final_path=$(ynh_app_setting_get --app=$app --key=final_path) users_status=$(ynh_app_setting_get --app=$app --key=users_status) db_name=$(ynh_app_setting_get --app=$app --key=db_name) @@ -60,13 +59,10 @@ ynh_abort_if_errors #================================================= ynh_script_progression --message="Ensuring downward compatibility..." -# Fix is_public as a boolean value -if [ "$is_public" = "Yes" ]; then - ynh_app_setting_set --app=$app --key=is_public --value=1 - is_public=1 -elif [ "$is_public" = "No" ]; then - ynh_app_setting_set --app=$app --key=is_public --value=0 - is_public=0 +is_public=$(ynh_app_setting_get --app=$app --key=is_public) +# Remove is_public +if [ -n "$is_public" ]; then + ynh_app_setting_delete --app=$app --key=is_public fi # If db_name doesn't exist, create it @@ -170,8 +166,15 @@ 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" + + +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" @@ -180,7 +183,7 @@ mv $final_path/config/connect.php $final_path/config/connect.php.ynh_bkp # Installation with curl ynh_script_progression --message="Finalizing installation..." ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=chmod" -ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=2" "chmod=755" "adresse_db=localhost" "login_db=$db_name" "pass_db=$db_pwd" "server_db=mysql" +ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=2" "chmod=750" "adresse_db=localhost" "login_db=$db_name" "pass_db=$db_pwd" "server_db=mysql" ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=3" "adresse_db=localhost" "login_db=$db_name" "pass_db=$db_pwd" "server_db=mysql" "choix_db=$db_name" "tprefix=$db_name" # For now spip have a problem with LDAP #ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=ldap1" @@ -206,9 +209,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" - #================================================= # UPDATE A CONFIG FILE #================================================= @@ -235,12 +235,10 @@ ynh_store_file_checksum --file="$final_path/config/connect.php" #================================================= ynh_script_progression --message="Configuring permissions..." -# Make app public if necessary -if [ $is_public -eq 1 ] +# Make app private if necessary +if [ $is_public -eq 0 ] then - # Everyone can access the app. - # The "main" permission is automatically created before the install script. - ynh_permission_update --permission="main" --add="visitors" + ynh_permission_update --permission="main" --remove="visitors" fi #=================================================