On Thu, Dec 22, 2016 at 11:30:30AM +0000, Sean Whitton wrote:
> Dear Peter,
> 
> On Thu, Dec 22, 2016 at 08:37:35AM +0200, Peter Pentchev wrote:
> > Oh, and, of course, if people feel that a collab-maint commit does not
> > really count as a team upload (but isn't this the purpose of collab-maint?),
> > I can send another debdiff, formatted as a real NMU, and then commit that.
> 
> A team upload is when you are a member of a team that is in the
> Maintainer: field for a package.  There is no team in libtorrent's
> Maintainer: field.  So this cannot be a team upload.

Well, yeah, I know that, but I figured that collab-maint might be a bit
different; I guess my impression was a bit wrong :)  I guess we need
a "please feel free to commit and upload anything reasonable" flag...
but let's not rehash the latest d-project discussion again :)

> It would be great if you could prepare a debdiff for a standard NMU.

Debdiff attached; Markus, take your pick between this one and the last one.

> Please consider submitting a normal RFS (severity important), and use
> the X-Debbugs-CC: pseudo-header to make Markus aware of it.
> 
> Since Markus has already offered to sponsor, it would normally not be
> necessary (and perhaps rude) to file an RFS.  However, we have less than
> 72 hours to get this NMU into unstable, or rtorrent will not in be in
> stretch.  So it's reasonable to file the RFS.

I guess I'll wait for another day or two before I do that.  Yes, I am
myself painfully aware of the migration deadline (I just posted an RFS
for a brand new package yesterday :)), but anyway, IMHO this particular
change should not be affected, since it does, after all, fix a RC bug.
Still, I'll consider it if Markus is too busy to handle this upload in
a day or two.

Thanks for the comments and the different point of view!

G'luck,
Peter

-- 
Peter Pentchev  r...@ringlet.net r...@freebsd.org p...@storpool.com
PGP key:        http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115  C354 651E EFB0 2527 DF13
diff -Nru libtorrent-0.13.6/debian/changelog libtorrent-0.13.6/debian/changelog
--- libtorrent-0.13.6/debian/changelog  2015-09-30 07:03:36.000000000 +0300
+++ libtorrent-0.13.6/debian/changelog  2016-12-22 08:32:11.000000000 +0200
@@ -1,3 +1,14 @@
+libtorrent (0.13.6-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload for fixing a FTBFS and a RC bug.
+  * Explicitly add zlib to the build dependencies now that OpenSSL
+    no longer depends on it.
+  * Import the dh-openssl-1.1 upstream patch to fix the compilation with
+    OpenSSL 1.1 by using an accessor function to store the generated
+    DH parameters.  Closes: #828414
+
+ -- Peter Pentchev <r...@ringlet.net>  Thu, 22 Dec 2016 08:32:11 +0200
+
 libtorrent (0.13.6-1) unstable; urgency=medium
 
   [ Jonathan McDowell ]
diff -Nru libtorrent-0.13.6/debian/control libtorrent-0.13.6/debian/control
--- libtorrent-0.13.6/debian/control    2015-09-30 07:03:36.000000000 +0300
+++ libtorrent-0.13.6/debian/control    2016-12-21 22:41:22.000000000 +0200
@@ -12,7 +12,8 @@
  libcppunit-dev,
  libcurl4-openssl-dev,
  libsigc++-2.0-dev,
- libssl-dev
+ libssl-dev,
+ zlib1g-dev
 Standards-Version: 3.9.6
 Vcs-git: git://git.debian.org/git/collab-maint/libtorrent.git
 Vcs-browser: http://git.debian.org/?p=collab-maint/libtorrent.git;a=summary
diff -Nru libtorrent-0.13.6/debian/patches/dh-openssl-1.1.patch 
libtorrent-0.13.6/debian/patches/dh-openssl-1.1.patch
--- libtorrent-0.13.6/debian/patches/dh-openssl-1.1.patch       1970-01-01 
02:00:00.000000000 +0200
+++ libtorrent-0.13.6/debian/patches/dh-openssl-1.1.patch       2016-12-22 
08:31:54.000000000 +0200
@@ -0,0 +1,99 @@
+Description: Fix the DH parameters generation with OpenSSL 1.1.
+ The DH structure is now opaque, so the parameters must be stored there
+ through an accessor function.
+Origin: upstream; 
https://github.com/rakshasa/libtorrent/commit/4607bbf78040789dee29266878ce109136b984ef
+Bug-Debian: https://bugs.debian.org/828414
+Author: rakshasa <sundell.softw...@gmail.com>
+Last-Update: 2016-12-22
+
+--- a/src/utils/diffie_hellman.cc
++++ b/src/utils/diffie_hellman.cc
+@@ -53,11 +53,23 @@
+   m_secret(NULL), m_size(0) {
+ 
+ #ifdef USE_OPENSSL
++
+   m_dh = DH_new();
++
++#ifdef USE_OPENSSL_1_1
++  BIGNUM * const dh_p = BN_bin2bn(prime, primeLength, NULL);
++  BIGNUM * const dh_g = BN_bin2bn(generator, generatorLength, NULL);
++
++  if (dh_p == NULL || dh_g == NULL ||
++      !DH_set0_pqg(m_dh, dh_p, NULL, dh_g))
++        throw internal_error("Could not generate Diffie-Hellman parameters");
++#else
+   m_dh->p = BN_bin2bn(prime, primeLength, NULL);
+   m_dh->g = BN_bin2bn(generator, generatorLength, NULL);
++#endif
+ 
+   DH_generate_key(m_dh);
++
+ #else
+   throw internal_error("Compiled without encryption support.");
+ #endif
+@@ -73,7 +85,19 @@
+ bool
+ DiffieHellman::is_valid() const {
+ #ifdef USE_OPENSSL
++  if (m_dh == NULL)
++    return false;
++
++#ifdef USE_OPENSSL_1_1
++  const BIGNUM *pub_key;
++
++  DH_get0_key(m_dh, &pub_key, NULL);
++
++  return pub_key != NULL;
++#else
+   return m_dh != NULL && m_dh->pub_key != NULL;
++#endif
++
+ #else
+   return false;
+ #endif
+@@ -102,8 +126,16 @@
+ #ifdef USE_OPENSSL
+   std::memset(dest, 0, length);
+ 
+-  if ((int)length >= BN_num_bytes(m_dh->pub_key))
+-    BN_bn2bin(m_dh->pub_key, dest + length - BN_num_bytes(m_dh->pub_key));
++  const BIGNUM *pub_key;
++
++#ifdef USE_OPENSSL_1_1
++  DH_get0_key(m_dh, &pub_key, NULL);
++#else
++  pub_key = m_dh->pub_key;
++#endif
++
++  if ((int)length >= BN_num_bytes(pub_key))
++    BN_bn2bin(pub_key, dest + length - BN_num_bytes(pub_key));
+ #endif
+ }
+ 
+--- a/configure.ac
++++ b/configure.ac
+@@ -66,12 +66,15 @@
+   [  --disable-openssl       Don't use OpenSSL's SHA1 implementation.],
+   [
+     if test "$enableval" = "yes"; then
++dnl move to scripts.
+       PKG_CHECK_MODULES(OPENSSL, libcrypto,
+         CXXFLAGS="$CXXFLAGS $OPENSSL_CFLAGS";
+         LIBS="$LIBS $OPENSSL_LIBS")
+ 
+       AC_DEFINE(USE_OPENSSL, 1, Using OpenSSL.)
+       AC_DEFINE(USE_OPENSSL_SHA, 1, Using OpenSSL's SHA1 implementation.)
++      AC_CHECK_LIB([crypto], [DH_set0_pqg], [AC_DEFINE(USE_OPENSSL_1_1, 1, 
Using OpenSSL 1.1.)])
++
+     else
+       AC_DEFINE(USE_NSS_SHA, 1, Using Mozilla's SHA1 implementation.)
+     fi
+@@ -82,6 +85,7 @@
+ 
+     AC_DEFINE(USE_OPENSSL, 1, Using OpenSSL.)
+     AC_DEFINE(USE_OPENSSL_SHA, 1, Using OpenSSL's SHA1 implementation.)
++    AC_CHECK_LIB([crypto], [DH_set0_pqg], [AC_DEFINE(USE_OPENSSL_1_1, 1, 
Using OpenSSL 1.1.)])
+   ]
+ )
+ 
diff -Nru libtorrent-0.13.6/debian/patches/series 
libtorrent-0.13.6/debian/patches/series
--- libtorrent-0.13.6/debian/patches/series     1970-01-01 02:00:00.000000000 
+0200
+++ libtorrent-0.13.6/debian/patches/series     2016-12-21 22:41:22.000000000 
+0200
@@ -0,0 +1 @@
+dh-openssl-1.1.patch

Attachment: signature.asc
Description: PGP signature

Reply via email to