pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/net transmission*: fix build with openssl-1.1.
details: https://anonhg.NetBSD.org/pkgsrc/rev/b084c6f8da8e
branches: trunk
changeset: 375590:b084c6f8da8e
user: wiz <wiz%pkgsrc.org@localhost>
date: Fri Feb 16 12:33:36 2018 +0000
description:
transmission*: fix build with openssl-1.1.
>From upstream via Peter Hjalmarsson via
https://bugzilla.redhat.com/show_bug.cgi?id=1468077
Bump PKGREVISION.
diffstat:
net/transmission-gtk/Makefile | 4 +-
net/transmission-qt/Makefile | 4 +-
net/transmission/Makefile | 4 +-
net/transmission/distinfo | 3 +-
net/transmission/patches/patch-libtransmission_crypto-utils-openssl.c | 115 ++++++++++
5 files changed, 123 insertions(+), 7 deletions(-)
diffs (180 lines):
diff -r 5d2930667b53 -r b084c6f8da8e net/transmission-gtk/Makefile
--- a/net/transmission-gtk/Makefile Fri Feb 16 12:21:28 2018 +0000
+++ b/net/transmission-gtk/Makefile Fri Feb 16 12:33:36 2018 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.26 2018/01/16 09:37:00 wiz Exp $
+# $NetBSD: Makefile,v 1.27 2018/02/16 12:33:37 wiz Exp $
PKGNAME= transmission-gtk-${VERSION}
-PKGREVISION= 10
+PKGREVISION= 11
USE_LANGUAGES= c c++
INSTALL_ENV+= INSTALL_ROOT=${DESTDIR}${PREFIX}
diff -r 5d2930667b53 -r b084c6f8da8e net/transmission-qt/Makefile
--- a/net/transmission-qt/Makefile Fri Feb 16 12:21:28 2018 +0000
+++ b/net/transmission-qt/Makefile Fri Feb 16 12:33:36 2018 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.30 2018/01/16 09:37:00 wiz Exp $
+# $NetBSD: Makefile,v 1.31 2018/02/16 12:33:37 wiz Exp $
PKGNAME= transmission-qt-${VERSION}
-PKGREVISION= 13
+PKGREVISION= 14
USE_LANGUAGES= c c++
MAKE_ENV+= QTDIR=${QTDIR}
diff -r 5d2930667b53 -r b084c6f8da8e net/transmission/Makefile
--- a/net/transmission/Makefile Fri Feb 16 12:21:28 2018 +0000
+++ b/net/transmission/Makefile Fri Feb 16 12:33:36 2018 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.13 2018/01/16 09:37:00 wiz Exp $
+# $NetBSD: Makefile,v 1.14 2018/02/16 12:33:36 wiz Exp $
CONFLICTS+= Transmission-[0-9]*
+PKGREVISION= 7
pre-configure:
touch ${WRKSRC}/po/Makefile
@@ -8,6 +9,5 @@
CONFIGURE_ARGS+= --disable-mac
CONFIGURE_ARGS+= --without-gtk
-PKGREVISION= 6
.include "../../net/transmission/Makefile.common"
.include "../../mk/bsd.pkg.mk"
diff -r 5d2930667b53 -r b084c6f8da8e net/transmission/distinfo
--- a/net/transmission/distinfo Fri Feb 16 12:21:28 2018 +0000
+++ b/net/transmission/distinfo Fri Feb 16 12:33:36 2018 +0000
@@ -1,10 +1,11 @@
-$NetBSD: distinfo,v 1.13 2018/01/16 09:37:00 wiz Exp $
+$NetBSD: distinfo,v 1.14 2018/02/16 12:33:36 wiz Exp $
SHA1 (transmission-2.92.tar.xz) = 2140feba45c4471392033d21b86b6f3ef780d88e
RMD160 (transmission-2.92.tar.xz) = 6da78ce333fa2ea69aa4954c3b052a818ce7c93e
SHA512 (transmission-2.92.tar.xz) = 4d99476bee88cedcc4238a0eee64a4089016933cbfc1cfb1cca023ad4ebcfe46375c9e7651a17af4aeaaf1feb19cbd8166aa56ef7992d9e745a7bbcbe8efca11
Size (transmission-2.92.tar.xz) = 3378116 bytes
SHA1 (patch-ab) = 796faa7c61762dc3ffe563748e55160c827149d2
+SHA1 (patch-libtransmission_crypto-utils-openssl.c) = 3157e1410ecab0ebdad6609bbc088df8caf4a184
SHA1 (patch-libtransmission_platform-quota.c) = 2d9758d24c4329021e0774ac9f8bb3dd94592965
SHA1 (patch-libtransmission_quark.c) = 70b8d8d3de0ae480433464a1dbee4488af3b64d9
SHA1 (patch-libtransmission_quark.h) = 5c4b0a24e2e142a3504c232b333fa7665fe8178f
diff -r 5d2930667b53 -r b084c6f8da8e net/transmission/patches/patch-libtransmission_crypto-utils-openssl.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/transmission/patches/patch-libtransmission_crypto-utils-openssl.c Fri Feb 16 12:33:36 2018 +0000
@@ -0,0 +1,115 @@
+$NetBSD: patch-libtransmission_crypto-utils-openssl.c,v 1.1 2018/02/16 12:33:37 wiz Exp $
+
+Fix build with openssl-1.1.
+From upstream via Peter Hjalmarsson via
+https://bugzilla.redhat.com/show_bug.cgi?id=1468077
+
+--- libtransmission/crypto-utils-openssl.c.orig 2015-12-29 00:47:32.449150371 +0000
++++ libtransmission/crypto-utils-openssl.c
+@@ -230,6 +230,61 @@ tr_rc4_process (tr_rc4_ctx_t handle,
+ ****
+ ***/
+
++#if OPENSSL_VERSION_NUMBER < 0x10100000
++static inline int
++DH_set0_pqg (DH * dh,
++ BIGNUM * p,
++ BIGNUM * q,
++ BIGNUM * g)
++{
++ /* If the fields p and g in d are NULL, the corresponding input
++ * parameters MUST be non-NULL. q may remain NULL.
++ */
++ if ((dh->p == NULL && p == NULL)
++ || (dh->g == NULL && g == NULL))
++ return 0;
++
++ if (p != NULL) {
++ BN_free (dh->p);
++ dh->p = p;
++ }
++ if (q != NULL) {
++ BN_free (dh->q);
++ dh->q = q;
++ }
++ if (g != NULL) {
++ BN_free (dh->g);
++ dh->g = g;
++ }
++
++ if (q != NULL) {
++ dh->length = BN_num_bits (q);
++ }
++
++ return 1;
++}
++
++static inline int
++DH_set_length (DH * dh,
++ long length)
++{
++ dh->length = length;
++ return 1;
++}
++
++static inline void
++DH_get0_key(const DH * dh,
++ const BIGNUM ** pub_key,
++ const BIGNUM ** priv_key)
++{
++ if (pub_key != NULL)
++ *pub_key = dh->pub_key;
++ if (priv_key != NULL)
++ *priv_key = dh->priv_key;
++}
++
++#endif
++
+ tr_dh_ctx_t
+ tr_dh_new (const uint8_t * prime_num,
+ size_t prime_num_length,
+@@ -237,13 +292,19 @@ tr_dh_new (const uint8_t * prime_num,
+ size_t generator_num_length)
+ {
+ DH * handle = DH_new ();
++ BIGNUM * p, * g;
+
+ assert (prime_num != NULL);
+ assert (generator_num != NULL);
++ p = BN_bin2bn (prime_num, prime_num_length, NULL);
++ g = BN_bin2bn (generator_num, generator_num_length, NULL);
+
+- if (!check_pointer (handle->p = BN_bin2bn (prime_num, prime_num_length, NULL)) ||
+- !check_pointer (handle->g = BN_bin2bn (generator_num, generator_num_length, NULL)))
++ if (!check_pointer (p) ||
++ !check_pointer (g) ||
++ !DH_set0_pqg (handle, p, NULL, g))
+ {
++ BN_free (p);
++ BN_free (g);
+ DH_free (handle);
+ handle = NULL;
+ }
+@@ -268,16 +329,20 @@ tr_dh_make_key (tr_dh_ctx_t raw_handle
+ {
+ DH * handle = raw_handle;
+ int dh_size, my_public_key_length;
++ const BIGNUM * hand_pub_key;
+
+ assert (handle != NULL);
+ assert (public_key != NULL);
+
+- handle->length = private_key_length * 8;
++
++ DH_set_length(handle, private_key_length * 8);
+
+ if (!check_result (DH_generate_key (handle)))
+ return false;
+
+- my_public_key_length = BN_bn2bin (handle->pub_key, public_key);
++ DH_get0_key (handle, &hand_pub_key, NULL);
++
++ my_public_key_length = BN_bn2bin (hand_pub_key, public_key);
+ dh_size = DH_size (handle);
+
+ tr_dh_align_key (public_key, my_public_key_length, dh_size);
Home |
Main Index |
Thread Index |
Old Index