diff -Nru bzr-2.7.0/debian/changelog bzr-2.7.0/debian/changelog --- bzr-2.7.0/debian/changelog 2016-02-11 15:46:53.000000000 +0000 +++ bzr-2.7.0/debian/changelog 2016-09-09 13:31:49.000000000 +0000 @@ -1,3 +1,18 @@ +bzr (2.7.0-2ubuntu2+ppa1) xenial; urgency=medium + + * debian/patches/20_1606203-long-auth.patch: work around (LP: #1606203) + (PPA build for snap builds) + + -- Oliver Grawert Fri, 09 Sep 2016 15:30:15 +0200 + +bzr (2.7.0-2ubuntu2) xenial-proposed; urgency=medium + + * SRU: LP: #1592731. + * Cope with paramiko making argument to SFTPFile.prefetch() mandatory. + Closes: #822116 + + -- Matthias Klose Wed, 15 Jun 2016 11:42:01 +0200 + bzr (2.7.0-2ubuntu1) xenial; urgency=low * Resynchronise on Debian (LP: #1544487). Remaining changes: diff -Nru bzr-2.7.0/debian/patches/16_paramiko_compat bzr-2.7.0/debian/patches/16_paramiko_compat --- bzr-2.7.0/debian/patches/16_paramiko_compat 1970-01-01 00:00:00.000000000 +0000 +++ bzr-2.7.0/debian/patches/16_paramiko_compat 2016-06-15 09:45:40.000000000 +0000 @@ -0,0 +1,16 @@ +=== modified file 'bzrlib/transport/sftp.py' +Index: unstable/bzrlib/transport/sftp.py +=================================================================== +--- unstable.orig/bzrlib/transport/sftp.py ++++ unstable/bzrlib/transport/sftp.py +@@ -410,8 +410,9 @@ class SFTPTransport(ConnectedTransport): + try: + path = self._remote_path(relpath) + f = self._get_sftp().file(path, mode='rb') ++ size = f.stat().st_size + if self._do_prefetch and (getattr(f, 'prefetch', None) is not None): +- f.prefetch() ++ f.prefetch(size) + return f + except (IOError, paramiko.SSHException), e: + self._translate_io_exception(e, path, ': error retrieving', diff -Nru bzr-2.7.0/debian/patches/20_1606203-long-auth.patch bzr-2.7.0/debian/patches/20_1606203-long-auth.patch --- bzr-2.7.0/debian/patches/20_1606203-long-auth.patch 1970-01-01 00:00:00.000000000 +0000 +++ bzr-2.7.0/debian/patches/20_1606203-long-auth.patch 2016-09-09 13:30:15.000000000 +0000 @@ -0,0 +1,45 @@ +## Description: add some description +## Origin/Author: add some origin or author +## Bug: bug URL +Index: bzr-2.7.0/bzrlib/tests/test_http.py +=================================================================== +--- bzr-2.7.0.orig/bzrlib/tests/test_http.py ++++ bzr-2.7.0/bzrlib/tests/test_http.py +@@ -260,6 +260,16 @@ class TestAuthHeader(tests.TestCase): + self.assertEqual('basic', scheme) + self.assertEqual('realm="Thou should not pass"', remainder) + ++ def test_build_basic_header_with_long_creds(self): ++ handler = _urllib2_wrappers.BasicAuthHandler() ++ user = 'user' * 10 # length 40 ++ password = 'password' * 5 # length 40 ++ header = handler.build_auth_header( ++ dict(user=user, password=password), None) ++ # https://bugs.launchpad.net/bzr/+bug/1606203 was caused by incorrectly ++ # creating a header value with an embedded '\n' ++ self.assertFalse('\n' in header) ++ + def test_basic_extract_realm(self): + scheme, remainder = self.parse_header( + 'Basic realm="Thou should not pass"', +Index: bzr-2.7.0/bzrlib/transport/http/_urllib2_wrappers.py +=================================================================== +--- bzr-2.7.0.orig/bzrlib/transport/http/_urllib2_wrappers.py ++++ bzr-2.7.0/bzrlib/transport/http/_urllib2_wrappers.py +@@ -48,6 +48,7 @@ DEBUG = 0 + # actual code more or less do that, tests should be written to + # ensure that. + ++import base64 + import errno + import httplib + import os +@@ -1491,7 +1492,7 @@ class BasicAuthHandler(AbstractAuthHandl + + def build_auth_header(self, auth, request): + raw = '%s:%s' % (auth['user'], auth['password']) +- auth_header = 'Basic ' + raw.encode('base64').strip() ++ auth_header = 'Basic ' + base64.b64encode(raw) + return auth_header + + def extract_realm(self, header_value): diff -Nru bzr-2.7.0/debian/patches/series bzr-2.7.0/debian/patches/series --- bzr-2.7.0/debian/patches/series 2016-02-10 19:41:18.000000000 +0000 +++ bzr-2.7.0/debian/patches/series 2016-09-09 13:26:49.000000000 +0000 @@ -2,3 +2,5 @@ 03_spurious_test_failure 07_shorten_test_names 13_spurious_test_failure +16_paramiko_compat +20_1606203-long-auth.patch