From b4fa11626962357cea14ace704c805442109f013 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 27 May 2022 11:45:14 +0000 Subject: [PATCH 1/4] Auto-update README --- README.md | 19 +++++++++---------- README_fr.md | 25 ++++++++++++++----------- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 9d35b8a..a0f0d55 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # Epicyon for YunoHost -[![Integration level](https://dash.yunohost.org/integration/epicyon.svg)](https://dash.yunohost.org/appci/app/epicyon) ![](https://ci-apps.yunohost.org/ci/badges/epicyon.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/epicyon.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/epicyon.svg)](https://dash.yunohost.org/appci/app/epicyon) ![Working status](https://ci-apps.yunohost.org/ci/badges/epicyon.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/epicyon.maintain.svg) [![Install Epicyon with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=epicyon) *[Lire ce readme en français.](./README_fr.md)* @@ -19,28 +19,27 @@ Federated social network server **Shipped version:** 20.01.2022~ynh1 - - ## Screenshots -![](./doc/screenshots/screenshot_starlight.jpg) +![Screenshot of Epicyon](./doc/screenshots/screenshot_starlight.jpg) ## Documentation and resources -* Official app website: https://epicyon.net -* Upstream app code repository: https://gitlab.com/bashrc2/epicyon/ -* YunoHost documentation for this app: https://yunohost.org/app_epicyon -* Report a bug: https://github.com/YunoHost-Apps/epicyon_ynh/issues +* Official app website: +* Upstream app code repository: +* YunoHost documentation for this app: +* Report a bug: ## Developer info Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/epicyon_ynh/tree/testing). To try the testing branch, please proceed like that. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/epicyon_ynh/tree/testing --debug or sudo yunohost app upgrade epicyon -u https://github.com/YunoHost-Apps/epicyon_ynh/tree/testing --debug ``` -**More info regarding app packaging:** https://yunohost.org/packaging_apps \ No newline at end of file +**More info regarding app packaging:** diff --git a/README_fr.md b/README_fr.md index fdfe46d..e7510a9 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,10 +1,14 @@ + + # Epicyon pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/epicyon.svg)](https://dash.yunohost.org/appci/app/epicyon) ![](https://ci-apps.yunohost.org/ci/badges/epicyon.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/epicyon.maintain.svg) +[![Niveau d'intégration](https://dash.yunohost.org/integration/epicyon.svg)](https://dash.yunohost.org/appci/app/epicyon) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/epicyon.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/epicyon.maintain.svg) [![Installer Epicyon avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=epicyon) *[Read this readme in english.](./README.md)* -*[Lire ce readme en français.](./README_fr.md)* > *Ce package vous permet d'installer Epicyon rapidement et simplement sur un serveur YunoHost. Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* @@ -15,28 +19,27 @@ Serveur de réseau social fédéré **Version incluse :** 20.01.2022~ynh1 - - ## Captures d'écran -![](./doc/screenshots/screenshot_starlight.jpg) +![Capture d'écran de Epicyon](./doc/screenshots/screenshot_starlight.jpg) ## Documentations et ressources -* Site officiel de l'app : https://epicyon.net -* Dépôt de code officiel de l'app : https://gitlab.com/bashrc2/epicyon/ -* Documentation YunoHost pour cette app : https://yunohost.org/app_epicyon -* Signaler un bug : https://github.com/YunoHost-Apps/epicyon_ynh/issues +* Site officiel de l'app : +* Dépôt de code officiel de l'app : +* Documentation YunoHost pour cette app : +* Signaler un bug : ## Informations pour les développeurs Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/epicyon_ynh/tree/testing). Pour essayer la branche testing, procédez comme suit. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/epicyon_ynh/tree/testing --debug ou sudo yunohost app upgrade epicyon -u https://github.com/YunoHost-Apps/epicyon_ynh/tree/testing --debug ``` -**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps \ No newline at end of file +**Plus d'infos sur le packaging d'applications :** From 1f69303951f266b0800d36657cf02e734d0c7422 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 2 Aug 2022 04:04:50 +0200 Subject: [PATCH 2/4] Upgrade to 2022.08.02~ynh1 --- check_process | 7 ++----- conf/app.src | 5 +++-- conf/nginx.conf | 2 +- conf/systemd.service | 2 +- doc/DESCRIPTION.md | 1 + doc/DESCRIPTION_fr.md | 1 + manifest.json | 2 +- scripts/install | 16 ++++++++-------- scripts/restore | 16 ++++++++-------- scripts/upgrade | 21 ++++++++++----------- sources/extra_files/app/.gitignore | 2 -- sources/patches/.gitignore | 2 -- 12 files changed, 36 insertions(+), 41 deletions(-) create mode 100644 doc/DESCRIPTION.md create mode 100644 doc/DESCRIPTION_fr.md delete mode 100644 sources/extra_files/app/.gitignore delete mode 100644 sources/patches/.gitignore diff --git a/check_process b/check_process index fc9c03d..4766f13 100644 --- a/check_process +++ b/check_process @@ -11,7 +11,8 @@ setup_private=0 setup_public=1 upgrade=1 - # upgrade=1 from_commit=CommitHash + # 20.01.2022~ynh1 + upgrade=1 from_commit=52c1e2d4fbf5221e32025bc28939b93a64622031 backup_restore=1 multi_instance=1 port_already_use=1 @@ -19,7 +20,3 @@ ;;; Options Email= Notification=none -;;; Upgrade options - ; commit=CommitHash - name=Name and date of the commit. - manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666& diff --git a/conf/app.src b/conf/app.src index 763ab76..f11a202 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,6 +1,7 @@ -SOURCE_URL=https://gitlab.com/bashrc2/epicyon/-/archive/18088169e682c05cba03349e01e759981396222f/epicyon-18088169e682c05cba03349e01e759981396222f.tar.gz -SOURCE_SUM=a560c52d49a22efd75a9c5006d695765f1a29ad70718fc50a0b26fcbcf640e0c +SOURCE_URL=https://gitlab.com/bashrc2/epicyon/-/archive/9d7856f9c0434b1587ae90ce19739ece6db6c206/epicyon-9d7856f9c0434b1587ae90ce19739ece6db6c206.tar.gz +SOURCE_SUM=6171f537792b67fff24eaf495ea791dd7d153739990764d8be8d09722b03291c SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true +SOURCE_FILENAME= SOURCE_EXTRACT=true diff --git a/conf/nginx.conf b/conf/nginx.conf index fde4204..1633f86 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,5 +1,5 @@ #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; -location __PATH__/ { +location __PATH__/ { proxy_pass http://localhost:__PORT__; proxy_http_version 1.1; diff --git a/conf/systemd.service b/conf/systemd.service index c21d97c..f33a0ea 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,7 +7,7 @@ Type=simple User=__APP__ Group=__APP__ WorkingDirectory=__FINALPATH__/ -ExecStart=/usr/bin/python3 __FINALPATH__/epicyon.py --port 443 --proxy __PORT__ --domain __DOMAIN__ --registration close --debug +ExecStart=/usr/bin/python3 __FINALPATH__/epicyon.py --port 443 --proxy __PORT__ --domain __DOMAIN__ --registration open --log_login_failures Environment=USER=__APP__ Environment=PYTHONUNBUFFERED=true Restart=always diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md new file mode 100644 index 0000000..5b3aaf6 --- /dev/null +++ b/doc/DESCRIPTION.md @@ -0,0 +1 @@ +ActivityPub server implementing S2S and C2S protocols, suitable for single board computers. Includes features such as moderation tools, post expiry, content warnings, and image descriptions diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md new file mode 100644 index 0000000..d7edb26 --- /dev/null +++ b/doc/DESCRIPTION_fr.md @@ -0,0 +1 @@ +Serveur ActivityPub mettant en œuvre les protocoles S2S et C2S, adapté aux ordinateurs monocartes. Comprend des fonctionnalités telles que des outils de modération, l'expiration des messages, des avertissements sur le contenu et des descriptions d'images. diff --git a/manifest.json b/manifest.json index d334fbc..354475f 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Federated social network server", "fr": "Serveur de réseau social fédéré" }, - "version": "20.01.2022~ynh1", + "version": "2022.08.02~ynh1", "url": "https://epicyon.net/", "upstream": { "license": "AGPL-1.0-or-later", diff --git a/scripts/install b/scripts/install index 2fcec15..ff278d0 100755 --- a/scripts/install +++ b/scripts/install @@ -14,7 +14,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_clean_setup () { - true + ynh_clean_check_starting } # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -26,11 +26,12 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url="/" admin=$YNH_APP_ARG_ADMIN -email=$(ynh_user_get_info $admin 'mail') password=$YNH_APP_ARG_PASSWORD app=$YNH_APP_INSTANCE_NAME +email=$(ynh_user_get_info --username=$admin --key="mail") + #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= @@ -61,7 +62,7 @@ ynh_app_setting_set --app=$app --key=admin --value=$admin ynh_script_progression --message="Finding an available port..." --weight=1 # Find an available port -port=$(ynh_find_port --port=7156) +port=$(ynh_find_port --port=8095) ynh_app_setting_set --app=$app --key=port --value=$port #================================================= @@ -86,9 +87,8 @@ ynh_script_progression --message="Setting up source files..." --weight=1 ynh_app_setting_set --app=$app --key=final_path --value=$final_path ynh_app_setting_set --app=$app --key=public_path --value=$public_path - -# Clone repo, create public path and link accounts -git clone https://gitlab.com/bashrc2/epicyon $final_path --quiet +# Download, check integrity, uncompress and patch the source from app.src +ynh_setup_source --dest_dir="$final_path" mkdir $public_path mkdir -p $final_path/accounts/newsmirror @@ -113,9 +113,9 @@ ynh_add_nginx_config #================================================= # SPECIFIC SETUP #================================================= -# ... +# CREATE ADMIN USER #================================================= -ynh_script_progression --message="Create admin user" --weight=1 +ynh_script_progression --message="Creating admin user" --weight=1 # Create admin python3 $final_path/epicyon.py --addaccount=$admin --password=$password --domain=$domain diff --git a/scripts/restore b/scripts/restore index 6720c80..0922b0e 100755 --- a/scripts/restore +++ b/scripts/restore @@ -15,7 +15,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_clean_setup () { - true + ynh_clean_check_starting } # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -42,13 +42,6 @@ test ! -d $final_path \ #================================================= # STANDARD RESTORATION STEPS -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the NGINX web server configuration..." - -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" - #================================================= # RECREATE THE DEDICATED USER #================================================= @@ -86,6 +79,13 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=1 # Define and install dependencies ynh_install_app_dependencies $pkg_dependencies +#================================================= +# RESTORE THE NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Restoring the NGINX web server configuration..." + +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" + #================================================= # RESTORE SYSTEMD #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 9caeea5..bfe4c0a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -37,6 +37,7 @@ ynh_script_progression --message="Backing up the app before upgrading (may take # Backup the current version of the app ynh_backup_before_upgrade ynh_clean_setup () { + ynh_clean_check_starting # Restore it if the upgrade fails ynh_restore_upgradebackup } @@ -68,10 +69,8 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=1 - # Pull the latest sorce - pushd "$final_path" - git pull --quiet - popd + # Download, check integrity, uncompress and patch the source from app.src + ynh_setup_source --dest_dir="$final_path" fi chmod 750 "$final_path" @@ -79,6 +78,13 @@ chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" chown -R $app: $public_path +#================================================= +# UPGRADE DEPENDENCIES +#================================================= +ynh_script_progression --message="Upgrading dependencies..." --weight=1 + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # NGINX CONFIGURATION #================================================= @@ -87,13 +93,6 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# UPGRADE DEPENDENCIES -#================================================= -ynh_script_progression --message="Upgrading dependencies..." --weight=1 - -ynh_install_app_dependencies $pkg_dependencies - #================================================= # SETUP SYSTEMD #================================================= diff --git a/sources/extra_files/app/.gitignore b/sources/extra_files/app/.gitignore deleted file mode 100644 index 783a4ae..0000000 --- a/sources/extra_files/app/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*~ -*.sw[op] diff --git a/sources/patches/.gitignore b/sources/patches/.gitignore deleted file mode 100644 index 783a4ae..0000000 --- a/sources/patches/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*~ -*.sw[op] From bfd4561230bc83595a8f829178b8045e51c3d21a Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 2 Aug 2022 04:05:47 +0200 Subject: [PATCH 3/4] Charset --- doc/DESCRIPTION_fr.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md index d7edb26..9430691 100644 --- a/doc/DESCRIPTION_fr.md +++ b/doc/DESCRIPTION_fr.md @@ -1 +1 @@ -Serveur ActivityPub mettant en œuvre les protocoles S2S et C2S, adapté aux ordinateurs monocartes. Comprend des fonctionnalités telles que des outils de modération, l'expiration des messages, des avertissements sur le contenu et des descriptions d'images. +Serveur ActivityPub mettant en Å“uvre les protocoles S2S et C2S, adapté aux ordinateurs monocartes. Comprend des fonctionnalités telles que des outils de modération, l'expiration des messages, des avertissements sur le contenu et des descriptions d'images. From 9d7f2fd745b42fda723ef9b38e04800080a2a7c7 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 2 Aug 2022 02:05:51 +0000 Subject: [PATCH 4/4] 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 a0f0d55..3a6e18f 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,10 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ## Overview -Federated social network server +ActivityPub server implementing S2S and C2S protocols, suitable for single board computers. Includes features such as moderation tools, post expiry, content warnings, and image descriptions -**Shipped version:** 20.01.2022~ynh1 + +**Shipped version:** 2022.08.02~ynh1 ## Screenshots diff --git a/README_fr.md b/README_fr.md index e7510a9..a229dc9 100644 --- a/README_fr.md +++ b/README_fr.md @@ -15,9 +15,10 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour ## Vue d'ensemble -Serveur de réseau social fédéré +Serveur ActivityPub mettant en Å“uvre les protocoles S2S et C2S, adapté aux ordinateurs monocartes. Comprend des fonctionnalités telles que des outils de modération, l'expiration des messages, des avertissements sur le contenu et des descriptions d'images. -**Version incluse :** 20.01.2022~ynh1 + +**Version incluse :** 2022.08.02~ynh1 ## Captures d'écran