From e66eb25fec4b65192f05e0329d33bf9328689959 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 4 Oct 2022 09:15:02 +0200 Subject: [PATCH] Testing (#73) * Update upgrade * Update manifest.json * Auto-update README * Update restore * Update remove * Create DESCRIPTION.md * Auto-update README * Update DESCRIPTION.md * Auto-update README * Create updater.sh * Update arm64.src * Update manifest.json * Auto-update README * Update updater.sh * Update updater.sh * Update manifest.json * Upgrade to version 1.3.7 (#62) * Upgrade to v1.3.7 * Auto-update README Co-authored-by: yunohost-bot Co-authored-by: Yunohost-Bot <> * Update manifest.json * Update check_process * keep config (#67) * Update upgrade * Update manifest.json * Auto-update README * Auto-update README * 4.3 * Update manifest.json * Auto-update README * Update manifest.json * Auto-update README * Update upgrade * fix linter (#72) Co-authored-by: Yunohost-Bot <> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: yunohost-bot Co-authored-by: yunohost-bot --- README.md | 24 ++++++++++++------------ README_fr.md | 30 +++++++++++++++++------------- conf/{x86_64.src => amd64.src} | 0 manifest.json | 4 ++-- scripts/_common.sh | 21 --------------------- scripts/install | 17 ++++++++--------- scripts/upgrade | 16 +++++++--------- 7 files changed, 46 insertions(+), 66 deletions(-) rename conf/{x86_64.src => amd64.src} (100%) diff --git a/README.md b/README.md index 33c3318..42e4757 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # Simple Torrent for YunoHost -[![Integration level](https://dash.yunohost.org/integration/simple-torrent.svg)](https://dash.yunohost.org/appci/app/simple-torrent) ![](https://ci-apps.yunohost.org/ci/badges/simple-torrent.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/simple-torrent.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/simple-torrent.svg)](https://dash.yunohost.org/appci/app/simple-torrent) ![Working status](https://ci-apps.yunohost.org/ci/badges/simple-torrent.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/simple-torrent.maintain.svg) [![Install Simple Torrent with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=simple-torrent) *[Lire ce readme en français.](./README_fr.md)* @@ -30,14 +30,13 @@ SimpleTorrent is a a self-hosted remote torrent client, written in Go (golang). - Magnet RSS subscribing supported -**Shipped version:** 1.3.9~ynh3 - +**Shipped version:** 1.3.9~ynh4 *(:warning: This is the `testing` branch. The [`master` branch](https://github.com/YunoHost-Apps/simple-torrent_ynh/tree/master) used in the catalog is currently on version 1.3.9\~ynh3.)* ## Screenshots -![](./doc/screenshots/64239393-bdbb6480-cf32-11e9-9269-d8d10e7c0dc7.png) -![](./doc/screenshots/.DS_Store) +![Screenshot of Simple Torrent](./doc/screenshots/64239393-bdbb6480-cf32-11e9-9269-d8d10e7c0dc7.png) +![Screenshot of Simple Torrent](./doc/screenshots/.DS_Store) ## Disclaimers / important information @@ -53,21 +52,22 @@ You can also configure Simple Torrent by editing this file `/var/www/simple-torr ## Documentation and resources -* Official app website: https://github.com/boypt/simple-torrent -* Official admin documentation: https://github.com/boypt/simple-torrent/wiki -* Upstream app code repository: https://github.com/boypt/simple-torrent -* YunoHost documentation for this app: https://yunohost.org/app_simple-torrent -* Report a bug: https://github.com/YunoHost-Apps/simple-torrent_ynh/issues +* Official app website: +* Official admin documentation: +* 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/simple-torrent_ynh/tree/testing). To try the testing branch, please proceed like that. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/simple-torrent_ynh/tree/testing --debug or sudo yunohost app upgrade simple-torrent -u https://github.com/YunoHost-Apps/simple-torrent_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 d4f469e..a1cf53e 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,10 +1,14 @@ + + # Simple Torrent pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/simple-torrent.svg)](https://dash.yunohost.org/appci/app/simple-torrent) ![](https://ci-apps.yunohost.org/ci/badges/simple-torrent.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/simple-torrent.maintain.svg) +[![Niveau d'intégration](https://dash.yunohost.org/integration/simple-torrent.svg)](https://dash.yunohost.org/appci/app/simple-torrent) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/simple-torrent.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/simple-torrent.maintain.svg) [![Installer Simple Torrent avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=simple-torrent) *[Read this readme in english.](./README.md)* -*[Lire ce readme en français.](./README_fr.md)* > *Ce package vous permet d'installer Simple Torrent 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.* @@ -26,14 +30,13 @@ SimpleTorrent is a a self-hosted remote torrent client, written in Go (golang). - Magnet RSS subscribing supported -**Version incluse :** 1.3.9~ynh3 - +**Version incluse :** 1.3.9~ynh4 *(:warning: Il s'agit de la branche `testing`. La [branche `master`](https://github.com/YunoHost-Apps/simple-torrent_ynh/tree/master) utilisée dans le catalogue est actuellement en 1.3.9\~ynh3.)* ## Captures d'écran -![](./doc/screenshots/64239393-bdbb6480-cf32-11e9-9269-d8d10e7c0dc7.png) -![](./doc/screenshots/.DS_Store) +![Capture d'écran de Simple Torrent](./doc/screenshots/64239393-bdbb6480-cf32-11e9-9269-d8d10e7c0dc7.png) +![Capture d'écran de Simple Torrent](./doc/screenshots/.DS_Store) ## Avertissements / informations importantes @@ -49,21 +52,22 @@ Vous pouvez configurer Simple Torrent en modifiant le fichier `/var/www/simple-t ## Documentations et ressources -* Site officiel de l'app : https://github.com/boypt/simple-torrent -* Documentation officielle de l'admin : https://github.com/boypt/simple-torrent/wiki -* Dépôt de code officiel de l'app : https://github.com/boypt/simple-torrent -* Documentation YunoHost pour cette app : https://yunohost.org/app_simple-torrent -* Signaler un bug : https://github.com/YunoHost-Apps/simple-torrent_ynh/issues +* Site officiel de l'app : +* Documentation officielle de l'admin : +* 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/simple-torrent_ynh/tree/testing). Pour essayer la branche testing, procédez comme suit. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/simple-torrent_ynh/tree/testing --debug ou sudo yunohost app upgrade simple-torrent -u https://github.com/YunoHost-Apps/simple-torrent_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 :** diff --git a/conf/x86_64.src b/conf/amd64.src similarity index 100% rename from conf/x86_64.src rename to conf/amd64.src diff --git a/manifest.json b/manifest.json index 79b540b..a113cff 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Self-hosted remote torrent client", "fr": "Client torrent distant auto-hébergé" }, - "version": "1.3.9~ynh3", + "version": "1.3.9~ynh4", "url": "https://github.com/boypt/simple-torrent", "upstream": { "license": "AGPL-3.0-only", @@ -19,7 +19,7 @@ "name": "eric_G" }, "requirements": { - "yunohost": ">= 4.3.0" + "yunohost": ">= 11.0.9" }, "multi_instance": true, "services": [ diff --git a/scripts/_common.sh b/scripts/_common.sh index 8fc49a5..944a65e 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -15,24 +15,3 @@ #================================================= # FUTURE OFFICIAL HELPERS #================================================= - -# Check the architecture -# -# example: architecture=$(ynh_detect_arch) -# -# usage: ynh_detect_arch -# -# Requires YunoHost version 2.2.4 or higher. -ynh_detect_arch() { - local architecture - if [ -n "$(uname -m | grep arm64)" ] || [ -n "$(uname -m | grep aarch64)" ]; then - architecture="arm64" - elif [ -n "$(uname -m | grep 86)" ]; then - architecture="i386" - elif [ -n "$(uname -m | grep 64)" ]; then - architecture="x86_64" - else - architecture="unknown" - fi - echo $architecture -} diff --git a/scripts/install b/scripts/install index 12beb0c..3256489 100644 --- a/scripts/install +++ b/scripts/install @@ -23,7 +23,6 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH is_public=$YNH_APP_ARG_IS_PUBLIC -architecture=$(ynh_detect_arch) app=$YNH_APP_INSTANCE_NAME @@ -32,11 +31,11 @@ app=$YNH_APP_INSTANCE_NAME #================================================= ynh_script_progression --message="Validating installation parameters..." --weight=1 -# Check machine architecture (in particular, we don't support ARM 32bit machines) -if [ $architecture == "unknown" ] -then - ynh_die --message="Sorry, this app cannot be installed on a 32-bit ARM machine." -fi +# Stop if architecture is 32-bit ARM +case $YNH_ARCH in + arm|armhf) ynh_die --message="Sorry, your architecture $YNH_ARCH is not supported by $app. Aborting.";; + *) ;; +esac final_path=/var/www/$app test ! -e "$final_path" || ynh_die --message="This path already contains a folder" @@ -86,11 +85,11 @@ ynh_script_progression --message="Setting up source files..." --weight=4 ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Download, check integrity, uncompress and patch the source from app.src -ynh_setup_source --dest_dir=$final_path --source_id="$architecture" +ynh_setup_source --dest_dir=$final_path --source_id=$YNH_ARCH pushd "$final_path" - gzip --decompress $(ynh_detect_arch).gz - mv $(ynh_detect_arch) $app + gzip --decompress $YNH_ARCH.gz + mv $YNH_ARCH $app popd chmod 750 "$final_path" diff --git a/scripts/upgrade b/scripts/upgrade index b7e46f0..d93dfba 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -21,7 +21,6 @@ path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) port=$(ynh_app_setting_get --app=$app --key=port) peer_port=$(ynh_app_setting_get --app=$app --key=peer_port) -architecture=$(ynh_detect_arch) #================================================= # CHECK VERSION @@ -48,11 +47,10 @@ ynh_abort_if_errors #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 -# Check machine architecture (in particular, we don't support ARM 32bit machines) -if [ $architecture == "unknown" ] -then - ynh_die --message="Sorry, this app cannot be installed on a 32-bit ARM machine." -fi +case $YNH_ARCH in + arm|armhf) ynh_die --message="Sorry, your architecture $YNH_ARCH is not supported by $app. Aborting.";; + *) ;; +esac # Cleaning legacy permissions if ynh_legacy_permissions_exists; then @@ -87,11 +85,11 @@ then ynh_script_progression --message="Upgrading source files..." --weight=5 # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir=$final_path --source_id="$architecture" --keep="$final_path/config.yml" + ynh_setup_source --dest_dir=$final_path --source_id=$YNH_ARCH --keep="config.yml" pushd "$final_path" - gzip --decompress $(ynh_detect_arch).gz - mv $(ynh_detect_arch) $app + gzip --decompress $YNH_ARCH.gz + mv $YNH_ARCH $app popd fi