From c9a6d6792b15890321e38db0413ad3ff254405c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 10 Aug 2023 15:35:51 +0200 Subject: [PATCH 1/9] upgrade --- manifest.json | 4 ++-- scripts/_common.sh | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/manifest.json b/manifest.json index 7e8b145..2fd28de 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Social Communication Server", "fr": "Serveur de Communication Social" }, - "version": "2023.01~ynh1", + "version": "2023.08~ynh1", "url": "http://friendi.ca", "upstream": { "license": "AGPL-3.0-only", @@ -27,7 +27,7 @@ "email": "aymhce@gmail.com" }, "requirements": { - "yunohost": ">= 11.0.9" + "yunohost": ">= 11.2" }, "multi_instance": true, "services": [ diff --git a/scripts/_common.sh b/scripts/_common.sh index 93e094b..64c79a1 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,9 +5,9 @@ #================================================= # commit hashes -# 2022.12 -version_commit="9d7e172d2c106eee94b3fddfa42cc023532228d3" -addons_version_commit="f922d69310f5229d2e9404f396d66453b2d19d90" +# 2023.08 +version_commit="a6449da5574ed9a51069c9b0e9a2811e31f68400" +addons_version_commit="5d13889f2cad41705f490cad7af9a70594a82f2d" # dependencies used by the app YNH_PHP_VERSION="7.4" From fb3b62cc044b616be1eae06de16955e7e70cc957 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 10 Aug 2023 13:35:56 +0000 Subject: [PATCH 2/9] Auto-update README --- README.md | 5 +++-- README_fr.md | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0c76f63..03e3835 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,8 @@ It shall NOT be edited by hand. # Friendica for YunoHost -[![Integration level](https://dash.yunohost.org/integration/friendica.svg)](https://dash.yunohost.org/appci/app/friendica) ![Working status](https://ci-apps.yunohost.org/ci/badges/friendica.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/friendica.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/friendica.svg)](https://dash.yunohost.org/appci/app/friendica) ![Working status](https://ci-apps.yunohost.org/ci/badges/friendica.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/friendica.maintain.svg) + [![Install Friendica with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=friendica) *[Lire ce readme en français.](./README_fr.md)* @@ -19,7 +20,7 @@ Friendica is a decentralised communications platform that integrates social comm Friendica connects you effortlessly to a federated communications network of several thousand servers, with more than half a million user registrations. You can directly connect to anyone on Friendica, Mastodon, Diaspora, GnuSocial, Pleroma, or Hubzilla, regardless where each user profile is hosted. -**Shipped version:** 2023.01~ynh1 +**Shipped version:** 2023.08~ynh1 **Demo:** https://dir.friendica.social/servers diff --git a/README_fr.md b/README_fr.md index b8c8244..17e99b0 100644 --- a/README_fr.md +++ b/README_fr.md @@ -5,7 +5,8 @@ It shall NOT be edited by hand. # Friendica pour YunoHost -[![Niveau d’intégration](https://dash.yunohost.org/integration/friendica.svg)](https://dash.yunohost.org/appci/app/friendica) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/friendica.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/friendica.maintain.svg) +[![Niveau d’intégration](https://dash.yunohost.org/integration/friendica.svg)](https://dash.yunohost.org/appci/app/friendica) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/friendica.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/friendica.maintain.svg) + [![Installer Friendica avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=friendica) *[Read this readme in english.](./README.md)* @@ -19,7 +20,7 @@ Friendica is a decentralised communications platform that integrates social comm Friendica connects you effortlessly to a federated communications network of several thousand servers, with more than half a million user registrations. You can directly connect to anyone on Friendica, Mastodon, Diaspora, GnuSocial, Pleroma, or Hubzilla, regardless where each user profile is hosted. -**Version incluse :** 2023.01~ynh1 +**Version incluse :** 2023.08~ynh1 **Démo :** https://dir.friendica.social/servers From 9f13f70f499c94c30c964b7e06c7c94d3dfd8841 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 10 Aug 2023 15:47:06 +0200 Subject: [PATCH 3/9] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 39c1463..398a26c 100644 --- a/scripts/install +++ b/scripts/install @@ -127,7 +127,7 @@ ynh_add_config --template="../conf/local-sample.config.php" --destination="$fina ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" < "$final_path/database.sql" # LDAP addon config -ynh_add_config --template="../conf/addon.config.php" --destination="$final_path/config/addon.config.php" +#ynh_add_config --template="../conf/addon.config.php" --destination="$final_path/config/addon.config.php" #================================================= # PHP-FPM CONFIGURATION From f5520c126429b355531b7febbdf5e5190a7ac7ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 10 Aug 2023 20:52:01 +0200 Subject: [PATCH 4/9] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 398a26c..39c1463 100644 --- a/scripts/install +++ b/scripts/install @@ -127,7 +127,7 @@ ynh_add_config --template="../conf/local-sample.config.php" --destination="$fina ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" < "$final_path/database.sql" # LDAP addon config -#ynh_add_config --template="../conf/addon.config.php" --destination="$final_path/config/addon.config.php" +ynh_add_config --template="../conf/addon.config.php" --destination="$final_path/config/addon.config.php" #================================================= # PHP-FPM CONFIGURATION From 155c3d2cc6c6ec6555856b28b8e51baa32e20be7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 11 Aug 2023 08:19:24 +0200 Subject: [PATCH 5/9] fix --- manifest.json | 2 +- scripts/_common.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.json b/manifest.json index 2fd28de..60df64e 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Social Communication Server", "fr": "Serveur de Communication Social" }, - "version": "2023.08~ynh1", + "version": "2023.09~ynh1", "url": "http://friendi.ca", "upstream": { "license": "AGPL-3.0-only", diff --git a/scripts/_common.sh b/scripts/_common.sh index 64c79a1..8001156 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,8 +6,8 @@ # commit hashes # 2023.08 -version_commit="a6449da5574ed9a51069c9b0e9a2811e31f68400" -addons_version_commit="5d13889f2cad41705f490cad7af9a70594a82f2d" +version_commit="2dbfb070083ec395bf5d24ec89fe96b282c6a12d" +addons_version_commit="f2cc0312ca9a95d99a8330452848180792bf9227" # dependencies used by the app YNH_PHP_VERSION="7.4" From 9e651b937306bdbfd8a6d364fbd5991b02a59a2c Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 11 Aug 2023 06:19:29 +0000 Subject: [PATCH 6/9] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 03e3835..e3cc85c 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Friendica is a decentralised communications platform that integrates social comm Friendica connects you effortlessly to a federated communications network of several thousand servers, with more than half a million user registrations. You can directly connect to anyone on Friendica, Mastodon, Diaspora, GnuSocial, Pleroma, or Hubzilla, regardless where each user profile is hosted. -**Shipped version:** 2023.08~ynh1 +**Shipped version:** 2023.09~ynh1 **Demo:** https://dir.friendica.social/servers diff --git a/README_fr.md b/README_fr.md index 17e99b0..9bbd62e 100644 --- a/README_fr.md +++ b/README_fr.md @@ -20,7 +20,7 @@ Friendica is a decentralised communications platform that integrates social comm Friendica connects you effortlessly to a federated communications network of several thousand servers, with more than half a million user registrations. You can directly connect to anyone on Friendica, Mastodon, Diaspora, GnuSocial, Pleroma, or Hubzilla, regardless where each user profile is hosted. -**Version incluse :** 2023.08~ynh1 +**Version incluse :** 2023.09~ynh1 **Démo :** https://dir.friendica.social/servers From 121fb506eb0e2ea5a4f05fd61c67a4930c15406e Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 20 Aug 2023 14:03:12 +0200 Subject: [PATCH 7/9] Remove dependency on direct database calls during install - Use console autoinstall command instead which creates the local.config.php file and initializes the database - Use console addon enable to activate the ldapauth addon --- scripts/install | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/scripts/install b/scripts/install index 39c1463..07c6af2 100644 --- a/scripts/install +++ b/scripts/install @@ -119,12 +119,7 @@ ynh_add_nginx_config #================================================= # ADD A CONFIGURATION #================================================= -ynh_script_progression --message="Adding a configuration file..." --weight=1 - -ynh_add_config --template="../conf/local-sample.config.php" --destination="$final_path/config/local.config.php" - -# init db -ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" < "$final_path/database.sql" +ynh_script_progression --message="Adding the LDAP Auth addon configuration file..." --weight=1 # LDAP addon config ynh_add_config --template="../conf/addon.config.php" --destination="$final_path/config/addon.config.php" @@ -145,7 +140,7 @@ chmod -R 775 "$final_path/view/smarty3" #================================================= # SETUP A CRON #================================================= -ynh_script_progression --message="Setuping a cron job..." --weight=1 +ynh_script_progression --message="Setting up the cron job..." --weight=1 ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" chown root: "/etc/cron.d/$app" @@ -154,14 +149,20 @@ chmod 644 "/etc/cron.d/$app" #================================================= # INSTALL FRIENDICA #================================================= +ynh_script_progression --message="Install Friendica..." --weight=1 -# Run composer pushd "$final_path" - ynh_exec_as "$app" php$phpversion bin/composer.phar install --no-dev --quiet - ynh_exec_as "$app" bin/console config system addon ldapauth -popd + # Import Composer dependencies + ynh_exec_as "$app" php$phpversion bin/composer.phar install --no-dev --quiet -ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" <<< "INSERT INTO addon (id, name, version, installed, hidden, timestamp, plugin_admin) VALUES (NULL, 'ldapauth', '', '1', '0', UNIX_TIMESTAMP(), '0');" + # Install application + ynh_exec_as "$app" php$phpversion bin/console.php autoinstall\ + --dbhost "$db_host" --dbdata "$db_name" --dbuser "$db_user" --dbpass "$db_pwd"\ + --admin "$email" --tz "$timezone" --lang "$language" --url "https://$domain$path_url" + + # Enable LDAP Auth addon + ynh_exec_as "$app" php$phpversion bin/console.php addon enable ldapauth +popd #================================================= # RELOAD NGINX From 1f1278cc2857e63b9318cefa23127d183e926120 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 20 Aug 2023 14:35:00 +0200 Subject: [PATCH 8/9] Replace unbound variable $db_host by expected value in install script Co-authored-by: eric_G <46165813+ericgaspar@users.noreply.github.com> --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 07c6af2..0afa4cd 100644 --- a/scripts/install +++ b/scripts/install @@ -157,7 +157,7 @@ pushd "$final_path" # Install application ynh_exec_as "$app" php$phpversion bin/console.php autoinstall\ - --dbhost "$db_host" --dbdata "$db_name" --dbuser "$db_user" --dbpass "$db_pwd"\ + --dbhost "localhost" --dbdata "$db_name" --dbuser "$db_user" --dbpass "$db_pwd"\ --admin "$email" --tz "$timezone" --lang "$language" --url "https://$domain$path_url" # Enable LDAP Auth addon From f360d9ae3bc43d21c190c6f544f9d0d250e4e97c Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 20 Aug 2023 15:07:34 +0200 Subject: [PATCH 9/9] add gmp module --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 93e094b..5128051 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -12,7 +12,7 @@ addons_version_commit="f922d69310f5229d2e9404f396d66453b2d19d90" # dependencies used by the app YNH_PHP_VERSION="7.4" -pkg_dependencies="php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-imagick php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-gd" +pkg_dependencies="php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-imagick php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-gmp" #================================================= # EXPERIMENTAL HELPERS