mirror of
https://github.com/coolsnowwolf/packages.git
synced 2025-05-01 13:13:04 +08:00
transmission: bump version to v3.0
This commit is contained in:
parent
a7f75700e5
commit
c5453cf902
@ -8,22 +8,31 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=transmission
|
||||
PKG_VERSION:=2.94
|
||||
PKG_RELEASE:=8
|
||||
PKG_VERSION:=3.00
|
||||
PKG_RELEASE:=11
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=@GITHUB/transmission/transmission-releases/master
|
||||
PKG_HASH:=35442cc849f91f8df982c3d0d479d650c6ca19310a994eccdaa79a4af3916b7d
|
||||
PKG_HASH:=9144652fe742f7f7dd6657716e378da60b751aaeda8bef8344b3eefc4db255f2
|
||||
|
||||
PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
|
||||
PKG_LICENSE:=GPL-2.0-or-later
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
PKG_CPE_ID:=cpe:/a:transmissionbt:transmission
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_INSTALL:=1
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_LIBCURL_GNUTLS \
|
||||
CONFIG_LIBCURL_MBEDTLS \
|
||||
CONFIG_LIBCURL_OPENSSL \
|
||||
CONFIG_LIBCURL_WOLFSSL \
|
||||
CONFIG_LIBCURL_NOSSL
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/package-seccomp.mk
|
||||
include $(INCLUDE_DIR)/nls.mk
|
||||
|
||||
define Package/transmission/template
|
||||
SUBMENU:=BitTorrent
|
||||
@ -31,96 +40,56 @@ define Package/transmission/template
|
||||
CATEGORY:=Network
|
||||
TITLE:=BitTorrent client
|
||||
URL:=https://www.transmissionbt.com
|
||||
DEPENDS:=+libcurl +libevent2 +libminiupnpc +libnatpmp +libpthread +librt +zlib
|
||||
DEPENDS:=+libcurl +libevent2 +libminiupnpc +libnatpmp +libpthread +librt +zlib +LIBCURL_NOSSL:libmbedtls +LIBCURL_GNUTLS:libmbedtls +LIBCURL_WOLFSSL:libmbedtls $(ICONV_DEPENDS)
|
||||
endef
|
||||
|
||||
define Package/transmission-daemon/Default
|
||||
define Package/transmission-daemon
|
||||
$(call Package/transmission/template)
|
||||
USERID:=transmission=224:transmission=224
|
||||
endef
|
||||
|
||||
define Package/transmission-daemon-openssl
|
||||
$(call Package/transmission-daemon/Default)
|
||||
TITLE+= (with OpenSSL)
|
||||
DEPENDS+=+libopenssl
|
||||
VARIANT:=openssl
|
||||
endef
|
||||
|
||||
define Package/transmission-daemon-mbedtls
|
||||
$(call Package/transmission-daemon/Default)
|
||||
TITLE+= (with mbed TLS)
|
||||
DEPENDS+=+libmbedtls
|
||||
VARIANT:=mbedtls
|
||||
endef
|
||||
|
||||
define Package/transmission-cli-openssl
|
||||
define Package/transmission-cli
|
||||
$(call Package/transmission/template)
|
||||
TITLE+= (with OpenSSL)
|
||||
DEPENDS+=+libopenssl
|
||||
VARIANT:=openssl
|
||||
TITLE+= (utilities)
|
||||
endef
|
||||
|
||||
define Package/transmission-cli-mbedtls
|
||||
define Package/transmission-remote
|
||||
$(call Package/transmission/template)
|
||||
TITLE+= (with mbed TLS)
|
||||
DEPENDS+=+libmbedtls
|
||||
VARIANT:=mbedtls
|
||||
endef
|
||||
|
||||
define Package/transmission-remote-openssl
|
||||
$(call Package/transmission/template)
|
||||
TITLE+= (with OpenSSL)
|
||||
DEPENDS+=+libopenssl
|
||||
VARIANT:=openssl
|
||||
endef
|
||||
|
||||
define Package/transmission-remote-mbedtls
|
||||
$(call Package/transmission/template)
|
||||
TITLE+= (with mbed TLS)
|
||||
DEPENDS+=+libmbedtls
|
||||
VARIANT:=mbedtls
|
||||
TITLE+= (remote)
|
||||
endef
|
||||
|
||||
define Package/transmission-web
|
||||
$(call Package/transmission/template)
|
||||
TITLE+= (webinterface)
|
||||
DEPENDS:=+transmission-daemon-openssl
|
||||
DEPENDS:=+transmission-daemon
|
||||
PKGARCH:=all
|
||||
endef
|
||||
|
||||
|
||||
define Package/transmission-daemon/Default/description
|
||||
define Package/transmission-daemon/description
|
||||
Transmission is a simple BitTorrent client.
|
||||
It features a very simple, intuitive interface
|
||||
on top on an efficient, cross-platform back-end.
|
||||
This package contains the daemon itself.
|
||||
endef
|
||||
Package/transmission-daemon-openssl/description = $(Package/transmission-daemon/Default/description)
|
||||
Package/transmission-daemon-mbedtls/description = $(Package/transmission-daemon/Default/description)
|
||||
|
||||
define Package/transmission-cli/Default/description
|
||||
define Package/transmission-cli/description
|
||||
CLI utilities for transmission.
|
||||
endef
|
||||
Package/transmission-cli-openssl/description = $(Package/transmission-cli/Default/description)
|
||||
Package/transmission-cli-mbedtls/description = $(Package/transmission-cli/Default/description)
|
||||
|
||||
define Package/transmission-remote/Default/description
|
||||
define Package/transmission-remote/description
|
||||
CLI remote interface for transmission.
|
||||
endef
|
||||
Package/transmission-remote-openssl/description = $(Package/transmission-remote/Default/description)
|
||||
Package/transmission-remote-mbedtls/description = $(Package/transmission-remote/Default/description)
|
||||
|
||||
define Package/transmission-web/description
|
||||
Webinterface resources for transmission.
|
||||
endef
|
||||
|
||||
define Package/transmission-daemon-openssl/conffiles
|
||||
define Package/transmission-daemon/conffiles
|
||||
/etc/config/transmission
|
||||
endef
|
||||
Package/transmission-daemon-mbedtls/conffiles = $(Package/transmission-daemon-openssl/conffiles)
|
||||
|
||||
TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
|
||||
TARGET_LDFLAGS += -Wl,--gc-sections -Wl,--as-needed
|
||||
TARGET_LDFLAGS += -Wl,--gc-sections -Wl,--as-needed -liconv
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-cli \
|
||||
@ -130,18 +99,14 @@ CONFIGURE_ARGS += \
|
||||
--enable-lightweight \
|
||||
--without-gtk \
|
||||
--without-kqueue \
|
||||
--without-systemd-daemon
|
||||
--without-systemd-daemon \
|
||||
$(if $(CONFIG_LIBCURL_NOSSL),--with-crypto=polarssl) \
|
||||
$(if $(CONFIG_LIBCURL_GNUTLS),--with-crypto=polarssl) \
|
||||
$(if $(CONFIG_LIBCURL_MBEDTLS),--with-crypto=polarssl) \
|
||||
$(if $(CONFIG_LIBCURL_OPENSSL),--with-crypto=openssl) \
|
||||
$(if $(CONFIG_LIBCURL_WOLFSSL),--with-crypto=polarssl)
|
||||
|
||||
ifeq ($(BUILD_VARIANT),mbedtls)
|
||||
CONFIGURE_ARGS += --with-crypto=polarssl
|
||||
CONFIGURE_VARS += \
|
||||
MBEDTLS_CFLAGS="-I$(STAGING_DIR)/usr/include/mbedtls" \
|
||||
MBEDTLS_LIBS="-lmbedtls -lmbedcrypto"
|
||||
else
|
||||
CONFIGURE_ARGS += --with-crypto=openssl
|
||||
endif
|
||||
|
||||
define Package/transmission-daemon-openssl/install
|
||||
define Package/transmission-daemon/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-daemon $(1)/usr/bin/
|
||||
$(INSTALL_DIR) $(1)/etc/init.d/
|
||||
@ -150,10 +115,10 @@ define Package/transmission-daemon-openssl/install
|
||||
$(INSTALL_CONF) files/transmission.config $(1)/etc/config/transmission
|
||||
$(INSTALL_DIR) $(1)/etc/sysctl.d/
|
||||
$(INSTALL_CONF) files/transmission.sysctl $(1)/etc/sysctl.d/20-transmission.conf
|
||||
$(call InstallSeccomp,$(1),./files/transmission-daemon.json)
|
||||
endef
|
||||
Package/transmission-daemon-mbedtls/install = $(Package/transmission-daemon-openssl/install)
|
||||
|
||||
define Package/transmission-cli-openssl/install
|
||||
define Package/transmission-cli/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-cli \
|
||||
$(PKG_INSTALL_DIR)/usr/bin/transmission-create \
|
||||
@ -161,23 +126,18 @@ define Package/transmission-cli-openssl/install
|
||||
$(PKG_INSTALL_DIR)/usr/bin/transmission-show \
|
||||
$(1)/usr/bin/
|
||||
endef
|
||||
Package/transmission-cli-mbedtls/install = $(Package/transmission-cli-openssl/install)
|
||||
|
||||
define Package/transmission-remote-openssl/install
|
||||
define Package/transmission-remote/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-remote $(1)/usr/bin/
|
||||
endef
|
||||
Package/transmission-remote-mbedtls/install = $(Package/transmission-remote-openssl/install)
|
||||
|
||||
define Package/transmission-web/install
|
||||
$(INSTALL_DIR) $(1)/usr/share/transmission
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/share/transmission/web $(1)/usr/share/transmission/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,transmission-daemon-openssl))
|
||||
#$(eval $(call BuildPackage,transmission-daemon-mbedtls))
|
||||
$(eval $(call BuildPackage,transmission-cli-openssl))
|
||||
#$(eval $(call BuildPackage,transmission-cli-mbedtls))
|
||||
$(eval $(call BuildPackage,transmission-remote-openssl))
|
||||
#$(eval $(call BuildPackage,transmission-remote-mbedtls))
|
||||
$(eval $(call BuildPackage,transmission-daemon))
|
||||
$(eval $(call BuildPackage,transmission-cli))
|
||||
$(eval $(call BuildPackage,transmission-remote))
|
||||
$(eval $(call BuildPackage,transmission-web))
|
||||
|
89
net/transmission/files/transmission-daemon.json
Normal file
89
net/transmission/files/transmission-daemon.json
Normal file
@ -0,0 +1,89 @@
|
||||
{
|
||||
"defaultAction": "SCMP_ACT_KILL_PROCESS",
|
||||
"syscalls": [
|
||||
{
|
||||
"names": [
|
||||
"accept",
|
||||
"accept4",
|
||||
"access",
|
||||
"arm_fadvise64_64",
|
||||
"bind",
|
||||
"brk",
|
||||
"clock_gettime",
|
||||
"clone",
|
||||
"close",
|
||||
"connect",
|
||||
"epoll_create1",
|
||||
"epoll_ctl",
|
||||
"epoll_pwait",
|
||||
"exit",
|
||||
"exit_group",
|
||||
"fadvise64",
|
||||
"fadvise64_64",
|
||||
"fallocate",
|
||||
"fchmod",
|
||||
"fcntl",
|
||||
"fcntl64",
|
||||
"fstat",
|
||||
"fstat64",
|
||||
"fsync",
|
||||
"futex",
|
||||
"getdents64",
|
||||
"getpeername",
|
||||
"getpid",
|
||||
"getsockname",
|
||||
"getsockopt",
|
||||
"getuid",
|
||||
"getuid32",
|
||||
"ioctl",
|
||||
"listen",
|
||||
"_llseek",
|
||||
"lseek",
|
||||
"madvise",
|
||||
"membarrier",
|
||||
"mkdir",
|
||||
"mmap",
|
||||
"mmap2",
|
||||
"mprotect",
|
||||
"mremap",
|
||||
"munmap",
|
||||
"nanosleep",
|
||||
"_newselect",
|
||||
"open",
|
||||
"pipe",
|
||||
"pipe2",
|
||||
"poll",
|
||||
"pread64",
|
||||
"prlimit64",
|
||||
"pwrite64",
|
||||
"quotactl",
|
||||
"read",
|
||||
"readlink",
|
||||
"readv",
|
||||
"recvfrom",
|
||||
"rename",
|
||||
"rmdir",
|
||||
"rt_sigaction",
|
||||
"rt_sigprocmask",
|
||||
"rt_sigreturn",
|
||||
"select",
|
||||
"sendto",
|
||||
"setsockopt",
|
||||
"shutdown",
|
||||
"sigreturn",
|
||||
"socket",
|
||||
"stat",
|
||||
"stat64",
|
||||
"socketpair",
|
||||
"umask",
|
||||
"uname",
|
||||
"unlink",
|
||||
"statfs64",
|
||||
"umask",
|
||||
"write",
|
||||
"writev"
|
||||
],
|
||||
"action": "SCMP_ACT_ALLOW"
|
||||
}
|
||||
]
|
||||
}
|
@ -1,8 +1,8 @@
|
||||
config transmission
|
||||
option enabled 0
|
||||
option config_dir '/opt/transmission'
|
||||
option config_dir '/tmp/transmission'
|
||||
option config_overwrite '1'
|
||||
option user 'root'
|
||||
option user 'transmission'
|
||||
option group 'transmission'
|
||||
option mem_percentage 50
|
||||
option nice 10
|
||||
@ -18,15 +18,15 @@ config transmission
|
||||
option bind_address_ipv6 '::'
|
||||
option blocklist_enabled false
|
||||
option blocklist_url ''
|
||||
option cache_size_mb 64
|
||||
option cache_size_mb 2
|
||||
option dht_enabled true
|
||||
option download_dir '/opt/transmission/download'
|
||||
option download_dir '/tmp/transmission/done'
|
||||
option download_queue_enabled true
|
||||
option download_queue_size 4
|
||||
option encryption 1
|
||||
option idle_seeding_limit 30
|
||||
option idle_seeding_limit_enabled false
|
||||
option incomplete_dir '/opt/transmission/incomplete'
|
||||
option incomplete_dir '/tmp/transmission/incomplete'
|
||||
option incomplete_dir_enabled false
|
||||
option lazy_bitfield_enabled true
|
||||
option lpd_enabled false
|
||||
|
@ -2,86 +2,105 @@
|
||||
# Copyright (C) 2010-2015 OpenWrt.org
|
||||
|
||||
START=99
|
||||
STOP=10
|
||||
USE_PROCD=1
|
||||
PROG="/usr/bin/transmission-daemon"
|
||||
|
||||
LIST_SEP="
|
||||
"
|
||||
|
||||
append_params() {
|
||||
local p; local v; local s="$1"; shift
|
||||
IFS="$LIST_SEP"
|
||||
for p in "$@"; do
|
||||
config_get v "$s" "$p"
|
||||
IFS="$LIST_SEP"
|
||||
for v in $v; do
|
||||
[ -n "$v" ] && (
|
||||
echo "\"$p\": $v," | sed -e 's|_|-|g'
|
||||
) >> "$config_file"
|
||||
[ -n "$v" ] && echo "\"$p\": $v," | sed -e 's|_|-|g'
|
||||
done
|
||||
unset IFS
|
||||
done
|
||||
unset IFS
|
||||
}
|
||||
|
||||
append_params_quotes() {
|
||||
local p; local v; local s="$1"; shift
|
||||
IFS="$LIST_SEP"
|
||||
for p in "$@"; do
|
||||
config_get v "$s" "$p"
|
||||
IFS="$LIST_SEP"
|
||||
for v in $v; do
|
||||
[ -n "$v" ] && (
|
||||
[ -n "$v" ] && {
|
||||
printf "\"%s" "$p" | sed -e 's|/|\\/|g;s|_|-|g'; \
|
||||
echo "\": \"$v\","
|
||||
) >> "$config_file"
|
||||
}
|
||||
done
|
||||
unset IFS
|
||||
done
|
||||
}
|
||||
|
||||
section_enabled() {
|
||||
config_get_bool enabled "$1" enabled 0
|
||||
[ $enabled -gt 0 ]
|
||||
unset IFS
|
||||
}
|
||||
|
||||
transmission() {
|
||||
local cfg="$1"
|
||||
local USE
|
||||
|
||||
local user
|
||||
local group
|
||||
local config_overwrite
|
||||
local download_dir config_dir
|
||||
local mem_percentage
|
||||
local nice
|
||||
local web_home
|
||||
|
||||
section_enabled "$section" || return 1
|
||||
local enabled
|
||||
config_get_bool enabled "$cfg" enabled 0
|
||||
[ "$enabled" -gt 0 ] || {
|
||||
echo "Transmission not enabled. Please enable in /etc/config/transmission"
|
||||
logger -t "transmission" -p "daemon.info" "Transmission not enabled. Please enable in /etc/config/transmission"
|
||||
return 1
|
||||
}
|
||||
|
||||
local config_dir
|
||||
config_get config_dir "$cfg" 'config_dir' '/var/etc/transmission'
|
||||
local user
|
||||
config_get user "$cfg" 'user'
|
||||
local group
|
||||
config_get group "$cfg" 'group'
|
||||
local download_dir
|
||||
config_get download_dir "$cfg" 'download_dir' '/var/etc/transmission'
|
||||
local incomplete_dir
|
||||
config_get incomplete_dir "$cfg" 'incomplete_dir' '/var/etc/transmission'
|
||||
local incomplete_dir_enabled
|
||||
config_get incomplete_dir_enabled "$cfg" 'incomplete_dir_enabled' 0
|
||||
local mem_percentage
|
||||
config_get mem_percentage "$cfg" 'mem_percentage' '50'
|
||||
local config_overwrite
|
||||
config_get config_overwrite "$cfg" config_overwrite 1
|
||||
local nice
|
||||
config_get nice "$cfg" nice 0
|
||||
local web_home
|
||||
config_get web_home "$cfg" 'web_home'
|
||||
local seccomp_path
|
||||
|
||||
local MEM
|
||||
|
||||
MEM=$(sed -ne 's!^MemTotal:[[:space:]]*\([0-9]*\) kB$!\1!p' /proc/meminfo)
|
||||
if test "$MEM" -gt 1;then
|
||||
USE=$((MEM * mem_percentage * 10))
|
||||
fi
|
||||
local USE
|
||||
[ "$MEM" -gt 1 ] && USE=$((MEM * mem_percentage * 10))
|
||||
|
||||
config_file="$config_dir/settings.json"
|
||||
[ -d "$config_dir" ] || {
|
||||
mkdir -p "$config_dir"
|
||||
chmod 0755 "$config_dir"
|
||||
touch "$config_file"
|
||||
mkdir -p "$config_dir/resume"
|
||||
mkdir -p "$config_dir/torrents"
|
||||
mkdir -p "$config_dir/blocklists"
|
||||
[ -e "$config_dir/stats.json" ] || touch "$config_dir/stats.json"
|
||||
[ -z "$user" ] || chown -R "$user:$group" "$config_dir"
|
||||
}
|
||||
|
||||
[ -d "$download_dir" ] || {
|
||||
mkdir -p "$download_dir"
|
||||
chmod 0755 "$download_dir"
|
||||
[ -z "$user" ] || chown -R "$user:$group" "$download_dir"
|
||||
}
|
||||
|
||||
[ "$incomplete_dir_enabled" = "0" ] || [ -d "$incomplete_dir" ] || {
|
||||
mkdir -p "$incomplete_dir"
|
||||
chmod 0755 "$incomplete_dir"
|
||||
[ -z "$user" ] || chown -R "$user:$group" "$incomplete_dir"
|
||||
}
|
||||
|
||||
[ "$config_overwrite" = 0 ] || {
|
||||
|
||||
echo "{" > "$config_file"
|
||||
echo "{"
|
||||
|
||||
append_params "$cfg" \
|
||||
alt_speed_down alt_speed_enabled alt_speed_time_begin alt_speed_time_day \
|
||||
@ -89,7 +108,7 @@ transmission() {
|
||||
cache_size_mb download_queue_enabled download_queue_size \
|
||||
dht_enabled encryption idle_seeding_limit idle_seeding_limit_enabled \
|
||||
incomplete_dir_enabled lazy_bitfield_enabled lpd_enabled message_level \
|
||||
peer_limit_global peer_limit_per_torrent peer_port \
|
||||
peer_id_ttl_hours peer_limit_global peer_limit_per_torrent peer_port \
|
||||
peer_port_random_high peer_port_random_low peer_port_random_on_start \
|
||||
pex_enabled port_forwarding_enabled preallocation prefetch_enabled \
|
||||
ratio_limit ratio_limit_enabled rename_partial_files rpc_authentication_required \
|
||||
@ -98,7 +117,7 @@ transmission() {
|
||||
seed_queue_enabled seed_queue_size \
|
||||
speed_limit_down speed_limit_down_enabled speed_limit_up \
|
||||
speed_limit_up_enabled start_added_torrents trash_original_torrent_files \
|
||||
umask upload_slots_per_torrent utp_enabled scrape_paused_torrents \
|
||||
umask upload_slots_per_torrent utp_enabled \
|
||||
watch_dir_enabled rpc_host_whitelist_enabled
|
||||
|
||||
append_params_quotes "$cfg" \
|
||||
@ -106,21 +125,25 @@ transmission() {
|
||||
peer_congestion_algorithm peer_socket_tos rpc_bind_address rpc_password rpc_url \
|
||||
rpc_username rpc_host_whitelist rpc_whitelist script_torrent_done_filename watch_dir
|
||||
|
||||
{
|
||||
echo "\"invalid-key\": false"
|
||||
echo "}"
|
||||
} >> "$config_file"
|
||||
}
|
||||
|
||||
} > "$config_file"
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command "/usr/bin/transmission-daemon"
|
||||
procd_append_param command -f --log-error -g "$config_dir"
|
||||
procd_set_param command "$PROG"
|
||||
procd_append_param command -f -g "$config_dir"
|
||||
procd_set_param user "$user"
|
||||
procd_set_param group "$group"
|
||||
procd_set_param nice "$nice"
|
||||
procd_set_param stderr 1
|
||||
procd_set_param respawn
|
||||
|
||||
seccomp_path="/etc/seccomp/transmission-daemon.json"
|
||||
if [ -f "$seccomp_path" ]; then
|
||||
procd_set_param seccomp "$seccomp_path"
|
||||
fi
|
||||
|
||||
if [ -z "$USE" ]; then
|
||||
procd_set_param limits core="0 0"
|
||||
else
|
||||
@ -128,13 +151,16 @@ transmission() {
|
||||
logger -t transmission "Starting with $USE virt mem"
|
||||
fi
|
||||
|
||||
if test -d "$web_home"; then
|
||||
procd_set_param env TRANSMISSION_WEB_HOME="$web_home"
|
||||
fi
|
||||
[ -d "$web_home" ] && procd_set_param env TRANSMISSION_WEB_HOME="$web_home"
|
||||
|
||||
procd_add_jail transmission log
|
||||
procd_add_jail_mount "$config_file"
|
||||
procd_add_jail_mount_rw "$config_dir/resume"
|
||||
procd_add_jail_mount_rw "$config_dir/torrents"
|
||||
procd_add_jail_mount_rw "$config_dir/blocklists"
|
||||
procd_add_jail_mount_rw "$config_dir/stats.json"
|
||||
procd_add_jail_mount_rw "$download_dir"
|
||||
[ -d "$web_home" ] && procd_add_jail_mount_rw "$web_home"
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
@ -143,3 +169,10 @@ start_service() {
|
||||
config_foreach transmission 'transmission'
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
procd_send_signal "$PROG"
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger "transmission"
|
||||
}
|
||||
|
@ -1,30 +0,0 @@
|
||||
From d6655cca7db1b960456811b8206ce222700e010d Mon Sep 17 00:00:00 2001
|
||||
From: Rosen Penev <rosenp@gmail.com>
|
||||
Date: Tue, 30 Jan 2018 13:19:58 -0800
|
||||
Subject: [PATCH] Remove compressed responses from web servers.
|
||||
|
||||
While zlib is mandatory for transmission, it is not mandatory for curl.
|
||||
|
||||
A libcurl that has been compiled with no support for zlib will return no data if compressed responses are set to on.
|
||||
|
||||
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
||||
---
|
||||
libtransmission/web.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libtransmission/web.c b/libtransmission/web.c
|
||||
index c7f0627..db34976 100644
|
||||
--- a/libtransmission/web.c
|
||||
+++ b/libtransmission/web.c
|
||||
@@ -180,7 +180,7 @@ createEasy (tr_session * s, struct tr_web * web, struct tr_web_task * task)
|
||||
task->timeout_secs = getTimeoutFromURL (task);
|
||||
|
||||
curl_easy_setopt (e, CURLOPT_AUTOREFERER, 1L);
|
||||
- curl_easy_setopt (e, CURLOPT_ENCODING, "gzip;q=1.0, deflate, identity");
|
||||
+ curl_easy_setopt (e, CURLOPT_ENCODING, "");
|
||||
curl_easy_setopt (e, CURLOPT_FOLLOWLOCATION, 1L);
|
||||
curl_easy_setopt (e, CURLOPT_MAXREDIRS, -1L);
|
||||
curl_easy_setopt (e, CURLOPT_NOSIGNAL, 1L);
|
||||
--
|
||||
2.7.4
|
||||
|
12
net/transmission/patches/010-no-intltool.patch
Normal file
12
net/transmission/patches/010-no-intltool.patch
Normal file
@ -0,0 +1,12 @@
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -555,9 +555,6 @@ dnl it should be safe to re-edit 0.40 ba
|
||||
use_nls=no
|
||||
if test "x$enable_nls" = "xyes" ; then
|
||||
use_nls=yes
|
||||
- m4_ifdef([IT_PROG_INTLTOOL],
|
||||
- [IT_PROG_INTLTOOL([0.35.0],[no-xml])],
|
||||
- [AC_MSG_ERROR("--enable-nls requires intltool to be installed.")])
|
||||
AC_CHECK_HEADERS([libintl.h])
|
||||
GETTEXT_PACKAGE=transmission-gtk
|
||||
AC_SUBST(GETTEXT_PACKAGE)
|
@ -1,26 +0,0 @@
|
||||
From 405d768bfea661c418e2c75686a7bac95e4bb17b Mon Sep 17 00:00:00 2001
|
||||
From: Rosen Penev <rosenp@gmail.com>
|
||||
Date: Thu, 1 Mar 2018 11:25:15 -0800
|
||||
Subject: [PATCH] fix web interface with Safari.
|
||||
|
||||
Backport of bcfe147e6a41ce7774f569ede6179a7ed2c7f560
|
||||
---
|
||||
web/javascript/common.js | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/web/javascript/common.js b/web/javascript/common.js
|
||||
index 7162d3f82..77bf96857 100644
|
||||
--- a/web/javascript/common.js
|
||||
+++ b/web/javascript/common.js
|
||||
@@ -61,7 +61,7 @@ $(document).ready(function() {
|
||||
// Fix min height for isMobileDevice when run in full screen mode from home screen
|
||||
// so the footer appears in the right place
|
||||
$('body div#torrent_container').css('min-height', '338px');
|
||||
- $("label[for=torrent_upload_url]").text("URL: ");
|
||||
+ $("label[for=torrent_upload_url]").text = "URL: ";
|
||||
} else {
|
||||
// Fix for non-Safari-3 browsers: dark borders to replace shadows.
|
||||
$('div.dialog_container div.dialog_window').css('border', '1px solid #777');
|
||||
--
|
||||
2.14.3
|
||||
|
13
net/transmission/patches/020-mbedcrypto.patch
Normal file
13
net/transmission/patches/020-mbedcrypto.patch
Normal file
@ -0,0 +1,13 @@
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -152,8 +152,8 @@ AS_IF([test "x$want_crypto" = "xauto" -o
|
||||
)
|
||||
])
|
||||
AS_IF([test "x$want_crypto" = "xauto" -o "x$want_crypto" = "xpolarssl"], [
|
||||
- PKG_CHECK_MODULES(MBEDTLS, [mbedtls >= $POLARSSL_MINIMUM],
|
||||
- [want_crypto="polarssl"; CRYPTO_PKG="polarssl"; CRYPTO_CFLAGS="$MBEDTLS_CFLAGS"; CRYPTO_LIBS="$MBEDTLS_LIBS"; POLARSSL_IS_MBEDTLS=yes],
|
||||
+ AC_CHECK_LIB(mbedcrypto, mbedtls_strerror,
|
||||
+ [want_crypto="polarssl"; CRYPTO_PKG="polarssl"; CRYPTO_LIBS="-lmbedcrypto"; POLARSSL_IS_MBEDTLS=yes],
|
||||
[AC_CHECK_HEADER([polarssl/version.h],
|
||||
[AC_EGREP_CPP([version_ok], [#include <polarssl/version.h>
|
||||
#if defined (POLARSSL_VERSION_NUMBER) && POLARSSL_VERSION_NUMBER >= $POLARSSL_MINIMUM
|
@ -1,31 +0,0 @@
|
||||
From df03e037c69ebd74dd2db77d034b65980f0dc2d0 Mon Sep 17 00:00:00 2001
|
||||
From: Mike Gelfand <mikedld@mikedld.com>
|
||||
Date: Tue, 23 Jan 2018 21:20:30 +0300
|
||||
Subject: [PATCH] Fix memory leak in `tr_dhtInit` in failure condition
|
||||
|
||||
Fixes: #482
|
||||
---
|
||||
libtransmission/tr-dht.c | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/libtransmission/tr-dht.c b/libtransmission/tr-dht.c
|
||||
index 243429f64..df56542bc 100644
|
||||
--- a/libtransmission/tr-dht.c
|
||||
+++ b/libtransmission/tr-dht.c
|
||||
@@ -333,8 +333,11 @@ tr_dhtInit (tr_session *ss)
|
||||
|
||||
return 1;
|
||||
|
||||
- fail:
|
||||
- tr_logAddNamedDbg ("DHT", "DHT initialization failed (errno = %d)", errno);
|
||||
+fail:
|
||||
+ tr_free(nodes6);
|
||||
+ tr_free(nodes);
|
||||
+
|
||||
+ tr_logAddNamedDbg("DHT", "DHT initialization failed (errno = %d)", errno);
|
||||
session = NULL;
|
||||
return -1;
|
||||
}
|
||||
--
|
||||
2.17.0
|
||||
|
@ -1,29 +0,0 @@
|
||||
From 4fa98f0b0b493ebbef616404dbc03ba5fe811997 Mon Sep 17 00:00:00 2001
|
||||
From: userwithuid <userwithuid@gmail.com>
|
||||
Date: Sun, 27 May 2018 12:47:15 -0700
|
||||
Subject: [PATCH] fix logic for setting the curl ca bundle file
|
||||
|
||||
we do not want to delete the system default by setting this to NULL...
|
||||
---
|
||||
libtransmission/web.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libtransmission/web.c b/libtransmission/web.c
|
||||
index db349760b..997a151b5 100644
|
||||
--- a/libtransmission/web.c
|
||||
+++ b/libtransmission/web.c
|
||||
@@ -191,7 +191,10 @@ createEasy (tr_session * s, struct tr_web * web, struct tr_web_task * task)
|
||||
#endif
|
||||
if (web->curl_ssl_verify)
|
||||
{
|
||||
- curl_easy_setopt (e, CURLOPT_CAINFO, web->curl_ca_bundle);
|
||||
+ if (web->curl_ca_bundle != NULL)
|
||||
+ {
|
||||
+ curl_easy_setopt (e, CURLOPT_CAINFO, web->curl_ca_bundle);
|
||||
+ }
|
||||
}
|
||||
else
|
||||
{
|
||||
--
|
||||
2.17.0
|
||||
|
@ -1,25 +0,0 @@
|
||||
From e24f7c6653ec385c8af7eb6499d924994e78e42d Mon Sep 17 00:00:00 2001
|
||||
From: Waldemar Brodkorb <wbx@uclibc-ng.org>
|
||||
Date: Wed, 19 Oct 2016 19:33:35 +0200
|
||||
Subject: [PATCH] uClibc-ng since 1.0.18 has sys/quota.h synced with GNU libc
|
||||
|
||||
---
|
||||
libtransmission/platform-quota.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libtransmission/platform-quota.c b/libtransmission/platform-quota.c
|
||||
index e7d1f6d4f..bb1f9d9b9 100644
|
||||
--- a/libtransmission/platform-quota.c
|
||||
+++ b/libtransmission/platform-quota.c
|
||||
@@ -285,7 +285,7 @@ getquota (const char * device)
|
||||
spaceused = (int64_t) dq.dqb_curblocks >> 1;
|
||||
#elif defined(__APPLE__)
|
||||
spaceused = (int64_t) dq.dqb_curbytes;
|
||||
-#elif defined(__UCLIBC__)
|
||||
+#elif defined (__UCLIBC__) && !TR_UCLIBC_CHECK_VERSION (1, 0, 18)
|
||||
spaceused = (int64_t) btodb(dq.dqb_curblocks);
|
||||
#elif defined(__sun) || (defined(_LINUX_QUOTA_VERSION) && _LINUX_QUOTA_VERSION < 2)
|
||||
spaceused = (int64_t) dq.dqb_curblocks >> 1;
|
||||
--
|
||||
2.17.1
|
||||
|
11
net/transmission/patches/080-disable-webseeding.patch
Normal file
11
net/transmission/patches/080-disable-webseeding.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/libtransmission/webseed.c
|
||||
+++ b/libtransmission/webseed.c
|
||||
@@ -510,8 +510,6 @@ static void webseed_timer_func(evutil_so
|
||||
++w->retry_tickcount;
|
||||
}
|
||||
|
||||
- on_idle(w);
|
||||
-
|
||||
tr_timerAddMsec(w->timer, TR_IDLE_TIMER_MSEC);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user