1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/friendica_ynh.git synced 2024-09-03 18:36:14 +02:00

Merge pull request #131 from YunoHost-Apps/testing

Testing 2024.03~ynh1
This commit is contained in:
eric_G 2024-06-07 22:43:31 +02:00 committed by GitHub
commit 81156424ee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 30 additions and 44 deletions

View file

@ -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:** <https://dir.friendica.social/servers>

View file

@ -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:** <https://dir.friendica.social/servers>

View file

@ -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:** <https://dir.friendica.social/servers>

View file

@ -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:** <https://dir.friendica.social/servers>

View file

@ -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:** <https://dir.friendica.social/servers>

View file

@ -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
**演示:** <https://dir.friendica.social/servers>

View file

@ -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

View file

@ -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"

View file

@ -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"

View file

@ -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

View file

@ -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"