From 9c4e8736ff870411684c34d179087d303d078b3d Mon Sep 17 00:00:00 2001 From: maniack Date: Tue, 3 Mar 2020 19:06:26 +0100 Subject: [PATCH 1/6] Do not use sysctl.d into LXC --- scripts/backup | 5 ++++- scripts/install | 10 +++++++--- scripts/remove | 5 +++-- scripts/restore | 5 +++-- scripts/upgrade | 14 +++++++++----- 5 files changed, 26 insertions(+), 13 deletions(-) diff --git a/scripts/backup b/scripts/backup index a20a6a9..8a89d8b 100644 --- a/scripts/backup +++ b/scripts/backup @@ -42,7 +42,10 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_script_progression --message="Backing up transmission configuration..." ynh_backup --src_path="/etc/transmission-daemon/settings.json" -ynh_backup --src_path="/etc/sysctl.d/90-transmission.conf" +if [ -e /proc/sys/net/core/rmem_max ] +then + ynh_backup --src_path="/etc/sysctl.d/90-transmission.conf" +fi #================================================= # BACKUP DATA diff --git a/scripts/install b/scripts/install index 12c341d..29b606e 100644 --- a/scripts/install +++ b/scripts/install @@ -129,8 +129,9 @@ ynh_replace_string --match_string="__PEER_PORT__" --replace_string="$peer_port" ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file=../conf/settings.json cp ../conf/settings.json /etc/transmission-daemon/settings.json -cp ../conf/90-transmission.conf /etc/sysctl.d/90-transmission.conf -if [ -e /proc/sys/net/core/rmem_max ]; then +if [ -e /proc/sys/net/core/rmem_max ] +then + cp ../conf/90-transmission.conf /etc/sysctl.d/90-transmission.conf sysctl --load=/etc/sysctl.d/90-transmission.conf fi @@ -139,7 +140,10 @@ fi #================================================= ynh_store_file_checksum --file=/etc/transmission-daemon/settings.json -ynh_store_file_checksum --file=/etc/sysctl.d/90-transmission.conf +if [ -e /proc/sys/net/core/rmem_max ] +then + ynh_store_file_checksum --file=/etc/sysctl.d/90-transmission.conf +fi #================================================= # YUNOHOST MULTIMEDIA INTEGRATION diff --git a/scripts/remove b/scripts/remove index 76b964c..f7d53f8 100644 --- a/scripts/remove +++ b/scripts/remove @@ -76,8 +76,9 @@ ynh_secure_remove --file=/usr/share/transmission # And data ynh_secure_remove --file=/var/lib/transmission-daemon # Kernel parameters -ynh_secure_remove --file=/etc/sysctl.d/90-transmission.conf -if [ ${PACKAGE_CHECK_EXEC:-0} -eq 0 ]; then +if [ ${PACKAGE_CHECK_EXEC:-0} -eq 0 ] +then + ynh_secure_remove --file=/etc/sysctl.d/90-transmission.conf sysctl --load=/etc/sysctl.d/90-transmission.conf fi diff --git a/scripts/restore b/scripts/restore index aa7f7b9..fedbbae 100644 --- a/scripts/restore +++ b/scripts/restore @@ -73,8 +73,9 @@ ynh_systemd_action --service_name=transmission-daemon --action=stop ynh_secure_remove --file=/etc/transmission-daemon/settings.json ynh_restore_file --origin_path=/etc/transmission-daemon/settings.json -ynh_restore_file --origin_path="/etc/sysctl.d/90-transmission.conf" -if [ -e /proc/sys/net/core/rmem_max ]; then +if [ -e /proc/sys/net/core/rmem_max ] +then + ynh_restore_file --origin_path="/etc/sysctl.d/90-transmission.conf" sysctl --load=/etc/sysctl.d/90-transmission.conf fi diff --git a/scripts/upgrade b/scripts/upgrade index 0062157..7a220d1 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -134,11 +134,12 @@ ynh_replace_string --match_string="__PEER_PORT__" --replace_string="$peer_port" ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file=../conf/settings.json cp ../conf/settings.json /etc/transmission-daemon/settings.json -# Verify the checksum and backup the file if it's different -ynh_backup_if_checksum_is_different --file=/etc/sysctl.d/90-transmission.conf +if [ -e /proc/sys/net/core/rmem_max ] +then + # Verify the checksum and backup the file if it's different + ynh_backup_if_checksum_is_different --file=/etc/sysctl.d/90-transmission.conf -cp ../conf/90-transmission.conf /etc/sysctl.d/90-transmission.conf -if [ -e /proc/sys/net/core/rmem_max ]; then + cp ../conf/90-transmission.conf /etc/sysctl.d/90-transmission.conf sysctl --load=/etc/sysctl.d/90-transmission.conf fi @@ -148,7 +149,10 @@ fi # Recalculate and store the config file checksum into the app settings ynh_store_file_checksum --file=/etc/transmission-daemon/settings.json -ynh_store_file_checksum --file=/etc/sysctl.d/90-transmission.conf +if [ -e /proc/sys/net/core/rmem_max ] +then + ynh_store_file_checksum --file=/etc/sysctl.d/90-transmission.conf +fi #================================================= # YUNOHOST MULTIMEDIA INTEGRATION From 96fa565fbadff9e03ff8a03a623ab68b44ceb5d5 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Wed, 15 Apr 2020 12:34:27 +0200 Subject: [PATCH 2/6] Update scripts/remove Co-Authored-By: Kayou --- scripts/remove | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/remove b/scripts/remove index f7d53f8..038ab84 100644 --- a/scripts/remove +++ b/scripts/remove @@ -76,7 +76,7 @@ ynh_secure_remove --file=/usr/share/transmission # And data ynh_secure_remove --file=/var/lib/transmission-daemon # Kernel parameters -if [ ${PACKAGE_CHECK_EXEC:-0} -eq 0 ] +if [ -e /proc/sys/net/core/rmem_max ] then ynh_secure_remove --file=/etc/sysctl.d/90-transmission.conf sysctl --load=/etc/sysctl.d/90-transmission.conf From 84b73e221b08e7f3bc35436be7591fd31ec01783 Mon Sep 17 00:00:00 2001 From: KvL159 <71872444+KvL159@users.noreply.github.com> Date: Sat, 10 Oct 2020 19:35:30 +0800 Subject: [PATCH 3/6] Add remote client information RPC Add some exemples of clients and instructions to connect them --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 0213153..d32b806 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,22 @@ Transmission is a fast, easy, and free BitTorrent client. ## Limitations ## 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) ## Links From 48130bb749d1a95c8961994fe16d2678c2df6bc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 10 Oct 2020 13:48:10 +0200 Subject: [PATCH 4/6] Update README.md --- README.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0213153..5c634c8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Transmission app for YunoHost +# Transmission for YunoHost [![Integration level](https://dash.yunohost.org/integration/transmission.svg)](https://dash.yunohost.org/appci/app/transmission) ![](https://ci-apps.yunohost.org/ci/badges/transmission.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/transmission.maintain.svg) [![Install Transmission with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=transmission) @@ -35,9 +35,8 @@ Transmission is a fast, easy, and free BitTorrent client. #### Supported architectures -* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/transmission%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/transmission/) +* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/transmission%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/transmission/) * ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/transmission%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/transmission/) -* Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/transmission%20%28Apps%29.svg)](https://ci-stretch.nohost.me/ci/apps/transmission/) ## Limitations @@ -53,8 +52,7 @@ Transmission is a fast, easy, and free BitTorrent client. --- -Developers infos ----------------- +## Developers infos Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/transmission_ynh/tree/testing). From f136dfd44eda128129e5fd2d850a3a3c600e6a4a Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 25 Oct 2020 11:49:27 +0100 Subject: [PATCH 5/6] Update nginx.conf to protect against path traversal issue --- conf/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index caacf71..da17188 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -12,7 +12,7 @@ location __PATH__/ { proxy_pass http://127.0.0.1:__PORT__/; } -location __PATH__/downloads { +location __PATH__/downloads/ { alias /home/yunohost.transmission/completed/; autoindex on; autoindex_exact_size off; From 89ad39fbfaf10b932053b9c59a788822bb07e51d Mon Sep 17 00:00:00 2001 From: Kayou Date: Tue, 3 Nov 2020 21:34:20 +0100 Subject: [PATCH 6/6] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index b0ac36a..1686100 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "A Fast, Easy, and Free BitTorrent Client", "fr": "Un client BitTorrent libre et rapide" }, - "version": "1.0~ynh2", + "version": "1.0~ynh3", "url": "https://www.transmissionbt.com/", "license": "GPL-3.0", "maintainer": {