transmission: build with wolfSSL again
authorRosen Penev <rosenp@gmail.com>
Thu, 14 Oct 2021 01:34:52 +0000 (18:34 -0700)
committerDaniel Golle <daniel@makrotopia.org>
Thu, 14 Oct 2021 13:17:34 +0000 (14:17 +0100)
The problem was discovered and is now patched with an upstream backport.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
net/transmission/Makefile
net/transmission/patches/030-wolfssl.patch [new file with mode: 0644]

index 7926486a887dde8b44ae4b82e23fbe07a680d9f4..8c1e6106132f4e177f01323e543222eec4ff33d2 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=transmission
 PKG_VERSION:=3.00
-PKG_RELEASE:=14
+PKG_RELEASE:=15
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GITHUB/transmission/transmission-releases/master
@@ -40,7 +40,7 @@ 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 +LIBCURL_WOLFSSL:libmbedtls $(ICONV_DEPENDS)
+  DEPENDS:=+libcurl +libevent2 +libminiupnpc +libnatpmp +libpthread +librt +zlib +LIBCURL_NOSSL:libmbedtls +LIBCURL_GNUTLS:libmbedtls $(ICONV_DEPENDS)
 endef
 
 define Package/transmission-daemon
@@ -104,7 +104,7 @@ CONFIGURE_ARGS += \
        $(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)
+       $(if $(CONFIG_LIBCURL_WOLFSSL),--with-crypto=cyassl)
 
 define Package/transmission-daemon/install
        $(INSTALL_DIR) $(1)/usr/bin
diff --git a/net/transmission/patches/030-wolfssl.patch b/net/transmission/patches/030-wolfssl.patch
new file mode 100644 (file)
index 0000000..53e1393
--- /dev/null
@@ -0,0 +1,24 @@
+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)