From 96fd2dc5317f811a575de449d1db8dfdee5c3e61 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sun, 19 Feb 2023 04:44:50 +0000 Subject: [PATCH] transmission: update to version 4.0.1 This is a major release, both in numbering and in effort! It's been in active development for over a year and has a huge list of changes -- over a thousand commits -- since Transmission 3.00. For more information about the release see https://github.com/transmission/transmission/releases/tag/4.0.0 https://github.com/transmission/transmission/releases/tag/4.0.1 Signed-off-by: Daniel Golle --- net/transmission/Makefile | 65 ++++++++++++------ .../files/transmission-daemon.json | 2 + net/transmission/files/transmission.init | 2 +- .../001-apply-dscp-to-udp-sockets.patch | 68 ------------------- .../patches/010-no-intltool.patch | 12 ---- net/transmission/patches/020-mbedcrypto.patch | 13 ---- net/transmission/patches/030-wolfssl.patch | 24 ------- .../patches/080-disable-webseeding.patch | 11 --- 8 files changed, 46 insertions(+), 151 deletions(-) delete mode 100644 net/transmission/patches/001-apply-dscp-to-udp-sockets.patch delete mode 100644 net/transmission/patches/010-no-intltool.patch delete mode 100644 net/transmission/patches/020-mbedcrypto.patch delete mode 100644 net/transmission/patches/030-wolfssl.patch delete mode 100644 net/transmission/patches/080-disable-webseeding.patch diff --git a/net/transmission/Makefile b/net/transmission/Makefile index 4626c1b965..dc95537c21 100644 --- a/net/transmission/Makefile +++ b/net/transmission/Makefile @@ -8,20 +8,20 @@ include $(TOPDIR)/rules.mk PKG_NAME:=transmission -PKG_VERSION:=3.00 -PKG_RELEASE:=19 +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 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 \ @@ -31,6 +31,7 @@ PKG_CONFIG_DEPENDS:= \ CONFIG_LIBCURL_NOSSL include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk include $(INCLUDE_DIR)/package-seccomp.mk define Package/transmission/template @@ -39,7 +40,10 @@ 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 @@ -87,23 +91,40 @@ define Package/transmission-daemon/conffiles /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 @@ -133,7 +154,7 @@ endef 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)) diff --git a/net/transmission/files/transmission-daemon.json b/net/transmission/files/transmission-daemon.json index b652d32574..f1fc456ecc 100644 --- a/net/transmission/files/transmission-daemon.json +++ b/net/transmission/files/transmission-daemon.json @@ -17,6 +17,7 @@ "epoll_create1", "epoll_ctl", "epoll_pwait", + "eventfd2", "exit", "exit_group", "faccessat", @@ -87,6 +88,7 @@ "sendto", "setsockopt", "shutdown", + "signalfd4", "sigreturn", "socket", "socketpair", diff --git a/net/transmission/files/transmission.init b/net/transmission/files/transmission.init index a6bc00f01b..a1673087f0 100644 --- a/net/transmission/files/transmission.init +++ b/net/transmission/files/transmission.init @@ -170,7 +170,7 @@ transmission() { 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 diff --git a/net/transmission/patches/001-apply-dscp-to-udp-sockets.patch b/net/transmission/patches/001-apply-dscp-to-udp-sockets.patch deleted file mode 100644 index a3fd634412..0000000000 --- a/net/transmission/patches/001-apply-dscp-to-udp-sockets.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 98da2afa58b7bdf5350de16fd99905ddb04e1b0d Mon Sep 17 00:00:00 2001 -From: Dan Walters -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); diff --git a/net/transmission/patches/010-no-intltool.patch b/net/transmission/patches/010-no-intltool.patch deleted file mode 100644 index ba59092bc5..0000000000 --- a/net/transmission/patches/010-no-intltool.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- 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) diff --git a/net/transmission/patches/020-mbedcrypto.patch b/net/transmission/patches/020-mbedcrypto.patch deleted file mode 100644 index 18c33f5b7c..0000000000 --- a/net/transmission/patches/020-mbedcrypto.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- 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 - #if defined (POLARSSL_VERSION_NUMBER) && POLARSSL_VERSION_NUMBER >= $POLARSSL_MINIMUM diff --git a/net/transmission/patches/030-wolfssl.patch b/net/transmission/patches/030-wolfssl.patch deleted file mode 100644 index 53e1393d53..0000000000 --- a/net/transmission/patches/030-wolfssl.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 82b5d4028885d75adba9b66d43aeb11592e64914 Mon Sep 17 00:00:00 2001 -From: Rosen Penev -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 ---- - 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) diff --git a/net/transmission/patches/080-disable-webseeding.patch b/net/transmission/patches/080-disable-webseeding.patch deleted file mode 100644 index f63d78d3e3..0000000000 --- a/net/transmission/patches/080-disable-webseeding.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- 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); - } -