include $(TOPDIR)/rules.mk
PKG_NAME:=transmission
-PKG_VERSION:=3.00
-PKG_RELEASE:=21
+PKG_VERSION:=4.0.1
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=@GITHUB/transmission/transmission-releases/master
-PKG_HASH:=9144652fe742f7f7dd6657716e378da60b751aaeda8bef8344b3eefc4db255f2
+PKG_SOURCE_URL:=https://github.com/transmission/transmission/releases/download/$(PKG_VERSION)/
+PKG_HASH:=8fc5aef23638c983406f6a3ee9918369e4cdc84e3228bd2fb3d01dd55cdad900
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
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_DEPENDS:=libb64 node/host
PKG_BUILD_PARALLEL:=1
PKG_CONFIG_DEPENDS:= \
CONFIG_LIBCURL_GNUTLS \
CONFIG_LIBCURL_NOSSL
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
include $(INCLUDE_DIR)/package-seccomp.mk
define Package/transmission/template
CATEGORY:=Network
TITLE:=BitTorrent client
URL:=https://www.transmissionbt.com
- DEPENDS:=+libcurl +libevent2 +libminiupnpc +libnatpmp +libpthread +librt +zlib +LIBCURL_NOSSL:libmbedtls +LIBCURL_GNUTLS:libmbedtls
+ DEPENDS:=+libatomic +libcurl +libdeflate +libdht +libevent2 \
+ +libevent2-pthreads +libminiupnpc +libnatpmp +libpthread +libpsl \
+ +librt +libutp +zlib +LIBCURL_NOSSL:libmbedtls \
+ +LIBCURL_GNUTLS:libmbedtls
endef
define Package/transmission-daemon
/etc/config/transmission
endef
-TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
+TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto -DHAVE_SIZE_T -latomic
TARGET_LDFLAGS += -Wl,--gc-sections -Wl,--as-needed
-CONFIGURE_ARGS += \
- --enable-cli \
- --enable-daemon \
- --enable-external-natpmp \
- --enable-largefile \
- --enable-lightweight \
- --without-gtk \
- --without-kqueue \
- --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=cyassl)
+CMAKE_OPTIONS += \
+ -DENABLE_CLI:BOOL=YES \
+ -DENABLE_GTK:BOOL=NO \
+ -DENABLE_QT:BOOL=NO \
+ -DENABLE_MAC:BOOL=NO \
+ -DENABLE_TESTS:BOOL=NO \
+ -DENABLE_NLS:BOOL=NO \
+ -DENABLE_UTP:BOOL=YES \
+ -DRUN_CLANG_TIDY:BOOL=NO \
+ -DUSE_SYSTEM_EVENT2:BOOL=YES \
+ -DUSE_SYSTEM_DEFLATE:BOOL=YES \
+ -DUSE_SYSTEM_DHT:BOOL=YES \
+ -DUSE_SYSTEM_MINIUPNPC:BOOL=YES \
+ -DUSE_SYSTEM_NATPMP:BOOL=YES \
+ -DUSE_SYSTEM_UTP:BOOL=YES \
+ -DUSE_SYSTEM_B64:BOOL=YES \
+ -DUSE_SYSTEM_PSL:BOOL=YES \
+ -DWITH_INOTIFY:BOOL=YES \
+ -DWITH_KQUEUE:BOOL=NO \
+ -DWITH_SYSTEMD:BOOL=NO \
+ -DB64_INCLUDE_DIR=$(STAGING_DIR)/usr/include \
+ -DB64_LIBRARY=$(STAGING_DIR)/usr/lib/libb64.a \
+ -DDHT_INCLUDE_DIR=$(STAGING_DIR)/usr/include \
+ -DDHT_LIBRARY=$(STAGING_DIR)/usr/lib/libdht.so \
+ -DUTP_INCLUDE_DIR=$(STAGING_DIR)/usr/include \
+ -DUTP_LIBRARY=$(STAGING_DIR)/usr/lib/libutp.so \
+ $(if $(CONFIG_LIBCURL_NOSSL),-DWITH_CRYPTO=mbedtls) \
+ $(if $(CONFIG_LIBCURL_GNUTLS),-DWITH_CRYPTO=mbedtls) \
+ $(if $(CONFIG_LIBCURL_MBEDTLS),-DWITH_CRYPTO=mbedtls) \
+ $(if $(CONFIG_LIBCURL_OPENSSL),-DWITH_CRYPTO=openssl) \
+ $(if $(CONFIG_LIBCURL_WOLFSSL),-DWITH_CRYPTO=wolfssl)
define Package/transmission-daemon/install
$(INSTALL_DIR) $(1)/usr/bin
define Package/transmission-web/install
$(INSTALL_DIR) $(1)/usr/share/transmission
- $(CP) $(PKG_INSTALL_DIR)/usr/share/transmission/web $(1)/usr/share/transmission/
+ $(CP) $(PKG_INSTALL_DIR)/usr/share/transmission/public_html $(1)/usr/share/transmission/
endef
$(eval $(call BuildPackage,transmission-daemon))
"epoll_create1",
"epoll_ctl",
"epoll_pwait",
+ "eventfd2",
"exit",
"exit_group",
"faccessat",
"sendto",
"setsockopt",
"shutdown",
+ "signalfd4",
"sigreturn",
"socket",
"socketpair",
procd_add_jail_mount_rw "$download_dir"
[ "$incomplete_dir_enabled" = "1" ] && procd_add_jail_mount_rw "$incomplete_dir"
[ "$watch_dir_enabled" = "1" ] && procd_add_jail_mount_rw "$watch_dir"
- web_home="${web_home:-/usr/share/transmission/web}"
+ web_home="${web_home:-/usr/share/transmission/public_html}"
[ -d "$web_home" ] && procd_add_jail_mount "$web_home"
[ -f "$ca_bundle_file" ] && procd_add_jail_mount "$ca_bundle_file"
procd_close_instance
+++ /dev/null
-From 98da2afa58b7bdf5350de16fd99905ddb04e1b0d Mon Sep 17 00:00:00 2001
-From: Dan Walters <dan@walters.io>
-Date: Sun, 13 Oct 2019 10:08:36 -0500
-Subject: [PATCH] Apply the configured peer socket TOS to UDP sockets, not just
- TCP.
-
----
- libtransmission/session.c | 2 ++
- libtransmission/tr-udp.c | 20 ++++++++++++++++++++
- libtransmission/tr-udp.h | 1 +
- 3 files changed, 23 insertions(+)
-
---- a/libtransmission/session.c
-+++ b/libtransmission/session.c
-@@ -2274,6 +2274,8 @@ static void toggle_utp(void* data)
-
- tr_udpSetSocketBuffers(session);
-
-+ tr_udpSetSocketTOS(session);
-+
- /* But don't call tr_utpClose -- see reset_timer in tr-utp.c for an
- explanation. */
- }
---- a/libtransmission/tr-udp.c
-+++ b/libtransmission/tr-udp.c
-@@ -125,6 +125,24 @@ void tr_udpSetSocketBuffers(tr_session*
- }
- }
-
-+void tr_udpSetSocketTOS(tr_session* session)
-+{
-+ if (session->peerSocketTOS == 0)
-+ {
-+ return;
-+ }
-+
-+ if (session->udp_socket != TR_BAD_SOCKET)
-+ {
-+ tr_netSetTOS(session->udp_socket, session->peerSocketTOS, TR_AF_INET);
-+ }
-+
-+ if (session->udp6_socket != TR_BAD_SOCKET)
-+ {
-+ tr_netSetTOS(session->udp6_socket, session->peerSocketTOS, TR_AF_INET6);
-+ }
-+}
-+
- /* BEP-32 has a rather nice explanation of why we need to bind to one
- IPv6 address, if I may say so myself. */
-
-@@ -363,6 +381,8 @@ ipv6:
-
- tr_udpSetSocketBuffers(ss);
-
-+ tr_udpSetSocketTOS(ss);
-+
- if (ss->isDHTEnabled)
- {
- tr_dhtInit(ss);
---- a/libtransmission/tr-udp.h
-+++ b/libtransmission/tr-udp.h
-@@ -30,5 +30,6 @@ THE SOFTWARE.
- void tr_udpInit(tr_session*);
- void tr_udpUninit(tr_session*);
- void tr_udpSetSocketBuffers(tr_session*);
-+void tr_udpSetSocketTOS(tr_session*);
-
- bool tau_handle_message(tr_session* session, uint8_t const* msg, size_t msglen);
+++ /dev/null
---- 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)
+++ /dev/null
---- 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
+++ /dev/null
-From 82b5d4028885d75adba9b66d43aeb11592e64914 Mon Sep 17 00:00:00 2001
-From: Rosen Penev <rosenp@gmail.com>
-Date: Wed, 13 Oct 2021 18:16:55 -0700
-Subject: [PATCH] fix runtime with wolfSSL and fastmath
-
-wolfSSL's fastmath support requires options.h to be included before
-anything else. Otherwise bad codepaths get taken and a crash occurs
-during DH initialization.
-
-Signed-off-by: Rosen Penev <rosenp@gmail.com>
----
- libtransmission/crypto-utils-cyassl.c | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/libtransmission/crypto-utils-cyassl.c
-+++ b/libtransmission/crypto-utils-cyassl.c
-@@ -19,6 +19,7 @@
- #define API_VERSION_HEX LIBCYASSL_VERSION_HEX
- #endif
-
-+#include API_HEADER(options.h)
- #include API_HEADER_CRYPT(arc4.h)
- #include API_HEADER_CRYPT(dh.h)
- #include API_HEADER_CRYPT(error-crypt.h)
+++ /dev/null
---- 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);
- }
-