From e4dda5e46ecc8dcbfe1be0205bbe673f3a3b3777 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Fri, 23 Feb 2024 02:57:33 +0100 Subject: [PATCH 1/6] trying to fix smarty errors --- manifest.toml | 2 +- scripts/upgrade | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 0c6a3b0..c9b947d 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "Friendica" description.en = "Decentralized Social Network" description.fr = "Réseau social décentralisé" -version = "2023.12~ynh3" +version = "2023.12~ynh4" maintainers = [ "" ] diff --git a/scripts/upgrade b/scripts/upgrade index 4a1ca5b..5396ec8 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -38,6 +38,11 @@ fi chmod -R o-rwx "$install_dir" chown -R "$app:www-data" "$install_dir" +# clear the smarty cache +# cf: https://github.com/friendica/friendica/issues/11212#issuecomment-1046051750 +ynh_secure_remove --file="$install_dir/view/smarty3/compiled" +chmod -R 775 "$install_dir/view/smarty3" + #================================================= # REAPPLY SYSTEM CONFIGURATIONS #================================================= From 97792fbf040c0b1cc84198b6cf3d40fca466be74 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 23 Feb 2024 01:57:39 +0000 Subject: [PATCH 2/6] 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 2f5f729..739d414 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.12~ynh3 +**Shipped version:** 2023.12~ynh4 **Demo:** https://dir.friendica.social/servers diff --git a/README_fr.md b/README_fr.md index c3a0b53..6de1882 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.12~ynh3 +**Version incluse :** 2023.12~ynh4 **Démo :** https://dir.friendica.social/servers From 5607cd595f38894efedbd4a24ba4ff53d1e58106 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Fri, 23 Feb 2024 03:02:15 +0100 Subject: [PATCH 3/6] recreate the 'compiled' folder --- scripts/upgrade | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/upgrade b/scripts/upgrade index 5396ec8..b8c748d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -41,6 +41,7 @@ chown -R "$app:www-data" "$install_dir" # clear the smarty cache # cf: https://github.com/friendica/friendica/issues/11212#issuecomment-1046051750 ynh_secure_remove --file="$install_dir/view/smarty3/compiled" +mkdir "$install_dir/view/smarty3/compiled" chmod -R 775 "$install_dir/view/smarty3" #================================================= From 32a74858c60850b45313eb8c155d90ef02795c56 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Fri, 23 Feb 2024 03:13:53 +0100 Subject: [PATCH 4/6] patch the config file to add the friendica logs --- scripts/upgrade | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index b8c748d..087819f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -84,7 +84,14 @@ fi # add the path to the pidfile if missing if [ -f "$install_dir/config/local.config.php" ] && ! grep -q -e "pidfile" "$install_dir/config/local.config.php"; then ynh_print_info --message="Patching the Friendica config file: add the PID file path for the daemon..." - ynh_replace_string --match_string="'basepath' => '$install_dir'," --replace_string="'basepath' => '$install_dir',\n 'pidfile' => '$install_dir/daemon.pid'," --target_file="$install_dir/config/local.config.php" + ynh_replace_string --match_string="'basepath' => '$install_dir'," --replace_string="'basepath' => '$install_dir',\n 'pidfile' => '$install_dir/daemon.pid',\n" --target_file="$install_dir/config/local.config.php" + ynh_store_file_checksum --file="$install_dir/config/local.config.php" +fi + +# add log path to the config +if [ -f "$install_dir/config/local.config.php" ] && ! grep -q -e "logfile" "$install_dir/config/local.config.php"; then + ynh_print_info --message="Patching the Friendica config file: add the path for the Friendica logfile..." + ynh_replace_string --match_string="'basepath' => '$install_dir'," --replace_string="'basepath' => '$install_dir',\n 'logfile' => '/var/log/friendica/friendica.log',\n 'loglevel' => 'notice',\n" --target_file="$install_dir/config/local.config.php" ynh_store_file_checksum --file="$install_dir/config/local.config.php" fi From 3dece1f6ed79513fb51a7172f63a8ade221b7d42 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Fri, 23 Feb 2024 22:36:59 +0100 Subject: [PATCH 5/6] remove trailing \n --- scripts/upgrade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 087819f..c466471 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -84,14 +84,14 @@ fi # add the path to the pidfile if missing if [ -f "$install_dir/config/local.config.php" ] && ! grep -q -e "pidfile" "$install_dir/config/local.config.php"; then ynh_print_info --message="Patching the Friendica config file: add the PID file path for the daemon..." - ynh_replace_string --match_string="'basepath' => '$install_dir'," --replace_string="'basepath' => '$install_dir',\n 'pidfile' => '$install_dir/daemon.pid',\n" --target_file="$install_dir/config/local.config.php" + ynh_replace_string --match_string="'basepath' => '$install_dir'," --replace_string="'basepath' => '$install_dir',\n 'pidfile' => '$install_dir/daemon.pid'," --target_file="$install_dir/config/local.config.php" ynh_store_file_checksum --file="$install_dir/config/local.config.php" fi # add log path to the config if [ -f "$install_dir/config/local.config.php" ] && ! grep -q -e "logfile" "$install_dir/config/local.config.php"; then ynh_print_info --message="Patching the Friendica config file: add the path for the Friendica logfile..." - ynh_replace_string --match_string="'basepath' => '$install_dir'," --replace_string="'basepath' => '$install_dir',\n 'logfile' => '/var/log/friendica/friendica.log',\n 'loglevel' => 'notice',\n" --target_file="$install_dir/config/local.config.php" + ynh_replace_string --match_string="'basepath' => '$install_dir'," --replace_string="'basepath' => '$install_dir',\n 'logfile' => '/var/log/friendica/friendica.log',\n 'loglevel' => 'notice'," --target_file="$install_dir/config/local.config.php" ynh_store_file_checksum --file="$install_dir/config/local.config.php" fi From b516eabd690218019e451d6a9dae8a7414d43692 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Fri, 23 Feb 2024 22:38:36 +0100 Subject: [PATCH 6/6] rm StartLimitIntervalSec=10 --- conf/systemd.service | 1 - 1 file changed, 1 deletion(-) diff --git a/conf/systemd.service b/conf/systemd.service index 337fc3e..7ab5b56 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -19,7 +19,6 @@ ReadOnlyDirectories=/etc /usr Restart=always RestartSec=10 StartLimitBurst=1 -StartLimitIntervalSec=10 # Sandboxing options to harden security # Depending on specificities of your service/app, you may need to tweak these