diff --git a/README.md b/README.md index 4f595a9..9f61265 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:** 2024.03~ynh1 **Demo:** diff --git a/README_es.md b/README_es.md index 4c8cdd2..f8996c1 100644 --- a/README_es.md +++ b/README_es.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. -**Versión actual:** 2023.12~ynh3 +**Versión actual:** 2024.03~ynh1 **Demo:** diff --git a/README_eu.md b/README_eu.md index f3fa406..d7d0342 100644 --- a/README_eu.md +++ b/README_eu.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. -**Paketatutako bertsioa:** 2023.12~ynh3 +**Paketatutako bertsioa:** 2024.03~ynh1 **Demoa:** diff --git a/README_fr.md b/README_fr.md index 4768a7d..c300f58 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 :** 2024.03~ynh1 **Démo :** diff --git a/README_gl.md b/README_gl.md index de91445..dd48a15 100644 --- a/README_gl.md +++ b/README_gl.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. -**Versión proporcionada:** 2023.12~ynh3 +**Versión proporcionada:** 2024.03~ynh1 **Demo:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 27ed7c1..397ed5c 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.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. -**分发版本:** 2023.12~ynh3 +**分发版本:** 2024.03~ynh1 **演示:** 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 diff --git a/manifest.toml b/manifest.toml index 8772ebc..b6b2c7d 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 = "2024.03~ynh1" maintainers = [] @@ -47,13 +47,13 @@ ram.runtime = "50M" [resources.sources] [resources.sources.main] - url = "https://github.com/friendica/friendica/archive/refs/tags/2023.12.tar.gz" - sha256 = "d55475628ae24aab1ee7ed3367d22b2fd3ee49200b5da276c69e97df2afbd943" + url = "https://github.com/friendica/friendica/archive/refs/tags/2024.03.tar.gz" + sha256 = "af7560f18f2251d68d25b54fcbcbe1062d61f50f2a7ff2bd9e1bed71b22258f2" autoupdate.strategy = "latest_github_release" [resources.sources.addons] - url = "https://github.com/friendica/friendica-addons/archive/refs/tags/2023.12.tar.gz" - sha256 = "d0228833584dd7dc0301ee04bd41728345c8051d84908849dea52ed04a7c8982" + url = "https://github.com/friendica/friendica-addons/archive/refs/tags/2024.03.tar.gz" + sha256 = "c4905f627199b0353047fa90f9382e2f2747203284dae3ec73876337aca4baec" autoupdate.upstream = "https://github.com/friendica/friendica-addons" autoupdate.strategy = "latest_github_tag" diff --git a/scripts/backup b/scripts/backup index 572b62f..1c91c7d 100644 --- a/scripts/backup +++ b/scripts/backup @@ -26,34 +26,18 @@ trap '(cd $install_dir && ynh_exec_as $app php$phpversion bin/console.php mainte ynh_backup --src_path="$install_dir" #================================================= -# BACKUP THE NGINX CONFIGURATION +# SYSTEM CONFIGURATION #================================================= ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# BACKUP THE PHP-FPM CONFIGURATION -#================================================= - ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" -#================================================= -# BACKUP FAIL2BAN CONFIGURATION -#================================================= - ynh_backup --src_path="/etc/fail2ban/jail.d/$app.conf" ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf" -#================================================= -# BACKUP LOGROTATE -#================================================= - ynh_backup --src_path="/etc/logrotate.d/$app" -#================================================= -# BACKUP VARIOUS FILES -#================================================= - ynh_backup --src_path="/var/log/$app" ynh_backup --src_path="/etc/systemd/system/$app-daemon.service" diff --git a/scripts/upgrade b/scripts/upgrade index 4a1ca5b..cda53dd 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,12 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# CHECK VERSION -#================================================= - -upgrade_type=$(ynh_check_app_version_changed) - #================================================= # STOP SYSTEMD SERVICE #================================================= @@ -25,15 +19,17 @@ ynh_systemd_action --service_name="$app-daemon" --action="stop" --log_path="/var #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression --message="Upgrading source files..." --weight=1 -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Upgrading source files..." --weight=1 +# Download, check integrity, uncompress and patch the source from app.src +ynh_setup_source --dest_dir="$install_dir" --keep="config/local.config.php" +ynh_setup_source --dest_dir="$install_dir/addon" --source_id="addons" - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" --keep="config/local.config.php" - ynh_setup_source --dest_dir="$install_dir/addon" --source_id="addons" -fi +# 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" chmod -R o-rwx "$install_dir" chown -R "$app:www-data" "$install_dir" @@ -78,7 +74,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'," --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'," --target_file="$install_dir/config/local.config.php" ynh_store_file_checksum --file="$install_dir/config/local.config.php" fi diff --git a/tests.toml b/tests.toml index 5071587..2d8b9f8 100644 --- a/tests.toml +++ b/tests.toml @@ -10,4 +10,4 @@ exclude = [ "install.private" ] # Commits to test upgrade from # ------------------------------- -test_upgrade_from.dc7cd3eabe212708375c0dcd4ee994a1373a8122.name = "Upgrade from 2023.01~ynh1" +test_upgrade_from.a93169d04583ff13ba7d29aa4962477fb7e3b468.name = "Upgrade from 2023.12~ynh3"