From 025da9b6e9edf68dde5a202318153a418fdb7ea7 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 12 Aug 2022 13:20:51 +0000 Subject: [PATCH 01/23] Auto-update README --- README.md | 1 + README_fr.md | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 07ddb88..840d038 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ Transmission is a fast, easy, and free BitTorrent client. **Shipped version:** 2.94~ynh1 + ## Screenshots ![Screenshot of Transmission](./doc/screenshots/transmission.jpg) diff --git a/README_fr.md b/README_fr.md index 2b7213c..73f9f36 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,8 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Transmission est un client BitTorrent libre, efficace et simple. -**Version incluse :** 2.94~ynh1 +**Version incluse :** 2.94~ynh1 + ## Captures d'écran From 84582c184bf2ed1b96b5d872add90b41229a76a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 14 Aug 2022 14:55:13 +0200 Subject: [PATCH 02/23] Bullseye (#95) * Upgrade to bullseye * Auto-update README * Auto-update README * Update check_process * Update manifest.json Co-authored-by: yunohost-bot --- README.md | 2 +- README_fr.md | 2 +- check_process | 11 +++++++---- manifest.json | 8 ++++---- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 840d038..d8048da 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Transmission is a fast, easy, and free BitTorrent client. -**Shipped version:** 2.94~ynh1 +**Shipped version:** 3.00~ynh1 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 73f9f36..ba6115c 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Transmission est un client BitTorrent libre, efficace et simple. -**Version incluse :** 2.94~ynh1 +**Version incluse :** 3.00~ynh1 ## Captures d'écran diff --git a/check_process b/check_process index d9debb8..7812ab9 100644 --- a/check_process +++ b/check_process @@ -10,10 +10,8 @@ setup_private=1 setup_public=0 upgrade=1 - # 1.0 - upgrade=1 from_commit=7d887f6bc1e29ce94de703517d5302580cbb8a7e - # 1.0~ynh4 - upgrade=1 from_commit=c65b76e919089f3f88d2522cef2300db6f78201f + # 2.94~ynh1 + upgrade=1 from_commit=c07a09d875cf11b4e3a3147e9e35ef5e06788cff backup_restore=1 multi_instance=0 port_already_use=0 @@ -21,3 +19,8 @@ ;;; Options Email= Notification=none +;;; Upgrade options + ; commit=c07a09d875cf11b4e3a3147e9e35ef5e06788cff + name=2.94~ynh1 + manifest_arg=domain=DOMAIN&path=PATH&is_public=1&language=fr&admin=USER&password=pass&port=666& + diff --git a/manifest.json b/manifest.json index 76d2285..d1dc689 100644 --- a/manifest.json +++ b/manifest.json @@ -3,10 +3,10 @@ "id": "transmission", "packaging_format": 1, "description": { - "en": "A Fast, Easy, and Free BitTorrent Client", - "fr": "Un client BitTorrent libre et rapide" + "en": "Fast, Easy, and Free BitTorrent Client", + "fr": "Client BitTorrent libre et rapide" }, - "version": "2.94~ynh1", + "version": "3.00~ynh1", "url": "https://www.transmissionbt.com", "upstream": { "license": "GPL-3.0", @@ -20,7 +20,7 @@ "email": "" }, "requirements": { - "yunohost": ">= 4.3.0" + "yunohost": ">= 11.0.9" }, "multi_instance": false, "services": [ From b4e202dd0e78125c1c2a30a9a8eefdba02dd4209 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 15 Aug 2022 08:35:37 +0200 Subject: [PATCH 03/23] Update manifest.json --- manifest.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index d1dc689..9cc1b18 100644 --- a/manifest.json +++ b/manifest.json @@ -12,7 +12,8 @@ "license": "GPL-3.0", "website": "https://www.transmissionbt.com", "admindoc": "https://github.com/transmission/transmission/wiki", - "code": "https://github.com/transmission/transmission" + "code": "https://github.com/transmission/transmission", + "cpe": "cpe:2.3:a:transmissionbt:transmission" }, "license": "GPL-3.0", "maintainer": { From 8dd54d949a3fe9d30be00ac82739d08e2dc00b0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 22 Nov 2022 20:53:45 +0100 Subject: [PATCH 04/23] Update upgrade --- scripts/upgrade | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 20dffbd..c388f8f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -26,7 +26,6 @@ rpcpassword=$(ynh_app_setting_get --app=$app --key=rpcpassword) #================================================= # CHECK VERSION #================================================= -ynh_script_progression --message="Checking version..." upgrade_type=$(ynh_check_app_version_changed) From b69e38616608e47ae4d344b35703ff4347c3014a Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 22 Nov 2022 19:53:51 +0000 Subject: [PATCH 05/23] Auto-update README --- README.md | 1 - README_fr.md | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index d8048da..0b94b03 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,6 @@ Transmission is a fast, easy, and free BitTorrent client. **Shipped version:** 3.00~ynh1 - ## Screenshots ![Screenshot of Transmission](./doc/screenshots/transmission.jpg) diff --git a/README_fr.md b/README_fr.md index ba6115c..b27ac07 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,8 +18,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Transmission est un client BitTorrent libre, efficace et simple. -**Version incluse :** 3.00~ynh1 - +**Version incluse :** 3.00~ynh1 ## Captures d'écran From 898d34dbd1963f4edf6c4768bdd9e1c5e6a98dc1 Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 27 Sep 2023 11:58:18 +0200 Subject: [PATCH 06/23] Version 2 (#99) * Update install * v2 * Auto-update README * v2 * fix * Auto-update README * Delete updater.sh * fix * fix * Update restore * fix * Update manifest.toml * add sudirs * Update install * cleaning * Update upgrade * Update tests.toml * Update manifest.toml * Update manifest.toml * cleaning * Auto-update README * cleaning * fix --------- Co-authored-by: yunohost-bot --- .github/workflows/updater.sh | 137 -------------------------- README.md | 31 ++---- README_fr.md | 49 +++------ check_process | 26 ----- conf/nginx.conf | 2 +- conf/settings.json | 8 +- doc/{DISCLAIMER.md => ADMIN.md} | 4 - doc/{DISCLAIMER_fr.md => ADMIN_fr.md} | 4 - doc/DESCRIPTION.md | 4 + doc/DESCRIPTION_fr.md | 4 + manifest.json | 45 --------- manifest.toml | 64 ++++++++++++ scripts/_common.sh | 3 - scripts/backup | 19 +--- scripts/change_url | 89 +---------------- scripts/install | 104 +++---------------- scripts/remove | 61 +----------- scripts/restore | 69 +++---------- scripts/upgrade | 95 +++--------------- tests.toml | 13 +++ 20 files changed, 157 insertions(+), 674 deletions(-) delete mode 100644 .github/workflows/updater.sh delete mode 100644 check_process rename doc/{DISCLAIMER.md => ADMIN.md} (88%) rename doc/{DISCLAIMER_fr.md => ADMIN_fr.md} (87%) delete mode 100644 manifest.json create mode 100644 manifest.toml create mode 100644 tests.toml diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh deleted file mode 100644 index 72eb5cb..0000000 --- a/.github/workflows/updater.sh +++ /dev/null @@ -1,137 +0,0 @@ -#!/bin/bash - -#================================================= -# PACKAGE UPDATING HELPER -#================================================= - -# This script is meant to be run by GitHub Actions -# The YunoHost-Apps organisation offers a template Action to run this script periodically -# Since each app is different, maintainers can adapt its contents so as to perform -# automatic actions when a new upstream release is detected. - -# Remove this exit command when you are ready to run this Action -exit 1 - -#================================================= -# FETCHING LATEST RELEASE AND ITS ASSETS -#================================================= - -# Fetching information -current_version=$(cat manifest.json | jq -j '.version|split("~")[0]') -repo=$(cat manifest.json | jq -j '.upstream.code|split("https://github.com/")[1]') -# Some jq magic is needed, because the latest upstream release is not always the latest version (e.g. security patches for older versions) -version=$(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '.[] | select( .prerelease != true ) | .tag_name' | sort -V | tail -1) -assets=($(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '[ .[] | select(.tag_name=="'$version'").assets[].browser_download_url ] | join(" ") | @sh' | tr -d "'")) - -# Later down the script, we assume the version has only digits and dots -# Sometimes the release name starts with a "v", so let's filter it out. -# You may need more tweaks here if the upstream repository has different naming conventions. -if [[ ${version:0:1} == "v" || ${version:0:1} == "V" ]]; then - version=${version:1} -fi - -# Setting up the environment variables -echo "Current version: $current_version" -echo "Latest release from upstream: $version" -echo "VERSION=$version" >> $GITHUB_ENV -echo "REPO=$repo" >> $GITHUB_ENV -# For the time being, let's assume the script will fail -echo "PROCEED=false" >> $GITHUB_ENV - -# Proceed only if the retrieved version is greater than the current one -if ! dpkg --compare-versions "$current_version" "lt" "$version" ; then - echo "::warning ::No new version available" - exit 0 -# Proceed only if a PR for this new version does not already exist -elif git ls-remote -q --exit-code --heads https://github.com/$GITHUB_REPOSITORY.git ci-auto-update-v$version ; then - echo "::warning ::A branch already exists for this update" - exit 0 -fi - -# Each release can hold multiple assets (e.g. binaries for different architectures, source code, etc.) -echo "${#assets[@]} available asset(s)" - -#================================================= -# UPDATE SOURCE FILES -#================================================= - -# Here we use the $assets variable to get the resources published in the upstream release. -# Here is an example for Grav, it has to be adapted in accordance with how the upstream releases look like. - -# Let's loop over the array of assets URLs -for asset_url in ${assets[@]}; do - -echo "Handling asset at $asset_url" - -# Assign the asset to a source file in conf/ directory -# Here we base the source file name upon a unique keyword in the assets url (admin vs. update) -# Leave $src empty to ignore the asset -case $asset_url in - *"admin"*) - src="app" - ;; - *"update"*) - src="app-upgrade" - ;; - *) - src="" - ;; -esac - -# If $src is not empty, let's process the asset -if [ ! -z "$src" ]; then - -# Create the temporary directory -tempdir="$(mktemp -d)" - -# Download sources and calculate checksum -filename=${asset_url##*/} -curl --silent -4 -L $asset_url -o "$tempdir/$filename" -checksum=$(sha256sum "$tempdir/$filename" | head -c 64) - -# Delete temporary directory -rm -rf $tempdir - -# Get extension -if [[ $filename == *.tar.gz ]]; then - extension=tar.gz -else - extension=${filename##*.} -fi - -# Rewrite source file -cat < conf/$src.src -SOURCE_URL=$asset_url -SOURCE_SUM=$checksum -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=$extension -SOURCE_IN_SUBDIR=true -SOURCE_FILENAME= -EOT -echo "... conf/$src.src updated" - -else -echo "... asset ignored" -fi - -done - -#================================================= -# SPECIFIC UPDATE STEPS -#================================================= - -# Any action on the app's source code can be done. -# The GitHub Action workflow takes care of committing all changes after this script ends. - -#================================================= -# GENERIC FINALIZATION -#================================================= - -# Replace new version in manifest -echo "$(jq -s --indent 4 ".[] | .version = \"$version~ynh1\"" manifest.json)" > manifest.json - -# No need to update the README, yunohost-bot takes care of it - -# The Action will proceed only if the PROCEED environment variable is set to true -echo "PROCEED=true" >> $GITHUB_ENV -exit 0 diff --git a/README.md b/README.md index 0b94b03..aa17ba9 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,8 @@ It shall NOT be edited by hand. # Transmission for YunoHost -[![Integration level](https://dash.yunohost.org/integration/transmission.svg)](https://dash.yunohost.org/appci/app/transmission) ![Working status](https://ci-apps.yunohost.org/ci/badges/transmission.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/transmission.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/transmission.svg)](https://dash.yunohost.org/appci/app/transmission) ![Working status](https://ci-apps.yunohost.org/ci/badges/transmission.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/transmission.maintain.svg) + [![Install Transmission with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=transmission) *[Lire ce readme en français.](./README_fr.md)* @@ -17,6 +18,10 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Transmission is a fast, easy, and free BitTorrent client. +### YunoHost specific features + + * Integration with YunoHost Multimedia directories + **Shipped version:** 3.00~ynh1 @@ -24,30 +29,6 @@ Transmission is a fast, easy, and free BitTorrent client. ![Screenshot of Transmission](./doc/screenshots/transmission.jpg) -## Disclaimers / important information - -## YunoHost specific features - - * Integration with YunoHost Multimedia directories - -## Additionnal informations -Alternative to WebUI : - -You can use remote client on different platforms to manage your Transmission server: - -* Dekstop: Transmission-remote-GUI: https://github.com/transmission-remote-gui/transgui -* Mobile: Transdroid: http://www.transdroid.org/ -* More clients here: https://transmissionbt.com/resources/ - -You can use the following information to connect your server: - -* Remote host: Your domain or IP address (don't add folder) -* Port: 443 -* SSL: Enabled -* User: Your Yunohost Username -* Password: Password of the Yunohost User above -* RPC Path: /torrent/transmission/rpc (if you used the standard folder) - ## Documentation and resources * Official app website: diff --git a/README_fr.md b/README_fr.md index b27ac07..cb34c54 100644 --- a/README_fr.md +++ b/README_fr.md @@ -5,54 +5,35 @@ It shall NOT be edited by hand. # Transmission pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/transmission.svg)](https://dash.yunohost.org/appci/app/transmission) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/transmission.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/transmission.maintain.svg) +[![Niveau d’intégration](https://dash.yunohost.org/integration/transmission.svg)](https://dash.yunohost.org/appci/app/transmission) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/transmission.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/transmission.maintain.svg) + [![Installer Transmission avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=transmission) *[Read this readme in english.](./README.md)* -> *Ce package vous permet d'installer Transmission 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.* +> *Ce package vous permet d’installer Transmission 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.* -## Vue d'ensemble +## Vue d’ensemble Transmission est un client BitTorrent libre, efficace et simple. +### Caractéristiques spécifiques YunoHost + + * Intégration avec les répertoires Multimédias de YunoHost + **Version incluse :** 3.00~ynh1 -## Captures d'écran +## Captures d’écran -![Capture d'écran de Transmission](./doc/screenshots/transmission.jpg) - -## Avertissements / informations importantes - -## Caractéristiques spécifiques YunoHost - - * Intégration avec les répertoires Multimédias de YunoHost - -## Informations additionnelles -Alternative à WebUI : - -Vous pouvez utiliser le client de contrôle à distance des différentes plateformes pour gérer votre serveur Transmission : - -* Bureau : Transmission-remote-GUI : https://github.com/transmission-remote-gui/transgui -* Mobile : Transdroid : http://www.transdroid.org/ -* Plus de clients ici : https://transmissionbt.com/resources/ - -Vous pouvez utiliser les informations suivantes pour vous connecter à votre serveur : - -* Hôte distant : Votre domaine ou adresse IP (n'ajoutez pas le répertoire) -* Port : 443 -* SSL : Activé -* Utilisateur : Votre nom d'utilisateur YunoHost -* Mot de passe : Le mot de passe de l'utilisateur YunoHost utilisé -* Répertoire RPC : `/torrent/transmission/rpc` (si vous utilisez le répertoire par défaut) +![Capture d’écran de Transmission](./doc/screenshots/transmission.jpg) ## Documentations et ressources -* Site officiel de l'app : -* Documentation officielle de l'admin : -* Dépôt de code officiel de l'app : +* 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 : @@ -68,4 +49,4 @@ ou sudo yunohost app upgrade transmission -u https://github.com/YunoHost-Apps/transmission_ynh/tree/testing --debug ``` -**Plus d'infos sur le packaging d'applications :** +**Plus d’infos sur le packaging d’applications :** \ No newline at end of file diff --git a/check_process b/check_process deleted file mode 100644 index 7812ab9..0000000 --- a/check_process +++ /dev/null @@ -1,26 +0,0 @@ -;; Test complet - ; Manifest - domain="domain.tld" - path="/path" - ; Checks - pkg_linter=1 - setup_sub_dir=1 - setup_root=1 - setup_nourl=0 - setup_private=1 - setup_public=0 - upgrade=1 - # 2.94~ynh1 - upgrade=1 from_commit=c07a09d875cf11b4e3a3147e9e35ef5e06788cff - backup_restore=1 - multi_instance=0 - port_already_use=0 - change_url=1 -;;; Options -Email= -Notification=none -;;; Upgrade options - ; commit=c07a09d875cf11b4e3a3147e9e35ef5e06788cff - name=2.94~ynh1 - manifest_arg=domain=DOMAIN&path=PATH&is_public=1&language=fr&admin=USER&password=pass&port=666& - diff --git a/conf/nginx.conf b/conf/nginx.conf index a559aff..9b35405 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -19,7 +19,7 @@ location __PATH__/ { } location __PATH__/downloads/ { - alias __DATADIR__/completed/; + alias __DATA_DIR__/completed/; charset UTF-8; autoindex on; autoindex_exact_size off; diff --git a/conf/settings.json b/conf/settings.json index 14d56e6..42d75ef 100644 --- a/conf/settings.json +++ b/conf/settings.json @@ -12,7 +12,7 @@ "blocklist-url": "http://www.example.com/blocklist", "cache-size-mb": 4, "dht-enabled": true, - "download-dir": "__DATADIR__/completed", + "download-dir": "__DATA_DIR__/completed", "download-limit": 100, "download-limit-enabled": 0, "download-queue-enabled": true, @@ -20,7 +20,7 @@ "encryption": 1, "idle-seeding-limit": 30, "idle-seeding-limit-enabled": false, - "incomplete-dir": "__DATADIR__/progress", + "incomplete-dir": "__DATA_DIR__/progress", "incomplete-dir-enabled": true, "lpd-enabled": false, "max-peers-global": 200, @@ -29,7 +29,7 @@ "peer-id-ttl-hours": 6, "peer-limit-global": 200, "peer-limit-per-torrent": 50, - "peer-port": __PEER_PORT__, + "peer-port": __PORT_PEER__, "peer-port-random-high": 65535, "peer-port-random-low": 49152, "peer-port-random-on-start": false, @@ -70,6 +70,6 @@ "upload-limit-enabled": 0, "upload-slots-per-torrent": 14, "utp-enabled": true, - "watch-dir": "__DATADIR__/watched", + "watch-dir": "__DATA_DIR__/watched", "watch-dir-enabled": true } diff --git a/doc/DISCLAIMER.md b/doc/ADMIN.md similarity index 88% rename from doc/DISCLAIMER.md rename to doc/ADMIN.md index 749e331..b21226e 100644 --- a/doc/DISCLAIMER.md +++ b/doc/ADMIN.md @@ -1,7 +1,3 @@ -## YunoHost specific features - - * Integration with YunoHost Multimedia directories - ## Additionnal informations Alternative to WebUI : diff --git a/doc/DISCLAIMER_fr.md b/doc/ADMIN_fr.md similarity index 87% rename from doc/DISCLAIMER_fr.md rename to doc/ADMIN_fr.md index 6ca4fdc..cc17a89 100644 --- a/doc/DISCLAIMER_fr.md +++ b/doc/ADMIN_fr.md @@ -1,7 +1,3 @@ -## Caractéristiques spécifiques YunoHost - - * Intégration avec les répertoires Multimédias de YunoHost - ## Informations additionnelles Alternative à WebUI : diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md index 9f4e7bf..0b52a3c 100644 --- a/doc/DESCRIPTION.md +++ b/doc/DESCRIPTION.md @@ -1 +1,5 @@ Transmission is a fast, easy, and free BitTorrent client. + +### YunoHost specific features + + * Integration with YunoHost Multimedia directories diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md index 8e8a725..6e4877f 100644 --- a/doc/DESCRIPTION_fr.md +++ b/doc/DESCRIPTION_fr.md @@ -1 +1,5 @@ Transmission est un client BitTorrent libre, efficace et simple. + +### Caractéristiques spécifiques YunoHost + + * Intégration avec les répertoires Multimédias de YunoHost diff --git a/manifest.json b/manifest.json deleted file mode 100644 index 9cc1b18..0000000 --- a/manifest.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "Transmission", - "id": "transmission", - "packaging_format": 1, - "description": { - "en": "Fast, Easy, and Free BitTorrent Client", - "fr": "Client BitTorrent libre et rapide" - }, - "version": "3.00~ynh1", - "url": "https://www.transmissionbt.com", - "upstream": { - "license": "GPL-3.0", - "website": "https://www.transmissionbt.com", - "admindoc": "https://github.com/transmission/transmission/wiki", - "code": "https://github.com/transmission/transmission", - "cpe": "cpe:2.3:a:transmissionbt:transmission" - }, - "license": "GPL-3.0", - "maintainer": { - "name": "", - "email": "" - }, - "requirements": { - "yunohost": ">= 11.0.9" - }, - "multi_instance": false, - "services": [ - "nginx", - "transmission-daemon" - ], - "arguments": { - "install": [ - { - "name": "domain", - "type": "domain" - }, - { - "name": "path", - "type": "path", - "example": "/torrent", - "default": "/torrent" - } - ] - } -} diff --git a/manifest.toml b/manifest.toml new file mode 100644 index 0000000..ba48a02 --- /dev/null +++ b/manifest.toml @@ -0,0 +1,64 @@ +packaging_format = 2 + +id = "transmission" +name = "Transmission" +description.en = "Fast, Easy, and Free BitTorrent Client" +description.fr = "Client BitTorrent libre et rapide" + +version = "3.00~ynh1" + +maintainers = [] + +[upstream] +license = "GPL-3.0" +website = "https://www.transmissionbt.com" +admindoc = "https://github.com/transmission/transmission/wiki" +code = "https://github.com/transmission/transmission" +cpe = "cpe:2.3:a:transmissionbt:transmission" + +[integration] +yunohost = ">= 11.2" +architectures = "all" +multi_instance = false +ldap = false +sso = false +disk = "50M" +ram.build = "200M" +ram.runtime = "50M" + +[install] + [install.domain] + type = "domain" + + [install.path] + type = "path" + default = "/torrent" + + [install.init_main_permission] + type = "group" + default = "visitors" + +[resources] + + [resources.ports] + main.default = 9091 + main.exposed = "TCP" + peer.default = 51413 + peer.exposed = "Both" + + [resources.system_user] + + [resources.install_dir] + + [resources.data_dir] + subdirs = [ "progress", "completed", "watched" ] + + [resources.permissions] + main.url = "/" + rpc.url = "/transmission/rpc" + rpc.allowed = "visitors" + rpc.show_tile = false + rpc.protected = true + + [resources.apt] + packages = "transmission-daemon, transmission-cli, transmission-common, acl" diff --git a/scripts/_common.sh b/scripts/_common.sh index 8d9a9d2..944a65e 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,9 +4,6 @@ # COMMON VARIABLES #================================================= -# dependencies used by the app -pkg_dependencies="transmission-daemon transmission-cli transmission-common acl" - #================================================= # PERSONAL HELPERS #================================================= diff --git a/scripts/backup b/scripts/backup index e180328..a42bc4a 100644 --- a/scripts/backup +++ b/scripts/backup @@ -10,23 +10,6 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - -#================================================= -# LOAD SETTINGS -#================================================= -ynh_print_info --message="Loading installation settings..." - -app=$YNH_APP_INSTANCE_NAME - -domain=$(ynh_app_setting_get --app=$app --key=domain) -datadir=$(ynh_app_setting_get --app=$app --key=datadir) - #================================================= # DECLARE DATA AND CONF FILES TO BACKUP #================================================= @@ -36,7 +19,7 @@ ynh_print_info --message="Declaring files to be backed up..." # BACKUP THE DATA DIR #================================================= -ynh_backup --src_path="$datadir" --is_big +ynh_backup --src_path="$data_dir" --is_big #================================================= # BACKUP THE NGINX CONFIGURATION diff --git a/scripts/change_url b/scripts/change_url index 1aae2f6..3d49a94 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -9,64 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# RETRIEVE ARGUMENTS -#================================================= - -old_domain=$YNH_APP_OLD_DOMAIN -old_path=$YNH_APP_OLD_PATH - -new_domain=$YNH_APP_NEW_DOMAIN -new_path=$YNH_APP_NEW_PATH - -app=$YNH_APP_INSTANCE_NAME - -#================================================= -# LOAD SETTINGS -#================================================= -ynh_script_progression --message="Loading installation settings..." - -# Needed for helper "ynh_add_nginx_config" -final_path=$(ynh_app_setting_get --app=$app --key=final_path) - -# Add settings here as needed by your application -port=$(ynh_app_setting_get --app=$app --key=port) -datadir=$(ynh_app_setting_get --app=$app --key=datadir) - -#================================================= -# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP -#================================================= -ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=1 - -# Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { - ynh_clean_check_starting - # Remove the new domain config file, the remove script won't do it as it doesn't know yet its location. - ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" - - # Restore it if the upgrade fails - ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - -#================================================= -# CHECK WHICH PARTS SHOULD BE CHANGED -#================================================= - -change_domain=0 -if [ "$old_domain" != "$new_domain" ] -then - change_domain=1 -fi - -change_path=0 -if [ "$old_path" != "$new_path" ] -then - change_path=1 -fi - #================================================= # STANDARD MODIFICATIONS #================================================= @@ -81,29 +23,7 @@ ynh_systemd_action --service_name=transmission-daemon --action="stop" #================================================= ynh_script_progression --message="Updating NGINX web server configuration..." --weight=2 -nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf - -# Change the path in the NGINX config file -if [ $change_path -eq 1 ] -then - # Make a backup of the original NGINX config file if modified - ynh_backup_if_checksum_is_different --file="$nginx_conf_path" - # Set global variables for NGINX helper - domain="$old_domain" - path_url="$new_path" - # Create a dedicated NGINX config - ynh_add_nginx_config -fi - -# Change the domain for NGINX -if [ $change_domain -eq 1 ] -then - # Delete file checksum for the old conf file location - ynh_delete_file_checksum --file="$nginx_conf_path" - mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf - # Store file checksum for the new config file location - ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" -fi +ynh_change_url_nginx_config #================================================= # SPECIFIC MODIFICATIONS @@ -126,13 +46,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=2 ynh_systemd_action --service_name=transmission-daemon --action="start" -#================================================= -# RELOAD NGINX -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." - -ynh_systemd_action --service_name=nginx --action=reload - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/install b/scripts/install index 84b09dd..b1fab27 100644 --- a/scripts/install +++ b/scripts/install @@ -9,80 +9,13 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -ynh_clean_setup () { - ynh_clean_check_starting -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - #================================================= # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= -domain=$YNH_APP_ARG_DOMAIN -path_url=$YNH_APP_ARG_PATH - -app=$YNH_APP_INSTANCE_NAME - rpcpassword=$(ynh_string_random) - -#================================================= -# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS -#================================================= -ynh_script_progression --message="Validating installation parameters..." - -# Register (book) web path -ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url - -#================================================= -# STORE SETTINGS FROM MANIFEST -#================================================= -ynh_script_progression --message="Storing installation settings..." --weight=2 - -ynh_app_setting_set --app=$app --key=domain --value=$domain -ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=rpcpassword --value="$rpcpassword" -#================================================= -# STANDARD MODIFICATIONS -#================================================= -# FIND AND OPEN A PORT -#================================================= -ynh_script_progression --message="Finding an available port..." --weight=16 - -# Find an available port -port=$(ynh_find_port --port=9091) -ynh_app_setting_set --app=$app --key=port --value=$port -peer_port=$(ynh_find_port --port=51413) -ynh_app_setting_set --app=$app --key=peer_port --value=$peer_port - -# Open the port -ynh_script_progression --message="Configuring firewall..." -ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $port -ynh_exec_warn_less yunohost firewall allow Both $peer_port - -#================================================= -# INSTALL DEPENDENCIES -#================================================= -ynh_script_progression --message="Installing dependencies..." --weight=16 - -ynh_install_app_dependencies $pkg_dependencies - -# Fix a stupid issue which happens sometimes ... -# transmission-common is installed (it's a dependency of -# transmission-daemon) but somehow the files it's supposed -# to add ain't there ... and possibly also the transmission user -# is missing. -# Explicitly reinstalling the packages fixes the issue :| -if [ ! -d /usr/share/transmission/ ] -then - ynh_install_app_dependencies $pkg_dependencies --reinstall -fi - #================================================= # SPECIFIC SETUP #================================================= @@ -90,15 +23,10 @@ fi #================================================= ynh_script_progression --message="Creating a data directory..." -datadir=/home/yunohost.transmission -ynh_app_setting_set --app=$app --key=datadir --value=$datadir - -mkdir -p $datadir/{progress,completed,watched} - -chmod -R 764 $datadir -chmod -R 777 $datadir/watched -chown -R debian-transmission:www-data "$datadir" -chown -R debian-transmission: $datadir/{progress,watched} +chmod -R 764 $data_dir +chmod -R 775 $data_dir/watched +chown -R debian-transmission:www-data "$data_dir" +chown -R debian-transmission: $data_dir/{progress,watched} #================================================= # NGINX CONFIGURATION @@ -116,11 +44,11 @@ ynh_script_progression --message="Adding a configuration file..." --weight=2 # Transmission has to be stopped before modifying its config ynh_systemd_action --service_name=transmission-daemon --action=stop -if [ "$path_url" != "/" ] +if [ "$path" != "/" ] then - path_less="$path_url/" + path_less="$path/" else - path_less="$path_url" + path_less="$path" fi ynh_add_config --template="../conf/settings.json" --destination="/etc/transmission-daemon/settings.json" @@ -144,12 +72,15 @@ fi ynh_script_progression --message="Adding multimedia directories..." --weight=4 ynh_multimedia_build_main_dir + # Set rights on transmission directory (parent need to be readable by other, and progress need to be writable by multimedia. Because files will move) -ynh_multimedia_addfolder --source_dir="$datadir" --dest_dir="share/Torrents" +ynh_multimedia_addfolder --source_dir="$data_dir" --dest_dir="share/Torrents" + # And share completed directory -ynh_multimedia_addfolder --source_dir="$datadir/completed" --dest_dir="share/Torrents" +ynh_multimedia_addfolder --source_dir="$data_dir/completed" --dest_dir="share/Torrents" + # Share also watched directory, to allow to use it easily -ynh_multimedia_addfolder --source_dir="$datadir/watched" --dest_dir="share/Torrent to download" +ynh_multimedia_addfolder --source_dir="$data_dir/watched" --dest_dir="share/Torrent to download" #================================================= # PATCH SOURCE TO ADD A DOWNLOAD BUTTON @@ -166,7 +97,7 @@ ynh_replace_string "
/dev/null 2>&1 @@ -34,49 +23,15 @@ then yunohost service remove transmission-daemon fi -#================================================= -# REMOVE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Removing NGINX web server configuration..." - # Remove the dedicated NGINX config ynh_remove_nginx_config -#================================================= -# REMOVE DEPENDENCIES -#================================================= -ynh_script_progression --message="Removing dependencies..." --weight=9 - -# Remove metapackage and its dependencies -ynh_remove_app_dependencies - -#================================================= -# CLOSE A PORT -#================================================= - -if yunohost firewall list | grep -q "\- $port$" -then - ynh_script_progression --message="Closing port $port..." - ynh_exec_warn_less yunohost firewall disallow TCP $port -fi - -if yunohost firewall list | grep -q "\- $peer_port$" -then - ynh_script_progression --message="Closing port $peer_port..." - ynh_exec_warn_less yunohost firewall disallow Both $peer_port -fi - -#================================================= -# SPECIFIC REMOVE -#================================================= -# REMOVE VARIOUS FILES -#================================================= -ynh_script_progression --message="Removing various files..." - # Web interface ynh_secure_remove --file=/usr/share/transmission + # And data ynh_secure_remove --file=/var/lib/transmission-daemon + # Kernel parameters if [ -e /proc/sys/net/core/rmem_max ] then @@ -84,16 +39,6 @@ then sysctl --load=/etc/sysctl.d/90-transmission.conf fi -#================================================= -# GENERIC FINALIZATION -#================================================= -# REMOVE DEDICATED USER -#================================================= -ynh_script_progression --message="Removing the dedicated system user..." - -# Delete a system user -ynh_system_user_delete --username=debian-transmission - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/restore b/scripts/restore index 256544f..9c46675 100644 --- a/scripts/restore +++ b/scripts/restore @@ -10,57 +10,17 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -ynh_clean_setup () { - ynh_clean_check_starting -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - -#================================================= -# LOAD SETTINGS -#================================================= -ynh_script_progression --message="Loading installation settings..." - -app=$YNH_APP_INSTANCE_NAME - -domain=$(ynh_app_setting_get --app=$app --key=domain) -path_url=$(ynh_app_setting_get --app=$app --key=path) -port=$(ynh_app_setting_get --app=$app --key=port) -peer_port=$(ynh_app_setting_get --app=$app --key=peer_port) -datadir=$(ynh_app_setting_get --app=$app --key=datadir) - -#================================================= -# CHECK IF THE APP CAN BE RESTORED -#================================================= -ynh_script_progression --message="Validating restoration parameters..." - -#================================================= -# SPECIFIC RESTORATION -#================================================= -# REINSTALL DEPENDENCIES -#================================================= -ynh_script_progression --message="Reinstalling dependencies..." --weight=16 - -# Define and install dependencies -ynh_install_app_dependencies $pkg_dependencies - #================================================= # RESTORE THE DATA DIRECTORY #================================================= ynh_script_progression --message="Restoring the data directory..." -ynh_restore_file --origin_path="$datadir" --not_mandatory +ynh_restore_file --origin_path="$data_dir" --not_mandatory -mkdir -p $datadir/{progress,completed,watched} - -chmod -R 764 $datadir -chmod -R 777 $datadir/watched -chown -R debian-transmission:www-data "$datadir" -chown -R debian-transmission: $datadir/{progress,watched} +chmod -R 764 $data_dir +chmod -R 775 $data_dir/watched +chown -R debian-transmission:www-data "$data_dir" +chown -R debian-transmission: $data_dir/{progress,watched} #================================================= # RESTORE THE NGINX CONFIGURATION @@ -92,33 +52,28 @@ ynh_restore_file --origin_path=/usr/share/transmission ynh_secure_remove --file=/var/lib/transmission-daemon ynh_restore_file --origin_path=/var/lib/transmission-daemon -#================================================= -# OPEN PORTS -#================================================= -ynh_script_progression --message="Configuring firewall..." --weight=13 - -ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $port -ynh_exec_warn_less yunohost firewall allow Both $peer_port - #================================================= # YUNOHOST MULTIMEDIA INTEGRATION #================================================= ynh_script_progression --message="Adding multimedia directories..." --weight=4 ynh_multimedia_build_main_dir + # Set rights on transmission directory (parent need to be readable by other, and progress need to be writable by multimedia. Because files will move) -ynh_multimedia_addfolder --source_dir="$datadir" --dest_dir="share/Torrents" +ynh_multimedia_addfolder --source_dir="$data_dir" --dest_dir="share/Torrents" + # And share completed directory -ynh_multimedia_addfolder --source_dir="$datadir/completed" --dest_dir="share/Torrents" +ynh_multimedia_addfolder --source_dir="$data_dir/completed" --dest_dir="share/Torrents" + # Share also watched directory, to allow to use it easily -ynh_multimedia_addfolder --source_dir="$datadir/watched" --dest_dir="share/Torrent to download" +ynh_multimedia_addfolder --source_dir="$data_dir/watched" --dest_dir="share/Torrent to download" #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= ynh_script_progression --message="Integrating service in YunoHost..." -yunohost service add transmission-daemon --description="BitTorrent Client" --log=systemd --needs_exposed_ports="$peer_port" +yunohost service add transmission-daemon --description="BitTorrent Client" --log=systemd --needs_exposed_ports="$port_peer" #================================================= # START SYSTEMD SERVICE diff --git a/scripts/upgrade b/scripts/upgrade index c388f8f..db9a185 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,41 +9,12 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# LOAD SETTINGS -#================================================= -ynh_script_progression --message="Loading installation settings..." --weight=2 - -app=$YNH_APP_INSTANCE_NAME - -domain=$(ynh_app_setting_get --app=$app --key=domain) -path_url=$(ynh_app_setting_get --app=$app --key=path) -port=$(ynh_app_setting_get --app=$app --key=port) -peer_port=$(ynh_app_setting_get --app=$app --key=peer_port) -datadir=$(ynh_app_setting_get --app=$app --key=datadir) -rpcpassword=$(ynh_app_setting_get --app=$app --key=rpcpassword) - #================================================= # CHECK VERSION #================================================= upgrade_type=$(ynh_check_app_version_changed) -#================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP -#================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=3 - -# 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 -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - #================================================= # STANDARD UPGRADE STEPS #================================================= @@ -53,37 +24,6 @@ ynh_script_progression --message="Stopping a systemd service..." ynh_systemd_action --service_name=transmission-daemon --action="stop" -#================================================= -# ENSURE DOWNWARD COMPATIBILITY -#================================================= -ynh_script_progression --message="Ensuring downward compatibility..." --weight=4 - -if [ -z "$port" ]; then - port=9091 - ynh_app_setting_set --app=$app --key=port --value=$port -fi - -if [ -z "$peer_port" ]; then - peer_port=51413 - ynh_app_setting_set --app=$app --key=peer_port --value=$peer_port -fi - -# Add peer_port also on UDP. -ynh_exec_warn_less yunohost firewall allow UDP $peer_port - -# If datadir doesn't exist, create it -if [ -z "$datadir" ]; then - datadir=/home/yunohost.transmission - ynh_app_setting_set --app=$app --key=datadir --value=$datadir -fi - -#================================================= -# UPGRADE DEPENDENCIES -#================================================= -ynh_script_progression --message="Upgrading dependencies..." --weight=7 - -ynh_install_app_dependencies $pkg_dependencies - #================================================= # NGINX CONFIGURATION #================================================= @@ -99,12 +39,10 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Creating a data directory..." -mkdir -p $datadir/{progress,completed,watched} - -chmod -R 764 $datadir -chmod -R 777 $datadir/watched -chown -R debian-transmission:www-data "$datadir" -chown -R debian-transmission: $datadir/{progress,watched} +chmod -R 764 $data_dir +chmod -R 775 $data_dir/watched +chown -R debian-transmission:www-data "$data_dir" +chown -R debian-transmission: $data_dir/{progress,watched} #================================================= # UPDATE A CONFIG FILE @@ -114,11 +52,11 @@ ynh_script_progression --message="Updating a configuration file..." --weight=2 # Transmission has to be stopped before modifying its config ynh_systemd_action --service_name=transmission-daemon --action=stop -if [ "$path_url" != "/" ] +if [ "$path" != "/" ] then - path_less="$path_url/" + path_less="$path/" else - path_less="$path_url" + path_less="$path" fi ynh_add_config --template="../conf/settings.json" --destination="/etc/transmission-daemon/settings.json" @@ -142,12 +80,15 @@ fi ynh_script_progression --message="Adding multimedia directories..." --weight=3 ynh_multimedia_build_main_dir + # Set rights on transmission directory (parent need to be readable by other, and progress need to be writable by multimedia. Because files will move) -ynh_multimedia_addfolder --source_dir="$datadir" --dest_dir="share/Torrents" +ynh_multimedia_addfolder --source_dir="$data_dir" --dest_dir="share/Torrents" + # And share completed directory -ynh_multimedia_addfolder --source_dir="$datadir/completed" --dest_dir="share/Torrents" +ynh_multimedia_addfolder --source_dir="$data_dir/completed" --dest_dir="share/Torrents" + # Share also watched directory, to allow to use it easily -ynh_multimedia_addfolder --source_dir="$datadir/watched" --dest_dir="share/Torrent to download" +ynh_multimedia_addfolder --source_dir="$data_dir/watched" --dest_dir="share/Torrent to download" #================================================= # PATCH SOURCE TO ADD A DOWNLOAD BUTTON @@ -158,6 +99,7 @@ if ! grep --quiet "Inserted by Yunohost install script" /usr/share/transmission/ then cat ../sources/extra_files/app/ynh_common.css >> /usr/share/transmission/web/style/transmission/common.css fi + ynh_replace_string "
$" "
" /usr/share/transmission/web/index.html #================================================= @@ -167,7 +109,7 @@ ynh_replace_string "
Date: Wed, 27 Sep 2023 09:59:17 +0000 Subject: [PATCH 07/23] Auto-update README --- README.md | 3 +++ README_fr.md | 1 + 2 files changed, 4 insertions(+) diff --git a/README.md b/README.md index 3ffcc23..aa17ba9 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,9 @@ Transmission is a fast, easy, and free BitTorrent client. ### YunoHost specific features + * Integration with YunoHost Multimedia directories + + **Shipped version:** 3.00~ynh1 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 80ed8a7..cb34c54 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,6 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Transmission est un client BitTorrent libre, efficace et simple. +### Caractéristiques spécifiques YunoHost * Intégration avec les répertoires Multimédias de YunoHost From 66b7839b0c056af93689267e1383fc3f09c54a85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 27 Sep 2023 11:59:42 +0200 Subject: [PATCH 08/23] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index ba48a02..90418fd 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Transmission" description.en = "Fast, Easy, and Free BitTorrent Client" description.fr = "Client BitTorrent libre et rapide" -version = "3.00~ynh1" +version = "3.00~ynh2" maintainers = [] From 65874b8e16e589273f9d339e9ec06c0a52929a1f Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 27 Sep 2023 09:59:53 +0000 Subject: [PATCH 09/23] 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 aa17ba9..3fe8117 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Transmission is a fast, easy, and free BitTorrent client. * Integration with YunoHost Multimedia directories -**Shipped version:** 3.00~ynh1 +**Shipped version:** 3.00~ynh2 ## Screenshots diff --git a/README_fr.md b/README_fr.md index cb34c54..e46cd2b 100644 --- a/README_fr.md +++ b/README_fr.md @@ -23,7 +23,7 @@ Transmission est un client BitTorrent libre, efficace et simple. * Intégration avec les répertoires Multimédias de YunoHost -**Version incluse :** 3.00~ynh1 +**Version incluse :** 3.00~ynh2 ## Captures d’écran From 6928443cef1c76dfc4da5e2bc8d1667b6b5fa404 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 27 Sep 2023 12:01:19 +0200 Subject: [PATCH 10/23] Update upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index db9a185..0b00e23 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -59,7 +59,7 @@ else path_less="$path" fi -ynh_add_config --template="../conf/settings.json" --destination="/etc/transmission-daemon/settings.json" +#ynh_add_config --template="../conf/settings.json" --destination="/etc/transmission-daemon/settings.json" chmod 400 "/etc/transmission-daemon/settings.json" chown debian-transmission:debian-transmission "/etc/transmission-daemon/settings.json" From 7e581cdc9a59e5098cfd76ddadd37bfbf3fbcd95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 27 Sep 2023 14:05:20 +0200 Subject: [PATCH 11/23] Update tests.toml --- tests.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests.toml b/tests.toml index f523fec..80f3702 100644 --- a/tests.toml +++ b/tests.toml @@ -11,3 +11,5 @@ test_format = 1.0 # ------------------------------- # Commits to test upgrade from # ------------------------------- + + test_upgrade_from.e20afb4d5c7247df84a8a9a4d5d05ae7205aebb5.name = "Upgrade from 3.00~ynh1" \ No newline at end of file From 55aa09e9c2d6c8b3cef6245c1fb326b6a3d1491a Mon Sep 17 00:00:00 2001 From: Salamandar <6552989+Salamandar@users.noreply.github.com> Date: Thu, 28 Sep 2023 11:21:19 +0200 Subject: [PATCH 12/23] Fix upgrade script for old versions (#102) We moved from /home/yunohost.transmission to /home/yunohost.app/transmission. Dangling symlinks might exist in the $MEDIA_DIRECTORY... Removing this before ynh_multimedia_build_main_dir will fix this, and the symlinks will be recreated after by ynh_multimedia_addfolder. Also, we're using rm and not ynh_secure_remove because of https://github.com/YunoHost/issues/issues/2253 --- scripts/upgrade | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 0b00e23..7ae5caa 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -79,6 +79,11 @@ fi #================================================= ynh_script_progression --message="Adding multimedia directories..." --weight=3 +# Remove possibly dangling symlinks created before the /home/yunohost.transmission -> /home/yunohost.app/transmission transition +# Use rm because ynh_secure_remove fails on dangling symlinks, see https://github.com/YunoHost/issues/issues/2253... +rm "$MEDIA_DIRECTORY/share/Torrents" +rm "$MEDIA_DIRECTORY/share/Torrent to download" + ynh_multimedia_build_main_dir # Set rights on transmission directory (parent need to be readable by other, and progress need to be writable by multimedia. Because files will move) From 5dddbd82bd79f981ad1312deb05bae75da28ab94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 29 Sep 2023 13:30:46 +0200 Subject: [PATCH 13/23] Update manifest.toml --- manifest.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index 90418fd..8730dbe 100644 --- a/manifest.toml +++ b/manifest.toml @@ -46,8 +46,6 @@ ram.runtime = "50M" peer.default = 51413 peer.exposed = "Both" - [resources.system_user] - [resources.install_dir] [resources.data_dir] From fe265d10bc9a9f8d599308dbcf4cae5097e670a6 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 29 Sep 2023 11:30:50 +0000 Subject: [PATCH 14/23] Auto-update README --- README.md | 1 - README_fr.md | 1 - 2 files changed, 2 deletions(-) diff --git a/README.md b/README.md index 3fe8117..9524fd1 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,6 @@ Transmission is a fast, easy, and free BitTorrent client. * Official app website: * Official admin documentation: * Upstream app code repository: -* YunoHost documentation for this app: * Report a bug: ## Developer info diff --git a/README_fr.md b/README_fr.md index e46cd2b..4eaea9b 100644 --- a/README_fr.md +++ b/README_fr.md @@ -34,7 +34,6 @@ Transmission est un client BitTorrent libre, efficace et simple. * 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 From 5b4bda2ba1de13ddab2ef90226f61d1d6b296b68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 29 Sep 2023 13:33:57 +0200 Subject: [PATCH 15/23] Update remove --- scripts/remove | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/remove b/scripts/remove index e14034d..e2c0883 100644 --- a/scripts/remove +++ b/scripts/remove @@ -32,6 +32,9 @@ ynh_secure_remove --file=/usr/share/transmission # And data ynh_secure_remove --file=/var/lib/transmission-daemon +# Removing old data_dir +ynh_secure_remove --file="/home/yunohost.transmission" + # Kernel parameters if [ -e /proc/sys/net/core/rmem_max ] then From 84b4b4ea064487e41fd4774d6fafacd577d35fad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 29 Sep 2023 13:34:11 +0200 Subject: [PATCH 16/23] Update upgrade --- scripts/upgrade | 3 --- 1 file changed, 3 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 7ae5caa..db8ccd5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -49,9 +49,6 @@ chown -R debian-transmission: $data_dir/{progress,watched} #================================================= ynh_script_progression --message="Updating a configuration file..." --weight=2 -# Transmission has to be stopped before modifying its config -ynh_systemd_action --service_name=transmission-daemon --action=stop - if [ "$path" != "/" ] then path_less="$path/" From 1f26c9c05cba6404b6888f4707e4cd250e75db90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 29 Sep 2023 13:37:32 +0200 Subject: [PATCH 17/23] cleaning --- scripts/change_url | 4 ++-- scripts/install | 4 ++-- scripts/restore | 15 +++++---------- scripts/upgrade | 6 +++--- 4 files changed, 12 insertions(+), 17 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 3d49a94..3e576c1 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -16,7 +16,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=2 -ynh_systemd_action --service_name=transmission-daemon --action="stop" +ynh_systemd_action --service_name=transmission-daemon --action="stop" --log_path="systemd" #================================================= # MODIFY URL IN NGINX CONF @@ -44,7 +44,7 @@ ynh_store_file_checksum --file="/etc/transmission-daemon/settings.json" #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=2 -ynh_systemd_action --service_name=transmission-daemon --action="start" +ynh_systemd_action --service_name=transmission-daemon --action="start" --log_path="systemd" #================================================= # END OF SCRIPT diff --git a/scripts/install b/scripts/install index b1fab27..5283f10 100644 --- a/scripts/install +++ b/scripts/install @@ -97,7 +97,7 @@ ynh_replace_string "
Date: Fri, 29 Sep 2023 13:41:25 +0200 Subject: [PATCH 18/23] Update upgrade --- scripts/upgrade | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index f1d9183..4c356c7 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -32,18 +32,6 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# SPECIFIC UPGRADE -#================================================= -# CREATE DATA DIRECTORY -#================================================= -ynh_script_progression --message="Creating a data directory..." --weight=1 - -chmod -R 764 $data_dir -chmod -R 775 $data_dir/watched -chown -R debian-transmission:www-data "$data_dir" -chown -R debian-transmission: $data_dir/{progress,watched} - #================================================= # UPDATE A CONFIG FILE #================================================= @@ -104,6 +92,16 @@ fi ynh_replace_string "
$" "
" /usr/share/transmission/web/index.html +#================================================= +# SET DATA DIRECTORY PERMISSIONS +#================================================= +ynh_script_progression --message="Set data directory permissions..." --weight=1 + +chmod -R 764 $data_dir +chmod -R 775 $data_dir/watched +chown -R debian-transmission:www-data "$data_dir" +chown -R debian-transmission: $data_dir/{progress,watched} + #================================================= # GENERIC FINALIZATION #================================================= From 2b164fd99a174f39c714523827b9ec93d598e462 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 29 Sep 2023 13:41:31 +0200 Subject: [PATCH 19/23] Update install --- scripts/install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 5283f10..03d7c23 100644 --- a/scripts/install +++ b/scripts/install @@ -19,9 +19,9 @@ ynh_app_setting_set --app=$app --key=rpcpassword --value="$rpcpassword" #================================================= # SPECIFIC SETUP #================================================= -# CREATE DATA DIRECTORY +# CREATE DATA DIRECTORY PERMISSIONS #================================================= -ynh_script_progression --message="Creating a data directory..." +ynh_script_progression --message="Set data directory permissions..." chmod -R 764 $data_dir chmod -R 775 $data_dir/watched From 722270ae3caf543c03d6e4f6c47129f1445420b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 29 Sep 2023 13:54:13 +0200 Subject: [PATCH 20/23] Update manifest.toml --- manifest.toml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/manifest.toml b/manifest.toml index 8730dbe..1479cab 100644 --- a/manifest.toml +++ b/manifest.toml @@ -40,11 +40,7 @@ ram.runtime = "50M" [resources] - [resources.ports] - main.default = 9091 - main.exposed = "TCP" - peer.default = 51413 - peer.exposed = "Both" + [resources.system_user] [resources.install_dir] @@ -58,5 +54,11 @@ ram.runtime = "50M" rpc.show_tile = false rpc.protected = true + [resources.ports] + main.default = 9091 + main.exposed = "TCP" + peer.default = 51413 + peer.exposed = "Both" + [resources.apt] packages = "transmission-daemon, transmission-cli, transmission-common, acl" From 145ae4cb154bdd5727b7bf442ee2801d31109cd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 2 Oct 2023 22:21:16 +0200 Subject: [PATCH 21/23] Update upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 4c356c7..7156e12 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -44,7 +44,7 @@ else path_less="$path" fi -#ynh_add_config --template="../conf/settings.json" --destination="/etc/transmission-daemon/settings.json" +ynh_add_config --template="../conf/settings.json" --destination="/etc/transmission-daemon/settings.json" chmod 400 "/etc/transmission-daemon/settings.json" chown debian-transmission:debian-transmission "/etc/transmission-daemon/settings.json" From 3f258a903a34bf93159e73d9d5d50fbd1605e7b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 2 Oct 2023 22:52:37 +0200 Subject: [PATCH 22/23] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 1479cab..a5b6822 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Transmission" description.en = "Fast, Easy, and Free BitTorrent Client" description.fr = "Client BitTorrent libre et rapide" -version = "3.00~ynh2" +version = "3.00~ynh3" maintainers = [] From 5c8a74721bc07751004ccaa7dcccfe511a5ed824 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 2 Oct 2023 20:52:42 +0000 Subject: [PATCH 23/23] 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 9524fd1..6d3f782 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Transmission is a fast, easy, and free BitTorrent client. * Integration with YunoHost Multimedia directories -**Shipped version:** 3.00~ynh2 +**Shipped version:** 3.00~ynh3 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 4eaea9b..cf0f7e4 100644 --- a/README_fr.md +++ b/README_fr.md @@ -23,7 +23,7 @@ Transmission est un client BitTorrent libre, efficace et simple. * Intégration avec les répertoires Multimédias de YunoHost -**Version incluse :** 3.00~ynh2 +**Version incluse :** 3.00~ynh3 ## Captures d’écran